nixpkgs-suyu/pkgs/development/libraries/librest/default.nix
Colin 2231d48824 librest (0.8): don't build docs when cross compiling
librest_1_0 supports cross compilation (in staging: https://github.com/NixOS/nixpkgs/pull/223142),
but the old 0.8 version still doesn't. unlike 1.0 -- which builds with
meson -- librest 0.8 uses autotools with no obvious way to tell
`configure` to use the native gtk-doc, so just skip docs for cross
builds of this older version.
2023-04-07 03:29:47 +00:00

63 lines
1.4 KiB
Nix

{ lib
, stdenv
, fetchurl
, pkg-config
, glib
, libsoup
, libxml2
, gobject-introspection
, gtk-doc
, docbook-xsl-nons
, docbook_xml_dtd_412
, gnome
}:
stdenv.mkDerivation rec {
pname = "rest";
version = "0.8.1";
outputs = [ "out" "dev" "devdoc" ];
src = fetchurl {
url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
sha256 = "0513aad38e5d3cedd4ae3c551634e3be1b9baaa79775e53b2dba9456f15b01c9";
};
nativeBuildInputs = [
pkg-config
gobject-introspection
] ++ lib.optionals (stdenv.hostPlatform == stdenv.buildPlatform) [
gtk-doc
docbook-xsl-nons
docbook_xml_dtd_412
];
propagatedBuildInputs = [
glib
libsoup
libxml2
];
configureFlags = [
(lib.enableFeature (stdenv.hostPlatform == stdenv.buildPlatform) "gtk-doc")
# Remove when https://gitlab.gnome.org/GNOME/librest/merge_requests/2 is merged.
"--with-ca-certificates=/etc/ssl/certs/ca-certificates.crt"
];
passthru = {
updateScript = gnome.updateScript {
packageName = pname;
attrPath = "librest";
versionPolicy = "odd-unstable";
freeze = true;
};
};
meta = with lib; {
description = "Helper library for RESTful services";
homepage = "https://wiki.gnome.org/Projects/Librest";
license = licenses.lgpl21Only;
platforms = platforms.unix;
maintainers = teams.gnome.members;
};
}