1
0
2025-03-01 17:31:11 +08:00

34 lines
579 B
Nix

{
stdenv,
jq,
zlib-ng,
passh,
...
}:
let
bin = ./access-client;
desktop = ./access-client.desktop;
in
stdenv.mkDerivation rec {
pname = "access-client";
version = "1.0.0";
buildInputs = [
jq
zlib-ng
passh
];
phases = [ "installPhase" ];
installPhase = ''
mkdir -p $out/bin
cp -rv "${bin}" $out/bin/${pname}
chmod +x $out/bin/${pname}
mkdir -p $out/share/applications
sed "/^Version=/s|@VERSION|${version}|" "${desktop}" | sed "/^Exec=/s|@EXEC|$out/bin/${pname}|" > "$out/share/applications/${pname}.desktop"
'';
}