nixpkgs/pkgs
Benno Fünfstück a4d6e2cf16 atom: avoid using LD_PRELOAD. Fixes glibc compat issues
The wrapper for Atom was loading libraries via LD_PRELOAD, for example
libxkbfile. Now, if you installed atom via nix-env and happened to use a newer
nixpkgs for that than what your system environment is build against, you could
end up with an error like this:

```
uname: relocation error:
/nix/store/68sa3m89shpfaqq1b9xp5p1360vqhwx6-glibc-2.25/lib/libdl.so.2:
symbol _dl_catch_error, version GLIBC_PRIVATE not defined in file libc.so.6
with link time reference
```

This happens because atom calls the `uname` executable from the system to
determine the platform. Because that inherits the `LD_PRELOAD` environment
variable, so the libxkbfile library that the `atom` wrapper was build against
is loaded into `uname`. But since `atom` comes from `nix-env`, the `libxkbfile`
it was built with might be compiled against a newer version of `glibc` than
`uname`, which comes from the system, was! Having two versions of glibc loaded
into the same processes results in chaos.

To fix this, we avoid setting `LD_PRELOAD` and instead use patchelf to set the
correct RPATH. RPATH is not inherited by child processes, so the above issue
can no longer occur.

The only small complication here is that the library that actually loads
libxkbfile is not the atom binary itself, but a node extension that atom uses.
So instead of setting the RPATH on `atom` only, we also set the `rpath` on all
node extensions (`*.node`) the output.
2017-03-18 01:51:36 +01:00
..
applications atom: avoid using LD_PRELOAD. Fixes glibc compat issues 2017-03-18 01:51:36 +01:00
build-support Merge pull request #22571 from LnL7/darwin-frameworks-hook 2017-03-15 11:33:23 -04:00
common-updater
data hasklig: 0.9 -> 1.1 2017-03-05 15:32:30 +01:00
desktops Merge pull request #23954 from jbaum98/pdfpc-darwin 2017-03-17 07:59:41 +01:00
development shapelib: init at 1.4.0 2017-03-17 12:09:37 -05:00
games sgt-puzzles: 20161228.7cae89f -> 20170228.1f613ba 2017-03-09 18:47:37 +01:00
misc vlock: improve eintr patch 2017-03-11 10:00:06 +01:00
os-specific linux: 4.4.53 -> 4.4.54 2017-03-17 17:25:40 -04:00
servers Merge pull request #23963 from dtzWill/feature/irkerd 2017-03-18 00:35:32 +01:00
shells Merge pull request #23875 from NeQuissimus/oh-my-zsh_2017-02-27 2017-03-13 20:07:59 -04:00
stdenv Revert "stdenv: aarch64 is also ARM" 2017-03-11 15:57:51 +02:00
test
tools marathonctl: init at 2017-03-06 2017-03-17 23:10:27 +01:00
top-level Merge pull request #23963 from dtzWill/feature/irkerd 2017-03-18 00:35:32 +01:00