2023-03-15 16:39:30 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchurl
|
|
|
|
, doxygen
|
|
|
|
, mandoc
|
|
|
|
, meson
|
|
|
|
, ninja
|
|
|
|
, pkg-config
|
|
|
|
, python3
|
|
|
|
, sphinx
|
|
|
|
, writeScript
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "serd";
|
2023-03-15 16:39:30 +00:00
|
|
|
version = "0.30.16";
|
|
|
|
|
|
|
|
outputs = [ "out" "dev" "doc" "man" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2023-03-15 16:39:30 +00:00
|
|
|
url = "https://download.drobilla.net/${pname}-${version}.tar.xz";
|
|
|
|
hash = "sha256-9Q9IbaUZzdjQOyDJ5CQU5FkTP1okRBHY5jyu+NmskUY=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2023-03-15 16:39:30 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
doxygen
|
|
|
|
mandoc
|
|
|
|
meson
|
|
|
|
ninja
|
|
|
|
pkg-config
|
|
|
|
python3
|
|
|
|
sphinx
|
|
|
|
];
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
patchShebangs .
|
|
|
|
'';
|
|
|
|
|
|
|
|
passthru = {
|
|
|
|
updateScript = writeScript "update-poke" ''
|
|
|
|
#!/usr/bin/env nix-shell
|
|
|
|
#!nix-shell -i bash -p curl pcre common-updater-scripts
|
2021-10-17 02:12:59 +00:00
|
|
|
|
2023-03-15 16:39:30 +00:00
|
|
|
set -eu -o pipefail
|
|
|
|
|
|
|
|
# Expect the text in format of 'download.drobilla.net/serd-0.30.16.tar.xz">'
|
|
|
|
new_version="$(curl -s https://drobilla.net/category/serd/ |
|
|
|
|
pcregrep -o1 'download.drobilla.net/serd-([0-9.]+).tar.xz' |
|
|
|
|
head -n1)"
|
|
|
|
update-source-version ${pname} "$new_version"
|
|
|
|
'';
|
|
|
|
};
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "A lightweight C library for RDF syntax which supports reading and writing Turtle and NTriples";
|
2023-03-15 16:39:30 +00:00
|
|
|
homepage = "https://drobilla.net/software/serd";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = [ maintainers.goibhniu ];
|
2022-05-18 14:49:53 +00:00
|
|
|
mainProgram = "serdi";
|
2020-08-20 17:08:02 +00:00
|
|
|
platforms = platforms.unix;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|