diff --git a/pkgs/development/python-modules/htmltreediff/default.nix b/pkgs/development/python-modules/htmltreediff/default.nix
new file mode 100644
index 00000000000..5e839e4ada9
--- /dev/null
+++ b/pkgs/development/python-modules/htmltreediff/default.nix
@@ -0,0 +1,26 @@
+{ buildPythonPackage, fetchFromGitHub, isPy3k, lxml, html5lib, nose, stdenv }:
+
+buildPythonPackage rec {
+ version = "v0.1.2";
+ pname = "htmltreediff";
+
+ disabled = isPy3k;
+
+ src = fetchFromGitHub {
+ owner = "christian-oudard";
+ repo = pname;
+ rev = version;
+ sha256 = "16mqp2jyznrw1mgd3qzybq28h2k5wz7vmmz1m6xpgscazyjhvvd1";
+ };
+
+ propagatedBuildInputs = [ lxml html5lib ];
+
+ checkInputs = [ nose ];
+
+ meta = with stdenv.lib; {
+ description = " Structure-aware diff for html and xml documents";
+ homepage = https://github.com/christian-oudard/htmltreediff;
+ license = licenses.bsdOriginal;
+ maintainers = with maintainers; [ ma27 ];
+ };
+}
diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix
index f829f25ee0a..d0adbb05477 100644
--- a/pkgs/top-level/python-packages.nix
+++ b/pkgs/top-level/python-packages.nix
@@ -20389,30 +20389,7 @@ EOF
};
};
- htmltreediff = buildPythonPackage rec{
- version = "0.1.2";
- pname = "htmltreediff";
- name = pname + "-${version}";
-
- # Does not work with Py >= 3
- disabled = !isPy27;
-
- src = pkgs.fetchFromGitHub {
- owner = "christian-oudard";
- repo = pname;
- rev = "v" + version;
- sha256 = "16mqp2jyznrw1mgd3qzybq28h2k5wz7vmmz1m6xpgscazyjhvvd1";
- };
-
- propagatedBuildInputs = with self; [ lxml html5lib ];
-
- meta = {
- description = " Structure-aware diff for html and xml documents";
- homepage = https://github.com/christian-oudard/htmltreediff;
- license = licenses.bsdOriginal;
- maintainers = with maintainers; [];
- };
- };
+ htmltreediff = callPackage ../development/python-modules/htmltreediff { };
repeated_test = buildPythonPackage rec {
name = "repeated_test-${version}";