From 2bc69b7526415206ccaa5ca56b6863bab0ac222f Mon Sep 17 00:00:00 2001 From: Chris Ostrouchov Date: Tue, 16 Oct 2018 16:56:52 -0400 Subject: [PATCH] pythonPackages.htmllaundry: refactor move to python-modules --- .../python-modules/htmllaundry/default.nix | 30 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 22 +------------- 2 files changed, 31 insertions(+), 21 deletions(-) create mode 100644 pkgs/development/python-modules/htmllaundry/default.nix diff --git a/pkgs/development/python-modules/htmllaundry/default.nix b/pkgs/development/python-modules/htmllaundry/default.nix new file mode 100644 index 000000000000..787163d477e3 --- /dev/null +++ b/pkgs/development/python-modules/htmllaundry/default.nix @@ -0,0 +1,30 @@ +{ stdenv +, buildPythonPackage +, fetchPypi, nose +, six +, lxml +}: + +buildPythonPackage rec { + pname = "htmllaundry"; + version = "2.0"; + + src = fetchPypi { + inherit pname version; + sha256 = "e428cba78d5a965e959f5dac2eb7d5f7d627dd889990d5efa8d4e03f3dd768d9"; + }; + + buildInputs = [ nose ]; + propagatedBuildInputs = [ six lxml ]; + + # some tests fail, probably because of changes in lxml + # not relevant for me, if releavnt for you, fix it... + doCheck = false; + + meta = with stdenv.lib; { + description = "Simple HTML cleanup utilities"; + license = licenses.bsd3; + homepage = https://pypi.org/project/htmllaundry/; + }; + +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index c5252c3d38d4..bf5d9b789b54 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -2448,27 +2448,7 @@ in { hetzner = callPackage ../development/python-modules/hetzner { }; - htmllaundry = buildPythonPackage rec { - name = "htmllaundry-2.0"; - - src = pkgs.fetchurl { - url = "mirror://pypi/h/htmllaundry/${name}.tar.gz"; - sha256 = "e428cba78d5a965e959f5dac2eb7d5f7d627dd889990d5efa8d4e03f3dd768d9"; - }; - - buildInputs = with self; [ nose ]; - propagatedBuildInputs = with self; [ six lxml ]; - - # some tests fail, probably because of changes in lxml - # not relevant for me, if releavnt for you, fix it... - doCheck = false; - - meta = { - description = "Simple HTML cleanup utilities"; - license = licenses.bsd3; - }; - }; - + htmllaundry = callPackage ../development/python-modules/htmllaundry { }; html5lib = callPackage ../development/python-modules/html5lib { };