# enstate, the program (README.md). { lib, runCommand, rustPlatform, util-linux, }: rustPlatform.buildRustPackage { pname = "enstate"; version = "0.0.1"; # Only what the build reads, each part on its own, never the whole checkout: a # filter over the checkout can't tell its files apart below a symbolic link (Nix # gives it the resolved paths), and lib.fileset refuses one. src = runCommand "enstate-source" { } '' mkdir $out cp ${../Cargo.toml} $out/Cargo.toml cp ${../Cargo.lock} $out/Cargo.lock cp -r ${../src} $out/src cp -r ${../tests} $out/tests ''; # The tests' fake systemctl looks at the store's lock with flock. nativeCheckInputs = [ util-linux ]; cargoLock = { lockFile = ../Cargo.lock; outputHashes."config-0.1.0" = "sha256-uulfkMx4Nuh22xd7sujqQKSr9AikY8j0CgQygqvs/zw="; }; meta = { description = "State next to the Nix store: plan, apply, and make submissions"; mainProgram = "enstate"; platforms = lib.platforms.linux; }; }