-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflake.nix
56 lines (49 loc) · 1.31 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
{
inputs = {
flake-utils.url = "github:numtide/flake-utils";
nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.11";
};
outputs = { self, nixpkgs, flake-utils }:
flake-utils.lib.eachSystem [ "x86_64-linux" ] (system:
let
pkgs = nixpkgs.legacyPackages.${system};
in
rec {
devShell = with pkgs; mkShell {
hardeningDisable = [ "all" ];
inputsFrom = [ packages.waffle ];
packages = [
python311Packages.compiledb
ltrace
man
man-pages
mesa
valgrind
];
};
formatter = pkgs.nixpkgs-fmt;
packages = rec {
default = waffle;
waffle = pkgs.stdenv.mkDerivation rec {
name = "waffle";
src = ./.;
hardeningDisable = [ "format" "fortify" ];
buildInputs = with pkgs; let
xlibraries = with xorg; [
libX11
libXft
libXfont
libXcursor
];
in
[ gnumake ] ++ xlibraries;
installPhase = ''
runHook preInstall
mkdir -p $out/bin
cp ${name} $out/bin/${name}
runHook postInstall
'';
};
};
});
}