Home / Input Output / haskell.nix
Jun 07, 1-2 PM (0)
Jun 07, 2-3 PM (0)
Jun 07, 3-4 PM (0)
Jun 07, 4-5 PM (0)
Jun 07, 5-6 PM (0)
Jun 07, 6-7 PM (0)
Jun 07, 7-8 PM (0)
Jun 07, 8-9 PM (0)
Jun 07, 9-10 PM (0)
Jun 07, 10-11 PM (0)
Jun 07, 11-12 AM (0)
Jun 08, 12-1 AM (1)
Jun 08, 1-2 AM (0)
Jun 08, 2-3 AM (0)
Jun 08, 3-4 AM (0)
Jun 08, 4-5 AM (0)
Jun 08, 5-6 AM (0)
Jun 08, 6-7 AM (0)
Jun 08, 7-8 AM (0)
Jun 08, 8-9 AM (0)
Jun 08, 9-10 AM (0)
Jun 08, 10-11 AM (0)
Jun 08, 11-12 PM (0)
Jun 08, 12-1 PM (0)
Jun 08, 1-2 PM (0)
Jun 08, 2-3 PM (0)
Jun 08, 3-4 PM (0)
Jun 08, 4-5 PM (0)
Jun 08, 5-6 PM (0)
Jun 08, 6-7 PM (0)
Jun 08, 7-8 PM (0)
Jun 08, 8-9 PM (0)
Jun 08, 9-10 PM (0)
Jun 08, 10-11 PM (0)
Jun 08, 11-12 AM (0)
Jun 09, 12-1 AM (1)
Jun 09, 1-2 AM (0)
Jun 09, 2-3 AM (0)
Jun 09, 3-4 AM (0)
Jun 09, 4-5 AM (0)
Jun 09, 5-6 AM (0)
Jun 09, 6-7 AM (0)
Jun 09, 7-8 AM (0)
Jun 09, 8-9 AM (0)
Jun 09, 9-10 AM (0)
Jun 09, 10-11 AM (0)
Jun 09, 11-12 PM (0)
Jun 09, 12-1 PM (0)
Jun 09, 1-2 PM (0)
Jun 09, 2-3 PM (0)
Jun 09, 3-4 PM (0)
Jun 09, 4-5 PM (0)
Jun 09, 5-6 PM (0)
Jun 09, 6-7 PM (0)
Jun 09, 7-8 PM (0)
Jun 09, 8-9 PM (0)
Jun 09, 9-10 PM (0)
Jun 09, 10-11 PM (0)
Jun 09, 11-12 AM (1)
Jun 10, 12-1 AM (1)
Jun 10, 1-2 AM (0)
Jun 10, 2-3 AM (0)
Jun 10, 3-4 AM (0)
Jun 10, 4-5 AM (1)
Jun 10, 5-6 AM (0)
Jun 10, 6-7 AM (0)
Jun 10, 7-8 AM (1)
Jun 10, 8-9 AM (0)
Jun 10, 9-10 AM (0)
Jun 10, 10-11 AM (0)
Jun 10, 11-12 PM (0)
Jun 10, 12-1 PM (0)
Jun 10, 1-2 PM (0)
Jun 10, 2-3 PM (0)
Jun 10, 3-4 PM (0)
Jun 10, 4-5 PM (0)
Jun 10, 5-6 PM (0)
Jun 10, 6-7 PM (0)
Jun 10, 7-8 PM (0)
Jun 10, 8-9 PM (0)
Jun 10, 9-10 PM (0)
Jun 10, 10-11 PM (0)
Jun 10, 11-12 AM (0)
Jun 11, 12-1 AM (1)
Jun 11, 1-2 AM (0)
Jun 11, 2-3 AM (0)
Jun 11, 3-4 AM (0)
Jun 11, 4-5 AM (0)
Jun 11, 5-6 AM (1)
Jun 11, 6-7 AM (0)
Jun 11, 7-8 AM (0)
Jun 11, 8-9 AM (0)
Jun 11, 9-10 AM (0)
Jun 11, 10-11 AM (0)
Jun 11, 11-12 PM (0)
Jun 11, 12-1 PM (0)
Jun 11, 1-2 PM (0)
Jun 11, 2-3 PM (0)
Jun 11, 3-4 PM (0)
Jun 11, 4-5 PM (0)
Jun 11, 5-6 PM (0)
Jun 11, 6-7 PM (0)
Jun 11, 7-8 PM (0)
Jun 11, 8-9 PM (0)
Jun 11, 9-10 PM (0)
Jun 11, 10-11 PM (0)
Jun 11, 11-12 AM (0)
Jun 12, 12-1 AM (1)
Jun 12, 1-2 AM (0)
Jun 12, 2-3 AM (0)
Jun 12, 3-4 AM (0)
Jun 12, 4-5 AM (0)
Jun 12, 5-6 AM (0)
Jun 12, 6-7 AM (0)
Jun 12, 7-8 AM (0)
Jun 12, 8-9 AM (0)
Jun 12, 9-10 AM (0)
Jun 12, 10-11 AM (0)
Jun 12, 11-12 PM (0)
Jun 12, 12-1 PM (0)
Jun 12, 1-2 PM (0)
Jun 12, 2-3 PM (0)
Jun 12, 3-4 PM (1)
Jun 12, 4-5 PM (0)
Jun 12, 5-6 PM (0)
Jun 12, 6-7 PM (0)
Jun 12, 7-8 PM (0)
Jun 12, 8-9 PM (0)
Jun 12, 9-10 PM (0)
Jun 12, 10-11 PM (0)
Jun 12, 11-12 AM (0)
Jun 13, 12-1 AM (1)
Jun 13, 1-2 AM (0)
Jun 13, 2-3 AM (0)
Jun 13, 3-4 AM (0)
Jun 13, 4-5 AM (0)
Jun 13, 5-6 AM (0)
Jun 13, 6-7 AM (0)
Jun 13, 7-8 AM (0)
Jun 13, 8-9 AM (0)
Jun 13, 9-10 AM (0)
Jun 13, 10-11 AM (0)
Jun 13, 11-12 PM (0)
Jun 13, 12-1 PM (0)
Jun 13, 1-2 PM (0)
Jun 13, 2-3 PM (0)
Jun 13, 3-4 PM (0)
Jun 13, 4-5 PM (0)
Jun 13, 5-6 PM (0)
Jun 13, 6-7 PM (0)
Jun 13, 7-8 PM (0)
Jun 13, 8-9 PM (0)
Jun 13, 9-10 PM (0)
Jun 13, 10-11 PM (0)
Jun 13, 11-12 AM (0)
Jun 14, 12-1 AM (1)
Jun 14, 1-2 AM (0)
Jun 14, 2-3 AM (0)
Jun 14, 3-4 AM (0)
Jun 14, 4-5 AM (0)
Jun 14, 5-6 AM (0)
Jun 14, 6-7 AM (0)
Jun 14, 7-8 AM (0)
Jun 14, 8-9 AM (0)
Jun 14, 9-10 AM (0)
Jun 14, 10-11 AM (0)
Jun 14, 11-12 PM (0)
Jun 14, 12-1 PM (0)
Jun 14, 1-2 PM (0)
12 commits this week Jun 07, 2026 - Jun 14, 2026
ghc: keep -std=... out of the settings "C compiler command" field
When GHC's configure is regenerated here via autoreconfHook using a host
autoconf >= 2.72, AC_PROG_CC probes for and appends the newest C standard
flag the compiler accepts (e.g. -std=gnu23 with clang 21) to $CC. GHC then
bakes $CC verbatim into the "C compiler command" / "C++ compiler command" /
"Haskell CPP command" settings fields. On aarch64-darwin with nixpkgs
nixos-26.05 (autoconf 2.73, clang 21) GHC therefore tries to exec a binary
literally named "cc -std=gnu23" and fails at configurePhase of the first
package it compiles:

  ghc-9.8.4: could not execute: /nix/store/...-clang-wrapper-21.1.8/bin/cc -std=gnu23

