aboutsummaryrefslogtreecommitdiffstats
path: root/pkgs/populate/tests
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2026-11-14 04:09:35 +0000
committertv <tv@krebsco.de>2026-11-14 06:23:52 +0100
commit36181e19ccef8d86d53dc5d504eb382c7d9b25fe (patch)
treeecc3e5463ecabe1086ed748335f95fda820191ad /pkgs/populate/tests
parent4ac279ac50b2a842b08d39a875c7c1b89998fd13 (diff)
krops: use lib/with.nix everywhere, and no with
lib/default.nix is for backwards compatibility only, so the examples in the README and ci.nix use lib/with.nix, as klib, with nixpkgs' lib from pkgs. pkgs.populate and its checks name what they use from nixpkgs' lib, builtins, and klib, instead of bringing them into scope with with, and the scenarios inherit what they use from the builder and nixpkgs' lib, which the builder doesn't pass on anymore. Nix tells undefined names when parsing then, and a name means the same wherever it's used. The derivations and the scenarios stay the same.
Diffstat (limited to 'pkgs/populate/tests')
-rw-r--r--pkgs/populate/tests/builder.nix4
-rw-r--r--pkgs/populate/tests/default.nix7
-rw-r--r--pkgs/populate/tests/scenarios.nix8
3 files changed, 11 insertions, 8 deletions
diff --git a/pkgs/populate/tests/builder.nix b/pkgs/populate/tests/builder.nix
index 91609a9..e06081a 100644
--- a/pkgs/populate/tests/builder.nix
+++ b/pkgs/populate/tests/builder.nix
@@ -240,10 +240,6 @@ let
};
in {
- inherit lib url gitUrl remoteHost agePath gitHead gitFirst rsyncVersion;
- inherit (lib)
- attrNames concatMap concatStringsSep foldl' isBool mapAttrsToList
- optional optionalAttrs optionals optionalString;
inherit
prelude cartesian flagsName alt targetName
inputModes drawInputs flakeOf scenario twice
diff --git a/pkgs/populate/tests/default.nix b/pkgs/populate/tests/default.nix
index 7b37bb3..3399c77 100644
--- a/pkgs/populate/tests/default.nix
+++ b/pkgs/populate/tests/default.nix
@@ -40,9 +40,10 @@ let
if deploy != null then throw "populate's tests don't deploy" else
pkgs.writers.writeDash "populate" /* sh */ ''
set -efu
- PATH=${lib.makeBinPath (with pkgs; [
- coreutils findutils git nix openssh pass passage rsync
- ])}''${PATH:+:$PATH}
+ PATH=${lib.makeBinPath [
+ pkgs.coreutils pkgs.findutils pkgs.git pkgs.nix pkgs.openssh pkgs.pass
+ pkgs.passage pkgs.rsync
+ ]}''${PATH:+:$PATH}
export PATH
exec ${populate-unwrapped}/bin/populate ${lib.escapeShellArgs (
lib.optional backup "--backup" ++
diff --git a/pkgs/populate/tests/scenarios.nix b/pkgs/populate/tests/scenarios.nix
index 223839b..4b7a42b 100644
--- a/pkgs/populate/tests/scenarios.nix
+++ b/pkgs/populate/tests/scenarios.nix
@@ -4,7 +4,13 @@
# sources. The arguments are those of builder.nix, which builds them.
args:
-with import ./builder.nix args;
+let
+ inherit (args) lib agePath gitFirst gitHead gitUrl rsyncVersion url;
+ inherit (lib) concatMap optional optionalAttrs optionalString;
+ inherit (import ./builder.nix args)
+ alt checkFlake copyingWithSudo drawInputs flakeOf inputModes matrix
+ refuseCopyingWithSudo scenario targetKinds targetName twice;
+in
{