From 74472620cea29ee372e81200d64117d0e14619ae Mon Sep 17 00:00:00 2001 From: Chris Ostrouchov Date: Mon, 15 Oct 2018 23:37:11 -0400 Subject: [PATCH] pythonPackages.gnureadline: refactor move to python-modules --- .../python-modules/gnureadline/default.nix | 29 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 17 +---------- 2 files changed, 30 insertions(+), 16 deletions(-) create mode 100644 pkgs/development/python-modules/gnureadline/default.nix diff --git a/pkgs/development/python-modules/gnureadline/default.nix b/pkgs/development/python-modules/gnureadline/default.nix new file mode 100644 index 000000000000..2feab78f6a83 --- /dev/null +++ b/pkgs/development/python-modules/gnureadline/default.nix @@ -0,0 +1,29 @@ +{ stdenv +, buildPythonPackage +, fetchPypi +, isPyPy +, pkgs +}: + +buildPythonPackage rec { + version = "6.3.3"; + pname = "gnureadline"; + disabled = isPyPy; + + src = fetchPypi { + inherit pname version; + sha256 = "1ghck2zz4xbqa3wz73brgjhrqj55p9hc1fq6c9zb09dnyhwb0nd2"; + }; + + buildInputs = [ pkgs.ncurses ]; + patchPhase = '' + substituteInPlace setup.py --replace "/bin/bash" "${pkgs.bash}/bin/bash" + ''; + + meta = with stdenv.lib; { + description = "The standard Python readline extension statically linked against the GNU readline library"; + homepage = http://github.com/ludwigschwardt/python-gnureadline; + license = licenses.gpl3; + }; + +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index cb53bafac473..247bf21c694a 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -1814,22 +1814,7 @@ in { gmusicapi = callPackage ../development/python-modules/gmusicapi { }; - - gnureadline = buildPythonPackage rec { - version = "6.3.3"; - name = "gnureadline-${version}"; - disabled = isPyPy; - - src = pkgs.fetchurl { - url = "mirror://pypi/g/gnureadline/${name}.tar.gz"; - sha256 = "1ghck2zz4xbqa3wz73brgjhrqj55p9hc1fq6c9zb09dnyhwb0nd2"; - }; - - buildInputs = [ pkgs.ncurses ]; - patchPhase = '' - substituteInPlace setup.py --replace "/bin/bash" "${pkgs.bash}/bin/bash" - ''; - }; + gnureadline = callPackage ../development/python-modules/gnureadline { }; gnutls = buildPythonPackage rec { pname = "python-gnutls";