aboutsummaryrefslogtreecommitdiffstats
path: root/pkgs/populate/src
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2026-11-14 00:35:56 +0000
committertv <tv@krebsco.de>2026-11-14 02:01:47 +0100
commite4991d754160dd851b980f142e4b9a23815eafa3 (patch)
tree42cde064b8ceb47a76379ab25d0e694eaff62ea5 /pkgs/populate/src
parentdd166e5a4d4349241aa3408c8d7f7340cb0a90fb (diff)
populate: a README of its own, krops' linking to itkrops-2
pkgs/populate/README.md documents populate on its own: building it, what it needs, its command line, the sources as JSON and in Nix with its Nix library, the target directory, the source types, flake inputs from sources, what it prints, and its tests. The sections about the target directory, the source types, and flake inputs from sources move there from krops' README, which links to them from sections of the same names, and from the first mention of populate. docs/design.md keeps how populate works. krops' README describes krops' own tests, and CHANGELOG what populate being a program of its own means for krops.
Diffstat (limited to 'pkgs/populate/src')
-rw-r--r--pkgs/populate/src/check.rs14
1 files changed, 7 insertions, 7 deletions
diff --git a/pkgs/populate/src/check.rs b/pkgs/populate/src/check.rs
index ebe5dbf..5b73deb 100644
--- a/pkgs/populate/src/check.rs
+++ b/pkgs/populate/src/check.rs
@@ -1,14 +1,14 @@
-//! Checks of the sources and the target, the same as checks.nix makes during
-//! evaluation, so sources from anywhere else get checked as well. Messages
-//! are the same.
+//! Checks of the sources and the target, the same as krops' checks.nix
+//! makes during evaluation, so sources from anywhere else get checked as
+//! well. Messages are the same.
use crate::spec::{Source, Spec};
use serde_json::{Map, Value};
use std::collections::BTreeMap;
-/// The checks in the order checks.nix makes them, the first failing one's
-/// message. The target's host and user, which a command line gives, come
-/// first.
+/// The checks in the order krops' checks.nix makes them, the first failing
+/// one's message. The target's host and user, which a command line gives,
+/// come first.
pub fn spec(spec: &Spec) -> Result<(), String> {
target_host(&spec.target.host, spec.target.user.as_deref())?;
target_path(&spec.target.path)?;
@@ -267,7 +267,7 @@ pub fn inputs(sources: &BTreeMap<String, Source>) -> Result<(), String> {
}
// Depth-first search, with the path of sources on the way, which repeats
// a source if drawing goes round in circles. The message names the
- // whole path, the way into the circle included, like checks.nix.
+ // whole path, the way into the circle included, like krops' checks.nix.
fn visit<'a>(
name: &'a str,
drawn_from: &'a BTreeMap<&str, Vec<String>>,