Demonstrates a nix build failure which i'm trying to debug, try doing `nix-build` in this directory

moet 73b9a0b617 Update 'README.md' 7 years ago
Blah.hs b1ba7384a0 minimal repro for failing build (try `nix-build`) 7 years ago
README.md 73b9a0b617 Update 'README.md' 7 years ago
Setup.hs b1ba7384a0 minimal repro for failing build (try `nix-build`) 7 years ago
default.nix b1ba7384a0 minimal repro for failing build (try `nix-build`) 7 years ago
nixpkgs.json b1ba7384a0 minimal repro for failing build (try `nix-build`) 7 years ago
wtf-build-please.cabal b1ba7384a0 minimal repro for failing build (try `nix-build`) 7 years ago

README.md

if i do nix-build i get an error about versions for HUnit while building exception-transformers

building path(s) ‘/nix/store/c3qn0q2m12lv58i12hsw7ihl2pykiavy-cabal2nix-wtf-build-please’
installing
these derivations will be built:
  /nix/store/an8wi5i04w8iicvla7vm0wpvbzxvlxpr-exception-transformers-0.4.0.5.drv
  /nix/store/5gzxsqhz1bhz0lp79w1jqf1bvsy141pc-wtf-build-please-0.1.0.0.drv
building path(s) ‘/nix/store/3r7p18vfjybj5qrdgnsy6c0rklkfn6jn-exception-transformers-0.4.0.5’, ‘/nix/store/9mi2ckl2ikg2234d2i5v57sww0rh0f59-exception-transformers-0.4.0.5-doc’
setupCompilerEnvironmentPhase
Build with /nix/store/9mmd8az75dr3d1hxxvivmisp6wv61bzy-ghc-8.2.2.
unpacking sources
unpacking source archive /nix/store/apjzvah0km9llv0zii8bgrvr0syf7fnx-exception-transformers-0.4.0.5.tar.gz
source root is exception-transformers-0.4.0.5
setting SOURCE_DATE_EPOCH to timestamp 1480895960 of file exception-transformers-0.4.0.5/tests/unit/Main.hs
patching sources
compileBuildDriverPhase
setupCompileFlags: -package-db=/private/tmp/nix-build-exception-transformers-0.4.0.5.drv-0/package.conf.d -j1 -threaded
[1 of 1] Compiling Main             ( Setup.hs, /private/tmp/nix-build-exception-transformers-0.4.0.5.drv-0/Main.o )
Linking Setup ...
configuring
configureFlags: --verbose --prefix=/nix/store/3r7p18vfjybj5qrdgnsy6c0rklkfn6jn-exception-transformers-0.4.0.5 --libdir=$prefix/lib/$compiler --libsubdir=$pkgid --docdir=/nix/store/9mi2ckl2ikg2234d2i5v57sww0rh0f59-exception-transformers-0.4.0.5-doc/share/doc --with-gcc=clang --package-db=/private/tmp/nix-build-exception-transformers-0.4.0.5.drv-0/package.conf.d --ghc-option=-optl=-Wl,-headerpad_max_install_names --ghc-option=-j1 --disable-split-objs --disable-library-profiling --disable-profiling --enable-shared --disable-coverage --enable-library-vanilla --enable-executable-dynamic --enable-tests --extra-include-dirs=/nix/store/h7hipm2yxyzxaigms966rbm89m0qfny4-libc++-4.0.1/include --extra-lib-dirs=/nix/store/h7hipm2yxyzxaigms966rbm89m0qfny4-libc++-4.0.1/lib
Configuring exception-transformers-0.4.0.5...
CallStack (from HasCallStack):
  die', called at libraries/Cabal/Cabal/Distribution/Simple/Configure.hs:948:20 in Cabal-2.0.1.0:Distribution.Simple.Configure
  configureFinalizedPackage, called at libraries/Cabal/Cabal/Distribution/Simple/Configure.hs:470:12 in Cabal-2.0.1.0:Distribution.Simple.Configure
  configure, called at libraries/Cabal/Cabal/Distribution/Simple.hs:570:20 in Cabal-2.0.1.0:Distribution.Simple
  confHook, called at libraries/Cabal/Cabal/Distribution/Simple/UserHooks.hs:67:5 in Cabal-2.0.1.0:Distribution.Simple.UserHooks
  configureAction, called at libraries/Cabal/Cabal/Distribution/Simple.hs:174:19 in Cabal-2.0.1.0:Distribution.Simple
  defaultMainHelper, called at libraries/Cabal/Cabal/Distribution/Simple.hs:119:27 in Cabal-2.0.1.0:Distribution.Simple
  defaultMain, called at Setup.hs:3:8 in main:Main
Setup: Encountered missing dependencies:
HUnit >=1.2 && <1.6
builder for ‘/nix/store/an8wi5i04w8iicvla7vm0wpvbzxvlxpr-exception-transformers-0.4.0.5.drv’ failed with exit code 1
cannot build derivation ‘/nix/store/5gzxsqhz1bhz0lp79w1jqf1bvsy141pc-wtf-build-please-0.1.0.0.drv’: 1 dependencies couldn't be built
error: build of ‘/nix/store/5gzxsqhz1bhz0lp79w1jqf1bvsy141pc-wtf-build-please-0.1.0.0.drv’ failed

i looked at the derivation file grep HUnit /nix/store/an8wi5i04w8iicvla7vm0wpvbzxvlxpr-exception-transformers-0.4.0.5.drv and it's pulling in HUnit-1.6, just outside the bounds

i tried patching the exception-transformers cabal file bounds to HUnit<=1.6 but the build fails with almost the same error, indicating the newly patched range (evidence that the patch was applied, and something else is weird with the build)

poking around in nix-repl, http://lpaste.net/361132, it seems nixpkgs is going to use HUnit-1.5.0, which is in-bounds for exception-transformers-0.4.0.5