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: refactor and cleanup #292993

Merged
merged 15 commits into from
Mar 17, 2024
Merged

Commits on Mar 15, 2024

  1. postgresql: refactor to move locale-binary-path.patch into patches/

    Seems to have been put in the wrong place.
    wolfgangwalther committed Mar 15, 2024
    Configuration menu
    Copy the full SHA
    0146344 View commit details
    Browse the repository at this point in the history
  2. postgresql: refactor to move packages.nix to ext/default.nix (1/2)

    This commit is split up into two commits to allow git to detect renames,
    make rebasing easier and allow a working entry in .git-blame-ignore-revs.
    
    To allow bisecting we allow evaluation on every commit by moving the extensions
    into ext/ext/ first and back to ext/ with the next commit.
    wolfgangwalther committed Mar 15, 2024
    Configuration menu
    Copy the full SHA
    9ef7195 View commit details
    Browse the repository at this point in the history
  3. postgresql: refactor to move packages.nix to ext/default.nix (2/2)

    This aligns more with the commonly used style in nixpkgs.
    wolfgangwalther committed Mar 15, 2024
    Configuration menu
    Copy the full SHA
    719034f View commit details
    Browse the repository at this point in the history
  4. postgresql: refactor to remove useless references to "self"

    No need to reference self here, because llvmPackages / stdenv' are available
    in that scope anyway. Pure refactor, derivations don't change.
    wolfgangwalther committed Mar 15, 2024
    Configuration menu
    Copy the full SHA
    4c8e7af View commit details
    Browse the repository at this point in the history
  5. postgresql: refactor to split up default.nix (1/2)

    This just renames default.nix to generic.nix, because the biggest chunk
    of code should move that way in the next commit. This gives us a much
    better diff for the next commit and makes rebasing **much** easier in
    case of changes. This commit does not stand on its own and needs to go
    in with the next commit (2/2).
    wolfgangwalther committed Mar 15, 2024
    Configuration menu
    Copy the full SHA
    9af8c0a View commit details
    Browse the repository at this point in the history
  6. postgresql: refactor to split up default.nix (2/2)

    The recommended [1] structure for a package regarding versioning is to have each
    version in a separate file. This commit just mechanically copies code around
    without any changes.
    
    Pure refactor, not changing any derivations.
    
    [1]: pkgs/README.md
    wolfgangwalther committed Mar 15, 2024
    Configuration menu
    Copy the full SHA
    1d9f2bd View commit details
    Browse the repository at this point in the history
  7. postgresql: refactor mkPackages in default.nix

    Refactors some low hanging fruit in default.nix to make it easier to add new
    versions later on.
    
    Pure refactor, not changing any derivations.
    
    This change makes it easier to add new versions in default.nix without messing
    up - and also prevents us from adding version-specific arguments in default.nix
    by accident in the future. Those should be put in the versioned .nix files
    instead.
    wolfgangwalther committed Mar 15, 2024
    Configuration menu
    Copy the full SHA
    62635c9 View commit details
    Browse the repository at this point in the history
  8. postgresql: refactor to remove passthru's readline attribute

    This seems to have been introduced 20 years ago in 5863d4f - but
    seems to have been a copy&paste mistake from the beginning.
    AFAICT, it's not used anywhere.
    wolfgangwalther committed Mar 15, 2024
    Configuration menu
    Copy the full SHA
    a92a323 View commit details
    Browse the repository at this point in the history
  9. postgresql: refactor to remove psqlSchema argument

    The passthru attribute is still set, but automatically created from
    the major version number. Fewer moving parts decrease the chance
    for mistakes.
    wolfgangwalther committed Mar 15, 2024
    Configuration menu
    Copy the full SHA
    82e6c4a View commit details
    Browse the repository at this point in the history
  10. postgresql: refactor to move musl patches into versioned .nix files

    This makes it obvious that the required argument muslPatches must be passed when
    creating a new version file.
    
    Pure refactor, not changing any derivations.
    wolfgangwalther committed Mar 15, 2024
    Configuration menu
    Copy the full SHA
    b301c01 View commit details
    Browse the repository at this point in the history
  11. postgresql: refactor to pass jitSupport/llvm via scope instead of pas…

    …sthru
    
    This makes it less error-prone to use the llvm package in extensions, because
    it will always match the package used by the postgresql derivation itself.
    
    Previously, you could've accidentally used llvm instead of postgresql.llvm
    with a different result.
    wolfgangwalther committed Mar 15, 2024
    Configuration menu
    Copy the full SHA
    14b3ea2 View commit details
    Browse the repository at this point in the history
  12. postgresql: refactor to remove "this" argument

    This was proposed by abbradar in NixOS#150801, but left out of the follow up PR
    NixOS#221851 by Ma27 to reduce the size of the diff. Compared to the initial
    proposal this includes the callPackage call in the recursion, which avoids
    breaking the withJIT/withoutJIT helpers.
    
    In terms of nixpkgs, this is a pure refactor, no derivations change. However,
    this makes downstream expressions like the following possible:
    
      (postgresql.override { jitSupport = true; }).pkgs.postgis
    
    This would have not worked before without passing another "this" argument,
    which is error prone as can be seen in this example:
    
      https://github.com/PostgREST/postgrest/pull/3222/files
    wolfgangwalther committed Mar 15, 2024
    Configuration menu
    Copy the full SHA
    4b6bce5 View commit details
    Browse the repository at this point in the history
  13. postgresql: refactor to remove doInstallCheck = false

    This is the default anyway.
    wolfgangwalther committed Mar 15, 2024
    Configuration menu
    Copy the full SHA
    d7ae1c5 View commit details
    Browse the repository at this point in the history
  14. postgresql: rename enableSystemd to systemdSupport for consistency

    We have gssSupport, jitSupport and pythonSupport - but enableSystemd?
    
    Across nixpkgs there are currently three styles commonly used, about equally
    often: withX, xSupport and enableX.
    
    Let's at least use one consistent style in this package.
    wolfgangwalther committed Mar 15, 2024
    Configuration menu
    Copy the full SHA
    e6bfabf View commit details
    Browse the repository at this point in the history

Commits on Mar 16, 2024

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