diff --git a/pkgs/by-name/qd/qdl/package.nix b/pkgs/by-name/qd/qdl/package.nix index fcd080c60d05..bde84a5f85f2 100644 --- a/pkgs/by-name/qd/qdl/package.nix +++ b/pkgs/by-name/qd/qdl/package.nix @@ -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;