-
-
Notifications
You must be signed in to change notification settings - Fork 6.2k
Port away from flake-utils
#35675
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?
Port away from flake-utils
#35675
Conversation
i dont see inputs as bad as determined systems here ... because i see no reason for somebody to use this flake as input ... but as less dpes are better and if the flake e.g. learns to build gitea ... it is likely going to be used esternally ... so no blocker on my side ;) |
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 env={}
i was going to do that ... thanks for doint it now
@6543 Thanks for the feedback. I do have a private fork with a build script for gitea (including frontend + pnpm working). I was assuming there wasn't any interest in having one here since you already have a different build process, but if you want I can open a PR and work to upstream it? It does require updating dependency hashes for go & pnpm deps on package updates however. |
@Naxdy maybe not in this repo, but the pnpm build would be very appreciated in nixpkgs when 1.25 comes out |
@Naxdy sorry, I should've said: could you share the nix build you have, as then I could port it to nixpkgs when the 1.25 release comes out for you. Nix is optional to build this repo, and we don't want to make it a hard requirement for contributors, but as youve already done the heavy lifting for pnpm that's wonderful as that's work that we don't need to replication. Thanks again:) |
@techknowlogick I pushed my derivation to my nixpkgs fork here: Naxdy/nixpkgs@ba04041 Feel free to take what you want from it; you can also ping me on the nixpkgs PR once it's up :) PS: You'll probably want to pin nodejs and/or pnpm, as is convention in nixpkgs, i.e. |
@Naxdy 🙏💕 thank you so much!! |
flake-utils
is currently only used for outputting system-specific dev shells. This can actually be achieved only using functionality already present withinnixpkgs
, thus there is no need for an extra dependency.Additionally, we move to use the
packages
andenv
args formkShell
to more clearly outline what they are used for.Further reading: https://determinate.systems/blog/best-practices-for-nix-at-work/#avoid-flake-helper-libraries-if-possible
As a side note, using
with
to import large scopes is discouraged by official Nix resources, so an alternative approach to list installed packages could be something like this:But I saw this as too pedantic to include in the initial PR.