我想让 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
];
}
但是,默认情况下会显示 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 版本设置为默认版本的正确方法是什么?