add flake support
This change is fully backwards compatible. We continue to use the standard non-flake evaluation mode in our examples and internal tooling until the flakes design has stabilized. 'clightning-plugins = pkgs.recurseIntoAttrs' in pkgs/default.nix is needed by flake-utils.lib.flattenTree in flake.nix. It transforms the packages in `clightning-plugins` to top-level packages named like `clightning-plugins/summary`. (The flake attr `packages` must be a non-nested attrset of derivations.)
This commit is contained in:
@@ -281,9 +281,18 @@ examples() {
|
||||
(cd "$scriptDir/../examples" && nix-shell --run "$script")
|
||||
}
|
||||
|
||||
flake() {
|
||||
if [[ $(nix flake 2>&1) != *"requires a sub-command"* ]]; then
|
||||
echo "Skipping flake test. Nix flake support is not enabled."
|
||||
else
|
||||
nix flake check "$scriptDir/.."
|
||||
fi
|
||||
}
|
||||
|
||||
all() {
|
||||
buildable
|
||||
examples
|
||||
flake
|
||||
}
|
||||
|
||||
# An alias for buildTest
|
||||
|
||||
Reference in New Issue
Block a user