mirror of
https://github.com/JaxTheWolf/nix-shells.git
synced 2026-03-31 21:20:23 +02:00
Add c++ shell
This commit is contained in:
27
cpp/flake.lock
generated
Normal file
27
cpp/flake.lock
generated
Normal 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
26
cpp/flake.nix
Normal 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
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user