From cb2bec42878f2d6a8d6e763ff3c0bdd9cea20b5f Mon Sep 17 00:00:00 2001 From: Savanni D'Gerinel Date: Sat, 10 Feb 2024 12:28:12 -0500 Subject: [PATCH 1/3] First pass at an installer override --- fitnesstrax/app/override.nix | 8 ++++++++ flake.nix | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 fitnesstrax/app/override.nix diff --git a/fitnesstrax/app/override.nix b/fitnesstrax/app/override.nix new file mode 100644 index 0000000..acc335f --- /dev/null +++ b/fitnesstrax/app/override.nix @@ -0,0 +1,8 @@ +{ gtkNativeInputs }: +attrs: { + nativeBuildInputs = gtkNativeInputs; + postInstall = '' + install -Dt $out/share/applications resources/fitnesstrax.desktop + install -Dt $out/share/glib-2.0/schemas resources/com.luminescent-dreams.fitnesstrax.gschema.xml + ''; +} \ No newline at end of file diff --git a/flake.nix b/flake.nix index 70bc31b..ca9e48c 100644 --- a/flake.nix +++ b/flake.nix @@ -68,7 +68,7 @@ libadwaita-sys = attrs: { nativeBuildInputs = gtkNativeInputs; }; dashboard = attrs: { nativeBuildInputs = gtkNativeInputs; }; - fitnesstrax = attrs: { nativeBuildInputs = gtkNativeInputs; }; + fitnesstrax = import ./fitnesstrax/app/override.nix { gtkNativeInputs = gtkNativeInputs; }; }; }; -- 2.44.1 From 4dd6afeae776daa9ba8f69ecfdb7fd5a2e7ae5e3 Mon Sep 17 00:00:00 2001 From: Savanni D'Gerinel Date: Mon, 12 Feb 2024 09:15:47 -0500 Subject: [PATCH 2/3] Add the desktop shortcut and the gsettings schema to the fitnesstrax installation --- fitnesstrax/app/override.nix | 8 +++++++- flake.nix | 1 + 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/fitnesstrax/app/override.nix b/fitnesstrax/app/override.nix index acc335f..fe83c85 100644 --- a/fitnesstrax/app/override.nix +++ b/fitnesstrax/app/override.nix @@ -3,6 +3,12 @@ attrs: { nativeBuildInputs = gtkNativeInputs; postInstall = '' install -Dt $out/share/applications resources/fitnesstrax.desktop - install -Dt $out/share/glib-2.0/schemas resources/com.luminescent-dreams.fitnesstrax.gschema.xml + install -Dt $out/gsettings-schemas/${attrs.crateName}-${attrs.version}/glib-2.0/schemas resources/com.luminescent-dreams.fitnesstrax.gschema.xml + glib-compile-schemas $out/gsettings-schemas/${attrs.crateName}-${attrs.version}/glib-2.0/schemas + ''; + preFixup = '' + gappsWrapperArgs+=( + --prefix XDG_DATA_DIRS : $out/gsettings-schemas/${attrs.crateName}-${attrs.version} + ) ''; } \ No newline at end of file diff --git a/flake.nix b/flake.nix index ca9e48c..9cd6153 100644 --- a/flake.nix +++ b/flake.nix @@ -58,6 +58,7 @@ pkgs.pkg-config pkgs.gtk4 pkgs.libadwaita + pkgs.wrapGAppsHook4 ]; cargoOverrides = pkgs: pkgs.buildRustCrate.override { -- 2.44.1 From ab59eedef5e2d127fd959aa847514c8527abcac7 Mon Sep 17 00:00:00 2001 From: Savanni D'Gerinel Date: Mon, 12 Feb 2024 10:14:55 -0500 Subject: [PATCH 3/3] Fitnesstrax v0.4.1 --- Cargo.lock | 2 +- fitnesstrax/app/Cargo.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 6bf9537..6a33e73 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -936,7 +936,7 @@ checksum = "8fcfdc7a0362c9f4444381a9e697c79d435fe65b52a37466fc2c1184cee9edc6" [[package]] name = "fitnesstrax" -version = "0.4.0" +version = "0.4.1" dependencies = [ "async-channel", "async-trait", diff --git a/fitnesstrax/app/Cargo.toml b/fitnesstrax/app/Cargo.toml index 64a1e2b..dded4a7 100644 --- a/fitnesstrax/app/Cargo.toml +++ b/fitnesstrax/app/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "fitnesstrax" -version = "0.4.0" +version = "0.4.1" edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html -- 2.44.1