From 0ef0a4ab5e56c797bc7fe47699b6910f217b1bf7 Mon Sep 17 00:00:00 2001 From: Rahul Gopinath Date: Tue, 2 May 2017 21:16:23 -0700 Subject: [PATCH] pytimeparse: refactor --- .../python-modules/pytimeparse/default.nix | 21 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 20 +----------------- 2 files changed, 22 insertions(+), 19 deletions(-) create mode 100644 pkgs/development/python-modules/pytimeparse/default.nix diff --git a/pkgs/development/python-modules/pytimeparse/default.nix b/pkgs/development/python-modules/pytimeparse/default.nix new file mode 100644 index 000000000000..ce5ff0586649 --- /dev/null +++ b/pkgs/development/python-modules/pytimeparse/default.nix @@ -0,0 +1,21 @@ +{ stdenv, fetchPypi, buildPythonPackage, nose }: + +buildPythonPackage rec { + pname = "pytimeparse"; + version = "1.1.6"; + name = "${pname}-${version}"; + + src = fetchPypi { + inherit pname version; + sha256 = "0imbb68i5n5fm704gv47if1blpxd4f8g16qmp5ar07cavgh2mibl"; + }; + + propagatedBuildInputs = [ nose ]; + + meta = with stdenv.lib; { + description = "A small Python library to parse various kinds of time expressions"; + homepage = "https://github.com/wroberts/pytimeparse"; + license = licenses.mit; + maintainers = with maintainers; [ vrthra ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 03958bc9d7f2..6f46ee91d639 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -318,25 +318,7 @@ in { python-stdnum = callPackage ../development/python-modules/python-stdnum { }; - pytimeparse = buildPythonPackage rec { - pname = "pytimeparse"; - version = "1.1.6"; - name = "${pname}-${version}"; - - meta = { - description = "A small Python library to parse various kinds of time expressions"; - homepage = "https://github.com/wroberts/pytimeparse"; - license = licenses.mit; - maintainers = with maintainers; [ vrthra ]; - }; - - propagatedBuildInputs = with self; [ nose ]; - - src = fetchPypi { - inherit pname version; - sha256 = "0imbb68i5n5fm704gv47if1blpxd4f8g16qmp5ar07cavgh2mibl"; - }; - }; + pytimeparse = callPackage ../development/python-modules/pytimeparse { }; PyWebDAV = callPackage ../development/python-modules/pywebdav { };