rauc: switch buildsystem to meson

Adjust the buildsystem to use meson instead of autotools and add
additional dependencies. Also add a page to install the man page when
using meson.
This commit is contained in:
Rouven Czerwinski 2023-03-05 23:47:12 +00:00
parent a2393d3647
commit b2d958c94f

View file

@ -1,7 +1,7 @@
{ autoreconfHook
, curl
{ curl
, dbus
, fetchFromGitHub
, fetchpatch
, glib
, json-glib
, lib
@ -9,6 +9,11 @@
, openssl
, pkg-config
, stdenv
, meson
, ninja
, util-linux
, libnl
, systemd
}:
stdenv.mkDerivation rec {
@ -22,21 +27,29 @@ stdenv.mkDerivation rec {
sha256 = "sha256-VpHcJUTRZ5aJyfYypjVsYyRNrK0+9ci42mmlZQSkWAk=";
};
patches = [
(fetchpatch {
# Patch to install the man page when using meson, remove on package bump
url = "https://github.com/rauc/rauc/commit/756c677d031c435070a6900e6778d06961822261.patch";
hash = "sha256-QgIUagioRo61PeC0JyKjZtnauFiYP1Fz9wrxGEikBGI=";
})
];
passthru = {
updateScript = nix-update-script { };
};
enableParallelBuilding = true;
nativeBuildInputs = [ pkg-config autoreconfHook ];
nativeBuildInputs = [ pkg-config meson ninja ];
buildInputs = [ curl dbus glib json-glib openssl ];
buildInputs = [ curl dbus glib json-glib openssl util-linux libnl systemd ];
configureFlags = [
"--with-systemdunitdir=${placeholder "out"}/lib/systemd/system"
"--with-dbusinterfacesdir=${placeholder "out"}/share/dbus-1/interfaces"
"--with-dbuspolicydir=${placeholder "out"}/share/dbus-1/system.d"
"--with-dbussystemservicedir=${placeholder "out"}/share/dbus-1/system-services"
mesonFlags = [
"--buildtype=release"
(lib.mesonOption "systemdunitdir" "${placeholder "out"}/lib/systemd/system")
(lib.mesonOption "dbusinterfacesdir" "${placeholder "out"}/share/dbus-1/interfaces")
(lib.mesonOption "dbuspolicydir" "${placeholder "out"}/share/dbus-1/system.d")
(lib.mesonOption "dbussystemservicedir" "${placeholder "out"}/share/dbus-1/system-services")
];
meta = with lib; {