atom: fix library paths

This commit is contained in:
Nikolay Amiantov 2016-04-13 18:30:38 +03:00
parent 9b9fea305f
commit 39eefc0cd0

View File

@ -1,19 +1,19 @@
{ stdenv, fetchurl, buildEnv, makeDesktopItem, makeWrapper, zlib, glib, alsaLib
{ stdenv, fetchurl, lib, makeDesktopItem, makeWrapper, zlib, glib, alsaLib
, dbus, gtk, atk, pango, freetype, fontconfig, libgnome_keyring3, gdk_pixbuf
, gvfs, cairo, cups, expat, libgpgerror, nspr, gconf, nss, xorg, libcap, systemd
}:
let
atomEnv = buildEnv {
name = "env-atom";
paths = [
stdenv.cc.cc zlib glib dbus gtk atk pango freetype libgnome_keyring3
fontconfig gdk_pixbuf cairo cups expat libgpgerror alsaLib nspr gconf nss
xorg.libXrender xorg.libX11 xorg.libXext xorg.libXdamage xorg.libXtst
xorg.libXcomposite xorg.libXi xorg.libXfixes xorg.libXrandr
xorg.libXcursor libcap systemd
];
};
atomPkgs = [
stdenv.cc.cc zlib glib dbus gtk atk pango freetype libgnome_keyring3
fontconfig gdk_pixbuf cairo cups expat libgpgerror alsaLib nspr gconf nss
xorg.libXrender xorg.libX11 xorg.libXext xorg.libXdamage xorg.libXtst
xorg.libXcomposite xorg.libXi xorg.libXfixes xorg.libXrandr
xorg.libXcursor libcap systemd
];
atomLib = lib.makeLibraryPath atomPkgs;
atomLib64 = lib.makeSearchPathOutputs "lib64" ["lib"] atomPkgs;
in stdenv.mkDerivation rec {
name = "atom-${version}";
version = "1.6.2";
@ -24,7 +24,7 @@ in stdenv.mkDerivation rec {
name = "${name}.deb";
};
buildInputs = [ atomEnv gvfs makeWrapper ];
nativeBuildInputs = [ makeWrapper ];
phases = [ "installPhase" "fixupPhase" ];
@ -41,10 +41,10 @@ in stdenv.mkDerivation rec {
patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
$out/share/atom/resources/app/apm/bin/node
wrapProgram $out/bin/atom \
--prefix "LD_LIBRARY_PATH" : "${atomEnv}/lib:${atomEnv}/lib64" \
--prefix "LD_LIBRARY_PATH" : "${atomLib}:${atomLib64}" \
--prefix "PATH" : "${gvfs}/bin"
wrapProgram $out/bin/apm \
--prefix "LD_LIBRARY_PATH" : "${atomEnv}/lib:${atomEnv}/lib64"
--prefix "LD_LIBRARY_PATH" : "${atomLib}:${atomLib64}"
'';
meta = with stdenv.lib; {