faust: 2.54.9 -> 2.59.6
This commit is contained in:
parent
9daee20670
commit
7f8b3d2f49
|
@ -1,4 +1,5 @@
|
||||||
{ lib, stdenv
|
{ lib
|
||||||
|
, stdenv
|
||||||
, coreutils
|
, coreutils
|
||||||
, fetchFromGitHub
|
, fetchFromGitHub
|
||||||
, makeWrapper
|
, makeWrapper
|
||||||
|
@ -14,19 +15,21 @@
|
||||||
, p11-kit
|
, p11-kit
|
||||||
, vim
|
, vim
|
||||||
, which
|
, which
|
||||||
|
, ncurses
|
||||||
|
, fetchpatch
|
||||||
}:
|
}:
|
||||||
|
|
||||||
with lib.strings;
|
with lib.strings;
|
||||||
|
|
||||||
let
|
let
|
||||||
|
|
||||||
version = "2.54.9";
|
version = "2.59.6";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "grame-cncm";
|
owner = "grame-cncm";
|
||||||
repo = "faust";
|
repo = "faust";
|
||||||
rev = version;
|
rev = version;
|
||||||
sha256 = "sha256-7eSZUsZ0h0vWJIpZWXaS+SHV6N2i9nv6Gr6a9cuu4Fg=";
|
sha256 = "sha256-m6dimBxI9C3KDhUxbJAn2Pf9z+LRahjrzD34W/bf1XA=";
|
||||||
fetchSubmodules = true;
|
fetchSubmodules = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -38,80 +41,97 @@ let
|
||||||
maintainers = with maintainers; [ magnetophon pmahoney ];
|
maintainers = with maintainers; [ magnetophon pmahoney ];
|
||||||
};
|
};
|
||||||
|
|
||||||
faust = stdenv.mkDerivation {
|
faust =
|
||||||
|
let ncurses_static = ncurses.override { enableStatic = true; };
|
||||||
|
in stdenv.mkDerivation {
|
||||||
|
|
||||||
pname = "faust";
|
pname = "faust";
|
||||||
inherit version;
|
inherit version;
|
||||||
|
|
||||||
inherit src;
|
inherit src;
|
||||||
|
|
||||||
nativeBuildInputs = [ makeWrapper pkg-config cmake vim which ];
|
nativeBuildInputs = [ makeWrapper pkg-config cmake vim which ];
|
||||||
buildInputs = [ llvm emscripten openssl libsndfile libmicrohttpd gnutls libtasn1 p11-kit ];
|
buildInputs = [
|
||||||
|
llvm
|
||||||
|
emscripten
|
||||||
|
openssl
|
||||||
|
libsndfile
|
||||||
|
libmicrohttpd
|
||||||
|
gnutls
|
||||||
|
libtasn1
|
||||||
|
p11-kit
|
||||||
|
ncurses_static
|
||||||
|
];
|
||||||
|
|
||||||
|
patches = [
|
||||||
|
# make preset management thread safe
|
||||||
|
# needed for magnetophonDSP.VoiceOfFaust
|
||||||
|
# see: https://github.com/grame-cncm/faust/issues/899
|
||||||
|
(fetchpatch {
|
||||||
|
url = "https://github.com/grame-cncm/faust/commit/a1c3a515abbcafea0a6e4e2ec7ecb0f092de5349.patch";
|
||||||
|
hash = "sha256-1Ndm+CgxvGEbS6TKGggeu9hW7N3pC+d1kluT2vhGzL8=";
|
||||||
|
})
|
||||||
|
];
|
||||||
|
|
||||||
passthru = {
|
passthru = { inherit wrap wrapWithBuildEnv faust2ApplBase; };
|
||||||
inherit wrap wrapWithBuildEnv faust2ApplBase;
|
|
||||||
};
|
|
||||||
|
|
||||||
|
preConfigure = ''
|
||||||
preConfigure = ''
|
cd build
|
||||||
cd build
|
sed -i 's@LIBNCURSES_PATH ?= .*@LIBNCURSES_PATH ?= ${ncurses_static}/lib/libncurses.a@' 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/'
|
||||||
cmakeFlags = [
|
substituteInPlace Make.llvm.static \
|
||||||
"-C../backends/all.cmake"
|
--replace 'rm -rf $(TMP)' ' '
|
||||||
"-C../targets/all.cmake"
|
|
||||||
];
|
|
||||||
|
|
||||||
postInstall = ''
|
|
||||||
# syntax error when eval'd directly
|
|
||||||
pattern="faust2!(*@(atomsnippets|graph|graphviewer|md|plot|sig|sigviewer|svg))"
|
|
||||||
(shopt -s extglob; rm "$out"/bin/$pattern)
|
|
||||||
'';
|
|
||||||
|
|
||||||
postFixup = ''
|
|
||||||
# The 'faustoptflags' is 'source'd into other faust scripts and
|
|
||||||
# not used as an executable, so patch 'uname' usage directly
|
|
||||||
# rather than use makeWrapper.
|
|
||||||
substituteInPlace "$out"/bin/faustoptflags \
|
|
||||||
--replace uname "${coreutils}/bin/uname"
|
|
||||||
|
|
||||||
# wrapper for scripts that don't need faust.wrap*
|
|
||||||
for script in "$out"/bin/faust2*; do
|
|
||||||
wrapProgram "$script" \
|
|
||||||
--prefix PATH : "$out"/bin
|
|
||||||
done
|
|
||||||
'';
|
|
||||||
|
|
||||||
meta = meta // {
|
|
||||||
description = "A functional programming language for realtime audio signal processing";
|
|
||||||
longDescription = ''
|
|
||||||
FAUST (Functional Audio Stream) is a functional programming
|
|
||||||
language specifically designed for real-time signal processing
|
|
||||||
and synthesis. FAUST targets high-performance signal processing
|
|
||||||
applications and audio plug-ins for a variety of platforms and
|
|
||||||
standards.
|
|
||||||
The Faust compiler translates DSP specifications into very
|
|
||||||
efficient C++ code. Thanks to the notion of architecture,
|
|
||||||
FAUST programs can be easily deployed on a large variety of
|
|
||||||
audio platforms and plugin formats (jack, alsa, ladspa, maxmsp,
|
|
||||||
puredata, csound, supercollider, pure, vst, coreaudio) without
|
|
||||||
any change to the FAUST code.
|
|
||||||
|
|
||||||
This package has just the compiler, libraries, and headers.
|
|
||||||
Install faust2* for specific faust2appl scripts.
|
|
||||||
'';
|
'';
|
||||||
};
|
|
||||||
|
|
||||||
};
|
cmakeFlags = [ "-C../backends/all.cmake" "-C../targets/all.cmake" ];
|
||||||
|
|
||||||
|
postInstall = ''
|
||||||
|
# syntax error when eval'd directly
|
||||||
|
pattern="faust2!(*@(atomsnippets|graph|graphviewer|md|plot|sig|sigviewer|svg))"
|
||||||
|
(shopt -s extglob; rm "$out"/bin/$pattern)
|
||||||
|
'';
|
||||||
|
|
||||||
|
postFixup = ''
|
||||||
|
# The 'faustoptflags' is 'source'd into other faust scripts and
|
||||||
|
# not used as an executable, so patch 'uname' usage directly
|
||||||
|
# rather than use makeWrapper.
|
||||||
|
substituteInPlace "$out"/bin/faustoptflags \
|
||||||
|
--replace uname "${coreutils}/bin/uname"
|
||||||
|
|
||||||
|
# wrapper for scripts that don't need faust.wrap*
|
||||||
|
for script in "$out"/bin/faust2*; do
|
||||||
|
wrapProgram "$script" \
|
||||||
|
--prefix PATH : "$out"/bin
|
||||||
|
done
|
||||||
|
'';
|
||||||
|
|
||||||
|
meta = meta // {
|
||||||
|
description =
|
||||||
|
"A functional programming language for realtime audio signal processing";
|
||||||
|
longDescription = ''
|
||||||
|
FAUST (Functional Audio Stream) is a functional programming
|
||||||
|
language specifically designed for real-time signal processing
|
||||||
|
and synthesis. FAUST targets high-performance signal processing
|
||||||
|
applications and audio plug-ins for a variety of platforms and
|
||||||
|
standards.
|
||||||
|
The Faust compiler translates DSP specifications into very
|
||||||
|
efficient C++ code. Thanks to the notion of architecture,
|
||||||
|
FAUST programs can be easily deployed on a large variety of
|
||||||
|
audio platforms and plugin formats (jack, alsa, ladspa, maxmsp,
|
||||||
|
puredata, csound, supercollider, pure, vst, coreaudio) without
|
||||||
|
any change to the FAUST code.
|
||||||
|
|
||||||
|
This package has just the compiler, libraries, and headers.
|
||||||
|
Install faust2* for specific faust2appl scripts.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
# Default values for faust2appl.
|
# Default values for faust2appl.
|
||||||
faust2ApplBase =
|
faust2ApplBase =
|
||||||
{ baseName
|
{ baseName, dir ? "tools/faust2appls", scripts ? [ baseName ], ... }@args:
|
||||||
, dir ? "tools/faust2appls"
|
|
||||||
, scripts ? [ baseName ]
|
|
||||||
, ...
|
|
||||||
}@args:
|
|
||||||
|
|
||||||
args // {
|
args // {
|
||||||
name = "${baseName}-${version}";
|
name = "${baseName}-${version}";
|
||||||
|
@ -141,7 +161,8 @@ let
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = meta // {
|
meta = meta // {
|
||||||
description = "The ${baseName} script, part of faust functional programming language for realtime audio signal processing";
|
description =
|
||||||
|
"The ${baseName} script, part of faust functional programming language for realtime audio signal processing";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -161,11 +182,7 @@ let
|
||||||
#
|
#
|
||||||
# The build input 'faust' is automatically added to the
|
# The build input 'faust' is automatically added to the
|
||||||
# propagatedBuildInputs.
|
# propagatedBuildInputs.
|
||||||
wrapWithBuildEnv =
|
wrapWithBuildEnv = { baseName, propagatedBuildInputs ? [ ], ... }@args:
|
||||||
{ baseName
|
|
||||||
, propagatedBuildInputs ? [ ]
|
|
||||||
, ...
|
|
||||||
}@args:
|
|
||||||
|
|
||||||
stdenv.mkDerivation ((faust2ApplBase args) // {
|
stdenv.mkDerivation ((faust2ApplBase args) // {
|
||||||
|
|
||||||
|
@ -205,26 +222,25 @@ let
|
||||||
# simply need to be wrapped with some dependencies on PATH.
|
# simply need to be wrapped with some dependencies on PATH.
|
||||||
#
|
#
|
||||||
# The build input 'faust' is automatically added to the PATH.
|
# The build input 'faust' is automatically added to the PATH.
|
||||||
wrap =
|
wrap = { baseName, runtimeInputs ? [ ], ... }@args:
|
||||||
{ baseName
|
|
||||||
, runtimeInputs ? [ ]
|
|
||||||
, ...
|
|
||||||
}@args:
|
|
||||||
|
|
||||||
let
|
let
|
||||||
|
|
||||||
runtimePath = concatStringsSep ":" (map (p: "${p}/bin") ([ faust ] ++ runtimeInputs));
|
runtimePath =
|
||||||
|
concatStringsSep ":" (map (p: "${p}/bin") ([ faust ] ++ runtimeInputs));
|
||||||
|
|
||||||
in stdenv.mkDerivation ((faust2ApplBase args) // {
|
in
|
||||||
|
stdenv.mkDerivation ((faust2ApplBase args) // {
|
||||||
|
|
||||||
nativeBuildInputs = [ makeWrapper ];
|
nativeBuildInputs = [ makeWrapper ];
|
||||||
|
|
||||||
postFixup = ''
|
postFixup = ''
|
||||||
for script in "$out"/bin/*; do
|
for script in "$out"/bin/*; do
|
||||||
wrapProgram "$script" --prefix PATH : "${runtimePath}"
|
wrapProgram "$script" --prefix PATH : "${runtimePath}"
|
||||||
done
|
done
|
||||||
'';
|
'';
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
in faust
|
in
|
||||||
|
faust
|
||||||
|
|
Loading…
Reference in a new issue