Repository navigation
NixSupport: fall back to default postgresql-binary / text-builder - #2874
mpscholten wants to merge 3 commits into
Conversation
The upcoming haskell-updates merge (NixOS/nixpkgs#521260, stackage LTS 24.38 -> Nightly 2026-09-13) makes postgresql-binary 0.15.0.1 and text-builder 1.0.0.5 the defaults of the Haskell package set. Its main.yaml drops the `text-builder < 1` extra-package entry and moves `postgresql-binary < 0.14` to `< 0.15`, so the versioned attributes this overlay forces (`text-builder_1_0_0_5`, `postgresql-binary_0_15_0_1`) no longer exist and evaluation fails with `attribute 'text-builder_1_0_0_5' missing`. Use the versioned attribute only when the snapshot still provides it and fall back to the default otherwise. Both resolve to the versions hasql 2.0.1.0 and postgresql-simple-postgresql-types require, so this is a no-op on the currently pinned nixpkgs while unblocking the next nixpkgs bump. Verified with `nix eval .#packages.aarch64-darwin.default.drvPath` and `.#checks.aarch64-darwin` against both the pinned nixpkgs (387118a) and nixpkgs staging-next (f3a7f2c), which carries the merge. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
`status426` is defined in Network.HTTP.Types.Status, but the umbrella
module Network.HTTP.Types only re-exports everything since http-types
0.12.5 ("Export everything from Network.HTTP.Types"). The pinned
nixpkgs ships 0.12.4, so registering this spec in the test suite
(e3bdd07) left master red:
error: [GHC-88464]
Variable not in scope: status426
`mkStatus` is exported by the umbrella module in 0.12.4 as well, so
build the status value directly and stay independent of the http-types
version. The upcoming stackage bump ships 0.12.6, where either spelling
would work.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
CI on the first push failed in
c111ad2 builds the status with |
master landed the same ServerSpec fix in #2875, so the only conflict was this branch's extra comment on the 'mkStatus' line. Resolved to master's wording — its commit message already explains why 'status426' can't be used — which leaves this branch carrying only the hasql.nix change. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Why
The upcoming nixpkgs haskell-updates merge — NixOS/nixpkgs#521260, "haskellPackages: stackage LTS 24.38 -> Nightly 2026-09-13; ghc: 9.10.3 -> 9.12.5-rc3", merged into
stagingon 2026-11-13 and currently riding NixOS/nixpkgs#588926 towards master — makespostgresql-binary 0.15.0.1andtext-builder 1.0.0.5the defaults of the Haskell package set.As a consequence its
configuration-hackage2nix/main.yamldrops thetext-builder < 1extra-package entry and movespostgresql-binary < 0.14to< 0.15. The versioned attributesNixSupport/hasql.nixforces no longer exist, and evaluating IHP against that snapshot fails:What
Use the versioned attribute only when the snapshot still provides it, falling back to the default otherwise. Both paths resolve to the versions
hasql 2.0.1.0(postgresql-binary >=0.15 && <0.16) andpostgresql-simple-postgresql-types(text-builder >=1.0.0.5 && <1.1) require, so this is a no-op on the currently pinned nixpkgs and unblocks the nextnix flake update.Verification
nix evalof.#packages.aarch64-darwin.default.drvPathand of every attribute in.#checks.aarch64-darwinsucceeds against both:387118a(nixpkgs-unstable, 2026-10-18) — unchanged derivation pathsstaging-nextf3a7f2c, which carries the merge — previously failed on the missing attributeNot covered here: an actual build against the new snapshot. The merge also brings
http-client-tls 0.4.0,resource-pool 0.5.1.0,random 1.3.1,wai-app-static 3.2.1andQuickCheck 2.16.0.0, whose effects only show up at compile time. Those belong to the later nixpkgs bump, which should also consider movingpkgs.ghcoff the explicithaskell.packages.ghc9124pin: after the merge the nixpkgs default becomes GHC 9.12 (ghc9125), and only the default package set is served bycache.nixos.org.🤖 Generated with Claude Code