summary refs log tree commit diff
path: root/pkgs/build-support/libredirect/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/build-support/libredirect/default.nix')
-rw-r--r--pkgs/build-support/libredirect/default.nix6
1 files changed, 4 insertions, 2 deletions
diff --git a/pkgs/build-support/libredirect/default.nix b/pkgs/build-support/libredirect/default.nix
index 9ed00c8a8f6..8f7df3386d1 100644
--- a/pkgs/build-support/libredirect/default.nix
+++ b/pkgs/build-support/libredirect/default.nix
@@ -57,7 +57,9 @@ else stdenv.mkDerivation rec {
     ''}
 
     if [ -n "$doInstallCheck" ]; then
-      $CC -Wall -std=c99 -O3 test.c -o test
+      $CC -Wall -std=c99 \
+        ${lib.optionalString (!stdenv.isDarwin) "-D_GNU_SOURCE"} \
+        -O3 test.c -o test
     fi
 
     runHook postBuild
@@ -97,7 +99,7 @@ else stdenv.mkDerivation rec {
   installCheckPhase = ''
     (
       source "$hook/nix-support/setup-hook"
-      NIX_REDIRECTS="/foo/bar/test=${coreutils}/bin/true" ./test
+      NIX_REDIRECTS="/foo/bar/test=${coreutils}/bin/true:/bar/baz=$(mktemp -d)" ./test
     )
   '';