nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 stdenv,
3 lib,
4 bash,
5 fetchFromGitHub,
6 faust2jaqt,
7 faust2lv2,
8}:
9stdenv.mkDerivation (finalAttrs: {
10 pname = "faustPhysicalModeling";
11 version = "2.83.1";
12
13 src = fetchFromGitHub {
14 owner = "grame-cncm";
15 repo = "faust";
16 rev = finalAttrs.version;
17 sha256 = "sha256-c1I5ha9QvnC7jKdycAhW/iAzUcEA7NopXAquIS001Y8=";
18 };
19
20 nativeBuildInputs = [
21 faust2jaqt
22 faust2lv2
23 ];
24
25 buildInputs = [
26 bash
27 ];
28
29 dontWrapQtApps = true;
30
31 buildPhase = ''
32 runHook preBuild
33
34 cd examples/physicalModeling
35
36 for f in *MIDI.dsp; do
37 faust2jaqt -time -vec -double -midi -nvoices 16 -t 99999 $f
38 faust2lv2 -time -vec -double -gui -nvoices 16 -t 99999 $f
39 done
40
41 runHook postBuild
42 '';
43
44 installPhase = ''
45 runHook preInstall
46
47 mkdir -p $out/lib/lv2 $out/bin
48 mv *.lv2/ $out/lib/lv2
49 for f in $(find . -executable -type f); do
50 cp $f $out/bin/
51 done
52 patchShebangs --host $out/bin
53
54 runHook postInstall
55 '';
56
57 meta = {
58 description = "Physical models included with faust compiled as jack standalone and lv2 instruments";
59 homepage = "https://github.com/grame-cncm/faust/tree/master-dev/examples/physicalModeling";
60 license = lib.licenses.mit;
61 platforms = lib.platforms.linux;
62 maintainers = with lib.maintainers; [ magnetophon ];
63 # compiles stuff for the build platform, difficult to do properly
64 broken = stdenv.hostPlatform != stdenv.buildPlatform;
65 };
66})