pdfstudio: added function for creating src url (#156635)

pdfstudio: added function for creating src url
This commit is contained in:
Philipp Woelfel 2022-01-31 13:13:37 -07:00 committed by GitHub
parent d5ddafd0fa
commit 1f3c6c657d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -4,6 +4,10 @@
, callPackage
}:
let makeurl = { pname, year, version }: "https://download.qoppa.com/${pname}/v${year}/${
builtins.replaceStrings [ "pdfstudio" "viewer" "." ] [ "PDFStudio" "Viewer" "_" ] "${pname}_v${version}"
}_linux64.deb";
in
{
pdfstudio = callPackage ./common.nix rec {
pname = program;
@ -17,9 +21,7 @@
libgccjit #for libstdc++.so.6 and libgomp.so.1
];
src = fetchurl {
url = "https://download.qoppa.com/${pname}/v${year}/PDFStudio_v${
builtins.replaceStrings [ "." ] [ "_" ] version
}_linux64.deb";
url = makeurl { inherit pname year version; };
sha256 = "1188ll2qz58rr2slavqxisbz4q3fdzidpasb1p33926z0ym3rk45";
};
};
@ -33,9 +35,7 @@
PDF Studio Viewer is an easy to use, full-featured PDF editing software. This is the free edition. For the standard/pro edition, see the package pdfstudio.
'';
src = fetchurl {
url = "https://download.qoppa.com/${pname}/v${year}/PDFStudioViewer_v${
builtins.replaceStrings [ "." ] [ "_" ] version
}_linux64.deb";
url = makeurl { inherit pname year version; };
sha256 = "128k3fm8m8zdykx4s30g5m2zl7cgmvs4qinf1w525zh84v56agz6";
};
};