From b5b7dd6165067d8826bbc089b75b907c6bae6c71 Mon Sep 17 00:00:00 2001 From: Bart Brouns Date: Tue, 30 Sep 2025 11:14:59 +0200 Subject: [PATCH] faust: 2.79.3 -> 2.81.10 --- pkgs/by-name/fa/faust2/package.nix | 33 ++++++++++++++++++++++-------- 1 file changed, 25 insertions(+), 8 deletions(-) diff --git a/pkgs/by-name/fa/faust2/package.nix b/pkgs/by-name/fa/faust2/package.nix index 179b8b2507a9..ade2b062a30e 100644 --- a/pkgs/by-name/fa/faust2/package.nix +++ b/pkgs/by-name/fa/faust2/package.nix @@ -13,6 +13,7 @@ libmicrohttpd, gnutls, libtasn1, + libtool, libxml2, p11-kit, vim, @@ -23,13 +24,13 @@ let - version = "2.79.3"; + version = "2.81.10"; src = fetchFromGitHub { owner = "grame-cncm"; repo = "faust"; tag = version; - hash = "sha256-Rn+Cjpk4vttxARrkDSnpKdBdSRtgElsit8zu1BA8Jd4="; + hash = "sha256-xmaZY1jFIZQjWlQkJ+uHC4tY4pFPLJ+fKSbktIZkBFI="; fetchSubmodules = true; }; @@ -59,6 +60,7 @@ let makeWrapper pkg-config cmake + libtool vim which ]; @@ -81,12 +83,27 @@ let # include llvm-config in path export PATH="${lib.getDev llvm_18}/bin:$PATH" cd build + + '' + + lib.optionalString stdenv.hostPlatform.isDarwin '' + # Darwin cannot use 'libtool -static' + echo "Disabling static LLVM build on Darwin" + # Replace the whole static target with a no-op + printf 'all:\n\t@echo "Static LLVM build disabled on Darwin"\n' > Make.llvm.static + '' + + lib.optionalString stdenv.hostPlatform.isLinux '' substituteInPlace Make.llvm.static \ - --replace 'mkdir -p $@ && cd $@ && ar -x ../../$<' 'mkdir -p $@ && cd $@ && ar -x ../source/build/lib/libfaust.a && cd ../source/build/' + --replace-fail 'mkdir -p $@ && cd $@ && ar -x ../../$<' \ + 'mkdir -p $@ && cd $@ && ar -x ../source/build/lib/libfaust.a && cd ../source/build/' substituteInPlace Make.llvm.static \ - --replace 'rm -rf $(TMP)' ' ' \ - --replace-fail "ar" "${stdenv.cc.targetPrefix}ar" - sed -i 's@LIBNCURSES_PATH ?= .*@LIBNCURSES_PATH ?= ${ncurses_static}/lib/libncurses.a@' Make.llvm.static + --replace-fail 'rm -rf $(TMP)' ' ' \ + --replace-fail " ar " " ${stdenv.cc.targetPrefix}ar " + sed -i \ + 's@LIBNCURSES_PATH ?= .*@LIBNCURSES_PATH ?= ${ncurses_static}/lib/libncurses.a@' \ + Make.llvm.static + '' + + '' + cd .. shopt -s globstar for f in **/Makefile **/Makefile.library **/CMakeLists.txt build/Make.llvm.static embedded/faustjava/faust2engine architecture/autodiff/autodiff.sh source/tools/faust2appls/* **/llvm.cmake tools/benchmark/faust2object; do @@ -116,7 +133,7 @@ let # not used as an executable, so patch 'uname' usage directly # rather than use makeWrapper. substituteInPlace "$out"/bin/faustoptflags \ - --replace uname "${coreutils}/bin/uname" + --replace-fail uname "${coreutils}/bin/uname" # wrapper for scripts that don't need faust.wrap* for script in "$out"/bin/faust2*; do @@ -180,7 +197,7 @@ let # 'faustoptflags' to absolute paths. for script in "$out"/bin/*; do substituteInPlace "$script" \ - --replace " error " "echo" + --replace-quiet " error " "echo" done '';