-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathflake.nix
More file actions
105 lines (89 loc) · 2.31 KB
/
flake.nix
File metadata and controls
105 lines (89 loc) · 2.31 KB
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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
};
outputs =
{
self,
nixpkgs,
flake-utils,
}:
flake-utils.lib.eachDefaultSystem (
system:
let
pkgs = import nixpkgs { inherit system; };
norminette = pkgs.callPackage ./pkgs/norminette.nix { };
c_formatter_42 = pkgs.callPackage ./pkgs/c_formatter_42.nix { };
mlxDependencies = pkgs.callPackage ./pkgs/mlx-deps.nix { };
in
{
packages = {
norminette = norminette;
c_formatter_42 = c_formatter_42;
};
apps = {
norminette = {
type = "app";
program = "${norminette}/bin/norminette";
};
c_formatter_42 = {
type = "app";
program = "${c_formatter_42}/bin/c_formatter_42";
};
};
devShells.default = pkgs.mkShell {
name = "42";
packages = [
pkgs.inotify-tools
pkgs.bear
pkgs.git
pkgs.gcc
pkgs.gnumake
pkgs.valgrind-light
pkgs.libbsd
pkgs.man-pages
pkgs.man-pages-posix
# Required by Minishell
pkgs.readline
norminette
c_formatter_42
# Fix a weird escaping issue when running bash
# see https://github.com/NixOS/nixpkgs/issues/59209
pkgs.bashInteractive
# mlxDependencies
];
nativeBuildInputs = with pkgs; [
# X11 core libraries
libx11
libxext
libxpm
libxrandr
libxrender
libxinerama
libxcursor
libxi
libxfixes
# Additional X11 utilities
xorgproto
libxcb
# Graphics libraries
mesa
libGL
libGLU
glfw
glew
# Compression and utilities
zlib
libbsd
# Build tools
pkg-config
gnumake
cmake
];
# Nix have more warnings than 42, this will disable them
NIX_CFLAGS_COMPILE = "-U_FORTIFY_SOURCE";
};
}
);
}