From 64b25014367bae25dc745324cf2d3682154a8556 Mon Sep 17 00:00:00 2001 From: Bernardo Meurer Date: Wed, 14 Jun 2023 12:59:56 -0400 Subject: [PATCH] qrcodegen: use llvm-ar when cc is clang This fixes the build on Darwin --- pkgs/development/libraries/qrcodegen/default.nix | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pkgs/development/libraries/qrcodegen/default.nix b/pkgs/development/libraries/qrcodegen/default.nix index 6212f6f53b99..eeb830d3fec4 100644 --- a/pkgs/development/libraries/qrcodegen/default.nix +++ b/pkgs/development/libraries/qrcodegen/default.nix @@ -16,6 +16,12 @@ stdenv.mkDerivation rec { sourceRoot = "source/c"; + nativeBuildInputs = lib.optionals stdenv.cc.isClang [ + stdenv.cc.cc.libllvm.out + ]; + + makeFlags = lib.optionals stdenv.cc.isClang [ "AR=llvm-ar" ]; + installPhase = '' runHook preInstall @@ -32,7 +38,6 @@ stdenv.mkDerivation rec { license = licenses.mit; maintainers = with maintainers; [ mcbeth AndersonTorres ]; platforms = platforms.unix; - broken = stdenv.isDarwin; }; } # TODO: build the other languages