Skip to content
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: reorganize package and its extensions #54319

Merged
merged 5 commits into from
Jan 26, 2019

Commits on Jan 20, 2019

  1. postgresql: reorganize package and it's extensions

    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.
    danbst committed Jan 20, 2019
    Configuration menu
    Copy the full SHA
    869bd97 View commit details
    Browse the repository at this point in the history
  2. postgresql: redo extensible packages via overlays

    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.
    danbst committed Jan 20, 2019
    Configuration menu
    Copy the full SHA
    a88af1c View commit details
    Browse the repository at this point in the history
  3. fix postgresql test

    danbst committed Jan 20, 2019
    Configuration menu
    Copy the full SHA
    8a9e8f4 View commit details
    Browse the repository at this point in the history
  4. rebase to master

    danbst committed Jan 20, 2019
    Configuration menu
    Copy the full SHA
    9e8f256 View commit details
    Browse the repository at this point in the history

Commits on Jan 26, 2019

  1. Configuration menu
    Copy the full SHA
    2c70898 View commit details
    Browse the repository at this point in the history