tests: port loop, remove hardcoded paths

This commit is contained in:
Richard Marko 2020-04-27 08:55:05 +02:00 committed by John Wiegley
parent f2999a33bb
commit 9c93e89331
1 changed files with 10 additions and 8 deletions

View File

@ -20,7 +20,7 @@
stageFun = step: stageFun = step:
last: last:
{ shell ? "/bin/bash" { shell ? "/bin/bash"
, overrides ? null , overrides ? (self: super: {})
, allowedRequisites ? null }: , allowedRequisites ? null }:
let let
name = "bootstrap-stage${toString step}"; name = "bootstrap-stage${toString step}";
@ -31,15 +31,18 @@
let callLibs = file: import file { lib = self; }; let callLibs = file: import file { lib = self; };
in with self; { in with self; {
customisation = customisation =
callLibs /Users/johnw/src/nix/nixpkgs/lib/customisation.nix; callLibs <nixpkgs/lib/customisation.nix>;
trivial =
callLibs <nixpkgs/lib/trivial.nix>;
inherit (customisation) makeOverridable; inherit (customisation) makeOverridable;
inherit (trivial) functionArgs setFunctionArgs;
}); });
in lib.makeOverridable ({ name ? null in lib.makeOverridable ({ name ? null
, preHook ? null , preHook ? null
, initialPath , initialPath
, shell , shell
, allowedRequisites ? null , allowedRequisites ? null
, overrides ? null , overrides ? (self: super: {})
, config , config
, buildPlatform , buildPlatform
, hostPlatform , hostPlatform
@ -66,8 +69,7 @@
hostPlatform = localSystem; hostPlatform = localSystem;
targetPlatform = localSystem; targetPlatform = localSystem;
initialPath = []; initialPath = [];
overrides = self: super: overrides = self: super: (overrides self super) // { fetchurl = null; };
overrides null super // { fetchurl = null; };
}; };
in { in {
inherit config overlays; inherit config overlays;
@ -82,7 +84,7 @@
allowedRequisites = [ allowedRequisites = [
(pkgs.darwin.Libsystem) # THUNK FORCE STARTS HERE (pkgs.darwin.Libsystem) # THUNK FORCE STARTS HERE
]; ];
overrides = null; overrides = sefl: super: {};
}; };
stagesDarwin = [ ({ }: stage0) stage1 ]; stagesDarwin = [ ({ }: stage0) stage1 ];
}) stagesDarwin; }) stagesDarwin;
@ -95,8 +97,8 @@
let callLibs = file: import file { lib = self; }; let callLibs = file: import file { lib = self; };
in with self; in with self;
{ {
fixedPoints = callLibs /Users/johnw/src/nix/nixpkgs/lib/fixed-points.nix; fixedPoints = callLibs <nixpkgs/lib/fixed-points.nix>;
lists = callLibs /Users/johnw/src/nix/nixpkgs/lib/lists.nix; lists = callLibs <nixpkgs/lib/lists.nix>;
inherit (fixedPoints) fix extends; inherit (fixedPoints) fix extends;
inherit (lists) foldl' imap1; inherit (lists) foldl' imap1;
}); });