From 0c573de7dd3ae34f54700d9467dd7e8a2262d28b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Romildo=20Malaquias?= Date: Tue, 27 Mar 2018 13:54:44 -0300 Subject: [PATCH] efl: patch binary to handle manual dependency on libcurl.so --- pkgs/desktops/enlightenment/econnman.nix | 5 ++--- pkgs/desktops/enlightenment/efl.nix | 6 ++++++ pkgs/desktops/enlightenment/ephoto.nix | 8 ++------ pkgs/desktops/enlightenment/rage.nix | 9 ++------- pkgs/desktops/enlightenment/terminology.nix | 9 +-------- 5 files changed, 13 insertions(+), 24 deletions(-) diff --git a/pkgs/desktops/enlightenment/econnman.nix b/pkgs/desktops/enlightenment/econnman.nix index 7739e2bd09ec..60e63dc68ed9 100644 --- a/pkgs/desktops/enlightenment/econnman.nix +++ b/pkgs/desktops/enlightenment/econnman.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, pkgconfig, efl, python2Packages, dbus, curl, makeWrapper }: +{ stdenv, fetchurl, pkgconfig, efl, python2Packages, dbus, makeWrapper }: stdenv.mkDerivation rec { name = "econnman-${version}"; @@ -11,13 +11,12 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ makeWrapper pkgconfig python2Packages.wrapPython ]; - buildInputs = [ efl python2Packages.python dbus curl ]; + buildInputs = [ efl python2Packages.python dbus ]; pythonPath = [ python2Packages.pythonefl python2Packages.dbus-python ]; postInstall = '' wrapPythonPrograms - wrapProgram $out/bin/econnman-bin --prefix LD_LIBRARY_PATH : ${curl.out}/lib ''; meta = { diff --git a/pkgs/desktops/enlightenment/efl.nix b/pkgs/desktops/enlightenment/efl.nix index 190ee6c3574e..1787737a156f 100644 --- a/pkgs/desktops/enlightenment/efl.nix +++ b/pkgs/desktops/enlightenment/efl.nix @@ -70,6 +70,12 @@ stdenv.mkDerivation rec { 'Cflags: -I''${includedir}/eina-1/eina'"$modules" ''; + # EFL applications depend on libcurl, although it is linked at + # runtime by hand in code (it is dlopened). + postFixup = '' + patchelf --add-needed ${curl.out}/lib/libcurl.so $out/lib/libecore_con.so + ''; + enableParallelBuilding = true; meta = { diff --git a/pkgs/desktops/enlightenment/ephoto.nix b/pkgs/desktops/enlightenment/ephoto.nix index eef9eafae38b..6a49852909e6 100644 --- a/pkgs/desktops/enlightenment/ephoto.nix +++ b/pkgs/desktops/enlightenment/ephoto.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, pkgconfig, efl, pcre, curl, makeWrapper }: +{ stdenv, fetchurl, pkgconfig, efl, pcre, makeWrapper }: stdenv.mkDerivation rec { name = "ephoto-${version}"; @@ -11,11 +11,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ (pkgconfig.override { vanilla = true; }) makeWrapper ]; - buildInputs = [ efl pcre curl ]; - - postInstall = '' - wrapProgram $out/bin/ephoto --prefix LD_LIBRARY_PATH : ${curl.out}/lib - ''; + buildInputs = [ efl pcre ]; meta = { description = "Image viewer and editor written using the Enlightenment Foundation Libraries"; diff --git a/pkgs/desktops/enlightenment/rage.nix b/pkgs/desktops/enlightenment/rage.nix index 9b3bdc90eb53..5de225220733 100644 --- a/pkgs/desktops/enlightenment/rage.nix +++ b/pkgs/desktops/enlightenment/rage.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, meson, ninja, pkgconfig, efl, gst_all_1, pcre, curl, wrapGAppsHook }: +{ stdenv, fetchurl, meson, ninja, pkgconfig, efl, gst_all_1, pcre, wrapGAppsHook }: stdenv.mkDerivation rec { name = "rage-${version}"; @@ -24,12 +24,7 @@ stdenv.mkDerivation rec { gst_all_1.gst-plugins-bad gst_all_1.gst-libav pcre - curl - ]; - - postInstall = '' - wrapProgram $out/bin/rage --prefix LD_LIBRARY_PATH : ${curl.out}/lib - ''; + ]; meta = { description = "Video + Audio player along the lines of mplayer"; diff --git a/pkgs/desktops/enlightenment/terminology.nix b/pkgs/desktops/enlightenment/terminology.nix index 935546efa869..3a52707fcf4c 100644 --- a/pkgs/desktops/enlightenment/terminology.nix +++ b/pkgs/desktops/enlightenment/terminology.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, pkgconfig, efl, pcre, curl, makeWrapper }: +{ stdenv, fetchurl, pkgconfig, efl, pcre, makeWrapper }: stdenv.mkDerivation rec { name = "terminology-${version}"; @@ -17,15 +17,8 @@ stdenv.mkDerivation rec { buildInputs = [ efl pcre - curl ]; - postInstall = '' - for f in $out/bin/*; do - wrapProgram $f --prefix LD_LIBRARY_PATH : ${curl.out}/lib - done - ''; - meta = { description = "The best terminal emulator written with the EFL"; homepage = http://enlightenment.org/;