BSD-3-Clause licensed by Peter Simons
Maintained by sternenseemann
This version can be pinned in stack with:distribution-nixpkgs-1.7.1@sha256:c0b98818372e7a1b69a4fd727133df6bd91a7472c43932d08e80eddbf8047f6f,2570

Module documentation for 1.7.1

Used by 1 package in nightly-2024-07-13(full list with versions):


hackage release stackage LTS package

Maintainer’s Notes

Keeping platform test cases up to date

As nixpkgs expands its list of supported platforms, new system tuples are added. Therefore we need to adjust the test suite regularly in order to cover newly added platforms. For this purpose, the test suite checks the platforms it verifies against a list of system tuples generated from nixpkgs. This list needs to be updated manually, so running the test suite doesn’t depend on Nix being available.

To check if any new platforms need to be covered, do the following:

  1. Run ./test/data/ /path/to/nixpkgs/checkout. If no local nixpkgs is given, <nixpkgs> will be used.

  2. Run the test suite: cabal v2-test.

  3. If the test suite fails, add test cases for all missing system tuples.

  4. In all cases, change the dates of last update in test/hspec.hs and src/Distribution/Nixpkgs/Meta.hs to the current day.


Revision history for distribution-nixpkgs


  • GHC and nixpkgs now use the system double javascript-ghcjs instead of js-ghcjs to match Cabal’s default rendering. With this release, distribution-nixpkgs does the same. Note that this means that this release needs to be used with nixpkgs unstable after 97d55ec or nixpkgs stable 23.05 or newer.

  • Adapt test suite to changed representation of some Platforms in Cabal 3.8.
  • Update test data to include new nixpkgs architectures rx, microblaze and microblazeel.
  • The distribution-nixpkgs repository has been merged into the cabal2nix repository. All URLs in the cabal file have been updated and the distribution-nixpkgs repository will be archived.


  • Distribution.Nixpkgs.Meta
    • pPrint (x :: Meta) now renders every maintainer as a full attribute path instead of using with.
    • API breaking change: Changed types for all platform related fields / lenses of Meta, i.e. platforms and hydraPlatforms.
      • They are now wrapped in a Maybe. If Nothing, the respective attribute is not rendered.
      • Instead of Platform we now use NixpkgsPlatform which may also be a NixpkgsPlatformGroup, like lib.platforms.linux, in addition to the wrapped Platform in NixpkgsPlatformSingle.
    • API breaking change: Add new fields / lenses to Meta:
      • badPlatforms: Allows setting a list of unsupported platforms, works similarly to the platform / hydraPlatform lenses.
      • mainProgram: Allows setting the (base-)name of the main binary of a derivation. Not rendered if Nothing.
    • API breaking change: Remove allKnownPlatforms, its previous use can be replaced using badPlatforms.
    • Added nixpkgsPlatformFromString which parses a specific format used by hackage2nix’s config files into either NixpkgsPlatformSingle or NixpkgsPlatformGroup.
  • Language.Nix.PrettyPrinting: Added new helpers, listattrDoc and toAscListSortedOn.


  • Expect MonadFailDesugaring (or equivalent behavior) to be the default, requiring GHC >= 8.6.1. Adds support for GHC 9.2.1 (rc1).


  • Distribution.Nixpkgs.Meta: support aarch64-darwin
    • Render Platform AArch64 OSX to "aarch64-darwin"
    • Add Platform AArch64 OSX to allKnownPlatforms


  • Distribution.Nixpkgs.PackageMap
    • readNixpkgPackageMap: instead of a list of arguments to pass to nix-env, take path to nixpkgs and an optional nix expression to pass to it as arguments.
    • readNixpkgPackageMap: populate PackageMap with all attribute paths that point to derivations instead of just one per derivation. This fixes resolve not finding certain identifiers if there were two attributes pointing to the same derivation in nixpkgs. See also #9.