1{ lib
2, stdenv
3, fetchurl
4, pkg-config
5, glib
6, libsoup
7, libxml2
8, gobject-introspection
9, gtk-doc
10, docbook-xsl-nons
11, docbook_xml_dtd_412
12, gnome
13}:
14
15stdenv.mkDerivation rec {
16 pname = "rest";
17 version = "0.8.1";
18
19 outputs = [ "out" "dev" "devdoc" ];
20
21 src = fetchurl {
22 url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
23 sha256 = "0513aad38e5d3cedd4ae3c551634e3be1b9baaa79775e53b2dba9456f15b01c9";
24 };
25
26 nativeBuildInputs = [
27 pkg-config
28 gobject-introspection
29 ] ++ lib.optionals (stdenv.hostPlatform == stdenv.buildPlatform) [
30 gtk-doc
31 docbook-xsl-nons
32 docbook_xml_dtd_412
33 ];
34
35 propagatedBuildInputs = [
36 glib
37 libsoup
38 libxml2
39 ];
40
41 configureFlags = [
42 (lib.enableFeature (stdenv.hostPlatform == stdenv.buildPlatform) "gtk-doc")
43 # Remove when https://gitlab.gnome.org/GNOME/librest/merge_requests/2 is merged.
44 "--with-ca-certificates=/etc/ssl/certs/ca-certificates.crt"
45 ];
46
47 passthru = {
48 updateScript = gnome.updateScript {
49 packageName = pname;
50 attrPath = "librest";
51 versionPolicy = "odd-unstable";
52 freeze = true;
53 };
54 };
55
56 meta = with lib; {
57 description = "Helper library for RESTful services";
58 homepage = "https://wiki.gnome.org/Projects/Librest";
59 license = licenses.lgpl21Only;
60 platforms = platforms.unix;
61 maintainers = teams.gnome.members;
62 };
63}