-
-
Notifications
You must be signed in to change notification settings - Fork 14.7k
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
postgresql: cleanup postgis #54396
Merged
Merged
postgresql: cleanup postgis #54396
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Extracts some useful parts of NixOS#38698, in particular, it's vision that postgresql plugins should be namespaced. Original approach had several problems: - not gonna happen in forseeable future - did lots of deprecations - was all-in-one solution, which is hard to sell to nixpkgs - even that we have postgresqlPackages now, we can't do arbitrary overrides to postgresql and plugins. Several required functions were not exported Here I've fixed all of those problems: - deprecates nothing (though plugins were moved now into `aliases.nix`) - this doesn't touch NixOS at all, and doesn't break anything - hashes for plugins and PGs are not changed (I hope) - no extra fixes to pg itself - default PG is not changed - plugins and PGs are extensible Last one is the most interesting thing, because it introduces novel way to manage `XXX withPackages` problem. It is novel, but has got lots of inspiration from existing approaches: - python, so we have now `postgresql.pkgs.*`, `postgresql_11.pkgs.*` which all contain plugins compiled with correct PG. - python, so we have now `postgresql.withPackages` as well - in contrast to python, there are no `postgresql11Packages`, only `postgresql_11.pkgs` - NixOS#44196, so plugins are referenced starting at self-fixpoint. This allows override/add plugins with mere `//` in overlay. This works for both `postgresqlPackages` (overrides are applied to all postgresql_xx.pkgs) and `postgresql_xx.pkgs` (overrides are specific to this postgresql) sets - I've made it compatible with proposed mergeable overlays (NixOS#54266) however this PR doesn't depend on it - last, but not least, `postgresql/default.nix` is now an overlay! This replaces previous `callPackages` approach with a modern, extensible concept.
Previous approach turned out to be awful. It was impossible to perform deep override. This time I didn't invent bycicles and used overlays for subpackages. Big change is that now overriding `postgresqlPackages` doesn't override all other package sets. But `postgresqlPackages` are now also available as an overlay! So you can get that, reorganize whatever you want and then attach to some postgresql.
Another part of NixOS#38698, though I did cleanup even more. Moving docs to separate output should save another 30MB. I did pin poppler to 0.61 just to be sure GDAL doesn't break again next time poppler changes internal APIs.
GrahamcOfBorg
added
the
6.topic: nixos
Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS
label
Jan 21, 2019
I tested it and it works just as master does (but using postgresql 11). The incantation is a bit ugly (mostly based on stolen code):
|
@ingenieroariel much thanks for your test! BTW, with this PR you can simplify expression down to:
|
GrahamcOfBorg
added
8.has: clean-up
8.has: package (new)
This PR adds a new package
10.rebuild-darwin: 1-10
10.rebuild-linux: 11-100
labels
Jan 21, 2019
This pull request has been mentioned on Nix community. There might be relevant details there: |
GrahamcOfBorg
added
10.rebuild-darwin: 0
This PR does not cause any packages to rebuild on Darwin
10.rebuild-linux: 1-10
and removed
10.rebuild-darwin: 1-10
10.rebuild-linux: 11-100
labels
Jan 26, 2019
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
6.topic: nixos
Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS
8.has: clean-up
8.has: package (new)
This PR adds a new package
10.rebuild-darwin: 0
This PR does not cause any packages to rebuild on Darwin
10.rebuild-linux: 1-10
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation for this change
This is rebased and depends on #54319
cc @ingenieroariel @thoughtpolice
Things done
sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)nix path-info -S
before and after)