2021-06-28 23:13:55 +00:00
|
|
|
{ stdenv, fetchurl, alsa-lib, cairo, dpkg, freetype
|
2021-01-05 17:05:55 +00:00
|
|
|
, gdk-pixbuf, glib, gtk3, lib, xorg
|
2021-05-20 23:08:51 +00:00
|
|
|
, libglvnd, libjack2, ffmpeg
|
2021-02-05 17:12:51 +00:00
|
|
|
, libxkbcommon, xdg-utils, zlib, pulseaudio
|
2024-05-15 15:35:15 +00:00
|
|
|
, wrapGAppsHook3, makeWrapper }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-01-05 17:05:55 +00:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "bitwig-studio";
|
2023-10-09 19:29:22 +00:00
|
|
|
version = "3.3.11";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2021-01-05 17:05:55 +00:00
|
|
|
url = "https://downloads.bitwig.com/stable/${version}/${pname}-${version}.deb";
|
2023-10-09 19:29:22 +00:00
|
|
|
sha256 = "sha256-cF8gVPjM0KUcKOW09uFccp4/lzbUmZcBkVOwr/A/8Yw=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
nativeBuildInputs = [ dpkg makeWrapper wrapGAppsHook3 ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-01-05 17:05:55 +00:00
|
|
|
unpackCmd = ''
|
|
|
|
mkdir -p root
|
|
|
|
dpkg-deb -x $curSrc root
|
|
|
|
'';
|
|
|
|
|
|
|
|
dontBuild = true;
|
|
|
|
dontWrapGApps = true; # we only want $gappsWrapperArgs here
|
|
|
|
|
|
|
|
buildInputs = with xorg; [
|
2021-06-28 23:13:55 +00:00
|
|
|
alsa-lib cairo freetype gdk-pixbuf glib gtk3 libxcb xcbutil xcbutilwm zlib libXtst libxkbcommon pulseaudio libjack2 libX11 libglvnd libXcursor stdenv.cc.cc.lib
|
2021-01-05 17:05:55 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
ldLibraryPath = lib.strings.makeLibraryPath buildInputs;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
installPhase = ''
|
2021-06-28 23:13:55 +00:00
|
|
|
runHook preInstall
|
|
|
|
|
2021-01-05 17:05:55 +00:00
|
|
|
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
|
2021-06-28 23:13:55 +00:00
|
|
|
|
2023-10-09 19:29:22 +00:00
|
|
|
runHook postInstall
|
2021-01-05 17:05:55 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
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 -path '*/resources/*' | \
|
|
|
|
while IFS= read -r f ; do
|
|
|
|
patchelf --set-interpreter "${stdenv.cc.bintools.dynamicLinker}" $f
|
|
|
|
wrapProgram $f \
|
|
|
|
"''${gappsWrapperArgs[@]}" \
|
2022-08-21 13:32:41 +00:00
|
|
|
--prefix LD_LIBRARY_PATH : "${ldLibraryPath}" \
|
|
|
|
--prefix PATH : "${lib.makeBinPath [ ffmpeg ]}" \
|
|
|
|
--suffix PATH : "${lib.makeBinPath [ xdg-utils ]}"
|
2021-01-05 17:05:55 +00:00
|
|
|
done
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
2021-01-05 17:05:55 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "Digital audio workstation";
|
2021-01-05 17:05:55 +00:00
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
}
|