nixpkgs/pkgs/applications/audio/renoise/default.nix

74 lines
2.1 KiB
Nix
Raw Normal View History

2021-01-15 13:21:58 +00:00
{ lib, stdenv, fetchurl, libX11, libXext, libXcursor, libXrandr, libjack2, alsaLib
, mpg123, releasePath ? null }:
2018-05-24 08:04:17 +00:00
2021-01-15 13:21:58 +00:00
with lib;
# To use the full release version:
2019-12-13 19:41:20 +00:00
# 1) Sign into https://backstage.renoise.com and download the release version to some stable location.
# 2) Override the releasePath attribute to point to the location of the newly downloaded bundle.
# Note: Renoise creates an individual build for each license which screws somewhat with the
# use of functions like requireFile as the hash will be different for every user.
let
2018-05-24 08:04:17 +00:00
urlVersion = replaceStrings [ "." ] [ "_" ];
in
2015-09-15 18:31:24 +00:00
stdenv.mkDerivation rec {
pname = "renoise";
2020-08-29 06:15:19 +00:00
version = "3.2.2";
2015-09-15 18:31:24 +00:00
src =
if stdenv.hostPlatform.system == "x86_64-linux" then
if releasePath == null then
2021-01-15 13:21:58 +00:00
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 = "1v249kmyidx55kppk3sry7yg6hl1a91ixhnwz36h4y134fs7bkrl";
}
2015-09-15 18:31:24 +00:00
else
2021-01-15 13:21:58 +00:00
releasePath
else throw "Platform is not supported by Renoise";
2015-09-15 18:31:24 +00:00
buildInputs = [ alsaLib libjack2 libX11 libXcursor libXext libXrandr ];
2015-09-15 18:31:24 +00:00
installPhase = ''
cp -r Resources $out
mkdir -p $out/lib/
cp renoise $out/renoise
for path in ${toString buildInputs}; do
ln -s $path/lib/*.so* $out/lib/
done
2016-04-30 20:56:43 +00:00
ln -s ${stdenv.cc.cc.lib}/lib/libstdc++.so.6 $out/lib/
2015-09-15 18:31:24 +00:00
mkdir $out/bin
ln -s $out/renoise $out/bin/renoise
'';
2015-09-15 18:31:24 +00:00
postFixup = ''
patchelf \
--set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) \
--set-rpath ${mpg123}/lib:$out/lib \
$out/renoise
2020-09-25 20:35:01 +00:00
for path in $out/AudioPluginServer*; do
patchelf \
--set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) \
--set-rpath $out/lib \
$path
done
2015-09-15 18:31:24 +00:00
'';
2018-05-24 08:04:17 +00:00
meta = {
description = "Modern tracker-based DAW";
homepage = "https://www.renoise.com/";
license = licenses.unfree;
maintainers = [];
2019-12-13 19:41:20 +00:00
platforms = [ "x86_64-linux" ];
2015-09-15 18:31:24 +00:00
};
}