···11-{ lib, stdenv
22-, coreutils
33-, fetchurl
44-, makeWrapper
55-, pkg-config
66-}:
77-88-with lib.strings;
99-1010-let
1111-1212- version = "0.9.90";
1313-1414- src = fetchurl {
1515- url = "mirror://sourceforge/project/faudiostream/faust-${version}.tgz";
1616- sha256 = "0d1fqwymyfb73zkmpwv4zk4gsg4ji7qs20mfsr20skmnqx30xvna";
1717- };
1818-1919- meta = with lib; {
2020- homepage = "https://faust.grame.fr/";
2121- downloadPage = "https://sourceforge.net/projects/faudiostream/files/";
2222- license = licenses.gpl2;
2323- platforms = platforms.linux;
2424- maintainers = with maintainers; [ magnetophon pmahoney ];
2525- };
2626-2727- faust = stdenv.mkDerivation {
2828- pname = "faust";
2929- inherit version;
3030-3131- inherit src;
3232-3333- nativeBuildInputs = [ makeWrapper ];
3434-3535- passthru = {
3636- inherit wrap wrapWithBuildEnv;
3737- };
3838-3939- preConfigure = ''
4040- makeFlags="$makeFlags prefix=$out"
4141-4242- # The faust makefiles use 'system ?= $(shell uname -s)' but nix
4343- # defines 'system' env var, so undefine that so faust detects the
4444- # correct system.
4545- unset system
4646- '';
4747-4848- # Remove most faust2appl scripts since they won't run properly
4949- # without additional paths setup. See faust.wrap,
5050- # faust.wrapWithBuildEnv.
5151- postInstall = ''
5252- # syntax error when eval'd directly
5353- pattern="faust2!(*@(atomsnippets|graph|graphviewer|md|plot|sig|sigviewer|svg))"
5454- (shopt -s extglob; rm "$out"/bin/$pattern)
5555- '';
5656-5757- postFixup = ''
5858- # Set faustpath explicitly.
5959- substituteInPlace "$out"/bin/faustpath \
6060- --replace "/usr/local /usr /opt /opt/local" "$out"
6161-6262- # The 'faustoptflags' is 'source'd into other faust scripts and
6363- # not used as an executable, so patch 'uname' usage directly
6464- # rather than use makeWrapper.
6565- substituteInPlace "$out"/bin/faustoptflags \
6666- --replace uname "${coreutils}/bin/uname"
6767-6868- # wrapper for scripts that don't need faust.wrap*
6969- for script in "$out"/bin/faust2*; do
7070- wrapProgram "$script" \
7171- --prefix PATH : "$out"/bin
7272- done
7373- '';
7474-7575- meta = meta // {
7676- description = "A functional programming language for realtime audio signal processing";
7777- longDescription = ''
7878- FAUST (Functional Audio Stream) is a functional programming
7979- language specifically designed for real-time signal processing
8080- and synthesis. FAUST targets high-performance signal processing
8181- applications and audio plug-ins for a variety of platforms and
8282- standards.
8383- The Faust compiler translates DSP specifications into very
8484- efficient C++ code. Thanks to the notion of architecture,
8585- FAUST programs can be easily deployed on a large variety of
8686- audio platforms and plugin formats (jack, alsa, ladspa, maxmsp,
8787- puredata, csound, supercollider, pure, vst, coreaudio) without
8888- any change to the FAUST code.
8989-9090- This package has just the compiler, libraries, and headers.
9191- Install faust2* for specific faust2appl scripts.
9292- '';
9393- };
9494-9595- };
9696-9797- # Default values for faust2appl.
9898- faust2ApplBase =
9999- { baseName
100100- , dir ? "tools/faust2appls"
101101- , scripts ? [ baseName ]
102102- , ...
103103- }@args:
104104-105105- args // {
106106- name = "${baseName}-${version}";
107107-108108- inherit src;
109109-110110- dontBuild = true;
111111-112112- installPhase = ''
113113- runHook preInstall
114114-115115- mkdir -p "$out/bin"
116116- for script in ${concatStringsSep " " scripts}; do
117117- cp "${dir}/$script" "$out/bin/"
118118- done
119119-120120- runHook postInstall
121121- '';
122122-123123- postInstall = ''
124124- # For the faust2appl script, change 'faustpath' and
125125- # 'faustoptflags' to absolute paths.
126126- for script in "$out"/bin/*; do
127127- substituteInPlace "$script" \
128128- --replace ". faustpath" ". '${faust}/bin/faustpath'" \
129129- --replace ". faustoptflags" ". '${faust}/bin/faustoptflags'"
130130- done
131131- '';
132132-133133- meta = meta // {
134134- description = "The ${baseName} script, part of faust functional programming language for realtime audio signal processing";
135135- };
136136- };
137137-138138- # Some 'faust2appl' scripts, such as faust2alsa, run faust to
139139- # generate cpp code, then invoke the c++ compiler to build the code.
140140- # This builder wraps these scripts in parts of the stdenv such that
141141- # when the scripts are called outside any nix build, they behave as
142142- # if they were running inside a nix build in terms of compilers and
143143- # paths being configured (e.g. rpath is set so that compiled
144144- # binaries link to the libs inside the nix store)
145145- #
146146- # The function takes two main args: the appl name (e.g.
147147- # 'faust2alsa') and an optional list of propagatedBuildInputs. It
148148- # returns a derivation that contains only the bin/${appl} script,
149149- # wrapped up so that it will run as if it was inside a nix build
150150- # with those build inputs.
151151- #
152152- # The build input 'faust' is automatically added to the
153153- # propagatedBuildInputs.
154154- wrapWithBuildEnv =
155155- { baseName
156156- , propagatedBuildInputs ? [ ]
157157- , ...
158158- }@args:
159159-160160- stdenv.mkDerivation ((faust2ApplBase args) // {
161161-162162- nativeBuildInputs = [ pkg-config makeWrapper ];
163163-164164- propagatedBuildInputs = [ faust ] ++ propagatedBuildInputs;
165165-166166- postFixup = ''
167167-168168- # export parts of the build environment
169169- for script in "$out"/bin/*; do
170170- wrapProgram "$script" \
171171- --set FAUSTLIB "${faust}/lib/faust" \
172172- --set FAUSTINC "${faust}/include/faust" \
173173- --prefix PATH : "$PATH" \
174174- --prefix PKG_CONFIG_PATH : "$PKG_CONFIG_PATH" \
175175- --set NIX_CFLAGS_COMPILE "$NIX_CFLAGS_COMPILE" \
176176- --set NIX_LDFLAGS "$NIX_LDFLAGS"
177177- done
178178- '';
179179- });
180180-181181- # Builder for 'faust2appl' scripts, such as faust2firefox that
182182- # simply need to be wrapped with some dependencies on PATH.
183183- #
184184- # The build input 'faust' is automatically added to the PATH.
185185- wrap =
186186- { baseName
187187- , runtimeInputs ? [ ]
188188- , ...
189189- }@args:
190190-191191- let
192192-193193- runtimePath = concatStringsSep ":" (map (p: "${p}/bin") ([ faust ] ++ runtimeInputs));
194194-195195- in stdenv.mkDerivation ((faust2ApplBase args) // {
196196-197197- nativeBuildInputs = [ makeWrapper ];
198198-199199- postFixup = ''
200200- for script in "$out"/bin/*; do
201201- wrapProgram "$script" --prefix PATH : "${runtimePath}"
202202- done
203203- '';
204204-205205- });
206206-207207-in faust
+1
pkgs/top-level/aliases.nix
···492492493493 facette = throw "facette has been removed"; # Added 2020-01-06
494494 faustStk = faustPhysicalModeling; # Added 2023-05-16
495495+ faust1 = throw "faust1 has been removed, use faust2 instead"; # Added 2022-12-03
495496 fast-neural-doodle = throw "fast-neural-doodle has been removed, as the upstream project has been abandoned"; # Added 2020-03-28
496497 fastnlo = fastnlo_toolkit; # Added 2021-04-24
497498 fbreader = throw "fbreader has been removed, as the upstream project has been archived"; # Added 2022-05-26