From 797e260e3a322937bd31f94d166beafc283f6ed7 Mon Sep 17 00:00:00 2001 From: regnat Date: Tue, 13 Jul 2021 17:23:29 +0200 Subject: [PATCH] Make `nix flake check` aware of `devShells` --- src/nix/flake-check.md | 1 + src/nix/flake.cc | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/nix/flake-check.md b/src/nix/flake-check.md index 8ef932954..d995d6274 100644 --- a/src/nix/flake-check.md +++ b/src/nix/flake-check.md @@ -33,6 +33,7 @@ The following flake output attributes must be derivations: * `checks.`*system*`.`*name* * `defaultPackage.`*system*` * `devShell.`*system*` +* `devShells.`*system*`.`*name*` * `nixosConfigurations.`*name*`.config.system.build.toplevel * `packages.`*system*`.`*name* diff --git a/src/nix/flake.cc b/src/nix/flake.cc index ce82eb8e8..23feed24b 100644 --- a/src/nix/flake.cc +++ b/src/nix/flake.cc @@ -486,7 +486,7 @@ struct CmdFlakeCheck : FlakeCommand } } - else if (name == "packages") { + else if (name == "packages" || name == "devShells") { state->forceAttrs(vOutput, pos); for (auto & attr : *vOutput.attrs) { checkSystemName(attr.name, *attr.pos);