From cec6d7424efa7b419d4e23165813bed87b5f0233 Mon Sep 17 00:00:00 2001 From: Anton-4 <17049058+Anton-4@users.noreply.github.com> Date: Sat, 2 Sep 2023 14:39:55 +0200 Subject: [PATCH] set NIX_LIBGCC_S_PATH in default.nix too I did this earlier in flake.nix but forgot about default.nix Signed-off-by: Anton-4 <17049058+Anton-4@users.noreply.github.com> --- default.nix | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/default.nix b/default.nix index fe592002444..4e0ba26fb54 100644 --- a/default.nix +++ b/default.nix @@ -14,7 +14,10 @@ let llvmPkgs = pkgs.llvmPackages_13; # nix does not store libs in /usr/lib or /lib - nixGlibcPath = if pkgs.stdenv.isLinux then "${pkgs.glibc.out}/lib" else ""; + glibcPath = + if pkgs.stdenv.isLinux then "${pkgs.glibc.out}/lib" else ""; + libGccSPath = + if pkgs.stdenv.isLinux then "${pkgs.stdenv.cc.cc.lib}/lib" else ""; in assert pkgs.lib.assertMsg rustVersionsMatch '' @@ -104,7 +107,7 @@ in # wrapProgram pkgs.stdenv.cc: to make ld available for compiler/build/src/link.rs postInstall = if pkgs.stdenv.isLinux then '' - wrapProgram $out/bin/roc --set NIX_GLIBC_PATH ${nixGlibcPath} --prefix PATH : ${ + wrapProgram $out/bin/roc --set NIX_GLIBC_PATH ${glibcPath} --set NIX_LIBGCC_S_PATH ${libGccSPath} --prefix PATH : ${ pkgs.lib.makeBinPath [ pkgs.stdenv.cc ] } '' else ''