summaryrefslogtreecommitdiff
path: root/nix/default.nix
diff options
context:
space:
mode:
authorDavi Ribeiro <104164579+Markus328@users.noreply.github.com>2025-08-29 01:07:47 -0300
committerGitHub <noreply@github.com>2025-08-29 14:07:47 +1000
commitb648477b91e3cb1aefd5b6b8fdd94ffbbd79fcb1 (patch)
tree4782f00bfd90b636231c77124d196446514f2be3 /nix/default.nix
parentci: no cpack (diff)
downloadcaelestia-shell-b648477b91e3cb1aefd5b6b8fdd94ffbbd79fcb1.tar.gz
caelestia-shell-b648477b91e3cb1aefd5b6b8fdd94ffbbd79fcb1.tar.bz2
caelestia-shell-b648477b91e3cb1aefd5b6b8fdd94ffbbd79fcb1.zip
nix: better nix develop + refactor (#490)
Diffstat (limited to 'nix/default.nix')
-rw-r--r--nix/default.nix35
1 files changed, 29 insertions, 6 deletions
diff --git a/nix/default.nix b/nix/default.nix
index dc1c9ac..11ea33d 100644
--- a/nix/default.nix
+++ b/nix/default.nix
@@ -63,25 +63,44 @@
fontconfig = makeFontsConf {
fontDirectories = [material-symbols rubik nerd-fonts.caskaydia-cove];
};
+
+ assets = stdenv.mkDerivation {
+ name = "caelestia-assets";
+ src = ./../assets/cpp;
+
+ nativeBuildInputs = [cmake pkg-config];
+ buildInputs = [aubio pipewire];
+
+ cmakeFlags = [(lib.cmakeFeature "INSTALL_LIBDIR" "${placeholder "out"}/lib")];
+ };
+
+ plugin = stdenv.mkDerivation {
+ name = "caelestia-qml-plugin";
+ src = ./../plugin;
+ nativeBuildInputs = [cmake];
+ buildInputs = [qt6.qtbase qt6.qtdeclarative];
+ dontWrapQtApps = true;
+ cmakeFlags = [(lib.cmakeFeature "INSTALL_QMLDIR" qt6.qtbase.qtQmlPrefix)];
+ };
in
stdenv.mkDerivation {
inherit version;
pname = "caelestia-shell";
src = ./..;
- nativeBuildInputs = [cmake ninja pkg-config makeWrapper qt6.wrapQtAppsHook];
- buildInputs = [quickshell aubio pipewire xkeyboard-config qt6.qtbase qt6.qtdeclarative];
+ nativeBuildInputs = [cmake ninja makeWrapper qt6.wrapQtAppsHook];
+ buildInputs = [quickshell assets plugin xkeyboard-config qt6.qtbase];
propagatedBuildInputs = runtimeDeps;
cmakeBuildType = "Release";
cmakeFlags = [
(lib.cmakeFeature "VERSION" version)
- (lib.cmakeFeature "INSTALL_LIBDIR" "${placeholder "out"}/lib")
- (lib.cmakeFeature "INSTALL_QMLDIR" qt6.qtbase.qtQmlPrefix)
+ (lib.cmakeFeature "DONT_BUILD_PLUGIN" "ON")
+ (lib.cmakeFeature "DONT_BUILD_ASSETS" "ON")
(lib.cmakeFeature "INSTALL_QSCONFDIR" "${placeholder "out"}/share/caelestia-shell")
];
- patchPhase = ''
+ prePatch = ''
substituteInPlace assets/pam.d/fprint \
--replace-fail pam_fprintd.so /run/current-system/sw/lib/security/pam_fprintd.so
'';
@@ -90,11 +109,15 @@ in
makeWrapper ${quickshell}/bin/qs $out/bin/caelestia-shell \
--prefix PATH : "${lib.makeBinPath runtimeDeps}" \
--set FONTCONFIG_FILE "${fontconfig}" \
- --set CAELESTIA_LIB_DIR $out/lib \
+ --set CAELESTIA_LIB_DIR ${assets}/lib \
--set CAELESTIA_XKB_RULES_PATH ${xkeyboard-config}/share/xkeyboard-config-2/rules/base.lst \
--add-flags "-p $out/share/caelestia-shell"
'';
+ passthru = {
+ inherit plugin assets;
+ };
+
meta = {
description = "A very segsy desktop shell";
homepage = "https://github.com/caelestia-dots/shell";