From d47d113004cd22271319d102423279c2c9557e52 Mon Sep 17 00:00:00 2001 From: Ben Wolsieffer Date: Fri, 4 Dec 2020 19:26:10 -0500 Subject: [PATCH] pythonPackages.pypugjs: init at 5.9.6 The Jade language was renamed to Pug, and this is the new Python package to support it. It is also better maintained than pyjade. --- .../python-modules/pypugjs/default.nix | 39 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 41 insertions(+) create mode 100644 pkgs/development/python-modules/pypugjs/default.nix diff --git a/pkgs/development/python-modules/pypugjs/default.nix b/pkgs/development/python-modules/pypugjs/default.nix new file mode 100644 index 000000000000..7919b735f34f --- /dev/null +++ b/pkgs/development/python-modules/pypugjs/default.nix @@ -0,0 +1,39 @@ +{ stdenv, buildPythonPackage, fetchFromGitHub, fetchpatch, six, chardet, nose +, django, jinja2, tornado, pyramid, pyramid_mako, Mako }: + +buildPythonPackage rec { + pname = "pypugjs"; + version = "5.9.6"; + + # No source tarball on PyPI + # https://github.com/kakulukia/pypugjs/issues/68 + src = fetchFromGitHub { + owner = "kakulukia"; + repo = pname; + rev = "v${version}"; + sha256 = "14hsl4jfzy5hf5qiwpjdy6vzzj9mvd2rvkcvjgciyz06vfccqd7y"; + }; + + patches = [ + # Allow newer pyramid versions + # https://github.com/kakulukia/pypugjs/pull/69 + (fetchpatch { + url = "https://github.com/kakulukia/pypugjs/commit/2a77a59bee8526f7e3eb9d71c8241470dfff11f5.patch"; + sha256 = "0d2bjh0f8hmbvmzi8ilj1xbpgszhhkapiql8yi0by2lrd525qspn"; + }) + ]; + + propagatedBuildInputs = [ six chardet ]; + checkInputs = [ nose django jinja2 tornado pyramid pyramid_mako Mako ]; + + checkPhase = '' + nosetests pypugjs + ''; + + meta = with stdenv.lib; { + description = "PugJS syntax template adapter for Django, Jinja2, Mako and Tornado templates"; + homepage = "https://github.com/kakulukia/pypugjs"; + license = licenses.mit; + maintainers = with maintainers; [ lopsided98 ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 75d4245abe23..15607615d160 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -5414,6 +5414,8 @@ in { pypubsub = callPackage ../development/python-modules/pypubsub { }; + pypugjs = callPackage ../development/python-modules/pypugjs { }; + pyqrcode = callPackage ../development/python-modules/pyqrcode { }; pyqt4 = callPackage ../development/python-modules/pyqt/4.x.nix { inherit (pkgs) pkgconfig; };