nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at devShellTools-shell 68 lines 1.6 kB view raw
1{ 2 lib, 3 rustPlatform, 4 fetchFromGitHub, 5 installShellFiles, 6}: 7 8let 9 features = [ 10 "rustls-webpki" 11 "geosparql" 12 ]; 13in 14rustPlatform.buildRustPackage (finalAttrs: { 15 pname = "oxigraph"; 16 version = "0.4.11"; 17 18 src = fetchFromGitHub { 19 owner = "oxigraph"; 20 repo = "oxigraph"; 21 tag = "v${finalAttrs.version}"; 22 hash = "sha256-M5C+SNZYXKfcosnRe9a+Zicyjuo6wli2uWv/SJxufJc="; 23 fetchSubmodules = true; 24 }; 25 26 cargoHash = "sha256-TgeHmCMwXK+OlTGIyzus/N+MY29lgK+JuzUBwVFbpsI="; 27 28 nativeBuildInputs = [ 29 rustPlatform.bindgenHook 30 installShellFiles 31 ]; 32 33 buildAndTestSubdir = "cli"; 34 buildNoDefaultFeatures = true; 35 buildFeatures = features; 36 37 # Man pages and autocompletion 38 postInstall = '' 39 MAN_DIR="$(find target/*/release -name man)" 40 installManPage "$MAN_DIR"/*.1 41 COMPLETE_DIR="$(find target/*/release -name complete)" 42 installShellCompletion --bash --name oxigraph.bash "$COMPLETE_DIR/oxigraph.bash" 43 installShellCompletion --fish --name oxigraph.fish "$COMPLETE_DIR/oxigraph.fish" 44 installShellCompletion --zsh --name _oxigraph "$COMPLETE_DIR/_oxigraph" 45 ''; 46 47 cargoCheckNoDefaultFeatures = true; 48 cargoCheckFeatures = features; 49 50 meta = { 51 homepage = "https://github.com/oxigraph/oxigraph"; 52 description = "SPARQL graph database"; 53 platforms = [ 54 "x86_64-linux" 55 "aarch64-linux" 56 "aarch64-darwin" 57 ]; 58 maintainers = with lib.maintainers; [ 59 astro 60 tnias 61 ]; 62 license = with lib.licenses; [ 63 asl20 64 mit 65 ]; 66 mainProgram = "oxigraph"; 67 }; 68})