diff --git a/pkgs/development/python-modules/htmlmin.nix b/pkgs/development/python-modules/htmlmin.nix
new file mode 100644
index 000000000000..35f86479a4e3
--- /dev/null
+++ b/pkgs/development/python-modules/htmlmin.nix
@@ -0,0 +1,20 @@
+{ stdenv, buildPythonPackage, fetchPypi }:
+buildPythonPackage rec {
+ pname = "htmlmin";
+ version = "0.1.10";
+ name = "${pname}-${version}";
+ src = fetchPypi {
+ inherit pname version;
+ sha256 = "ca5c5dfbb0fa58562e5cbc8dc026047f6cb431d4333504b11853853be448aa63";
+ };
+
+ # Tests run fine in a normal source checkout, but not when being built by nix.
+ doCheck = false;
+
+ meta = {
+ description = "A configurable HTML Minifier with safety features";
+ homepage = https://pypi.python.org/pypi/htmlmin;
+ license = stdenv.lib.licenses.bsd3;
+ maintainers = [stdenv.lib.maintainers.ahmedtd];
+ };
+}
diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix
index fc9e96cc5f69..a3e0b3feaa9b 100644
--- a/pkgs/top-level/python-packages.nix
+++ b/pkgs/top-level/python-packages.nix
@@ -7749,6 +7749,9 @@ in {
};
});
+
+ htmlmin = callPackage ../development/python-modules/htmlmin.nix {};
+
httpauth = buildPythonPackage rec {
version = "0.3";
name = "httpauth-${version}";