diff --git a/src/overlays/python/default.nix b/src/overlays/python/default.nix index a1d813a..07bc52d 100644 --- a/src/overlays/python/default.nix +++ b/src/overlays/python/default.nix @@ -5,6 +5,7 @@ pyFinal: pyPrev: { traceback-with-variables = pyFinal.callPackage ./traceback-with-variables {}; uuid-utils = pyFinal.callPackage ./uuid-utils.nix {}; sql_metadata = pyFinal.callPackage ./sql_metadata.nix {}; + premailer = pyFinal.callPackage ./premailer.nix {}; # not anymore in nixpkgs, see: https://github.com/NixOS/nixpkgs/pull/348580 # erpnext dependencies plaid-python = pyFinal.callPackage ./plaid-python.nix {}; # old version diff --git a/src/overlays/python/premailer.nix b/src/overlays/python/premailer.nix new file mode 100644 index 0000000..c391b17 --- /dev/null +++ b/src/overlays/python/premailer.nix @@ -0,0 +1,42 @@ +{ + lib, + buildPythonPackage, + fetchPypi, + isPy27, + cssselect, + cssutils, + lxml, + mock, + nose, + requests, + cachetools, +}: +buildPythonPackage rec { + pname = "premailer"; + version = "3.10.0"; + format = "setuptools"; + disabled = isPy27; # no longer compatible with urllib + + src = fetchPypi { + inherit pname version; + sha256 = "d1875a8411f5dc92b53ef9f193db6c0f879dc378d618e0ad292723e388bfe4c2"; + }; + + buildInputs = [ + mock + nose + ]; + propagatedBuildInputs = [ + cachetools + cssselect + cssutils + lxml + requests + ]; + + meta = { + description = "Turns CSS blocks into style attributes"; + homepage = "https://github.com/peterbe/premailer"; + license = lib.licenses.bsd3; + }; +}