uboot: (firmwareOdroidC2/C4) don't invoke patch tool, use patches = [] instead
https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/setup.sh#L948 this can do it nicely. Signed-off-by: Anton Arapov <anton@deadbeef.mx>
This commit is contained in:
commit
56de2bcd43
30691 changed files with 3076956 additions and 0 deletions
66
pkgs/development/python-modules/staticjinja/default.nix
Normal file
66
pkgs/development/python-modules/staticjinja/default.nix
Normal file
|
|
@ -0,0 +1,66 @@
|
|||
{ 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.2";
|
||||
format = "pyproject";
|
||||
|
||||
disabled = pythonOlder "3.6";
|
||||
|
||||
# No tests in pypi
|
||||
src = fetchFromGitHub {
|
||||
owner = "staticjinja";
|
||||
repo = pname;
|
||||
rev = version;
|
||||
sha256 = "0qqyadhqsn66b7qrpfj08qc899pjwfa2byqqzh73xq1n22i4cy30";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
poetry-core
|
||||
];
|
||||
|
||||
propagatedBuildInputs = [
|
||||
jinja2
|
||||
docopt-ng
|
||||
easywatch
|
||||
];
|
||||
|
||||
checkInputs = [
|
||||
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 ];
|
||||
};
|
||||
}
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
{ stdenv, staticjinja }:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "staticjinja-test-minimal-template";
|
||||
meta.timeout = 30;
|
||||
buildCommand = ''
|
||||
${staticjinja}/bin/staticjinja build --srcpath ${./templates}
|
||||
grep 'Hello World!' index
|
||||
touch $out
|
||||
'';
|
||||
}
|
||||
|
|
@ -0,0 +1 @@
|
|||
World
|
||||
|
|
@ -0,0 +1 @@
|
|||
Hello {% include './include' %}!
|
||||
Loading…
Add table
Add a link
Reference in a new issue