The correct ghc version was not passed through anymore, I'm not entirely
sure this is the correct fix or if this is the only argument that was
missing.
broken by 5e31e828f8
cc @Ericson2314
This works by extracting out some logic from generic-builder.nix to
make it possible to get at the relevant information by overriding
mkDerivation for the haskell package.
Previously, if a package name in a later component was a substring of a package name in an earlier component, the earlier component would be selected due to a partial-name match. This commit prevents partial matches.
OS X by default has a case-insensitive filesystem, and fetching
all-cabal-hashes there fails due to a hash mismatch caused by package
pairs like compactable and Compactable. This partitions the package set
such that each partition contains no equivalent-up-to-case pairs.
This reverts commit dfb0f25484, reversing
changes made to 7f8ff02437. These changes broke
the ghcWithPackages wrapper:
nix-shell -p "haskellPackages.ghcWithPackages (ps: [ps.mtl])" --run "ghc-pkg list mtl"
/nix/store/szz84j5k1dy3jdashis6ws28d8l8zxxb-ghc-8.0.2-with-packages/lib/ghc-8.0.2/package.conf.d
(no packages)
This is not needed, since `hscolour` has no output to `/etc`, and it
breaks certain old builds (see https://hydra.nixos.org/build/57925511)
because the older cabal used does not understand this flag.
One of the goals of 74f5fe5 was to allow passing in a custom stdenv,
which would be used for genericBuilder's `mkDerivation` call. That does
work, but if packages takes `stdenv` as an parameter for any reason,
they'll get the default one instead. This change remedies it.
- The haskell lib is very close to not relying on Nixpkgs. I think
this is good---simpler to think about and matches Nixpkgs's lib.
- The haskell lib is only imported once
- stdenv is exposed more shallowly so it can be overriden more easily.
I'll eventually use this on Darwin to avoid the Sierra shared
library problems (unless changes are to be made system-wide).
Closes https://github.com/NixOS/nixpkgs/pull/27840.
We want code such as `(pkg.override {}).overrideScope (self: super: {})` to
work. This didn't work before, since `override` will call the original package
again, and the attribute `overideScope`, which `callPackageWithScope` added,
wasn't added again. The fix for this is to modify the package function itself
to include the `callPackageWithScope` attribute, so it'll be re-added whenever
the function is overriden for with arguments.
There is a small problem here though: since callPackage uses some magic
(`builtins.functionArgs`) to determine the auto-arguments of a function, we
can't just write `callPackageWith scope drvScope`, since
`builtins.functionArgs drvScope` will be `{}`. To fix this, we implement our own
`callPackageWith`.
Fixes https://github.com/NixOS/nixpkgs/issues/7953.
Closes https://github.com/NixOS/nixpkgs/pull/9336.