Merge pull request #112587 from sikmir/xpdf

xpdf: 4.02 → 4.03
This commit is contained in:
Sandro 2021-02-10 09:26:26 +01:00 committed by GitHub
commit a1b1e5a26b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 22 additions and 15 deletions

View File

@ -12,11 +12,11 @@ assert enablePrinting -> cups != null;
stdenv.mkDerivation rec {
pname = "xpdf";
version = "4.02";
version = "4.03";
src = fetchzip {
url = "https://xpdfreader-dl.s3.amazonaws.com/${pname}-${version}.tar.gz";
sha256 = "0dzwq6fnk013wa4l5mjpvm4mms2mh5hbrxv4rhk2ab5ljbzz7b2w";
url = "https://dl.xpdfreader.com/xpdf-${version}.tar.gz";
sha256 = "09yhvmh1vxjy763nnmawynygp5bh3j4i8ixqja64j11676yl77n6";
};
# Fix "No known features for CXX compiler", see
@ -36,8 +36,6 @@ stdenv.mkDerivation rec {
lib.optional enablePrinting cups ++
lib.optional enablePDFtoPPM freetype;
hardeningDisable = [ "format" ];
desktopItem = makeDesktopItem {
name = "xpdf";
desktopName = "Xpdf";
@ -48,11 +46,16 @@ stdenv.mkDerivation rec {
terminal = "false";
};
postInstall = ''
install -Dm644 ${desktopItem}/share/applications/xpdf.desktop $out/share/applications/xpdf.desktop
postInstall = lib.optionalString (!stdenv.isDarwin) ''
install -Dm644 ${desktopItem}/share/applications/xpdf.desktop -t $out/share/applications
install -Dm644 $src/xpdf-qt/xpdf-icon.svg $out/share/pixmaps/xpdf.svg
'';
# wrapQtAppsHook broken on macOS (https://github.com/NixOS/nixpkgs/issues/102044)
postFixup = lib.optionalString stdenv.isDarwin ''
wrapQtApp $out/bin/xpdf
'';
meta = with lib; {
homepage = "https://www.xpdfreader.com";
description = "Viewer for Portable Document Format (PDF) files";
@ -69,7 +72,7 @@ stdenv.mkDerivation rec {
pdffonts: lists fonts used in PDF files
pdfdetach: extracts attached files from PDF files
'';
license = with licenses; [ gpl2 gpl3 ];
license = with licenses; [ gpl2Only gpl3Only ];
platforms = platforms.unix;
maintainers = with maintainers; [ sikmir ];
knownVulnerabilities = [

View File

@ -2,30 +2,34 @@
}:
stdenv.mkDerivation {
name = "libxpdf-3.02pl4";
name = "libxpdf-3.02pl5";
src = fetchurl {
url = "ftp://ftp.foolabs.com/pub/xpdf/xpdf-3.02.tar.gz";
url = "https://dl.xpdfreader.com/old/xpdf-3.02.tar.gz";
sha256 = "000zq4ddbwyxiki4vdwpmxbnw5n9hsg9hvwra2p33hslyib7sfmk";
};
patches = [
(fetchurl {
url = "ftp://ftp.foolabs.com/pub/xpdf/xpdf-3.02pl1.patch";
url = "https://dl.xpdfreader.com/old/xpdf-3.02pl1.patch";
sha256 = "1wxv9l0d2kkwi961ihpdwi75whdvk7cgqxkbfym8cjj11fq17xjq";
})
(fetchurl {
url = "ftp://ftp.foolabs.com/pub/xpdf/xpdf-3.02pl2.patch";
url = "https://dl.xpdfreader.com/old/xpdf-3.02pl2.patch";
sha256 = "1nfrgsh9xj0vryd8h65myzd94bjz117y89gq0hzji9dqn23xihfi";
})
(fetchurl {
url = "ftp://ftp.foolabs.com/pub/xpdf/xpdf-3.02pl3.patch";
url = "https://dl.xpdfreader.com/old/xpdf-3.02pl3.patch";
sha256 = "0jskkv8x6dqr9zj4azaglas8cziwqqrkbbnzrpm2kzrvsbxyhk2r";
})
(fetchurl {
url = "ftp://ftp.foolabs.com/pub/xpdf/xpdf-3.02pl4.patch";
url = "https://dl.xpdfreader.com/old/xpdf-3.02pl4.patch";
sha256 = "1c48h7aizx0ngmzlzw0mpja1w8vqyy3pg62hyxp7c60k86al715h";
})
(fetchurl {
url = "https://dl.xpdfreader.com/old/xpdf-3.02pl5.patch";
sha256 = "1fki66pw56yr6aw38f6amrx7wxwcxbx4704pjqq7pqqr784b7z4j";
})
./xpdf-3.02-protection.patch
./libxpdf.patch
];
@ -48,6 +52,6 @@ stdenv.mkDerivation {
meta = with lib; {
platforms = platforms.unix;
license = licenses.gpl2;
license = licenses.gpl2Only;
};
}