scheme/tortoise/flake.nix

38 lines
978 B
Nix
Raw Normal View History

2024-08-18 09:35:26 +02:00
{
2024-08-18 11:55:13 +02:00
description = "A Nix-flake-based C/C++ development environment";
2024-08-18 09:35:26 +02:00
inputs.nixpkgs.url = "https://flakehub.com/f/NixOS/nixpkgs/0.1.*.tar.gz";
outputs = { self, nixpkgs }:
let
2024-08-18 11:55:13 +02:00
supportedSystems = [ "x86_64-linux" ];
forEachSupportedSystem = f: nixpkgs.lib.genAttrs supportedSystems (system: f {
pkgs = import nixpkgs { inherit system; };
});
in
{
2024-08-18 09:35:26 +02:00
devShells = forEachSupportedSystem ({ pkgs }: {
2024-08-18 11:55:13 +02:00
default = pkgs.mkShell.override
{
# Override stdenv in order to change compiler:
stdenv = pkgs.clangStdenv;
}
{
packages = with pkgs; [
clang-tools
cmake
codespell
conan
cppcheck
doxygen
gtest
lcov
vcpkg
vcpkg-tool
] ++ (if system == "aarch64-darwin" then [ ] else [ gdb ]);
};
2024-08-18 09:35:26 +02:00
});
};
}
2024-08-18 11:55:13 +02:00