tangled
alpha
login
or
join now
tjh.dev
/
nixpkgs
Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
0
fork
atom
overview
issues
pulls
pipelines
calibre: remove references to podofo
Andrew Dunham
7 years ago
13e1235a
50602de8
+20
-4
2 changed files
expand all
collapse all
unified
split
pkgs
applications
misc
calibre
default.nix
development
libraries
podofo
default.nix
+13
-4
pkgs/applications/misc/calibre/default.nix
···
1
1
{ stdenv, fetchurl, poppler_utils, pkgconfig, libpng
2
2
, imagemagick, libjpeg, fontconfig, podofo, qtbase, qmake, icu, sqlite
3
3
, makeWrapper, unrarSupport ? false, chmlib, python2Packages, libusb1, libmtp
4
4
-
, xdg_utils, makeDesktopItem, wrapGAppsHook
4
4
+
, xdg_utils, makeDesktopItem, wrapGAppsHook, removeReferencesTo
5
5
}:
6
6
7
7
stdenv.mkDerivation rec {
···
35
35
36
36
enableParallelBuilding = true;
37
37
38
38
-
nativeBuildInputs = [ makeWrapper pkgconfig qmake ];
38
38
+
nativeBuildInputs = [ makeWrapper pkgconfig qmake removeReferencesTo ];
39
39
40
40
buildInputs = [
41
41
poppler_utils libpng imagemagick libjpeg
···
58
58
export MAGICK_LIB=${imagemagick.out}/lib
59
59
export FC_INC_DIR=${fontconfig.dev}/include/fontconfig
60
60
export FC_LIB_DIR=${fontconfig.lib}/lib
61
61
-
export PODOFO_INC_DIR=${podofo}/include/podofo
62
62
-
export PODOFO_LIB_DIR=${podofo}/lib
61
61
+
export PODOFO_INC_DIR=${podofo.dev}/include/podofo
62
62
+
export PODOFO_LIB_DIR=${podofo.lib}/lib
63
63
export SIP_BIN=${python2Packages.sip}/bin/sip
64
64
${python2Packages.python.interpreter} setup.py install --prefix=$out
65
65
···
87
87
88
88
runHook postInstall
89
89
'';
90
90
+
91
91
+
# Remove some references to shrink the closure size. This reference (as of
92
92
+
# 2018-11-06) was a single string like the following:
93
93
+
# /nix/store/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx-podofo-0.9.6-dev/include/podofo/base/PdfVariant.h
94
94
+
preFixup = ''
95
95
+
remove-references-to -t ${podofo.dev} $out/lib/calibre/calibre/plugins/podofo.so
96
96
+
'';
97
97
+
98
98
+
disallowedReferences = [ podofo.dev ];
90
99
91
100
calibreDesktopItem = makeDesktopItem {
92
101
name = "calibre";
+7
pkgs/development/libraries/podofo/default.nix
···
21
21
})
22
22
];
23
23
24
24
+
outputs = [ "out" "dev" "lib" ];
25
25
+
24
26
nativeBuildInputs = [ cmake pkgconfig ];
25
27
26
28
buildInputs = [ zlib freetype libjpeg libtiff fontconfig openssl libpng
···
31
33
"-DPODOFO_BUILD_STATIC=OFF"
32
34
"-DCMAKE_BUILD_WITH_INSTALL_NAME_DIR=ON"
33
35
];
36
36
+
37
37
+
postInstall = ''
38
38
+
moveToOutput lib "$lib"
39
39
+
'';
40
40
+
34
41
meta = with stdenv.lib; {
35
42
homepage = http://podofo.sourceforge.net;
36
43
description = "A library to work with the PDF file format";