mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-08-25 17:55:21 +00:00
python3Packages.shacl2code: init at 1.2.0
Convert SHACL model to code bindings https://github.com/JPEWdev/shacl2code
This commit is contained in:
77
pkgs/development/python-modules/shacl2code/default.nix
Normal file
77
pkgs/development/python-modules/shacl2code/default.nix
Normal file
@@ -0,0 +1,77 @@
|
||||
{
|
||||
lib,
|
||||
buildPythonPackage,
|
||||
fetchFromGitHub,
|
||||
hatchling,
|
||||
jinja2,
|
||||
jsonschema,
|
||||
nix-update-script,
|
||||
pyrefly,
|
||||
pyright,
|
||||
pyshacl,
|
||||
pytest-cov-stub,
|
||||
pytest-xdist,
|
||||
pytestCheckHook,
|
||||
rdflib,
|
||||
types-jsonschema,
|
||||
}:
|
||||
|
||||
buildPythonPackage (finalAttrs: {
|
||||
pname = "shacl2code";
|
||||
version = "1.2.0";
|
||||
pyproject = true;
|
||||
|
||||
__structuredAttrs = true;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "JPEWdev";
|
||||
repo = "shacl2code";
|
||||
tag = "v${finalAttrs.version}";
|
||||
hash = "sha256-YGZLvJRoA0sMjTvYYChZMWtERjXLWgHe1WgzNEG9xGc=";
|
||||
};
|
||||
|
||||
build-system = [ hatchling ];
|
||||
|
||||
dependencies = [
|
||||
jinja2
|
||||
rdflib
|
||||
];
|
||||
|
||||
nativeCheckInputs = [
|
||||
jsonschema
|
||||
pyrefly
|
||||
pyright
|
||||
pyshacl
|
||||
pytest-cov-stub
|
||||
pytest-xdist
|
||||
pytestCheckHook
|
||||
types-jsonschema
|
||||
];
|
||||
|
||||
preCheck = ''
|
||||
export PATH="$out/bin:$PATH"
|
||||
'';
|
||||
|
||||
pythonImportsCheck = [ "shacl2code" ];
|
||||
|
||||
disabledTestPaths = [
|
||||
# Tests want to generate and run code
|
||||
"tests/test_context.py"
|
||||
"tests/test_cpp.py"
|
||||
"tests/test_golang.py"
|
||||
"tests/test_jsonschema.py"
|
||||
"tests/test_lint.py"
|
||||
"tests/test_python.py"
|
||||
"tests/test_rust.py"
|
||||
];
|
||||
|
||||
passthru.updateScript = nix-update-script { };
|
||||
|
||||
meta = {
|
||||
description = "Convert SHACL model to code bindings";
|
||||
homepage = "https://github.com/JPEWdev/shacl2code";
|
||||
changelog = "https://github.com/JPEWdev/shacl2code/releases/tag/${finalAttrs.src.tag}";
|
||||
license = lib.licenses.mit;
|
||||
maintainers = with lib.maintainers; [ fab ];
|
||||
};
|
||||
})
|
||||
@@ -18798,6 +18798,8 @@ self: super: with self; {
|
||||
|
||||
sh = callPackage ../development/python-modules/sh { };
|
||||
|
||||
shacl2code = callPackage ../development/python-modules/shacl2code { };
|
||||
|
||||
shamir-mnemonic = callPackage ../development/python-modules/shamir-mnemonic { };
|
||||
|
||||
shap = callPackage ../development/python-modules/shap { };
|
||||
|
||||
Reference in New Issue
Block a user