summaryrefslogtreecommitdiff
path: root/nix/default.nix
diff options
context:
space:
mode:
authorSoramane <61896496+soramanew@users.noreply.github.com>2025-08-31 10:43:49 +1000
committerSoramane <61896496+soramanew@users.noreply.github.com>2025-08-31 10:43:49 +1000
commit49cabbd4cc5075ebd5cfa58866385fb1a6a7dab2 (patch)
treef5f5fee9710b4e6eac04db95d868be3e77ac5956 /nix/default.nix
parentplugin/cim: safe async this (diff)
downloadcaelestia-shell-49cabbd4cc5075ebd5cfa58866385fb1a6a7dab2.tar.gz
caelestia-shell-49cabbd4cc5075ebd5cfa58866385fb1a6a7dab2.tar.bz2
caelestia-shell-49cabbd4cc5075ebd5cfa58866385fb1a6a7dab2.zip
nix: add debug package
Also use clangStdenv to build Use RelWithDebInfo for release builds
Diffstat (limited to 'nix/default.nix')
-rw-r--r--nix/default.nix14
1 files changed, 10 insertions, 4 deletions
diff --git a/nix/default.nix b/nix/default.nix
index 0c4b3b2..d0522a2 100644
--- a/nix/default.nix
+++ b/nix/default.nix
@@ -33,6 +33,7 @@
ninja,
pkg-config,
caelestia-cli,
+ debug ? false,
withCli ? false,
extraRuntimeDeps ? [],
}: let
@@ -72,7 +73,7 @@
];
assets = stdenv.mkDerivation {
- name = "caelestia-assets";
+ name = "caelestia-assets${lib.optionalString debug "-debug"}";
src = lib.fileset.toSource {
root = ./..;
fileset = lib.fileset.union ./../CMakeLists.txt ./../assets/cpp;
@@ -90,7 +91,7 @@
};
plugin = stdenv.mkDerivation {
- name = "caelestia-qml-plugin";
+ name = "caelestia-qml-plugin${lib.optionalString debug "-debug"}";
src = lib.fileset.toSource {
root = ./..;
fileset = lib.fileset.union ./../CMakeLists.txt ./../plugin;
@@ -110,14 +111,17 @@
in
stdenv.mkDerivation {
inherit version;
- pname = "caelestia-shell";
+ pname = "caelestia-shell${lib.optionalString debug "-debug"}";
src = ./..;
nativeBuildInputs = [cmake ninja makeWrapper qt6.wrapQtAppsHook];
buildInputs = [quickshell assets plugin xkeyboard-config qt6.qtbase];
propagatedBuildInputs = runtimeDeps;
- cmakeBuildType = "Release";
+ cmakeBuildType =
+ if debug
+ then "Debug"
+ else "RelWithDebInfo";
cmakeFlags =
[
(lib.cmakeFeature "ENABLE_MODULES" "shell")
@@ -125,6 +129,8 @@ in
]
++ cmakeVersionFlags;
+ dontStrip = debug;
+
prePatch = ''
substituteInPlace assets/pam.d/fprint \
--replace-fail pam_fprintd.so /run/current-system/sw/lib/security/pam_fprintd.so