[Nix-dev] Replace default gcc through overlays?

Mateusz Czaplinski czapkofan at gmail.com
Wed May 24 00:15:40 CEST 2017


I'm writing a local (non-nixpkgs) derivation, and I'd like to replace the
default "gcc" to be a patched gcc6 - also for all implicit dependencies in
nixpkgs. Is it possible to do that (I assume via overlays and resulting
fixpoint)? If yes, how should I write this to work?

For background: I want to cross-compile the Linux kernel (actually, a fork
- L4Linux) to a new target platform. But setting `crossSystem` seems to
trigger rebuilding of gcc, which crashes on me because of OOM killer on
genattrtab. This I believe could be mitigated by a Nov'2016 patch to gcc (
https://patchwork.ozlabs.org/patch/695293/), so I believe I need to have it
incorporated into default gcc. This I hope would let me overcome the "out
of memory" obstacle, so that I could go back to hacking on my main task...

When fixing this, I would much prefer not to have to fork whole nixpkgs, if
feasible. I suppose maintaining a nixpkgs fork is harder, and also sharing
sounds not so simple then as in the basic case of a single .nix file?

I'd be grateful for any help.
Thanks,
/Mateusz.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.science.uu.nl/pipermail/nix-dev/attachments/20170524/6d951b2a/attachment.html>


More information about the nix-dev mailing list