From 4cae4418e9c3297a0ab8b707bd5ad408d5fc8056 Mon Sep 17 00:00:00 2001 From: wisut hantanong Date: Fri, 28 Jul 2017 13:35:30 +0700 Subject: [PATCH] python.pkgs.apipkg: move to separate expression --- .../python-modules/apipkg/default.nix | 25 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 21 +--------------- 2 files changed, 26 insertions(+), 20 deletions(-) create mode 100644 pkgs/development/python-modules/apipkg/default.nix diff --git a/pkgs/development/python-modules/apipkg/default.nix b/pkgs/development/python-modules/apipkg/default.nix new file mode 100644 index 000000000000..be86eddc2ae8 --- /dev/null +++ b/pkgs/development/python-modules/apipkg/default.nix @@ -0,0 +1,25 @@ +{ stdenv, buildPythonPackage, fetchPypi +, pytest }: + +buildPythonPackage rec { + pname = "apipkg"; + version = "1.4"; + name = "${pname}-${version}"; + + src = fetchPypi { + inherit pname version; + sha256 = "2e38399dbe842891fe85392601aab8f40a8f4cc5a9053c326de35a1cc0297ac6"; + }; + + buildInputs = [ pytest ]; + + checkPhase = '' + py.test + ''; + + meta = with stdenv.lib; { + description = "Namespace control and lazy-import mechanism"; + homepage = "http://bitbucket.org/hpk42/apipkg"; + license = licenses.mit; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 3fc7871fbe6b..127f5b16f0c9 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -552,26 +552,7 @@ in { ansible_2_2 = callPackage ../development/python-modules/ansible/2.2.nix {}; ansible_2_3 = callPackage ../development/python-modules/ansible/2.3.nix {}; - apipkg = buildPythonPackage rec { - name = "apipkg-1.4"; - - src = pkgs.fetchurl { - url = "mirror://pypi/a/apipkg/${name}.tar.gz"; - sha256 = "2e38399dbe842891fe85392601aab8f40a8f4cc5a9053c326de35a1cc0297ac6"; - }; - - buildInputs = with self; [ pytest ]; - - checkPhase = '' - py.test - ''; - - meta = { - description = "Namespace control and lazy-import mechanism"; - homepage = "http://bitbucket.org/hpk42/apipkg"; - license = licenses.mit; - }; - }; + apipkg = callPackage ../development/python-modules/apipkg {}; appdirs = callPackage ../development/python-modules/appdirs { };