nixpkgs/nixos/tests/nix-required-mounts/ensure-path-not-present.nix
Wolfgang Walther c319ac6571
various: fix eval
runCommandNoCC has been renamed to runCommand and the former has
recently been turned into a throw.
2025-10-28 18:17:14 +01:00

14 lines
268 B
Nix

{
pkgs ? import <nixpkgs> { },
feature,
}:
pkgs.runCommand "${feature}-not-present" { } ''
if [[ -e /${feature}-files ]]; then
echo "No ${feature} in requiredSystemFeatures, but /${feature}-files was mounted anyway"
exit 1
else
touch $out
fi
''