Skip to content

Instantly share code, notes, and snippets.

@avnik
Last active August 29, 2015 14:14
Show Gist options
  • Save avnik/d6cf56dd64bba4e2699f to your computer and use it in GitHub Desktop.
Save avnik/d6cf56dd64bba4e2699f to your computer and use it in GitHub Desktop.
with import <nixpkgs> {};
let
glibc = pkgs.glibc;
wrapGCCWith = gccWrapper: glibc: baseGCC: gccWrapper {
nativeTools = stdenv.cc.nativeTools or false;
nativeLibc = stdenv.cc.nativeLibc or false;
nativePrefix = stdenv.cc.nativePrefix or "";
gcc = baseGCC;
libc = glibc;
inherit stdenv binutils coreutils zlib;
};
wrapGCC = wrapGCCWith (makeOverridable (import <nixpkgs/pkgs/build-support/gcc-wrapper>)) glibc;
in
wrapGCC (pkgs.gcc49.gcc.override {
name = "gccgo";
langCC = true; #required for go.
langC = true;
langGo = true;
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment