about summary refs log tree commit diff
path: root/pkgs/development/tools/jq/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/tools/jq/default.nix')
-rw-r--r--pkgs/development/tools/jq/default.nix6
1 files changed, 3 insertions, 3 deletions
diff --git a/pkgs/development/tools/jq/default.nix b/pkgs/development/tools/jq/default.nix
index 8d4ec0d1c5a6..1443ca78371a 100644
--- a/pkgs/development/tools/jq/default.nix
+++ b/pkgs/development/tools/jq/default.nix
@@ -21,7 +21,7 @@ stdenv.mkDerivation rec {
   outputs = [ "bin" "doc" "man" "dev" "lib" "out" ];
 
   # https://github.com/jqlang/jq/issues/2871
-  postPatch = lib.optionalString stdenv.isFreeBSD ''
+  postPatch = lib.optionalString stdenv.hostPlatform.isFreeBSD ''
     substituteInPlace Makefile.am --replace-fail "tests/mantest" "" --replace-fail "tests/optionaltest" ""
   '';
 
@@ -47,7 +47,7 @@ stdenv.mkDerivation rec {
   # Otherwise, configure will detect that they’re in libm, but the build will fail
   # with clang 16+ due to calls to undeclared functions.
   # This is fixed upstream and can be removed once jq is updated (to 1.7 or an unstable release).
-  env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isDarwin (toString [
+  env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.hostPlatform.isDarwin (toString [
     "-D_REENTRANT=1"
     "-D_DARWIN_C_SOURCE=1"
   ]);
@@ -59,7 +59,7 @@ stdenv.mkDerivation rec {
     "--mandir=\${man}/share/man"
   ] ++ lib.optional (!onigurumaSupport) "--with-oniguruma=no"
   # jq is linked to libjq:
-  ++ lib.optional (!stdenv.isDarwin) "LDFLAGS=-Wl,-rpath,\\\${libdir}";
+  ++ lib.optional (!stdenv.hostPlatform.isDarwin) "LDFLAGS=-Wl,-rpath,\\\${libdir}";
 
   # Break the dependency cycle: $dev refers to $bin via propagated-build-outputs, and
   # $bin refers to $dev because of https://github.com/jqlang/jq/commit/583e4a27188a2db097dd043dd203b9c106bba100