feat: add day 5
This commit is contained in:
58
day5/flake.nix
Normal file
58
day5/flake.nix
Normal 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";
|
||||
};
|
||||
}
|
||||
);
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user