diff --git a/pkgs/by-name/re/redstore/package.nix b/pkgs/by-name/re/redstore/package.nix index f78fa7e98365..c4acda5f493b 100644 --- a/pkgs/by-name/re/redstore/package.nix +++ b/pkgs/by-name/re/redstore/package.nix @@ -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";