query
On this page

makeStaticDarwin

pkgs.makeStaticDarwin

Docs pulled from | This Revision | 10 minutes ago


but more portable than Nix store binaries.


Noogle detected

Implementation

The following is the current implementation of this function.

makeStaticDarwin =
    stdenv:
    stdenv.override (old: {
      mkDerivationFromStdenv = withOldMkDerivation old (
        stdenv: mkDerivationSuper: args:
        (mkDerivationSuper args).overrideAttrs (
          prevAttrs:
          if prevAttrs ? env.NIX_CFLAGS_LINK then
            {
              env = prevAttrs.env // {
                NIX_CFLAGS_LINK =
                  toString args.env.NIX_CFLAGS_LINK + lib.optionalString (stdenv.cc.isGNU or false) " -static-libgcc";
              };
            }
          else
            {
              NIX_CFLAGS_LINK =
                toString (prevAttrs.NIX_CFLAGS_LINK or "")
                + lib.optionalString (stdenv.cc.isGNU or false) " -static-libgcc";
            }
        )
      );
    });