From d40edcb9113702c244a06079238c5f62316f57a3 Mon Sep 17 00:00:00 2001 From: Chris Ostrouchov Date: Tue, 16 Oct 2018 10:37:57 -0400 Subject: [PATCH] pythonPackages.pex: refactor move to python-modules --- .../python-modules/pex/default.nix | 29 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 25 +--------------- 2 files changed, 30 insertions(+), 24 deletions(-) create mode 100644 pkgs/development/python-modules/pex/default.nix diff --git a/pkgs/development/python-modules/pex/default.nix b/pkgs/development/python-modules/pex/default.nix new file mode 100644 index 000000000000..f7efec5c70ef --- /dev/null +++ b/pkgs/development/python-modules/pex/default.nix @@ -0,0 +1,29 @@ +{ stdenv +, buildPythonPackage +, fetchPypi +}: + +buildPythonPackage rec { + pname = "pex"; + version = "1.2.7"; + + src = fetchPypi { + inherit pname version; + sha256 = "1m0gx9182w1dybkyjwwjyd6i87x2dzv252ks2fj8yn6avlcp5z4q"; + }; + + prePatch = '' + substituteInPlace setup.py --replace 'SETUPTOOLS_REQUIREMENT,' '"setuptools"' + ''; + + # A few more dependencies I don't want to handle right now... + doCheck = false; + + meta = with stdenv.lib; { + description = "A library and tool for generating .pex (Python EXecutable) files"; + homepage = "https://github.com/pantsbuild/pex"; + license = licenses.asl20; + maintainers = with maintainers; [ copumpkin ]; + }; + +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index ba74e4708660..cd655aa83b39 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -2025,30 +2025,7 @@ in { peppercorn = callPackage ../development/python-modules/peppercorn { }; - pex = buildPythonPackage rec { - name = "pex-${version}"; - version = "1.2.7"; - - src = self.fetchPypi { - pname = "pex"; - sha256 = "1m0gx9182w1dybkyjwwjyd6i87x2dzv252ks2fj8yn6avlcp5z4q"; - inherit version; - }; - - prePatch = '' - substituteInPlace setup.py --replace 'SETUPTOOLS_REQUIREMENT,' '"setuptools"' - ''; - - # A few more dependencies I don't want to handle right now... - doCheck = false; - - meta = { - description = "A library and tool for generating .pex (Python EXecutable) files"; - homepage = "https://github.com/pantsbuild/pex"; - license = licenses.asl20; - maintainers = with maintainers; [ copumpkin ]; - }; - }; + pex = callPackage ../development/python-modules/pex { }; phe = callPackage ../development/python-modules/phe { };