flake: add devShells, including a clang one for clang-tidy & more

This commit is contained in:
Pierre Bourdon 2024-08-26 20:21:36 +02:00
parent ab6d81fad4
commit 21fd1f8993
Signed by: delroth
GPG key ID: 6FB80DCD84DA0F1C

View file

@ -73,6 +73,21 @@
default = pkgsBySystem.${system}.hydra;
});
devShells = forEachSystem (system: let
pkgs = pkgsBySystem.${system};
lib = pkgs.lib;
mkDevShell = stdenv: (pkgs.mkShell.override { inherit stdenv; }) {
inputsFrom = [ (self.packages.${system}.default.override { inherit stdenv; }) ];
packages =
lib.optional (stdenv.cc.isClang && stdenv.hostPlatform == stdenv.buildPlatform) pkgs.clang-tools;
};
in {
default = mkDevShell pkgs.stdenv;
clang = mkDevShell pkgs.clangStdenv;
});
nixosModules = import ./nixos-modules {
overlays = overlayList;
};