-
Notifications
You must be signed in to change notification settings - Fork 242
nix flake and better run.sh #32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
@@ -0,0 +1,54 @@ | |||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not familiar with Nix and is there a way to simplify the change? I'd keep the reference implementation simple, for example if we can do this in an one-liner (like we do apt install
), it would be great for newbies.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It can be make shorter because I added some boilerplate to make nix shell
functional too, although it can't be turned into an one-liner.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for sharing. Let me get started with Nix first later and try this 😄
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For what it's worth, if you want a flake.nix that also builds the kernel:
- I separated building and running into build.bash and run.bash respectively, but otherwise the only Nix-specific part of the script is that it expects the variables
$src
and$out
to be set, andrun.bash
takes an argument specifying which kernel to run. - I made a derivation for building the kernel ->
nix build
builds the kernel - I made an application that runs the kernel in QEMU ->
nix run
builds the kernel and runs it inside QEMU.
No description provided.