-
-
Notifications
You must be signed in to change notification settings - Fork 24
Expand file tree
/
Copy pathflake.nix
More file actions
132 lines (117 loc) · 2.92 KB
/
flake.nix
File metadata and controls
132 lines (117 loc) · 2.92 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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
{
description = "A WIP Smithay-based Wayland compositor, inspired by AwesomeWM and configured in Lua or Rust";
inputs = {
# we require rustc >=1.88
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
fenix = {
url = "github:nix-community/fenix";
inputs.nixpkgs.follows = "nixpkgs";
};
flake-utils.url = "github:numtide/flake-utils";
};
outputs =
{
nixpkgs,
flake-utils,
fenix,
...
}:
(flake-utils.lib.eachSystem [ "x86_64-linux" "aarch64-linux" ] (
system:
let
pkgs = import nixpkgs {
inherit system;
overlays = [
(final: prev: {
pinnacle = prev.callPackage ./nix/packages/default.nix { };
})
];
};
fenixPkgs = fenix.packages.${system};
toolchain = fenixPkgs.stable;
combinedToolchain = toolchain.completeToolchain;
in
{
formatter = pkgs.nixfmt;
lib = {
inherit (pkgs.pinnacle) buildRustConfig;
};
packages = {
inherit (pkgs) pinnacle;
default = pkgs.pinnacle;
};
devShell = pkgs.mkShell {
nativeBuildInputs = [
pkgs.pkg-config
pkgs.pinnacle.luaEnv
pkgs.libgbm
];
buildInputs = with pkgs; [
# rust devel tools
combinedToolchain
rust-analyzer
cargo-outdated
clang
# wlcs
(writeScriptBin "wlcs" ''
#!/bin/sh
${wlcs}/libexec/wlcs/wlcs "$@"
'')
wayland
# build time stuff
protobuf
lua54Packages.luarocks
lua5_4
# libs
seatd
systemdLibs.dev
libxkbcommon
libinput
mesa
xwayland
libdisplay-info
libgbm
# winit on x11
libxcursor
libxrandr
libxi
libx11
alacritty
];
runtimeDependencies = with pkgs; [
wayland
mesa
libglvnd # libEGL
libgbm
];
NIX_LD_LIBRARY_PATH = "${pkgs.lib.makeLibraryPath (
with pkgs;
[
wayland
lua5_4
libinput
libxkbcommon
libdisplay-info
seatd
libgbm
udev
]
)}";
shellHook = ''
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$NIX_LD_LIBRARY_PATH"
'';
};
}
))
// {
overlays.default = final: prev: {
pinnacle = prev.callPackage ./nix/packages/default.nix { };
};
nixosModules = {
default = import ./nix/modules/nixos;
};
hmModules = {
default = import ./nix/modules/home-manager;
};
};
}