From d954c8ff8275240300d93c6ef577c3fd2c924f59 Mon Sep 17 00:00:00 2001 From: Chris Ostrouchov Date: Wed, 17 Oct 2018 00:29:06 -0400 Subject: [PATCH] pythonPackages.graphviz: refactor move to python-modules --- .../python-modules/graphviz/default.nix | 25 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 18 +------------ 2 files changed, 26 insertions(+), 17 deletions(-) create mode 100644 pkgs/development/python-modules/graphviz/default.nix diff --git a/pkgs/development/python-modules/graphviz/default.nix b/pkgs/development/python-modules/graphviz/default.nix new file mode 100644 index 000000000000..42a698906814 --- /dev/null +++ b/pkgs/development/python-modules/graphviz/default.nix @@ -0,0 +1,25 @@ +{ stdenv +, buildPythonPackage +, fetchPypi +, pkgs +}: + +buildPythonPackage rec { + pname = "graphviz"; + version = "0.9"; + + src = fetchPypi { + inherit pname version; + extension = "zip"; + sha256 = "14r9brj4r31b3qy1nnn34v3l4h0n39bqxg9sn2fz4p3pp5mglnl6"; + }; + + propagatedBuildInputs = [ pkgs.graphviz ]; + + meta = with stdenv.lib; { + description = "Simple Python interface for Graphviz"; + homepage = https://github.com/xflr6/graphviz; + license = licenses.mit; + }; + +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index f1fc2e63b897..cbde624cfa1c 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -2879,23 +2879,7 @@ in { pyte = callPackage ../development/python-modules/pyte { }; - graphviz = buildPythonPackage rec { - name = "graphviz-${version}"; - version = "0.9"; - - src = pkgs.fetchurl { - url = "mirror://pypi/g/graphviz/${name}.zip"; - sha256 = "14r9brj4r31b3qy1nnn34v3l4h0n39bqxg9sn2fz4p3pp5mglnl6"; - }; - - propagatedBuildInputs = [ pkgs.graphviz ]; - - meta = { - description = "Simple Python interface for Graphviz"; - homepage = https://github.com/xflr6/graphviz; - license = licenses.mit; - }; - }; + graphviz = callPackage ../development/python-modules/graphviz { }; pygraphviz = callPackage ../development/python-modules/pygraphviz { };