qdl: 2.6 -> 2.7

Switch to the new Meson build system.
This commit is contained in:
Morgan Jones 2026-06-15 11:22:27 -07:00
commit 38098ee064
No known key found for this signature in database
GPG key ID: 5C3EB94D198F1491

View file

@ -2,32 +2,56 @@
lib,
stdenv,
fetchFromGitHub,
fetchpatch2,
meson,
pkg-config,
libxml2,
libusb1,
libzip,
cmocka,
ninja,
nix-update-script,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "qdl";
version = "2.6";
version = "2.7";
src = fetchFromGitHub {
owner = "linux-msm";
repo = "qdl";
tag = "v${finalAttrs.version}";
hash = "sha256-/lvKMC0bJdfqhPCuBYChX/6Aybpu+cPg0Vjl2HDbOeE=";
hash = "sha256-oZ/1Pe81VOAmZiywSC2jC1OcDtaH84GAuo8AqiE77d4=";
};
nativeBuildInputs = [ pkg-config ];
patches = [
# allow VERSION to be overridden, will land in 2.8
(fetchpatch2 {
url = "https://github.com/linux-msm/qdl/commit/6f8700ed81b3614baa12786a9845c9abeab1e178.patch";
hash = "sha256-fDC34Wq4MadDDLHVQ5zuRKE2zD2dOMTU8EGINcJTYuI=";
})
];
nativeBuildInputs = [
meson
pkg-config
cmocka
ninja
];
buildInputs = [
libxml2
libusb1
libzip
];
makeFlags = [
"VERSION=${finalAttrs.src.rev}"
"prefix=${placeholder "out"}"
mesonFlags = [
"--prefix=${placeholder "out"}"
"-DVERSION=${finalAttrs.src.rev}"
# Tests currently fail to link but seem rather new
# https://github.com/linux-msm/qdl/issues/260
# test_contents_selectors.c:(.text+0x234e): undefined reference to `firehose_alloc_op'
"-Dtests=disabled"
];
enableParallelBuilding = true;