nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at devShellTools-shell 59 lines 1.1 kB view raw
1{ 2 lib, 3 python3, 4 fetchFromGitHub, 5 extras ? [ 6 "hjson" 7 "json5" 8 "toml" 9 "xml" 10 "yaml" 11 ], 12}: 13 14python3.pkgs.buildPythonApplication rec { 15 pname = "jinja2-cli"; 16 version = "0.8.2"; 17 format = "pyproject"; 18 19 src = fetchFromGitHub { 20 owner = "mattrobenolt"; 21 repo = "jinja2-cli"; 22 rev = version; 23 hash = "sha256-67gYt0nZX+VTVaoSxVXGzbRiXD7EMsVBFWC8wHo+Vw0="; 24 }; 25 26 nativeBuildInputs = [ 27 python3.pkgs.setuptools 28 python3.pkgs.wheel 29 ]; 30 31 nativeCheckInputs = [ 32 python3.pkgs.pytestCheckHook 33 ]; 34 35 propagatedBuildInputs = 36 with python3.pkgs; 37 [ 38 jinja2 39 ] 40 ++ lib.attrVals extras optional-dependencies; 41 42 pythonImportsCheck = [ "jinja2cli" ]; 43 44 optional-dependencies = with python3.pkgs; { 45 hjson = [ hjson ]; 46 json5 = [ json5 ]; 47 toml = [ toml ]; 48 xml = [ xmltodict ]; 49 yaml = [ pyyaml ]; 50 }; 51 52 meta = with lib; { 53 description = "CLI for Jinja2"; 54 homepage = "https://github.com/mattrobenolt/jinja2-cli"; 55 license = licenses.bsd2; 56 maintainers = with maintainers; [ figsoda ]; 57 mainProgram = "jinja2"; 58 }; 59}