From bf98e3b44675aa92ba1f906594cd36170183334c Mon Sep 17 00:00:00 2001 From: Chris Ostrouchov Date: Tue, 16 Oct 2018 18:09:58 -0400 Subject: [PATCH] pythonPackages.sortedcollections: refactor move to python-modules --- .../sortedcollections/default.nix | 27 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 20 +------------- 2 files changed, 28 insertions(+), 19 deletions(-) create mode 100644 pkgs/development/python-modules/sortedcollections/default.nix diff --git a/pkgs/development/python-modules/sortedcollections/default.nix b/pkgs/development/python-modules/sortedcollections/default.nix new file mode 100644 index 000000000000..b80e5655ff99 --- /dev/null +++ b/pkgs/development/python-modules/sortedcollections/default.nix @@ -0,0 +1,27 @@ +{ stdenv +, buildPythonPackage +, fetchPypi +, sortedcontainers +}: + +buildPythonPackage rec { + pname = "sortedcollections"; + version = "0.4.2"; + + src = fetchPypi { + inherit pname version; + sha256 = "12dlzln9gyv8smsy2k6d6dmr0ywrpwyrr1cjy649ia5h1g7xdvwa"; + }; + + buildInputs = [ sortedcontainers ]; + + # wants to test all python versions with tox: + doCheck = false; + + meta = with stdenv.lib; { + description = "Python Sorted Collections"; + homepage = http://www.grantjenks.com/docs/sortedcollections/; + license = licenses.asl20; + }; + +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 1bf49963c5af..3e5dd5d4de75 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -2797,25 +2797,7 @@ in { brotlipy = callPackage ../development/python-modules/brotlipy { }; - sortedcollections = buildPythonPackage rec { - name = "sortedcollections-${version}"; - version = "0.4.2"; - - src = pkgs.fetchurl { - url = "mirror://pypi/s/sortedcollections/${name}.tar.gz"; - sha256 = "12dlzln9gyv8smsy2k6d6dmr0ywrpwyrr1cjy649ia5h1g7xdvwa"; - }; - buildInputs = [ self.sortedcontainers ]; - - # wants to test all python versions with tox: - doCheck = false; - - meta = { - description = "Python Sorted Collections"; - homepage = http://www.grantjenks.com/docs/sortedcollections/; - license = licenses.asl20; - }; - }; + sortedcollections = callPackage ../development/python-modules/sortedcollections { }; hyperframe = callPackage ../development/python-modules/hyperframe { };