Nix packaging#256
Conversation
|
@holmboe I'm open to walking through the complete changeset 1on1 once/if you have a moment to spare :) |
| build-system = [ hatchling ]; | ||
| dependencies = [ | ||
| installShellFiles | ||
| # deps |
There was a problem hiding this comment.
Is it possible, and advisable, to get this list fromTOML somehow?
There was a problem hiding this comment.
It's possible with https://pyproject-nix.github.io/uv2nix I've been packing up https://github.com/dynamist/weav with uv2nix so you'll be able to see the different approaches (It's more complex but it also uses uv.lock to fetch deps which is more correct).
When packaging with the nixpkgs Python builders it's not recommended however.
There was a problem hiding this comment.
Is this direnv? See T2157 for context and evaluate if this is desirable.
There was a problem hiding this comment.
It is direnv, using direnv is absolutely optional (you don't have to install it and you don't have to approve a projects .envrc if you don't want to). It's not possible to get a Nix environment without executing Nix.
Without direnv you can run either "nix-shell" or "nix develop" but IMO they're slightly worse since they force you into a bash subprocess (which is technically good since you get access to Nix bash builder functions) but it's not nice if you're an alternative shell user. (You can hack your way around that by exec'ing $SHELL in shellHook).
I think it's worthwhile to revisit T2157 if we're pivoting towards exploring the world of Nix (direnv is authored by numtide which is a Nix consultancy). Static .env files doesn't work when you bring in Nix.
- Removed nix/pkgsSettings.nix (contained unnecessary allowUnfree = true)
- flake.nix now uses inputs.self.legacyPackages.${system} as pkgs for default.nix
- default.nix default pkgs no longer references pkgsSettings.nix
- Ran nix flake update (nixpkgs -> 2026-07-14, flake-compatish -> 2026-07-13)
Packaging phabfive with Nix.
Exposes a flake as well as "traditional Nix" with support for user-supplied nixpkgs instance, nixpkgs from NIX_PATH or the nixpkgs version locked in the flake.