GHC 7.8.3 をデフォルトのシステム全体の Haskell コンパイラにしたいのですが、プラットフォーム全体をインストールしたくありません。ここに私のconfigurarion.nix
ファイルの一部があります:
{
environment.systemPackages = with pkgs; [
haskellPackages_ghc783_profiling.alex
haskellPackages_ghc783_profiling.happy
# ghc.ghc783 -- not sure about this one
haskellPackages_ghc783_profiling.ghc
haskellPackages_ghc783_profiling.cabalInstall
];
}
ただし、ver 7.6.3 はデフォルトで表示され、どこから来たのか想像できません...
$ ghc --verion
$ The Glorious Glasgow Haskell Compilation System, version 7.6.3
Wiki ページでいくつかのヒントを見つけました。
pkgs : {
packageOverrides = self : rec {
hsEnv = self.haskellPackages.ghcWithPackages (self : [
self.haskellPlatform
# add more packages here
#
# I tried to replace `self.haskellPlatform`
# with `self:ghc783`,
# with `self:haskellPackages.ghc_783_profiling.ghc`, and
# with `self:ghc`, but all that produces errors.
]);
};
}
では、バージョン 7.8.3 をデフォルトにする正しい方法は何ですか?