Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at devShellTools-shell 70 lines 1.5 kB view raw
1{ 2 lib, 3 stdenv, 4 fetchurl, 5 doxygen, 6 mandoc, 7 meson, 8 ninja, 9 pkg-config, 10 python3, 11 sphinx, 12 sphinxygen, 13 writeScript, 14}: 15 16stdenv.mkDerivation (finalAttrs: { 17 pname = "serd"; 18 version = "0.32.4"; 19 20 outputs = [ 21 "out" 22 "dev" 23 "doc" 24 "man" 25 ]; 26 27 src = fetchurl { 28 url = "https://download.drobilla.net/serd-${finalAttrs.version}.tar.xz"; 29 hash = "sha256-y++1aejbaGvoxpyzhmqVOMfLBV6PJCF91qRHHv+n00k="; 30 }; 31 32 nativeBuildInputs = [ 33 doxygen 34 mandoc 35 meson 36 ninja 37 pkg-config 38 python3 39 sphinx 40 sphinxygen 41 ]; 42 43 postPatch = '' 44 patchShebangs . 45 ''; 46 47 passthru = { 48 updateScript = writeScript "update-poke" '' 49 #!/usr/bin/env nix-shell 50 #!nix-shell -i bash -p curl pcre common-updater-scripts 51 52 set -eu -o pipefail 53 54 # Expect the text in format of 'download.drobilla.net/serd-0.30.16.tar.xz">' 55 new_version="$(curl -s https://drobilla.net/category/serd/ | 56 pcregrep -o1 'download.drobilla.net/serd-([0-9.]+).tar.xz' | 57 head -n1)" 58 update-source-version ${finalAttrs.pname} "$new_version" 59 ''; 60 }; 61 62 meta = { 63 description = "Lightweight C library for RDF syntax which supports reading and writing Turtle and NTriples"; 64 homepage = "https://drobilla.net/software/serd"; 65 license = lib.licenses.isc; 66 maintainers = with lib.maintainers; [ samueltardieu ]; 67 mainProgram = "serdi"; 68 platforms = lib.platforms.unix; 69 }; 70})