From 759e3dfeb0ca8ac6a08d2aed714912b1cf361198 Mon Sep 17 00:00:00 2001 From: Grimmauld Date: Sun, 11 May 2025 13:14:10 +0200 Subject: [PATCH] librdf_rasqal: remove pcre Upstream declared the fallback to `regex.h` sufficient for functionality [1]. Fedora also disabled pcre for rasqal back in 2023 [2]. [1] https://github.com/dajobe/rasqal/issues/12#issuecomment-1713075496 [2] https://src.fedoraproject.org/rpms/rasqal/c/89316c895ce79ce3441686eb45f9a8b3943b0933?branch=rawhide --- pkgs/development/libraries/librdf/rasqal.nix | 21 +++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/pkgs/development/libraries/librdf/rasqal.nix b/pkgs/development/libraries/librdf/rasqal.nix index f8af85bfb50e..1cc684ae5d30 100644 --- a/pkgs/development/libraries/librdf/rasqal.nix +++ b/pkgs/development/libraries/librdf/rasqal.nix @@ -5,17 +5,17 @@ librdf_raptor2, gmp, pkg-config, - pcre, libxml2, perl, + testers, }: -stdenv.mkDerivation rec { +stdenv.mkDerivation (finalAttrs: { pname = "rasqal"; version = "0.9.33"; src = fetchurl { - url = "http://download.librdf.org/source/rasqal-${version}.tar.gz"; + url = "http://download.librdf.org/source/rasqal-${finalAttrs.version}.tar.gz"; sha256 = "0z6rrwn4jsagvarg8d5zf0j352kjgi33py39jqd29gbhcnncj939"; }; @@ -23,18 +23,28 @@ stdenv.mkDerivation rec { buildInputs = [ gmp - pcre libxml2 ]; propagatedBuildInputs = [ librdf_raptor2 ]; + confiugureFlags = [ + # uses 'regex.h' as a fallback, which is preferrable + "--disable-pcre" + ]; + postInstall = "rm -rvf $out/share/gtk-doc"; nativeCheckInputs = [ perl ]; doCheck = false; # fails with "No testsuite plan file sparql-query-plan.ttl could be created in build/..." doInstallCheck = false; # fails with "rasqal-config does not support (--help|--version)" + passthru.tests = { + # rasqal-config --version just checks the pkg-config module. + # That check is broken, checking the pkg-config ourselves is a good replacement. + pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage; + }; + meta = { description = "Library that handles Resource Description Framework (RDF)"; homepage = "https://librdf.org/rasqal"; @@ -44,5 +54,6 @@ stdenv.mkDerivation rec { ]; maintainers = with lib.maintainers; [ marcweber ]; platforms = lib.platforms.unix; + pkgConfigModules = [ "rasqal" ]; }; -} +})