[Nix-dev] GHC Panic with basic Yesod project under Nix

Michael Jones m.pricejones at gmail.com
Fri Nov 14 22:40:46 CET 2014


Hi,

Not sure where to send this so thought I'd try here to see if anyone has
the same trouble. I'm new to nix and new to Yesod and trying to build the
default Yesod project with 'yesod devel' in a new shell.

My steps are:

1. Create a new directory with default.nix:

{ haskellPackages ? (import <nixpkgs> {}).haskellPackages }:

let inherit (haskellPackages);

in with haskellPackages; cabal.mkDerivation (self: {
  pname = "cal";
  version = "0.0.1";
  src = ./.;
  buildDepends = with haskellPackages; [
    yesod yesodStatic yesodTest
    yesodBin
    hjsmin persistentSqlite hspec
    ];
  buildTools = with haskellPackages; [ cabalInstall ];
})

2. Run 'nix-shell'
3. Run 'yesod init' & fill in <project-name>
4. 'cd <project-name>'
5. 'yesod devel'

Fails with:

Yesod devel server. Press ENTER to quit
Resolving dependencies...
Configuring tmp-0.0.0...
Forcing recompile for ./Foundation.hs because of config/routes
Forcing recompile for ./Foundation.hs because of messages/en.msg
Forcing recompile for ./Foundation.hs because of
templates/default-layout-wrapper.hamlet
Forcing recompile for ./Foundation.hs because of
templates/default-layout.hamlet
Forcing recompile for ./Handler/Home.hs because of templates/homepage.hamlet
Forcing recompile for ./Handler/Home.hs because of templates/homepage.julius
Forcing recompile for ./Handler/Home.hs because of templates/homepage.lucius
Rebuilding application... (using cabal)
ghc: panic! (the 'impossible' happened)
  (GHC version 7.8.3 for x86_64-unknown-linux):
Loading temp shared object failed:
/run/user/1000/ghc11470_0/ghc11470_25.so: failed to map segment from shared
object: Operation not permitted

Please report this as a GHC bug:  http://www.haskell.org/ghc/reportabug

Is anyone in a position to offer advice? I've run:

nix-channel --update

as well to hopefully get the latest?

Any help would be much appreciated,
Michael
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.science.uu.nl/pipermail/nix-dev/attachments/20141114/6c3b0580/attachment.html 


More information about the nix-dev mailing list