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: f1aaf9e912d3
Choose a base ref
...
head repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 1d8685a0ac4d
Choose a head ref
  • 2 commits
  • 1 file changed
  • 1 contributor

Commits on Nov 4, 2020

  1. Copy the full SHA
    aedb5d2 View commit details

Commits on Nov 5, 2020

  1. Merge pull request #102683 from cdepillabout/shellFor-add-benchmark

    haskellPackages.shellFor: add a doBenchmark argument for enabling benchmark deps
    cdepillabout authored Nov 5, 2020
    Copy the full SHA
    1d8685a View commit details
Showing with 10 additions and 2 deletions.
  1. +10 −2 pkgs/development/haskell-modules/make-package-set.nix
12 changes: 10 additions & 2 deletions pkgs/development/haskell-modules/make-package-set.nix
Original file line number Diff line number Diff line change
@@ -293,6 +293,10 @@ in package-set { inherit pkgs stdenv callPackage; } self // {
, # Whether or not to generate a Hoogle database for all the
# dependencies.
withHoogle ? false
, # Whether or not to include benchmark dependencies of your local
# packages. You should set this to true if you have benchmarks defined
# in your local packages that you want to be able to run with cabal benchmark
doBenchmark ? false
, ...
} @ args:
let
@@ -397,7 +401,11 @@ in package-set { inherit pkgs stdenv callPackage; } self // {
version = "0";
license = null;
}
// packageInputs;
// packageInputs
// pkgs.lib.optionalAttrs doBenchmark {
# `doBenchmark` needs to explicitly be set here because haskellPackages.mkDerivation defaults it to `false`. If the user wants benchmark dependencies included in their development shell, it has to be explicitly enabled here.
doBenchmark = true;
};

# This is a pseudo Haskell package derivation that contains all the
# dependencies for the packages in `selected`.
@@ -419,7 +427,7 @@ in package-set { inherit pkgs stdenv callPackage; } self // {
# pkgWithCombinedDepsDevDrv :: Derivation
pkgWithCombinedDepsDevDrv = pkgWithCombinedDeps.envFunc { inherit withHoogle; };

mkDerivationArgs = builtins.removeAttrs args [ "packages" "withHoogle" ];
mkDerivationArgs = builtins.removeAttrs args [ "packages" "withHoogle" "doBenchmark" ];

in pkgWithCombinedDepsDevDrv.overrideAttrs (old: mkDerivationArgs // {
nativeBuildInputs = old.nativeBuildInputs ++ mkDerivationArgs.nativeBuildInputs or [];