diff --git a/pkgs/applications/office/paperwork/backend.nix b/pkgs/applications/office/paperwork/backend.nix index 557529964649..2e052243a052 100644 --- a/pkgs/applications/office/paperwork/backend.nix +++ b/pkgs/applications/office/paperwork/backend.nix @@ -9,7 +9,7 @@ }: buildPythonPackage rec { - name = "paperwork-backend-${version}"; + pname = "paperwork-backend"; version = "1.2.1"; src = fetchFromGitHub { diff --git a/pkgs/development/compilers/jsonnet/default.nix b/pkgs/development/compilers/jsonnet/default.nix index cc19f7afe347..790f9a4827ae 100644 --- a/pkgs/development/compilers/jsonnet/default.nix +++ b/pkgs/development/compilers/jsonnet/default.nix @@ -4,6 +4,7 @@ let version = "0.9.4"; in stdenv.mkDerivation { name = "jsonnet-${version}"; + version = version; src = fetchFromGitHub { rev = "v${version}"; diff --git a/pkgs/development/libraries/boost/generic.nix b/pkgs/development/libraries/boost/generic.nix index 3f9ae113f849..076f43b71f36 100644 --- a/pkgs/development/libraries/boost/generic.nix +++ b/pkgs/development/libraries/boost/generic.nix @@ -125,7 +125,7 @@ in stdenv.mkDerivation { name = "boost-${version}"; - inherit src patches; + inherit src patches version; meta = { homepage = http://boost.org/; diff --git a/pkgs/development/libraries/kmsxx/default.nix b/pkgs/development/libraries/kmsxx/default.nix index 490732c38025..8be8eb713572 100644 --- a/pkgs/development/libraries/kmsxx/default.nix +++ b/pkgs/development/libraries/kmsxx/default.nix @@ -1,7 +1,9 @@ { stdenv, fetchFromGitHub, cmake, pkgconfig, libdrm, python }: stdenv.mkDerivation rec { - name = "kmsxx-2017-10-10"; + pname = "kmsxx"; + version = "2017-10-10"; + name = pname + "-" + version; src = fetchFromGitHub { owner = "tomba"; diff --git a/pkgs/development/libraries/libxslt/default.nix b/pkgs/development/libraries/libxslt/default.nix index bcc0b30f1277..2f9130938734 100644 --- a/pkgs/development/libraries/libxslt/default.nix +++ b/pkgs/development/libraries/libxslt/default.nix @@ -10,7 +10,9 @@ assert pythonSupport -> libxml2.pythonSupport; with stdenv.lib; stdenv.mkDerivation rec { - name = "libxslt-1.1.29"; + pname = "libxslt"; + version = "1.1.29"; + name = pname + "-" + version; src = fetchurl { url = "http://xmlsoft.org/sources/${name}.tar.gz"; diff --git a/pkgs/development/python-modules/arelle/default.nix b/pkgs/development/python-modules/arelle/default.nix index 3c4d802718e8..862564dbcd15 100644 --- a/pkgs/development/python-modules/arelle/default.nix +++ b/pkgs/development/python-modules/arelle/default.nix @@ -5,8 +5,9 @@ ... }: buildPythonPackage rec { - name = "arelle-${version}${lib.optionalString (!gui) "-headless"}"; + pname = "arelle-${version}${lib.optionalString (!gui) "-headless"}"; version = "2017-08-24"; + name = pname + "-" + version; disabled = !isPy3k; diff --git a/pkgs/development/python-modules/asn1ate/default.nix b/pkgs/development/python-modules/asn1ate/default.nix index ce07c2376245..7605e2c30858 100644 --- a/pkgs/development/python-modules/asn1ate/default.nix +++ b/pkgs/development/python-modules/asn1ate/default.nix @@ -4,7 +4,8 @@ buildPythonPackage rec { pname = "asn1ate"; date = "20160810"; - name = "${pname}-unstable-${date}"; + version = "unstable-${date}"; + name = "${pname}-${version}"; src = fetchFromGitHub { sha256 = "04pddr1mh2v9qq8fg60czwvjny5qwh4nyxszr3qc4bipiiv2xk9w"; diff --git a/pkgs/development/python-modules/augeas/default.nix b/pkgs/development/python-modules/augeas/default.nix index 8934e1b81a81..def46c7fccc1 100644 --- a/pkgs/development/python-modules/augeas/default.nix +++ b/pkgs/development/python-modules/augeas/default.nix @@ -1,7 +1,8 @@ { stdenv, lib, buildPythonPackage, fetchFromGitHub, augeas, cffi }: buildPythonPackage rec { - name = "augeas-${version}"; + pname = "augeas"; version = "1.0.2"; + name = pname + "-" + version; src = fetchFromGitHub { owner = "hercules-team"; diff --git a/pkgs/development/python-modules/blockdiag/default.nix b/pkgs/development/python-modules/blockdiag/default.nix index fed6f6e9219e..fde330d706f7 100644 --- a/pkgs/development/python-modules/blockdiag/default.nix +++ b/pkgs/development/python-modules/blockdiag/default.nix @@ -3,8 +3,9 @@ }: buildPythonPackage rec { - name = "blockdiag-${version}"; + pname = "blockdiag"; version = "1.5.3"; + name = pname + "-" + version; src = fetchurl { url = "https://bitbucket.org/blockdiag/blockdiag/get/${version}.tar.bz2"; diff --git a/pkgs/development/python-modules/bottleneck/default.nix b/pkgs/development/python-modules/bottleneck/default.nix index 4eb5bcb6edc9..791b05e81cad 100644 --- a/pkgs/development/python-modules/bottleneck/default.nix +++ b/pkgs/development/python-modules/bottleneck/default.nix @@ -8,8 +8,9 @@ buildPythonPackage rec { pname = "Bottleneck"; - name = "Bottleneck-${version}"; version = "1.2.1"; + name = pname + "-" + version; + src = fetchPypi { inherit pname version; sha256 = "6efcde5f830aed64feafca0359b51db0e184c72af8ba6675b4a99f263922eb36"; @@ -23,4 +24,4 @@ buildPythonPackage rec { postPatch = '' substituteInPlace setup.py --replace "__builtins__.__NUMPY_SETUP__ = False" "" ''; -} \ No newline at end of file +} diff --git a/pkgs/development/python-modules/cgroup-utils/default.nix b/pkgs/development/python-modules/cgroup-utils/default.nix index e565e23458ca..2c97cbd4a334 100644 --- a/pkgs/development/python-modules/cgroup-utils/default.nix +++ b/pkgs/development/python-modules/cgroup-utils/default.nix @@ -2,7 +2,8 @@ buildPythonPackage rec { version = "0.6"; - name = "cgroup-utils-${version}"; + pname = "cgroup-utils"; + name = pname + "-" + version; buildInputs = [ pep8 nose ]; # Pep8 tests fail... diff --git a/pkgs/development/python-modules/construct/default.nix b/pkgs/development/python-modules/construct/default.nix index 9d8e61d1f450..78aa0aab5c08 100644 --- a/pkgs/development/python-modules/construct/default.nix +++ b/pkgs/development/python-modules/construct/default.nix @@ -1,8 +1,9 @@ { stdenv, buildPythonPackage, fetchFromGitHub, six, pythonOlder }: buildPythonPackage rec { - name = "construct-${version}"; + pname = "construct"; version = "2.8.16"; + name = pname + "-" + version; src = fetchFromGitHub { owner = "construct"; diff --git a/pkgs/development/python-modules/cymem/default.nix b/pkgs/development/python-modules/cymem/default.nix index f2c6c649a837..8033fa96113e 100644 --- a/pkgs/development/python-modules/cymem/default.nix +++ b/pkgs/development/python-modules/cymem/default.nix @@ -5,8 +5,9 @@ , python }: buildPythonPackage rec { - name = "cymem-${version}"; + pname = "cymem"; version = "1.31.2"; + name = pname + "-" + version; src = fetchFromGitHub { owner = "explosion"; @@ -16,14 +17,14 @@ buildPythonPackage rec { }; propagatedBuildInputs = [ - cython + cython ]; - + checkPhase = '' cd cymem/tests ${python.interpreter} -m unittest discover -p "*test*" ''; - + meta = with stdenv.lib; { description = "Cython memory pool for RAII-style memory management"; homepage = https://github.com/explosion/cymem; diff --git a/pkgs/development/python-modules/django-hijack/default.nix b/pkgs/development/python-modules/django-hijack/default.nix index 8eb98924491a..b779d01c9353 100644 --- a/pkgs/development/python-modules/django-hijack/default.nix +++ b/pkgs/development/python-modules/django-hijack/default.nix @@ -2,8 +2,9 @@ django, django_compat, django_nose }: buildPythonPackage rec { - name = "django-hijack-${version}"; + pname = "django-hijack"; version = "2.1.4"; + name = pname + "-" + version; # the pypi packages don't include everything required for the tests src = fetchFromGitHub { @@ -36,4 +37,4 @@ buildPythonPackage rec { license = licenses.mit; maintainers = with maintainers; [ ris ]; }; -} \ No newline at end of file +} diff --git a/pkgs/development/python-modules/dkimpy/default.nix b/pkgs/development/python-modules/dkimpy/default.nix index 30baed39bd6f..91d5a17960d8 100644 --- a/pkgs/development/python-modules/dkimpy/default.nix +++ b/pkgs/development/python-modules/dkimpy/default.nix @@ -2,10 +2,11 @@ , pytest, dns }: buildPythonApplication rec { - name = "${pname}-${majorversion}.${minorversion}"; + name = "${pname}-${version}"; pname = "dkimpy"; majorversion = "0.6"; minorversion = "2"; + version = "${majorversion}.${minorversion}"; src = fetchurl { url = "https://launchpad.net/${pname}/${majorversion}/${majorversion}.${minorversion}/+download/${name}.tar.gz"; diff --git a/pkgs/development/python-modules/first/default.nix b/pkgs/development/python-modules/first/default.nix index 5ecbff90442d..16c1d79d767a 100644 --- a/pkgs/development/python-modules/first/default.nix +++ b/pkgs/development/python-modules/first/default.nix @@ -1,10 +1,9 @@ { stdenv, buildPythonPackage, fetchPypi }: -let + +buildPythonPackage rec { pname = "first"; version = "2.0.1"; -in -buildPythonPackage { - name = "${pname}-${version}"; + name = pname + "-" + version; src = fetchPypi { inherit pname version; diff --git a/pkgs/development/python-modules/geopandas/default.nix b/pkgs/development/python-modules/geopandas/default.nix index f8f54e0e4294..cab25a60f3b4 100644 --- a/pkgs/development/python-modules/geopandas/default.nix +++ b/pkgs/development/python-modules/geopandas/default.nix @@ -3,8 +3,9 @@ , pytest }: buildPythonPackage rec { - name = "geopandas-${version}"; + pname = "geopandas"; version = "0.3.0"; + name = pname + "-" + version; src = fetchFromGitHub { owner = "geopandas"; diff --git a/pkgs/development/python-modules/gevent/default.nix b/pkgs/development/python-modules/gevent/default.nix index 8a3d3b3d09b7..6b94652402e3 100644 --- a/pkgs/development/python-modules/gevent/default.nix +++ b/pkgs/development/python-modules/gevent/default.nix @@ -1,20 +1,15 @@ { stdenv, fetchurl, buildPythonPackage, isPyPy, python, libev, greenlet }: buildPythonPackage rec { - name = "gevent-1.1.2"; + pname = "gevent"; + version = "1.2.2"; + name = pname + "-" + version; src = fetchurl { url = "mirror://pypi/g/gevent/${name}.tar.gz"; - sha256 = "cb15cf73d69a2eeefed330858f09634e2c50bf46da9f9e7635730fcfb872c02c"; + sha256 = "0bbbjvi423y9k9xagrcsimnayaqymg6f2dj76m9z3mjpkjpci4a7"; }; - # Why do we have this patch? - postPatch = '' - substituteInPlace libev/ev.c --replace \ - "ecb_inline void ecb_unreachable (void) ecb_noreturn" \ - "ecb_inline ecb_noreturn void ecb_unreachable (void)" - ''; - buildInputs = [ libev ]; propagatedBuildInputs = stdenv.lib.optionals (!isPyPy) [ greenlet ]; diff --git a/pkgs/development/python-modules/gflags/default.nix b/pkgs/development/python-modules/gflags/default.nix index f73ff2b4686d..6fe4b7fcab87 100644 --- a/pkgs/development/python-modules/gflags/default.nix +++ b/pkgs/development/python-modules/gflags/default.nix @@ -2,7 +2,8 @@ buildPythonPackage rec { version = "3.1.2"; - name = "gflags-${version}"; + pname = "gflags"; + name = pname + "-" + version; src = fetchPypi { inherit version; diff --git a/pkgs/development/python-modules/hmmlearn/default.nix b/pkgs/development/python-modules/hmmlearn/default.nix index eeb042452155..3295786bd08c 100644 --- a/pkgs/development/python-modules/hmmlearn/default.nix +++ b/pkgs/development/python-modules/hmmlearn/default.nix @@ -1,8 +1,9 @@ { lib, fetchurl, buildPythonPackage, numpy }: buildPythonPackage rec { - name = "hmmlearn-${version}"; + pname = "hmmlearn"; version = "0.2.0"; + name = pname + "-" + version; src = fetchurl { url = "mirror://pypi/h/hmmlearn/${name}.tar.gz"; diff --git a/pkgs/development/python-modules/hyperlink/default.nix b/pkgs/development/python-modules/hyperlink/default.nix index ca09c271ddac..b485745cbbb8 100644 --- a/pkgs/development/python-modules/hyperlink/default.nix +++ b/pkgs/development/python-modules/hyperlink/default.nix @@ -1,7 +1,9 @@ { stdenv, buildPythonPackage, fetchurl, pytest }: + buildPythonPackage rec { - name = "hyperlink-${version}"; + pname = "hyperlink"; version = "17.3.0"; + name = pname + "-" + version; src = fetchurl { url = "mirror://pypi/h/hyperlink/${name}.tar.gz"; diff --git a/pkgs/development/python-modules/keystoneclient/default.nix b/pkgs/development/python-modules/keystoneclient/default.nix index 5b09992295f7..a856f4db793f 100644 --- a/pkgs/development/python-modules/keystoneclient/default.nix +++ b/pkgs/development/python-modules/keystoneclient/default.nix @@ -9,8 +9,9 @@ }: buildPythonPackage rec { - name = "keystoneclient-${version}"; + pname = "keystoneclient"; version = "1.8.1"; + name = pname + "-" + version; src = fetchFromGitHub { owner = "openstack"; diff --git a/pkgs/development/python-modules/keyutils/default.nix b/pkgs/development/python-modules/keyutils/default.nix index 2746f1616682..04b9e9235750 100644 --- a/pkgs/development/python-modules/keyutils/default.nix +++ b/pkgs/development/python-modules/keyutils/default.nix @@ -1,9 +1,8 @@ { lib, buildPythonPackage, fetchurl, pkgs, pytestrunner }: -let +buildPythonPackage rec { pname = "keyutils"; version = "0.5"; -in buildPythonPackage rec { name = "${pname}-${version}"; src = fetchurl { diff --git a/pkgs/development/python-modules/libgpuarray/default.nix b/pkgs/development/python-modules/libgpuarray/default.nix index 3c24c2ed24cb..67353a32ada6 100644 --- a/pkgs/development/python-modules/libgpuarray/default.nix +++ b/pkgs/development/python-modules/libgpuarray/default.nix @@ -1,4 +1,4 @@ -{ stdenv +{ stdenv , lib , buildPythonPackage , fetchFromGitHub @@ -11,18 +11,19 @@ , python , cudaSupport ? false, cudatoolkit , openclSupport ? true, ocl-icd, clblas -}: +}: buildPythonPackage rec { - name = "libgpuarray-${version}"; + pname = "libgpuarray"; version = "0.6.9"; + name = pname + "-" + version; src = fetchFromGitHub { - owner = "Theano"; + owner = "Theano"; repo = "libgpuarray"; rev = "v${version}"; sha256 = "06z47ls42a37gbv0x7f3l1qvils7q0hvy02s95l530klgibp19s0"; - }; + }; # requires a GPU doCheck = false; @@ -43,7 +44,7 @@ buildPythonPackage rec { export NIX_CFLAGS_COMPILE="-L $out/lib -I $out/include $NIX_CFLAGS_COMPILE" cd .. - ''; + ''; postFixup = '' rm $out/lib/libgpuarray-static.a @@ -64,11 +65,11 @@ buildPythonPackage rec { enableParallelBuilding = true; - buildInputs = [ - cmake - cython + buildInputs = [ + cmake + cython nose - ]; + ]; meta = with stdenv.lib; { homepage = "https://github.com/Theano/libgpuarray"; diff --git a/pkgs/development/python-modules/llfuse/default.nix b/pkgs/development/python-modules/llfuse/default.nix index 7c907d1e5ef3..4c4c89d8f196 100644 --- a/pkgs/development/python-modules/llfuse/default.nix +++ b/pkgs/development/python-modules/llfuse/default.nix @@ -3,7 +3,9 @@ }: buildPythonPackage rec { - name = "llfuse-1.0"; + pname = "llfuse"; + version = "1.0"; + name = pname + "-" + version; src = fetchurl { url = "mirror://pypi/l/llfuse/${name}.tar.bz2"; diff --git a/pkgs/development/python-modules/locustio/default.nix b/pkgs/development/python-modules/locustio/default.nix new file mode 100644 index 000000000000..c3eb5da0ae02 --- /dev/null +++ b/pkgs/development/python-modules/locustio/default.nix @@ -0,0 +1,32 @@ +{ buildPythonPackage +, fetchPypi +, mock +, unittest2 +, msgpack +, requests +, flask +, gevent +, pyzmq +}: + +buildPythonPackage rec { + pname = "locustio"; + version = "0.8"; + + src = fetchPypi { + inherit pname version; + sha256 = "0y3r2g31z7g120c7v91zdvcakwfxv2acbgs4flarv5yza2knl11c"; + }; + + patchPhase = '' + sed -i s/"pyzmq=="/"pyzmq>="/ setup.py + ''; + + propagatedBuildInputs = [ msgpack requests flask gevent pyzmq ]; + buildInputs = [ mock unittest2 ]; + + meta = { + homepage = http://locust.io/; + description = "A load testing tool"; + }; +} diff --git a/pkgs/development/python-modules/murmurhash/default.nix b/pkgs/development/python-modules/murmurhash/default.nix index aa5e3358866d..023c94cdc8ea 100644 --- a/pkgs/development/python-modules/murmurhash/default.nix +++ b/pkgs/development/python-modules/murmurhash/default.nix @@ -6,25 +6,26 @@ }: buildPythonPackage rec { - name = "murmurhash-${version}"; + pname = "murmurhash"; version = "0.26.4"; - + name = pname + "-" + version; + src = fetchFromGitHub { owner = "explosion"; repo = "murmurhash"; rev = "0.26.4"; - sha256 = "0n2j0glhlv2yh3fjgbg4d79j1c1fpchgjd4vnpw908l9mzchhmdv"; + sha256 = "0n2j0glhlv2yh3fjgbg4d79j1c1fpchgjd4vnpw908l9mzchhmdv"; }; buildInputs = [ cython ]; - + checkPhase = '' cd murmurhash/tests ${python.interpreter} -m unittest discover -p "*test*" ''; - + meta = with stdenv.lib; { description = "Cython bindings for MurmurHash2"; homepage = https://github.com/explosion/murmurhash; diff --git a/pkgs/development/python-modules/nilearn/default.nix b/pkgs/development/python-modules/nilearn/default.nix index f5dc7607e2d2..16036a691791 100644 --- a/pkgs/development/python-modules/nilearn/default.nix +++ b/pkgs/development/python-modules/nilearn/default.nix @@ -4,7 +4,7 @@ buildPythonPackage rec { pname = "nilearn"; version = "0.3.1"; - name = "nilearn-${version}"; + name = pname + "-" + version; src = fetchPypi { inherit pname version; diff --git a/pkgs/development/python-modules/nwdiag/default.nix b/pkgs/development/python-modules/nwdiag/default.nix index ebf7ce944c11..5d9b4c665c50 100644 --- a/pkgs/development/python-modules/nwdiag/default.nix +++ b/pkgs/development/python-modules/nwdiag/default.nix @@ -3,7 +3,9 @@ }: buildPythonPackage rec { - name = "nwdiag-1.0.3"; + pname = "nwdiag"; + version = "1.0.3"; + name = pname + "-" + version; src = fetchurl { url = "mirror://pypi/n/nwdiag/${name}.tar.gz"; diff --git a/pkgs/development/python-modules/path.py/default.nix b/pkgs/development/python-modules/path.py/default.nix index 3178b217a00a..6b4af3ffcd48 100644 --- a/pkgs/development/python-modules/path.py/default.nix +++ b/pkgs/development/python-modules/path.py/default.nix @@ -10,7 +10,7 @@ buildPythonPackage rec { pname = "path.py"; version = "10.4"; - name = "path.py-${version}"; + name = pname + "-" + version; src = fetchPypi { inherit pname version; @@ -31,4 +31,4 @@ buildPythonPackage rec { checkPhase = '' py.test test_path.py ''; -} \ No newline at end of file +} diff --git a/pkgs/development/python-modules/pip-tools/default.nix b/pkgs/development/python-modules/pip-tools/default.nix index eed891c6f577..8579e62ec1e0 100644 --- a/pkgs/development/python-modules/pip-tools/default.nix +++ b/pkgs/development/python-modules/pip-tools/default.nix @@ -4,7 +4,7 @@ buildPythonPackage rec { pname = "pip-tools"; version = "1.10.1"; - name = "pip-tools-${version}"; + name = pname + "-" + version; src = fetchurl { url = "mirror://pypi/p/pip-tools/${name}.tar.gz"; diff --git a/pkgs/development/python-modules/powerline/default.nix b/pkgs/development/python-modules/powerline/default.nix index 028d81d2934f..f51c6989c011 100644 --- a/pkgs/development/python-modules/powerline/default.nix +++ b/pkgs/development/python-modules/powerline/default.nix @@ -12,10 +12,12 @@ # the executables of git, mercurial and bazaar. buildPythonPackage rec { - rev = "2.6"; - name = "powerline-${rev}"; + version = "2.6"; + pname = "powerline"; + name = pname + "-" + version; + src = fetchurl { - url = "https://github.com/powerline/powerline/archive/${rev}.tar.gz"; + url = "https://github.com/powerline/powerline/archive/${version}.tar.gz"; name = "${name}.tar.gz"; sha256 = "c108f11fe10dc910febb94b87d3abded85d4363fb950366a9e30282b9ba7c272"; }; diff --git a/pkgs/development/python-modules/protobuf/default.nix b/pkgs/development/python-modules/protobuf/default.nix index 4a67a3132eda..1a345b19ef94 100644 --- a/pkgs/development/python-modules/protobuf/default.nix +++ b/pkgs/development/python-modules/protobuf/default.nix @@ -5,7 +5,7 @@ with stdenv.lib; buildPythonPackage rec { - inherit (protobuf) name src; + inherit (protobuf) name src version; inherit disabled doCheck; NIX_CFLAGS_COMPILE = diff --git a/pkgs/development/python-modules/psutil/default.nix b/pkgs/development/python-modules/psutil/default.nix new file mode 100644 index 000000000000..cf9b3ea267f5 --- /dev/null +++ b/pkgs/development/python-modules/psutil/default.nix @@ -0,0 +1,28 @@ +{ stdenv +, buildPythonPackage +, fetchPypi +, darwin +, mock +}: + +buildPythonPackage rec { + pname = "psutil"; + version = "5.4.1"; + name = "${pname}-${version}"; + + src = fetchPypi { + inherit pname version; + sha256 = "42e2de159e3c987435cb3b47d6f37035db190a1499f3af714ba7af5c379b6ba2"; + }; + + # No tests in archive + doCheck = false; + + buildInputs = [] ++ stdenv.lib.optionals stdenv.isDarwin [ darwin.IOKit ]; + + meta = { + description = "Process and system utilization information interface for python"; + homepage = https://github.com/giampaolo/psutil; + license = stdenv.lib.licenses.bsd3; + }; +} diff --git a/pkgs/development/python-modules/pwntools/default.nix b/pkgs/development/python-modules/pwntools/default.nix index 57f7c2c317dc..11f80ca3b2e8 100644 --- a/pkgs/development/python-modules/pwntools/default.nix +++ b/pkgs/development/python-modules/pwntools/default.nix @@ -7,7 +7,7 @@ buildPythonPackage rec { version = "3.10.0"; pname = "pwntools"; - name = "pwntools-${version}"; + name = pname + "-" + version; src = fetchPypi { inherit pname version; diff --git a/pkgs/development/python-modules/pyGithub/default.nix b/pkgs/development/python-modules/pyGithub/default.nix index 45887bdc748d..ec8db1c5bc3d 100644 --- a/pkgs/development/python-modules/pyGithub/default.nix +++ b/pkgs/development/python-modules/pyGithub/default.nix @@ -3,8 +3,9 @@ , buildPythonPackage, python-jose }: buildPythonPackage rec { - name = "PyGithub-${version}"; + pname = "PyGithub"; version = "1.32"; + name = pname + "-" + version; src = fetchFromGitHub { owner = "PyGithub"; diff --git a/pkgs/development/python-modules/pychromecast/default.nix b/pkgs/development/python-modules/pychromecast/default.nix index 440a1aa7785e..01014170dc7d 100644 --- a/pkgs/development/python-modules/pychromecast/default.nix +++ b/pkgs/development/python-modules/pychromecast/default.nix @@ -1,8 +1,9 @@ { lib, fetchurl, buildPythonPackage, requests, six, zeroconf, protobuf }: buildPythonPackage rec { - name = "PyChromecast-${version}"; + pname = "PyChromecast"; version = "0.8.1"; + name = pname + "-" + version; src = fetchurl { url = "mirror://pypi/p/pychromecast/${name}.tar.gz"; diff --git a/pkgs/development/python-modules/pycrypto/default.nix b/pkgs/development/python-modules/pycrypto/default.nix index 4669c05a7d56..1ecf0bf6b339 100644 --- a/pkgs/development/python-modules/pycrypto/default.nix +++ b/pkgs/development/python-modules/pycrypto/default.nix @@ -3,10 +3,9 @@ # This is a dummy package providing the drop-in replacement pycryptodome. # https://github.com/NixOS/nixpkgs/issues/21671 -let +buildPythonPackage rec { version = pycryptodome.version; pname = "pycrypto"; -in buildPythonPackage rec { name = "${pname}-${version}"; # Cannot build wheel otherwise (zip 1980 issue) diff --git a/pkgs/development/python-modules/pycuda/compyte.nix b/pkgs/development/python-modules/pycuda/compyte.nix index 50bd81ac462c..192d60cec46a 100644 --- a/pkgs/development/python-modules/pycuda/compyte.nix +++ b/pkgs/development/python-modules/pycuda/compyte.nix @@ -1,10 +1,11 @@ -{ mkDerivation +{ mkDerivation , fetchFromGitHub }: mkDerivation rec { - name = "compyte-${version}"; - version = "git-20150817"; + pname = "compyte"; + version = "git-20150817"; + name = pname + "-" + version; src = fetchFromGitHub { owner = "inducer"; @@ -13,7 +14,7 @@ mkDerivation rec { sha256 = "1980h017qi52b7fqwm75m481xs2napgdd3fbrzkfc29k085cbign"; }; - installPhase = '' + installPhase = '' mkdir -p $out cp -r * $out ''; diff --git a/pkgs/development/python-modules/pyev/default.nix b/pkgs/development/python-modules/pyev/default.nix index db06fedd68cc..e393265ae37f 100644 --- a/pkgs/development/python-modules/pyev/default.nix +++ b/pkgs/development/python-modules/pyev/default.nix @@ -1,7 +1,9 @@ { stdenv, fetchurl, buildPythonPackage, libev }: buildPythonPackage rec { - name = "pyev-0.9.0"; + pname = "pyev"; + version = "0.9.0"; + name = pname + "-" + version; src = fetchurl { url = "mirror://pypi/p/pyev/${name}.tar.gz"; diff --git a/pkgs/development/python-modules/pyftgl/default.nix b/pkgs/development/python-modules/pyftgl/default.nix index a02aa94576e5..117169a26121 100644 --- a/pkgs/development/python-modules/pyftgl/default.nix +++ b/pkgs/development/python-modules/pyftgl/default.nix @@ -2,12 +2,14 @@ , boost, freetype, ftgl, mesa }: buildPythonPackage rec { - name = "pyftgl-0.4b"; + pname = "pyftgl"; + version = "0.4b"; + name = pname + "-" + version; src = fetchFromGitHub { owner = "umlaeute"; - repo = "pyftgl"; - rev = "0.4b"; + repo = name; + rev = version; sha256 = "12zcjv4cwwjihiaf74kslrdmmk4bs47h7006gyqfwdfchfjdgg4r"; }; diff --git a/pkgs/development/python-modules/pygame/git.nix b/pkgs/development/python-modules/pygame/git.nix index 97f7b8b6c993..1d8ba697f38b 100644 --- a/pkgs/development/python-modules/pygame/git.nix +++ b/pkgs/development/python-modules/pygame/git.nix @@ -3,8 +3,9 @@ }: buildPythonPackage rec { - name = "pygame-${version}"; + pname = "pygame"; version = "2016-05-17"; + name = pname + "-" + version; src = fetchFromBitbucket { owner = "pygame"; diff --git a/pkgs/development/python-modules/pygobject/3.nix b/pkgs/development/python-modules/pygobject/3.nix index 6afd10596bc6..db734c53007b 100644 --- a/pkgs/development/python-modules/pygobject/3.nix +++ b/pkgs/development/python-modules/pygobject/3.nix @@ -3,8 +3,10 @@ buildPythonPackage rec { major = "3.24"; minor = "1"; - name = "pygobject-${major}.${minor}"; + version = "${major}.${minor}"; format = "other"; + pname = "pygobject"; + name = pname + "-" + version; src = fetchurl { url = "mirror://gnome/sources/pygobject/${major}/${name}.tar.xz"; diff --git a/pkgs/development/python-modules/pygobject/default.nix b/pkgs/development/python-modules/pygobject/default.nix index 63a21cb2befd..796fc992a7dc 100644 --- a/pkgs/development/python-modules/pygobject/default.nix +++ b/pkgs/development/python-modules/pygobject/default.nix @@ -1,9 +1,10 @@ { stdenv, fetchurl, python, buildPythonPackage, pkgconfig, glib }: buildPythonPackage rec { - name = "pygobject-${version}"; + pname = "pygobject"; version = "2.28.6"; format = "other"; + name = pname + "-" + version; src = fetchurl { url = "mirror://gnome/sources/pygobject/2.28/${name}.tar.xz"; diff --git a/pkgs/development/python-modules/pygtk/default.nix b/pkgs/development/python-modules/pygtk/default.nix index 9b9adc64b755..42127de2f244 100644 --- a/pkgs/development/python-modules/pygtk/default.nix +++ b/pkgs/development/python-modules/pygtk/default.nix @@ -2,7 +2,9 @@ , buildPythonPackage, libglade ? null, isPy3k }: buildPythonPackage rec { - name = "pygtk-2.24.0"; + pname = "pygtk"; + version = "2.24.0"; + name = pname + "-" + version; disabled = isPy3k; diff --git a/pkgs/development/python-modules/pygtksourceview/default.nix b/pkgs/development/python-modules/pygtksourceview/default.nix index 7b89e6d1b28c..a03be0ac04df 100644 --- a/pkgs/development/python-modules/pygtksourceview/default.nix +++ b/pkgs/development/python-modules/pygtksourceview/default.nix @@ -1,10 +1,10 @@ { lib, fetchurl, python, buildPythonPackage, pkgconfig, pygobject2, glib, pygtk, gnome2 }: -let version = "2.10.1"; in - -buildPythonPackage { - name = "pygtksourceview-${version}"; +buildPythonPackage rec { + pname = "pygtksourceview"; format = "other"; + version = "2.10.1"; + name = pname + "-" + version; src = fetchurl { url = "http://ftp.gnome.org/pub/gnome/sources/pygtksourceview/2.10/pygtksourceview-${version}.tar.bz2"; diff --git a/pkgs/development/python-modules/pyocr/default.nix b/pkgs/development/python-modules/pyocr/default.nix index 54caba10189e..e253e64a41ca 100644 --- a/pkgs/development/python-modules/pyocr/default.nix +++ b/pkgs/development/python-modules/pyocr/default.nix @@ -3,8 +3,9 @@ }: buildPythonPackage rec { - name = "pyocr-${version}"; + pname = "pyocr"; version = "0.4.7"; + name = pname + "-" + version; # Don't fetch from PYPI because it doesn't contain tests. src = fetchFromGitHub { diff --git a/pkgs/development/python-modules/pyqt/4.x.nix b/pkgs/development/python-modules/pyqt/4.x.nix index b4376730e623..0efb77d27b3e 100644 --- a/pkgs/development/python-modules/pyqt/4.x.nix +++ b/pkgs/development/python-modules/pyqt/4.x.nix @@ -1,10 +1,14 @@ { stdenv, fetchurl, pythonPackages, qt4, pkgconfig, lndir, dbus_libs, makeWrapper }: let + pname = "PyQt-x11-gpl"; version = "4.12"; + inherit (pythonPackages) buildPythonPackage python dbus-python sip; in buildPythonPackage { - name = "PyQt-x11-gpl-${version}"; + pname = pname; + name = pname + "-" + version; + version = version; format = "other"; src = fetchurl { diff --git a/pkgs/development/python-modules/pyqt/5.x.nix b/pkgs/development/python-modules/pyqt/5.x.nix index e0c3163429c3..dc5c964caf6d 100644 --- a/pkgs/development/python-modules/pyqt/5.x.nix +++ b/pkgs/development/python-modules/pyqt/5.x.nix @@ -5,11 +5,15 @@ }: let + pname = "PyQt"; version = "5.9"; + inherit (pythonPackages) buildPythonPackage python dbus-python sip; in buildPythonPackage { - name = "PyQt-${version}"; + pname = pname; + version = version; format = "other"; + name = pname + "-" + version; meta = with lib; { description = "Python bindings for Qt5"; diff --git a/pkgs/development/python-modules/pyro/default.nix b/pkgs/development/python-modules/pyro/default.nix index dbad83bef7e7..3e2f90aa9d30 100644 --- a/pkgs/development/python-modules/pyro/default.nix +++ b/pkgs/development/python-modules/pyro/default.nix @@ -1,7 +1,10 @@ { stdenv, fetchurl, buildPythonPackage, isPy3k }: buildPythonPackage rec { - name = "Pyro-3.16"; + pname = "Pyro"; + version = "3.16"; + name = pname + "-" + version; + disabled = isPy3k; src = fetchurl { diff --git a/pkgs/development/python-modules/pyslurm/default.nix b/pkgs/development/python-modules/pyslurm/default.nix index 3a563e5d183d..e855b952f276 100644 --- a/pkgs/development/python-modules/pyslurm/default.nix +++ b/pkgs/development/python-modules/pyslurm/default.nix @@ -1,7 +1,9 @@ { lib, fetchFromGitHub, buildPythonPackage, cython, slurm }: buildPythonPackage rec { - name = "pyslurm"; + pname = "pyslurm"; + version = "unstable-69e4f4f"; + name = pname + "-" + version; src = fetchFromGitHub { repo = "pyslurm"; diff --git a/pkgs/development/python-modules/pysoundfile/default.nix b/pkgs/development/python-modules/pysoundfile/default.nix index fe24f0203f0d..ef67ed85cc03 100644 --- a/pkgs/development/python-modules/pysoundfile/default.nix +++ b/pkgs/development/python-modules/pysoundfile/default.nix @@ -11,8 +11,8 @@ buildPythonPackage rec { pname = "PySoundFile"; - name = "PySoundFile-${version}"; version = "0.8.1"; + name = pname + "-" + version; src = fetchPypi { inherit pname version; @@ -35,4 +35,4 @@ buildPythonPackage rec { # https://github.com/bastibe/PySoundFile/issues/157 disabled = isPyPy || stdenv.isi686; -} \ No newline at end of file +} diff --git a/pkgs/development/python-modules/pytest-expect/default.nix b/pkgs/development/python-modules/pytest-expect/default.nix index 5abfd9423ac7..b23ae051ad8d 100644 --- a/pkgs/development/python-modules/pytest-expect/default.nix +++ b/pkgs/development/python-modules/pytest-expect/default.nix @@ -6,10 +6,9 @@ , six }: -let +buildPythonPackage rec { pname = "pytest-expect"; version = "1.1.0"; -in buildPythonPackage rec { name = "${pname}-${version}"; src = fetchurl { @@ -28,4 +27,4 @@ in buildPythonPackage rec { homepage = https://github.com/gsnedders/pytest-expect; license = lib.licenses.mit; }; -} \ No newline at end of file +} diff --git a/pkgs/development/python-modules/pytest/2_7.nix b/pkgs/development/python-modules/pytest/2_7.nix index adaa640fdbe6..e63c3f5ebbd6 100644 --- a/pkgs/development/python-modules/pytest/2_7.nix +++ b/pkgs/development/python-modules/pytest/2_7.nix @@ -1,6 +1,8 @@ { stdenv, pkgs, buildPythonPackage, fetchurl, isPy26, argparse, py, selenium }: buildPythonPackage rec { - name = "pytest-2.7.3"; + pname = "pytest"; + version = "2.7.3"; + name = pname + "-" + version; src = fetchurl { url = "mirror://pypi/p/pytest/${name}.tar.gz"; diff --git a/pkgs/development/python-modules/pytest/2_8.nix b/pkgs/development/python-modules/pytest/2_8.nix index 6232ccaf7006..963154b11ce1 100644 --- a/pkgs/development/python-modules/pytest/2_8.nix +++ b/pkgs/development/python-modules/pytest/2_8.nix @@ -1,6 +1,8 @@ { stdenv, pkgs, buildPythonPackage, fetchurl, isPy26, argparse, py, selenium }: buildPythonPackage rec { - name = "pytest-2.8.7"; + pname = "pytest"; + version = "2.8.7"; + name = pname + "-" + version; src = fetchurl { url = "mirror://pypi/p/pytest/${name}.tar.gz"; diff --git a/pkgs/development/python-modules/pytest/2_9.nix b/pkgs/development/python-modules/pytest/2_9.nix index 3ca7120dd92c..2d28517441b0 100644 --- a/pkgs/development/python-modules/pytest/2_9.nix +++ b/pkgs/development/python-modules/pytest/2_9.nix @@ -1,6 +1,8 @@ { stdenv, pkgs, buildPythonPackage, fetchurl, isPy26, argparse, py, selenium }: buildPythonPackage rec { - name = "pytest-2.9.2"; + pname = "pytest"; + version = "2.9.2"; + name = pname + "-" + version; src = fetchurl { url = "mirror://pypi/p/pytest/${name}.tar.gz"; diff --git a/pkgs/development/python-modules/python-utils/default.nix b/pkgs/development/python-modules/python-utils/default.nix index 6acd0934f471..37c15c07537e 100644 --- a/pkgs/development/python-modules/python-utils/default.nix +++ b/pkgs/development/python-modules/python-utils/default.nix @@ -1,8 +1,9 @@ { lib, buildPythonPackage, fetchFromGitHub, pytest, pytestrunner, pytestcov, pytestflakes, pytestpep8, sphinx, six }: buildPythonPackage rec { - name = "python-utils-${version}"; + pname = "python-utils"; version = "2.2.0"; + name = pname + "-" + version; src = fetchFromGitHub { owner = "WoLpH"; diff --git a/pkgs/development/python-modules/python_fedora/default.nix b/pkgs/development/python-modules/python_fedora/default.nix index 7ab698ecd084..e7c3630f42f4 100644 --- a/pkgs/development/python-modules/python_fedora/default.nix +++ b/pkgs/development/python-modules/python_fedora/default.nix @@ -4,7 +4,7 @@ buildPythonPackage rec { pname = "python-fedora"; version = "0.9.0"; - name = "python-fedora-${version}"; + name = pname + "-" + version; src = fetchPypi { inherit pname version; diff --git a/pkgs/development/python-modules/rackspace-novaclient/default.nix b/pkgs/development/python-modules/rackspace-novaclient/default.nix index 144b61c9b9a5..3993503e9562 100644 --- a/pkgs/development/python-modules/rackspace-novaclient/default.nix +++ b/pkgs/development/python-modules/rackspace-novaclient/default.nix @@ -1,7 +1,9 @@ { buildPythonPackage, fetchurl, isPy3k, requests, novaclient, six, lib }: let os-virtual-interfacesv2-python-novaclient-ext = buildPythonPackage rec { - name = "os_virtual_interfacesv2_python_novaclient_ext-0.20"; + pname = "os_virtual_interfacesv2_python_novaclient_ext"; + version = "0.20"; + name = pname + "-" + version; src = fetchurl { url = "mirror://pypi/o/os-virtual-interfacesv2-python-novaclient-ext/${name}.tar.gz"; @@ -18,7 +20,9 @@ os-virtual-interfacesv2-python-novaclient-ext = buildPythonPackage rec { }; ip-associations-python-novaclient-ext = buildPythonPackage rec { - name = "ip_associations_python_novaclient_ext-0.2"; + pname = "ip_associations_python_novaclient_ext"; + version = "0.2"; + name = pname + "-" + version; src = fetchurl { url = "mirror://pypi/i/ip_associations_python_novaclient_ext/${name}.tar.gz"; @@ -34,9 +38,10 @@ ip-associations-python-novaclient-ext = buildPythonPackage rec { }; }; - rackspace-auth-openstack = buildPythonPackage rec { - name = "rackspace-auth-openstack-1.3"; + pname = "rackspace-auth-openstack"; + version = "1.3"; + name = pname + "-" + version; src = fetchurl { url = "mirror://pypi/r/rackspace-auth-openstack/${name}.tar.gz"; @@ -52,7 +57,9 @@ rackspace-auth-openstack = buildPythonPackage rec { }; }; rax-default-network-flags-python-novaclient-ext = buildPythonPackage rec { - name = "rax_default_network_flags_python_novaclient_ext-0.4.0"; + pname = "rax_default_network_flags_python_novaclient_ext"; + version = "0.4.0"; + name = pname + "-" + version; src = fetchurl { url = "mirror://pypi/r/rax_default_network_flags_python_novaclient_ext/${name}.tar.gz"; @@ -68,7 +75,9 @@ rax-default-network-flags-python-novaclient-ext = buildPythonPackage rec { }; }; os-networksv2-python-novaclient-ext = buildPythonPackage rec { - name = "os_networksv2_python_novaclient_ext-0.26"; + pname = "os_networksv2_python_novaclient_ext"; + version = "0.26"; + name = pname + "-" + version; src = fetchurl { url = "mirror://pypi/o/os_networksv2_python_novaclient_ext/${name}.tar.gz"; @@ -85,7 +94,9 @@ os-networksv2-python-novaclient-ext = buildPythonPackage rec { }; rax-scheduled-images-python-novaclient-ext = buildPythonPackage rec { - name = "rax_scheduled_images_python_novaclient_ext-0.3.1"; + pname = "rax_scheduled_images_python_novaclient_ext"; + version = "0.3.1"; + name = pname + "-" + version; src = fetchurl { url = "mirror://pypi/r/rax_scheduled_images_python_novaclient_ext/${name}.tar.gz"; @@ -102,7 +113,9 @@ rax-scheduled-images-python-novaclient-ext = buildPythonPackage rec { }; os-diskconfig-python-novaclient-ext = buildPythonPackage rec { - name = "os_diskconfig_python_novaclient_ext-0.1.3"; + pname = "os_diskconfig_python_novaclient_ext"; + version = "0.1.3"; + name = pname + "-" + version; src = fetchurl { url = "mirror://pypi/o/os_diskconfig_python_novaclient_ext/${name}.tar.gz"; @@ -120,7 +133,9 @@ os-diskconfig-python-novaclient-ext = buildPythonPackage rec { in buildPythonPackage rec { - name = "rackspace-novaclient-2.1"; + pname = "rackspace-novaclient"; + version = "2.1"; + name = pname + "-" + version; src = fetchurl { url = "mirror://pypi/r/rackspace-novaclient/${name}.tar.gz"; diff --git a/pkgs/development/python-modules/raven/default.nix b/pkgs/development/python-modules/raven/default.nix index 00bc54d844b1..e7b56cb3f350 100644 --- a/pkgs/development/python-modules/raven/default.nix +++ b/pkgs/development/python-modules/raven/default.nix @@ -1,7 +1,9 @@ { lib, buildPythonPackage, fetchurl, isPy3k, contextlib2 }: buildPythonPackage rec { - name = "raven-6.3.0"; + pname = "raven"; + version = "6.3.0"; + name = pname + "-" + version; src = fetchurl { url = "mirror://pypi/r/raven/${name}.tar.gz"; diff --git a/pkgs/development/python-modules/recursive-pth-loader/default.nix b/pkgs/development/python-modules/recursive-pth-loader/default.nix index 9a17e722679f..359b482a1682 100644 --- a/pkgs/development/python-modules/recursive-pth-loader/default.nix +++ b/pkgs/development/python-modules/recursive-pth-loader/default.nix @@ -1,7 +1,9 @@ { stdenv, python }: stdenv.mkDerivation rec { - name = "python-recursive-pth-loader-1.0"; + pname = "python-recursive-pth-loader"; + version = "1.0"; + name = pname + "-" + version; unpackPhase = "true"; diff --git a/pkgs/development/python-modules/robomachine/default.nix b/pkgs/development/python-modules/robomachine/default.nix index 1e7b020cd513..8f71bab9c250 100644 --- a/pkgs/development/python-modules/robomachine/default.nix +++ b/pkgs/development/python-modules/robomachine/default.nix @@ -1,7 +1,9 @@ { stdenv, fetchurl, buildPythonPackage, pyparsing, argparse, robotframework }: buildPythonPackage rec { - name = "robomachine-0.6"; + pname = "robomachine"; + version = "0.6"; + name = pname + "-" + version; src = fetchurl { url = "mirror://pypi/R/RoboMachine/RoboMachine-0.6.tar.gz"; diff --git a/pkgs/development/python-modules/robotframework-ride/default.nix b/pkgs/development/python-modules/robotframework-ride/default.nix index a9b536fc76ed..8bac32ba9112 100644 --- a/pkgs/development/python-modules/robotframework-ride/default.nix +++ b/pkgs/development/python-modules/robotframework-ride/default.nix @@ -2,8 +2,9 @@ buildPythonPackage rec { version = "1.2.3"; - name = "robotframework-ride-${version}"; + pname = "robotframework-ride"; disabled = isPy3k; + name = pname + "-" + version; src = fetchurl { url = "https://robotframework-ride.googlecode.com/files/${name}.tar.gz"; diff --git a/pkgs/development/python-modules/robotframework/default.nix b/pkgs/development/python-modules/robotframework/default.nix index e0a05eb2e258..6a4a88670251 100644 --- a/pkgs/development/python-modules/robotframework/default.nix +++ b/pkgs/development/python-modules/robotframework/default.nix @@ -2,8 +2,9 @@ buildPythonPackage rec { version = "3.0.2"; - name = "robotframework-${version}"; + pname = "robotframework"; disabled = isPy3k; + name = pname + "-" + version; src = fetchurl { url = "mirror://pypi/r/robotframework/${name}.tar.gz"; diff --git a/pkgs/development/python-modules/scapy/default.nix b/pkgs/development/python-modules/scapy/default.nix index 5241b632f122..6670394ac0bb 100644 --- a/pkgs/development/python-modules/scapy/default.nix +++ b/pkgs/development/python-modules/scapy/default.nix @@ -1,7 +1,9 @@ { stdenv, fetchurl, buildPythonPackage, isPy3k, isPyPy }: buildPythonPackage rec { - name = "scapy-2.2.0"; + pname = "scapy"; + version = "2.2.0"; + name = pname + "-" + version; disabled = isPy3k || isPyPy; diff --git a/pkgs/development/python-modules/selenium/default.nix b/pkgs/development/python-modules/selenium/default.nix index d33e86a3f079..6b64cd18b4fa 100644 --- a/pkgs/development/python-modules/selenium/default.nix +++ b/pkgs/development/python-modules/selenium/default.nix @@ -8,7 +8,10 @@ }: buildPythonPackage rec { - name = "selenium-3.6.0"; + pname = "selenium"; + version = "3.6.0"; + name = pname + "-" + version; + src = fetchurl { url = "mirror://pypi/s/selenium/${name}.tar.gz"; sha256 = "15qpvz0bdwjvpcj11fm0rw6r5inr66sqw89ww50l025sbhf04qwm"; @@ -47,4 +50,4 @@ buildPythonPackage rec { license = licenses.asl20; maintainers = with maintainers; [ jraygauthier ]; }; -} \ No newline at end of file +} diff --git a/pkgs/development/python-modules/seqdiag/default.nix b/pkgs/development/python-modules/seqdiag/default.nix index 98a81873a718..02d1fe08d8da 100644 --- a/pkgs/development/python-modules/seqdiag/default.nix +++ b/pkgs/development/python-modules/seqdiag/default.nix @@ -3,7 +3,9 @@ }: buildPythonPackage rec { - name = "seqdiag-0.9.4"; + pname = "seqdiag"; + version = "0.9.4"; + name = pname + "-" + version; src = fetchurl { url = "mirror://pypi/s/seqdiag/${name}.tar.gz"; diff --git a/pkgs/development/python-modules/spacy/default.nix b/pkgs/development/python-modules/spacy/default.nix index 452f3f1d9234..40df45616e93 100644 --- a/pkgs/development/python-modules/spacy/default.nix +++ b/pkgs/development/python-modules/spacy/default.nix @@ -4,7 +4,7 @@ , python , fetchPypi , fetchFromGitHub -, pytest +, pytest , cython , cymem , preshed @@ -28,20 +28,21 @@ let version = "2017.04.05"; src = fetchPypi { - inherit pname version; + inherit pname version; sha256 = "0c95gf3jzz8mv52lkgq0h7sbasjwvdhghm4s0phmy5k9sr78f4fq"; }; }; in buildPythonPackage rec { - name = "spacy-${version}"; + pname = "spacy"; version = "1.8.2"; + name = pname + "-" + version; src = fetchFromGitHub { owner = "explosion"; repo = "spaCy"; rev = "v${version}"; - sha256 = "0v3bmmar31a6968y4wl0lmgnc3829l2mnwd8s959m4pqw1y1w648"; - }; + sha256 = "0v3bmmar31a6968y4wl0lmgnc3829l2mnwd8s959m4pqw1y1w648"; + }; propagatedBuildInputs = [ cython @@ -65,8 +66,8 @@ in buildPythonPackage rec { doCheck = false; # checkPhase = '' # ${python.interpreter} -m pytest spacy/tests --vectors --models --slow - # ''; - + # ''; + meta = with stdenv.lib; { description = "Industrial-strength Natural Language Processing (NLP) with Python and Cython"; homepage = https://github.com/explosion/spaCy; diff --git a/pkgs/development/python-modules/sphfile/default.nix b/pkgs/development/python-modules/sphfile/default.nix index 8c2351c981e9..189fa7c932da 100644 --- a/pkgs/development/python-modules/sphfile/default.nix +++ b/pkgs/development/python-modules/sphfile/default.nix @@ -1,8 +1,9 @@ { lib, fetchurl, buildPythonPackage, numpy }: buildPythonPackage rec { - name = "sphfile-${version}"; + pname = "sphfile"; version = "1.0.0"; + name = pname + "-" + version; src = fetchurl { url = "mirror://pypi/s/sphfile/${name}.tar.gz"; diff --git a/pkgs/development/python-modules/spotipy/default.nix b/pkgs/development/python-modules/spotipy/default.nix index ec73485193a5..c14b3cd770bb 100644 --- a/pkgs/development/python-modules/spotipy/default.nix +++ b/pkgs/development/python-modules/spotipy/default.nix @@ -2,8 +2,8 @@ buildPythonPackage rec { pname = "spotipy"; - name = "spotipy-${version}"; version = "2.4.4"; + name = pname + "-" + version; src = fetchPypi { inherit pname version; diff --git a/pkgs/development/python-modules/sybase/default.nix b/pkgs/development/python-modules/sybase/default.nix index df27172d8d49..51c80e0fa910 100644 --- a/pkgs/development/python-modules/sybase/default.nix +++ b/pkgs/development/python-modules/sybase/default.nix @@ -6,8 +6,9 @@ }: buildPythonPackage rec { - name = "python-sybase-${version}"; + pname = "python-sybase"; version = "0.40pre2"; + name = pname + "-" + version; disabled = isPy3k; src = fetchurl { diff --git a/pkgs/development/python-modules/systemd/default.nix b/pkgs/development/python-modules/systemd/default.nix index 4786e7eb7e18..ec5b3b325dd2 100644 --- a/pkgs/development/python-modules/systemd/default.nix +++ b/pkgs/development/python-modules/systemd/default.nix @@ -1,8 +1,9 @@ { stdenv, buildPythonPackage, fetchFromGitHub, systemd, pkgconfig }: buildPythonPackage rec { - name = "python-systemd-${version}"; + pname = "systemd"; version = "234"; + name = pname + "-" + version; src = fetchFromGitHub { owner = "systemd"; diff --git a/pkgs/development/python-modules/tensorflow/default.nix b/pkgs/development/python-modules/tensorflow/default.nix index 2ce419fa7fb6..63630c1e1463 100644 --- a/pkgs/development/python-modules/tensorflow/default.nix +++ b/pkgs/development/python-modules/tensorflow/default.nix @@ -97,6 +97,8 @@ let }; in buildPythonPackage (common // { + pname = "tensorflow"; + version = common.version; name = "tensorflow-${common.version}"; deps = stdenv.mkDerivation (common // { diff --git a/pkgs/development/python-modules/thinc/default.nix b/pkgs/development/python-modules/thinc/default.nix index 817ea6388f95..15794caf58b9 100644 --- a/pkgs/development/python-modules/thinc/default.nix +++ b/pkgs/development/python-modules/thinc/default.nix @@ -30,21 +30,22 @@ let version = "1.0.1"; src = fetchPypi { - inherit pname version; + inherit pname version; sha256 = "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39"; }; doCheck = false; # fails to import support from test }; in buildPythonPackage rec { - name = "thinc-${version}"; + pname = "thinc"; version = "6.5.1"; + name = pname + "-" + version; src = fetchFromGitHub { owner = "explosion"; repo = "thinc"; rev = "v${version}"; - sha256 = "008kmjsvanh6qgnpvsn3qacfcyprxirxbw4yfd8flyg7mxw793ws"; + sha256 = "008kmjsvanh6qgnpvsn3qacfcyprxirxbw4yfd8flyg7mxw793ws"; }; propagatedBuildInputs = [ @@ -67,14 +68,14 @@ in buildPythonPackage rec { ]; doCheck = false; - + # fails to import some modules # checkPhase = '' # ${python.interpreter} -m pytest thinc/tests # # cd thinc/tests # # ${python.interpreter} -m unittest discover -p "*test*" # ''; - + meta = with stdenv.lib; { description = "Practical Machine Learning for NLP in Python"; homepage = https://github.com/explosion/thinc; diff --git a/pkgs/development/python-modules/u-msgpack-python/default.nix b/pkgs/development/python-modules/u-msgpack-python/default.nix index aca4e370e461..bab0bc288502 100644 --- a/pkgs/development/python-modules/u-msgpack-python/default.nix +++ b/pkgs/development/python-modules/u-msgpack-python/default.nix @@ -5,10 +5,9 @@ , python }: -let +buildPythonPackage rec { pname = "u-msgpack-python"; version = "2.4.1"; -in buildPythonPackage rec { name = "${pname}-${version}"; src = fetchurl { diff --git a/pkgs/development/python-modules/umemcache/default.nix b/pkgs/development/python-modules/umemcache/default.nix index 4d09fda83da4..416c857bdc68 100644 --- a/pkgs/development/python-modules/umemcache/default.nix +++ b/pkgs/development/python-modules/umemcache/default.nix @@ -1,9 +1,10 @@ { stdenv, buildPythonPackage, isPy3k, fetchurl }: buildPythonPackage rec { - name = "umemcache-${version}"; + pname = "umemcache"; version = "1.6.3"; disabled = isPy3k; + name = pname + "-" + version; src = fetchurl { url = "mirror://pypi/u/umemcache/${name}.zip"; diff --git a/pkgs/development/python-modules/uritools/default.nix b/pkgs/development/python-modules/uritools/default.nix index 99b648b0ee1f..108a7cf5bb0b 100644 --- a/pkgs/development/python-modules/uritools/default.nix +++ b/pkgs/development/python-modules/uritools/default.nix @@ -2,8 +2,8 @@ buildPythonPackage rec { pname = "uritools"; - name = "uritools-${version}"; version = "2.1.0"; + name = pname + "-" + version; src = fetchPypi { inherit pname version; diff --git a/pkgs/development/python-modules/usbtmc/default.nix b/pkgs/development/python-modules/usbtmc/default.nix index 0c6842749073..bcbaa0b728c3 100644 --- a/pkgs/development/python-modules/usbtmc/default.nix +++ b/pkgs/development/python-modules/usbtmc/default.nix @@ -1,8 +1,9 @@ { stdenv, fetchurl, buildPythonPackage, pyusb }: buildPythonPackage rec { - name = "usbtmc-${version}"; + pname = "usbtmc"; version = "0.8"; + name = pname + "-" + version; src = fetchurl { url = "https://github.com/python-ivi/python-usbtmc/archive/v${version}.tar.gz"; diff --git a/pkgs/development/python-modules/waitress-django/default.nix b/pkgs/development/python-modules/waitress-django/default.nix index 6efaf800b3cd..421995e3792a 100644 --- a/pkgs/development/python-modules/waitress-django/default.nix +++ b/pkgs/development/python-modules/waitress-django/default.nix @@ -1,6 +1,10 @@ { buildPythonPackage, django_1_8, waitress }: -buildPythonPackage { - name = "waitress-django"; + +buildPythonPackage rec { + pname = "waitress-django"; + version = "0.0.0"; + name = pname; + src = ./.; pythonPath = [ django_1_8 waitress ]; doCheck = false; diff --git a/pkgs/development/python-modules/webencodings/default.nix b/pkgs/development/python-modules/webencodings/default.nix index 834a0ab07fbf..edd0a364ea14 100644 --- a/pkgs/development/python-modules/webencodings/default.nix +++ b/pkgs/development/python-modules/webencodings/default.nix @@ -4,10 +4,9 @@ , pytest }: -let +buildPythonPackage rec { pname = "webencodings"; version = "0.5.1"; -in buildPythonPackage rec { name = "${pname}-${version}"; src = fetchurl { @@ -26,4 +25,4 @@ in buildPythonPackage rec { homepage = https://github.com/SimonSapin/python-webencodings; license = lib.licenses.bsd3; }; -} \ No newline at end of file +} diff --git a/pkgs/development/python-modules/wxPython/3.0.nix b/pkgs/development/python-modules/wxPython/3.0.nix index 14f6f802ba2a..ab7b44019c54 100644 --- a/pkgs/development/python-modules/wxPython/3.0.nix +++ b/pkgs/development/python-modules/wxPython/3.0.nix @@ -19,8 +19,9 @@ assert wxGTK.unicode; buildPythonPackage rec { - name = "wxPython-${version}"; + pname = "wxPython"; version = "3.0.2.0"; + name = pname + "-" + version; disabled = isPy3k || isPyPy; doCheck = false; diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index aff5229ddd15..1a04ee6db449 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -10464,22 +10464,7 @@ in { fuse = pkgs.fuse; # use "real" fuse, not the python module }; - locustio = buildPythonPackage rec { - name = "locustio-0.7.2"; - - src = pkgs.fetchurl { - url = "mirror://pypi/l/locustio/${name}.tar.gz"; - sha256 = "c9ca6fdfe6a6fb187a3d54ddf9b1518196348e8f20537f0a14ca81a264ffafa2"; - }; - - propagatedBuildInputs = [ self.msgpack self.requests self.flask self.gevent self.pyzmq ]; - buildInputs = [ self.mock self.unittest2 ]; - - meta = { - homepage = http://locust.io/; - description = "A load testing tool"; - }; - }; + locustio = callPackage ../development/python-modules/locustio { }; llvmlite = callPackage ../development/python-modules/llvmlite {llvm=pkgs.llvm_4;}; @@ -14881,31 +14866,13 @@ in { psd-tools = callPackage ../development/python-modules/psd-tools { }; - psutil = buildPythonPackage rec { - name = "psutil-${version}"; - version = "4.3.0"; + psutil = callPackage ../development/python-modules/psutil { }; - src = pkgs.fetchurl { - url = "mirror://pypi/p/psutil/${name}.tar.gz"; - sha256 = "1w4r09fvn6kd80m5mx4ws1wz100brkaq6hzzpwrns8cgjzjpl6c6"; - }; - - # Certain tests fail due to being in a chroot. - # See also the older issue: https://code.google.com/p/psutil/issues/detail?id=434 - doCheck = false; - - buildInputs = with self; [ mock ] ++ optionals stdenv.isDarwin [ pkgs.darwin.IOKit ]; - - meta = { - description = "Process and system utilization information interface for python"; - homepage = https://github.com/giampaolo/psutil; - }; - }; - - psutil_1 = self.psutil.overrideDerivation (self: rec { - name = "psutil-1.2.1"; - src = pkgs.fetchurl { - url = "mirror://pypi/p/psutil/${name}.tar.gz"; + psutil_1 = self.psutil.overrideAttrs (oldAttrs: rec { + name = "${oldAttrs.pname}-${version}"; + version = "1.2.1"; + src = oldAttrs.src.override { + inherit version; sha256 = "0ibclqy6a4qmkjhlk3g8jhpvnk0v9aywknc61xm3hfi5r124m3jh"; }; });