add Nix flake development environment
This commit is contained in:
parent
ce3f303ab8
commit
6beabe7e88
3 changed files with 84 additions and 0 deletions
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
sandbox/
|
||||||
27
flake.lock
generated
Normal file
27
flake.lock
generated
Normal file
|
|
@ -0,0 +1,27 @@
|
||||||
|
{
|
||||||
|
"nodes": {
|
||||||
|
"nixpkgs": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1757810152,
|
||||||
|
"narHash": "sha256-Vp9K5ol6h0J90jG7Rm4RWZsCB3x7v5VPx588TQ1dkfs=",
|
||||||
|
"owner": "NixOS",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "9a094440e02a699be5c57453a092a8baf569bdad",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "NixOS",
|
||||||
|
"ref": "nixos-25.05",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": "nixpkgs"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": "root",
|
||||||
|
"version": 7
|
||||||
|
}
|
||||||
56
flake.nix
Normal file
56
flake.nix
Normal file
|
|
@ -0,0 +1,56 @@
|
||||||
|
{
|
||||||
|
description = "devshell-dorne";
|
||||||
|
|
||||||
|
inputs = {
|
||||||
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.05";
|
||||||
|
};
|
||||||
|
|
||||||
|
outputs = inputs @ {
|
||||||
|
self,
|
||||||
|
nixpkgs,
|
||||||
|
}: let
|
||||||
|
defaultSystems = ["aarch64-darwin" "aarch64-linux" "i686-linux" "x86_64-darwin" "x86_64-linux"];
|
||||||
|
|
||||||
|
forAllSystems = f:
|
||||||
|
nixpkgs.lib.genAttrs defaultSystems (system:
|
||||||
|
f system (import nixpkgs {
|
||||||
|
inherit system;
|
||||||
|
overlays = builtins.attrValues self.overlays;
|
||||||
|
}));
|
||||||
|
in {
|
||||||
|
overlays.default = final: prev: {
|
||||||
|
};
|
||||||
|
|
||||||
|
devShells = forAllSystems (
|
||||||
|
system: pkgs: {
|
||||||
|
default = pkgs.mkShell {
|
||||||
|
packages = with pkgs; [
|
||||||
|
gnumake
|
||||||
|
|
||||||
|
# C Compiler & Runtime
|
||||||
|
gcc
|
||||||
|
glibc.dev
|
||||||
|
# C Development Tooling
|
||||||
|
clang-tools
|
||||||
|
bear # clang compile_commands.json
|
||||||
|
valgrind # memory debugging+profiling
|
||||||
|
|
||||||
|
# .NET Compiler & Runtime
|
||||||
|
(with dotnetCorePackages;
|
||||||
|
combinePackages [
|
||||||
|
sdk_9_0
|
||||||
|
runtime_9_0
|
||||||
|
])
|
||||||
|
# .NET Development Tooling
|
||||||
|
ilspycmd
|
||||||
|
];
|
||||||
|
|
||||||
|
shell = "${pkgs.bash}/bin/bash";
|
||||||
|
|
||||||
|
# so I can easily read the glibc header files
|
||||||
|
GLIBC = "${pkgs.glibc.dev}/include";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
);
|
||||||
|
};
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue