redstore: fix build, modernize (#521471)

This commit is contained in:
7c6f434c
2026-05-18 13:55:31 +00:00
committed by GitHub
+15 -1
View File
@@ -8,17 +8,28 @@
zlib,
librdf_raptor2,
librdf_rasqal,
versionCheckHook,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "redstore";
version = "0.5.4";
__structuredAttrs = true;
strictDeps = true;
src = fetchurl {
url = "https://www.aelius.com/njh/redstore/redstore-${finalAttrs.version}.tar.gz";
sha256 = "0hc1fjfbfvggl72zqx27v4wy84f5m7bp4dnwd8g41aw8lgynbgaq";
hash = "sha256-WL1l/aOIq0Aeatw2ctepxRHkOdlHdPzFoe9tt5x0gUE=";
};
# source code tries to use `true` as a variable
# despite it being a reserved keyword
postPatch = ''
substituteInPlace ./src/redhttp/server.c --replace-fail \
'true' 'opt'
'';
nativeBuildInputs = [ pkg-config ];
buildInputs = [
gmp
@@ -35,6 +46,9 @@ stdenv.mkDerivation (finalAttrs: {
)
'';
nativeInstallCheckInputs = [ versionCheckHook ];
doInstallCheck = true;
meta = {
description = "HTTP interface to Redland RDF store";
mainProgram = "redstore";