lol

Merge pull request #11553 from FRidh/pil

WIP: remove PIL as dependency

+28 -125
+2 -2
pkgs/applications/graphics/mcomix/default.nix
··· 1 - { stdenv, fetchurl, buildPythonPackage, pygtk, pil, python27Packages }: 1 + { stdenv, fetchurl, buildPythonPackage, python27Packages }: 2 2 3 3 buildPythonPackage rec { 4 4 namePrefix = ""; ··· 9 9 sha256 = "0k3pqbvk08kb1nr0qldaj9bc7ca6rvcycgfi2n7gqmsirq5kscys"; 10 10 }; 11 11 12 - pythonPath = [ pygtk pil python27Packages.sqlite3 ]; 12 + propagatedBuildInputs = with python27Packages; [ pygtk pillow sqlite3 ]; 13 13 14 14 meta = { 15 15 description = "Image viewer designed to handle comic books";
+2 -2
pkgs/applications/graphics/mirage/default.nix
··· 1 - { stdenv, fetchurl, buildPythonPackage, python, pygtk, pil, libX11, gettext }: 1 + { stdenv, fetchurl, buildPythonPackage, python, pygtk, pillow, libX11, gettext }: 2 2 3 3 buildPythonPackage rec { 4 4 namePrefix = ""; ··· 17 17 sed -i "s@/usr/local/share/locale@$out/share/locale@" mirage.py 18 18 ''; 19 19 20 - pythonPath = [ pygtk pil ]; 20 + propagatedBuildInputs = [ pygtk pillow ]; 21 21 22 22 meta = { 23 23 description = "Simple image viewer written in PyGTK";
+2 -2
pkgs/applications/misc/calibre/default.nix
··· 1 1 { stdenv, fetchurl, python, pyqt5, sip_4_16, poppler_utils, pkgconfig, libpng 2 2 , imagemagick, libjpeg, fontconfig, podofo, qt5, icu, sqlite 3 - , pil, makeWrapper, unrar, chmlib, pythonPackages, xz, libusb1, libmtp 3 + , makeWrapper, unrar, chmlib, pythonPackages, xz, libusb1, libmtp 4 4 , xdg_utils 5 5 }: 6 6 ··· 24 24 25 25 buildInputs = 26 26 [ python pyqt5 sip_4_16 poppler_utils libpng imagemagick libjpeg 27 - fontconfig podofo qt5.base pil chmlib icu sqlite libusb1 libmtp xdg_utils 27 + fontconfig podofo qt5.base chmlib icu sqlite libusb1 libmtp xdg_utils 28 28 pythonPackages.mechanize pythonPackages.lxml pythonPackages.dateutil 29 29 pythonPackages.cssutils pythonPackages.beautifulsoup pythonPackages.pillow 30 30 pythonPackages.sqlite3 pythonPackages.netifaces pythonPackages.apsw
+1 -1
pkgs/applications/networking/p2p/tribler/default.nix
··· 26 26 pythonPackages.twisted 27 27 pythonPackages.gmpy 28 28 pythonPackages.netifaces 29 - pythonPackages.pil 29 + pythonPackages.pillow 30 30 pythonPackages.pycrypto 31 31 pythonPackages.pyasn1 32 32 pythonPackages.requests
+3 -3
pkgs/applications/office/impressive/default.nix
··· 1 1 { fetchurl, stdenv, python, makeWrapper, lib 2 - , xpdf, pil, pyopengl, pygame 2 + , xpdf, pillow, pyopengl, pygame 3 3 , setuptools, mesa, freeglut }: 4 4 5 5 let version = "0.10.5"; ··· 17 17 18 18 # Note: We need to have `setuptools' in the path to be able to use 19 19 # PyOpenGL. 20 - buildInputs = [ makeWrapper xpdf pil pyopengl pygame ]; 20 + buildInputs = [ makeWrapper xpdf pillow pyopengl pygame ]; 21 21 22 22 configurePhase = '' 23 23 sed -i "impressive.py" \ ··· 44 44 ${lib.concatStringsSep ":" 45 45 (map (path: 46 46 path + "/lib/${python.libPrefix}/site-packages") 47 - [ pil pyopengl pygame setuptools ])} \ 47 + [ pillow pyopengl pygame setuptools ])} \ 48 48 --prefix LIBRARY_PATH ":" "${mesa}/lib:${freeglut}/lib" 49 49 ''; 50 50
-45
pkgs/games/thePenguinMachine/default.nix
··· 1 - {stdenv, fetchurl, python, pil, pygame, SDL} @ args: with args; 2 - stdenv.mkDerivation { 3 - name = "thePenguinMachine"; 4 - 5 - src = fetchurl { 6 - url = http://www.migniot.com/matrix/projects/thepenguinmachine/ThePenguinMachine.tar.gz; 7 - sha256 = "09ljks8vj75g00h3azc83yllbfsrxwmv1c9g32gylcmsshik0dqv"; 8 - }; 9 - 10 - broken = true; # Not found 11 - 12 - buildInputs = [python pil pygame SDL]; 13 - 14 - configurePhase = '' 15 - sed -e "/includes = /aincludes.append('${SDL}/include/SDL')" -i setup.py; 16 - sed -e "/includes = /aincludes.append('$(echo ${pygame}/include/python*)')" -i setup.py; 17 - cat setup.py; 18 - export NIX_LDFLAGS="$NIX_LDFLAGS -lgcc_s" 19 - ''; 20 - buildPhase = '' 21 - sed -e "s/pygame.display.toggle_fullscreen.*/pass;/" -i tpm/Application.py 22 - sed -e 's@"Surface"@"pygame.Surface"@' -i src/surfutils.c 23 - python setup.py build; 24 - python setup.py build_clib; 25 - python setup.py build_ext; 26 - python setup.py build_py; 27 - python setup.py build_scripts; 28 - ''; 29 - installPhase = '' 30 - python setup.py install --prefix=$out 31 - mkdir -p "$out"/share/tpm/ 32 - cp -r . "$out"/share/tpm/build-dir 33 - mkdir -p "$out/bin" 34 - echo "#! /bin/sh" >> "$out/bin/tpm" 35 - echo "export PYTHONPATH=\"\$PYTHONPATH:$PYTHONPATH:$(echo ${pil}/lib/python*/site-packages/PIL)\"" >> "$out/bin/tpm" 36 - echo "cd \"$out/share/tpm/build-dir\"" >> "$out/bin/tpm" 37 - echo "export PYTHONPATH=\"\$PYTHONPATH:$PYTHONPATH:$(echo ${pil}/lib/python*/site-packages/PIL)\"" >> "$out/bin/tpm" 38 - echo "${python}/bin/python \"$out\"/share/tpm/build-dir/ThePenguinMachine.py \"\$@\"" >> "$out/bin/tpm" 39 - chmod a+x "$out/bin/tpm" 40 - ''; 41 - 42 - meta = { 43 - description = "An Incredible Machine clone"; 44 - }; 45 - }
+4 -4
pkgs/tools/X11/xpra/default.nix
··· 1 1 { stdenv, fetchurl, buildPythonPackage, pythonPackages 2 2 , python, cython, pkgconfig 3 - , xorg, gtk, glib, pango, cairo, gdk_pixbuf, pygtk, atk, pygobject, pycairo 3 + , xorg, gtk, glib, pango, cairo, gdk_pixbuf, atk, pycairo 4 4 , makeWrapper, xkbcomp, xorgserver, getopt, xauth, utillinux, which, fontsConf, xkeyboard_config 5 - , ffmpeg, x264, libvpx, pil, libwebp 5 + , ffmpeg, x264, libvpx, libwebp 6 6 , libfakeXinerama }: 7 7 8 8 buildPythonPackage rec { ··· 29 29 makeWrapper 30 30 ]; 31 31 32 - propagatedBuildInputs = [ 33 - pil pygtk pygobject pythonPackages.rencode 32 + propagatedBuildInputs = with pythonPackages; [ 33 + pillow pygtk pygobject 34 34 ]; 35 35 36 36 postPatch = ''
+4 -2
pkgs/tools/graphics/pdfread/default.nix
··· 1 - {stdenv, fetchurl, unzip, python, makeWrapper, ghostscript, pngnq, pil, djvulibre 1 + {stdenv, fetchurl, unzip, python, makeWrapper, ghostscript, pngnq, pillow, djvulibre 2 2 , optipng, unrar}: 3 3 4 4 stdenv.mkDerivation { ··· 14 14 }; 15 15 16 16 buildInputs = [ unzip python makeWrapper ]; 17 + 18 + broken = true; # Not found. 17 19 18 20 phases = "unpackPhase patchPhase installPhase"; 19 21 ··· 36 38 mkdir -p $PYDIR 37 39 cp -R *.py pylrs $PYDIR 38 40 39 - wrapProgram $out/bin/pdfread.py --prefix PYTHONPATH : $PYTHONPATH:${pil}/$LIBSUFFIX/PIL:$PYDIR \ 41 + wrapProgram $out/bin/pdfread.py --prefix PYTHONPATH : $PYTHONPATH:${pillow}/$LIBSUFFIX/PIL:$PYDIR \ 40 42 --prefix PATH : ${ghostscript}/bin:${pngnq}/bin:${djvulibre}/bin:${unrar}/bin:${optipng}/bin 41 43 ''; 42 44
+8 -6
pkgs/top-level/all-packages.nix
··· 2679 2679 2680 2680 jbig2enc = callPackage ../tools/graphics/jbig2enc { }; 2681 2681 2682 - pdfread = callPackage ../tools/graphics/pdfread { }; 2682 + pdfread = callPackage ../tools/graphics/pdfread { 2683 + inherit (pythonPackages) pillow; 2684 + }; 2683 2685 2684 2686 briss = callPackage ../tools/graphics/briss { }; 2685 2687 ··· 8996 8998 8997 8999 numeric = callPackage ../development/python-modules/numeric { }; 8998 9000 8999 - pil = pythonPackages.pil; 9000 - 9001 9001 psyco = callPackage ../development/python-modules/psyco { }; 9002 9002 9003 9003 pycairo = pythonPackages.pycairo; ··· 12120 12120 impressive = callPackage ../applications/office/impressive { 12121 12121 # XXX These are the PyOpenGL dependencies, which we need here. 12122 12122 inherit (pythonPackages) pyopengl; 12123 + inherit (pythonPackages) pillow; 12123 12124 }; 12124 12125 12125 12126 inferno = callPackage_i686 ../applications/inferno { }; ··· 12409 12410 12410 12411 mimms = callPackage ../applications/audio/mimms {}; 12411 12412 12412 - mirage = callPackage ../applications/graphics/mirage {}; 12413 + mirage = callPackage ../applications/graphics/mirage { 12414 + inherit (pythonPackages) pygtk; 12415 + inherit (pythonPackages) pillow; 12416 + }; 12413 12417 12414 12418 mixxx = callPackage ../applications/audio/mixxx { 12415 12419 inherit (vamp) vampSDK; ··· 14271 14275 tintin = callPackage ../games/tintin { }; 14272 14276 14273 14277 tome4 = callPackage ../games/tome4 { }; 14274 - 14275 - tpm = callPackage ../games/thePenguinMachine { }; 14276 14278 14277 14279 trackballs = callPackage ../games/trackballs { 14278 14280 debug = false;
+2 -58
pkgs/top-level/python-packages.nix
··· 5119 5119 sha256 = "1dnmnkc21zdfaypskbpvkwl0wpkpn0nagj1fc338w64mbxrk8ny7"; 5120 5120 }; 5121 5121 5122 - commonDeps = with self; 5122 + propagatedBuildInputs = with self; 5123 5123 [ 5124 5124 apipkg 5125 5125 bottle ··· 5135 5135 simplejson 5136 5136 sqlite3dbm 5137 5137 timelib 5138 - ]; 5139 - 5140 - pythonPath = commonDeps ++ 5141 - [ 5142 - modules.sqlite3 5143 - ]; 5144 - 5145 - propagatedBuildInputs = commonDeps; 5146 - 5147 - buildInputs = with self; 5148 - [ 5149 - pil 5150 - ] ++ propagatedBuildInputs; 5138 + ] ++ optionals (!isPy3k) [ modules.sqlite3 ]; 5151 5139 5152 5140 meta = { 5153 5141 description = "Library for parsing MediaWiki articles and converting them to different output formats"; ··· 13279 13267 license = licenses.bsd3; 13280 13268 }; 13281 13269 }; 13282 - 13283 - 13284 - pil = buildPythonPackage rec { 13285 - name = "PIL-${version}"; 13286 - version = "1.1.7"; 13287 - 13288 - src = pkgs.fetchurl { 13289 - url = "http://effbot.org/downloads/Imaging-${version}.tar.gz"; 13290 - sha256 = "04aj80jhfbmxqzvmq40zfi4z3cw6vi01m3wkk6diz3lc971cfnw9"; 13291 - }; 13292 - 13293 - buildInputs = with self; [ python pkgs.libjpeg pkgs.zlib pkgs.freetype ]; 13294 - 13295 - disabled = isPy3k; 13296 - 13297 - postInstall = "ln -s $out/${python.sitePackages} $out/${python.sitePackages}/PIL"; 13298 - 13299 - preConfigure = '' 13300 - sed -i "setup.py" \ 13301 - -e 's|^FREETYPE_ROOT =.*$|FREETYPE_ROOT = libinclude("${pkgs.freetype}")|g ; 13302 - s|^JPEG_ROOT =.*$|JPEG_ROOT = libinclude("${pkgs.libjpeg}")|g ; 13303 - s|^ZLIB_ROOT =.*$|ZLIB_ROOT = libinclude("${pkgs.zlib}")|g ;' 13304 - '' + stdenv.lib.optionalString stdenv.isDarwin '' 13305 - # Remove impurities 13306 - substituteInPlace setup.py \ 13307 - --replace '"/Library/Frameworks",' "" \ 13308 - --replace '"/System/Library/Frameworks"' "" 13309 - ''; 13310 - 13311 - checkPhase = "${python.interpreter} selftest.py"; 13312 - 13313 - meta = { 13314 - homepage = http://www.pythonware.com/products/pil/; 13315 - description = "The Python Imaging Library (PIL)"; 13316 - longDescription = '' 13317 - The Python Imaging Library (PIL) adds image processing 13318 - capabilities to your Python interpreter. This library 13319 - supports many file formats, and provides powerful image 13320 - processing and graphics capabilities. 13321 - ''; 13322 - license = "http://www.pythonware.com/products/pil/license.htm"; 13323 - }; 13324 - }; 13325 - 13326 13270 13327 13271 pillow = buildPythonPackage rec { 13328 13272 name = "Pillow-2.9.0";