Winter a19cd4ffb1 Revert "treewide: replace rev with tag"
This reverts commit 65a333600d5c88a98d674f637d092807cfc12253.

This wasn't tested for correctness with something like fodwatch [0],
and should not have been (self-)merged so quickly, especially without
further review.

It also resulted in the breakage of at least one package [1] (and that's
the one we know of and was caught).

A few packages that were updated in between this commit and this revert
were not reverted back to using `rev`, but other than that, this is a
1:1 revert.

[0]: https://codeberg.org/raphaelr/fodwatch
[1]: https://github.com/NixOS/nixpkgs/pull/396904 / 758551e4587d75882aebc21a04bee960418f8ce9
2025-04-08 02:57:25 -04:00

71 lines
1.6 KiB
Nix

{
stdenv,
lib,
bash,
fetchFromGitHub,
faust2jaqt,
faust2lv2,
}:
stdenv.mkDerivation rec {
pname = "faustPhysicalModeling";
version = "2.79.3";
src = fetchFromGitHub {
owner = "grame-cncm";
repo = "faust";
rev = version;
sha256 = "sha256-j5ADlKZriwLARpEJ/4xgvyAhF5ld9Hl2gXZS3NPJJj8=";
};
nativeBuildInputs = [
faust2jaqt
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;
buildPhase = ''
runHook preBuild
cd examples/physicalModeling
for f in *MIDI.dsp; do
faust2jaqt -time -vec -double -midi -nvoices 16 -t 99999 $f
faust2lv2 -time -vec -double -gui -nvoices 16 -t 99999 $f
done
runHook postBuild
'';
installPhase = ''
runHook preInstall
mkdir -p $out/lib/lv2 $out/bin
mv *.lv2/ $out/lib/lv2
for f in $(find . -executable -type f); do
cp $f $out/bin/
done
patchShebangs --host $out/bin
runHook postInstall
'';
meta = with lib; {
description = "Physical models included with faust compiled as jack standalone and lv2 instruments";
homepage = "https://github.com/grame-cncm/faust/tree/master-dev/examples/physicalModeling";
license = licenses.mit;
platforms = platforms.linux;
maintainers = with maintainers; [ magnetophon ];
# compiles stuff for the build platform, difficult to do properly
broken = stdenv.hostPlatform != stdenv.buildPlatform;
};
}