diff options
author | Domen Kožar <domen@dev.si> | 2015-11-20 13:48:30 +0100 |
---|---|---|
committer | Domen Kožar <domen@dev.si> | 2015-11-21 21:44:12 +0100 |
commit | 704c8bab410a077a89e25c8c9fbb76a8da97625e (patch) | |
tree | a1312683d41cfe6569e9442db23ba304d0fb8b32 /pkgs/applications | |
parent | 99a64da6001f5e4fec363b6a98afccda61b6d68f (diff) | |
download | nixlib-704c8bab410a077a89e25c8c9fbb76a8da97625e.tar nixlib-704c8bab410a077a89e25c8c9fbb76a8da97625e.tar.gz nixlib-704c8bab410a077a89e25c8c9fbb76a8da97625e.tar.bz2 nixlib-704c8bab410a077a89e25c8c9fbb76a8da97625e.tar.lz nixlib-704c8bab410a077a89e25c8c9fbb76a8da97625e.tar.xz nixlib-704c8bab410a077a89e25c8c9fbb76a8da97625e.tar.zst nixlib-704c8bab410a077a89e25c8c9fbb76a8da97625e.zip |
buildPythonPackage: fix standalone applications using it
Diffstat (limited to 'pkgs/applications')
-rw-r--r-- | pkgs/applications/audio/mopidy-mopify/default.nix | 2 | ||||
-rw-r--r-- | pkgs/applications/editors/leo-editor/default.nix | 4 | ||||
-rw-r--r-- | pkgs/applications/graphics/jbrout/default.nix | 34 | ||||
-rw-r--r-- | pkgs/applications/misc/printrun/default.nix | 4 | ||||
-rw-r--r-- | pkgs/applications/misc/pytrainer/default.nix | 6 | ||||
-rw-r--r-- | pkgs/applications/misc/rtv/default.nix | 2 | ||||
-rw-r--r-- | pkgs/applications/networking/cluster/mesos/default.nix | 8 | ||||
-rw-r--r-- | pkgs/applications/networking/mailreaders/mailnag/default.nix | 6 | ||||
-rw-r--r-- | pkgs/applications/office/zim/default.nix | 74 | ||||
-rw-r--r-- | pkgs/applications/video/devede/default.nix | 4 | ||||
-rw-r--r-- | pkgs/applications/virtualization/virt-manager/default.nix | 9 |
11 files changed, 40 insertions, 113 deletions
diff --git a/pkgs/applications/audio/mopidy-mopify/default.nix b/pkgs/applications/audio/mopidy-mopify/default.nix index 770a1a79556c..4792a02f341d 100644 --- a/pkgs/applications/audio/mopidy-mopify/default.nix +++ b/pkgs/applications/audio/mopidy-mopify/default.nix @@ -10,7 +10,7 @@ pythonPackages.buildPythonPackage rec { sha256 = "0hhdss4i5436dj37pndxk81a4g3g8f6zqjyv04lhpqcww01290as"; }; - propagatedBuildInputs = [ mopidy ]; + propagatedBuildInputs = with pythonPackages; [ mopidy configobj ]; doCheck = false; diff --git a/pkgs/applications/editors/leo-editor/default.nix b/pkgs/applications/editors/leo-editor/default.nix index 4c7e3cc08af7..1c01bff727ed 100644 --- a/pkgs/applications/editors/leo-editor/default.nix +++ b/pkgs/applications/editors/leo-editor/default.nix @@ -1,9 +1,9 @@ { stdenv, pythonPackages, fetchgit }: + pythonPackages.buildPythonPackage rec { name = "leo-editor-${version}"; - version = "5.1"; - namePrefix = ""; + version = "5.1"; src = fetchgit { url = "https://github.com/leo-editor/leo-editor"; diff --git a/pkgs/applications/graphics/jbrout/default.nix b/pkgs/applications/graphics/jbrout/default.nix index 496078ffdb2e..e37c2c283e47 100644 --- a/pkgs/applications/graphics/jbrout/default.nix +++ b/pkgs/applications/graphics/jbrout/default.nix @@ -1,36 +1,36 @@ -{ stdenv, fetchsvn, buildPythonPackage, python, pyGtkGlade, makeWrapper, pyexiv2, lxml, pil, fbida, which }: +{ stdenv, fetchsvn, buildPythonPackage, python, pyGtkGlade, makeWrapper, pyexiv2, pythonPackages, fbida, which }: -buildPythonPackage { - name = "jbrout-338"; +buildPythonPackage rec { + name = "jbrout-${version}"; version = "338"; + src = fetchsvn { url = "http://jbrout.googlecode.com/svn/trunk"; - rev = "338"; + rev = version; sha256 = "0257ni4vkxgd0qhs73fw5ppw1qpf11j8fgwsqc03b1k1yv3hk4hf"; }; doCheck = false; -# XXX: preConfigure to avoid this -# File "/nix/store/vnyjxn6h3rbrn49m25yyw7i1chlxglhw-python-2.7.1/lib/python2.7/zipfile.py", line 348, in FileHeader -# len(filename), len(extra)) -#struct.error: ushort format requires 0 <= number <= USHRT_MAX - preConfigure = '' + # XXX: patchPhase to avoid this + # File "/nix/store/vnyjxn6h3rbrn49m25yyw7i1chlxglhw-python-2.7.1/lib/python2.7/zipfile.py", line 348, in FileHeader + # len(filename), len(extra)) + #struct.error: ushort format requires 0 <= number <= USHRT_MAX + patchPhase = '' find | xargs touch + + substituteInPlace setup.py --replace "version=__version__" "version=baseVersion" ''; postInstall = '' - mkdir -p $out/bin - echo '#!/bin/sh' > $out/bin/jbrout - echo "python $out/lib/python2.7/site-packages/jbrout-src-py2.7.egg/jbrout/jbrout.py" >> $out/bin/jbrout + mkdir $out/bin + echo "python $out/${python.sitePackages}/jbrout/jbrout.py" > $out/bin/jbrout chmod +x $out/bin/jbrout - - wrapProgram $out/bin/jbrout \ - --set PYTHONPATH "$out/lib/python:$(toPythonPath ${pyGtkGlade})/gtk-2.0:$(toPythonPath ${pyexiv2}):$(toPythonPath ${lxml}):$(toPythonPath ${pil}):$PYTHONPATH" \ - --set PATH "${fbida}/bin:${which}/bin:$PATH" ''; - buildInputs = [ python pyGtkGlade makeWrapper pyexiv2 lxml pil fbida which ]; + buildInputs = [ python makeWrapper which ]; + propagatedBuildInputs = with pythonPackages; [ pillow lxml pyGtkGlade pyexiv2 fbida ]; + meta = { homepage = "http://code.google.com/p/jbrout"; description = "Photo manager"; diff --git a/pkgs/applications/misc/printrun/default.nix b/pkgs/applications/misc/printrun/default.nix index b407c739c703..7420441850b6 100644 --- a/pkgs/applications/misc/printrun/default.nix +++ b/pkgs/applications/misc/printrun/default.nix @@ -16,10 +16,10 @@ python27Packages.buildPythonPackage rec { doCheck = false; + setupPyBuildFlags = ["-i"]; + postPatch = '' sed -i -r "s|/usr(/local)?/share/|$out/share/|g" printrun/utils.py - sed -i "s|distutils.core|setuptools|" setup.py - sed -i "s|distutils.command.install |setuptools.command.install |" setup.py ''; postInstall = '' diff --git a/pkgs/applications/misc/pytrainer/default.nix b/pkgs/applications/misc/pytrainer/default.nix index 843d0ab93d88..2f731fea1b0d 100644 --- a/pkgs/applications/misc/pytrainer/default.nix +++ b/pkgs/applications/misc/pytrainer/default.nix @@ -27,12 +27,12 @@ pythonPackages.buildPythonPackage rec { # string, which allows setting an explicit MIME type. patches = [ ./pytrainer-webkit.patch ]; - pythonPath = with pythonPackages; [ + propagatedBuildInputs = with pythonPackages; [ dateutil lxml matplotlibGtk pyGtkGlade pywebkitgtk - sqlalchemy sqlalchemy_migrate + sqlalchemy_migrate ]; - buildInputs = [gpsbabel sqlite] ++ pythonPath; + buildInputs = [ gpsbabel sqlite ]; # This package contains no binaries to patch or strip. dontPatchELF = true; diff --git a/pkgs/applications/misc/rtv/default.nix b/pkgs/applications/misc/rtv/default.nix index 37a664a49185..47e36e03783f 100644 --- a/pkgs/applications/misc/rtv/default.nix +++ b/pkgs/applications/misc/rtv/default.nix @@ -12,7 +12,7 @@ pythonPackages.buildPythonPackage rec { }; propagatedBuildInputs = with pythonPackages; [ - requests + requests2 six praw kitchen diff --git a/pkgs/applications/networking/cluster/mesos/default.nix b/pkgs/applications/networking/cluster/mesos/default.nix index bb7a60f2b27f..f5803018c98e 100644 --- a/pkgs/applications/networking/cluster/mesos/default.nix +++ b/pkgs/applications/networking/cluster/mesos/default.nix @@ -1,6 +1,6 @@ { stdenv, lib, makeWrapper, fetchurl, curl, sasl, openssh, autoconf , automake114x, libtool, unzip, gnutar, jdk, maven, python, wrapPython -, setuptools, distutils-cfg, boto, pythonProtobuf, apr, subversion +, setuptools, boto, pythonProtobuf, apr, subversion , leveldb, glog, perf, utillinux, libnl, iproute }: @@ -9,14 +9,14 @@ let soext = if stdenv.system == "x86_64-darwin" then "dylib" else "so"; in stdenv.mkDerivation rec { - version = "0.23.0"; + version = "0.23.1"; name = "mesos-${version}"; dontDisableStatic = true; src = fetchurl { url = "http://www.apache.org/dist/mesos/${version}/mesos-${version}.tar.gz"; - sha256 = "1v5xpn4wal4vcrvcklchx9slkpa8xlwqkdbnxzy9zkzpq5g3arxr"; + sha256 = "0ygvb0xm4m1ilwbfyjbq0dpsviicg2ab98zg96k2ypa2pa69mvpa"; }; patches = [ @@ -26,7 +26,7 @@ in stdenv.mkDerivation rec { buildInputs = [ makeWrapper autoconf automake114x libtool curl sasl jdk maven - python wrapPython boto distutils-cfg setuptools leveldb + python wrapPython boto setuptools leveldb subversion apr glog ] ++ lib.optionals stdenv.isLinux [ libnl diff --git a/pkgs/applications/networking/mailreaders/mailnag/default.nix b/pkgs/applications/networking/mailreaders/mailnag/default.nix index e4253f5bff57..4818de49e42b 100644 --- a/pkgs/applications/networking/mailreaders/mailnag/default.nix +++ b/pkgs/applications/networking/mailreaders/mailnag/default.nix @@ -12,12 +12,6 @@ buildPythonPackage rec { sha256 = "0li4kvxjmbz3nqg6bysgn2wdazqrd7gm9fym3rd7148aiqqwa91r"; }; - # Sometimes the generated output isn't identical. It seems like there's a - # race condtion while patching the Mailnag/commons/dist_cfg.py file. This is - # a small workaround to produce deterministic builds. - # For more information see https://github.com/NixOS/nixpkgs/pull/8279 - setupPyBuildFlags = [ "--build-base=$PWD" ]; - buildInputs = [ gettext gtk3 pythonPackages.pygobject3 pythonPackages.dbus pythonPackages.pyxdg gdk_pixbuf libnotify gst_all_1.gstreamer diff --git a/pkgs/applications/office/zim/default.nix b/pkgs/applications/office/zim/default.nix index 96749c665b66..d5163eef4d88 100644 --- a/pkgs/applications/office/zim/default.nix +++ b/pkgs/applications/office/zim/default.nix @@ -11,89 +11,25 @@ buildPythonPackage rec { name = "zim-${version}"; version = "0.63"; namePrefix = ""; - + src = fetchurl { url = "http://zim-wiki.org/downloads/${name}.tar.gz"; sha256 = "077vf4h0hjmbk8bxj9l0z9rxcb3dw642n32lvfn6vjdna1qm910m"; }; - propagatedBuildInputs = [ pythonPackages.sqlite3 pygtk /*pythonPackages.pyxdg*/ pygobject ]; + propagatedBuildInputs = [ pythonPackages.sqlite3 pygtk pythonPackages.pyxdg pygobject ]; preBuild = '' mkdir -p /tmp/home export HOME="/tmp/home" - ''; - - setupPyBuildFlags = ["--skip-xdg-cmd"]; - - # - # Exactly identical to buildPythonPackage's version but for the - # `--old-and-unmanagable`, which I removed. This was removed because - # this is a setuptools specific flag and as zim is overriding - # the install step, setuptools could not perform its monkey - # patching trick for the command. Alternate solutions were to - # - # - Remove the custom install step (tested as working but - # also remove the possibility of performing the xdg-cmd - # stuff). - # - Explicitly replace distutils import(s) by their setuptools - # equivalent (untested). - # - # Both solutions were judged unsatisfactory as altering the code - # would be required. - # - # Note that a improved solution would be to expose the use of - # the `--old-and-unmanagable` flag as an option of passed to the - # buildPythonPackage function. - # - # Also note that I stripped all comments. - # - installPhase = '' - runHook preInstall - - mkdir -p "$out/lib/${python.libPrefix}/site-packages" - - export PYTHONPATH="$out/lib/${python.libPrefix}/site-packages:$PYTHONPATH" - - ${python}/bin/${python.executable} setup.py install \ - --install-lib=$out/lib/${python.libPrefix}/site-packages \ - --prefix="$out" ${lib.concatStringsSep " " setupPyBuildFlags} - eapth="$out/lib/${python.libPrefix}"/site-packages/easy-install.pth - if [ -e "$eapth" ]; then - # move colliding easy_install.pth to specifically named one - mv "$eapth" $(dirname "$eapth")/${name}.pth - fi - - rm -f "$out/lib/${python.libPrefix}"/site-packages/site.py* - - runHook postInstall + sed -i '/zim_install_class,/d' setup.py ''; - # FIXME: this is quick and dirty hack, because zim expects the - # path to the executable in argv[0] therefore the wrapper is - # modified accordingly. - postFixup = '' - wrapProgram "$out/bin/zim" \ - --prefix XDG_DATA_DIRS : "$out/share" - - wrapPythonPrograms - - sed -i "s#sys\.argv\[0\] = '.zim-wrapped'#sys.argv[0] = '$out/bin/zim'#g" \ - $out/bin/..zim-wrapped-wrapped - - if test -e $out/nix-support/propagated-build-inputs; then - ln -s $out/nix-support/propagated-build-inputs $out/nix-support/propagated-user-env-packages - fi - createBuildInputsPth build-inputs "$buildInputStrings" - for inputsfile in propagated-build-inputs propagated-native-build-inputs; do - if test -e $out/nix-support/$inputsfile; then - createBuildInputsPth $inputsfile "$(cat $out/nix-support/$inputsfile)" - fi - done + preFixup = '' + export makeWrapperArgs="--prefix XDG_DATA_DIRS : $out/share --argv0 $out/bin/.zim-wrapped" ''; - # Testing fails. doCheck = false; diff --git a/pkgs/applications/video/devede/default.nix b/pkgs/applications/video/devede/default.nix index b48f0f42936d..6520f7ac21fa 100644 --- a/pkgs/applications/video/devede/default.nix +++ b/pkgs/applications/video/devede/default.nix @@ -14,11 +14,10 @@ in buildPythonPackage rec { buildInputs = [ ffmpeg ]; - pythonPath = [ pygtk dbus ffmpeg mplayer dvdauthor vcdimager cdrkit ]; + propagatedBuildInputs = [ pygtk dbus ffmpeg mplayer dvdauthor vcdimager cdrkit ]; postPatch = '' substituteInPlace devede --replace "/usr/share/devede" "$out/share/devede" - ''; meta = with stdenv.lib; { @@ -26,5 +25,6 @@ in buildPythonPackage rec { homepage = http://www.rastersoft.com/programas/devede.html; license = licenses.gpl3; maintainers = [ maintainers.bdimcheff ]; + broken = true; # tarball is gone }; } diff --git a/pkgs/applications/virtualization/virt-manager/default.nix b/pkgs/applications/virtualization/virt-manager/default.nix index 0b1cf9ebc527..b9cfda7b2a7f 100644 --- a/pkgs/applications/virtualization/virt-manager/default.nix +++ b/pkgs/applications/virtualization/virt-manager/default.nix @@ -42,16 +42,13 @@ buildPythonPackage rec { patchPhase = '' sed -i 's|/usr/share/libvirt/cpu_map.xml|${system-libvirt}/share/libvirt/cpu_map.xml|g' virtinst/capabilities.py + rm setup.cfg ''; - configurePhase = '' - sed -i 's/from distutils.core/from setuptools/g' setup.py - sed -i 's/from distutils.command.install/from setuptools.command.install/g' setup.py - python setup.py configure --prefix=$out + postConfigure = '' + ${python.interpreter} setup.py configure --prefix=$out ''; - buildPhase = "true"; - postInstall = '' ${glib}/bin/glib-compile-schemas "$out"/share/glib-2.0/schemas ''; |