pdfstudio: fix hash mismatch (#360194)

This commit is contained in:
Aleksana 2024-12-05 20:53:40 +08:00 committed by GitHub
commit 70d86c64a0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 86 additions and 55 deletions

View File

@ -1,22 +1,23 @@
{ pname
, program
, src
, year
, version
, desktopName
, longDescription
, broken ? false
, buildFHSEnv
, extraBuildInputs ? [ ]
, jdk
, stdenv
, lib
, dpkg
, makeDesktopItem
, copyDesktopItems
, autoPatchelfHook
, sane-backends
, cups
{
pname,
program,
src,
year,
version,
desktopName,
longDescription,
broken ? false,
buildFHSEnv,
extraBuildInputs ? [ ],
jdk,
stdenv,
lib,
dpkg,
makeDesktopItem,
copyDesktopItems,
autoPatchelfHook,
sane-backends,
cups,
}:
let
thisPackage = stdenv.mkDerivation rec {
@ -24,7 +25,7 @@ let
strictDeps = true;
buildInputs = [
sane-backends #for libsane.so.1
sane-backends # for libsane.so.1
] ++ extraBuildInputs;
nativeBuildInputs = [
@ -70,10 +71,12 @@ in
# Package with cups in FHS sandbox, because JAVA bin expects "/usr/bin/lpr" for printing.
buildFHSEnv {
inherit pname version;
targetPkgs = pkgs: [
cups
thisPackage
];
runScript = "${program}${year}";
# link desktop item and icon into FHS user environment
@ -84,18 +87,18 @@ buildFHSEnv {
ln -s ${thisPackage}/share/pixmaps/*.png "$out/share/pixmaps/"
'';
meta = with lib; {
meta = {
inherit broken;
homepage = "https://www.qoppa.com/${pname}/";
description = "Easy to use, full-featured PDF editing software";
longDescription = longDescription;
sourceProvenance = with sourceTypes; [
sourceProvenance = with lib.sourceTypes; [
binaryBytecode
binaryNativeCode
];
license = licenses.unfree;
platforms = platforms.linux;
license = lib.licenses.unfree;
platforms = lib.platforms.linux;
mainProgram = pname;
maintainers = [ maintainers.pwoelfel ];
maintainers = with lib.maintainers; [ pwoelfel ];
};
}

View File

@ -8,90 +8,118 @@
# - year identifies the year portion of the version, defaults to most recent year.
# - pname is either "pdfstudio${year}" or "pdfstudioviewer".
{ lib
, stdenv
, program ? "pdfstudio"
, year ? "2023"
, fetchurl
, callPackage
, jdk11
, jdk17
{
lib,
stdenv,
program ? "pdfstudio",
year ? "2024",
fetchurl,
callPackage,
jdk11,
jdk17,
}:
let
longDescription = ''
PDF Studio is an easy to use, full-featured PDF editing software. This is the standard/pro edition, which requires a license. For the free PDF Studio Viewer see the package pdfstudioviewer.
'';
pname = if (program == "pdfstudio") then "${program}${year}" else program;
desktopName =
if (program == "pdfstudio")
then "PDF Studio ${year}"
else "PDF Studio Viewer";
desktopName = if (program == "pdfstudio") then "PDF Studio ${year}" else "PDF Studio Viewer";
dot2dash = str: builtins.replaceStrings [ "." ] [ "_" ] str;
in
{
pdfstudioviewer = callPackage ./common.nix rec {
inherit desktopName pname program year;
version = "${year}.0.3";
inherit
desktopName
pname
program
year
;
version = "${year}.0.1";
longDescription = ''
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/pdfstudioviewer/PDFStudioViewer_linux64.deb";
sha256 = "sha256-JQx5yJLjwW4VRXLM+/VNDXFN8ZcHJxlxyKDIzc++hEs=";
url = "https://web.archive.org/web/20241201121627/https://download.qoppa.com/pdfstudioviewer/PDFStudioViewer_linux64.deb";
hash = "sha256-hxReGuyGsBiEr7wWxWzQUQvxk11sgF9HkJ07L9i+e+0=";
};
jdk = jdk17;
};
pdfstudio2021 = callPackage ./common.nix rec {
inherit desktopName longDescription pname program year;
inherit
desktopName
longDescription
pname
program
year
;
version = "${year}.2.2";
src = fetchurl {
url = "https://download.qoppa.com/pdfstudio/v${year}/PDFStudio_v${dot2dash version}_linux64.deb";
sha256 = "sha256-HdkwRMqwquAaW6l3AukGReFtw2f5n36tZ8vXo6QiPvU=";
hash = "sha256-HdkwRMqwquAaW6l3AukGReFtw2f5n36tZ8vXo6QiPvU=";
};
extraBuildInputs = [
(lib.getLib stdenv.cc.cc) # for libstdc++.so.6 and libgomp.so.1
(lib.getLib stdenv.cc.cc) # for libstdc++.so.6 and libgomp.so.1
];
jdk = jdk11;
};
pdfstudio2022 = callPackage ./common.nix rec {
inherit desktopName longDescription pname program year;
inherit
desktopName
longDescription
pname
program
year
;
version = "${year}.2.5";
src = fetchurl {
url = "https://download.qoppa.com/pdfstudio/v${year}/PDFStudio_v${dot2dash version}_linux64.deb";
sha256 = "sha256-3faZyWUnFe//S+gOskWhsZ6jzHw67FRsv/xP77R1jj4=";
hash = "sha256-3faZyWUnFe//S+gOskWhsZ6jzHw67FRsv/xP77R1jj4=";
};
extraBuildInputs = [
(lib.getLib stdenv.cc.cc) # for libstdc++.so.6 and libgomp.so.1
(lib.getLib stdenv.cc.cc) # for libstdc++.so.6 and libgomp.so.1
];
jdk = jdk17;
};
pdfstudio2023 = callPackage ./common.nix rec {
inherit desktopName longDescription pname program year;
version = "${year}.0.3";
inherit
desktopName
longDescription
pname
program
year
;
version = "${year}.0.4";
src = fetchurl {
url = "https://download.qoppa.com/pdfstudio/v${year}/PDFStudio_v${dot2dash version}_linux64.deb";
sha256 = "sha256-Po7BMmEWoC46rP7tUwZT9Ji/Wi8lKc6WN8x47fx2DXg=";
hash = "sha256-TTh0yzpCOpxFKGfrakvnu1Y+l9NI0nfWlVuvSWpkRkE=";
};
extraBuildInputs = [
(lib.getLib stdenv.cc.cc) # for libstdc++.so.6 and libgomp.so.1
(lib.getLib stdenv.cc.cc) # for libstdc++.so.6 and libgomp.so.1
];
jdk = jdk17;
};
pdfstudio2024 = callPackage ./common.nix rec {
inherit desktopName longDescription pname program year;
inherit
desktopName
longDescription
pname
program
year
;
version = "${year}.0.0";
src = fetchurl {
url = "https://download.qoppa.com/pdfstudio/v${year}/PDFStudio_v${dot2dash version}_linux64.deb";
sha256 = "sha256-9TMSKtBE0+T7wRnBgtUjRr/JUmCaYdyD/7y0ML37wCM=";
hash = "sha256-9TMSKtBE0+T7wRnBgtUjRr/JUmCaYdyD/7y0ML37wCM=";
};
extraBuildInputs = [
(lib.getLib stdenv.cc.cc) # for libstdc++.so.6 and libgomp.so.1
(lib.getLib stdenv.cc.cc) # for libstdc++.so.6 and libgomp.so.1
];
jdk = jdk17;
};
}.${pname}
}
.${pname}