From a80b2e35432cd1ee798fc9e02a18fda62b01d270 Mon Sep 17 00:00:00 2001 From: Chris Ostrouchov Date: Mon, 29 Oct 2018 15:02:22 -0400 Subject: [PATCH] pythonPackages.importmagic: refactor move to python-modules --- .../python-modules/importmagic/default.nix | 26 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 20 +------------- 2 files changed, 27 insertions(+), 19 deletions(-) create mode 100644 pkgs/development/python-modules/importmagic/default.nix diff --git a/pkgs/development/python-modules/importmagic/default.nix b/pkgs/development/python-modules/importmagic/default.nix new file mode 100644 index 000000000000..c708343818f8 --- /dev/null +++ b/pkgs/development/python-modules/importmagic/default.nix @@ -0,0 +1,26 @@ +{ stdenv +, buildPythonPackage +, fetchPypi +, six +}: + +buildPythonPackage rec { + pname = "importmagic"; + version = "0.1.3"; + + src = fetchPypi { + inherit pname version; + sha256 = "194bl8l8sc2ibwi6g5kz6xydkbngdqpaj6r2gcsaw1fc73iswwrj"; + }; + + propagatedBuildInputs = [ six ]; + + doCheck = false; # missing json file from tarball + + meta = with stdenv.lib; { + description = "Python Import Magic - automagically add, remove and manage imports"; + homepage = https://github.com/alecthomas/importmagic; + license = licenses.bsd0; + }; + +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index ebaa54a5049a..ca57d9371fd1 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -4479,25 +4479,7 @@ in { willow = callPackage ../development/python-modules/willow { }; - importmagic = buildPythonPackage rec { - simpleName = "importmagic"; - name = "${simpleName}-${version}"; - version = "0.1.3"; - doCheck = false; # missing json file from tarball - - src = pkgs.fetchurl { - url = "mirror://pypi/i/${simpleName}/${name}.tar.gz"; - sha256 = "194bl8l8sc2ibwi6g5kz6xydkbngdqpaj6r2gcsaw1fc73iswwrj"; - }; - - propagatedBuildInputs = with self; [ six ]; - - meta = { - description = "Python Import Magic - automagically add, remove and manage imports"; - homepage = https://github.com/alecthomas/importmagic; - license = "bsd"; - }; - }; + importmagic = callPackage ../development/python-modules/importmagic { }; xgboost = callPackage ../development/python-modules/xgboost { xgboost = pkgs.xgboost;