2022-08-12 12:06:08 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, libxml2
|
2024-07-31 10:19:44 +00:00
|
|
|
, curl
|
2022-08-12 12:06:08 +00:00
|
|
|
, libxslt
|
|
|
|
, pkg-config
|
|
|
|
, cmake
|
|
|
|
, fetchFromGitHub
|
|
|
|
, perl
|
|
|
|
, bison
|
|
|
|
, flex
|
|
|
|
, fetchpatch
|
|
|
|
, static ? stdenv.hostPlatform.isStatic
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2020-11-15 13:44:38 +00:00
|
|
|
pname = "raptor2";
|
2024-10-11 05:15:48 +00:00
|
|
|
version = "2.0.16";
|
|
|
|
underscoredVersion = lib.strings.replaceStrings ["."] ["_"] version;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-08-12 12:06:08 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "dajobe";
|
|
|
|
repo = "raptor";
|
2024-10-11 05:15:48 +00:00
|
|
|
rev = "${pname}_${underscoredVersion}";
|
|
|
|
sha256 = "sha256-Eic63pV2p154YkSmkqWr86fGTr+XmVGy5l5/6q14LQM=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-08-12 12:06:08 +00:00
|
|
|
cmakeFlags = [
|
|
|
|
# Build defaults to static libraries.
|
|
|
|
"-DBUILD_SHARED_LIBS=${if static then "OFF" else "ON"}"
|
|
|
|
];
|
|
|
|
|
2020-11-15 13:44:38 +00:00
|
|
|
patches = [
|
2024-10-11 05:15:48 +00:00
|
|
|
# pull upstream fix for libxml2-2.11 API compatibility, part of unreleased 2.0.17
|
2023-08-04 22:07:22 +00:00
|
|
|
# https://github.com/dajobe/raptor/pull/58
|
|
|
|
(fetchpatch {
|
|
|
|
name = "libxml2-2.11.patch";
|
|
|
|
url = "https://github.com/dajobe/raptor/commit/4dbc4c1da2a033c497d84a1291c46f416a9cac51.patch";
|
|
|
|
hash = "sha256-fHfvncGymzMtxjwtakCNSr/Lem12UPIHAAcAac648w4=";
|
|
|
|
})
|
2020-11-15 13:44:38 +00:00
|
|
|
];
|
|
|
|
|
2022-08-12 12:06:08 +00:00
|
|
|
nativeBuildInputs = [ pkg-config cmake perl bison flex ];
|
2024-07-31 10:19:44 +00:00
|
|
|
buildInputs = [
|
|
|
|
curl
|
|
|
|
libxml2
|
|
|
|
libxslt
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
meta = {
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "RDF Parser Toolkit";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "rapper";
|
2021-08-05 21:33:18 +00:00
|
|
|
homepage = "https://librdf.org/raptor";
|
2021-02-05 17:12:51 +00:00
|
|
|
license = with lib.licenses; [ lgpl21 asl20 ];
|
|
|
|
maintainers = with lib.maintainers; [ marcweber ];
|
|
|
|
platforms = lib.platforms.unix;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|