From 96e83da688bfbac30db4fb99a0d0350661b8d514 Mon Sep 17 00:00:00 2001 From: FliegendeWurst Date: Fri, 3 Jan 2025 11:24:34 +0100 Subject: [PATCH] libf2c: mark cross as broken --- pkgs/by-name/li/libf2c/package.nix | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/pkgs/by-name/li/libf2c/package.nix b/pkgs/by-name/li/libf2c/package.nix index 8ca63143545d..5c45409c2cd0 100644 --- a/pkgs/by-name/li/libf2c/package.nix +++ b/pkgs/by-name/li/libf2c/package.nix @@ -20,9 +20,15 @@ stdenv.mkDerivation rec { unzip ${src} ''; + postPatch = '' + substituteInPlace makefile.u \ + --replace-fail "ld" "${stdenv.cc.targetPrefix}ld" + ''; + makeFlags = [ "-f" "makefile.u" + "CC=${stdenv.cc.targetPrefix}cc" ]; installPhase = '' @@ -44,5 +50,9 @@ stdenv.mkDerivation rec { homepage = "http://www.netlib.org/f2c/"; license = lib.licenses.mit; platforms = lib.platforms.unix; + # Generates arith.h at build time. Uses non-standard fpu_control.h. + broken = + (!stdenv.buildPlatform.canExecute stdenv.hostPlatform) + || (stdenv.hostPlatform.isLinux && stdenv.hostPlatform.libc != "glibc"); }; }