From b3d8cb9051f1b01cb70a7d182629e3dd9355313e Mon Sep 17 00:00:00 2001 From: Elis Hirwing Date: Tue, 3 Apr 2018 14:17:01 +0200 Subject: [PATCH] pythonPackages.jdatetime: Move to own file --- .../python-modules/jdatetime/default.nix | 19 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 18 +----------------- 2 files changed, 20 insertions(+), 17 deletions(-) create mode 100644 pkgs/development/python-modules/jdatetime/default.nix diff --git a/pkgs/development/python-modules/jdatetime/default.nix b/pkgs/development/python-modules/jdatetime/default.nix new file mode 100644 index 000000000000..bf7ba56eb4ea --- /dev/null +++ b/pkgs/development/python-modules/jdatetime/default.nix @@ -0,0 +1,19 @@ +{ stdenv, buildPythonPackage, fetchPypi, six }: + +buildPythonPackage rec { + pname = "jdatetime"; + version = "1.7.1"; + + src = fetchPypi { + inherit pname version; + sha256 = "1b1ksspm86r272ar8v0v4ip1821i4azpix6xhxpb4l133iwsb2y0"; + }; + + propagatedBuildInputs = [ six ]; + + meta = with stdenv.lib; { + description = "Jalali datetime binding for python"; + homepage = https://pypi.python.org/pypi/jdatetime; + license = licenses.psfl; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 430bf0792139..8af3054e7db4 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -2065,23 +2065,7 @@ in { neurotools = callPackage ../development/python-modules/neurotools {}; - jdatetime = buildPythonPackage (rec { - name = "jdatetime-${version}"; - version = "1.7.1"; - - src = pkgs.fetchurl { - url = "mirror://pypi/j/jdatetime/${name}.tar.gz"; - sha256 = "c08ba5791c2350b26e87ddf478bf223108146e241b6c949538221b54afd633ac"; - }; - - propagatedBuildInputs = with self; [ self.six ]; - - meta = { - description = "Jalali datetime binding for python"; - homepage = https://pypi.python.org/pypi/jdatetime; - license = licenses.psfl; - }; - }); + jdatetime = callPackage ../development/python-modules/jdatetime {}; daphne = callPackage ../development/python-modules/daphne { };