Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
59 lines
1.4 KiB
Nix
59 lines
1.4 KiB
Nix
{
|
|
lib,
|
|
appimageTools,
|
|
makeWrapper,
|
|
runCommand,
|
|
curl,
|
|
gnugrep,
|
|
cacert,
|
|
dpkg,
|
|
}:
|
|
let
|
|
version = "2.0.3";
|
|
deb =
|
|
runCommand "PureRef-${version}_x64"
|
|
{
|
|
nativeBuildInputs = [
|
|
curl
|
|
gnugrep
|
|
cacert
|
|
dpkg
|
|
];
|
|
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.deb&version=${version}&downloadKey=$key" --output $name.deb
|
|
dpkg-deb -x $name.deb $out
|
|
chmod 755 $out
|
|
'';
|
|
in
|
|
appimageTools.wrapType1 {
|
|
pname = "pureref";
|
|
inherit version;
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
src = "${deb}/usr/bin/PureRef";
|
|
|
|
extraInstallCommands = ''
|
|
mv $out/bin/pureref $out/bin/PureRef
|
|
cp -r ${deb}/usr/share $out
|
|
wrapProgram $out/bin/PureRef --set QT_QPA_PLATFORM xcb
|
|
'';
|
|
|
|
meta = with lib; {
|
|
description = "Reference Image Viewer";
|
|
homepage = "https://www.pureref.com";
|
|
license = licenses.unfree;
|
|
maintainers = with maintainers; [
|
|
elnudev
|
|
husjon
|
|
];
|
|
platforms = [ "x86_64-linux" ];
|
|
mainProgram = "PureRef";
|
|
sourceProvenance = [ lib.sourceTypes.binaryNativeCode ];
|
|
};
|
|
}
|