Commit graph

5 commits

Author SHA1 Message Date
Shea Levy ac1599971f hackage2nix: Pull haskellSrc2nix from the final package set 2017-05-10 08:03:57 -04:00
Shea Levy 9f2bbf65af haskellSrc2nix: preferLocalBuild and use unwrapped cabal2nix.
No need to download bazaar etc...
2017-05-01 18:21:42 -04:00
Benno Fünfstück 6b36d26a24 haskell: add more callPackageWithScope docs 2017-04-25 16:08:44 +02:00
Benno Fünfstück 731e0fa742 haskell: preserve overrideScope on override
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.
2017-04-25 16:08:43 +02:00
Benno Fünfstück 5f33eb493f haskell-packages: factor package set construction in new file
Closes https://github.com/NixOS/nixpkgs/pull/24850.
2017-04-21 16:25:53 +02:00