From 3ba16c8234fdb5a49dde2501d3425eff0e5624a4 Mon Sep 17 00:00:00 2001 From: Frederik Rietdijk Date: Mon, 26 Sep 2016 11:09:25 +0200 Subject: [PATCH] Do not use top-level buildPythonPackage or buildPythonApplication but instead use the one in pythonPackages. --- pkgs/applications/editors/nvpy/default.nix | 4 ++-- pkgs/applications/graphics/mcomix/default.nix | 5 ++--- pkgs/applications/graphics/mirage/default.nix | 10 ++++----- pkgs/applications/misc/ranger/default.nix | 6 +++--- pkgs/applications/office/qnotero/default.nix | 4 ++-- .../gitinspector/default.nix | 4 ++-- .../window-managers/qtile/default.nix | 12 +++++------ pkgs/development/arduino/ino/default.nix | 4 ++-- pkgs/development/tools/grabserial/default.nix | 4 ++-- pkgs/development/tools/misc/ycmd/default.nix | 13 ++++++------ pkgs/development/tools/winpdb/default.nix | 6 +++--- pkgs/os-specific/linux/iotop/default.nix | 7 +++---- pkgs/servers/matrix-synapse/default.nix | 7 +++---- pkgs/tools/X11/winswitch/default.nix | 4 ++-- pkgs/tools/misc/i3minator/default.nix | 4 ++-- pkgs/tools/misc/togglesg-download/default.nix | 4 ++-- pkgs/tools/misc/xflux/gui.nix | 14 ++++++------- pkgs/tools/networking/gmvault/default.nix | 4 ++-- pkgs/tools/security/knockknock/default.nix | 2 +- pkgs/tools/system/honcho/default.nix | 4 ++-- pkgs/tools/typesetting/odpdown/default.nix | 8 +++---- pkgs/top-level/all-packages.nix | 21 ++++++------------- 22 files changed, 68 insertions(+), 83 deletions(-) diff --git a/pkgs/applications/editors/nvpy/default.nix b/pkgs/applications/editors/nvpy/default.nix index c42940440ae5..58893d085892 100644 --- a/pkgs/applications/editors/nvpy/default.nix +++ b/pkgs/applications/editors/nvpy/default.nix @@ -1,6 +1,6 @@ -{ pkgs, fetchurl, tk, buildPythonApplication, pythonPackages }: +{ pkgs, fetchurl, tk, pythonPackages }: -buildPythonApplication rec { +pythonPackages.buildPythonApplication rec { version = "0.9.7"; name = "nvpy-${version}"; diff --git a/pkgs/applications/graphics/mcomix/default.nix b/pkgs/applications/graphics/mcomix/default.nix index 88f3937335ba..c88c3337c928 100644 --- a/pkgs/applications/graphics/mcomix/default.nix +++ b/pkgs/applications/graphics/mcomix/default.nix @@ -1,7 +1,6 @@ -{ stdenv, fetchurl, buildPythonApplication, python27Packages }: +{ stdenv, fetchurl, python27Packages }: -buildPythonApplication rec { - namePrefix = ""; +python27Packages.buildPythonApplication rec { name = "mcomix-${version}"; version = "1.2.1"; diff --git a/pkgs/applications/graphics/mirage/default.nix b/pkgs/applications/graphics/mirage/default.nix index c3f06544bb4a..515b834b41ea 100644 --- a/pkgs/applications/graphics/mirage/default.nix +++ b/pkgs/applications/graphics/mirage/default.nix @@ -1,8 +1,8 @@ -{ stdenv, fetchurl, buildPythonApplication, python, pygtk, pillow, libX11, gettext }: +{ stdenv, fetchurl, pythonPackages, libX11, gettext }: -buildPythonApplication rec { - namePrefix = ""; - name = "mirage-0.9.5.2"; +pythonPackages.buildPythonApplication rec { + name = "mirage-${version}"; + version = "0.9.5.2"; src = fetchurl { url = "mirror://sourceforge/mirageiv/${name}.tar.bz2"; @@ -17,7 +17,7 @@ buildPythonApplication rec { sed -i "s@/usr/local/share/locale@$out/share/locale@" mirage.py ''; - propagatedBuildInputs = [ pygtk pillow ]; + propagatedBuildInputs = with pythonPackages; [ pygtk pillow ]; meta = { description = "Simple image viewer written in PyGTK"; diff --git a/pkgs/applications/misc/ranger/default.nix b/pkgs/applications/misc/ranger/default.nix index 7969695f1ad2..3334daa4aeda 100644 --- a/pkgs/applications/misc/ranger/default.nix +++ b/pkgs/applications/misc/ranger/default.nix @@ -1,6 +1,6 @@ -{ stdenv, fetchurl, buildPythonApplication, python, w3m, file }: +{ stdenv, fetchurl, pythonPackages, w3m, file }: -buildPythonApplication rec { +pythonPackages.buildPythonApplication rec { name = "ranger-1.7.2"; meta = { @@ -15,7 +15,7 @@ buildPythonApplication rec { sha256 = "0yaviybviwdvfg2a0pf2kk28g10k245499xmbpqlai7fv91f7xll"; }; - propagatedBuildInputs = [ python.modules.curses file ]; + propagatedBuildInputs = [ pythonPackages.python.modules.curses file ]; preConfigure = '' substituteInPlace ranger/ext/img_display.py \ diff --git a/pkgs/applications/office/qnotero/default.nix b/pkgs/applications/office/qnotero/default.nix index 695db93d4de1..5076a8f586e3 100644 --- a/pkgs/applications/office/qnotero/default.nix +++ b/pkgs/applications/office/qnotero/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchFromGitHub, buildPythonPackage, python3, python3Packages +{ stdenv, fetchFromGitHub, python3Packages }: python3Packages.buildPythonPackage rec { @@ -14,7 +14,7 @@ python3Packages.buildPythonPackage rec { sha256 = "1d5a9k1llzn9q1qv1bfwc7gfflabh4riplz9jj0hf04b279y1bj0"; }; - propagatedBuildInputs = [ python3 python3Packages.pyqt4 ]; + propagatedBuildInputs = [ python3Packages.pyqt4 ]; patchPhase = '' substituteInPlace ./setup.py \ diff --git a/pkgs/applications/version-management/gitinspector/default.nix b/pkgs/applications/version-management/gitinspector/default.nix index 56d8b334e8e9..664f4d5147be 100644 --- a/pkgs/applications/version-management/gitinspector/default.nix +++ b/pkgs/applications/version-management/gitinspector/default.nix @@ -1,6 +1,6 @@ -{ stdenv, fetchzip, buildPythonApplication }: +{ stdenv, fetchzip, pythonPackages}: -buildPythonApplication rec { +pythonPackages.buildPythonApplication rec { name = "gitinspector-${version}"; version = "0.4.4"; namePrefix = ""; diff --git a/pkgs/applications/window-managers/qtile/default.nix b/pkgs/applications/window-managers/qtile/default.nix index 6a5e4564122d..d170c9b74785 100644 --- a/pkgs/applications/window-managers/qtile/default.nix +++ b/pkgs/applications/window-managers/qtile/default.nix @@ -1,11 +1,11 @@ -{ stdenv, fetchFromGitHub, buildPythonApplication, python27Packages, pkgs }: +{ stdenv, fetchFromGitHub, python27Packages, glib, cairo, pango, pkgconfig, libxcb, xcbutilcursor }: let cairocffi-xcffib = python27Packages.cairocffi.override { pythonPath = [ python27Packages.xcffib ]; }; in -buildPythonApplication rec { +python27Packages.buildPythonApplication rec { name = "qtile-${version}"; version = "0.10.4"; @@ -24,12 +24,12 @@ buildPythonApplication rec { postPatch = '' substituteInPlace libqtile/manager.py --subst-var-by out $out - substituteInPlace libqtile/pangocffi.py --subst-var-by glib ${pkgs.glib.out} - substituteInPlace libqtile/pangocffi.py --subst-var-by pango ${pkgs.pango.out} - substituteInPlace libqtile/xcursors.py --subst-var-by xcb-cursor ${pkgs.xorg.xcbutilcursor.out} + substituteInPlace libqtile/pangocffi.py --subst-var-by glib ${glib.out} + substituteInPlace libqtile/pangocffi.py --subst-var-by pango ${pango.out} + substituteInPlace libqtile/xcursors.py --subst-var-by xcb-cursor ${xcbutilcursor.out} ''; - buildInputs = [ pkgs.pkgconfig pkgs.glib pkgs.xorg.libxcb pkgs.cairo pkgs.pango python27Packages.xcffib ]; + buildInputs = [ pkgconfig glib libxcb cairo pango python27Packages.xcffib ]; pythonPath = with python27Packages; [ xcffib cairocffi-xcffib trollius readline]; diff --git a/pkgs/development/arduino/ino/default.nix b/pkgs/development/arduino/ino/default.nix index 07dc229bcc2a..aeb0c5bf8ac7 100644 --- a/pkgs/development/arduino/ino/default.nix +++ b/pkgs/development/arduino/ino/default.nix @@ -1,7 +1,7 @@ -{ stdenv, fetchurl, buildPythonApplication, pythonPackages, picocom +{ stdenv, fetchurl, pythonPackages, picocom , avrdude, arduino-core, avrgcclibc }: -buildPythonApplication rec { +pythonPackages.buildPythonApplication rec { name = "ino-0.3.6"; namePrefix = ""; diff --git a/pkgs/development/tools/grabserial/default.nix b/pkgs/development/tools/grabserial/default.nix index 34a45fa0b846..1020ed864dfb 100644 --- a/pkgs/development/tools/grabserial/default.nix +++ b/pkgs/development/tools/grabserial/default.nix @@ -1,6 +1,6 @@ -{ stdenv, fetchgit, buildPythonApplication, pythonPackages }: +{ stdenv, fetchgit, pythonPackages }: -buildPythonApplication rec { +pythonPackages.buildPythonApplication rec { name = "grabserial-20141120"; namePrefix = ""; diff --git a/pkgs/development/tools/misc/ycmd/default.nix b/pkgs/development/tools/misc/ycmd/default.nix index b511b7d1948b..75d371b4ec8d 100644 --- a/pkgs/development/tools/misc/ycmd/default.nix +++ b/pkgs/development/tools/misc/ycmd/default.nix @@ -1,8 +1,11 @@ -{ stdenv, fetchgit, cmake, python, llvmPackages, boost, pythonPackages, buildPythonApplication, makeWrapper +{ stdenv, fetchgit, cmake, python, llvmPackages, boost, pythonPackages }: -stdenv.mkDerivation rec { +let + inherit (pythonPackages) python; +in pythonPackages.mkPythonDerivation rec { name = "ycmd-2016-01-12"; + namePrefix = ""; src = fetchgit { url = "git://github.com/Valloric/ycmd.git"; @@ -10,13 +13,13 @@ stdenv.mkDerivation rec { sha256 = "1g0hivv3wla7z5dgnkcn3ny38p089pjfj36nx6k29zmprgmjinyr"; }; - buildInputs = [ python cmake boost makeWrapper ]; + buildInputs = [ cmake boost ]; propagatedBuildInputs = with pythonPackages; [ waitress frozendict bottle ]; buildPhase = '' export EXTRA_CMAKE_ARGS=-DPATH_TO_LLVM_ROOT=${llvmPackages.clang-unwrapped} - python build.py --clang-completer --system-boost + ${python.interpreter} build.py --clang-completer --system-boost ''; configurePhase = ":"; @@ -24,8 +27,6 @@ stdenv.mkDerivation rec { installPhase = with pythonPackages; '' mkdir -p $out/lib/ycmd/third_party $out/bin cp -r ycmd/ CORE_VERSION libclang.so.* ycm_client_support.so ycm_core.so $out/lib/ycmd/ - wrapProgram $out/lib/ycmd/ycmd/__main__.py \ - --prefix PYTHONPATH : "$(toPythonPath ${waitress}):$(toPythonPath ${frozendict}):$(toPythonPath ${bottle})" ln -s $out/lib/ycmd/ycmd/__main__.py $out/bin/ycmd ''; diff --git a/pkgs/development/tools/winpdb/default.nix b/pkgs/development/tools/winpdb/default.nix index 58a857c22148..e0c897499d2a 100644 --- a/pkgs/development/tools/winpdb/default.nix +++ b/pkgs/development/tools/winpdb/default.nix @@ -1,6 +1,6 @@ -{ stdenv, fetchurl, buildPythonApplication, wxPython, makeDesktopItem }: +{ stdenv, fetchurl, pythonPackages, makeDesktopItem }: -buildPythonApplication rec { +pythonPackages.buildPythonApplication rec { name = "winpdb-1.4.8"; namePrefix = ""; @@ -9,7 +9,7 @@ buildPythonApplication rec { sha256 = "0vkpd24r40j928vc04c721innv0168sbllg97v4zw10adm24d8fs"; }; - propagatedBuildInputs = [ wxPython ]; + propagatedBuildInputs = [ pythonPackages.wxPython ]; desktopItem = makeDesktopItem { name = "winpdb"; diff --git a/pkgs/os-specific/linux/iotop/default.nix b/pkgs/os-specific/linux/iotop/default.nix index a83d4a2ad9fd..505468d849a6 100644 --- a/pkgs/os-specific/linux/iotop/default.nix +++ b/pkgs/os-specific/linux/iotop/default.nix @@ -1,15 +1,14 @@ -{ stdenv, fetchurl, buildPythonApplication, pythonPackages }: +{ stdenv, fetchurl, pythonPackages }: -buildPythonApplication rec { +pythonPackages.buildPythonApplication rec { name = "iotop-0.6"; - namePrefix = ""; src = fetchurl { url = "http://guichaz.free.fr/iotop/files/${name}.tar.bz2"; sha256 = "0nzprs6zqax0cwq8h7hnszdl3d2m4c2d4vjfxfxbnjfs9sia5pis"; }; - pythonPath = [ pythonPackages.curses ]; + propagatedBuildInputs = [ pythonPackages.curses ]; doCheck = false; diff --git a/pkgs/servers/matrix-synapse/default.nix b/pkgs/servers/matrix-synapse/default.nix index b4f34b452a7d..4bc3605b731f 100644 --- a/pkgs/servers/matrix-synapse/default.nix +++ b/pkgs/servers/matrix-synapse/default.nix @@ -1,6 +1,6 @@ -{ lib, pkgs, stdenv, buildPythonApplication, pythonPackages, fetchurl, fetchFromGitHub }: +{ lib, pkgs, stdenv, pythonPackages, fetchurl, fetchFromGitHub }: let - matrix-angular-sdk = buildPythonApplication rec { + matrix-angular-sdk = pythonPackages.buildPythonApplication rec { name = "matrix-angular-sdk-${version}"; version = "0.6.8"; @@ -9,8 +9,7 @@ let sha256 = "0gmx4y5kqqphnq3m7xk2vpzb0w2a4palicw7wfdr1q2schl9fhz2"; }; }; -in -buildPythonApplication rec { +in pythonPackages.buildPythonApplication rec { name = "matrix-synapse-${version}"; version = "0.17.2"; diff --git a/pkgs/tools/X11/winswitch/default.nix b/pkgs/tools/X11/winswitch/default.nix index 767edbc47d56..90159d82c39b 100644 --- a/pkgs/tools/X11/winswitch/default.nix +++ b/pkgs/tools/X11/winswitch/default.nix @@ -1,8 +1,8 @@ -{ stdenv, fetchurl, buildPythonApplication, pythonPackages +{ stdenv, fetchurl, pythonPackages , which, xpra, xmodmap }: let - base = buildPythonApplication rec { + base = pythonPackages.buildPythonApplication rec { name = "winswitch-${version}"; namePrefix = ""; version = "0.12.16"; diff --git a/pkgs/tools/misc/i3minator/default.nix b/pkgs/tools/misc/i3minator/default.nix index e51150d68769..0b26dbc06e2b 100644 --- a/pkgs/tools/misc/i3minator/default.nix +++ b/pkgs/tools/misc/i3minator/default.nix @@ -1,6 +1,6 @@ -{ stdenv, fetchurl, buildPythonApplication, pythonPackages, python }: +{ stdenv, fetchurl, pythonPackages }: -buildPythonApplication rec { +pythonPackages.buildPythonApplication rec { name = "i3minator-${version}"; version = "0.0.4"; diff --git a/pkgs/tools/misc/togglesg-download/default.nix b/pkgs/tools/misc/togglesg-download/default.nix index 14b9b1fcd9df..e945e560f1b0 100644 --- a/pkgs/tools/misc/togglesg-download/default.nix +++ b/pkgs/tools/misc/togglesg-download/default.nix @@ -1,6 +1,6 @@ -{ stdenv, lib, fetchFromGitHub, buildPythonApplication, makeWrapper, ffmpeg_3 }: +{ stdenv, lib, fetchFromGitHub, pythonPackages, makeWrapper, ffmpeg_3 }: -buildPythonApplication rec { +pythonPackages.buildPythonApplication rec { name = "togglesg-download-git-${version}"; version = "2016-05-31"; diff --git a/pkgs/tools/misc/xflux/gui.nix b/pkgs/tools/misc/xflux/gui.nix index 2b18d4e910d5..1fd3b3d8371f 100644 --- a/pkgs/tools/misc/xflux/gui.nix +++ b/pkgs/tools/misc/xflux/gui.nix @@ -1,9 +1,8 @@ -{ stdenv, fetchFromGitHub, buildPythonPackage -, pexpect, pyGtkGlade, pygobject, pyxdg -, gnome_python, python +{ stdenv, fetchFromGitHub, pythonPackages +, gnome_python , libappindicator-gtk2, xflux, librsvg, wrapGAppsHook }: -buildPythonPackage rec { +pythonPackages.buildPythonApplication rec { name = "xflux-gui-${version}"; version = "2016-09-21"; @@ -14,11 +13,10 @@ buildPythonPackage rec { sha256 = "15pr8f31jnhqjlpvasnj6cmm6hw5gljphh2pxzav3zd9bp4yl56r"; }; - # not sure if these need to be propagated or not? - propagatedBuildInputs = [ + propagatedBuildInputs = with pythonPackages; [ pexpect pyGtkGlade - pygobject + pygobject2 pyxdg libappindicator-gtk2 gnome_python @@ -36,7 +34,7 @@ buildPythonPackage rec { wrapGAppsHook makeWrapperArgs="''${gappsWrapperArgs[@]}" wrapPythonPrograms - patchPythonScript $out/${python.sitePackages}/fluxgui/fluxapp.py + patchPythonScript $out/${pythonPackages.python.sitePackages}/fluxgui/fluxapp.py ''; meta = { diff --git a/pkgs/tools/networking/gmvault/default.nix b/pkgs/tools/networking/gmvault/default.nix index 4ccd09ac555a..47e1360df8f2 100644 --- a/pkgs/tools/networking/gmvault/default.nix +++ b/pkgs/tools/networking/gmvault/default.nix @@ -1,6 +1,6 @@ -{ pkgs, fetchurl, buildPythonApplication, pythonPackages }: +{ pkgs, fetchurl, pythonPackages }: -buildPythonApplication rec { +pythonPackages.buildPythonApplication rec { version = "1.8.1-beta"; name = "gmvault-${version}"; diff --git a/pkgs/tools/security/knockknock/default.nix b/pkgs/tools/security/knockknock/default.nix index 7e4ff32e8805..5ff93ae6a033 100644 --- a/pkgs/tools/security/knockknock/default.nix +++ b/pkgs/tools/security/knockknock/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchFromGitHub, pythonPackages, buildPythonApplication, hping }: +{ stdenv, fetchFromGitHub, pythonPackages, hping }: pythonPackages.buildPythonApplication rec { rev = "bf14bbff"; diff --git a/pkgs/tools/system/honcho/default.nix b/pkgs/tools/system/honcho/default.nix index 7c33d2e166df..6946862422ba 100644 --- a/pkgs/tools/system/honcho/default.nix +++ b/pkgs/tools/system/honcho/default.nix @@ -1,6 +1,6 @@ -{ stdenv, fetchFromGitHub, pythonPackages, buildPythonApplication }: +{ stdenv, fetchFromGitHub, pythonPackages }: -let honcho = buildPythonApplication rec { +let honcho = pythonPackages.buildPythonApplication rec { name = "honcho-${version}"; version = "0.6.6"; namePrefix = ""; diff --git a/pkgs/tools/typesetting/odpdown/default.nix b/pkgs/tools/typesetting/odpdown/default.nix index fe1e915e27bf..140784fa9369 100644 --- a/pkgs/tools/typesetting/odpdown/default.nix +++ b/pkgs/tools/typesetting/odpdown/default.nix @@ -1,8 +1,6 @@ -{ stdenv, fetchurl, buildPythonApplication, libreoffice, lpod, lxml, mistune, pillow -, pygments -}: +{ stdenv, fetchurl, pythonPackages, libreoffice }: -buildPythonApplication rec { +pythonPackages.buildPythonApplication rec { name = "odpdown-${version}"; version = "0.4.1"; @@ -12,7 +10,7 @@ buildPythonApplication rec { sha256 = "005eecc73c65b9d4c09532547940718a7b308cd565f62a213dfa040827d4d565"; }; - propagatedBuildInputs = [ libreoffice lpod lxml mistune pillow pygments ]; + propagatedBuildInputs = with pythonPackages; [ libreoffice lpod lxml mistune pillow pygments ]; meta = with stdenv.lib; { homepage = https://github.com/thorstenb/odpdown; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index d4c43ae3c726..15ba418da44b 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -2906,9 +2906,7 @@ in obnam = callPackage ../tools/backup/obnam { }; - odpdown = callPackage ../tools/typesetting/odpdown { - inherit (pythonPackages) lpod lxml mistune pillow pygments; - }; + odpdown = callPackage ../tools/typesetting/odpdown { }; odt2txt = callPackage ../tools/text/odt2txt { }; @@ -4230,10 +4228,6 @@ in xflux = callPackage ../tools/misc/xflux { }; xflux-gui = callPackage ../tools/misc/xflux/gui.nix { - pexpect = pythonPackages.pexpect; - pyGtkGlade = pythonPackages.pyGtkGlade; - pygobject = pythonPackages.pygobject2; - pyxdg = pythonPackages.pyxdg; gnome_python = gnome2.gnome_python; }; @@ -7038,9 +7032,7 @@ in yodl = callPackage ../development/tools/misc/yodl { }; - winpdb = callPackage ../development/tools/winpdb { - inherit (pythonPackages) wxPython; - }; + winpdb = callPackage ../development/tools/winpdb { }; grabserial = callPackage ../development/tools/grabserial { }; @@ -14141,10 +14133,7 @@ in mimms = callPackage ../applications/audio/mimms {}; - mirage = callPackage ../applications/graphics/mirage { - inherit (pythonPackages) pygtk; - inherit (pythonPackages) pillow; - }; + mirage = callPackage ../applications/graphics/mirage { }; mixxx = callPackage ../applications/audio/mixxx { inherit (vamp) vampSDK; @@ -15316,7 +15305,9 @@ in qpdfview = callPackage ../applications/misc/qpdfview {}; - qtile = callPackage ../applications/window-managers/qtile { }; + qtile = callPackage ../applications/window-managers/qtile { + inherit (xorg) libxcb; + }; qvim = lowPrio (callPackage ../applications/editors/vim/qvim.nix { features = "huge"; # one of tiny, small, normal, big or huge