-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathflake.nix
More file actions
98 lines (89 loc) · 2.7 KB
/
Copy pathflake.nix
File metadata and controls
98 lines (89 loc) · 2.7 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
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
flakelight.url = "github:nix-community/flakelight";
};
outputs = {flakelight, ...} @ inputs: let
commonPackages = pkgs:
with pkgs; [
((wlroots_0_20.overrideAttrs {
version = "0.21.0";
src = let
rev = "a94cd29eb13fc2fb68f2fe2d053fef29fb6ae712";
in
pkgs.fetchFromGitLab {
domain = "gitlab.freedesktop.org";
owner = "wlroots";
repo = "wlroots";
inherit rev;
hash = "sha256-4CSASFBiQFjTHw/73sKKqKLcVYOaRBxaNT7bBAaxHVM=";
};
}).override {enableXWayland = true;})
wayland
libxcb-wm
wayland-protocols
libxkbcommon
libinput
pixman
libxcb
libGL
cairo
pango.dev
wayland-scanner
vulkan-loader
shaderc.dev
# include <drm_fourcc.h>
libdrm.dev
];
makeDoors = pkgs:
pkgs.stdenv.mkDerivation {
pname = "doors";
version = "0.0.0";
src = ./.;
nativeBuildInputs = with pkgs; [
pkg-config
meson
ninja
perl
];
NIX_CFLAGS_COMPILE = "-I${pkgs.libdrm.dev}/include/libdrm";
buildInputs = commonPackages pkgs;
patchPhase = ''
# it needs to be an executable to make patchShebangs run
chmod +x src/shaders/embed.pl
patchShebangs src/shaders/embed.pl
# this should be handled by package maintainer not your buildscript D:
substituteInPlace meson.build \
--replace-fail "/usr/share/wayland-sessions" "${placeholder "out"}/share/wayland-sessions"
'';
passthru.providedSessions = ["doors"];
meta = {
description = "Wayland compositor based on bswpm, with floating, tiling and scrolling layouts.";
homepage = "https://github.com/dy-tea/doors";
license = pkgs.lib.licenses.gpl3;
maintainers = ["anispwyn"];
};
};
in
flakelight ./. {
inherit inputs;
systems = ["x86_64-linux"];
packages = rec {
default = {pkgs, ...}: makeDoors pkgs;
doors = default;
doorsctl = {pkgs, ...}:
(makeDoors pkgs).overrideAttrs (oldAttrs: {
pname = "doorsctl";
postInstall = ''
find $out -type f -not -name doorsctl -delete
find $out -type d -empty -delete
'';
meta =
oldAttrs.meta
// {
description = "Control client for the doors Wayland compositor";
};
});
};
};
}