postgrest
postgrest copied to clipboard
Make default.nix configurable
The default.nix defines various values that consumers may which to override, such as the nixpkgs version. These variables can be declared instead in the arguments to the top level function, with the current values set as defaults.
Part of #3026
@wolfgangwalther I would need to confirm that the change to applyPatches (specifically, the removal of overlays from the import) does reduce the instantations of nixpkgs in the store. It certainly does no harm, though it wouldn't be worth a PR on its own.
It's very annoying that patching nixpkgs requires importing from a source derivation. Hopefully fixes to https://github.com/NixOS/nixpkgs/issues/286285 (and patching nixpkgs in flakes) will be forthcoming.
Hopefully fixes to https://github.com/NixOS/nixpkgs/issues/286285 (and patching nixpkgs in flakes) will be forthcoming.
The fix relevant for us was already merged to master, we're just blocked from updating to it at the moment (see other comment).
I've marked as ready for review — I guess you can drop the second commit, or wait until upstream is fixed.
or wait until upstream is fixed.
I just gave an update in the blocking PR upstream. Will wait a bit to see how that turns out.
I like the approach you took here.
A nice benefit of this is it makes it straightforward to test with different versions of nixpkgs and GHC.
A nice benefit of this is it makes it straightforward to test with different versions of nixpkgs and GHC.
Yes. I imagine a future, where cross-compiling will also work nicely... and a simple github actions matrix job will just build for different platforms and GHC versions, all via nix. :heart:
I replied in the thread but this should be top level: the current dependency on overlays in nixpkgs-patched might be what is busting the cachix cache. This PR removes that dependency.
@dbaynard #3365 is merged, you can rebase.
Congratulations on getting (many) of your upstream PRs merged. This is much cleaner, without the patching.
I've pushed a basic flake to https://github.com/fore-stun/postgrest/tree/flake-2 and you can run a build with the following.
nix build -L 'github:fore-stun/postgrest/flake-2'
Or, using the revision,
nix build -L 'github:fore-stun/postgrest/1a61b4d1c4ee0ec52468052719af38e832c43d74'
I've only tested on MacOS (and it builds).
I already merged the commit here after rebase + slighty formatting change in 28aac08. Somehow couldn't push to this PR, even though the " Maintainers are allowed to edit this pull request. " setting is there. Might be, because this is coming from the fore-stun:main branch - that could make a difference.
I will leave this PR open for a moment, though, because there are still two comments above, that I would like to follow up on for myself. Thus I assigned myself here - nothing else to be done here.