Nix Packages collection
Go to file
sternenseemann 120f24202b haskellPackages.mkDerivation: limit GHC_PACKAGE_PATH to test suite
Previously, we would set GHC_PACKAGE_PATH after configure, the reasons
being that

1. Setup.hs configure forbids this from being set since it can make a
   build fail that would otherwise succeed (since it influences how
   GHC behaves when invoked by Cabal).
2. Setting GHC_PACKAGE_PATH being set is sound in our case, since
   we set it precisely to the packages available to Cabal at configure
   time, so there should be no room for a mismatch.
3. Some test suites require GHC_PACKAGE_PATH or GHC_ENVIRONMENT to be
   set, so they can invoke GHC(i) with build dependencies available.
   Cabal >= 3.12 forbids GHC_PACKAGE_PATH from being set after
   <https://github.com/haskell/cabal/commit/d6e38041a7c778fadf8f416>.
   Setting GHC_ENVIRONMENT would be possible, but is cumbersome without
   cabal-install (which has the handy cabal exec command which takes
   care of that). Additionally, it is not clear if it'll remain possible
   to do that: <https://github.com/haskell/cabal/issues/7792>.

Our solution to Cabal 3.12's change is to be more targeted about setting
GHC_PACKAGE_PATH: We _just_ set it for the actual test suite executable.
This can be achieved by using --test-wrapper which when given is invoked
by Cabal to run the test suite. Here we can set any environment
variables after Cabal has already done its environment checks. As long
as we don't do anything stupid, this should be unproblematic.

Users can also arbitrarily influence what GHC_PACKAGE_PATH will contain
using the NIX_GHC_PACKAGE_PATH_FOR_TEST environment variable. This is
un(der)documented for now, since I want to keep some wiggle room for
changing stuff in the coming weeks. Also it's rarely necessary to
actually touch this variable.
2024-05-26 16:01:21 +02:00
.github Merge pull request #313345 from katexochen/workflows/remove-check-by-name-concurrency 2024-05-23 16:28:45 +02:00
doc Merge pull request #313514 from tie/dotnet-cross-split 2024-05-23 14:05:46 -03:00
lib Merge pull request #309517 from bobrippling/fix/ebusd-args 2024-05-24 23:25:28 +02:00
maintainers Merge #305154: knot-resolver: add luaPackages.psl 2024-05-25 08:43:15 +02:00
nixos nixos/invidious-router: maintianers.s1ls -> maintainers.sils 2024-05-25 13:10:20 +02:00
pkgs haskellPackages.mkDerivation: limit GHC_PACKAGE_PATH to test suite 2024-05-26 16:01:21 +02:00
.editorconfig Merge pull request #288812 from hercules-ci/lib-flake-version 2024-03-03 18:19:00 +01:00
.git-blame-ignore-revs .git-blame-ignore-revs: add PHP packages reformating 2024-05-23 11:42:36 +02:00
.gitattributes
.gitignore Merge pull request #263348 from chayleaf/redundant-result 2024-03-11 11:44:37 +01:00
.mailmap
.version .version: Make lib/.version source of truth 2024-02-26 22:34:10 +01:00
CONTRIBUTING.md CONTRIBUTING.md: Add nixpkgs-merge-bot usage paragraph 2024-05-22 19:08:20 +02:00
COPYING COPYING: 2023 -> 2024 2024-01-30 16:49:51 +01:00
default.nix
flake.nix nixos/flake: put nixpkgs in NIX_PATH and system registry for flake configs 2024-02-03 20:44:38 -08:00
README.md README: sync package count with https://search.nixos.org/packages 2024-04-16 07:31:12 +02: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.