From 232ec653ee8c4595aea674ee2bc8945cc1e60914 Mon Sep 17 00:00:00 2001 From: Frederik Rietdijk Date: Sun, 31 Dec 2017 12:02:35 +0100 Subject: [PATCH] python.pkgs.backports_abc: move expression --- .../python-modules/backports_abc/default.nix | 25 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 20 +-------------- 2 files changed, 26 insertions(+), 19 deletions(-) create mode 100644 pkgs/development/python-modules/backports_abc/default.nix diff --git a/pkgs/development/python-modules/backports_abc/default.nix b/pkgs/development/python-modules/backports_abc/default.nix new file mode 100644 index 000000000000..091312f55dcb --- /dev/null +++ b/pkgs/development/python-modules/backports_abc/default.nix @@ -0,0 +1,25 @@ +{ lib +, buildPythonPackage +, fetchPypi +, python +}: + +buildPythonPackage rec { + pname = "backports_abc"; + version = "0.4"; + + src = fetchPypi { + inherit pname version; + sha256 = "8b3e4092ba3d541c7a2f9b7d0d9c0275b21c6a01c53a61c731eba6686939d0a5"; + }; + + checkPhase = '' + ${python.interpreter} -m unittest discover + ''; + + meta = { + homepage = https://github.com/cython/backports_abc; + license = lib.licenses.psfl; + description = "A backport of recent additions to the 'collections.abc' module"; + }; +} \ No newline at end of file diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index f169b0f2703a..7c9d423070c5 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -1003,25 +1003,7 @@ in { }; }; - backports_abc = buildPythonPackage rec { - name = "backports_abc-${version}"; - version = "0.4"; - - src = pkgs.fetchurl { - url = "mirror://pypi/b/backports_abc/${name}.tar.gz"; - sha256 = "8b3e4092ba3d541c7a2f9b7d0d9c0275b21c6a01c53a61c731eba6686939d0a5"; - }; - - checkPhase = '' - ${python.interpreter} -m unittest discover - ''; - - meta = { - homepage = https://github.com/cython/backports_abc; - license = licenses.psfl; - description = "A backport of recent additions to the 'collections.abc' module"; - }; - }; + backports_abc = callPackage ../development/python-modules/backports_abc { }; backports_functools_lru_cache = callPackage ../development/python-modules/backports_functools_lru_cache { };