Merge pull request #40703 from gnidorah/autopatchelf
franz, maxx: switch to autoPatchelfHook
This commit is contained in:
commit
cfc016c7cd
@ -1,4 +1,4 @@
|
|||||||
{ stdenv, fetchurl, makeDesktopItem, makeWrapper
|
{ stdenv, fetchurl, makeDesktopItem, makeWrapper, autoPatchelfHook
|
||||||
, xorg, gtk2, atk, glib, pango, gdk_pixbuf, cairo, freetype, fontconfig
|
, xorg, gtk2, atk, glib, pango, gdk_pixbuf, cairo, freetype, fontconfig
|
||||||
, gnome2, dbus, nss, nspr, alsaLib, cups, expat, udev, libnotify, xdg_utils }:
|
, gnome2, dbus, nss, nspr, alsaLib, cups, expat, udev, libnotify, xdg_utils }:
|
||||||
|
|
||||||
@ -8,17 +8,6 @@ let
|
|||||||
|
|
||||||
version = "4.0.4";
|
version = "4.0.4";
|
||||||
|
|
||||||
runtimeDeps = [
|
|
||||||
udev libnotify
|
|
||||||
];
|
|
||||||
deps = (with xorg; [
|
|
||||||
libXi libXcursor libXdamage libXrandr libXcomposite libXext libXfixes
|
|
||||||
libXrender libX11 libXtst libXScrnSaver
|
|
||||||
]) ++ [
|
|
||||||
gtk2 atk glib pango gdk_pixbuf cairo freetype fontconfig dbus
|
|
||||||
gnome2.GConf nss nspr alsaLib cups expat stdenv.cc.cc
|
|
||||||
] ++ runtimeDeps;
|
|
||||||
|
|
||||||
desktopItem = makeDesktopItem rec {
|
desktopItem = makeDesktopItem rec {
|
||||||
name = "Franz";
|
name = "Franz";
|
||||||
exec = name;
|
exec = name;
|
||||||
@ -39,16 +28,21 @@ in stdenv.mkDerivation rec {
|
|||||||
# don't remove runtime deps
|
# don't remove runtime deps
|
||||||
dontPatchELF = true;
|
dontPatchELF = true;
|
||||||
|
|
||||||
buildInputs = [ makeWrapper ];
|
nativeBuildInputs = [ autoPatchelfHook makeWrapper ];
|
||||||
|
buildInputs = (with xorg; [
|
||||||
|
libXi libXcursor libXdamage libXrandr libXcomposite libXext libXfixes
|
||||||
|
libXrender libX11 libXtst libXScrnSaver
|
||||||
|
]) ++ [
|
||||||
|
gtk2 atk glib pango gdk_pixbuf cairo freetype fontconfig dbus
|
||||||
|
gnome2.GConf nss nspr alsaLib cups expat stdenv.cc.cc
|
||||||
|
];
|
||||||
|
runtimeDependencies = [ udev.lib libnotify ];
|
||||||
|
|
||||||
unpackPhase = ''
|
unpackPhase = ''
|
||||||
tar xzf $src
|
tar xzf $src
|
||||||
'';
|
'';
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" Franz
|
|
||||||
patchelf --set-rpath "$out/opt/franz:${stdenv.lib.makeLibraryPath deps}" Franz
|
|
||||||
|
|
||||||
mkdir -p $out/bin $out/opt/franz
|
mkdir -p $out/bin $out/opt/franz
|
||||||
cp -r * $out/opt/franz
|
cp -r * $out/opt/franz
|
||||||
ln -s $out/opt/franz/Franz $out/bin
|
ln -s $out/opt/franz/Franz $out/bin
|
||||||
|
@ -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)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user