The following command is succesfull on Darwin but fails on a NixOS machine:
nix-shell -p '(import (((import <nixpkgs> {}).fetchFromGitHub {
owner = "NixOS";
repo = "nixpkgs";
rev = "23fd1394dc6bef03a2ff010278a24403a97f0647";
sha256 = "1snry2ab0gjhg394ryfw8jwswjyj31fjxv79pxk219r76031fx20";
})) {}).haskell.packages.ghc844.ghcWithPackages (pkgs: [ pkgs.system-fileio ])'
The linux build fails with:
...
Configuring system-fileio-0.3.16.4...
CallStack (from HasCallStack):
die', called at libraries/Cabal/Cabal/Distribution/Simple/Configure.hs:958:20 in Cabal-2.2.0.1:Distribution.Simple.Configure
configureFinalizedPackage, called at libraries/Cabal/Cabal/Distribution/Simple/Configure.hs:462:12 in Cabal-2.2.0.1:Distribution.Simple.Configure
configure, called at libraries/Cabal/Cabal/Distribution/Simple.hs:596:20 in Cabal-2.2.0.1:Distribution.Simple
confHook, called at libraries/Cabal/Cabal/Distribution/Simple/UserHooks.hs:67:5 in Cabal-2.2.0.1:Distribution.Simple.UserHooks
configureAction, called at libraries/Cabal/Cabal/Distribution/Simple.hs:178:19 in Cabal-2.2.0.1:Distribution.Simple
defaultMainHelper, called at libraries/Cabal/Cabal/Distribution/Simple.hs:115:27 in Cabal-2.2.0.1:Distribution.Simple
defaultMain, called at Setup.hs:2:8 in main:Main
Setup: Encountered missing dependencies:
chell ==0.4.*
...
The bound on system-fileio
version 0.3.16.4
indeed constraints chell to chell >= 0.4 && < 0.5
(source), but the used nixpkgs
contains only chell v0.5
:
nix-instantiate --eval -E '(import (((import <nixpkgs> {}).fetchFromGitHub {
owner = "NixOS";
repo = "nixpkgs";
rev = "23fd1394dc6bef03a2ff010278a24403a97f0647";
sha256 = "1snry2ab0gjhg394ryfw8jwswjyj31fjxv79pxk219r76031fx20";
})) {}).haskell.packages.ghc844.chell.version'
"0.5"
so the failure is to be expected.
There don’t seem to be any overrides in nixpkgs related to system-fileio
as far as I could see.
I am really more interested in how this happened rather than how to fix it (I can just manually override the package).