nbd: re-introduced linking with -lrt, and added an additional -lpthread on top of it

Linking these libraries makes sure that they can be found at run-time,
because a proper rpath into the Nix store is added to the generated
executable. Without that rpath, nbd-server will try to load the system's
libpthread.so.0, which may not be what we want.

svn path=/nixpkgs/trunk/; revision=33408
This commit is contained in:
Peter Simons 2012-03-25 18:10:30 +00:00
parent fa183b675b
commit 41081c4eb0

View file

@ -21,6 +21,11 @@ stdenv.mkDerivation {
# The test suite doesn't succeed on Hydra.
doCheck = false;
# Glib calls `clock_gettime', which is in librt. Linking that library
# here ensures that a proper rpath is added to the executable so that
# it can be loaded at run-time.
NIX_LDFLAGS = "-lrt -lpthread";
meta = {
homepage = "http://nbd.sourceforge.net";
description = "map arbitrary files as block devices over the network";