Skip to content
Snippets Groups Projects
Verified Commit a89a6150 authored by Moritz Angermann's avatar Moritz Angermann
Browse files

[ci/nix-shell] uniquify NIX_LDFLAGS{_FOR_TARGET}

(cherry picked from commit 07b1af03)
parent 5765a91d
No related branches found
No related tags found
No related merge requests found
......@@ -14,7 +14,17 @@
# the real fix is to teach terminfo to use libcurses on macOS.
CONFIGURE_ARGS = "--with-intree-gmp --with-curses-libraries=${pkgs.ncurses.out}/lib";
buildInputs = (with pkgs; [
# magic speedup pony :facepalm:
#
# nix has the ugly habbit of duplicating ld flags more than necessary. This
# somewhat consolidates this.
shellHook = ''
export NIX_LDFLAGS=$(for a in $NIX_LDFLAGS; do echo $a; done |sort|uniq|xargs)
export NIX_LDFLAGS_FOR_TARGET=$(for a in $NIX_LDFLAGS_FOR_TARGET; do echo $a; done |sort|uniq|xargs)
export NIX_LDFLAGS_FOR_TARGET=$(comm -3 <(for l in $NIX_LDFLAGS_FOR_TARGET; do echo $l; done) <(for l in $NIX_LDFLAGS; do echo $l; done))
'';
nativeBuildInputs = (with pkgs; [
haskell.compiler.${compiler}
haskell.packages.${compiler}.cabal-install
haskell.packages.${compiler}.alex
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment