From 36181e19ccef8d86d53dc5d504eb382c7d9b25fe Mon Sep 17 00:00:00 2001 From: tv Date: Sat, 14 Nov 2026 04:09:35 +0000 Subject: 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. --- pkgs/populate/tests/builder.nix | 4 ---- pkgs/populate/tests/default.nix | 7 ++++--- pkgs/populate/tests/scenarios.nix | 8 +++++++- 3 files changed, 11 insertions(+), 8 deletions(-) (limited to 'pkgs/populate/tests') 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 { -- cgit v1.3.1