summary refs log tree commit diff
path: root/pkgs/applications/audio/renoise/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/applications/audio/renoise/default.nix')
-rw-r--r--pkgs/applications/audio/renoise/default.nix48
1 files changed, 33 insertions, 15 deletions
diff --git a/pkgs/applications/audio/renoise/default.nix b/pkgs/applications/audio/renoise/default.nix
index 1cbd5b3afa2..acd1d80c86d 100644
--- a/pkgs/applications/audio/renoise/default.nix
+++ b/pkgs/applications/audio/renoise/default.nix
@@ -1,7 +1,7 @@
-{ stdenv, fetchurl, libX11, libXext, libXcursor, libXrandr, libjack2, alsaLib
+{ lib, stdenv, fetchurl, libX11, libXext, libXcursor, libXrandr, libjack2, alsa-lib
 , mpg123, releasePath ? null }:
 
-with stdenv.lib;
+with lib;
 
 # To use the full release version:
 # 1) Sign into https://backstage.renoise.com and download the release version to some stable location.
@@ -14,31 +14,29 @@ in
 
 stdenv.mkDerivation rec {
   pname = "renoise";
-  version = "3.2.1";
+  version = "3.3.2";
 
   src =
     if stdenv.hostPlatform.system == "x86_64-linux" then
         if releasePath == null then
-		    fetchurl {
-		      urls = [
-		          "https://files.renoise.com/demo/Renoise_${urlVersion version}_Demo_Linux.tar.gz"
-		          "https://web.archive.org/web/https://files.renoise.com/demo/Renoise_${urlVersion version}_Demo_Linux.tar.gz"
-		      ];
-		      sha256 = "0dhcidgnjzd4abw0xw1waj9mazp03nbvjcr2xx09l8gnfrkvny46";
-		    }
+        fetchurl {
+          urls = [
+              "https://files.renoise.com/demo/Renoise_${urlVersion version}_Demo_Linux.tar.gz"
+              "https://web.archive.org/web/https://files.renoise.com/demo/Renoise_${urlVersion version}_Demo_Linux.tar.gz"
+          ];
+          sha256 = "0d9pnrvs93d4bwbfqxwyr3lg3k6gnzmp81m95gglzwdzczxkw38k";
+        }
         else
-        	releasePath
-    else throw "Platform is not supported by Renoise";
+          releasePath
+    else throw "Platform is not supported. Use instalation native to your platform https://www.renoise.com/";
 
-  buildInputs = [ alsaLib libjack2 libX11 libXcursor libXext libXrandr ];
+  buildInputs = [ alsa-lib libjack2 libX11 libXcursor libXext libXrandr ];
 
   installPhase = ''
     cp -r Resources $out
 
     mkdir -p $out/lib/
 
-    mv $out/AudioPluginServer* $out/lib/
-
     cp renoise $out/renoise
 
     for path in ${toString buildInputs}; do
@@ -49,6 +47,16 @@ stdenv.mkDerivation rec {
 
     mkdir $out/bin
     ln -s $out/renoise $out/bin/renoise
+
+    # Desktop item
+    mkdir -p $out/share/applications
+    cp -r Installer/renoise.desktop $out/share/applications/renoise.desktop
+
+    # Desktop item icons
+    mkdir -p $out/share/icons/hicolor/{48x48,64x64,128x128}/apps
+    cp Installer/renoise-48.png $out/share/icons/hicolor/48x48/apps/renoise.png
+    cp Installer/renoise-64.png $out/share/icons/hicolor/64x64/apps/renoise.png
+    cp Installer/renoise-128.png $out/share/icons/hicolor/128x128/apps/renoise.png
   '';
 
   postFixup = ''
@@ -56,6 +64,16 @@ stdenv.mkDerivation rec {
       --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) \
       --set-rpath ${mpg123}/lib:$out/lib \
       $out/renoise
+
+    for path in $out/AudioPluginServer*; do
+      patchelf \
+        --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) \
+        --set-rpath $out/lib \
+        $path
+    done
+
+    substituteInPlace $out/share/applications/renoise.desktop \
+      --replace Exec=renoise Exec=$out/bin/renoise
   '';
 
   meta = {