Create a flake that can run the Kifu app

This commit is contained in:
Savanni D'Gerinel 2024-02-26 18:17:32 -05:00
parent 9e7350b087
commit 91101d3bc6
2 changed files with 20 additions and 0 deletions

View File

@ -70,6 +70,7 @@
dashboard = attrs: { nativeBuildInputs = gtkNativeInputs; };
fitnesstrax = import ./fitnesstrax/app/override.nix { gtkNativeInputs = gtkNativeInputs; };
kifu-gtk = import ./kifu/gtk/override.nix { gtkNativeInputs = gtkNativeInputs; };
};
};
@ -83,6 +84,7 @@
dashboard = cargo_nix.workspaceMembers.dashboard.build;
file-service = cargo_nix.workspaceMembers.file-service.build;
fitnesstrax = cargo_nix.workspaceMembers.fitnesstrax.build;
kifu-gtk = cargo_nix.workspaceMembers.kifu-gtk.build;
all = pkgs.symlinkJoin {
name = "all";
@ -91,6 +93,7 @@
dashboard
file-service
fitnesstrax
kifu-gtk
];
};

17
kifu/gtk/override.nix Normal file
View File

@ -0,0 +1,17 @@
{ gtkNativeInputs }:
attrs:
let
gsettingsDir = "${attrs.crateName}-${attrs.version}";
in {
nativeBuildInputs = gtkNativeInputs;
# postInstall = ''
# install -Dt $out/share/applications resources/kifu.desktop
# install -Dt $out/gsettings-schemas/${gsettingsDir}/glib-2.0/schemas resources/com.luminescent-dreams.fitnesstrax.gschema.xml
# glib-compile-schemas $out/gsettings-schemas/${gsettingsDir}/glib-2.0/schemas
# '';
# preFixup = ''
# gappsWrapperArgs+=(
# --prefix XDG_DATA_DIRS : $out/gsettings-schemas/${gsettingsDir}
# )
# '';
}