From c7a6483309c5ba08a6fccbfe1d211f98a9061b24 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Thu, 22 Feb 2018 01:15:10 +0100 Subject: [PATCH] pythonPackages.konfig: move expression --- .../python-modules/konfig/default.nix | 39 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 39 +------------------ 2 files changed, 40 insertions(+), 38 deletions(-) create mode 100644 pkgs/development/python-modules/konfig/default.nix diff --git a/pkgs/development/python-modules/konfig/default.nix b/pkgs/development/python-modules/konfig/default.nix new file mode 100644 index 000000000000..aba97c7204e3 --- /dev/null +++ b/pkgs/development/python-modules/konfig/default.nix @@ -0,0 +1,39 @@ +{ lib, buildPythonPackage, fetchPypi, isPy3k, writeText, configparser, six }: + +buildPythonPackage rec { + pname = "konfig"; + version = "1.1"; + + # konfig unconditionaly depend on configparser, even if it is part of + # the standard library in python 3.2 or above. + disabled = isPy3k; + + src = fetchPypi { + inherit pname version; + sha256 = "7aa4c6463d6c13f4c98c02a998cbef4729da9ad69b676627acc8d3b3efb02b57"; + }; + + propagatedBuildInputs = [ configparser six ]; + + patches = [ (writeText "konfig.patch" '' + diff --git a/setup.py b/setup.py + index 96fd858..bb4db06 100644 + --- a/setup.py + +++ b/setup.py + @@ -20,7 +20,7 @@ setup(name='konfig', + author_email="tarek@mozilla.com", + include_package_data=True, + install_requires = [ + - 'configparser', 'argparse', 'six' + + 'configparser', 'six' + ], + zip_safe=False, + classifiers=classifiers, + '') ]; + + meta = with lib; { + description = "Yet Another Config Parser"; + homepage = "https://github.com/mozilla-services/konfig"; + license = licenses.mpl20; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 0ad8cdb5c53d..d4a8f4411759 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -9422,44 +9422,7 @@ in { }; }; - konfig = buildPythonPackage rec { - name = "konfig-${version}"; - version = "1.1"; - - # konfig unconditionaly depend on configparser, even if it is part of - # the standard library in python 3.2 or above. - disabled = isPy3k; - - src = pkgs.fetchgit { - url = https://github.com/mozilla-services/konfig.git; - rev = "refs/tags/${version}"; - sha256 = "1h780fbrv275dcik4cs3rincza805z6q726b48r4a0qmh5d8160c"; - }; - - propagatedBuildInputs = with self; [ configparser six ]; - - patches = [ (pkgs.writeText "konfig.patch" '' - diff --git a/setup.py b/setup.py - index 96fd858..bb4db06 100644 - --- a/setup.py - +++ b/setup.py - @@ -20,7 +20,7 @@ setup(name='konfig', - author_email="tarek@mozilla.com", - include_package_data=True, - install_requires = [ - - 'configparser', 'argparse', 'six' - + 'configparser', 'six' - ], - zip_safe=False, - classifiers=classifiers, - '') ]; - - meta = { - description = "Yet Another Config Parser"; - homepage = "https://github.com/mozilla-services/konfig"; - license = licenses.mpl20; - }; - }; + konfig = callPackage ../development/python-modules/konfig { }; kitchen = callPackage ../development/python-modules/kitchen/default.nix { };