bitwig-studio: init at 1.3.12 (#17756)

authored by Michal Rus and committed by Rok Garbas d965dfc0 c403221a

+101
+97
pkgs/applications/audio/bitwig-studio/default.nix
··· 1 + { stdenv, fetchurl, alsaLib, bzip2, cairo, dpkg, freetype, gdk_pixbuf 2 + , glib, gtk, harfbuzz, jdk, lib, libX11, libXau, libXcursor, libXdmcp 3 + , libXext, libXfixes, libXrender, libbsd, libjack2, libpng, libxcb 4 + , libxkbcommon, libxkbfile, makeWrapper, pixman, xcbutil, xcbutilwm 5 + , xdg_utils, zenity, zlib }: 6 + 7 + stdenv.mkDerivation rec { 8 + name = "bitwig-studio-${version}"; 9 + version = "1.3.12"; 10 + 11 + src = fetchurl { 12 + url = "https://downloads.bitwig.com/stable/${version}/bitwig-studio-${version}.deb"; 13 + sha256 = "01z6yia4a6lfsf3rqq379l7xzqfbpz27mf1mr8sx9z1a8rzzyhld"; 14 + }; 15 + 16 + nativeBuildInputs = [ dpkg makeWrapper ]; 17 + 18 + unpackCmd = "mkdir root ; dpkg-deb -x $curSrc root"; 19 + 20 + dontBuild = true; 21 + dontPatchELF = true; 22 + dontStrip = true; 23 + 24 + libPath = lib.makeLibraryPath [ 25 + alsaLib bzip2.out cairo freetype gdk_pixbuf glib gtk harfbuzz 26 + libX11 libXau libXcursor libXdmcp libXext libXfixes libXrender 27 + libbsd libjack2 libpng libxcb libxkbfile pixman xcbutil xcbutilwm 28 + zlib 29 + ]; 30 + 31 + binPath = lib.makeBinPath [ 32 + xdg_utils zenity 33 + ]; 34 + 35 + installPhase = '' 36 + mkdir -p $out 37 + cp -r opt/bitwig-studio $out/libexec 38 + 39 + # Use NixOS versions of these libs instead of the bundled ones. 40 + ( 41 + cd $out/libexec/lib/bitwig-studio 42 + rm libbz2.so* libxkbfile.so* libXcursor.so* libXau.so* \ 43 + libXdmcp.so* libpng16.so* libxcb*.so* libharfbuzz.so* \ 44 + libcairo.so* libfreetype.so* 45 + ln -s ${bzip2.out}/lib/libbz2.so.1.0.6 libbz2.so.1.0 46 + ) 47 + 48 + # Use our OpenJDK instead of Bitwig’s bundled—and commercial!—one. 49 + rm -rf $out/libexec/lib/jre 50 + ln -s ${jdk.home}/jre $out/libexec/lib/jre 51 + 52 + # Bitwig’s `libx11-windowing-system.so` has several problems: 53 + # 54 + # • has some old version of libxkbcommon linked statically (ಠ_ಠ), 55 + # 56 + # • hardcodes path to `/usr/share/X11/xkb`, 57 + # 58 + # • even if we redirected it with libredirect (after adding 59 + # `eaccess()` to libredirect!), their version of libxkbcommon 60 + # is unable to parse our xkeyboardconfig. Been there, done that. 61 + # 62 + # However, it suffices to override theirs with our libxkbcommon 63 + # in LD_PRELOAD. :-) 64 + 65 + find $out -type f -executable \ 66 + -not -name '*.so.*' \ 67 + -not -name '*.so' \ 68 + -not -path '*/resources/*' | \ 69 + while IFS= read -r f ; do 70 + patchelf \ 71 + --set-interpreter $(cat ${stdenv.cc}/nix-support/dynamic-linker) \ 72 + $f && \ 73 + wrapProgram $f \ 74 + --prefix PATH : "${binPath}" \ 75 + --prefix LD_LIBRARY_PATH : "${libPath}" \ 76 + --set LD_PRELOAD "${libxkbcommon.out}/lib/libxkbcommon.so" || true 77 + done 78 + 79 + mkdir -p $out/bin 80 + ln -s $out/libexec/bitwig-studio $out/bin/bitwig-studio 81 + 82 + cp -r usr/share $out/share 83 + ''; 84 + 85 + meta = with stdenv.lib; { 86 + description = "A digital audio workstation"; 87 + longDescription = '' 88 + Bitwig Studio is a multi-platform music-creation system for 89 + production, performance and DJing, with a focus on flexible 90 + editing tools and a super-fast workflow. 91 + ''; 92 + homepage = http://www.bitwig.com/; 93 + license = licenses.unfree; 94 + platforms = [ "x86_64-linux" ]; 95 + maintainers = with maintainers; [ michalrus ]; 96 + }; 97 + }
+4
pkgs/top-level/all-packages.nix
··· 12395 12395 12396 12396 bitmeter = callPackage ../applications/audio/bitmeter { }; 12397 12397 12398 + bitwig-studio = callPackage ../applications/audio/bitwig-studio { 12399 + inherit (gnome2) zenity; 12400 + }; 12401 + 12398 12402 bleachbit = callPackage ../applications/misc/bleachbit { }; 12399 12403 12400 12404 blender = callPackage ../applications/misc/blender {