From 2756c12cc0828a325e1de1a25fc8e34b16ff5bb2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20=C4=8Cun=C3=A1t?= Date: Thu, 24 Sep 2015 11:40:20 +0200 Subject: [PATCH] haskell: make `ghc`, `cabal-install`, and `stack` visible Thanks to @peti. Close #10035. (cherry picked from commit 6070cd09fc8382528788e86d44537a7d9ccdd9f1) --- doc/haskell-users-guide.xml | 11 +++++------ nixos/doc/manual/release-notes/rl-1509.xml | 7 +++---- pkgs/top-level/all-packages.nix | 1 + 3 files changed, 9 insertions(+), 10 deletions(-) diff --git a/doc/haskell-users-guide.xml b/doc/haskell-users-guide.xml index 2f3b1eabb11..2e9fd4b4ca0 100644 --- a/doc/haskell-users-guide.xml +++ b/doc/haskell-users-guide.xml @@ -11,14 +11,13 @@ registered on Hackage, but strangely enough normal Nix package lookups don't seem to discover - any of them: + any of them, except for the default version of ghc, cabal-install, and stack: -$ nix-env -qa cabal-install -error: selector ‘cabal-install’ matches no derivations - -$ nix-env -i ghc -error: selector ‘ghc’ matches no derivations +$ nix-env -i alex +error: selector ‘alex’ matches no derivations +$ nix-env -qa ghc +ghc-7.10.2 The Haskell package set is not registered in the top-level namespace diff --git a/nixos/doc/manual/release-notes/rl-1509.xml b/nixos/doc/manual/release-notes/rl-1509.xml index b814426dbe8..a2f38d99b25 100644 --- a/nixos/doc/manual/release-notes/rl-1509.xml +++ b/nixos/doc/manual/release-notes/rl-1509.xml @@ -135,10 +135,9 @@ fileSystems."/shiny" = { - Haskell packages can no longer be found by name, i.e. the commands - nix-env -qa cabal-install and nix-env -i - ghc will fail, even though we do ship - both cabal-install and ghc. + Haskell packages can no longer be found by name, except for + ghc, cabal-install, and + stack, even though we do package the whole Hackage. The reason for this inconvenience is the sheer size of the Haskell package set: name-based lookups such as these would become much slower than they are today if we'd add the entire Hackage database diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 0234fd4203d..86dd8f83d98 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -4063,6 +4063,7 @@ let haskellPackages = haskell.packages.ghc7102.override { overrides = config.haskellPackageOverrides or (self: super: {}); }; + inherit (haskellPackages) ghc cabal-install stack; haxe = callPackage ../development/compilers/haxe { inherit (ocamlPackages) camlp4;