From bc94793fcea206f3c1808b274d9f37e2db1f5b44 Mon Sep 17 00:00:00 2001 From: FliegendeWurst Date: Sun, 6 Apr 2025 16:29:51 +0200 Subject: [PATCH] qdl: fix cross build, remove unneeded dependency, drop installPhase --- pkgs/by-name/qd/qdl/package.nix | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/pkgs/by-name/qd/qdl/package.nix b/pkgs/by-name/qd/qdl/package.nix index 7edc70d122c7..c528c5c61d0c 100644 --- a/pkgs/by-name/qd/qdl/package.nix +++ b/pkgs/by-name/qd/qdl/package.nix @@ -9,7 +9,7 @@ unstableGitUpdater, }: -stdenv.mkDerivation { +stdenv.mkDerivation (finalAttrs: { pname = "qdl"; version = "unstable-2024-06-10"; @@ -20,18 +20,20 @@ stdenv.mkDerivation { sha256 = "sha256-0PeOunYXY0nEEfGFGdguf5+GNN950GhPfMaD8h1ez/8="; }; + postPatch = '' + substituteInPlace Makefile --replace-fail 'pkg-config' '${stdenv.cc.targetPrefix}pkg-config' + ''; + nativeBuildInputs = [ pkg-config ]; buildInputs = [ - systemd libxml2 libusb1 ]; - installPhase = '' - runHook preInstall - install -Dm755 ./qdl -t $out/bin - runHook postInstall - ''; + makeFlags = [ + "VERSION=${finalAttrs.src.rev}" + "prefix=${placeholder "out"}" + ]; meta = with lib; { homepage = "https://github.com/linux-msm/qdl"; @@ -46,4 +48,4 @@ stdenv.mkDerivation { }; passthru.updateScript = unstableGitUpdater { }; -} +})