nixpkgs' own GHC is unaffected because it ships GHC's pre-generated configure
(no autoreconf), so the std flag never lands in the command field.

Move the std flag out of each command field into its matching flags field in
postInstall, mirroring the existing Windows dllwrap/windres settings fixup.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Add .small GHC derivation variant and fix Hadrian profiling bug
Introduces a .small passthru variant on GHC derivations that opts out of
profiling libraries and Haddock documentation, significantly reducing closure
size for CI, Docker, and cross-compilation toolchain use cases.

Also fixes a pre-existing bug where `enableLibraryProfiling = false` had no
effect on Hadrian builds (GHC 9.4+): the `+no_profiled_libs` flavour
transformer was only applied for GHCJS/Wasm targets, silently ignoring the
parameter for all other platforms.

Changes:
- Add `enableHaddockDocs` parameter (default true, fully backwards-compatible)
- Fix legacy make build: HADDOCK_DOCS=NO now also honours enableHaddockDocs
- Fix Hadrian: +no_profiled_libs applied whenever enableLibraryProfiling=false
- Hadrian: --docs=nothing when enableHaddockDocs=false, no-sphinx otherwise
- Make sphinx and hscolour nativeBuildInputs conditional on enableHaddockDocs
- Add .small passthru variant (enableLibraryProfiling=false, enableHaddockDocs=false)

