-
-
Notifications
You must be signed in to change notification settings - Fork 14.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bitwig-studio: Add wrapper to fix onset and beat detection
- Loading branch information
Showing
3 changed files
with
51 additions
and
2 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
{ | ||
stdenv, | ||
bindfs, | ||
bubblewrap, | ||
mktemp, | ||
writeShellScript, | ||
bitwig-studio-unwrapped, | ||
}: | ||
stdenv.mkDerivation { | ||
inherit (bitwig-studio-unwrapped) version; | ||
|
||
pname = "bitwig-studio"; | ||
|
||
dontUnpack = true; | ||
dontConfigure = true; | ||
dontBuild = true; | ||
dontPatchELF = true; | ||
dontStrip = true; | ||
|
||
installPhase = | ||
let | ||
wrapper = writeShellScript "bitwig-studio" '' | ||
set -e | ||
echo "Creating temporary directory" | ||
TMPDIR=$(${mktemp}/bin/mktemp --directory) | ||
echo "Temporary directory: $TMPDIR" | ||
echo "Copying default Vamp Plugin settings" | ||
cp -r ${bitwig-studio-unwrapped}/libexec/resources/VampTransforms $TMPDIR | ||
echo "Changing permissions to be writable" | ||
chmod -R u+w $TMPDIR/VampTransforms | ||
echo "Starting Bitwig Studio in Bubblewrap Environment" | ||
${bubblewrap}/bin/bwrap --bind / / --bind $TMPDIR/VampTransforms ${bitwig-studio-unwrapped}/libexec/resources/VampTransforms ${bitwig-studio-unwrapped}/bin/bitwig-studio || true | ||
echo "Bitwig exited, removing temporary directory" | ||
rm -rf $TMPDIR | ||
''; | ||
in | ||
'' | ||
mkdir -p $out/bin | ||
cp ${wrapper} $out/bin/bitwig-studio | ||
cp -r ${bitwig-studio-unwrapped}/share $out | ||
''; | ||
} |
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