solution: use gradle 7.2

Co-authored-by: Brian McGee <brian@41north.dev>
This commit is contained in:
Aldo
2021-11-12 03:36:32 +01:00
committed by GitHub
parent abb74c98af
commit b6a05d67df
16 changed files with 688 additions and 226 deletions

38
nix/lib/force_cached.nix Normal file
View File

@@ -0,0 +1,38 @@
# Source https://github.com/Mic92/nix-build-uncached/blob/master/scripts/force_cached.nix
coreutils: attrs:
with builtins;
let
# Copied from <nixpkgs/lib>
isDerivation = x: isAttrs x && x ? type && x.type == "derivation";
# Return true if `nix-build` would traverse that attribute set to look for
# more derivations to build.
hasRecurseIntoAttrs = x: isAttrs x && (x.recurseForDerivations or false);
# Wraps derivations that disallow substitutes so that they can be cached.
toCachedDrv = drv:
if !(drv.allowSubstitutes or true) then
derivation
{
name = "${drv.name}-to-cached";
system = drv.system;
builder = "/bin/sh";
args = [ "-c" "${coreutils}/bin/ln -s ${drv} $out; exit 0" ];
}
else
drv;
op = _: val:
if isDerivation val then
toCachedDrv val
else if hasRecurseIntoAttrs val then
forceCached val
else
val
;
# Traverses a tree of derivation and wrap all of those that disallow
# substitutes.
forceCached = attrs: mapAttrs op attrs;
in
forceCached attrs