[Nix-dev] haskell: overriding ghc784 packages?
William Casarin
bill at casarin.me
Tue Aug 11 22:38:52 CEST 2015
Hey Peter,
In the Haskell infrastructure guide[1], it describes how to override
haskellPackages to add additional packages to the package set:
{
packageOverrides = super: let self = super.pkgs; in
{
haskellPackages = super.haskellPackages.override {
overrides = self: super: {
foo = self.callPackage ../src/foo {};
};
};
};
}
Is there any way to do this for ghc784 packages? I tried:
{
packageOverrides = super: let self = super.pkgs; in
{
haskell.packages.ghc784 = super.haskell.packages.ghc784.override {
overrides = self: super: {
foo = self.callPackage ../src/foo {};
};
};
};
}
and it works when I nix-shell into my project, but it seems to break nixpkgs.
For example when I run:
nix-env -qaP
it fails with:
error: attribute ‘ghc7101’ missing, at
/home/jb55/nixpkgs/pkgs/top-level/all-packages.nix:3980:21
Leading me to believe I'm not doing this right. I don't get this error when
overriding haskellPackages.
Any ideas?
Cheers,
Bill
[1] http://hydra.nixos.org/build/24422016/download/1/nixpkgs/manual.html#how-to-build-projects-that-depend-on-each-other
More information about the nix-dev
mailing list