Skip to content

Commit

Permalink
set NIX_LIBGCC_S_PATH in default.nix too
Browse files Browse the repository at this point in the history
I did this earlier in flake.nix but forgot about default.nix

Signed-off-by: Anton-4 <[email protected]>
  • Loading branch information
Anton-4 authored Sep 2, 2023
1 parent d917c7d commit cec6d74
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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 ''
Expand Down Expand Up @@ -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 ''
Expand Down

0 comments on commit cec6d74

Please sign in to comment.