mirror of
https://github.com/DreamMaoMao/maomaowm.git
synced 2026-05-03 06:46:38 -04:00
fix: use wlroots_0_19 for nix package
This commit is contained in:
parent
678517ed45
commit
45c2fb9495
3 changed files with 144 additions and 5 deletions
6
flake.lock
generated
6
flake.lock
generated
|
|
@ -59,11 +59,11 @@
|
||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1740019556,
|
"lastModified": 1742800061,
|
||||||
"narHash": "sha256-vn285HxnnlHLWnv59Og7muqECNMS33mWLM14soFIv2g=",
|
"narHash": "sha256-oDJGK1UMArK52vcW9S5S2apeec4rbfNELgc50LqiPNs=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "dad564433178067be1fbdfcce23b546254b6d641",
|
"rev": "1750f3c1c89488e2ffdd47cab9d05454dddfb734",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
|
||||||
|
|
@ -10,15 +10,16 @@
|
||||||
wayland,
|
wayland,
|
||||||
wayland-protocols,
|
wayland-protocols,
|
||||||
wayland-scanner,
|
wayland-scanner,
|
||||||
wlroots_0_17,
|
|
||||||
xcbutilwm,
|
xcbutilwm,
|
||||||
xwayland,
|
xwayland,
|
||||||
enableXWayland ? true,
|
enableXWayland ? true,
|
||||||
meson,
|
meson,
|
||||||
ninja,
|
ninja,
|
||||||
|
callPackage,
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
pname = "maomaowm";
|
pname = "maomaowm";
|
||||||
|
wlroots_0_19 = callPackage ./wlroots_0_19.nix { };
|
||||||
in
|
in
|
||||||
stdenv.mkDerivation {
|
stdenv.mkDerivation {
|
||||||
inherit pname;
|
inherit pname;
|
||||||
|
|
@ -41,7 +42,7 @@ stdenv.mkDerivation {
|
||||||
pixman
|
pixman
|
||||||
wayland
|
wayland
|
||||||
wayland-protocols
|
wayland-protocols
|
||||||
wlroots_0_17
|
wlroots_0_19
|
||||||
]
|
]
|
||||||
++ lib.optionals enableXWayland [
|
++ lib.optionals enableXWayland [
|
||||||
libX11
|
libX11
|
||||||
|
|
|
||||||
138
nix/wlroots_0_19.nix
Normal file
138
nix/wlroots_0_19.nix
Normal file
|
|
@ -0,0 +1,138 @@
|
||||||
|
{
|
||||||
|
lib,
|
||||||
|
stdenv,
|
||||||
|
fetchFromGitLab,
|
||||||
|
meson,
|
||||||
|
ninja,
|
||||||
|
pkg-config,
|
||||||
|
wayland-scanner,
|
||||||
|
libGL,
|
||||||
|
wayland,
|
||||||
|
wayland-protocols,
|
||||||
|
libinput,
|
||||||
|
libxkbcommon,
|
||||||
|
pixman,
|
||||||
|
libcap,
|
||||||
|
libgbm,
|
||||||
|
xorg,
|
||||||
|
libpng,
|
||||||
|
ffmpeg,
|
||||||
|
hwdata,
|
||||||
|
seatd,
|
||||||
|
vulkan-loader,
|
||||||
|
glslang,
|
||||||
|
libliftoff,
|
||||||
|
libdisplay-info,
|
||||||
|
lcms2,
|
||||||
|
nixosTests,
|
||||||
|
testers,
|
||||||
|
cmake,
|
||||||
|
|
||||||
|
enableXWayland ? true,
|
||||||
|
xwayland ? null,
|
||||||
|
}:
|
||||||
|
|
||||||
|
stdenv.mkDerivation (finalAttrs: {
|
||||||
|
pname = "wlroots";
|
||||||
|
version = "master";
|
||||||
|
|
||||||
|
inherit enableXWayland;
|
||||||
|
|
||||||
|
src = fetchFromGitLab {
|
||||||
|
domain = "gitlab.freedesktop.org";
|
||||||
|
owner = "wlroots";
|
||||||
|
repo = "wlroots";
|
||||||
|
rev = "99da6ccc87c2439b19c9298df6b72b29bbab89bb";
|
||||||
|
hash = "sha256-mIRUDyZYLrrxTfGq+vlLvgx3wwCbX4ogHESavCZr3TU=";
|
||||||
|
};
|
||||||
|
|
||||||
|
# $out for the library and $examples for the example programs (in examples):
|
||||||
|
outputs = [
|
||||||
|
"out"
|
||||||
|
"examples"
|
||||||
|
];
|
||||||
|
|
||||||
|
strictDeps = true;
|
||||||
|
depsBuildBuild = [
|
||||||
|
pkg-config
|
||||||
|
];
|
||||||
|
|
||||||
|
nativeBuildInputs = [
|
||||||
|
meson
|
||||||
|
ninja
|
||||||
|
pkg-config
|
||||||
|
cmake
|
||||||
|
wayland-scanner
|
||||||
|
glslang
|
||||||
|
hwdata
|
||||||
|
];
|
||||||
|
|
||||||
|
buildInputs = [
|
||||||
|
ffmpeg
|
||||||
|
libliftoff
|
||||||
|
libdisplay-info
|
||||||
|
libGL
|
||||||
|
libcap
|
||||||
|
libinput
|
||||||
|
libpng
|
||||||
|
libxkbcommon
|
||||||
|
libgbm
|
||||||
|
pixman
|
||||||
|
seatd
|
||||||
|
vulkan-loader
|
||||||
|
wayland
|
||||||
|
wayland-protocols
|
||||||
|
xorg.libX11
|
||||||
|
xorg.xcbutilerrors
|
||||||
|
xorg.xcbutilimage
|
||||||
|
xorg.xcbutilrenderutil
|
||||||
|
xorg.xcbutilwm
|
||||||
|
lcms2
|
||||||
|
] ++ lib.optional finalAttrs.enableXWayland xwayland;
|
||||||
|
|
||||||
|
mesonFlags = lib.optional (!finalAttrs.enableXWayland) "-Dxwayland=disabled";
|
||||||
|
|
||||||
|
postFixup = ''
|
||||||
|
# Install ALL example programs to $examples:
|
||||||
|
# screencopy dmabuf-capture input-inhibitor layer-shell idle-inhibit idle
|
||||||
|
# screenshot output-layout multi-pointer rotation tablet touch pointer
|
||||||
|
# simple
|
||||||
|
mkdir -p $examples/bin
|
||||||
|
cd ./examples
|
||||||
|
for binary in $(find . -executable -type f -printf '%P\n' | grep -vE '\.so'); do
|
||||||
|
cp "$binary" "$examples/bin/wlroots-$binary"
|
||||||
|
done
|
||||||
|
'';
|
||||||
|
|
||||||
|
# Test via TinyWL (the "minimum viable product" Wayland compositor based on wlroots):
|
||||||
|
passthru.tests = {
|
||||||
|
tinywl = nixosTests.tinywl;
|
||||||
|
pkg-config = testers.hasPkgConfigModules {
|
||||||
|
package = finalAttrs.finalPackage;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
meta = {
|
||||||
|
description = "Modular Wayland compositor library";
|
||||||
|
longDescription = ''
|
||||||
|
Pluggable, composable, unopinionated modules for building a Wayland
|
||||||
|
compositor; or about 50,000 lines of code you were going to write anyway.
|
||||||
|
'';
|
||||||
|
inherit (finalAttrs.src.meta) homepage;
|
||||||
|
license = lib.licenses.mit;
|
||||||
|
platforms = lib.platforms.linux;
|
||||||
|
maintainers = with lib.maintainers; [
|
||||||
|
primeos
|
||||||
|
synthetica
|
||||||
|
rewine
|
||||||
|
];
|
||||||
|
pkgConfigModules = [
|
||||||
|
(
|
||||||
|
if lib.versionOlder finalAttrs.version "0.18" then
|
||||||
|
"wlroots"
|
||||||
|
else
|
||||||
|
"wlroots-${lib.versions.majorMinor finalAttrs.version}"
|
||||||
|
)
|
||||||
|
];
|
||||||
|
};
|
||||||
|
})
|
||||||
Loading…
Add table
Add a link
Reference in a new issue