3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/development/python-modules/staticjinja/default.nix

65 lines
1.2 KiB
Nix
Raw Normal View History

{ lib
, fetchFromGitHub
, buildPythonPackage
, poetry-core
2021-08-12 17:43:07 +01:00
, docopt-ng
, easywatch
, jinja2
, pytestCheckHook
2021-01-25 14:17:20 +00:00
, pytest-check
, pythonOlder
, markdown
, testVersion
, tomlkit
, staticjinja
}:
buildPythonPackage rec {
pname = "staticjinja";
2021-11-04 14:27:22 +00:00
version = "4.1.1";
2021-02-09 19:39:10 +00:00
format = "pyproject";
disabled = pythonOlder "3.6";
2021-02-09 19:39:10 +00:00
# No tests in pypi
src = fetchFromGitHub {
owner = "staticjinja";
repo = pname;
rev = version;
2021-11-04 14:27:22 +00:00
sha256 = "sha256-Bpgff3VaTylnYpkWoaWEiRWu4sYSP6dLbHDOjAhj7BM=";
};
2021-02-09 19:39:10 +00:00
nativeBuildInputs = [
poetry-core
2021-02-09 19:39:10 +00:00
];
propagatedBuildInputs = [
jinja2
2021-08-12 17:43:07 +01:00
docopt-ng
easywatch
];
checkInputs = [
pytestCheckHook
2021-01-25 14:17:20 +00:00
pytest-check
markdown
tomlkit
];
2021-02-09 19:39:10 +00:00
# The tests need to find and call the installed staticjinja executable
preCheck = ''
2021-01-25 14:17:20 +00:00
export PATH="$PATH:$out/bin";
'';
passthru.tests.version = testVersion {
package = staticjinja;
};
meta = with lib; {
description = "A library and cli tool that makes it easy to build static sites using Jinja2";
homepage = "https://staticjinja.readthedocs.io/en/latest/";
license = licenses.mit;
maintainers = with maintainers; [ fgaz ];
};
}