commit
a1b1e5a26b
|
@ -12,11 +12,11 @@ assert enablePrinting -> cups != null;
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "xpdf";
|
pname = "xpdf";
|
||||||
version = "4.02";
|
version = "4.03";
|
||||||
|
|
||||||
src = fetchzip {
|
src = fetchzip {
|
||||||
url = "https://xpdfreader-dl.s3.amazonaws.com/${pname}-${version}.tar.gz";
|
url = "https://dl.xpdfreader.com/xpdf-${version}.tar.gz";
|
||||||
sha256 = "0dzwq6fnk013wa4l5mjpvm4mms2mh5hbrxv4rhk2ab5ljbzz7b2w";
|
sha256 = "09yhvmh1vxjy763nnmawynygp5bh3j4i8ixqja64j11676yl77n6";
|
||||||
};
|
};
|
||||||
|
|
||||||
# Fix "No known features for CXX compiler", see
|
# Fix "No known features for CXX compiler", see
|
||||||
|
@ -36,8 +36,6 @@ stdenv.mkDerivation rec {
|
||||||
lib.optional enablePrinting cups ++
|
lib.optional enablePrinting cups ++
|
||||||
lib.optional enablePDFtoPPM freetype;
|
lib.optional enablePDFtoPPM freetype;
|
||||||
|
|
||||||
hardeningDisable = [ "format" ];
|
|
||||||
|
|
||||||
desktopItem = makeDesktopItem {
|
desktopItem = makeDesktopItem {
|
||||||
name = "xpdf";
|
name = "xpdf";
|
||||||
desktopName = "Xpdf";
|
desktopName = "Xpdf";
|
||||||
|
@ -48,11 +46,16 @@ stdenv.mkDerivation rec {
|
||||||
terminal = "false";
|
terminal = "false";
|
||||||
};
|
};
|
||||||
|
|
||||||
postInstall = ''
|
postInstall = lib.optionalString (!stdenv.isDarwin) ''
|
||||||
install -Dm644 ${desktopItem}/share/applications/xpdf.desktop $out/share/applications/xpdf.desktop
|
install -Dm644 ${desktopItem}/share/applications/xpdf.desktop -t $out/share/applications
|
||||||
install -Dm644 $src/xpdf-qt/xpdf-icon.svg $out/share/pixmaps/xpdf.svg
|
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; {
|
meta = with lib; {
|
||||||
homepage = "https://www.xpdfreader.com";
|
homepage = "https://www.xpdfreader.com";
|
||||||
description = "Viewer for Portable Document Format (PDF) files";
|
description = "Viewer for Portable Document Format (PDF) files";
|
||||||
|
@ -69,7 +72,7 @@ stdenv.mkDerivation rec {
|
||||||
pdffonts: lists fonts used in PDF files
|
pdffonts: lists fonts used in PDF files
|
||||||
pdfdetach: extracts attached files from PDF files
|
pdfdetach: extracts attached files from PDF files
|
||||||
'';
|
'';
|
||||||
license = with licenses; [ gpl2 gpl3 ];
|
license = with licenses; [ gpl2Only gpl3Only ];
|
||||||
platforms = platforms.unix;
|
platforms = platforms.unix;
|
||||||
maintainers = with maintainers; [ sikmir ];
|
maintainers = with maintainers; [ sikmir ];
|
||||||
knownVulnerabilities = [
|
knownVulnerabilities = [
|
||||||
|
|
|
@ -2,30 +2,34 @@
|
||||||
}:
|
}:
|
||||||
|
|
||||||
stdenv.mkDerivation {
|
stdenv.mkDerivation {
|
||||||
name = "libxpdf-3.02pl4";
|
name = "libxpdf-3.02pl5";
|
||||||
|
|
||||||
src = fetchurl {
|
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";
|
sha256 = "000zq4ddbwyxiki4vdwpmxbnw5n9hsg9hvwra2p33hslyib7sfmk";
|
||||||
};
|
};
|
||||||
|
|
||||||
patches = [
|
patches = [
|
||||||
(fetchurl {
|
(fetchurl {
|
||||||
url = "ftp://ftp.foolabs.com/pub/xpdf/xpdf-3.02pl1.patch";
|
url = "https://dl.xpdfreader.com/old/xpdf-3.02pl1.patch";
|
||||||
sha256 = "1wxv9l0d2kkwi961ihpdwi75whdvk7cgqxkbfym8cjj11fq17xjq";
|
sha256 = "1wxv9l0d2kkwi961ihpdwi75whdvk7cgqxkbfym8cjj11fq17xjq";
|
||||||
})
|
})
|
||||||
(fetchurl {
|
(fetchurl {
|
||||||
url = "ftp://ftp.foolabs.com/pub/xpdf/xpdf-3.02pl2.patch";
|
url = "https://dl.xpdfreader.com/old/xpdf-3.02pl2.patch";
|
||||||
sha256 = "1nfrgsh9xj0vryd8h65myzd94bjz117y89gq0hzji9dqn23xihfi";
|
sha256 = "1nfrgsh9xj0vryd8h65myzd94bjz117y89gq0hzji9dqn23xihfi";
|
||||||
})
|
})
|
||||||
(fetchurl {
|
(fetchurl {
|
||||||
url = "ftp://ftp.foolabs.com/pub/xpdf/xpdf-3.02pl3.patch";
|
url = "https://dl.xpdfreader.com/old/xpdf-3.02pl3.patch";
|
||||||
sha256 = "0jskkv8x6dqr9zj4azaglas8cziwqqrkbbnzrpm2kzrvsbxyhk2r";
|
sha256 = "0jskkv8x6dqr9zj4azaglas8cziwqqrkbbnzrpm2kzrvsbxyhk2r";
|
||||||
})
|
})
|
||||||
(fetchurl {
|
(fetchurl {
|
||||||
url = "ftp://ftp.foolabs.com/pub/xpdf/xpdf-3.02pl4.patch";
|
url = "https://dl.xpdfreader.com/old/xpdf-3.02pl4.patch";
|
||||||
sha256 = "1c48h7aizx0ngmzlzw0mpja1w8vqyy3pg62hyxp7c60k86al715h";
|
sha256 = "1c48h7aizx0ngmzlzw0mpja1w8vqyy3pg62hyxp7c60k86al715h";
|
||||||
})
|
})
|
||||||
|
(fetchurl {
|
||||||
|
url = "https://dl.xpdfreader.com/old/xpdf-3.02pl5.patch";
|
||||||
|
sha256 = "1fki66pw56yr6aw38f6amrx7wxwcxbx4704pjqq7pqqr784b7z4j";
|
||||||
|
})
|
||||||
./xpdf-3.02-protection.patch
|
./xpdf-3.02-protection.patch
|
||||||
./libxpdf.patch
|
./libxpdf.patch
|
||||||
];
|
];
|
||||||
|
@ -48,6 +52,6 @@ stdenv.mkDerivation {
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
platforms = platforms.unix;
|
platforms = platforms.unix;
|
||||||
license = licenses.gpl2;
|
license = licenses.gpl2Only;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue