25 stdenv.mkDerivation rec {
26 pname = "bitwig-studio";
30 url = "https://downloads.bitwig.com/stable/${version}/${pname}-${version}.deb";
31 sha256 = "sha256-gtQ1mhXk0AqGidZk5TCzSR58pD1JJoELMBmELtqyb4U=";
34 nativeBuildInputs = [ dpkg makeWrapper wrapGAppsHook ];
38 dpkg-deb -x $curSrc root
42 dontWrapGApps = true; # we only want $gappsWrapperArgs here
44 buildInputs = with xorg; [
53 # libjpeg8 is required for converting jpeg's to colour palettes
72 cp -r opt/bitwig-studio $out/libexec
73 ln -s $out/libexec/bitwig-studio $out/bin/bitwig-studio
74 cp -r usr/share $out/share
75 substitute usr/share/applications/com.bitwig.BitwigStudio.desktop \
76 $out/share/applications/com.bitwig.BitwigStudio.desktop \
77 --replace /usr/bin/bitwig-studio $out/bin/bitwig-studio
83 # patchelf fails to set rpath on BitwigStudioEngine, so we use
84 # the LD_LIBRARY_PATH way
86 find $out -type f -executable \
90 -not -name 'jspawnhelper' \
91 -not -path '*/resources/*' | \
92 while IFS= read -r f ; do
93 patchelf --set-interpreter "${stdenv.cc.bintools.dynamicLinker}" $f
94 # make xdg-open overrideable at runtime
96 "''${gappsWrapperArgs[@]}" \
97 --prefix PATH : "${lib.makeBinPath [ ffmpeg ]}" \
98 --suffix PATH : "${lib.makeBinPath [ xdg-utils ]}" \
99 --suffix LD_LIBRARY_PATH : "${lib.strings.makeLibraryPath buildInputs}"
102 find $out -type f -executable -name 'jspawnhelper' | \
103 while IFS= read -r f ; do
104 patchelf --set-interpreter "${stdenv.cc.bintools.dynamicLinker}" $f
109 description = "A digital audio workstation";
111 Bitwig Studio is a multi-platform music-creation system for
112 production, performance and DJing, with a focus on flexible
113 editing tools and a super-fast workflow.
115 homepage = "https://www.bitwig.com/";
116 license = licenses.unfree;
117 platforms = [ "x86_64-linux" ];
118 maintainers = with maintainers; [ bfortz michalrus mrVanDalo ];