summary refs log tree commit diff
path: root/profiles/gentoo.nix
blob: 67f7e78616c431f6c777da759c3630b2e99d4d4f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
{ pkgs, lib, config, inputs, ... }:

{
  imports = [];
  config = {
    nativeStdenv = prev.stdenvAdapters.withCFlags [ "-O3" "-pipe" "-mcpu=apple-m1" ]
    (prev.overrideCC prev.llvmPackages_latest.stdenv
      (prev.wrapCCWith rec {
        cc = prev.llvmPackages_latest.clang-unwrapped;
        bintools = (final.wrapBintoolsWith {
          coreutils = final.uutils-coreutils;
          libc = final.musl;
          bintools = final.binutils-unwrapped.overrideAttrs
            (old: {
              postInstall = ''
                ln -sf ${final.mold}/bin/mold $out/bin/ld
              '';
            });
        });
      }));
  };
}