Usage: pkgs.haskell-nix.compiler.ghc967.small
pkg-config: add pc-version to fix builderVersion=2 UnitId fork for pkgconfig-depends packages (#2520)
* pkg-config: add pc-version to fix v2 UnitId fork for pkgconfig-depends packages

allPkgConfigWrapper (used by plan-to-nix) reports pkg-config --modversion
from the nixpkgs derivation .version, but a builderVersion = 2 slice runs
the real pkg-config, which reads the .pc Version: field.  When these differ
the slice's UnitId forks from plan-nix's (the resolved pkgconfig-dep version
is folded into pkgHashPkgConfigDeps), failing the slice's expected-package
check.  systemd is the motivating case: libsystemd.pc reports the major
version (258/259) but .version has a patch component (258.5/259.3), which
broke libsystemd-journal.

- getVersion prefers an optional pc-version attribute over .version
- override systemd to set pc-version = lib.versions.major version
- add the pkgconf-pc-version test asserting pc-version == pkg-config
  --modversion (discovers pc-version modules via evalPackages to avoid
  forcing the whole map against exotic target pkgs; disabled where no
  pc-version package is buildable, e.g. musl/static/wasm/windows)

* pkgconf-pc-version: gate on glibc, not just linux

The test was enabled on android-prebuilt targets (isLinux && !isMusl &&
!isStatic), where it tried to build systemd for a bionic libc target and
failed with a dependency error.  systemd only builds on glibc, so gate the
systemd module set on hostPlatform.libc == "glibc" (excludes android/bionic,
musl, Windows, wasm) plus !isStatic.
pkgconf-pc-version: gate on glibc, not just linux
The test was enabled on android-prebuilt targets (isLinux && !isMusl &&
!isStatic), where it tried to build systemd for a bionic libc target and
failed with a dependency error.  systemd only builds on glibc, so gate the
systemd module set on hostPlatform.libc == "glibc" (excludes android/bionic,
musl, Windows, wasm) plus !isStatic.
pkg-config: add pc-version to fix v2 UnitId fork for pkgconfig-depends packages
allPkgConfigWrapper (used by plan-to-nix) reports pkg-config --modversion
from the nixpkgs derivation .version, but a builderVersion = 2 slice runs
the real pkg-config, which reads the .pc Version: field.  When these differ
the slice's UnitId forks from plan-nix's (the resolved pkgconfig-dep version
is folded into pkgHashPkgConfigDeps), failing the slice's expected-package
check.  systemd is the motivating case: libsystemd.pc reports the major
version (258/259) but .version has a patch component (258.5/259.3), which
broke libsystemd-journal.

- getVersion prefers an optional pc-version attribute over .version
- override systemd to set pc-version = lib.versions.major version
- add the pkgconf-pc-version test asserting pc-version == pkg-config
  --modversion (discovers pc-version modules via evalPackages to avoid
  forcing the whole map against exotic target pkgs; disabled where no
  pc-version package is buildable, e.g. musl/static/wasm/windows)