From 1ff519e090bc2a83017d759690220a6810eef250 Mon Sep 17 00:00:00 2001 From: Chris Ostrouchov Date: Mon, 15 Oct 2018 16:36:16 -0400 Subject: [PATCH] pythonPackages.j2cli: refactor move to python-modules --- .../python-modules/j2cli/default.nix | 34 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 28 +-------------- 2 files changed, 35 insertions(+), 27 deletions(-) create mode 100644 pkgs/development/python-modules/j2cli/default.nix diff --git a/pkgs/development/python-modules/j2cli/default.nix b/pkgs/development/python-modules/j2cli/default.nix new file mode 100644 index 000000000000..d8da0d8f1291 --- /dev/null +++ b/pkgs/development/python-modules/j2cli/default.nix @@ -0,0 +1,34 @@ +{ stdenv +, buildPythonPackage +, fetchPypi +, isPy3k +, nose +, jinja2 +, pyyaml +}: + +buildPythonPackage rec { + pname = "j2cli"; + version = "0.3.1-0"; + disabled = isPy3k; + + src = fetchPypi { + inherit pname version; + sha256 = "0y3w1x9935qzx8w6m2r6g4ghyjmxn33wryiif6xb56q7cj9w1433"; + }; + + buildInputs = [ nose ]; + propagatedBuildInputs = [ jinja2 pyyaml ]; + + meta = with stdenv.lib; { + homepage = https://github.com/kolypto/j2cli; + description = "Jinja2 Command-Line Tool"; + license = licenses.bsd3; + longDescription = '' + J2Cli is a command-line tool for templating in shell-scripts, + leveraging the Jinja2 library. + ''; + maintainers = with maintainers; [ rushmorem ]; + }; + +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 9a5b151ac228..4ca5b8cd45b2 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -5611,33 +5611,7 @@ in { jellyfish = callPackage ../development/python-modules/jellyfish { }; - j2cli = buildPythonPackage rec { - name = "j2cli-${version}"; - version = "0.3.1-0"; - - src = pkgs.fetchurl { - url = "mirror://pypi/j/j2cli/${name}.tar.gz"; - sha256 = "0y3w1x9935qzx8w6m2r6g4ghyjmxn33wryiif6xb56q7cj9w1433"; - }; - - disabled = !isPy27; - - buildInputs = [ self.nose ]; - - propagatedBuildInputs = with self; [ jinja2 pyyaml ]; - - meta = { - homepage = https://github.com/kolypto/j2cli; - description = "Jinja2 Command-Line Tool"; - license = licenses.bsd3; - longDescription = '' - J2Cli is a command-line tool for templating in shell-scripts, - leveraging the Jinja2 library. - ''; - platforms = platforms.all; - maintainers = with maintainers; [ rushmorem ]; - }; - }; + j2cli = callPackage ../development/python-modules/j2cli { }; jinja2 = callPackage ../development/python-modules/jinja2 { };