maxx: switch to autoPatchelfHook

This commit is contained in:
gnidorah 2018-05-17 22:54:57 +03:00
parent 33a94b0448
commit 636fce50fe

View File

@ -1,4 +1,5 @@
{ stdenv, fetchurl, makeWrapper, libredirect, gcc-unwrapped, bash, gtk-engine-murrine, gtk_engines, librsvg { stdenv, fetchurl, makeWrapper, autoPatchelfHook
, libredirect, gcc-unwrapped, bash, gtk-engine-murrine, gtk_engines, librsvg
, libX11, libXext, libXi, libXau, libXrender, libXft, libXmu, libSM, libXcomposite, libXfixes, libXpm , libX11, libXext, libXi, libXau, libXrender, libXft, libXmu, libSM, libXcomposite, libXfixes, libXpm
, libXinerama, libXdamage, libICE, libXtst, libXaw, fontconfig, pango, cairo, glib, libxml2, atk, gtk2 , libXinerama, libXdamage, libICE, libXtst, libXaw, fontconfig, pango, cairo, glib, libxml2, atk, gtk2
@ -9,11 +10,6 @@
let let
version = "Indy-1.1.0"; version = "Indy-1.1.0";
deps = [
stdenv.cc.cc libX11 libXext libXi libXau libXrender libXft libXmu libSM libXcomposite libXfixes libXpm
libXinerama libXdamage libICE libXtst libXaw fontconfig pango cairo glib libxml2 atk gtk2
gdk_pixbuf libGL ncurses
];
runtime_deps = [ runtime_deps = [
xclock xsettingsd xclock xsettingsd
]; ];
@ -31,7 +27,12 @@ in stdenv.mkDerivation {
}) })
]; ];
nativeBuildInputs = [ makeWrapper ]; nativeBuildInputs = [ makeWrapper autoPatchelfHook ];
buildInputs = [
stdenv.cc.cc libX11 libXext libXi libXau libXrender libXft libXmu libSM libXcomposite libXfixes libXpm
libXinerama libXdamage libICE libXtst libXaw fontconfig pango cairo glib libxml2 atk gtk2
gdk_pixbuf libGL ncurses
];
buildPhase = '' buildPhase = ''
while IFS= read -r -d ''$'\0' i; do while IFS= read -r -d ''$'\0' i; do
@ -58,15 +59,11 @@ in stdenv.mkDerivation {
--prefix PATH : ${stdenv.lib.makeBinPath runtime_deps} --prefix PATH : ${stdenv.lib.makeBinPath runtime_deps}
while IFS= read -r -d ''$'\0' i; do while IFS= read -r -d ''$'\0' i; do
if isELF "$i"; then if isExecutable "$i"; then
bin=`patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" "$i"; echo $?` wrapProgram "$i" \
patchelf --set-rpath "$maxx/lib64:$maxx/OpenMotif-2.1.32/lib64:$maxx/OpenMotif-2.3.1/lib64:${stdenv.lib.makeLibraryPath deps}" "$i" --set LD_PRELOAD "${libredirect}/lib/libredirect.so" \
if [ "$bin" -eq 0 ]; then --set NIX_REDIRECTS /opt/MaXX=$maxx \
wrapProgram "$i" \ --prefix PATH : $maxx/sbin
--set LD_PRELOAD "${libredirect}/lib/libredirect.so" \
--set NIX_REDIRECTS /opt/MaXX=$maxx \
--prefix PATH : $maxx/sbin
fi
fi fi
done < <(find "$maxx" -type f -print0) done < <(find "$maxx" -type f -print0)