28 stdenv.mkDerivation rec {
29 pname = "bitwig-studio";
33 url = "https://downloads.bitwig.com/stable/${version}/${pname}-${version}.deb";
34 sha256 = "sha256-U1Qp7/7kAr1IEcv256I2J/sb5MYxfR20Pi5N8WaVh2U=";
37 nativeBuildInputs = [ dpkg makeWrapper wrapGAppsHook ];
41 dpkg-deb -x $curSrc root
45 dontWrapGApps = true; # we only want $gappsWrapperArgs here
47 buildInputs = with xorg; [
58 # libjpeg8 is required for converting jpeg's to colour palettes
78 cp -r opt/bitwig-studio $out/libexec
79 ln -s $out/libexec/bitwig-studio $out/bin/bitwig-studio
80 cp -r usr/share $out/share
81 substitute usr/share/applications/com.bitwig.BitwigStudio.desktop \
82 $out/share/applications/com.bitwig.BitwigStudio.desktop \
83 --replace /usr/bin/bitwig-studio $out/bin/bitwig-studio
89 # patchelf fails to set rpath on BitwigStudioEngine, so we use
90 # the LD_LIBRARY_PATH way
92 find $out -type f -executable \
96 -not -name 'jspawnhelper' \
97 -not -path '*/resources/*' | \
98 while IFS= read -r f ; do
99 patchelf --set-interpreter "${stdenv.cc.bintools.dynamicLinker}" $f
100 # make xdg-open overrideable at runtime
102 "''${gappsWrapperArgs[@]}" \
103 --prefix PATH : "${lib.makeBinPath [ ffmpeg ]}" \
104 --suffix PATH : "${lib.makeBinPath [ xdg-utils ]}" \
105 --suffix LD_LIBRARY_PATH : "${lib.strings.makeLibraryPath buildInputs}"
108 find $out -type f -executable -name 'jspawnhelper' | \
109 while IFS= read -r f ; do
110 patchelf --set-interpreter "${stdenv.cc.bintools.dynamicLinker}" $f
115 description = "A digital audio workstation";
117 Bitwig Studio is a multi-platform music-creation system for
118 production, performance and DJing, with a focus on flexible
119 editing tools and a super-fast workflow.
121 homepage = "https://www.bitwig.com/";
122 license = licenses.unfree;
123 platforms = [ "x86_64-linux" ];
124 maintainers = with maintainers; [ bfortz michalrus mrVanDalo ];