nixpkgs/nixos/tests/nix-required-mounts/test-structured-attrs.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

19 lines
424 B
Nix

{
pkgs ? import <nixpkgs> { },
feature,
}:
pkgs.runCommand "${feature}-present-structured"
{
__structuredAttrs = true;
requiredSystemFeatures = [ feature ];
}
''
if [[ -e /${feature}-files ]]; then
touch $out
else
echo "The host declares ${feature} support, but doesn't expose /${feature}-files" >&2
echo "Do we fail to parse __structuredAttrs=true derivations?" >&2
fi
''