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