Nix Packages collection & NixOS
Find a file
Maximilian Bosch eb96c8dc5b
postgresql: refactor postgresqlVersions attribute & tests
Every postgresql testcase essentially does the following things:

* Filter `postgresqlVersions` for server packages
* Filter postgresql server packages for suitable ones (i.e. extensions
  must support the given version)
* Generate an attribute-set of testcases

The first item became necessary in
7ab1e88833 given that
`postgresql/default.nix` now exposes JIT and non-JIT servers AND a
`libpq` that is not suitable for the tests here.

This changes restructures this a little bit, i.e.:

* Having an attribute-set that contains a bunch of postgresql servers
  and a single client package seems odd (and the sole consumer of
  `postgresqlVersions` in nixpkgs, the test suite, has to take that into
  account). Hence, postgresql's default.nix now provides `libpq` (the client)
  and a `postgresqlVersions` attribute with all supported JIT and non-JIT
  variants of postgresql.

* Each test-case gets a third argument, a function called `genTests`:
  this function sets `recurseForDerivations = true;` and generates an
  attribute-set of tests for each postgresql version given a function
  that returns a testcase or multiple test-cases (`makeTestFor`). The
  argument to `makeTestFor` is a postgresql server package.

  This function also accepts a filter predicate that is passed against
  `filterAttrs` to remove postgresql server packages that are not
  suitable for the test (e.g. because the version isn't supported by the
  extension to test).

I checked by making sure that the `.drv` doesn't change on staging with
this change on top for postgresq, postgresql-jit,
postgresql-wal-receiver, postgresql-tls-client-cert, anonymizer, pgjwt,
pgvecto-rs, timescaledb, tsja and wal2json.
2025-01-26 21:58:57 +01:00
.devcontainer .devcontainer: tweaks 2025-01-13 16:35:04 +01:00
.github ci: Format nixfmt command prominently (#373939) 2025-01-19 10:28:41 +01:00
ci Merge staging-next into staging 2025-01-23 12:06:51 +00:00
doc no-broken-symlinks: restrict checks to symlinks pointing inside the store (#376261) 2025-01-24 18:29:21 -08:00
lib lib.extendMkDerivation: init (#234651) 2025-01-22 05:10:25 -08:00
maintainers maintainers: add mel 2025-01-24 05:02:45 +01:00
nixos postgresql: refactor postgresqlVersions attribute & tests 2025-01-26 21:58:57 +01:00
pkgs postgresql: refactor postgresqlVersions attribute & tests 2025-01-26 21:58:57 +01:00
.editorconfig .editorconfig: Format .bash files like .sh 2024-11-10 14:52:08 +13:00
.git-blame-ignore-revs Introduce script to automatically resolve conflicts after treewide changes (such as reformats) (#363759) 2025-01-21 20:47:57 +01:00
.gitattributes
.gitignore gitignore: ignore log files generated by update scripts too 2024-12-29 22:57:27 -03:00
.mailmap mailmap: add jopejoe1 2025-01-02 16:54:52 +01:00
.mergify.yml chore(mergify): remove not relevant Tag check (#365804) 2024-12-17 09:13:23 +01:00
.version
CONTRIBUTING.md Release 24.11 2024-11-29 06:28:22 -08:00
COPYING COPYING: 2024 -> 2025 2025-01-01 05:27:15 +01:00
default.nix treewide: format all inactive Nix files 2024-12-10 20:23:58 +01:00
flake.nix flake.nix: relax checks after shellcheck filter 2025-01-09 07:21:46 -08:00
README.md README: Update to 24.11 2024-11-28 12:12:30 -08:00
shell.nix shell.nix: Support nix-shell -A 2024-11-02 23:51:41 +01:00

NixOS logo

Contributors badge Open Collective supporters

Nixpkgs is a collection of over 100,000 software packages that can be installed with the Nix package manager. It also implements NixOS, a purely-functional Linux distribution.

Manuals

  • NixOS Manual - how to install, configure, and maintain a purely-functional Linux distribution
  • Nixpkgs Manual - contributing to Nixpkgs and using programming-language-specific Nix expressions
  • Nix Package Manager Manual - how to write Nix expressions (programs), and how to use Nix command line tools

Community

Other Project Repositories

The sources of all official Nix-related projects are in the NixOS organization on GitHub. Here are some of the main ones:

  • Nix - the purely functional package manager
  • NixOps - the tool to remotely deploy NixOS machines
  • nixos-hardware - NixOS profiles to optimize settings for different hardware
  • Nix RFCs - the formal process for making substantial changes to the community
  • NixOS homepage - the NixOS.org website
  • hydra - our continuous integration system
  • NixOS Artwork - NixOS artwork

Continuous Integration and Distribution

Nixpkgs and NixOS are built and tested by our continuous integration system, Hydra.

Artifacts successfully built with Hydra are published to cache at https://cache.nixos.org/. When successful build and test criteria are met, the Nixpkgs expressions are distributed via Nix channels.

Contributing

Nixpkgs is among the most active projects on GitHub. While thousands of open issues and pull requests might seem a lot at first, it helps consider it in the context of the scope of the project. Nixpkgs describes how to build tens of thousands of pieces of software and implements a Linux distribution. The GitHub Insights page gives a sense of the project activity.

Community contributions are always welcome through GitHub Issues and Pull Requests.

For more information about contributing to the project, please visit the contributing page.

Donations

The infrastructure for NixOS and related projects is maintained by a nonprofit organization, the NixOS Foundation. To ensure the continuity and expansion of the NixOS infrastructure, we are looking for donations to our organization.

You can donate to the NixOS foundation through SEPA bank transfers or by using Open Collective:

License

Nixpkgs is licensed under the MIT License.

Note: MIT license does not apply to the packages built by Nixpkgs, merely to the files in this repository (the Nix expressions, build scripts, NixOS modules, etc.). It also might not apply to patches included in Nixpkgs, which may be derivative works of the packages to which they apply. The aforementioned artifacts are all covered by the licenses of the respective packages.