-
Notifications
You must be signed in to change notification settings - Fork 30
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
Remove Nix dependency: flake-utils + fixups #802
base: main
Are you sure you want to change the base?
Conversation
1de16cc
to
c7f47ef
Compare
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.
The two first commits definitely bring some nice improvements to the flake; thank you for catching the typo! As for the third one, removing flake-utils
and replacing it by repeated calls to nixpkgs.lib.genAttrs
, I am much less convinced by the motivation and the gain in usability and readability, but it does seem clean to me.
c7f47ef
to
e9cdbd9
Compare
The motivation is in #613. Tweag isn’t maintaining Topiary its package in upstream Nixpkgs, which is still on 0.3.x. I would like to use the latest version which seems easiest as a flake, but there are more dependencies than needed which pollute my own flake which I now need to audit for security. Currently, Nickel still has |
If With regards to readability: Subjectively I think this reads almost identical. |
✔️ |
4a3a312
to
a188780
Compare
For more motivation: https://ayats.org/blog/no-flake-utils/ |
Yes, this is few lines of code & less loops. |
a188780
to
db2c709
Compare
wasm-bindgen-cli-overlay = final: prev: | ||
outputs = { self, nixpkgs, ... }@inputs: | ||
let | ||
supportedSystems = nixpkgs.lib.systems.flakeExposed; |
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.
This can be a different value, but Rust doesn’t have many platform limitations & flake-utils
has an arbitrary/opinionated list of supported platforms in x86_64 + aarch64 for Linux & Darwin.
db2c709
to
560b767
Compare
Rebased & resolved conflicts |
560b767
to
f5cae43
Compare
Rerebased & reresolved conflicts |
f5cae43
to
b1a0749
Compare
b1a0749
to
01c4fae
Compare
This dependency isn’t useful since it is just a loop, doesn’t capture all supported systems, & isn’t worth propagating it to downstream users (currently it still is required for Nickel, but that is on them). Related #613.
Also caught a typo.
Small refactors:
inputs
as an attrset to more easily track dependencies (allows removing*-input
from one of the inputs)nixpkgs
,topiaryPkgs
,binPkgs
self.packages
where possiblechecksLight
for all systemsNormally removing
flake-utils
the diff results in less line of code, but refactors added a little bit.Note: reviewing without whitespace changes makes this easier to review (nesting level changed)
1
Footnotes
Please consider giving up MS GitHub or offering a non-proprietary, non-US-corporate-controlled mirror for this free software project. I wish to delete this Microsoft account in the future, but I need more projects like this to support alternative methods to send patches & contribute. ↩