Skip to content

Commit

Permalink
Inline collectChecks
Browse files Browse the repository at this point in the history
  • Loading branch information
hamishmack committed Dec 3, 2019
1 parent 0d46921 commit bf51372
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
8 changes: 2 additions & 6 deletions default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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 {
Expand Down
5 changes: 3 additions & 2 deletions nix/util.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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 bf51372

Please sign in to comment.