faust2: fix cross / strictDeps build (#370582)
This commit is contained in:
commit
3a91516f16
@ -78,12 +78,24 @@ let
|
|||||||
passthru = { inherit wrap wrapWithBuildEnv faust2ApplBase; };
|
passthru = { inherit wrap wrapWithBuildEnv faust2ApplBase; };
|
||||||
|
|
||||||
preConfigure = ''
|
preConfigure = ''
|
||||||
|
# include llvm-config in path
|
||||||
|
export PATH="${lib.getDev llvm_18}/bin:$PATH"
|
||||||
cd build
|
cd build
|
||||||
sed -i 's@LIBNCURSES_PATH ?= .*@LIBNCURSES_PATH ?= ${ncurses_static}/lib/libncurses.a@' Make.llvm.static
|
|
||||||
substituteInPlace Make.llvm.static \
|
substituteInPlace Make.llvm.static \
|
||||||
--replace 'mkdir -p $@ && cd $@ && ar -x ../../$<' 'mkdir -p $@ && cd $@ && ar -x ../source/build/lib/libfaust.a && cd ../source/build/'
|
--replace 'mkdir -p $@ && cd $@ && ar -x ../../$<' 'mkdir -p $@ && cd $@ && ar -x ../source/build/lib/libfaust.a && cd ../source/build/'
|
||||||
substituteInPlace Make.llvm.static \
|
substituteInPlace Make.llvm.static \
|
||||||
--replace 'rm -rf $(TMP)' ' '
|
--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
|
||||||
|
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
|
||||||
|
echo $f "llvm-config${lib.optionalString (stdenv.hostPlatform != stdenv.buildPlatform) "-native"}"
|
||||||
|
substituteInPlace $f \
|
||||||
|
--replace-quiet "llvm-config" "llvm-config${lib.optionalString (stdenv.hostPlatform != stdenv.buildPlatform) "-native"}"
|
||||||
|
done
|
||||||
|
shopt -u globstar
|
||||||
|
cd build
|
||||||
'';
|
'';
|
||||||
|
|
||||||
cmakeFlags = [
|
cmakeFlags = [
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
{
|
{
|
||||||
|
bash,
|
||||||
faust,
|
faust,
|
||||||
jack2,
|
jack2,
|
||||||
qtbase,
|
qtbase,
|
||||||
@ -32,6 +33,10 @@ faust.wrapWithBuildEnv {
|
|||||||
"faust2jackserver"
|
"faust2jackserver"
|
||||||
];
|
];
|
||||||
|
|
||||||
|
buildInputs = [
|
||||||
|
bash
|
||||||
|
];
|
||||||
|
|
||||||
propagatedBuildInputs = [
|
propagatedBuildInputs = [
|
||||||
jack2
|
jack2
|
||||||
qtbase
|
qtbase
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
{
|
{
|
||||||
|
bash,
|
||||||
boost,
|
boost,
|
||||||
faust,
|
faust,
|
||||||
lv2,
|
lv2,
|
||||||
@ -9,6 +10,10 @@ faust.wrapWithBuildEnv {
|
|||||||
|
|
||||||
baseName = "faust2lv2";
|
baseName = "faust2lv2";
|
||||||
|
|
||||||
|
buildInputs = [
|
||||||
|
bash
|
||||||
|
];
|
||||||
|
|
||||||
propagatedBuildInputs = [
|
propagatedBuildInputs = [
|
||||||
boost
|
boost
|
||||||
lv2
|
lv2
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
{
|
{
|
||||||
stdenv,
|
stdenv,
|
||||||
lib,
|
lib,
|
||||||
|
bash,
|
||||||
fetchFromGitHub,
|
fetchFromGitHub,
|
||||||
faust2jaqt,
|
faust2jaqt,
|
||||||
faust2lv2,
|
faust2lv2,
|
||||||
@ -16,28 +17,45 @@ stdenv.mkDerivation rec {
|
|||||||
sha256 = "sha256-CADiJXyB4FivQjbh1nhpAVgCkTi1pW/vtXKXfL7o7xU=";
|
sha256 = "sha256-CADiJXyB4FivQjbh1nhpAVgCkTi1pW/vtXKXfL7o7xU=";
|
||||||
};
|
};
|
||||||
|
|
||||||
buildInputs = [
|
nativeBuildInputs = [
|
||||||
faust2jaqt
|
faust2jaqt
|
||||||
faust2lv2
|
faust2lv2
|
||||||
];
|
];
|
||||||
|
|
||||||
|
buildInputs = [
|
||||||
|
bash
|
||||||
|
];
|
||||||
|
|
||||||
|
# ld: /nix/store/*-gcc-14-20241116/lib/gcc/x86_64-unknown-linux-gnu/14.2.1/crtbegin.o:
|
||||||
|
# relocation R_X86_64_32 against hidden symbol `__TMC_END__' can not be used when making a PIE object
|
||||||
|
hardeningDisable = [ "pie" ];
|
||||||
|
|
||||||
dontWrapQtApps = true;
|
dontWrapQtApps = true;
|
||||||
|
|
||||||
buildPhase = ''
|
buildPhase = ''
|
||||||
|
runHook preBuild
|
||||||
|
|
||||||
cd examples/physicalModeling
|
cd examples/physicalModeling
|
||||||
|
|
||||||
for f in *MIDI.dsp; do
|
for f in *MIDI.dsp; do
|
||||||
faust2jaqt -time -vec -double -midi -nvoices 16 -t 99999 $f
|
faust2jaqt -time -vec -double -midi -nvoices 16 -t 99999 $f
|
||||||
faust2lv2 -time -vec -double -gui -nvoices 16 -t 99999 $f
|
faust2lv2 -time -vec -double -gui -nvoices 16 -t 99999 $f
|
||||||
done
|
done
|
||||||
|
|
||||||
|
runHook postBuild
|
||||||
'';
|
'';
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
|
runHook preInstall
|
||||||
|
|
||||||
mkdir -p $out/lib/lv2 $out/bin
|
mkdir -p $out/lib/lv2 $out/bin
|
||||||
mv *.lv2/ $out/lib/lv2
|
mv *.lv2/ $out/lib/lv2
|
||||||
for f in $(find . -executable -type f); do
|
for f in $(find . -executable -type f); do
|
||||||
cp $f $out/bin/
|
cp $f $out/bin/
|
||||||
done
|
done
|
||||||
|
patchShebangs --host $out/bin
|
||||||
|
|
||||||
|
runHook postInstall
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
@ -46,5 +64,7 @@ stdenv.mkDerivation rec {
|
|||||||
license = licenses.mit;
|
license = licenses.mit;
|
||||||
platforms = platforms.linux;
|
platforms = platforms.linux;
|
||||||
maintainers = with maintainers; [ magnetophon ];
|
maintainers = with maintainers; [ magnetophon ];
|
||||||
|
# compiles stuff for the build platform, difficult to do properly
|
||||||
|
broken = stdenv.hostPlatform != stdenv.buildPlatform;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user