bitwig-studio: switch to autoPatchelfHook

This commit is contained in:
gnidorah 2019-01-06 12:04:08 +03:00
parent df834ee56d
commit c680c57a84
2 changed files with 10 additions and 16 deletions

View File

@ -1,8 +1,8 @@
{ stdenv, fetchurl, alsaLib, bzip2, cairo, dpkg, freetype, gdk_pixbuf { stdenv, fetchurl, alsaLib, bzip2, cairo, dpkg, freetype, gdk_pixbuf
, glib, gtk2, harfbuzz, jdk, lib, xorg , glib, gtk2, gtk3, harfbuzz, jdk, lib, xorg
, libbsd, libjack2, libpng , libbsd, libjack2, libpng, ffmpeg
, libxkbcommon , libxkbcommon
, makeWrapper, pixman , makeWrapper, pixman, autoPatchelfHook
, xdg_utils, zenity, zlib }: , xdg_utils, zenity, zlib }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
@ -14,7 +14,7 @@ stdenv.mkDerivation rec {
sha256 = "0n0fxh9gnmilwskjcayvjsjfcs3fz9hn00wh7b3gg0cv3qqhich8"; sha256 = "0n0fxh9gnmilwskjcayvjsjfcs3fz9hn00wh7b3gg0cv3qqhich8";
}; };
nativeBuildInputs = [ dpkg makeWrapper ]; nativeBuildInputs = [ dpkg makeWrapper autoPatchelfHook ];
unpackCmd = "mkdir root ; dpkg-deb -x $curSrc root"; unpackCmd = "mkdir root ; dpkg-deb -x $curSrc root";
@ -22,14 +22,14 @@ stdenv.mkDerivation rec {
dontPatchELF = true; dontPatchELF = true;
dontStrip = true; dontStrip = true;
libPath = with xorg; lib.makeLibraryPath [ buildInputs = with xorg; [
alsaLib bzip2.out cairo freetype gdk_pixbuf glib gtk2 harfbuzz libX11 libXau alsaLib bzip2.out cairo freetype gdk_pixbuf glib gtk2 gtk3 harfbuzz libX11 libXau
libXcursor libXdmcp libXext libXfixes libXrender libbsd libjack2 libpng libxcb libXcursor libXdmcp libXext libXfixes libXrender libbsd libjack2 libpng libxcb
libxkbfile pixman xcbutil xcbutilwm zlib libxkbfile pixman xcbutil xcbutilwm zlib
]; ];
binPath = lib.makeBinPath [ binPath = lib.makeBinPath [
xdg_utils zenity xdg_utils zenity ffmpeg
]; ];
installPhase = '' installPhase = ''
@ -67,12 +67,8 @@ stdenv.mkDerivation rec {
-not -name '*.so' \ -not -name '*.so' \
-not -path '*/resources/*' | \ -not -path '*/resources/*' | \
while IFS= read -r f ; do while IFS= read -r f ; do
patchelf \
--set-interpreter $(cat ${stdenv.cc}/nix-support/dynamic-linker) \
$f && \
wrapProgram $f \ wrapProgram $f \
--prefix PATH : "${binPath}" \ --prefix PATH : "${binPath}" \
--prefix LD_LIBRARY_PATH : "${libPath}" \
--set LD_PRELOAD "${libxkbcommon.out}/lib/libxkbcommon.so" || true --set LD_PRELOAD "${libxkbcommon.out}/lib/libxkbcommon.so" || true
done done

View File

@ -1,5 +1,5 @@
{ stdenv, fetchurl, bitwig-studio1, { stdenv, fetchurl, bitwig-studio1,
xdg_utils, zenity, ffmpeg }: xdg_utils, zenity, ffmpeg, pulseaudio }:
bitwig-studio1.overrideAttrs (oldAttrs: rec { bitwig-studio1.overrideAttrs (oldAttrs: rec {
name = "bitwig-studio-${version}"; name = "bitwig-studio-${version}";
@ -10,9 +10,7 @@ bitwig-studio1.overrideAttrs (oldAttrs: rec {
sha256 = "1v62z08hqla8fz5m7hl9ynf2hpr0j0arm0nb5lpd99qrv36ibrsc"; sha256 = "1v62z08hqla8fz5m7hl9ynf2hpr0j0arm0nb5lpd99qrv36ibrsc";
}; };
buildInputs = bitwig-studio1.buildInputs ++ [ ffmpeg ]; runtimeDependencies = [
pulseaudio
binPath = stdenv.lib.makeBinPath [
ffmpeg xdg_utils zenity
]; ];
}) })