diff --git a/pkgs/applications/audio/faust/faust1git.nix b/pkgs/applications/audio/faust/faust1git.nix deleted file mode 100644 index 94e58f224283..000000000000 --- a/pkgs/applications/audio/faust/faust1git.nix +++ /dev/null @@ -1,210 +0,0 @@ -{ stdenv -, coreutils -, fetchgit -, makeWrapper -, pkgconfig -}: - -with stdenv.lib.strings; - -let - - version = "2016-07-19"; - - src = fetchgit { - url = "git://git.code.sf.net/p/faudiostream/code"; - rev = "16c22dc0193c10521b1dc16f98443d9c206bb5dd"; - sha256 = "01rbcjfhpd5casi72ffi1j95f65ji60l629sgav93pvs0kpdacz5"; - }; - - meta = with stdenv.lib; { - homepage = http://faust.grame.fr/; - downloadPage = http://sourceforge.net/projects/faudiostream/files/; - license = licenses.gpl2; - platforms = platforms.linux; - maintainers = with maintainers; [ magnetophon pmahoney ]; - }; - - faust = stdenv.mkDerivation { - - name = "faust-${version}"; - - inherit src; - - buildInputs = [ makeWrapper ]; - - passthru = { - inherit wrap wrapWithBuildEnv; - }; - - preConfigure = '' - makeFlags="$makeFlags prefix=$out" - - # The faust makefiles use 'system ?= $(shell uname -s)' but nix - # defines 'system' env var, so undefine that so faust detects the - # correct system. - unset system - ''; - - # Remove most faust2appl scripts since they won't run properly - # without additional paths setup. See faust.wrap, - # faust.wrapWithBuildEnv. - postInstall = '' - # syntax error when eval'd directly - pattern="faust2!(svg)" - (shopt -s extglob; rm "$out"/bin/$pattern) - ''; - - postFixup = '' - # Set faustpath explicitly. - substituteInPlace "$out"/bin/faustpath \ - --replace "/usr/local /usr /opt /opt/local" "$out" - - # 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. - faust2ApplBase = - { baseName - , dir ? "tools/faust2appls" - , scripts ? [ baseName ] - , ... - }@args: - - args // { - name = "${baseName}-${version}"; - - inherit src; - - configurePhase = ":"; - - buildPhase = ":"; - - installPhase = '' - runHook preInstall - - mkdir -p "$out/bin" - for script in ${concatStringsSep " " scripts}; do - cp "${dir}/$script" "$out/bin/" - done - - runHook postInstall - ''; - - postInstall = '' - # For the faust2appl script, change 'faustpath' and - # 'faustoptflags' to absolute paths. - for script in "$out"/bin/*; do - substituteInPlace "$script" \ - --replace ". faustpath" ". '${faust}/bin/faustpath'" \ - --replace ". faustoptflags" ". '${faust}/bin/faustoptflags'" - done - ''; - - meta = meta // { - description = "The ${baseName} script, part of faust functional programming language for realtime audio signal processing"; - }; - }; - - # Some 'faust2appl' scripts, such as faust2alsa, run faust to - # generate cpp code, then invoke the c++ compiler to build the code. - # This builder wraps these scripts in parts of the stdenv such that - # when the scripts are called outside any nix build, they behave as - # if they were running inside a nix build in terms of compilers and - # paths being configured (e.g. rpath is set so that compiled - # binaries link to the libs inside the nix store) - # - # The function takes two main args: the appl name (e.g. - # 'faust2alsa') and an optional list of propagatedBuildInputs. It - # returns a derivation that contains only the bin/${appl} script, - # wrapped up so that it will run as if it was inside a nix build - # with those build inputs. - # - # The build input 'faust' is automatically added to the - # propagatedBuildInputs. - wrapWithBuildEnv = - { baseName - , propagatedBuildInputs ? [ ] - , ... - }@args: - - stdenv.mkDerivation ((faust2ApplBase args) // { - - buildInputs = [ makeWrapper pkgconfig ]; - - propagatedBuildInputs = [ faust ] ++ propagatedBuildInputs; - - postFixup = '' - - # export parts of the build environment - for script in "$out"/bin/*; do - wrapProgram "$script" \ - --set FAUSTLIB "${faust}/lib/faust" \ - --set FAUSTINC "${faust}/include/faust" \ - --prefix PATH : "$PATH" \ - --prefix PKG_CONFIG_PATH : "$PKG_CONFIG_PATH" \ - --set NIX_CFLAGS_COMPILE "$NIX_CFLAGS_COMPILE" \ - --set NIX_LDFLAGS "$NIX_LDFLAGS" - done - ''; - }); - - # Builder for 'faust2appl' scripts, such as faust2firefox that - # simply need to be wrapped with some dependencies on PATH. - # - # The build input 'faust' is automatically added to the PATH. - wrap = - { baseName - , runtimeInputs ? [ ] - , ... - }@args: - - let - - runtimePath = concatStringsSep ":" (map (p: "${p}/bin") ([ faust ] ++ runtimeInputs)); - - in stdenv.mkDerivation ((faust2ApplBase args) // { - - buildInputs = [ makeWrapper ]; - - postFixup = '' - for script in "$out"/bin/*; do - wrapProgram "$script" --prefix PATH : "${runtimePath}" - done - ''; - - }); - -in faust diff --git a/pkgs/applications/audio/faust/faust2.nix b/pkgs/applications/audio/faust/faust2.nix index 24cab4cdbcd1..6289688c53ce 100644 --- a/pkgs/applications/audio/faust/faust2.nix +++ b/pkgs/applications/audio/faust/faust2.nix @@ -16,11 +16,11 @@ with stdenv.lib.strings; let - version = "2.0-a41"; + version = "2.0.a51"; src = fetchurl { - url = "mirror://sourceforge/project/faudiostream/faust-2.0.a41.tgz"; - sha256 = "1cq4x1cax0lswrcqv0limx5mjdi3187zlmh7cj2pndr0xq6b96cm"; + url = "mirror://sourceforge/project/faudiostream/faust-${version}.tgz"; + sha256 = "1yryjqfqmxs7lxy95hjgmrncvl9kig3rcsmg0v49ghzz7vs7haxf"; }; meta = with stdenv.lib; { @@ -53,7 +53,7 @@ let # defines 'system' env var, so undefine that so faust detects the # correct system. unset system - sed -e "232s/LLVM_STATIC_LIBS/LLVMLIBS/" -i compiler/Makefile.unix + # sed -e "232s/LLVM_STATIC_LIBS/LLVMLIBS/" -i compiler/Makefile.unix # The makefile sets LLVM_ depending on the current llvm # version, but the detection code is quite brittle. @@ -67,7 +67,7 @@ let # # For now, fix this by 1) pinning the llvm version; 2) manually setting LLVM_VERSION # to something the makefile will recognize. - sed '52iLLVM_VERSION=3.7.0' -i compiler/Makefile.unix + sed '52iLLVM_VERSION=3.8.0' -i compiler/Makefile.unix ''; # Remove most faust2appl scripts since they won't run properly @@ -151,7 +151,8 @@ let for script in "$out"/bin/*; do substituteInPlace "$script" \ --replace ". faustpath" ". '${faust}/bin/faustpath'" \ - --replace ". faustoptflags" ". '${faust}/bin/faustoptflags'" + --replace ". faustoptflags" ". '${faust}/bin/faustoptflags'" \ + --replace " error " "echo" done ''; @@ -193,7 +194,9 @@ let # export parts of the build environment for script in "$out"/bin/*; do wrapProgram "$script" \ + --set FAUSTLIB "${faust}/lib/faust" \ --set FAUST_LIB_PATH "${faust}/lib/faust" \ + --set FAUSTINC "${faust}/include/faust" \ --prefix PATH : "$PATH" \ --prefix PKG_CONFIG_PATH : "$PKG_CONFIG_PATH" \ --set NIX_CFLAGS_COMPILE "$NIX_CFLAGS_COMPILE" \ diff --git a/pkgs/applications/audio/faust/faust2lv2.nix b/pkgs/applications/audio/faust/faust2lv2.nix index 4d11395e7385..3472ce5047eb 100644 --- a/pkgs/applications/audio/faust/faust2lv2.nix +++ b/pkgs/applications/audio/faust/faust2lv2.nix @@ -1,11 +1,14 @@ -{ faust +{ boost +, faust , lv2 +, qt4 + }: faust.wrapWithBuildEnv { baseName = "faust2lv2"; - propagatedBuildInputs = [ lv2 ]; + propagatedBuildInputs = [ boost lv2 qt4 ]; } diff --git a/pkgs/applications/audio/faust/faust2lv2gui.nix b/pkgs/applications/audio/faust/faust2lv2gui.nix deleted file mode 100644 index af20bb1d7450..000000000000 --- a/pkgs/applications/audio/faust/faust2lv2gui.nix +++ /dev/null @@ -1,14 +0,0 @@ -{ boost -, faust1git -, lv2 -, qt4 - -}: - -faust1git.wrapWithBuildEnv { - - baseName = "faust2lv2"; - - propagatedBuildInputs = [ boost lv2 qt4 ]; - -} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index cac69528d809..6c854018ae0a 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -16923,14 +16923,14 @@ in fakenes = callPackage ../misc/emulators/fakenes { }; - faust = faust2; + faust = self.faust2; faust1 = callPackage ../applications/audio/faust/faust1.nix { }; faust1git = callPackage ../applications/audio/faust/faust1git.nix { }; faust2 = callPackage ../applications/audio/faust/faust2.nix { - llvm = llvm_37; + llvm = llvm_38; }; faust2alqt = callPackage ../applications/audio/faust/faust2alqt.nix { }; @@ -16947,8 +16947,6 @@ in faust2lv2 = callPackage ../applications/audio/faust/faust2lv2.nix { }; - faust2lv2gui = callPackage ../applications/audio/faust/faust2lv2gui.nix { }; - faustCompressors = callPackage ../applications/audio/faustCompressors { }; fceux = callPackage ../misc/emulators/fceux { };