aboutsummaryrefslogtreecommitdiffstats
path: root/pkgs/populate/program.nix
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2026-11-14 00:27:45 +0000
committertv <tv@krebsco.de>2026-11-14 01:46:01 +0100
commita4540a584d762b000b21cb7e61987c414eb72a1d (patch)
tree077bb7dfc4d104e5e133ad96c4485ff99bcd14c5 /pkgs/populate/program.nix
parent8f08426ae3a2e5f0ecc5d010bc6469b41e3d7678 (diff)
populate: layer populate below krops
populate is a program of its own, with a Nix library, in pkgs/populate, which krops uses, and which doesn't use krops: - default.nix builds the program, with nix-build there or callPackage, as pkgs.populate-unwrapped. - lib is populate's Nix library: the types of sources and the POSIX types they use, evalSource, flakeFollows, hasGeneratedFlake, and derivesFlake, taking nixpkgs' lib. krops' lib takes them from there, so it provides them as before, and so does lib/types. pkgs.populate, the function from populate's arguments to a script running the program, is krops' own, in pkgs/krops/populate.nix, with checks.nix next to it. It takes the program as populate-unwrapped, which callPackage passes from the overlay; the flake, whose nixpkgs lacks it, passes its own.
Diffstat (limited to 'pkgs/populate/program.nix')
-rw-r--r--pkgs/populate/program.nix25
1 files changed, 0 insertions, 25 deletions
diff --git a/pkgs/populate/program.nix b/pkgs/populate/program.nix
deleted file mode 100644
index fbb364c..0000000
--- a/pkgs/populate/program.nix
+++ /dev/null
@@ -1,25 +0,0 @@
-# The program delivering sources, built from the crate in this directory.
-{ rustPlatform }:
-
-let
- cargoToml = builtins.fromTOML (builtins.readFile ./Cargo.toml);
-in
-
-rustPlatform.buildRustPackage {
- pname = cargoToml.package.name;
- inherit (cargoToml.package) version;
- # Without what cargo doesn't build from, so changes to the Nix files or
- # the docs don't rebuild the program. By names, not by paths relative to
- # this directory: the paths the filter gets needn't start with
- # toString ./., e.g. if a symlink leads to this directory.
- src = builtins.path {
- name = "populate-src";
- path = ./.;
- filter = path: type: let
- name = baseNameOf path;
- in
- !(builtins.elem name [ ".gitignore" "docs" "target" ] ||
- builtins.match ".*\\.nix" name != null);
- };
- cargoLock.lockFile = ./Cargo.lock;
-}