Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 51857be0d533
Choose a base ref
...
head repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 3509c4b7bb14
Choose a head ref
  • 2 commits
  • 1 file changed
  • 1 contributor

Commits on Mar 2, 2018

  1. haskellPackages.callCabal2nix: Depend on the expression.

    This ensures that as long as the package derivation is alive, its nix
    expressions do not need to be regenerated.
    
    Fixes #36190.
    shlevy committed Mar 2, 2018
    Copy the full SHA
    62a1abe View commit details
  2. Copy the full SHA
    3509c4b View commit details
Showing with 14 additions and 10 deletions.
  1. +14 −10 pkgs/development/haskell-modules/make-package-set.nix
24 changes: 14 additions & 10 deletions pkgs/development/haskell-modules/make-package-set.nix
Original file line number Diff line number Diff line change
@@ -145,17 +145,21 @@ in package-set { inherit pkgs stdenv callPackage; } self // {
callHackage = name: version: self.callPackage (self.hackage2nix name version);

# Creates a Haskell package from a source package by calling cabal2nix on the source.
callCabal2nix = name: src: args:
overrideCabal (self.callPackage (haskellSrc2nix {
callCabal2nix = name: src: args: let
filter = path: type:
pkgs.lib.hasSuffix "${name}.cabal" path ||
baseNameOf path == "package.yaml";
expr = haskellSrc2nix {
inherit name;
src =
let filter = path: type:
pkgs.lib.hasSuffix "${name}.cabal" path ||
baseNameOf path == "package.yaml";
in if pkgs.lib.canCleanSource src
then pkgs.lib.cleanSourceWith { inherit src filter; }
else src;
}) args) (_: { inherit src; });
src = if pkgs.lib.canCleanSource src
then pkgs.lib.cleanSourceWith { inherit src filter; }
else src;
};
in overrideCabal (self.callPackage expr args) (orig: {
inherit src;
preConfigure =
"# Generated from ${expr}\n${orig.preConfigure or ""}";
});

# : { root : Path
# , source-overrides : Defaulted (Either Path VersionNumber)