Last active
September 16, 2015 12:19
-
-
Save krgn/91d911998ea344409cae to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ stdenv, lib, requireFile, demo, fetchurl, libX11, libXext, libXcursor, libXrandr, libjack2, alsaLib, ... }: | |
stdenv.mkDerivation rec { | |
name = "renoise"; | |
buildInputs = [ libX11 libXext libXcursor libXrandr alsaLib libjack2 ]; | |
phases = "unpackPhase installPhase"; | |
suffix = if builtins.currentSystem == "x86_64-linux" then "_64" else ""; | |
renoisePath = if demo then "Renoise_3_0_1_Demo_x86" else "rns_3_0_1_x86"; | |
src = | |
if builtins.currentSystem == "x86_64-linux" then | |
if demo then | |
fetchurl { | |
url = "http://files.renoise.com/demo/Renoise_3_0_1_Demo_x86_64.tar.bz2"; | |
sha256 = "1q7f94wz2dbz659kpp53a3n1qyndsk0pkb29lxdff4pc3ddqwykg"; | |
} | |
else | |
requireFile { | |
url = "http://backstage.renoise.com/frontend/app/index.html#/login"; | |
name = "rns_3_0_1_reg_x86.tar.gz"; | |
sha256 = "1swax2jz0gswdpzz8alwjfd8rhigc2yfspj7p8wvdvylqrf7n8q7"; | |
} | |
else if builtins.currentSystem == "i686-linux" then | |
if demo then | |
fetchurl { | |
url = "http://files.renoise.com/demo/Renoise_3_0_1_Demo_x86.tar.bz2"; | |
sha256 = "0dgqvib4xh2yhgh2wajj11wsb6xiiwgfkhyz32g8vnyaij5q8f58"; | |
} | |
else | |
requireFile { | |
url = "http://backstage.renoise.com/frontend/app/index.html#/login"; | |
name = "rns_3_0_1_reg_x86_64.tar.gz"; | |
sha256 = "1swax2jz0gswdpzz8alwjfd8rhigc2yfspj7p8wvdvylqrf7n8q7"; | |
} | |
else throw "platform is not suppored by Renoise" | |
unpackPhase = '' | |
tar -xf $src | |
''; | |
installPhase = '' | |
cp -r ${renoisePath}${suffix}/Resources $out | |
mkdir -p $out/lib/ | |
mv $out/AudioPluginServer* $out/lib/ | |
cp ${renoisePath}${suffix}/renoise $out/renoise | |
for path in ${toString buildInputs}; do | |
ln -s $path/lib/*.so* $out/lib/ | |
done | |
ln -s ${stdenv.cc.cc}/lib/libstdc++.so.6 $out/lib/ | |
mkdir $out/bin | |
ln -s $out/renoise $out/bin/renoise | |
patchelf --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) --set-rpath $out/lib $out/renoise | |
''; | |
meta = { | |
description = "modern tracker-based DAW"; | |
homepage = http://www.renoise.com/; | |
license = stdenv.lib.licenses.unfree; | |
}; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment