about summary refs log tree commit diff
path: root/pkgs/applications/audio/cadence
diff options
context:
space:
mode:
authorBignaux Ronan <ronan@aimao.org>2020-02-26 08:05:56 +0100
committerBignaux Ronan <ronan@aimao.org>2020-02-26 08:05:56 +0100
commit7e63e254a1557075b3deaecfb38c9c778718204b (patch)
tree6c74b5411ceab81483cd71f255704831ca198d3c /pkgs/applications/audio/cadence
parent563b480b6f7564b24f141dd2ba131c1e531ab2cb (diff)
downloadnixlib-7e63e254a1557075b3deaecfb38c9c778718204b.tar
nixlib-7e63e254a1557075b3deaecfb38c9c778718204b.tar.gz
nixlib-7e63e254a1557075b3deaecfb38c9c778718204b.tar.bz2
nixlib-7e63e254a1557075b3deaecfb38c9c778718204b.tar.lz
nixlib-7e63e254a1557075b3deaecfb38c9c778718204b.tar.xz
nixlib-7e63e254a1557075b3deaecfb38c9c778718204b.tar.zst
nixlib-7e63e254a1557075b3deaecfb38c9c778718204b.zip
cadence: fix dbus,libjack and missing dependancies
Diffstat (limited to 'pkgs/applications/audio/cadence')
-rw-r--r--pkgs/applications/audio/cadence/default.nix37
1 files changed, 26 insertions, 11 deletions
diff --git a/pkgs/applications/audio/cadence/default.nix b/pkgs/applications/audio/cadence/default.nix
index 52f5a6540e8b..3cde3d9009ce 100644
--- a/pkgs/applications/audio/cadence/default.nix
+++ b/pkgs/applications/audio/cadence/default.nix
@@ -1,15 +1,23 @@
 { stdenv
-, mkDerivation
+, a2jmidid
+, coreutils
 , lib
+, libjack2
 , fetchpatch
 , fetchzip
+, jack_capture
 , pkgconfig
+, pulseaudio
 , qtbase
 , makeWrapper
-, python3Packages
+, mkDerivation
+, python3
 }:
+#ladish missing, claudia can't work.
+#pulseaudio needs fixes (patchShebangs .pa ...)
+#desktop needs icons and exec fixing.
 
- mkDerivation rec {
+mkDerivation rec {
   version = "0.9.1";
   pname = "cadence";
 
@@ -26,12 +34,25 @@
     })
   ];
 
+  postPatch = ''
+      libjackso=$(realpath ${lib.makeLibraryPath [libjack2]}/libjack.so.0);
+      substituteInPlace ./src/jacklib.py --replace libjack.so.0 $libjackso
+      substituteInPlace ./src/cadence.py --replace "/usr/bin/pulseaudio" \
+        "${lib.makeBinPath[pulseaudio]}/pulseaudio"
+      substituteInPlace ./c++/jackbridge/JackBridge.cpp --replace libjack.so.0 $libjackso
+  '';
+
   nativeBuildInputs = [
     pkgconfig
   ];
 
   buildInputs = [
     qtbase
+    jack_capture
+    ((python3.withPackages (ps: with ps; [
+          pyqt5
+          dbus-python
+        ])))
   ];
 
   makeFlags = [
@@ -39,10 +60,6 @@
     "SYSCONFDIR=${placeholder "out"}/etc"
   ];
 
-  propagatedBuildInputs = with python3Packages; [
-    pyqt5_with_qtwebkit
-  ];
-
   dontWrapQtApps = true;
 
   # Replace with our own wrappers. They need to be changed manually since it wouldn't work otherwise.
@@ -65,10 +82,8 @@
     };
   in lib.mapAttrsToList (script: source: ''
     rm -f ${script}
-    makeWrapper ${python3Packages.python.interpreter} ${script} \
-      --set PYTHONPATH "$PYTHONPATH:${outRef}/share/cadence" \
-      ''${qtWrapperArgs[@]} \
-      --add-flags "-O ${source}"
+    makeQtWrapper ${source} ${script} \
+      --prefix PATH : "${lib.makeBinPath [jack_capture]}"
   '') scriptAndSource;
 
   meta = {