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