summary refs log tree commit diff
path: root/pkgs/applications/audio
diff options
context:
space:
mode:
authorOrivej Desh <orivej@gmx.fr>2020-08-18 20:30:59 +0000
committerOrivej Desh <orivej@gmx.fr>2020-08-18 20:32:35 +0000
commitbf838029d74819ba44292357c8df380966e0b827 (patch)
treed06c0fc517dd39531170449efebe51cfb94755ef /pkgs/applications/audio
parent9841a891ef1835dab14ed1bcf9b283a3450a0768 (diff)
downloadnixpkgs-bf838029d74819ba44292357c8df380966e0b827.tar
nixpkgs-bf838029d74819ba44292357c8df380966e0b827.tar.gz
nixpkgs-bf838029d74819ba44292357c8df380966e0b827.tar.bz2
nixpkgs-bf838029d74819ba44292357c8df380966e0b827.tar.lz
nixpkgs-bf838029d74819ba44292357c8df380966e0b827.tar.xz
nixpkgs-bf838029d74819ba44292357c8df380966e0b827.tar.zst
nixpkgs-bf838029d74819ba44292357c8df380966e0b827.zip
molot-lite: simplify definition
Diffstat (limited to 'pkgs/applications/audio')
-rw-r--r--pkgs/applications/audio/molot-lite/base.nix26
-rw-r--r--pkgs/applications/audio/molot-lite/default.nix41
-rw-r--r--pkgs/applications/audio/molot-lite/mono.nix18
-rw-r--r--pkgs/applications/audio/molot-lite/stereo.nix18
4 files changed, 32 insertions, 71 deletions
diff --git a/pkgs/applications/audio/molot-lite/base.nix b/pkgs/applications/audio/molot-lite/base.nix
deleted file mode 100644
index 44880f74901..00000000000
--- a/pkgs/applications/audio/molot-lite/base.nix
+++ /dev/null
@@ -1,26 +0,0 @@
-{ stdenv, fetchurl, unzip, lv2 }:
-
-rec {
-  version = "unstable-2014-04-23";
-
-  src = fetchurl {
-    # the source is zipped inside the repository, so this doesn't work:
-    # url = "mirror://sourceforge/molot/molot_src.zip";
-    url = "https://sourceforge.net/p/molot/code/ci/master/tree/molot_src.zip?format=raw";
-    sha256 = "1c47dwfgrmn9459px8s5zikcqyr0777v226qzcxlr6azlcjwr51b";
-  };
-
-  buildInputs = [ unzip lv2 ];
-
-  unpackPhase = "unzip $src";
-
-  installFlags = [ "INSTALL_DIR=$(out)/lib/lv2" ];
-
-  meta = with stdenv.lib; {
-    description = "a stereo and mono audio signal dynamic range compressor in LV2 format";
-    homepage = "https://sourceforge.net/projects/molot/";
-    license = licenses.gpl3Plus;
-    maintainers = [ maintainers.magnetophon ];
-    platforms = platforms.linux;
-  };
-}
diff --git a/pkgs/applications/audio/molot-lite/default.nix b/pkgs/applications/audio/molot-lite/default.nix
index bb858e10644..5c5aa505537 100644
--- a/pkgs/applications/audio/molot-lite/default.nix
+++ b/pkgs/applications/audio/molot-lite/default.nix
@@ -1,14 +1,37 @@
-{ stdenvNoCC, molot-mono-lite, molot-stereo-lite }:
-with stdenvNoCC.lib;
+{ stdenv, fetchurl, unzip, lv2 }:
 
-
-stdenvNoCC.mkDerivation {
+stdenv.mkDerivation {
   pname = "molot-lite";
-  version = molot-mono-lite.version;
+  version = "unstable-2014-04-23";
+
+  src = fetchurl {
+    # fetchzip does not accept urls that do not end with .zip.
+    url = "https://sourceforge.net/p/molot/code/ci/c4eddc426f8d5821e8ebcf1d67265365e4c8c52a/tree/molot_src.zip?format=raw";
+    sha256 = "1c47dwfgrmn9459px8s5zikcqyr0777v226qzcxlr6azlcjwr51b";
+  };
+
+  nativeBuildInputs = [ unzip ];
+  buildInputs = [ lv2 ];
+
+  unpackPhase = ''
+    unzip $src
+  '';
+
+  buildPhase = ''
+    make -C Molot_Mono_Lite
+    make -C Molot_Stereo_Lite
+  '';
 
-  buildCommand = ''
-    mkdir -p $out/lib/lv2/
-    ln -s ${makeLibraryPath [molot-mono-lite]}/lv2/Molot_Mono_Lite.lv2 $out/lib/lv2
-    ln -s ${makeLibraryPath [molot-stereo-lite]}/lv2/Molot_Stereo_Lite.lv2 $out/lib/lv2
+  installPhase = ''
+    make install INSTALL_DIR=$out/lib/lv2 -C Molot_Mono_Lite
+    make install INSTALL_DIR=$out/lib/lv2 -C Molot_Stereo_Lite
   '';
+
+  meta = with stdenv.lib; {
+    description = "Stereo and mono audio signal dynamic range compressor in LV2 format";
+    homepage = "https://sourceforge.net/projects/molot/";
+    license = licenses.gpl3Plus;
+    maintainers = [ maintainers.magnetophon ];
+    platforms = platforms.linux;
+  };
 }
diff --git a/pkgs/applications/audio/molot-lite/mono.nix b/pkgs/applications/audio/molot-lite/mono.nix
deleted file mode 100644
index dd2f0e3261a..00000000000
--- a/pkgs/applications/audio/molot-lite/mono.nix
+++ /dev/null
@@ -1,18 +0,0 @@
-{ stdenv, fetchurl, unzip, lv2 }:
-
-let
-  base = import ./base.nix { inherit stdenv fetchurl unzip lv2; };
-in
-stdenv.mkDerivation {
-  pname = "molot-mono-lite";
-
-  version = base.version;
-  src = base.src;
-  unpackPhase  = base.unpackPhase;
-  buildInputs = base.buildInputs;
-  installFlags = base.installFlags;
-
-  prePatch = ''
-   cd  Molot_Mono_Lite
-  '';
-}
diff --git a/pkgs/applications/audio/molot-lite/stereo.nix b/pkgs/applications/audio/molot-lite/stereo.nix
deleted file mode 100644
index 3cf59868930..00000000000
--- a/pkgs/applications/audio/molot-lite/stereo.nix
+++ /dev/null
@@ -1,18 +0,0 @@
-{ stdenv, fetchurl, unzip, lv2 }:
-
-let
-  base = import ./base.nix { inherit stdenv fetchurl unzip lv2; };
-in
-stdenv.mkDerivation {
-  pname = "molot-stereo-lite";
-
-  version = base.version;
-  src = base.src;
-  unpackPhase  = base.unpackPhase;
-  buildInputs = base.buildInputs;
-  installFlags = base.installFlags;
-
-  prePatch = ''
-   cd  Molot_Stereo_Lite
-  '';
-}