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:
|
2024-08-18 12:10:39 +02:00
|
|
|
# stdenv = pkgs.clangStdenv;
|
2024-08-18 11:55:13 +02:00
|
|
|
}
|
|
|
|
{
|
|
|
|
packages = with pkgs; [
|
2024-08-18 12:10:39 +02:00
|
|
|
glibc
|
|
|
|
nix-env
|
2024-08-18 11:55:13 +02:00
|
|
|
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
|
|
|
|