Write a program to try testing XDG_DATA_DIRS and wrapGAppsHook4

This commit is contained in:
Savanni D'Gerinel 2024-03-04 09:15:12 -05:00
parent 822e88a8ce
commit 9699c63e50
7 changed files with 2039 additions and 4 deletions

4
Cargo.lock generated
View File

@ -5562,6 +5562,10 @@ version = "0.5.4"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "dad7bb64b8ef9c0aa27b6da38b452b0ee9fd82beaf276a87dd796fb55cbae14e" checksum = "dad7bb64b8ef9c0aa27b6da38b452b0ee9fd82beaf276a87dd796fb55cbae14e"
[[package]]
name = "xdg-test"
version = "0.1.0"
[[package]] [[package]]
name = "yoke" name = "yoke"
version = "0.7.3" version = "0.7.3"

2013
Cargo.nix

File diff suppressed because it is too large Load Diff

View File

@ -29,4 +29,5 @@ members = [
"timezone-testing", "timezone-testing",
"tree", "tree",
"visions/server", "visions/server",
"xdg-test",
] ]

View File

@ -71,6 +71,7 @@
dashboard = attrs: { nativeBuildInputs = gtkNativeInputs; }; dashboard = attrs: { nativeBuildInputs = gtkNativeInputs; };
fitnesstrax = import ./fitnesstrax/app/override.nix { gtkNativeInputs = gtkNativeInputs; }; fitnesstrax = import ./fitnesstrax/app/override.nix { gtkNativeInputs = gtkNativeInputs; };
kifu-gtk = import ./kifu/gtk/override.nix { gtkNativeInputs = gtkNativeInputs; }; kifu-gtk = import ./kifu/gtk/override.nix { gtkNativeInputs = gtkNativeInputs; };
xdg-test = import ./xdg-test/override.nix { wrapGAppsHook4 = pkgs.wrapGAppsHook4; };
}; };
}; };
@ -85,6 +86,7 @@
file-service = cargo_nix.workspaceMembers.file-service.build; file-service = cargo_nix.workspaceMembers.file-service.build;
fitnesstrax = cargo_nix.workspaceMembers.fitnesstrax.build; fitnesstrax = cargo_nix.workspaceMembers.fitnesstrax.build;
kifu-gtk = cargo_nix.workspaceMembers.kifu-gtk.build; kifu-gtk = cargo_nix.workspaceMembers.kifu-gtk.build;
xdg-test = cargo_nix.workspaceMembers.xdg-test.build;
all = pkgs.symlinkJoin { all = pkgs.symlinkJoin {
name = "all"; name = "all";
@ -94,6 +96,7 @@
file-service file-service
fitnesstrax fitnesstrax
kifu-gtk kifu-gtk
xdg-test
]; ];
}; };

8
xdg-test/Cargo.toml Normal file
View File

@ -0,0 +1,8 @@
[package]
name = "xdg-test"
version = "0.1.0"
edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]

7
xdg-test/override.nix Normal file
View File

@ -0,0 +1,7 @@
{ wrapGAppsHook4 }:
attrs:
let
gsettingsDir = "${attrs.crateName}-${attrs.version}";
in {
nativeBuildInputs = [ wrapGAppsHook4 ];
}

7
xdg-test/src/main.rs Normal file
View File

@ -0,0 +1,7 @@
use std::env;
fn main() {
let data_dirs = env::var("XDG_DATA_DIRS");
println!("{:?}", data_dirs);
}