mikaku / Fiwix

A UNIX-like kernel for the i386 architecture
https://www.fiwix.org
Other
428 stars 33 forks source link

Add Nix shell for setting up a cross compiler #93

Closed xTrayambak closed 3 months ago

xTrayambak commented 3 months ago

This PR simply adds a Nix shell which makes compiling Fiwix in a Nix environment trivial.

mikaku commented 3 months ago

Excuse my ignorance, I don't know much about Nix. Do we really need this file in the official tree? I mean, why don't create it on the fly before starting the compilation?

xTrayambak commented 3 months ago

This simply exists to aid NixOS users in compiling the kernel. This is how it'd work in Nix

# cd fiwix
# nix-shell
[user@host fiwix]$ make CCEXE=i686-elf-gcc
^D
# 

It basically removes the pain point of setting up a cross compilation toolchain.

xTrayambak commented 3 months ago

Adding this to a Makefile seems counterintuitive because it's nice to let others see the shell source. It's fine if you don't wish to include it in the source tree, though.

mikaku commented 3 months ago

OK, thanks.