2024-12-31 12:49:39 -05:00
|
|
|
{
|
|
|
|
stdenv,
|
|
|
|
fetchurl,
|
|
|
|
alsa-lib,
|
|
|
|
atk,
|
|
|
|
cairo,
|
|
|
|
dpkg,
|
|
|
|
ffmpeg,
|
|
|
|
freetype,
|
|
|
|
gdk-pixbuf,
|
|
|
|
glib,
|
|
|
|
gtk3,
|
|
|
|
harfbuzz,
|
|
|
|
lib,
|
|
|
|
libglvnd,
|
|
|
|
libjack2,
|
|
|
|
libjpeg,
|
|
|
|
libnghttp2,
|
|
|
|
libxkbcommon,
|
|
|
|
makeWrapper,
|
|
|
|
pango,
|
|
|
|
pipewire,
|
2025-01-05 15:07:00 -05:00
|
|
|
wireplumber,
|
2024-12-31 12:49:39 -05:00
|
|
|
pulseaudio,
|
|
|
|
vulkan-loader,
|
|
|
|
wrapGAppsHook3,
|
|
|
|
xcb-imdkit,
|
|
|
|
xdg-utils,
|
|
|
|
xorg,
|
|
|
|
zlib,
|
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "bitwig-studio-unwrapped";
|
2025-02-03 17:09:12 -05:00
|
|
|
version = "5.3-beta-7";
|
2024-12-31 12:49:39 -05:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
name = "bitwig-studio-${version}.deb";
|
2025-02-03 17:09:12 -05:00
|
|
|
url = "https://downloads-secure.bitwig.com/5.3%20Beta%207/bitwig-studio-5.3-beta-7.deb?__token__=st=1738511951.0~exp=1738512551.0~hmac=06d510d143491f9bf2444aec8b2876ea606d9208e2753dcf15710fb3c2ceb0d3&source_url=/dl/Bitwig%20Studio/5.3%20Beta%207/installer_linux/";
|
|
|
|
sha256 = "sha256-CqDDz/N3Cm4BqkOI6PYACkyXZkqIRV7A3G5q7ekrMaE=";
|
2024-12-31 12:49:39 -05:00
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
dpkg
|
|
|
|
makeWrapper
|
|
|
|
wrapGAppsHook3
|
|
|
|
];
|
|
|
|
|
|
|
|
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
|
|
|
|
libnghttp2
|
|
|
|
libxcb
|
|
|
|
libXcursor
|
|
|
|
libX11
|
|
|
|
libXtst
|
|
|
|
libxkbcommon
|
|
|
|
pango
|
|
|
|
pipewire
|
2025-01-05 15:07:00 -05:00
|
|
|
wireplumber
|
2024-12-31 12:49:39 -05:00
|
|
|
pulseaudio
|
|
|
|
(lib.getLib stdenv.cc.cc)
|
|
|
|
vulkan-loader
|
|
|
|
xcb-imdkit
|
|
|
|
xcbutil
|
|
|
|
xcbutilwm
|
|
|
|
zlib
|
|
|
|
];
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
|
# Bitwig includes a copy of libxcb-imdkit.
|
|
|
|
# Removing it will force it to use our version.
|
|
|
|
rm $out/libexec/lib/bitwig-studio/libxcb-imdkit.so.1
|
|
|
|
|
|
|
|
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 = "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
|
|
|
|
];
|
|
|
|
sourceProvenance = [ lib.sourceTypes.binaryNativeCode ];
|
|
|
|
};
|
|
|
|
}
|