diff options
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/staticjinja/default.nix')
-rw-r--r-- | nixpkgs/pkgs/development/python-modules/staticjinja/default.nix | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/staticjinja/default.nix b/nixpkgs/pkgs/development/python-modules/staticjinja/default.nix index d49bae2eab91..e7f1e442f4d8 100644 --- a/nixpkgs/pkgs/development/python-modules/staticjinja/default.nix +++ b/nixpkgs/pkgs/development/python-modules/staticjinja/default.nix @@ -1,29 +1,35 @@ { lib , fetchFromGitHub , buildPythonPackage +, poetry , isPy27 , docopt , easywatch , jinja2 , pytestCheckHook +, pytest-check , markdown }: buildPythonPackage rec { pname = "staticjinja"; - version = "0.4.0"; + version = "1.0.4"; + format = "pyproject"; disabled = isPy27; # 0.4.0 drops python2 support - # For some reason, in pypi the tests get disabled when using - # PY_IGNORE_IMPORTMISMATCH, so we just fetch from GitHub + # No tests in pypi src = fetchFromGitHub { owner = "staticjinja"; repo = pname; rev = version; - sha256 = "0pysk8pzmcg1nfxz8m4i6bvww71w2zg6xp33zgg5vrf8yd2dfx9i"; + sha256 = "1saz6f71s693gz9c2k3bq2di2mrkj65mgmfdg86jk0z0zzjk90y1"; }; + nativeBuildInputs = [ + poetry + ]; + propagatedBuildInputs = [ jinja2 docopt @@ -32,13 +38,13 @@ buildPythonPackage rec { checkInputs = [ pytestCheckHook + pytest-check markdown ]; - # Import paths differ by a "build/lib" subdirectory, but the files are - # the same, so we ignore import mismatches. + # The tests need to find and call the installed staticjinja executable preCheck = '' - export PY_IGNORE_IMPORTMISMATCH=1 + export PATH="$PATH:$out/bin"; ''; meta = with lib; { |