From c9b960cdffa19e4e03daf90a3d9a7f93a171e640 Mon Sep 17 00:00:00 2001 From: Chris Ostrouchov Date: Mon, 15 Oct 2018 15:55:39 -0400 Subject: [PATCH] pythonPackages.fudge: refactor move to python-modules --- .../python-modules/fudge/default.nix | 34 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 27 ++++----------- 2 files changed, 41 insertions(+), 20 deletions(-) create mode 100644 pkgs/development/python-modules/fudge/default.nix diff --git a/pkgs/development/python-modules/fudge/default.nix b/pkgs/development/python-modules/fudge/default.nix new file mode 100644 index 000000000000..0f6d10c3c523 --- /dev/null +++ b/pkgs/development/python-modules/fudge/default.nix @@ -0,0 +1,34 @@ +{ stdenv +, buildPythonPackage +, fetchPypi +, nose +, nosejs +, sphinx +, isPy3k +}: + +buildPythonPackage rec { + pname = "fudge"; + version = "1.1.0"; + disabled = isPy3k; + + src = fetchPypi { + inherit pname version; + sha256 = "eba59a926fa1df1ab6dddd69a7a8af21865b16cad800cb4d1af75070b0f52afb"; + }; + + buildInputs = [ nose nosejs ]; + propagatedBuildInputs = [ sphinx ]; + + checkPhase = '' + nosetests -v + ''; + + meta = with stdenv.lib; { + homepage = https://github.com/fudge-py/fudge; + description = "Replace real objects with fakes (mocks, stubs, etc) while testing"; + license = licenses.mit; + maintainers = [ maintainers.costrouc ]; + }; + +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 107d5d58b98b..4b46925285b0 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -1784,30 +1784,17 @@ in { ftputil = callPackage ../development/python-modules/ftputil { }; - fudge = buildPythonPackage rec { - name = "fudge-1.1.0"; - src = pkgs.fetchurl { - url = "mirror://pypi/f/fudge/${name}.tar.gz"; - sha256 = "eba59a926fa1df1ab6dddd69a7a8af21865b16cad800cb4d1af75070b0f52afb"; - }; - buildInputs = with self; [ nose nosejs ]; - propagatedBuildInputs = with self; [ sphinx ]; + fudge = callPackage ../development/python-modules/fudge { }; - disabled = isPy3k; + fudge_9 = self.fudge.overridePythonAttrs (old: rec { + version = "0.9.6"; - checkPhase = '' - nosetests -v - ''; - }; - - fudge_9 = self.fudge.override rec { - name = "fudge-0.9.6"; - src = pkgs.fetchurl { - url = "mirror://pypi/f/fudge/${name}.tar.gz"; + src = fetchPypi { + pname = "fudge"; + inherit version; sha256 = "34690c4692e8717f4d6a2ab7d841070c93c8d0ea0d2615b47064e291f750b1a0"; }; - }; - + }); funcparserlib = buildPythonPackage rec { name = "funcparserlib-0.3.6";