maomaowm/nix/default.nix

87 lines
1.5 KiB
Nix
Raw Normal View History

2025-02-25 22:05:29 +08:00
{
lib,
fetchFromGitHub,
2025-02-25 22:05:29 +08:00
libX11,
libinput,
libxcb,
libxkbcommon,
2025-06-03 18:47:35 +08:00
pcre2,
2025-02-25 22:05:29 +08:00
pixman,
pkg-config,
stdenv,
wayland,
wayland-protocols,
wayland-scanner,
xcbutilwm,
xwayland,
enableXWayland ? true,
meson,
ninja,
2025-04-13 09:05:09 +08:00
mmsg,
2025-06-25 00:03:25 +08:00
scenefx,
wlroots_0_19,
libGL,
}: let
2025-07-30 14:54:59 +08:00
pname = "mango";
# Use patched wlroots from github.com/DreamMaoMao/wlroots
2025-06-25 00:03:25 +08:00
wlroots-git = wlroots_0_19.overrideAttrs (
final: prev: {
src = fetchFromGitHub {
owner = "DreamMaoMao";
repo = "wlroots";
rev = "afbb5b7c2b14152730b57aa11119b1b16a299d5b";
sha256 = "sha256-pVU+CuiqvduMTpsnDHX/+EWY2qxHX2lXKiVzdGtcnYY=";
};
}
);
2025-02-25 22:05:29 +08:00
in
stdenv.mkDerivation {
inherit pname;
version = "nightly";
2025-02-25 22:05:29 +08:00
src = builtins.path {
path = ../.;
name = "source";
};
2025-02-25 22:05:29 +08:00
nativeBuildInputs = [
meson
ninja
pkg-config
wayland-scanner
2025-02-25 22:05:29 +08:00
];
buildInputs =
[
libinput
libxcb
libxkbcommon
pcre2
pixman
wayland
wayland-protocols
wlroots-git
scenefx
2025-06-25 00:03:25 +08:00
libGL
]
++ lib.optionals enableXWayland [
libX11
xcbutilwm
xwayland
];
passthru = {
2025-07-30 14:54:59 +08:00
providedSessions = ["mango"];
inherit mmsg;
};
2025-03-24 10:55:11 +08:00
meta = {
2025-07-30 14:54:59 +08:00
mainProgram = "mango";
description = "A streamlined but feature-rich Wayland compositor";
2025-07-30 14:54:59 +08:00
homepage = "https://github.com/DreamMaoMao/mango";
2025-06-25 17:40:50 +03:00
license = lib.licenses.gpl3Plus;
maintainers = [];
platforms = lib.platforms.unix;
};
}