summary refs log tree commit diff
diff options
context:
space:
mode:
-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";