1{
2 stdenv,
3 apple-sdk_15,
4 buildPythonPackage,
5 fetchFromGitHub,
6 lib,
7 pkg-config,
8 pythonOlder,
9 pytestCheckHook,
10 rustPlatform,
11}:
12buildPythonPackage rec {
13 pname = "pyoxigraph";
14 pyproject = true;
15 version = "0.4.11";
16
17 src = fetchFromGitHub {
18 owner = "oxigraph";
19 repo = "oxigraph";
20 tag = "v${version}";
21 fetchSubmodules = true;
22 hash = "sha256-M5C+SNZYXKfcosnRe9a+Zicyjuo6wli2uWv/SJxufJc=";
23 };
24
25 cargoDeps = rustPlatform.fetchCargoVendor {
26 inherit pname version src;
27 hash = "sha256-TgeHmCMwXK+OlTGIyzus/N+MY29lgK+JuzUBwVFbpsI=";
28 };
29
30 buildAndTestSubdir = "python";
31
32 dependencies = lib.optionals stdenv.hostPlatform.isDarwin [
33 apple-sdk_15
34 ];
35
36 disabled = pythonOlder "3.8";
37
38 disabledTests = [
39 "test_update_load"
40 ];
41
42 disabledTestPaths = [
43 # These require network access
44 "lints/test_spec_links.py"
45 "lints/test_debian_compatibility.py"
46 "oxrocksdb-sys/rocksdb/tools/block_cache_analyzer/block_cache_pysim_test.py"
47 "oxrocksdb-sys/rocksdb/tools"
48 ];
49
50 nativeBuildInputs = [
51 pkg-config
52 rustPlatform.bindgenHook
53 rustPlatform.cargoSetupHook
54 rustPlatform.maturinBuildHook
55 ];
56
57 nativeCheckInputs = [ pytestCheckHook ];
58 pythonImportsCheck = [ "pyoxigraph" ];
59
60 meta = {
61 homepage = "https://github.com/oxigraph/oxigraph";
62 description = "SPARQL graph database";
63 maintainers = with lib.maintainers; [ dadada ];
64 license = with lib.licenses; [
65 asl20
66 mit
67 ];
68 platforms = lib.platforms.unix;
69 };
70}