diff --git a/pkgs/development/python-modules/cddb/default.nix b/pkgs/development/python-modules/cddb/default.nix index f40ff08fcf42..86c6e8b0d80a 100644 --- a/pkgs/development/python-modules/cddb/default.nix +++ b/pkgs/development/python-modules/cddb/default.nix @@ -5,13 +5,14 @@ }: buildPythonPackage rec { - name = "CDDB-1.4"; + pname = "CDDB"; + version = "1.4"; disabled = isPy3k; buildInputs = stdenv.lib.optionals stdenv.isDarwin [ pkgs.darwin.apple_sdk.frameworks.IOKit ]; src = pkgs.fetchurl { - url = "http://cddb-py.sourceforge.net/${name}.tar.gz"; + url = "http://cddb-py.sourceforge.net/${pname}-${version}.tar.gz"; sha256 = "098xhd575ibvdx7i3dny3lwi851yxhjg2hn5jbbgrwj833rg5l5w"; }; diff --git a/pkgs/development/python-modules/deskcon/default.nix b/pkgs/development/python-modules/deskcon/default.nix index 2e205ce69557..218f843e11a8 100644 --- a/pkgs/development/python-modules/deskcon/default.nix +++ b/pkgs/development/python-modules/deskcon/default.nix @@ -7,7 +7,8 @@ }: buildPythonPackage { - name = "deskcon-0.3"; + pname = "deskcon"; + version = "0.3"; disabled = isPy3k; src = pkgs.fetchFromGitHub { diff --git a/pkgs/development/python-modules/gateone/default.nix b/pkgs/development/python-modules/gateone/default.nix index 7a6aa659acec..372cdae8c233 100644 --- a/pkgs/development/python-modules/gateone/default.nix +++ b/pkgs/development/python-modules/gateone/default.nix @@ -8,7 +8,8 @@ }: buildPythonPackage { - name = "gateone-1.2-0d57c3"; + pname = "gateone"; + version = "1.2-0d57c3"; disabled = isPy3k; src = pkgs.fetchFromGitHub { diff --git a/pkgs/development/python-modules/mutag/default.nix b/pkgs/development/python-modules/mutag/default.nix index 0d5d8d75a368..5dd34fef112f 100644 --- a/pkgs/development/python-modules/mutag/default.nix +++ b/pkgs/development/python-modules/mutag/default.nix @@ -6,7 +6,8 @@ }: buildPythonPackage { - name = "mutag-0.0.2-2ffa0258ca"; + pname = "mutag"; + version = "0.0.2-2ffa0258ca"; disabled = ! isPy3k; src = fetchgit { diff --git a/pkgs/development/python-modules/notmuch/default.nix b/pkgs/development/python-modules/notmuch/default.nix index 567977a84f54..5d5a85b6fdd8 100644 --- a/pkgs/development/python-modules/notmuch/default.nix +++ b/pkgs/development/python-modules/notmuch/default.nix @@ -1,20 +1,18 @@ { stdenv , buildPythonPackage -, pkgs +, notmuch , python }: buildPythonPackage { - name = "python-${pkgs.notmuch.name}"; + inherit (notmuch) pname version src; - src = pkgs.notmuch.src; + sourceRoot = notmuch.pythonSourceRoot; - sourceRoot = pkgs.notmuch.pythonSourceRoot; - - buildInputs = [ python pkgs.notmuch ]; + buildInputs = [ python notmuch ]; postPatch = '' - sed -i -e '/CDLL/s@"libnotmuch\.@"${pkgs.notmuch}/lib/libnotmuch.@' \ + sed -i -e '/CDLL/s@"libnotmuch\.@"${notmuch}/lib/libnotmuch.@' \ notmuch/globals.py ''; diff --git a/pkgs/development/python-modules/slob/default.nix b/pkgs/development/python-modules/slob/default.nix index 8a6971ceb8f8..48400f910c4f 100644 --- a/pkgs/development/python-modules/slob/default.nix +++ b/pkgs/development/python-modules/slob/default.nix @@ -7,8 +7,8 @@ }: buildPythonPackage { - name = "slob"; - verison = "unstable-2016-11-03"; + pname = "slob"; + version = "unstable-2016-11-03"; disabled = !isPy3k; src = fetchFromGitHub { diff --git a/pkgs/development/python-modules/tkinter/default.nix b/pkgs/development/python-modules/tkinter/default.nix index ba910f75e199..1efebed98721 100644 --- a/pkgs/development/python-modules/tkinter/default.nix +++ b/pkgs/development/python-modules/tkinter/default.nix @@ -6,7 +6,8 @@ }: buildPythonPackage { - name = "tkinter-${python.version}"; + pname = "tkinter"; + version = python.version; src = py; format = "other"; diff --git a/pkgs/misc/frescobaldi/default.nix b/pkgs/misc/frescobaldi/default.nix index abf4970c616d..d89fa3760a95 100644 --- a/pkgs/misc/frescobaldi/default.nix +++ b/pkgs/misc/frescobaldi/default.nix @@ -1,7 +1,7 @@ { lib, buildPythonApplication, fetchFromGitHub, python3Packages, pyqtwebengine, lilypond }: buildPythonApplication rec { - name = "frescobaldi-${version}"; + pname = "frescobaldi"; version = "3.1.1"; src = fetchFromGitHub { diff --git a/pkgs/os-specific/linux/bcc/default.nix b/pkgs/os-specific/linux/bcc/default.nix index 949d953c3bd5..585ab6ec7253 100644 --- a/pkgs/os-specific/linux/bcc/default.nix +++ b/pkgs/os-specific/linux/bcc/default.nix @@ -4,8 +4,8 @@ }: python.pkgs.buildPythonApplication rec { + pname = "bcc"; version = "0.13.0"; - name = "bcc-${version}"; src = fetchurl { url = "https://github.com/iovisor/bcc/releases/download/v${version}/bcc-src-with-submodule.tar.gz"; diff --git a/pkgs/servers/amqp/qpid-cpp/default.nix b/pkgs/servers/amqp/qpid-cpp/default.nix index 02c2e03d90fa..4eb56ee4ae20 100644 --- a/pkgs/servers/amqp/qpid-cpp/default.nix +++ b/pkgs/servers/amqp/qpid-cpp/default.nix @@ -1,7 +1,8 @@ { stdenv, fetchurl, cmake, python2, boost, libuuid, ruby, buildEnv, buildPythonPackage, qpid-python }: let - name = "qpid-cpp-${version}"; + pname = "qpid-cpp"; + name = "${pname}-${version}"; version = "1.39.0"; src = fetchurl { @@ -20,7 +21,7 @@ let }; qpid-cpp = stdenv.mkDerivation { - inherit src meta name; + inherit src meta pname version; nativeBuildInputs = [ cmake ]; buildInputs = [ boost libuuid ruby python2 ]; @@ -46,7 +47,7 @@ let }; python-frontend = buildPythonPackage { - inherit name meta src; + inherit pname version meta src; sourceRoot = "${name}/management/python"; diff --git a/pkgs/servers/headphones/default.nix b/pkgs/servers/headphones/default.nix index aab651d5a4a5..7259104d145f 100644 --- a/pkgs/servers/headphones/default.nix +++ b/pkgs/servers/headphones/default.nix @@ -1,7 +1,7 @@ { stdenv, fetchFromGitHub, python2, makeWrapper }: python2.pkgs.buildPythonApplication rec { - name = "headphones-${version}"; + pname = "headphones"; version = "0.5.19"; src = fetchFromGitHub { diff --git a/pkgs/servers/http/hyp/default.nix b/pkgs/servers/http/hyp/default.nix index 3a1eb50f05be..c34959f9d047 100644 --- a/pkgs/servers/http/hyp/default.nix +++ b/pkgs/servers/http/hyp/default.nix @@ -1,11 +1,11 @@ { stdenv, fetchurl, python3Packages }: python3Packages.buildPythonPackage rec { - name = "hyp-server-${version}"; + pname = "hyp-server"; version = "1.2.0"; - src = fetchurl { - url = "mirror://pypi/h/hyp-server/${name}.tar.gz"; + src = python3Packages.fetchPypi { + inherit pname version; sha256 = "1lafjdcn9nnq6xc3hhyizfwh6l69lc7rixn6dx65aq71c913jc15"; }; diff --git a/pkgs/servers/sickbeard/sickrage.nix b/pkgs/servers/sickbeard/sickrage.nix index cbde11e3dc0c..1a187dffd23e 100644 --- a/pkgs/servers/sickbeard/sickrage.nix +++ b/pkgs/servers/sickbeard/sickrage.nix @@ -1,7 +1,7 @@ { stdenv, fetchFromGitHub, python2, makeWrapper }: python2.pkgs.buildPythonApplication rec { - name = "sickrage-${version}"; + pname = "sickrage"; version = "v2018.07.21-1"; src = fetchFromGitHub { diff --git a/pkgs/tools/X11/arandr/default.nix b/pkgs/tools/X11/arandr/default.nix index 51f2f5ec2494..3fffd1dbc1a0 100644 --- a/pkgs/tools/X11/arandr/default.nix +++ b/pkgs/tools/X11/arandr/default.nix @@ -5,8 +5,11 @@ let inherit (python3Packages) buildPythonApplication docutils pygobject3; + pname = "arandr"; + version = "0.1.10"; + name = "${pname}-${version}"; in buildPythonApplication rec { - name = "arandr-0.1.10"; + inherit pname version; src = fetchurl { url = "https://christian.amsuess.com/tools/arandr/files/${name}.tar.gz"; diff --git a/pkgs/tools/misc/mimeo/default.nix b/pkgs/tools/misc/mimeo/default.nix index ea596a942137..64cad47b5408 100644 --- a/pkgs/tools/misc/mimeo/default.nix +++ b/pkgs/tools/misc/mimeo/default.nix @@ -1,11 +1,11 @@ { stdenv, fetchurl, desktop-file-utils, file, python3Packages }: python3Packages.buildPythonApplication rec { - name = "mimeo-${version}"; + pname = "mimeo"; version = "2019.7"; src = fetchurl { - url = "https://xyne.archlinux.ca/projects/mimeo/src/${name}.tar.xz"; + url = "https://xyne.archlinux.ca/projects/mimeo/src/${pname}-${version}.tar.xz"; sha256 = "0nzn7qvmpbb17d6q16llnhz1qdmyg718q59ic4gw2rq23cd6q47r"; }; diff --git a/pkgs/tools/misc/trash-cli/default.nix b/pkgs/tools/misc/trash-cli/default.nix index ac8feaef2758..7fcd3176c7e9 100644 --- a/pkgs/tools/misc/trash-cli/default.nix +++ b/pkgs/tools/misc/trash-cli/default.nix @@ -2,9 +2,8 @@ , python3Packages, substituteAll }: python3Packages.buildPythonApplication rec { - name = "trash-cli-${version}"; + pname = "trash-cli"; version = "0.17.1.14"; - namePrefix = ""; src = fetchFromGitHub { owner = "andreafrancia"; diff --git a/pkgs/tools/misc/unicode/default.nix b/pkgs/tools/misc/unicode/default.nix index 9ace1f137b82..94289f0d9b72 100644 --- a/pkgs/tools/misc/unicode/default.nix +++ b/pkgs/tools/misc/unicode/default.nix @@ -1,7 +1,7 @@ { stdenv, fetchFromGitHub, fetchurl, python3Packages }: python3Packages.buildPythonApplication rec { - name = "unicode-${version}"; + pname = "unicode"; version = "2.6"; src = fetchFromGitHub { diff --git a/pkgs/tools/security/chipsec/default.nix b/pkgs/tools/security/chipsec/default.nix index 7d7456309899..f528cb800ea5 100644 --- a/pkgs/tools/security/chipsec/default.nix +++ b/pkgs/tools/security/chipsec/default.nix @@ -1,7 +1,7 @@ { stdenv, lib, fetchFromGitHub, pythonPackages, nasm, libelf , kernel ? null, withDriver ? false }: pythonPackages.buildPythonApplication rec { - name = "chipsec-${version}"; + pname = "chipsec"; version = "1.4.7"; src = fetchFromGitHub { diff --git a/pkgs/tools/security/knockknock/default.nix b/pkgs/tools/security/knockknock/default.nix index ce7663b18cf9..9478bb4ca237 100644 --- a/pkgs/tools/security/knockknock/default.nix +++ b/pkgs/tools/security/knockknock/default.nix @@ -1,8 +1,9 @@ { stdenv, fetchFromGitHub, python2Packages, hping }: - -python2Packages.buildPythonApplication rec { +let rev = "bf14bbff"; - name = "knockknock-r${rev}"; +in python2Packages.buildPythonApplication rec { + pname = "knockknock-r"; + version = rev; src = fetchFromGitHub { inherit rev; diff --git a/pkgs/tools/security/sshuttle/default.nix b/pkgs/tools/security/sshuttle/default.nix index 0e0e8c7ad753..0ec98ec1cf22 100644 --- a/pkgs/tools/security/sshuttle/default.nix +++ b/pkgs/tools/security/sshuttle/default.nix @@ -2,12 +2,12 @@ , coreutils, iptables, nettools, openssh, procps }: python3Packages.buildPythonApplication rec { - name = "sshuttle-${version}"; + pname = "sshuttle"; version = "0.78.5"; - src = fetchurl { + src = python3Packages.fetchPypi { + inherit pname version; sha256 = "0vp13xwrhx4m6zgsyzvai84lkq9mzkaw47j58dk0ll95kaymk2x8"; - url = "mirror://pypi/s/sshuttle/${name}.tar.gz"; }; patches = [ ./sudo.patch ]; diff --git a/pkgs/tools/typesetting/rubber/default.nix b/pkgs/tools/typesetting/rubber/default.nix index 21d83dd1dd06..a045a9810b99 100644 --- a/pkgs/tools/typesetting/rubber/default.nix +++ b/pkgs/tools/typesetting/rubber/default.nix @@ -1,11 +1,11 @@ { fetchurl, stdenv, python3Packages, texinfo }: python3Packages.buildPythonApplication rec { - name = "rubber-${version}"; + pname = "rubber"; version = "1.5.1"; src = fetchurl { - url = "https://launchpad.net/rubber/trunk/${version}/+download/${name}.tar.gz"; + url = "https://launchpad.net/rubber/trunk/${version}/+download/${pname}-${version}.tar.gz"; sha256 = "178dmrp0mza5gqjiqgk6dqs0c10s0c517pk6k9pjbam86vf47a1p"; }; diff --git a/pkgs/tools/video/vnc2flv/default.nix b/pkgs/tools/video/vnc2flv/default.nix index 561c8cf7d78f..52d3e34f347b 100644 --- a/pkgs/tools/video/vnc2flv/default.nix +++ b/pkgs/tools/video/vnc2flv/default.nix @@ -1,11 +1,11 @@ { stdenv, fetchurl, pythonPackages }: pythonPackages.buildPythonApplication rec { - name = "vnc2flv-20100207"; - namePrefix = ""; + pname = "vnc2flv"; + version = "20100207"; src = fetchurl { - url = "mirror://pypi/v/vnc2flv/${name}.tar.gz"; + url = "mirror://pypi/v/vnc2flv/${pname}-${version}.tar.gz"; sha256 = "14d4nm8yim0bm0nd3wyj7z4zdsg5zk3d9bhhvwdc36x03r8d0sbq"; }; diff --git a/pkgs/tools/virtualization/euca2ools/default.nix b/pkgs/tools/virtualization/euca2ools/default.nix index cb31a66ea72d..0f00a3606d3c 100644 --- a/pkgs/tools/virtualization/euca2ools/default.nix +++ b/pkgs/tools/virtualization/euca2ools/default.nix @@ -3,8 +3,8 @@ let inherit (python2Packages) buildPythonApplication boto m2crypto; in buildPythonApplication { - name = "euca2ools-2.1.4"; - namePrefix = ""; + pname = "euca2ools"; + version = "2.1.4"; src = fetchgit { url = https://github.com/eucalyptus/euca2ools.git; diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 8bfd0ccbc5de..bc36f8cd2e22 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -4590,7 +4590,9 @@ in { notify2 = callPackage ../development/python-modules/notify2 {}; - notmuch = callPackage ../development/python-modules/notmuch { }; + notmuch = callPackage ../development/python-modules/notmuch { + inherit (pkgs) notmuch; + }; emoji = callPackage ../development/python-modules/emoji { };