about summary refs log tree commit diff
path: root/pkgs/applications/audio/faust/faustlive.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/applications/audio/faust/faustlive.nix')
-rw-r--r--pkgs/applications/audio/faust/faustlive.nix79
1 files changed, 67 insertions, 12 deletions
diff --git a/pkgs/applications/audio/faust/faustlive.nix b/pkgs/applications/audio/faust/faustlive.nix
index 3e1074ad691f..1d91f561c044 100644
--- a/pkgs/applications/audio/faust/faustlive.nix
+++ b/pkgs/applications/audio/faust/faustlive.nix
@@ -1,6 +1,28 @@
-{ lib, stdenv, fetchFromGitHub
-, llvm_10, qt5, qrencode, libmicrohttpd, libjack2, alsa-lib, faust, curl
-, bc, coreutils, which, libsndfile, flac, libogg, libvorbis, libopus, pkg-config, libxcb, cmake, gnutls, libtasn1, p11-kit
+{ lib
+, stdenv
+, fetchFromGitHub
+, fetchpatch
+, cmake
+, pkg-config
+, which
+, alsa-lib
+, curl
+, faust
+, flac
+, gnutls
+, libjack2
+, libmicrohttpd
+, libmpg123
+, libogg
+, libopus
+, libsndfile
+, libtasn1
+, libvorbis
+, libxcb
+, llvm
+, p11-kit
+, qrencode
+, qt5
 }:
 
 stdenv.mkDerivation rec {
@@ -10,22 +32,55 @@ stdenv.mkDerivation rec {
     owner = "grame-cncm";
     repo = "faustlive";
     rev = version;
-    sha256 = "sha256-RqtdDkP63l/30sL5PDocvpar5TI4LdKfeeliSNeOHog=";
+    hash = "sha256-RqtdDkP63l/30sL5PDocvpar5TI4LdKfeeliSNeOHog=";
     fetchSubmodules = true;
   };
 
-  nativeBuildInputs = [ pkg-config qt5.wrapQtAppsHook cmake ];
+  patches = [
+    # move mutex initialization outside assert call
+    # https://github.com/grame-cncm/faustlive/pull/59
+    (fetchpatch {
+      name = "initalize-mutexes.patch";
+      url = "https://github.com/grame-cncm/faustlive/commit/fdd46b12202def9731b9ed2f6363287af16be892.patch";
+      hash = "sha256-yH95Y4Jbqgs8siE9rtutmu5C2sNZwQMJzCgDYqNBDj4=";
+    })
+  ];
 
-  buildInputs = [
-    llvm_10 qt5.qtbase qrencode libmicrohttpd libjack2 alsa-lib faust curl
-    bc coreutils which libsndfile flac libogg libvorbis libopus libxcb gnutls libtasn1 p11-kit
+  strictDeps = true;
+
+  nativeBuildInputs = [
+    cmake
+    faust
+    llvm
+    pkg-config
+    qt5.wrapQtAppsHook
+    which
   ];
 
-  makeFlags = [ "PREFIX=$(out)" ];
+  buildInputs = [
+    alsa-lib
+    curl
+    faust
+    flac
+    gnutls
+    libjack2
+    libmicrohttpd
+    libmpg123
+    libogg
+    libopus
+    libsndfile
+    libtasn1
+    libvorbis
+    libxcb
+    llvm
+    p11-kit
+    qrencode
+    qt5.qtbase
+  ];
 
-  postInstall = ''
-    wrapProgram $out/bin/FaustLive --prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath [ libmicrohttpd libsndfile faust llvm_10 ]}"
-  '';
+  cmakeFlags = [
+    "-DCMAKE_BUILD_WITH_INSTALL_RPATH=ON"
+  ];
 
   postPatch = "cd Build";