adding lsp stuff and moving bitwig to local package
This commit is contained in:
parent
8067765fec
commit
8e58c5c986
11 changed files with 233 additions and 103 deletions
33
packages/bitwig-studio/bitwig-bubblewrap.nix
Normal file
33
packages/bitwig-studio/bitwig-bubblewrap.nix
Normal file
|
@ -0,0 +1,33 @@
|
|||
{ stdenv, bindfs, bubblewrap, mktemp, writeShellScript, bitwig-studio }:
|
||||
stdenv.mkDerivation {
|
||||
inherit (bitwig-studio) pname version;
|
||||
|
||||
dontUnpack = true;
|
||||
dontConfigure = true;
|
||||
dontBuild = true;
|
||||
dontPatchELF = true;
|
||||
dontStrip = true;
|
||||
|
||||
installPhase = let
|
||||
wrapper = writeShellScript "bitwig-studio" ''
|
||||
echo "Creating temporary directory"
|
||||
TMPDIR=$(${mktemp}/bin/mktemp --directory)
|
||||
echo "Temporary directory: $TMPDIR"
|
||||
echo "Copying default Vamp Plugin settings"
|
||||
cp -r ${bitwig-studio}/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 --dev-bind / / --bind $TMPDIR/VampTransforms ${bitwig-studio}/libexec/resources/VampTransforms ${bitwig-studio}/bin/bitwig-studio
|
||||
|
||||
echo "Bitwig exited, removing temporary directory"
|
||||
rm -rf $TMPDIR
|
||||
'';
|
||||
in ''
|
||||
mkdir -p $out/bin
|
||||
cp ${wrapper} $out/bin/bitwig-studio
|
||||
ln -s ${bitwig-studio}/bin/bitwig-studio $out/bin/bitwig-studio-unwrapped
|
||||
cp -r ${bitwig-studio}/share $out
|
||||
'';
|
||||
}
|
107
packages/bitwig-studio/bitwig-studio5-3-unwrapped.nix
Normal file
107
packages/bitwig-studio/bitwig-studio5-3-unwrapped.nix
Normal file
|
@ -0,0 +1,107 @@
|
|||
{ stdenv, fetchurl, alsa-lib, atk, cairo, dpkg, ffmpeg, freetype, gdk-pixbuf
|
||||
, glib, gtk3, harfbuzz, lib, libglvnd, libjack2, libjpeg, libxkbcommon
|
||||
, makeWrapper, pango, pipewire, pulseaudio, wrapGAppsHook, xdg-utils, xorg, zlib, libudev-zero
|
||||
|
||||
, webkitgtk, curl, fftwFloat, jack2, vulkan-loader }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "bitwig-studio5-3-unwrapped";
|
||||
version = "5.3";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://downloads-secure.bitwig.com/5.3.1/bitwig-studio-5.3.1.deb?__token__=st=1740197111.0~exp=1740197711.0~hmac=2e5de6388d4f0df89ed9cbbfa8735ff21c6792a818f061eccd8bbe54438a61cf&source_url=/dl/Bitwig%20Studio/5.3.1/installer_linux/";
|
||||
sha256 = "sha256-mxodFCu4SDzofnoZZZ7TPDUIrRc3UJt8TuEBwDOo2wQ=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ dpkg makeWrapper wrapGAppsHook ];
|
||||
|
||||
unpackCmd = ''
|
||||
mkdir -p root
|
||||
dpkg-deb -x $curSrc root
|
||||
'';
|
||||
|
||||
dontBuild = true;
|
||||
dontWrapGApps = true; # we only want $gappsWrapperArgs here
|
||||
|
||||
buildInputs = with xorg; [
|
||||
alsa-lib
|
||||
atk
|
||||
cairo
|
||||
freetype
|
||||
gdk-pixbuf
|
||||
glib
|
||||
gtk3
|
||||
harfbuzz
|
||||
libglvnd
|
||||
libjack2
|
||||
# libjpeg8 is required for converting jpeg's to colour palettes
|
||||
libjpeg
|
||||
libxcb
|
||||
libXcursor
|
||||
libX11
|
||||
libXtst
|
||||
libxkbcommon
|
||||
pango
|
||||
pipewire
|
||||
pulseaudio
|
||||
stdenv.cc.cc.lib
|
||||
vulkan-loader
|
||||
xcbutil
|
||||
xcbutilwm
|
||||
zlib
|
||||
libudev-zero
|
||||
];
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
mkdir -p $out/bin
|
||||
cp -r opt/bitwig-studio $out/libexec
|
||||
ln -s $out/libexec/bitwig-studio $out/bin/bitwig-studio
|
||||
cp -r usr/share $out/share
|
||||
substitute usr/share/applications/com.bitwig.BitwigStudio.desktop \
|
||||
$out/share/applications/com.bitwig.BitwigStudio.desktop \
|
||||
--replace /usr/bin/bitwig-studio $out/bin/bitwig-studio
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
postFixup = ''
|
||||
# patchelf fails to set rpath on BitwigStudioEngine, so we use
|
||||
# the LD_LIBRARY_PATH way
|
||||
|
||||
find $out -type f -executable \
|
||||
-not -name '*.so.*' \
|
||||
-not -name '*.so' \
|
||||
-not -name '*.jar' \
|
||||
-not -name 'jspawnhelper' \
|
||||
-not -path '*/resources/*' | \
|
||||
while IFS= read -r f ; do
|
||||
patchelf --set-interpreter "${stdenv.cc.bintools.dynamicLinker}" $f
|
||||
# make xdg-open overrideable at runtime
|
||||
wrapProgram $f \
|
||||
"''${gappsWrapperArgs[@]}" \
|
||||
--prefix PATH : "${lib.makeBinPath [ ffmpeg ]}" \
|
||||
--suffix PATH : "${lib.makeBinPath [ xdg-utils ]}" \
|
||||
--suffix LD_LIBRARY_PATH : "${lib.strings.makeLibraryPath buildInputs}"
|
||||
done
|
||||
|
||||
find $out -type f -executable -name 'jspawnhelper' | \
|
||||
while IFS= read -r f ; do
|
||||
patchelf --set-interpreter "${stdenv.cc.bintools.dynamicLinker}" $f
|
||||
done
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "A digital audio workstation";
|
||||
longDescription = ''
|
||||
Bitwig Studio is a multi-platform music-creation system for
|
||||
production, performance and DJing, with a focus on flexible
|
||||
editing tools and a super-fast workflow.
|
||||
'';
|
||||
homepage = "https://www.bitwig.com/";
|
||||
#license = licenses.unfree;
|
||||
platforms = [ "x86_64-linux" ];
|
||||
maintainers = with maintainers; [ bfortz michalrus mrVanDalo ];
|
||||
};
|
||||
}
|
|
@ -4,8 +4,8 @@ stdenv.mkDerivation rec {
|
|||
pname = "nodal-red";
|
||||
version = "latest";
|
||||
src = fetchurl {
|
||||
url = "https://dsp56300.com/builds/nodalred2x/beta/DSP56300Emu-1.4.2-Linux_x86_64-NodalRed2x-CLAP.zip";
|
||||
sha256 = "sha256-7F+vdZTdvUIeERk7WFw7h1w00JPxwA5e4Z/LIEAhS84=";
|
||||
url = "https://dsp56300.com/builds/nodalred2x/beta/DSP56300Emu-1.4.4-Linux_x86_64-NodalRed2x-CLAP.zip";
|
||||
sha256 = "sha256-5xxb3okVd45wbzIcgv5XXobECVIhqLBJT31GxR8OIT8=";
|
||||
};
|
||||
nativeBuildInputs = [ makeWrapper unzip autoPatchelfHook ];
|
||||
buildInputs = with pkgs; [
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue