Skip to content

Commit 8cdb413

Browse files
committed
nix: modernize cmake options
1 parent 85be386 commit 8cdb413

File tree

1 file changed

+18
-19
lines changed

1 file changed

+18
-19
lines changed

default.nix

Lines changed: 18 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -58,29 +58,28 @@
5858
qt6.qtdeclarative
5959
cli11
6060
]
61-
++ (lib.optional withCrashReporter breakpad)
62-
++ (lib.optional withJemalloc jemalloc)
63-
++ (lib.optional withQtSvg qt6.qtsvg)
64-
++ (lib.optionals withWayland [ qt6.qtwayland wayland ])
65-
++ (lib.optional withX11 xorg.libxcb)
66-
++ (lib.optional withPam pam)
67-
++ (lib.optional withPipewire pipewire);
61+
++ lib.optional withCrashReporter breakpad
62+
++ lib.optional withJemalloc jemalloc
63+
++ lib.optional withQtSvg qt6.qtsvg
64+
++ lib.optionals withWayland [ qt6.qtwayland wayland ]
65+
++ lib.optional withX11 xorg.libxcb
66+
++ lib.optional withPam pam
67+
++ lib.optional withPipewire pipewire;
6868

6969
QTWAYLANDSCANNER = lib.optionalString withWayland "${qt6.qtwayland}/libexec/qtwaylandscanner";
7070

7171
cmakeBuildType = if debug then "Debug" else "RelWithDebInfo";
7272

73-
cmakeFlags = [ "-DGIT_REVISION=${gitRev}" ]
74-
++ lib.optional (!withCrashReporter) "-DCRASH_REPORTER=OFF"
75-
++ lib.optional (!withJemalloc) "-DUSE_JEMALLOC=OFF"
76-
++ lib.optional (!withWayland) "-DWAYLAND=OFF"
77-
++ lib.optional (!withPipewire) "-DSERVICE_PIPEWIRE=OFF"
78-
++ lib.optional (!withPam) "-DSERVICE_PAM=OFF"
79-
++ lib.optional (!withHyprland) "-DHYPRLAND=OFF"
80-
++ lib.optional (!withQMLLib) "-DINSTALL_QML_LIB=OFF";
81-
82-
buildPhase = "ninjaBuildPhase";
83-
enableParallelBuilding = true;
73+
cmakeFlags = [
74+
(lib.cmakeFeature "GIT_REVISION" gitRev)
75+
(lib.cmakeBool "CRASH_REPORTER" withCrashReporter)
76+
(lib.cmakeBool "USE_JEMALLOC" withJemalloc)
77+
(lib.cmakeBool "WAYLAND" withWayland)
78+
(lib.cmakeBool "SERVICE_PIPEWIRE" withPipewire)
79+
(lib.cmakeBool "SERVICE_PAM" withPam)
80+
(lib.cmakeBool "HYPRLAND" withHyprland)
81+
(lib.cmakeBool "INSTALL_QML_LIB" withQMLLib)
82+
];
8483

8584
# How to get debuginfo in gdb from a release build:
8685
# 1. build `quickshell.debug`
@@ -91,7 +90,7 @@
9190

9291
meta = with lib; {
9392
homepage = "https://git.outfoxxed.me/outfoxxed/quickshell";
94-
description = "Simple and flexbile QtQuick based desktop shell toolkit";
93+
description = "Flexbile QtQuick based desktop shell toolkit";
9594
license = licenses.lgpl3Only;
9695
platforms = platforms.linux;
9796
};

0 commit comments

Comments
 (0)