pureref: add desktop shortcut

This commit is contained in:
musjj
2025-04-23 02:52:53 +07:00
parent 7582a31767
commit cafc96cc1b
+22 -8
View File
@@ -5,26 +5,39 @@
curl,
gnugrep,
cacert,
dpkg,
}:
appimageTools.wrapType1 rec {
pname = "pureref";
let
version = "2.0.3";
src =
runCommand "PureRef-${version}_x64.Appimage"
deb =
runCommand "PureRef-${version}_x64"
{
nativeBuildInputs = [
curl
gnugrep
cacert
dpkg
];
outputHash = "sha256-0iR1cP2sZvWWqKwRAwq6L/bmIBSYHKrlI8u8V2hANfM=";
outputHash = "sha256-VdKu1YQa+//FbNWqgTPoUhY4pSekgVohI53D4i5hVkQ=";
outputHashMode = "recursive";
}
''
key="$(curl -A 'nixpkgs/Please contact maintainer if there is an issue' "https://www.pureref.com/download.php" --silent | grep '%3D%3D' | cut -d '"' -f2)"
curl -L "https://www.pureref.com/files/build.php?build=LINUX64.Appimage&version=${version}&downloadKey=$key" --output $out
curl -L "https://www.pureref.com/files/build.php?build=LINUX64.deb&version=${version}&downloadKey=$key" --output $name.deb
dpkg-deb -x $name.deb $out
chmod 755 $out
'';
in
appimageTools.wrapType1 {
pname = "pureref";
inherit version;
src = "${deb}/usr/bin/PureRef";
extraInstallCommands = ''
mv $out/bin/pureref $out/bin/PureRef
cp -r ${deb}/usr/share $out
'';
meta = with lib; {
description = "Reference Image Viewer";
@@ -35,6 +48,7 @@ appimageTools.wrapType1 rec {
husjon
];
platforms = [ "x86_64-linux" ];
mainProgram = "PureRef";
sourceProvenance = [ lib.sourceTypes.binaryNativeCode ];
};
}