-
Notifications
You must be signed in to change notification settings - Fork 0
/
flake.nix
71 lines (61 loc) · 1.76 KB
/
flake.nix
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
{
description = "The Kilo minimal text editor";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/master";
utils.url = "github:numtide/flake-utils";
utils.inputs.nixpkgs.follows = "nixpkgs";
};
outputs =
{ self, nixpkgs, ... }@inputs:
inputs.utils.lib.eachSystem
[
"x86_64-linux"
"i686-linux"
"aarch64-linux"
"x86_64-darwin"
]
(
system:
let
pkgs = import nixpkgs { inherit system; };
llvm = pkgs.llvmPackages_18;
lib = nixpkgs.lib;
in
{
devShell = pkgs.mkShell rec {
name = "kilo";
packages = with pkgs; [ ];
nativeBuildInputs = with pkgs; [
# Development Tools
cmake
cmakeCurses
boost
catch2_3
gcc
# Development time dependencies
gtest
socat
];
buildInputs = with pkgs; [
# stdlib for cpp
# llvm.libcxx
];
# CXXFLAGS = "-std=c++20";
# CPATH = builtins.concatStringsSep ":" [
# (lib.makeSearchPathOutput "dev" "include" [ llvm.libcxx ])
# (lib.makeSearchPath "resource-root/include" [ llvm.clang ])
# ];
# Setting up the environment variables you need during
# development.
shellHook =
let
icon = "f121";
in
''
export PS1="$(echo -e '\u${icon}') {\[$(tput sgr0)\]\[\033[38;5;228m\]\w\[$(tput sgr0)\]\[\033[38;5;15m\]} (${name}) \\$ \[$(tput sgr0)\]"
export SHELL="${pkgs.zsh}/bin/zsh"
'';
};
}
);
}