`librest` in Nixpkgs currently refers to the old 0.8 release. The current release version is 0.10, which is in Nixpkgs as `librest_1_0` (since both needed to coexist for some time while dependents were migrated). Since the old librest version was dependent on insecure libraries (libsoup 2.4) and has no in-tree dependents, we drop it. We also rename `librest_1_0` to `librest`, as that's the most straightforward name, and migrate it to `pkgs/by-name` for cleanliness.
79 lines
1.5 KiB
Nix
79 lines
1.5 KiB
Nix
{
|
|
lib,
|
|
stdenv,
|
|
fetchurl,
|
|
meson,
|
|
ninja,
|
|
pkg-config,
|
|
gi-docgen,
|
|
glib,
|
|
json-glib,
|
|
libsoup_3,
|
|
libxml2,
|
|
gobject-introspection,
|
|
gnome,
|
|
}:
|
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
|
pname = "librest";
|
|
version = "0.10.2";
|
|
|
|
outputs = [
|
|
"out"
|
|
"dev"
|
|
"devdoc"
|
|
];
|
|
|
|
src = fetchurl {
|
|
url = "mirror://gnome/sources/librest/${lib.versions.majorMinor finalAttrs.version}/librest-${finalAttrs.version}.tar.xz";
|
|
sha256 = "e2y5Ers6Is+n3PAFkl3LYogwJNsMCQmUhufWhRGFybg=";
|
|
};
|
|
|
|
strictDeps = true;
|
|
depsBuildBuild = [ pkg-config ];
|
|
nativeBuildInputs = [
|
|
meson
|
|
ninja
|
|
pkg-config
|
|
gi-docgen
|
|
gobject-introspection
|
|
];
|
|
|
|
propagatedBuildInputs = [
|
|
glib
|
|
json-glib
|
|
libsoup_3
|
|
libxml2
|
|
];
|
|
|
|
mesonFlags = [
|
|
"-Dexamples=false"
|
|
|
|
# Remove when https://gitlab.gnome.org/GNOME/librest/merge_requests/2 is merged.
|
|
"-Dca_certificates=true"
|
|
"-Dca_certificates_path=/etc/ssl/certs/ca-certificates.crt"
|
|
];
|
|
|
|
postFixup = ''
|
|
# Cannot be in postInstall, otherwise _multioutDocs hook in preFixup will move right back.
|
|
moveToOutput "share/doc" "$devdoc"
|
|
'';
|
|
|
|
separateDebugInfo = true;
|
|
|
|
passthru = {
|
|
updateScript = gnome.updateScript {
|
|
packageName = "librest";
|
|
versionPolicy = "odd-unstable";
|
|
};
|
|
};
|
|
|
|
meta = {
|
|
description = "Helper library for RESTful services";
|
|
homepage = "https://gitlab.gnome.org/GNOME/librest";
|
|
license = lib.licenses.lgpl21Only;
|
|
platforms = lib.platforms.unix;
|
|
teams = [ lib.teams.gnome ];
|
|
};
|
|
})
|