push sheeet
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

This commit is contained in:
Dark Steveneq
2025-10-09 14:15:47 +02:00
commit 646b892680
49168 changed files with 5897842 additions and 0 deletions

View File

@@ -0,0 +1,105 @@
{
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 {
inherit pname src version;
strictDeps = true;
buildInputs = [
sane-backends # for libsane.so.1
]
++ extraBuildInputs;
nativeBuildInputs = [
autoPatchelfHook
dpkg
copyDesktopItems
];
desktopItems = [
(makeDesktopItem {
name = "${pname}";
desktopName = desktopName;
genericName = "View and edit PDF files";
exec = "${pname} %f";
icon = "${pname}";
comment = "Views and edits PDF files";
mimeTypes = [ "application/pdf" ];
categories = [ "Office" ];
})
];
dontBuild = true;
postPatch = ''
substituteInPlace opt/${program}${year}/${program}${year} --replace "# INSTALL4J_JAVA_HOME_OVERRIDE=" "INSTALL4J_JAVA_HOME_OVERRIDE=${jdk.out}"
substituteInPlace opt/${program}${year}/updater --replace "# INSTALL4J_JAVA_HOME_OVERRIDE=" "INSTALL4J_JAVA_HOME_OVERRIDE=${jdk.out}"
'';
installPhase = ''
runHook preInstall
mkdir -p $out/{bin,share/pixmaps}
rm -rf opt/${program}${year}/jre
cp -r opt/${program}${year} $out/share/
ln -s $out/share/${program}${year}/.install4j/${program}${year}.png $out/share/pixmaps/${pname}.png
ln -s $out/share/${program}${year}/${program}${year} $out/bin/
runHook postInstall
'';
};
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
extraInstallCommands = ''
mkdir -p "$out/share/applications"
mkdir -p "$out/share/pixmaps"
ln -s ${thisPackage}/share/applications/*.desktop "$out/share/applications/"
ln -s ${thisPackage}/share/pixmaps/*.png "$out/share/pixmaps/"
'';
meta = {
inherit broken;
homepage = "https://www.qoppa.com/${pname}/";
description = "Easy to use, full-featured PDF editing software";
longDescription = longDescription;
sourceProvenance = with lib.sourceTypes; [
binaryBytecode
binaryNativeCode
];
license = lib.licenses.unfree;
platforms = lib.platforms.linux;
mainProgram = pname;
maintainers = with lib.maintainers; [ pwoelfel ];
};
}

View File

@@ -0,0 +1,125 @@
# For upstream versions, download links, and change logs see https://www.qoppa.com/pdfstudio/versions
#
# PDF Studio license is for a specific year, so we need different packages for different years.
# All versions of PDF Studio Viewer are free, so we package only the latest year.
# Thus, packages are pdfstudioviewer, pdfstudio2021, pdfstudio2022, etc.
# Variables:
# - program is either "pdfstudio" or "pdfstudioviewer", defaults to "pdfstudio".
# - 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 ? "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";
dot2dash = str: builtins.replaceStrings [ "." ] [ "_" ] str;
in
{
pdfstudioviewer = callPackage ./common.nix rec {
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://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
;
version = "${year}.2.2";
src = fetchurl {
url = "https://download.qoppa.com/pdfstudio/v${year}/PDFStudio_v${dot2dash version}_linux64.deb";
hash = "sha256-HdkwRMqwquAaW6l3AukGReFtw2f5n36tZ8vXo6QiPvU=";
};
extraBuildInputs = [
(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
;
version = "${year}.2.5";
src = fetchurl {
url = "https://download.qoppa.com/pdfstudio/v${year}/PDFStudio_v${dot2dash version}_linux64.deb";
hash = "sha256-3faZyWUnFe//S+gOskWhsZ6jzHw67FRsv/xP77R1jj4=";
};
extraBuildInputs = [
(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.4";
src = fetchurl {
url = "https://download.qoppa.com/pdfstudio/v${year}/PDFStudio_v${dot2dash version}_linux64.deb";
hash = "sha256-TTh0yzpCOpxFKGfrakvnu1Y+l9NI0nfWlVuvSWpkRkE=";
};
extraBuildInputs = [
(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
;
version = "${year}.0.1";
src = fetchurl {
url = "https://download.qoppa.com/pdfstudio/v${year}/PDFStudio_v${dot2dash version}_linux64.deb";
hash = "sha256-dptpkWPlocp4U9QSp+AJTOSVWA3RRs8GrFfXhCYzOJc=";
};
extraBuildInputs = [
(lib.getLib stdenv.cc.cc) # for libstdc++.so.6 and libgomp.so.1
];
jdk = jdk17;
};
}
.${pname}