diff options
author | github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> | 2021-07-25 00:01:35 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-25 00:01:35 +0000 |
commit | a37fbac53b1041937926ac62d49b09cf7a7088cc (patch) | |
tree | d9d4a537fca2eae08a7c0918e348d8828866c2bb /pkgs/tools/typesetting | |
parent | 859acbc1bc439bdb3d7a55001f754b1b9b30a7f6 (diff) | |
parent | ecaf3da9340231e5493eccc3db87604a3705da42 (diff) |
Merge master into staging-next
Diffstat (limited to 'pkgs/tools/typesetting')
-rw-r--r-- | pkgs/tools/typesetting/pdfchain/default.nix | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/pkgs/tools/typesetting/pdfchain/default.nix b/pkgs/tools/typesetting/pdfchain/default.nix new file mode 100644 index 000000000000..09122d60bc0d --- /dev/null +++ b/pkgs/tools/typesetting/pdfchain/default.nix @@ -0,0 +1,56 @@ +{ lib, stdenv, fetchurl, fetchpatch +, autoconf, gtkmm3, glib, pdftk, pkg-config, wrapGAppsHook +}: + +stdenv.mkDerivation rec { + pname = "pdfchain"; + version = "0.4.4.2"; + + src = fetchurl { + url = "mirror://sourceforge/${pname}/${pname}-${version}/${pname}-${version}.tar.gz"; + sha256 = "sha256-Hu4Pk9voyc75+f5OwKEOCkXKjN5nzWzv+izmyEN1Lz0="; + }; + + nativeBuildInputs = [ + pkg-config wrapGAppsHook autoconf + ]; + + buildInputs = [ + gtkmm3 pdftk glib + ]; + + patches = let + fetchDebianPatch = {name, sha256}: fetchpatch { + url = "https://salsa.debian.org/debian/pdfchain/raw/2d29107756a3194fb522bdea8e9b9e393b15a8f3/debian/patches/${name}"; + inherit name sha256; + }; + in + [ + (fetchDebianPatch { + name = "fix_crash_on_startup"; + sha256 = "sha256-1UyMHHGrmUIFhY53ILdMMsyocSIbcV6CKQ7sLVNhNQw="; + }) + (fetchDebianPatch { + name = "fix_desktop_file"; + sha256 = "sha256-L6lhUs7GqVN1XOQO6bbz6BT29n4upsJtlHCAIGzk1Bw="; + }) + (fetchDebianPatch { + name = "fix_spelling"; + sha256 = "sha256-sOUUslPfcOo2K3zuaLcux+CNdgfWM0phsfe6g4GUFes="; + }) + ]; + + postPatch = '' + substituteInPlace src/constant.h \ + --replace '"pdftk"' '"${pdftk}/bin/pdftk"' \ + --replace "/usr/share" "$out/share" + ''; + + meta = with lib; { + description = "A graphical user interface for the PDF Toolkit (PDFtk)"; + homepage = "https://pdfchain.sourceforge.io"; + license = licenses.gpl3Only; + maintainers = with maintainers; [ hqurve ]; + platforms = platforms.linux; + }; +} |