Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

69 lines
1.5 KiB
Nix
Raw Permalink Normal View History

2023-02-01 17:51:44 +01:00
{
lib,
rustPlatform,
fetchFromGitHub,
installShellFiles,
2023-02-01 17:51:44 +01:00
}:
2025-05-30 22:27:47 +02:00
let
features = [
"rustls-webpki"
"geosparql"
];
in
rustPlatform.buildRustPackage (finalAttrs: {
2023-02-01 17:51:44 +01:00
pname = "oxigraph";
2025-05-26 02:44:59 +00:00
version = "0.4.11";
2023-02-01 17:51:44 +01:00
src = fetchFromGitHub {
2025-05-25 02:53:02 +02:00
owner = "oxigraph";
repo = "oxigraph";
2025-05-30 22:27:47 +02:00
tag = "v${finalAttrs.version}";
2025-05-26 02:44:59 +00:00
hash = "sha256-M5C+SNZYXKfcosnRe9a+Zicyjuo6wli2uWv/SJxufJc=";
2023-02-01 17:51:44 +01:00
fetchSubmodules = true;
};
2025-05-26 02:44:59 +00:00
cargoHash = "sha256-TgeHmCMwXK+OlTGIyzus/N+MY29lgK+JuzUBwVFbpsI=";
2023-02-01 17:51:44 +01:00
nativeBuildInputs = [
rustPlatform.bindgenHook
installShellFiles
2023-02-01 17:51:44 +01:00
];
buildAndTestSubdir = "cli";
buildNoDefaultFeatures = true;
2025-05-30 22:27:47 +02:00
buildFeatures = features;
2023-02-01 17:51:44 +01:00
# Man pages and autocompletion
postInstall = ''
MAN_DIR="$(find target/*/release -name man)"
installManPage "$MAN_DIR"/*.1
COMPLETE_DIR="$(find target/*/release -name complete)"
installShellCompletion --bash --name oxigraph.bash "$COMPLETE_DIR/oxigraph.bash"
installShellCompletion --fish --name oxigraph.fish "$COMPLETE_DIR/oxigraph.fish"
installShellCompletion --zsh --name _oxigraph "$COMPLETE_DIR/_oxigraph"
'';
cargoCheckNoDefaultFeatures = true;
2025-05-30 22:27:47 +02:00
cargoCheckFeatures = features;
2023-02-01 17:51:44 +01:00
2025-05-30 22:27:47 +02:00
meta = {
2023-02-01 17:51:44 +01:00
homepage = "https://github.com/oxigraph/oxigraph";
description = "SPARQL graph database";
platforms = [
"x86_64-linux"
"aarch64-linux"
"aarch64-darwin"
];
2025-05-30 22:27:47 +02:00
maintainers = with lib.maintainers; [
2025-05-30 22:22:34 +02:00
astro
tnias
];
2025-05-30 22:27:47 +02:00
license = with lib.licenses; [
2023-02-01 17:51:44 +01:00
asl20
mit
];
mainProgram = "oxigraph";
2023-02-01 17:51:44 +01:00
};
2025-05-30 22:27:47 +02:00
})