-
-
Notifications
You must be signed in to change notification settings - Fork 2
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
add nix flake #25
Merged
Merged
add nix flake #25
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
|
lgtm |
getchoo
force-pushed
the
add-flake
branch
5 times, most recently
from
March 29, 2023 03:07
c9db516
to
3e049dd
Compare
might do a bit of clean up, but this is pretty much ready now |
also cleanup/document things more to start a pr draft
now it's a bit nicer
alright good to go. i can add more stuff later on like generating rootfs' through the flake -- but with this being merged, CI won't be 2 hours ago long and it'll be easier for me to test stuff |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
so this does a few swag things
devshell
this lets you use nix while not breaking your workflow, and also giving people an easier way to start contributing. you can install nix-direnv, cd into the repository, and make and nim (or whatever else we use in the future) will be there ready for you to use
packaging everything in nix
this isn't really about people using nix to install kpkg and other tools, but moreso using it as a development tool. by having our builds controlled by nix, we can get a lot of flexibility and easy, cool features to mess with
ez cross compliation
speaking of cool features we can mess with, cross compiling all tools in this repository is now really easy! currently, only x64 -> aarch64 is supported -- but with a lot of the infrastructure nix already has, this can easily be scaled up to other architectures like ppc64le, i386, risc-v, maybe even mips and android. all it takes is one command:
nix build .#<architecture>.<package>
static builds
yes...these are a work in progress and a part of the reason this is a draft. static builds can be compiled for all architectures and when cross compiling, but they don't work due to an issue with libcrypt.so. if it's possible to fix, this would be a great way to provide users with the opportunity to easily test in-development builds of the tools, or even just as a recovery option in case their installation gets messed up
compatibility with legacy nix tools
tools like
nix-build
andnix-shell
will still work with this flake, for those who aren't interested in flakes and aren't enabled. everything is automated and "just works" so we don't really have to worry about upkeep, it just makes things easier for othersworkflow changes
build.yml is the first workflow to start using nix, where building, distributing, and testing can all take place with only the nix command (reproducibly ofc). this doesn't really make any changes, to the way it works, it only gives us the ability to work in the same environment as the ci (so no more "why is it working on my machine but not in ci???" issues )
it'd be cool imo to expand this nix integration to other workflows and maybe even the builder container image...but i want feedback before i go further down the deep end
oh and almost forgot: if you merge, this badge can go in the readme so it's instantly cool