Skip to content

Instantly share code, notes, and snippets.

@goolord
Created December 3, 2018 15:16
Show Gist options
  • Save goolord/d800067ace68876124f496f18418f11d to your computer and use it in GitHub Desktop.
Save goolord/d800067ace68876124f496f18418f11d to your computer and use it in GitHub Desktop.
# zachchurchill @ developer1 in ~/Documents/grove/backend/service on git:master x [10:15:21]
> nix-shell --run 'ghcid -c cabal new-repl'
these derivations will be built:
/nix/store/wl7s679ap53p8nv7fgk3x3dk81zb4mj3-beam-migrate-0.3.2.1.drv
/nix/store/5c2lwzjcqr7cd5kgdb3d5n8i89g763wk-beam-postgres-0.3.2.2.drv
/nix/store/jy3q1q1wqvprq6dv7yf65fqnp2i6kk8l-beam-0.3.2.0.drv
/nix/store/n7f4pxmlilmdylqj00pp2six53rc1zjp-ghc-8.4.4-with-packages.drv
building '/nix/store/jy3q1q1wqvprq6dv7yf65fqnp2i6kk8l-beam-0.3.2.0.drv'...
setupCompilerEnvironmentPhase
Build with /nix/store/s9a8h6qqdmignsqphir5jyllr5ivf0p3-ghc-8.4.4.
unpacking sources
unpacking source archive /nix/store/zm07nggq4slhhazi7bfg3a7m8dfkzw2d-beam-0.3.2.0.tar.gz
source root is beam-0.3.2.0
setting SOURCE_DATE_EPOCH to timestamp 1453790524 of file beam-0.3.2.0/src/Database/Beam/SQL/Types.hs
patching sources
Replace Cabal file with edited version from http://hackage.haskell.org/package/beam-0.3.2.0/revision/1.cabal.
compileBuildDriverPhase
setupCompileFlags: -package-db=/tmp/nix-build-beam-0.3.2.0.drv-0/setup-package.conf.d -j8 -threaded
[1 of 1] Compiling Main ( Setup.hs, /tmp/nix-build-beam-0.3.2.0.drv-0/Main.o )
Linking Setup ...
configuring
configureFlags: --verbose --prefix=/nix/store/vs47jqykmr30jmk14lnq5az8w6xvs9qf-beam-0.3.2.0 --libdir=$prefix/lib/$compiler --libsubdir=$abi/$libname --with-gcc=gcc --package-db=/tmp/nix-build-beam-0.3.2.0.drv-0/package.conf.d --ghc-option=-j8 --disable-split-objs --disable-library-profiling --disable-profiling --enable-shared --disable-coverage --enable-static --disable-executable-dynamic --disable-tests --disable-benchmarks --enable-library-vanilla --enable-library-for-ghci --ghc-option=-split-sections --extra-lib-dirs=/nix/store/iirmif7qgp7pgbv80z5x1sj3hbay893d-ncurses-6.1/lib --extra-lib-dirs=/nix/store/p0z7zza48ffzcb2riaq26745s02yipfb-gmp-6.1.2/lib
Using Parsec parser
Configuring beam-0.3.2.0...
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:
base ==4.8.*
builder for '/nix/store/jy3q1q1wqvprq6dv7yf65fqnp2i6kk8l-beam-0.3.2.0.drv' failed with exit code 1
cannot build derivation '/nix/store/n7f4pxmlilmdylqj00pp2six53rc1zjp-ghc-8.4.4-with-packages.drv': 1 dependencies couldn't be built
error: build of '/nix/store/n7f4pxmlilmdylqj00pp2six53rc1zjp-ghc-8.4.4-with-packages.drv' failed
@chessai
Copy link

chessai commented Dec 3, 2018

This is not trying to build ghc. This is trying to build beam.

@goolord
Copy link
Author

goolord commented Dec 3, 2018

ya

@chessai
Copy link

chessai commented Dec 3, 2018

ghc-${version}-with-packages is not ghc - when you're inside of a nix-shell involving haskell projects, you're just dropped into an environment with ghc equipped with (with) certain packages (those specified by your nix expression). So the very last thing that gets 'built'/realised in a shell of a haskell project is ghc-${version}-with-packages.drv

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment