devshell: remove dependency on clan-cli
This stops the devshell from being re-built constantly, when the source code changes. Based on a new feature in treefmt-nix: https://github.com/numtide/treefmt-nix/pull/208
This commit is contained in:
22
checks/devshell/flake-module.nix
Normal file
22
checks/devshell/flake-module.nix
Normal file
@@ -0,0 +1,22 @@
|
||||
{ ... }:
|
||||
{
|
||||
perSystem =
|
||||
{ self', pkgs, ... }:
|
||||
{
|
||||
checks.devshell =
|
||||
pkgs.runCommand "check-devshell-not-depends-on-clan-cli"
|
||||
{
|
||||
exportReferencesGraph = [
|
||||
"graph"
|
||||
self'.devShells.default
|
||||
];
|
||||
}
|
||||
''
|
||||
if grep -q "${self'.packages.clan-cli}" ./graph; then
|
||||
echo "devshell depends on clan-cli, which is not allowed";
|
||||
exit 1;
|
||||
fi
|
||||
mkdir $out
|
||||
'';
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user