Skip to content

Commit

Permalink
finally properly wrap program with crane
Browse files Browse the repository at this point in the history
  • Loading branch information
justDeeevin committed Sep 19, 2024
1 parent c183cd8 commit 1d5194c
Showing 1 changed file with 20 additions and 18 deletions.
38 changes: 20 additions & 18 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -72,24 +72,7 @@
pkgs.libiconv
];

nativeBuildInputs = with pkgs; [copyDesktopItems pkg-config];

desktopItems = [
(pkgs.makeDesktopItem {
name = "NuhxBoard";
desktopName = "NuhxBoard";
comment = "Cross-platform input visualizer";
icon = "NuhxBoard";
exec = "nuhxboard";
terminal = false;
keywords = ["Keyboard"];
startupWMClass = "NuhxBoard";
})
];

postInstall = ''
install -Dm644 ${src}/NuhxBoard.png $out/share/icons/hicolor/128x128/apps/NuhxBoard.png
'';
nativeBuildInputs = with pkgs; [copyDesktopItems pkg-config makeWrapper];
};

craneLibLLvmTools =
Expand All @@ -109,6 +92,25 @@
nuhxboard = craneLib.buildPackage (commonArgs
// {
inherit cargoArtifacts;
}
// {
desktopItems = [
(pkgs.makeDesktopItem {
name = "NuhxBoard";
desktopName = "NuhxBoard";
comment = "Cross-platform input visualizer";
icon = "NuhxBoard";
exec = "nuhxboard";
terminal = false;
keywords = ["Keyboard"];
startupWMClass = "NuhxBoard";
})
];

postInstall = ''
install -Dm644 ${src}/NuhxBoard.png $out/share/icons/hicolor/128x128/apps/NuhxBoard.png
wrapProgram $out/bin/nuhxboard --set PATH "${pkgs.lib.makeBinPath commonArgs.buildInputs}"
'';
});
in {
checks = {
Expand Down

0 comments on commit 1d5194c

Please sign in to comment.