-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathflake.nix
More file actions
35 lines (32 loc) · 848 Bytes
/
flake.nix
File metadata and controls
35 lines (32 loc) · 848 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
{
description = "Minimal C development environment with gcc";
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
outputs =
{
self,
nixpkgs,
}:
let
system = "x86_64-linux"; # adjust for your system
pkgs = import nixpkgs { inherit system; };
in
{
devShells.${system}.default = pkgs.mkShell {
name = "c-dev-shell";
# buildInputs = with pkgs; [ bashInteractive ];
packages = with pkgs; [
gcc
gnumake # optional, but usually needed
gdb # optional, for debugging
clang-tools
valgrind
];
shellHook = # bash
''
export SHELL=/run/current-system/sw/bin/bash
alias ec='emacsclient -c'
echo "C dev environment ready to use"
'';
};
};
}