Add c++ shell

This commit is contained in:
2026-02-24 23:10:33 +01:00
commit 4df4c00350
2 changed files with 53 additions and 0 deletions

27
cpp/flake.lock generated Normal file
View File

@@ -0,0 +1,27 @@
{
"nodes": {
"nixpkgs": {
"locked": {
"lastModified": 1771932323,
"narHash": "sha256-3PadsTzuMJT/x0KmiD/Me1GG6rW8kaHoWVduSs0ue7o=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "89bb5c5da7a857869cc88ef9b856bffdff8af264",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable-small",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"nixpkgs": "nixpkgs"
}
}
},
"root": "root",
"version": 7
}

26
cpp/flake.nix Normal file
View File

@@ -0,0 +1,26 @@
{
description = "Central C++ Dev Shell";
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable-small";
outputs = { self, nixpkgs }:
let
system = "x86_64-linux";
pkgs = nixpkgs.legacyPackages.${system};
in {
devShells.${system}.default = pkgs.mkShell {
nativeBuildInputs = with pkgs; [
gcc
cmake
ninja
gdb
pkg-config
];
buildInputs = with pkgs; [
];
shellHook = ''
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH
'';
};
};
}