2025-01-14 20:02:14 +08:00
|
|
|
{
|
|
|
|
|
stdenv,
|
|
|
|
|
lib,
|
|
|
|
|
nix-filter,
|
|
|
|
|
cmake,
|
2025-06-25 15:38:42 +08:00
|
|
|
ninja,
|
2025-01-14 20:02:14 +08:00
|
|
|
extra-cmake-modules,
|
|
|
|
|
pkg-config,
|
|
|
|
|
wayland-scanner,
|
|
|
|
|
qttools,
|
|
|
|
|
wrapQtAppsHook,
|
|
|
|
|
qtbase,
|
2025-02-11 17:46:09 +08:00
|
|
|
qtdeclarative,
|
2025-01-14 20:02:14 +08:00
|
|
|
qtimageformats,
|
|
|
|
|
qtwayland,
|
|
|
|
|
qtsvg,
|
|
|
|
|
ddm,
|
|
|
|
|
deepin,
|
|
|
|
|
wayland,
|
|
|
|
|
wayland-protocols,
|
|
|
|
|
wlr-protocols,
|
2025-07-23 16:47:04 +08:00
|
|
|
wlroots_0_19,
|
2025-01-14 20:02:14 +08:00
|
|
|
treeland-protocols,
|
|
|
|
|
pixman,
|
|
|
|
|
pam,
|
|
|
|
|
libxcrypt,
|
|
|
|
|
libinput,
|
|
|
|
|
nixos-artwork,
|
2025-07-24 19:24:42 +08:00
|
|
|
qwlroots,
|
|
|
|
|
waylib,
|
2023-11-07 14:50:12 +08:00
|
|
|
}:
|
|
|
|
|
|
2024-01-24 17:38:41 +08:00
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
2023-11-07 14:50:12 +08:00
|
|
|
pname = "treeland";
|
2025-07-23 16:47:04 +08:00
|
|
|
version = "0.5-unstable";
|
2023-11-07 14:50:12 +08:00
|
|
|
|
2025-07-24 19:24:42 +08:00
|
|
|
src = nix-filter.lib.filter {
|
2023-11-07 14:50:12 +08:00
|
|
|
root = ./..;
|
|
|
|
|
|
|
|
|
|
exclude = [
|
|
|
|
|
".git"
|
|
|
|
|
"debian"
|
|
|
|
|
"LICENSES"
|
|
|
|
|
"README.md"
|
|
|
|
|
"README.zh_CN.md"
|
2025-07-24 19:24:42 +08:00
|
|
|
(nix-filter.lib.matchExt "nix")
|
2023-11-07 14:50:12 +08:00
|
|
|
];
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
postPatch = ''
|
2024-02-06 18:08:46 +08:00
|
|
|
for file in $(grep -rl "/usr/share/wallpapers/deepin/desktop.jpg")
|
2024-01-02 17:16:12 +08:00
|
|
|
do
|
|
|
|
|
substituteInPlace $file \
|
2024-02-06 18:08:46 +08:00
|
|
|
--replace-fail "/usr/share/wallpapers/deepin/desktop.jpg" \
|
2023-11-07 14:50:12 +08:00
|
|
|
"${nixos-artwork.wallpapers.simple-blue}/share/backgrounds/nixos/nix-wallpaper-simple-blue.png"
|
2024-01-02 17:16:12 +08:00
|
|
|
done
|
2023-11-07 14:50:12 +08:00
|
|
|
'';
|
|
|
|
|
|
2025-07-23 16:47:04 +08:00
|
|
|
depsBuildBuild = [ pkg-config ];
|
|
|
|
|
|
2023-11-07 14:50:12 +08:00
|
|
|
nativeBuildInputs = [
|
|
|
|
|
cmake
|
2025-06-25 15:38:42 +08:00
|
|
|
ninja
|
2023-11-07 14:50:12 +08:00
|
|
|
extra-cmake-modules
|
|
|
|
|
pkg-config
|
|
|
|
|
wayland-scanner
|
|
|
|
|
qttools
|
|
|
|
|
wrapQtAppsHook
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
|
qtbase
|
2025-02-11 17:46:09 +08:00
|
|
|
qtdeclarative
|
2023-12-13 16:52:31 +08:00
|
|
|
qtimageformats
|
2023-11-07 14:50:12 +08:00
|
|
|
qtwayland
|
2024-01-24 17:38:41 +08:00
|
|
|
qtsvg
|
2024-05-09 18:28:02 +08:00
|
|
|
ddm
|
2025-09-08 16:41:07 +08:00
|
|
|
deepin.dtk6core
|
2024-05-09 18:28:02 +08:00
|
|
|
deepin.dtk6declarative
|
|
|
|
|
deepin.dtk6systemsettings
|
2023-11-07 14:50:12 +08:00
|
|
|
wayland
|
|
|
|
|
wayland-protocols
|
|
|
|
|
wlr-protocols
|
2024-11-05 14:35:43 +08:00
|
|
|
treeland-protocols
|
2025-07-23 16:47:04 +08:00
|
|
|
wlroots_0_19
|
2023-11-07 14:50:12 +08:00
|
|
|
pixman
|
|
|
|
|
pam
|
2024-01-02 17:16:12 +08:00
|
|
|
libxcrypt
|
2024-11-05 14:35:43 +08:00
|
|
|
libinput
|
2025-07-24 19:24:42 +08:00
|
|
|
qwlroots
|
|
|
|
|
waylib
|
2023-11-07 14:50:12 +08:00
|
|
|
];
|
|
|
|
|
|
2025-01-14 20:02:14 +08:00
|
|
|
cmakeFlags = [
|
2025-07-24 19:24:42 +08:00
|
|
|
(lib.cmakeFeature "QT_IMPORTS_DIR" "${placeholder "out"}/${qtbase.qtQmlPrefix}")
|
|
|
|
|
(lib.cmakeFeature "CMAKE_INSTALL_SYSCONFDIR" "${placeholder "out"}/etc")
|
|
|
|
|
(lib.cmakeFeature "SYSTEMD_SYSTEM_UNIT_DIR" "${placeholder "out"}/lib/systemd/system")
|
|
|
|
|
(lib.cmakeFeature "SYSTEMD_SYSUSERS_DIR" "${placeholder "out"}/lib/sysusers.d")
|
|
|
|
|
(lib.cmakeFeature "SYSTEMD_TMPFILES_DIR" "${placeholder "out"}/lib/tmpfiles.d")
|
|
|
|
|
(lib.cmakeFeature "DBUS_CONFIG_DIR" "${placeholder "out"}/share/dbus-1/system.d")
|
|
|
|
|
(lib.cmakeBool "WITH_SUBMODULE_WAYLIB" false)
|
2023-11-07 14:50:12 +08:00
|
|
|
];
|
|
|
|
|
|
2025-01-14 20:02:14 +08:00
|
|
|
env.PKG_CONFIG_SYSTEMD_SYSTEMDUSERUNITDIR = "${placeholder "out"}/lib/systemd/user";
|
|
|
|
|
|
|
|
|
|
# RPATH of binary /nix/store/.../bin/... contains a forbidden reference to /build/
|
|
|
|
|
noAuditTmpdir = true;
|
|
|
|
|
|
2024-01-24 17:38:41 +08:00
|
|
|
meta = {
|
2025-02-11 17:46:09 +08:00
|
|
|
description = "Wayland compositor based on wlroots and QtQuick";
|
|
|
|
|
homepage = "https://github.com/linuxdeepin/treeland";
|
2025-01-14 20:02:14 +08:00
|
|
|
license = with lib.licenses; [
|
|
|
|
|
gpl3Only
|
|
|
|
|
lgpl3Only
|
|
|
|
|
asl20
|
|
|
|
|
];
|
2024-01-24 17:38:41 +08:00
|
|
|
platforms = lib.platforms.linux;
|
|
|
|
|
maintainers = with lib.maintainers; [ rewine ];
|
2023-11-07 14:50:12 +08:00
|
|
|
};
|
2024-01-24 17:38:41 +08:00
|
|
|
})
|