aboutsummaryrefslogtreecommitdiffstats
path: root/pkgs
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2026-11-22 16:21:29 +0000
committertv <tv@krebsco.de>2026-11-22 16:21:33 +0000
commit40b229a047e578fa11c7d4cffb7aebc74fab3822 (patch)
treeb255599dfe3550af5b07b06ef00c025e9f684f34 /pkgs
parent60ab707f2d6678e0754e4889771e5c45680a5916 (diff)
populate: look for grep and sed on targets of git sources
git sources' snippets run grep and sed on the target, so check looks for them there as well, with Git, and gets them from <nixpkgs> there, if the target lacks them. The README names grep and sed among what populate runs on the machine it runs on, too, for pass sources and Git work trees that flakes get drawn from.
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/populate/README.md10
-rw-r--r--pkgs/populate/docs/design.md8
-rw-r--r--pkgs/populate/src/populate.rs2
3 files changed, 11 insertions, 9 deletions
diff --git a/pkgs/populate/README.md b/pkgs/populate/README.md
index 3a154b6..74181e9 100644
--- a/pkgs/populate/README.md
+++ b/pkgs/populate/README.md
@@ -26,14 +26,14 @@ fetches the program's dependencies from [crates.io](https://crates.io).
## Requirements
populate runs rsync, ssh, Git, Nix, pass, and passage as the sources need
-them, found in `PATH`, as well as coreutils and findutils, and a POSIX shell
-as `/bin/sh`.
+them, found in `PATH`, as well as coreutils, findutils, grep, and sed, and a
+POSIX shell as `/bin/sh`.
The target needs a POSIX shell as `/bin/sh`, coreutils, Nix, and, if
remote, ssh access as root, or, with `--sudo`, as a user who may use
`sudo`. populate also runs findutils, `flock`, rsync, `patch` for sources
-with `patches`, and Git for `git` sources there. If the target lacks any
-of those, populate warns, and gets them from `<nixpkgs>` there with
-`nix-build`, once for each run.
+with `patches`, and Git, grep, and sed for `git` sources there. If the
+target lacks any of those, populate warns, and gets them from `<nixpkgs>`
+there with `nix-build`, once for each run.
NixOS has all of them but Git, and rsync as long as
`environment.defaultPackages` contains it. Features that say so need Nix
with flake support (Nix 2.4 or later) on the machine that uses them.
diff --git a/pkgs/populate/docs/design.md b/pkgs/populate/docs/design.md
index 10e6f4b..4421942 100644
--- a/pkgs/populate/docs/design.md
+++ b/pkgs/populate/docs/design.md
@@ -99,9 +99,11 @@ For a local target, populate runs commands directly.
For a remote target, populate runs commands over ssh, sharing one master
connection per target. The commands are fixed POSIX shell snippets, with
values passed as positional arguments, so nothing gets quoted into them.
-The target needs a POSIX shell, coreutils, findutils, rsync, `patch` for
-patches, Git for `git` sources, and Nix; NixOS lacks Git. With `sudo`,
-the snippets run via `sudo`.
+The target needs a POSIX shell, coreutils, findutils, `flock`, rsync,
+`patch` for patches, Git, grep, and sed for `git` sources, and Nix; NixOS
+lacks Git. check gets what the target lacks of those but the shell,
+coreutils, and Nix from `<nixpkgs>` there. With `sudo`, the snippets run
+via `sudo`.
Populate runs rsync, Git, ssh, and Nix as programs, found in `PATH`.
diff --git a/pkgs/populate/src/populate.rs b/pkgs/populate/src/populate.rs
index 322708a..1aaf064 100644
--- a/pkgs/populate/src/populate.rs
+++ b/pkgs/populate/src/populate.rs
@@ -21,7 +21,7 @@ fn tools(spec: &Spec) -> Vec<&'static str> {
tools.extend(["rsync", "rsync"]);
}
if sources().any(|s| s.kind == "git") {
- tools.extend(["git", "git"]);
+ tools.extend(["git", "git", "grep", "gnugrep", "sed", "gnused"]);
}
let patched = |s: &&Source| {
s.settings