From 1c69fccc81d55ab134aeb61b277506321ee3808a Mon Sep 17 00:00:00 2001 From: Elis Hirwing Date: Sat, 31 Mar 2018 21:11:37 +0200 Subject: [PATCH] pythonPackages.pycontracts: Move to own file --- .../python-modules/pycontracts/default.nix | 21 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 20 +----------------- 2 files changed, 22 insertions(+), 19 deletions(-) create mode 100644 pkgs/development/python-modules/pycontracts/default.nix diff --git a/pkgs/development/python-modules/pycontracts/default.nix b/pkgs/development/python-modules/pycontracts/default.nix new file mode 100644 index 000000000000..bd933b872ab5 --- /dev/null +++ b/pkgs/development/python-modules/pycontracts/default.nix @@ -0,0 +1,21 @@ +{ stdenv, buildPythonPackage, fetchPypi +, nose, pyparsing, decorator, six }: + +buildPythonPackage rec { + pname = "PyContracts"; + version = "1.7.9"; + + src = fetchPypi { + inherit pname version; + sha256 = "0rdc9pz08885vqkazjc3lyrrghmf3jzxnlsgpn8akl808x1qrfqf"; + }; + + buildInputs = [ nose ]; + propagatedBuildInputs = [ pyparsing decorator six ]; + + meta = with stdenv.lib; { + description = "Allows to declare constraints on function parameters and return values"; + homepage = https://pypi.python.org/pypi/PyContracts; + license = licenses.lgpl2; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index c76d963fe930..7605f7fe028b 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -1840,25 +1840,7 @@ in { pycollada = callPackage ../development/python-modules/pycollada { }; - pycontracts = buildPythonPackage rec { - version = "1.7.9"; - name = "PyContracts-${version}"; - - src = pkgs.fetchurl { - url = "mirror://pypi/P/PyContracts/${name}.tar.gz"; - sha256 = "0rdc9pz08885vqkazjc3lyrrghmf3jzxnlsgpn8akl808x1qrfqf"; - }; - - buildInputs = with self; [ nose ]; - - propagatedBuildInputs = with self; [ pyparsing decorator six ]; - - meta = { - description = "Allows to declare constraints on function parameters and return values"; - homepage = https://pypi.python.org/pypi/PyContracts; - license = licenses.lgpl2; - }; - }; + pycontracts = callPackage ../development/python-modules/pycontracts { }; pycparser = buildPythonPackage rec { name = "pycparser-${version}";