more shanigans

This commit is contained in:
Gerg-L 2023-06-10 21:52:04 -04:00
parent 5102d87d20
commit b602fc4ee0
8 changed files with 204 additions and 154 deletions

View file

@ -13,17 +13,7 @@
libappindicator-gtk3,
atk,
fetchFromGitHub,
}:
rustPlatform.buildRustPackage rec {
name = "afk-cmds";
src = fetchFromGitHub {
owner = "Gerg-L";
repo = "afk-cmds";
rev = "b345d5a038a86c6ca31d3bd8800ac759da912a22";
sha256 = "sha256-yleq8bg3ZnilbYTNXRteBALiJ/fIXOxXxqf966OokqQ=";
};
}: let
buildInputs = [
libX11
libXScrnSaver
@ -35,17 +25,29 @@ rustPlatform.buildRustPackage rec {
libappindicator-gtk3
atk
];
in
rustPlatform.buildRustPackage {
name = "afk-cmds";
nativeBuildInputs = [
pkg-config
wrapGAppsHook
];
src = fetchFromGitHub {
owner = "Gerg-L";
repo = "afk-cmds";
rev = "b345d5a038a86c6ca31d3bd8800ac759da912a22";
sha256 = "sha256-yleq8bg3ZnilbYTNXRteBALiJ/fIXOxXxqf966OokqQ=";
};
postFixup = ''
wrapProgram $out/bin/afk-cmds \
--prefix LD_LIBRARY_PATH : ${(lib.makeLibraryPath buildInputs)}
mkdir -p $out/share/icons/hicolor/256x256/apps/
cp $src/afk-icon.png $out/share/icons/hicolor/256x256/apps/afk-icon.png
'';
cargoSha256 = "sha256-CPpFUdgb0zTZAVlv4uhJ0Y7eocCjuEZNgQJdNwV1FI4=";
}
inherit buildInputs;
nativeBuildInputs = [
pkg-config
wrapGAppsHook
];
postFixup = ''
wrapProgram $out/bin/afk-cmds \
--prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath buildInputs}
mkdir -p $out/share/icons/hicolor/256x256/apps/
cp $src/afk-icon.png $out/share/icons/hicolor/256x256/apps/afk-icon.png
'';
cargoSha256 = "sha256-CPpFUdgb0zTZAVlv4uhJ0Y7eocCjuEZNgQJdNwV1FI4=";
}