summary refs log tree commit diff
path: root/pkgs/tools
diff options
context:
space:
mode:
authorPeter Simons <simons@cryp.to>2012-03-25 19:40:04 +0000
committerPeter Simons <simons@cryp.to>2012-03-25 19:40:04 +0000
commit31507bc2740f193b7ca7018c5a13f68257388664 (patch)
treed89a2eda41af047777e099fdf2f6d7f7335b8377 /pkgs/tools
parentd44e55866aecb5af7d64b0d96afb71bfb5562683 (diff)
nbd: don't try to link -lrt and -lpthread on non-Linux platforms
svn path=/nixpkgs/trunk/; revision=33412
Diffstat (limited to 'pkgs/tools')
-rw-r--r--pkgs/tools/networking/nbd/default.nix2
1 files changed, 1 insertions, 1 deletions
diff --git a/pkgs/tools/networking/nbd/default.nix b/pkgs/tools/networking/nbd/default.nix
index a478fe9454c6b..987b5d261cd16 100644
--- a/pkgs/tools/networking/nbd/default.nix
+++ b/pkgs/tools/networking/nbd/default.nix
@@ -24,7 +24,7 @@ stdenv.mkDerivation {
   # 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";
+  NIX_LDFLAGS = stdenv.lib.optionalString stdenv.isLinux "-lrt -lpthread";
 
   meta = {
     homepage = "http://nbd.sourceforge.net";