From 283eb6f7d1e720abff2f31d6150b06065e33f1b1 Mon Sep 17 00:00:00 2001 From: Chris Ostrouchov Date: Fri, 26 Oct 2018 13:20:02 -0400 Subject: [PATCH] pythonPackages.shortuuid: refactor move to python-modules --- .../python-modules/shortuuid/default.nix | 25 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 19 +------------- 2 files changed, 26 insertions(+), 18 deletions(-) create mode 100644 pkgs/development/python-modules/shortuuid/default.nix diff --git a/pkgs/development/python-modules/shortuuid/default.nix b/pkgs/development/python-modules/shortuuid/default.nix new file mode 100644 index 00000000000..43cf9806ba6 --- /dev/null +++ b/pkgs/development/python-modules/shortuuid/default.nix @@ -0,0 +1,25 @@ +{ stdenv +, buildPythonPackage +, fetchPypi +, pep8 +}: + +buildPythonPackage rec { + pname = "shortuuid"; + version = "0.4.3"; + + src = fetchPypi { + inherit pname version; + sha256 = "4606dbb19124d98109c00e2cafae2df8117aec02115623e18fb2abe3f766d293"; + }; + + buildInputs = [pep8]; + + meta = with stdenv.lib; { + description = "A generator library for concise, unambiguous and URL-safe UUIDs"; + homepage = https://github.com/stochastic-technologies/shortuuid/; + license = licenses.bsd3; + maintainers = with maintainers; [ zagy ]; + }; + +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index c60c453493c..e3c11dc0d4f 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -3720,24 +3720,7 @@ in { simplegeneric = callPackage ../development/python-modules/simplegeneric { }; - shortuuid = buildPythonPackage rec { - name = "shortuuid-${version}"; - version = "0.4.3"; - - src = pkgs.fetchurl { - url = "mirror://pypi/s/shortuuid/${name}.tar.gz"; - sha256 = "4606dbb19124d98109c00e2cafae2df8117aec02115623e18fb2abe3f766d293"; - }; - - buildInputs = with self; [pep8]; - - meta = { - description = "A generator library for concise, unambiguous and URL-safe UUIDs"; - homepage = https://github.com/stochastic-technologies/shortuuid/; - license = licenses.bsd3; - maintainers = with maintainers; [ zagy ]; - }; - }; + shortuuid = callPackage ../development/python-modules/shortuuid { }; shouldbe = buildPythonPackage rec { version = "0.1.0";