[Nix-dev] Haskell workflow - ghc not in PATH - recommended way / documentation?

Marc Weber marco-oweber at gmx.de
Thu Jun 23 11:24:07 CEST 2016


It's way too much work to keep maintaining my nixpkgs-haskell-overlay.

Trying the workflow specified in the manual:

1) ./default.nix:

  { nixpkgs ? import <nixpkgs> {}, compiler ? "ghc7102" }:
  nixpkgs.pkgs.haskell.packages.${compiler}.callPackage ./foo.nix { }


2) cabal2nix . >| foo.nix

3) nix-shell --command zsh

however doesn't put ghc in PATH.

BTW: Cabal2nix on cabal2nix seems to fail:

    configureFlags: --verbose --prefix=/nix/store/qk9jk6abnqzg8dybzgiabm4p3wjmflr0-distribution-nixpkgs-1 --libdir=$prefix/lib/$compiler --libsubdir=$pkgid --with-gcc=gcc --package-db=/tmp/nix-build-distribution-nixpkgs-1.drv-0/package.conf.d --ghc-option=-optl=-Wl,-rpath=/nix/store/qk9jk6abnqzg8dybzgiabm4p3wjmflr0-distribution-nixpkgs-1/lib/ghc-7.10.2/distribution-nixpkgs-1 --enable-split-objs --disable-library-profiling --disable-executable-profiling --enable-shared --enable-library-vanilla --enable-executable-dynamic --enable-tests
    Configuring distribution-nixpkgs-1...
    Setup: At least the following dependencies are missing:
    Cabal >1.24
    builder for ‘/nix/store/9ml89qkri8fkn1bldyh446a2g6rkscjc-distribution-nixpkgs-1.drv’ failed with exit code 1
    error: build of ‘/nix/store/9ml89qkri8fkn1bldyh446a2g6rkscjc-distribution-nixpkgs-1.drv’ failed


I'm pretty sure that I missed something obvious ..

Marc Weber


More information about the nix-dev mailing list