From d77191f776ca1809609c98cf968b8e4ef2f8e0d3 Mon Sep 17 00:00:00 2001 From: Audrey Dutcher Date: Sat, 16 Nov 2024 11:09:15 -0700 Subject: [PATCH] libiberty: fix references to /usr/bin/uname for FreeBSD build system --- pkgs/by-name/li/libiberty/package.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pkgs/by-name/li/libiberty/package.nix b/pkgs/by-name/li/libiberty/package.nix index 2040ef3bee08..fc7584e484df 100644 --- a/pkgs/by-name/li/libiberty/package.nix +++ b/pkgs/by-name/li/libiberty/package.nix @@ -14,6 +14,12 @@ stdenv.mkDerivation { postUnpack = "sourceRoot=\${sourceRoot}/libiberty"; + # needed until config scripts are updated to not use /usr/bin/uname on FreeBSD native + # updateAutotoolsGnuConfigScriptsHook doesn't seem to work here + postPatch = '' + substituteInPlace ../config.guess --replace-fail /usr/bin/uname uname + ''; + configureFlags = [ "--enable-install-libiberty" ] ++ lib.optional (!staticBuild) "--enable-shared";