forked from HumbleUI/JWM
-
Notifications
You must be signed in to change notification settings - Fork 0
/
flake.nix
66 lines (56 loc) · 1.58 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
let
name = "JWM";
description = "Cross-platform window management and OS integration library for Java";
in
{
inherit name description;
inputs = {
nixpkgs.url = github:nixos/nixpkgs/release-22.05;
flake-utils.url = github:numtide/flake-utils;
# Used for shell.nix
flake-compat = {
url = github:edolstra/flake-compat;
flake = false;
};
};
outputs = {self, nixpkgs, flake-utils, ...} @ inputs:
flake-utils.lib.eachDefaultSystem (
system: let
pkgs = import nixpkgs {inherit system;};
xDependencies = with pkgs; with xorg; [
xorgserver
# development lib
libX11
# xorg input modules
xf86inputevdev
xf86inputsynaptics
xf86inputlibinput
# dyn libs
libXrandr
libXcursor
libXi
];
waylandDependencies = with pkgs; [
wayland
];
in rec {
devShells.default = pkgs.mkShell {
inherit name description;
nativeBuildInputs = with pkgs; [
jdk17
] ++ xDependencies ++ waylandDependencies;
buildInputs = with pkgs; [
python3
libGL
ninja
cmake
gcc
];
CMAKE_MAKE_PROGRAM = pkgs.ninja;
LD_LIBRARY_PATH = "${pkgs.lib.makeLibraryPath (with pkgs; [ libGL ] ++ xDependencies ++ waylandDependencies)}:$LD_LIBRARY_PATH";
};
# For compatibility with older versions of the `nix` binary
devShell = self.devShells.${system}.default;
}
);
}