-
-
Notifications
You must be signed in to change notification settings - Fork 40
refactor: reduce imperative shell logic in flake.nix #320
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
refactor: reduce imperative shell logic in flake.nix #320
Conversation
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.
Looks nice, I'll take a closer look when I get back to a computer.
name = "7zz-aliased"; | ||
paths = [pkgs._7zz]; | ||
postBuild = '' | ||
ln -s ${pkgs._7zz}/bin/7zz $out/bin/7z |
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.
Oh heck yeah. I figured there had to be a nix way to do this
bin/7z
Outdated
@@ -1,3 +0,0 @@ | |||
#!/usr/bin/env bash |
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 still use in the release pipeline, so please revert
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.
No problem at all! Reinstated and re-pushed at ff4c817.
Works on my x86 Linux and M1 Mac computers, will merge once you revert the bin/7z deletion |
...as their contents are deterministic directly from Nix. Regarding HOME specifically, Burrito.Steps.Build.PackAndBuild seems to want a writable path to work in, but AFAICT it's for scratch space, so we can reuse the Nix build's temporary directory. Ref: https://github.com/burrito-elixir/burrito/blob/a60c6ab21156fc4c788907d33bfd0c546a022272/lib/steps/build/pack_and_build.ex#L26
* refactor(nix): Use symlinkJoin to provide aliased 7z binary * refactor(nix): Assign Burrito envvars as derivation arguments ...as their contents are deterministic directly from Nix. Regarding HOME specifically, Burrito.Steps.Build.PackAndBuild seems to want a writable path to work in, but AFAICT it's for scratch space, so we can reuse the Nix build's temporary directory. Ref: https://github.com/burrito-elixir/burrito/blob/a60c6ab21156fc4c788907d33bfd0c546a022272/lib/steps/build/pack_and_build.ex#L26
Regarding
HOME
specifically, I would've liked to eliminate that too as it's nearly always a pungent smell in Nix builds, but Burrito.Steps.Build.PackAndBuild seems towant a writable path to work in. AFAICT it's purely for scratch space, so we can just directly reuse the Nix build's temporary directory.