about summary refs log tree commit diff
path: root/pkgs/applications/audio/magnetophonDSP/CompBus/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/applications/audio/magnetophonDSP/CompBus/default.nix')
-rw-r--r--pkgs/applications/audio/magnetophonDSP/CompBus/default.nix45
1 files changed, 45 insertions, 0 deletions
diff --git a/pkgs/applications/audio/magnetophonDSP/CompBus/default.nix b/pkgs/applications/audio/magnetophonDSP/CompBus/default.nix
new file mode 100644
index 0000000000000..467e11daaf65b
--- /dev/null
+++ b/pkgs/applications/audio/magnetophonDSP/CompBus/default.nix
@@ -0,0 +1,45 @@
+{ stdenv, fetchFromGitHub, faust2jaqt, faust2lv2 }:
+stdenv.mkDerivation rec {
+  name = "CompBus-${version}";
+  version = "1.1.1";
+
+  src = fetchFromGitHub {
+    owner = "magnetophon";
+    repo = "CompBus";
+    rev = "V${version}";
+    sha256 = "0yhj680zgk4dn4fi8j3apm72f3z2mjk12amf2a7p0lwn9iyh4a2z";
+  };
+
+  buildInputs = [ faust2jaqt faust2lv2 ];
+
+  buildPhase = ''
+    for f in *.dsp;
+    do
+      faust2jaqt -time -vec -double -t 99999 $f
+    done
+
+    sed -i "s|\[ *scale *: *log *\]||g ; s|\btgroup\b|hgroup|g" "CompBus.lib"
+
+    for f in *.dsp;
+    do
+      faust2lv2  -time -vec -double -gui -t 99999 $f
+    done
+  '';
+
+  installPhase = ''
+    mkdir -p $out/lib/lv2
+    mv *.lv2/ $out/lib/lv2
+    mkdir -p $out/bin
+    for f in $(find . -executable -type f);
+    do
+      cp $f $out/bin/
+    done
+  '';
+
+  meta = {
+    description = "A group of compressors mixed into a bus, sidechained from that mix bus. For jack and lv2";
+    homepage = https://github.com/magnetophon/CompBus;
+    license = stdenv.lib.licenses.gpl3;
+    maintainers = [ stdenv.lib.maintainers.magnetophon ];
+  };
+}