From a7dac03113c05214ef40c0a0bbcb587edb0f1be6 Mon Sep 17 00:00:00 2001 From: Chris Ostrouchov Date: Sat, 27 Oct 2018 18:03:13 -0400 Subject: [PATCH] pythonPackages.svgwrite: refactor move to python-modules --- .../python-modules/svgwrite/default.nix | 26 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 19 +------------- 2 files changed, 27 insertions(+), 18 deletions(-) create mode 100644 pkgs/development/python-modules/svgwrite/default.nix diff --git a/pkgs/development/python-modules/svgwrite/default.nix b/pkgs/development/python-modules/svgwrite/default.nix new file mode 100644 index 000000000000..79e03acd3599 --- /dev/null +++ b/pkgs/development/python-modules/svgwrite/default.nix @@ -0,0 +1,26 @@ +{ stdenv +, buildPythonPackage +, fetchPypi +, setuptools +, pyparsing +}: + +buildPythonPackage rec { + pname = "svgwrite"; + version = "1.1.6"; + + src = fetchPypi { + inherit pname version; + sha256 = "1f018813072aa4d7e95e58f133acb3f68fa7de0a0d89ec9402cc38406a0ec5b8"; + }; + + buildInputs = [ setuptools ]; + propagatedBuildInputs = [ pyparsing ]; + + meta = with stdenv.lib; { + description = "A Python library to create SVG drawings"; + homepage = https://bitbucket.org/mozman/svgwrite; + license = licenses.mit; + }; + +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 313aa0d50ad4..054e7343eb53 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -3924,24 +3924,7 @@ in { structlog = callPackage ../development/python-modules/structlog { }; - svgwrite = buildPythonPackage rec { - name = "svgwrite-${version}"; - version = "1.1.6"; - - src = pkgs.fetchurl { - url = "mirror://pypi/s/svgwrite/${name}.tar.gz"; - sha256 = "1f018813072aa4d7e95e58f133acb3f68fa7de0a0d89ec9402cc38406a0ec5b8"; - }; - - buildInputs = with self; [ setuptools ]; - propagatedBuildInputs = with self; [ pyparsing ]; - - meta = { - description = "A Python library to create SVG drawings"; - homepage = https://bitbucket.org/mozman/svgwrite; - license = licenses.mit; - }; - }; + svgwrite = callPackage ../development/python-modules/svgwrite { }; freezegun = buildPythonPackage rec { name = "freezegun-${version}";