From 1d2e7637b60d113d410fce7f8901d7010b8e1a91 Mon Sep 17 00:00:00 2001 From: Ben Siraphob Date: Fri, 2 Apr 2021 18:03:31 +0000 Subject: [PATCH] strace: assert isLinux to avoid eval error on darwin (#114974) libunwind.supportsHost is not available on darwin because it uses a different libunwind package (https://github.com/NixOS/nixpkgs/blob/master/pkgs/os-specific/darwin/apple-source-releases/default.nix#L270) and changing the stdenv is a big overkill. --- pkgs/development/tools/misc/strace/default.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkgs/development/tools/misc/strace/default.nix b/pkgs/development/tools/misc/strace/default.nix index d1496bcdf455..f36b1cf4495b 100644 --- a/pkgs/development/tools/misc/strace/default.nix +++ b/pkgs/development/tools/misc/strace/default.nix @@ -1,5 +1,9 @@ { lib, stdenv, fetchurl, perl, libunwind, buildPackages }: +# libunwind does not have the supportsHost attribute on darwin, thus +# when this package is evaluated it causes an evaluation error +assert stdenv.isLinux; + stdenv.mkDerivation rec { pname = "strace"; version = "5.11";