Skip to content

Fail to built unix package from stackage on GHC 9.10 and 9.12 snapshots #2423

@chaserhkj

Description

@chaserhkj

Describe the bug

I am working on nix integration with BNFC through haskell.nix, but build on GHC 9.10 and 9.12 branch seems to fail with dependency unix failing to build.

  • Build system: x86_64-linux
  • GHC version: 9.10.2/9.12.2
  • Haskell.nix version (or commit) used: Master branch as of now (f7b3cfe)

Steps To Reproduce

GHC 9.10, targeting stack snapshot lts-24.1

hkj@hkj-comphost:~$ nix-build -E '(with import <nixpkgs> (import <haskell.nix> {}).nixpkgsArgs; haskell-nix.snapshots."lts-24.1").unix.components.library'
this derivation will be built:
  /nix/store/s62kiqvx26jpmqbvvjm54w0liadpvymq-unix-lib-unix-2.8.6.0.drv
building '/nix/store/s62kiqvx26jpmqbvvjm54w0liadpvymq-unix-lib-unix-2.8.6.0.drv'...
Running phase: unpackPhase
unpacking source archive /nix/store/62g3lmhwy1bp1vi8x5dl0iczfxzr7382-unix-2.8.6.0.tar.gz
source root is unix-2.8.6.0
setting SOURCE_DATE_EPOCH to timestamp 1000000000 of file "unix-2.8.6.0/unix.cabal"
Running phase: patchPhase
'/tmp/nix-build-unix-lib-unix-2.8.6.0.drv-0/.attr-0h9ydb7s8pfhl5kfs3rmmwnmpi49yyiw7jgr5dpw9rmvv8sy0f2b' -> 'unix.cabal'
Running phase: updateAutotoolsGnuConfigScriptsPhase
Updating Autotools / GNU config script to a newer upstream version: ./config.sub
Updating Autotools / GNU config script to a newer upstream version: ./config.guess
Running phase: configurePhase
Configure flags:
--prefix=/nix/store/yxnkc99gpkk49365a25296nqnw6pqiqq-unix-lib-unix-2.8.6.0 lib:unix --package-db=clear --package-db=/tmp/nix-build-unix-lib-unix-2.8.6.0.drv-0/tmp.tHwg0J9zr9/lib/ghc-9.10.2/lib/package.conf.d --flags=-os-string --with-ghc=ghc --with-ghc-pkg=ghc-pkg --with-hsc2hs=hsc2hs --with-gcc=cc --with-ar=ar --with-strip=strip --with-ld=ld --disable-executable-stripping --disable-library-stripping --disable-library-profiling --disable-profiling --enable-static --enable-shared --disable-executable-dynamic --disable-coverage --enable-library-for-ghci --datadir=/nix/store/f5sfz657c0lf7207bmapcy4209ds7xkr-unix-lib-unix-2.8.6.0-data/share/ghc-9.10.2 --enable-split-sections
Configuring library for unix-2.8.6.0...
Error: [Cabal-8010]
Encountered missing or private dependencies:
    filepath >=1.4.100.0 && <1.5.0.0

error: builder for '/nix/store/s62kiqvx26jpmqbvvjm54w0liadpvymq-unix-lib-unix-2.8.6.0.drv' failed with exit code 1

GHC 9.12, targeting stack snapshot nightly-2025-07-23

hkj@hkj-comphost:~$ nix-build -E '(with import <nixpkgs> (import <haskell.nix> {}).nixpkgsArgs; haskell-nix.snapshots."nightly-2025-07-23").unix.components.library'
this derivation will be built:
  /nix/store/jlgklrh1pk2wpw12dji1fkr9c3rr0jyq-unix-lib-unix-2.8.6.0.drv
building '/nix/store/jlgklrh1pk2wpw12dji1fkr9c3rr0jyq-unix-lib-unix-2.8.6.0.drv'...
Running phase: unpackPhase
unpacking source archive /nix/store/62g3lmhwy1bp1vi8x5dl0iczfxzr7382-unix-2.8.6.0.tar.gz
source root is unix-2.8.6.0
setting SOURCE_DATE_EPOCH to timestamp 1000000000 of file "unix-2.8.6.0/unix.cabal"
Running phase: patchPhase
'/tmp/nix-build-unix-lib-unix-2.8.6.0.drv-0/.attr-0h9ydb7s8pfhl5kfs3rmmwnmpi49yyiw7jgr5dpw9rmvv8sy0f2b' -> 'unix.cabal'
Running phase: updateAutotoolsGnuConfigScriptsPhase
Updating Autotools / GNU config script to a newer upstream version: ./config.sub
Updating Autotools / GNU config script to a newer upstream version: ./config.guess
Running phase: configurePhase
Configure flags:
--prefix=/nix/store/7xwwxn7dscw5jk90kc5p6afy8jypwmbk-unix-lib-unix-2.8.6.0 lib:unix --package-db=clear --package-db=/tmp/nix-build-unix-lib-unix-2.8.6.0.drv-0/tmp.YcuM8JmPSR/lib/ghc-9.12.2/lib/package.conf.d --flags=-os-string --with-ghc=ghc --with-ghc-pkg=ghc-pkg --with-hsc2hs=hsc2hs --with-gcc=cc --with-ar=ar --with-strip=strip --with-ld=ld --disable-executable-stripping --disable-library-stripping --disable-library-profiling --disable-profiling --enable-static --enable-shared --disable-executable-dynamic --disable-coverage --enable-library-for-ghci --datadir=/nix/store/jjr3hx078xnz9gq7b6dps6lmx4agmy7y-unix-lib-unix-2.8.6.0-data/share/ghc-9.12.2 --enable-split-sections
Configuring library for unix-2.8.6.0...
Error: [Cabal-8010]
Encountered missing or private dependencies:
    filepath >=1.4.100.0 && <1.5.0.0

error: builder for '/nix/store/jlgklrh1pk2wpw12dji1fkr9c3rr0jyq-unix-lib-unix-2.8.6.0.drv' failed with exit code 1

Additional context

BNFC CI does stack builds and 9.10/9.12 branches seem to be doing fine so I suppose this is a problem with haskell.nix rather then the stackage version. But I did not do the stack build tests myself so correct me if I am wrong.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions