at master 1.7 kB view raw
1{ 2 lib, 3 stdenv, 4 fetchurl, 5 pkg-config, 6 glib, 7 libsoup_2_4, 8 libxml2, 9 gobject-introspection, 10 gtk-doc, 11 docbook-xsl-nons, 12 docbook_xml_dtd_412, 13 gnome, 14}: 15 16stdenv.mkDerivation rec { 17 pname = "rest"; 18 version = "0.8.1"; 19 20 outputs = [ 21 "out" 22 "dev" 23 "devdoc" 24 ]; 25 26 src = fetchurl { 27 url = "mirror://gnome/sources/rest/${lib.versions.majorMinor version}/rest-${version}.tar.xz"; 28 sha256 = "0513aad38e5d3cedd4ae3c551634e3be1b9baaa79775e53b2dba9456f15b01c9"; 29 }; 30 31 nativeBuildInputs = [ 32 pkg-config 33 gobject-introspection 34 ] 35 ++ lib.optionals (stdenv.buildPlatform.canExecute stdenv.hostPlatform) [ 36 gtk-doc 37 docbook-xsl-nons 38 docbook_xml_dtd_412 39 ]; 40 41 propagatedBuildInputs = [ 42 glib 43 libsoup_2_4 44 libxml2 45 ]; 46 47 strictDeps = true; 48 49 configureFlags = [ 50 (lib.enableFeature (stdenv.buildPlatform.canExecute stdenv.hostPlatform) "gtk-doc") 51 # Remove when https://gitlab.gnome.org/GNOME/librest/merge_requests/2 is merged. 52 "--with-ca-certificates=/etc/ssl/certs/ca-certificates.crt" 53 ]; 54 55 postPatch = '' 56 # pkg-config doesn't look in $PATH if strictDeps is on 57 substituteInPlace ./configure \ 58 --replace-fail 'have_gtk_doc=no' "echo gtk-doc is present" 59 ''; 60 61 passthru = { 62 updateScript = gnome.updateScript { 63 packageName = "rest"; 64 attrPath = "librest"; 65 versionPolicy = "odd-unstable"; 66 freeze = true; 67 }; 68 }; 69 70 meta = with lib; { 71 description = "Helper library for RESTful services"; 72 homepage = "https://gitlab.gnome.org/GNOME/librest"; 73 license = licenses.lgpl21Only; 74 platforms = platforms.unix; 75 teams = [ teams.gnome ]; 76 }; 77}