Skip to content
Permalink
Browse files

Inline collectChecks

  • Loading branch information
hamishmack committed Dec 3, 2019
1 parent c077fa7 commit 971817e4bd3cb5b02c700676daf6f4da94ccba55
Showing with 5 additions and 8 deletions.
  1. +2 −6 default.nix
  2. +3 −2 nix/util.nix
@@ -24,11 +24,6 @@ let
inherit pkgs src jmPkgs;
};

collectChecks = packageSel: haskellPackages:
(pkgs.lib.mapAttrs (_: package: package.checks // { recurseForDerivations = true; })
(pkgs.lib.filterAttrs (name: package: (package.isHaskell or false) && packageSel package) haskellPackages))
// { recurseForDerivations = true; };

self = {
inherit pkgs iohkLib src haskellPackages;
inherit jormungandr jormungandr-cli;
@@ -41,7 +36,8 @@ let
haskellBuildUtils = iohkLib.haskellBuildUtils.package;
};

tests = collectChecks isCardanoWallet haskellPackages;
tests = pkgs.recurseIntoAttrs (pkgs.lib.mapAttrs (_: package: package.checks)
(pkgs.lib.filterAttrs (_: package: isCardanoWallet package) haskellPackages));
benchmarks = collectComponents "benchmarks" isCardanoWallet haskellPackages;

dockerImage = pkgs.callPackage ./nix/docker.nix {
@@ -4,8 +4,9 @@ with pkgs.lib;

{
isCardanoWallet = package:
(hasPrefix "cardano-wallet" package.identifier.name) ||
(elem package.identifier.name [ "text-class" "bech32" ]);
(package.isHaskell or false) &&
((hasPrefix "cardano-wallet" package.identifier.name) ||
(elem package.identifier.name [ "text-class" "bech32" ]));

inherit (pkgs.haskell-nix.haskellLib) collectComponents;
}

0 comments on commit 971817e

Please sign in to comment.
You can’t perform that action at this time.