2023-01-02 01:11:56 +00:00
|
|
|
{ stdenv
|
|
|
|
, fetchurl
|
|
|
|
, alsa-lib
|
|
|
|
, cairo
|
|
|
|
, dpkg
|
|
|
|
, ffmpeg
|
|
|
|
, freetype
|
|
|
|
, gdk-pixbuf
|
|
|
|
, glib
|
|
|
|
, gtk3
|
|
|
|
, lib
|
|
|
|
, libglvnd
|
|
|
|
, libjack2
|
|
|
|
, libjpeg
|
|
|
|
, libxkbcommon
|
|
|
|
, makeWrapper
|
|
|
|
, pipewire
|
|
|
|
, pulseaudio
|
2024-04-26 20:24:03 +00:00
|
|
|
, wrapGAppsHook3
|
2023-01-02 01:11:56 +00:00
|
|
|
, xdg-utils
|
|
|
|
, xorg
|
|
|
|
, zlib
|
|
|
|
}:
|
2021-07-15 22:04:11 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "bitwig-studio";
|
2023-04-14 05:14:38 +00:00
|
|
|
version = "4.4.10";
|
2021-07-15 22:04:11 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://downloads.bitwig.com/stable/${version}/${pname}-${version}.deb";
|
2023-04-14 05:14:38 +00:00
|
|
|
sha256 = "sha256-gtQ1mhXk0AqGidZk5TCzSR58pD1JJoELMBmELtqyb4U=";
|
2021-07-15 22:04:11 +00:00
|
|
|
};
|
|
|
|
|
2024-04-26 20:24:03 +00:00
|
|
|
nativeBuildInputs = [ dpkg makeWrapper wrapGAppsHook3 ];
|
2021-07-15 22:04:11 +00:00
|
|
|
|
|
|
|
unpackCmd = ''
|
|
|
|
mkdir -p root
|
|
|
|
dpkg-deb -x $curSrc root
|
|
|
|
'';
|
|
|
|
|
|
|
|
dontBuild = true;
|
|
|
|
dontWrapGApps = true; # we only want $gappsWrapperArgs here
|
|
|
|
|
|
|
|
buildInputs = with xorg; [
|
2023-01-02 01:11:56 +00:00
|
|
|
alsa-lib
|
|
|
|
cairo
|
|
|
|
freetype
|
|
|
|
gdk-pixbuf
|
|
|
|
glib
|
|
|
|
gtk3
|
|
|
|
libglvnd
|
|
|
|
libjack2
|
|
|
|
# libjpeg8 is required for converting jpeg's to colour palettes
|
|
|
|
libjpeg
|
|
|
|
libxcb
|
|
|
|
libXcursor
|
|
|
|
libX11
|
|
|
|
libXtst
|
|
|
|
libxkbcommon
|
|
|
|
pipewire
|
|
|
|
pulseaudio
|
|
|
|
stdenv.cc.cc.lib
|
|
|
|
xcbutil
|
|
|
|
xcbutilwm
|
|
|
|
zlib
|
2021-07-15 22:04:11 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
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' \
|
2021-08-23 13:50:43 +00:00
|
|
|
-not -name 'jspawnhelper' \
|
2021-07-15 22:04:11 +00:00
|
|
|
-not -path '*/resources/*' | \
|
|
|
|
while IFS= read -r f ; do
|
|
|
|
patchelf --set-interpreter "${stdenv.cc.bintools.dynamicLinker}" $f
|
2022-07-11 23:23:52 +00:00
|
|
|
# make xdg-open overrideable at runtime
|
2021-07-15 22:04:11 +00:00
|
|
|
wrapProgram $f \
|
|
|
|
"''${gappsWrapperArgs[@]}" \
|
2022-07-11 23:23:52 +00:00
|
|
|
--prefix PATH : "${lib.makeBinPath [ ffmpeg ]}" \
|
|
|
|
--suffix PATH : "${lib.makeBinPath [ xdg-utils ]}" \
|
2021-07-15 22:04:11 +00:00
|
|
|
--suffix LD_LIBRARY_PATH : "${lib.strings.makeLibraryPath buildInputs}"
|
|
|
|
done
|
|
|
|
|
2021-08-23 13:50:43 +00:00
|
|
|
find $out -type f -executable -name 'jspawnhelper' | \
|
|
|
|
while IFS= read -r f ; do
|
|
|
|
patchelf --set-interpreter "${stdenv.cc.bintools.dynamicLinker}" $f
|
|
|
|
done
|
2021-07-15 22:04:11 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
}
|