Skip to content

Instantly share code, notes, and snippets.

@cleverca22
Created January 28, 2018 00:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cleverca22/9c6bbb34f379e84b76fc16b6d517959d to your computer and use it in GitHub Desktop.
Save cleverca22/9c6bbb34f379e84b76fc16b6d517959d to your computer and use it in GitHub Desktop.
with import <nixpkgs> {};
let
libPath = lib.makeLibraryPath [ alsaLib gcc.cc xlibs.libX11 xlibs.libXi ];
reaper-derivation = stdenv.mkDerivation {
name = "reaper";
src = fetchurl {
url = "https://landoleet.org/reaper571pre15_linux_x86_64.tar.xz";
sha256 = "0i0djjal4kdqnpw3knhiplajkynbbd3f10d4hvh3l71v6rkpdhp2";
};
installPhase = ''
tar -xf $src
cp -r reaper_linux_x86_64/REAPER $out/
cd $out
mkdir bin lib
mv reaper5 reamote-server bin/
mv libSwell.so bin/
mkdir -pv share/reaper
mv whatsnew.txt tips.txt Resources Plugins license.txt InstallData Docs share/reaper/
patchelf --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" --set-rpath ${libPath} bin/reaper5
patchelf --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" --set-rpath ${libPath} bin/reamote-server
patchelf --set-rpath ${libPath} bin/libSwell.so
'';
dontStrip = true;
};
in rec {
inherit reaper-derivation;
reaper = buildFHSUserEnv {
name = "reaper";
targetPkgs = pkgs: [ reaper-derivation ];
/* runScript = "reaper5"; */
};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment