mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-20 20:53:48 +00:00
33afbf39f6
checkInputs used to be added to nativeBuildInputs. Now we have nativeCheckInputs to do that instead. Doing this treewide change allows to keep hashes identical to before the introduction of nativeCheckInputs.
67 lines
1.2 KiB
Nix
67 lines
1.2 KiB
Nix
{ lib
|
|
, fetchFromGitHub
|
|
, buildPythonPackage
|
|
, poetry-core
|
|
, docopt-ng
|
|
, easywatch
|
|
, jinja2
|
|
, pytestCheckHook
|
|
, pytest-check
|
|
, pythonOlder
|
|
, markdown
|
|
, testers
|
|
, tomlkit
|
|
, staticjinja
|
|
, callPackage
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "staticjinja";
|
|
version = "4.1.3";
|
|
format = "pyproject";
|
|
|
|
disabled = pythonOlder "3.6";
|
|
|
|
# No tests in pypi
|
|
src = fetchFromGitHub {
|
|
owner = "staticjinja";
|
|
repo = pname;
|
|
rev = version;
|
|
sha256 = "sha256-w6ge5MQXNRHCM43jKnagTlbquJJys7mprgBOS2uuwHQ=";
|
|
};
|
|
|
|
nativeBuildInputs = [
|
|
poetry-core
|
|
];
|
|
|
|
propagatedBuildInputs = [
|
|
jinja2
|
|
docopt-ng
|
|
easywatch
|
|
];
|
|
|
|
nativeCheckInputs = [
|
|
pytestCheckHook
|
|
pytest-check
|
|
markdown
|
|
tomlkit
|
|
];
|
|
|
|
# The tests need to find and call the installed staticjinja executable
|
|
preCheck = ''
|
|
export PATH="$PATH:$out/bin";
|
|
'';
|
|
|
|
passthru.tests = {
|
|
version = testers.testVersion { package = staticjinja; };
|
|
minimal-template = callPackage ./test-minimal-template {};
|
|
};
|
|
|
|
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 ];
|
|
};
|
|
}
|