2021-07-19 01:34:21 +02:00
|
|
|
{ config, lib, stdenv
|
|
|
|
, fetchurl
|
|
|
|
, autoPatchelfHook
|
|
|
|
, makeWrapper
|
|
|
|
|
|
|
|
, alsa-lib
|
|
|
|
, gtk3
|
|
|
|
, lame
|
|
|
|
, ffmpeg
|
|
|
|
, vlc
|
|
|
|
, xdg-utils
|
|
|
|
, which
|
|
|
|
|
|
|
|
, jackSupport ? true, libjack2
|
|
|
|
, pulseaudioSupport ? config.pulseaudio or true, libpulseaudio
|
2019-05-14 20:54:45 +02:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2021-07-19 01:34:21 +02:00
|
|
|
pname = "reaper";
|
2021-08-28 00:59:24 +02:00
|
|
|
version = "6.35";
|
2019-05-14 20:54:45 +02:00
|
|
|
|
|
|
|
src = fetchurl {
|
2021-07-19 01:34:21 +02:00
|
|
|
url = "https://www.reaper.fm/files/${lib.versions.major version}.x/reaper${builtins.replaceStrings ["."] [""] version}_linux_${stdenv.targetPlatform.qemuArch}.tar.xz";
|
2021-08-28 00:59:24 +02:00
|
|
|
sha256 = "0wbbxbx3fcycy5gch6mvcbaksdhagywd00yifcwhvb80jlzaa1zg";
|
2019-05-14 20:54:45 +02:00
|
|
|
};
|
|
|
|
|
2021-07-19 01:34:21 +02:00
|
|
|
nativeBuildInputs = [
|
|
|
|
autoPatchelfHook
|
|
|
|
makeWrapper
|
|
|
|
xdg-utils # Required for desktop integration
|
|
|
|
which
|
|
|
|
];
|
2019-05-14 20:54:45 +02:00
|
|
|
|
|
|
|
buildInputs = [
|
2021-07-19 01:34:21 +02:00
|
|
|
alsa-lib
|
|
|
|
stdenv.cc.cc.lib # reaper and libSwell need libstdc++.so.6
|
|
|
|
gtk3
|
2019-05-14 20:54:45 +02:00
|
|
|
];
|
|
|
|
|
|
|
|
runtimeDependencies = [
|
2021-07-19 01:34:21 +02:00
|
|
|
gtk3 # libSwell needs libgdk-3.so.0
|
|
|
|
]
|
|
|
|
++ lib.optional jackSupport libjack2
|
|
|
|
++ lib.optional pulseaudioSupport libpulseaudio;
|
2019-05-14 20:54:45 +02:00
|
|
|
|
|
|
|
dontBuild = true;
|
|
|
|
|
|
|
|
installPhase = ''
|
2021-07-19 01:34:21 +02:00
|
|
|
runHook preInstall
|
|
|
|
|
|
|
|
HOME="$out/share" XDG_DATA_HOME="$out/share" ./install-reaper.sh \
|
2019-05-14 20:54:45 +02:00
|
|
|
--install $out/opt \
|
|
|
|
--integrate-user-desktop
|
|
|
|
rm $out/opt/REAPER/uninstall-reaper.sh
|
|
|
|
|
2021-07-19 01:34:21 +02:00
|
|
|
# Dynamic loading of plugin dependencies does not adhere to rpath of
|
|
|
|
# reaper executable that gets modified with runtimeDependencies.
|
|
|
|
# Patching each plugin with DT_NEEDED is cumbersome and requires
|
|
|
|
# hardcoding of API versions of each dependency.
|
|
|
|
# Setting the rpath of the plugin shared object files does not
|
|
|
|
# seem to have an effect for some plugins.
|
|
|
|
# We opt for wrapping the executable with LD_LIBRARY_PATH prefix.
|
2019-05-14 20:54:45 +02:00
|
|
|
wrapProgram $out/opt/REAPER/reaper \
|
2021-07-19 01:34:21 +02:00
|
|
|
--prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath [ lame ffmpeg vlc ]}"
|
2020-04-11 15:38:30 +02:00
|
|
|
|
2020-09-01 11:56:53 +02:00
|
|
|
cp -rv ${./jsfx}/* $out/opt/REAPER/InstallData/Effects/
|
2019-05-14 20:54:45 +02:00
|
|
|
|
|
|
|
mkdir $out/bin
|
|
|
|
ln -s $out/opt/REAPER/reaper $out/bin/
|
|
|
|
ln -s $out/opt/REAPER/reamote-server $out/bin/
|
2021-07-19 01:34:21 +02:00
|
|
|
|
|
|
|
runHook postInstall
|
2019-05-14 20:54:45 +02:00
|
|
|
'';
|
|
|
|
|
2021-02-27 08:40:08 +01:00
|
|
|
meta = with lib; {
|
2019-05-14 20:54:45 +02:00
|
|
|
description = "Digital audio workstation";
|
2020-09-01 11:56:53 +02:00
|
|
|
homepage = "https://www.reaper.fm/";
|
2019-05-14 20:54:45 +02:00
|
|
|
license = licenses.unfree;
|
2021-07-19 01:34:21 +02:00
|
|
|
platforms = [ "x86_64-linux" "aarch64-linux" ];
|
|
|
|
maintainers = with maintainers; [ jfrankenau ilian ];
|
2019-05-14 20:54:45 +02:00
|
|
|
};
|
|
|
|
}
|