Nix and Haskell-ng install error : attribute ‘nixpkgs’ in selection path ‘nixpkgs.haskellEnv’ not found -


i following this guide set nix , haskell-ng. when step

nix-env -ia nixpkgs.haskellenv

then error:

error: attribute ‘nixpkgs’ in selection path ‘nixpkgs.haskellenv’ not found

any idea going wrong?

the command nix-env -f "<nixpkgs>" -ia haskellenv should work.

citing http://nixos.org/nixpkgs/manual/#users-guide-to-the-haskell-infrastructure:

attribute paths deterministic inside of nixpkgs, path necessary reach nixpkgs varies system system. dodged problem giving nix-env explicit -f "<nixpkgs>" parameter, if call nix-env without flag, chances invocation fails:

$ nix-env -ia haskellpackages.cabal-install error: attribute ‘haskellpackages’ in selection path        ‘haskellpackages.cabal-install’ not found 

on nixos, example, nixpkgs not exist in top-level namespace default. figure out proper attribute path, it's easiest query path of well-known nixpkgs package, i.e.:

$ nix-env -qap coreutils nixos.coreutils  coreutils-8.23 

if system responds (most nixos installations will), attribute path haskellpackages nixos.haskellpackages. thus, if want use nix-env without giving explicit -f flag, that's way it:

$ nix-env -qap -a nixos.haskellpackages $ nix-env -ia nixos.haskellpackages.cabal-install 

Comments

Popular posts from this blog

twig - Using Twigbridge in a Laravel 5.1 Package -

jdbc - Not able to establish database connection in eclipse -

Kivy: Swiping (Carousel & ScreenManager) -