first three days

This commit is contained in:
Alessio Molinari
2025-12-03 23:29:17 +01:00
commit ba07ab68f3
19 changed files with 669 additions and 0 deletions

58
day3/flake.nix Normal file
View File

@@ -0,0 +1,58 @@
{
description = "A Nix-flake-based C/C++ development environment";
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
outputs =
{ self, nixpkgs }:
let
supportedSystems = [
"x86_64-linux"
"aarch64-linux"
"x86_64-darwin"
"aarch64-darwin"
];
forEachSupportedSystem =
f:
nixpkgs.lib.genAttrs supportedSystems (
system:
f {
pkgs = import nixpkgs { inherit system; };
}
);
in
{
devShells = forEachSupportedSystem (
{ pkgs }:
{
default =
pkgs.mkShell.override
{
# Override stdenv in order to change compiler:
# stdenv = pkgs.clangStdenv;
}
{
nativeBuildInputs = with pkgs; [
pkg-config
];
packages =
with pkgs;
[
clang-tools
cmake
codespell
cppcheck
doxygen
gtest
lcov
nodejs
vscode-extensions.vadimcn.vscode-lldb
]
++ (if system == "aarch64-darwin" then [ ] else [ gdb ]);
CODELLDB_PATH = "${pkgs.vscode-extensions.vadimcn.vscode-lldb}/share/vscode/extensions/vadimcn.vscode-lldb/adapter/codelldb";
};
}
);
};
}