Branch: refs/heads/haskell-fix-override
  Home:   https://github.com/NixOS/nixpkgs
  Commit: b79e678e08108b2bee99030823c5ee84402f6809
      
https://github.com/NixOS/nixpkgs/commit/b79e678e08108b2bee99030823c5ee84402f6809
  Author: Benno Fünfstück <benno.fuenfstu...@gmail.com>
  Date:   2017-04-25 (Tue, 25 Apr 2017)

  Changed paths:
    M pkgs/development/haskell-modules/make-package-set.nix

  Log Message:
  -----------
  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.


  Commit: 61acbb18f48e25fc33f089db405d77e9f60cdf49
      
https://github.com/NixOS/nixpkgs/commit/61acbb18f48e25fc33f089db405d77e9f60cdf49
  Author: Benno Fünfstück <benno.fuenfstu...@gmail.com>
  Date:   2017-04-25 (Tue, 25 Apr 2017)

  Changed paths:
    M pkgs/development/haskell-modules/make-package-set.nix

  Log Message:
  -----------
  haskell: add more callPackageWithScope docs


Compare: https://github.com/NixOS/nixpkgs/compare/84e7bb130e97...61acbb18f48e
_______________________________________________
nix-commits mailing list
nix-comm...@lists.science.uu.nl
https://mailman.science.uu.nl/mailman/listinfo/nix-commits

Reply via email to