treeland/nix/default.nix

104 lines
2.0 KiB
Nix
Raw Permalink Normal View History

2023-11-07 14:50:12 +08:00
{ stdenv
, lib
, nix-filter
, cmake
, extra-cmake-modules
, pkg-config
, wayland-scanner
, qttools
, wrapQtAppsHook
, qtbase
, qtquick3d
, qtimageformats
2023-11-07 14:50:12 +08:00
, qtwayland
, qtsvg
, qwlroots
2024-05-09 18:28:02 +08:00
, ddm
, deepin
2023-11-07 14:50:12 +08:00
, waylib
, wayland
, wayland-protocols
, wlr-protocols
, treeland-protocols
2023-11-07 14:50:12 +08:00
, pixman
, pam
, libxcrypt
, libinput
2023-11-07 14:50:12 +08:00
, nixos-artwork
}:
stdenv.mkDerivation (finalAttrs: {
2023-11-07 14:50:12 +08:00
pname = "treeland";
version = "0.2.2";
2023-11-07 14:50:12 +08:00
src = nix-filter.filter {
root = ./..;
exclude = [
".git"
"debian"
"LICENSES"
"README.md"
"README.zh_CN.md"
(nix-filter.matchExt "nix")
];
};
postPatch = ''
for file in $(grep -rl "/usr/share/wallpapers/deepin/desktop.jpg")
do
substituteInPlace $file \
--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"
done
2023-11-07 14:50:12 +08:00
'';
nativeBuildInputs = [
cmake
extra-cmake-modules
pkg-config
wayland-scanner
qttools
wrapQtAppsHook
];
buildInputs = [
qtbase
qtquick3d
qtimageformats
2023-11-07 14:50:12 +08:00
qtwayland
qtsvg
qwlroots
2024-05-09 18:28:02 +08:00
ddm
deepin.dtk6declarative
deepin.dtk6systemsettings
2023-11-07 14:50:12 +08:00
waylib
wayland
wayland-protocols
wlr-protocols
treeland-protocols
2023-11-07 14:50:12 +08:00
pixman
pam
libxcrypt
libinput
2023-11-07 14:50:12 +08:00
];
cmakeFlags = [
"-DQT_IMPORTS_DIR=${placeholder "out"}/${qtbase.qtQmlPrefix}"
"-DCMAKE_INSTALL_SYSCONFDIR=${placeholder "out"}/etc"
"-DSYSTEMD_SYSTEM_UNIT_DIR=${placeholder "out"}/lib/systemd/system"
"-DSYSTEMD_SYSUSERS_DIR=${placeholder "out"}/lib/sysusers.d"
"-DSYSTEMD_TMPFILES_DIR=${placeholder "out"}/lib/tmpfiles.d"
"-DDBUS_CONFIG_DIR=${placeholder "out"}/share/dbus-1/system.d"
];
meta = {
2023-11-07 14:50:12 +08:00
description = "DDM is a fork of SDDM";
homepage = "https://github.com/vioken/treeland";
license = with lib.licenses; [ gpl3Only lgpl3Only asl20 ];
platforms = lib.platforms.linux;
maintainers = with lib.maintainers; [ rewine ];
2023-11-07 14:50:12 +08:00
};
})
2023-11-07 14:50:12 +08:00