1 { lib, stdenv, fetchurl, appimageTools, undmg }:
4 pname = "passky-desktop";
8 x86_64-linux = fetchurl {
9 url = "https://github.com/Rabbit-Company/Passky-Desktop/releases/download/v${version}/Passky-${version}.AppImage";
10 sha256 = "1xnhrmmm018mmyzjq05mhbf673f0n81fh1k3kbfarbgk2kbwpq6y";
12 x86_64-darwin = fetchurl {
13 url = "https://github.com/Rabbit-Company/Passky-Desktop/releases/download/v${version}/Passky-${version}.dmg";
14 sha256 = "0mm7hk4v7zvpjdqyw3nhk33x72j0gh3f59bx3q18azlm4dr61r2d";
17 src = srcs.${stdenv.hostPlatform.system} or (throw "Unsupported system: ${stdenv.hostPlatform.system}");
19 appimageContents = appimageTools.extract { inherit pname version src; };
21 homepage = "https://passky.org";
22 downloadPage = "https://github.com/Rabbit-Company/Passky-Desktop/releases";
23 license = licenses.gpl3Only;
24 maintainers = with maintainers; [ akkesm ];
25 platforms = builtins.attrNames srcs;
28 linux = appimageTools.wrapType2 {
29 inherit pname version src meta;
31 extraInstallCommands = ''
32 mv $out/bin/${pname}-${version} $out/bin/${pname}
34 install -D ${appimageContents}/passky.desktop \
35 $out/share/applications/${pname}.desktop
37 substituteInPlace $out/share/applications/${pname}.desktop \
38 --replace 'Exec=AppRun' 'Exec=${pname}'
40 cp -r ${appimageContents}/usr/share/icons $out/share
44 darwin = stdenv.mkDerivation {
45 inherit pname version src meta;
47 nativeBuildInputs = [ undmg ];
52 mkdir -p $out/Applications
53 cp -r *.app $out/Applications