File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3131 packages = forAllSystems ( pkgs : rec {
3232 caelestia-shell = pkgs . callPackage ./nix {
3333 rev = self . rev or self . dirtyRev ;
34+ stdenv = pkgs . clangStdenv ;
3435 quickshell = inputs . quickshell . packages . ${ pkgs . system } . default . override {
3536 withX11 = false ;
3637 withI3 = false ;
3940 caelestia-cli = inputs . caelestia-cli . packages . ${ pkgs . system } . default ;
4041 } ;
4142 with-cli = caelestia-shell . override { withCli = true ; } ;
43+ debug = caelestia-shell . override { debug = true ; } ;
4244 default = caelestia-shell ;
4345 } ) ;
4446
Original file line number Diff line number Diff line change 3333 ninja ,
3434 pkg-config ,
3535 caelestia-cli ,
36+ debug ? false ,
3637 withCli ? false ,
3738 extraRuntimeDeps ? [ ] ,
3839} : let
7273 ] ;
7374
7475 assets = stdenv . mkDerivation {
75- name = "caelestia-assets" ;
76+ name = "caelestia-assets${ lib . optionalString debug "-debug" } " ;
7677 src = lib . fileset . toSource {
7778 root = ./.. ;
7879 fileset = lib . fileset . union ./../CMakeLists.txt ./../assets/cpp ;
9091 } ;
9192
9293 plugin = stdenv . mkDerivation {
93- name = "caelestia-qml-plugin" ;
94+ name = "caelestia-qml-plugin${ lib . optionalString debug "-debug" } " ;
9495 src = lib . fileset . toSource {
9596 root = ./.. ;
9697 fileset = lib . fileset . union ./../CMakeLists.txt ./../plugin ;
110111in
111112 stdenv . mkDerivation {
112113 inherit version ;
113- pname = "caelestia-shell" ;
114+ pname = "caelestia-shell${ lib . optionalString debug "-debug" } " ;
114115 src = ./.. ;
115116
116117 nativeBuildInputs = [ cmake ninja makeWrapper qt6 . wrapQtAppsHook ] ;
117118 buildInputs = [ quickshell assets plugin xkeyboard-config qt6 . qtbase ] ;
118119 propagatedBuildInputs = runtimeDeps ;
119120
120- cmakeBuildType = "Release" ;
121+ cmakeBuildType =
122+ if debug
123+ then "Debug"
124+ else "RelWithDebInfo" ;
121125 cmakeFlags =
122126 [
123127 ( lib . cmakeFeature "ENABLE_MODULES" "shell" )
124128 ( lib . cmakeFeature "INSTALL_QSCONFDIR" "${ placeholder "out" } /share/caelestia-shell" )
125129 ]
126130 ++ cmakeVersionFlags ;
127131
132+ dontStrip = debug ;
133+
128134 prePatch = ''
129135 substituteInPlace assets/pam.d/fprint \
130136 --replace-fail pam_fprintd.so /run/current-system/sw/lib/security/pam_fprintd.so
You can’t perform that action at this time.
0 commit comments