From 9903bed3f4094d566cae47a79ceb278038c0f300 Mon Sep 17 00:00:00 2001 From: Artemis Tosini Date: Sat, 2 Nov 2024 00:57:09 +0000 Subject: [PATCH] flake.nix: Fix cross build The lix package currently fails unless it's using a clang stdenv. However, the flake's cross build outputs (e.g. `packages.x86_64-linux.nix-armv7l-linux`) used the default stdenv, normally gcc. Replace this with clang to fix package build. Also take this opportunity to remove the no longer necessary `useLLVM = true` override on FreeBSD. Since 24.05, nixpkgs always sets `useLLVM = true` on FreeBSD in `lib.systems.elaborate`. Change-Id: I939302e4f6385291fa9e582d38d908c42f6db89a --- flake.nix | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/flake.nix b/flake.nix index 9fe752dc8..7eef62e63 100644 --- a/flake.nix +++ b/flake.nix @@ -138,14 +138,7 @@ localSystem = { inherit system; }; - crossSystem = - if crossSystem == null then - null - else - { - system = crossSystem; - } - // lib.optionalAttrs (crossSystem == "x86_64-freebsd") { useLLVM = true; }; + crossSystem = if crossSystem == null then null else { system = crossSystem; }; overlays = [ (overlayFor (p: p.${stdenv})) ]; }; stdenvs = forAllStdenvs (make-pkgs null); @@ -154,7 +147,7 @@ { inherit stdenvs native; static = native.pkgsStatic; - cross = forAllCrossSystems (crossSystem: make-pkgs crossSystem "stdenv"); + cross = forAllCrossSystems (crossSystem: make-pkgs crossSystem "clangStdenv"); } );