nix fixed??
This commit is contained in:
+14
-4
@@ -1,5 +1,4 @@
|
|||||||
cmake_minimum_required(VERSION 3.19)
|
cmake_minimum_required(VERSION 3.19)
|
||||||
include(GNUInstallDirs)
|
|
||||||
|
|
||||||
project(ZShell)
|
project(ZShell)
|
||||||
|
|
||||||
@@ -8,9 +7,10 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
|||||||
set(CMAKE_CXX_EXTENSIONS OFF)
|
set(CMAKE_CXX_EXTENSIONS OFF)
|
||||||
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib")
|
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib")
|
||||||
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
|
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
|
||||||
|
set(ENABLE_MODULES "plugin;shell" CACHE STRING "Modules to build/install")
|
||||||
|
|
||||||
set(INSTALL_LIBDIR "${CMAKE_INSTALL_LIBDIR}/ZShell" CACHE STRING "Library install dir")
|
set(INSTALL_LIBDIR "usr/lib/ZShell" CACHE STRING "Library install dir")
|
||||||
set(INSTALL_QMLDIR "${CMAKE_INSTALL_LIBDIR}/qt6/qml" CACHE STRING "QML install dir")
|
set(INSTALL_QMLDIR "usr/lib/qt6/qml" CACHE STRING "QML install dir")
|
||||||
|
|
||||||
add_compile_options(
|
add_compile_options(
|
||||||
-Wall -Wextra -Wpedantic -Wshadow -Wconversion
|
-Wall -Wextra -Wpedantic -Wshadow -Wconversion
|
||||||
@@ -20,4 +20,14 @@ add_compile_options(
|
|||||||
-Wunreachable-code
|
-Wunreachable-code
|
||||||
)
|
)
|
||||||
|
|
||||||
add_subdirectory(Plugins)
|
|
||||||
|
if("plugin" IN_LIST ENABLE_MODULES)
|
||||||
|
add_subdirectory(Plugins)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if("shell" IN_LIST ENABLE_MODULES)
|
||||||
|
foreach(dir assets scripts Components Config Modules Daemons Drawers Effects Helpers Paths)
|
||||||
|
install(DIRECTORY ${dir} DESTINATION "${INSTALL_QSCONFDIR}")
|
||||||
|
endforeach()
|
||||||
|
install(FILES shell.qml Bar.qml Wallpaper.qml DESTINATION "${INSTALL_QSCONFDIR}")
|
||||||
|
endif()
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ function(qml_module arg_TARGET)
|
|||||||
QMLDIR module_qmldir
|
QMLDIR module_qmldir
|
||||||
TYPEINFO module_typeinfo
|
TYPEINFO module_typeinfo
|
||||||
)
|
)
|
||||||
set(module_dir "/usr/lib/qt6/qml/${module_target_path}")
|
set(module_dir "${INSTALL_QMLDIR}/${module_target_path}")
|
||||||
install(TARGETS ${arg_TARGET} LIBRARY DESTINATION "${module_dir}" RUNTIME DESTINATION "${module_dir}")
|
install(TARGETS ${arg_TARGET} LIBRARY DESTINATION "${module_dir}" RUNTIME DESTINATION "${module_dir}")
|
||||||
install(TARGETS "${module_plugin_target}" LIBRARY DESTINATION "${module_dir}" RUNTIME DESTINATION "${module_dir}")
|
install(TARGETS "${module_plugin_target}" LIBRARY DESTINATION "${module_dir}" RUNTIME DESTINATION "${module_dir}")
|
||||||
install(FILES "${module_qmldir}" DESTINATION "${module_dir}")
|
install(FILES "${module_qmldir}" DESTINATION "${module_dir}")
|
||||||
|
|||||||
+8
-7
@@ -95,28 +95,29 @@ stdenv.mkDerivation {
|
|||||||
quickshell
|
quickshell
|
||||||
plugin
|
plugin
|
||||||
qt6.qtbase
|
qt6.qtbase
|
||||||
|
qt6.qtwayland
|
||||||
];
|
];
|
||||||
propagatedBuildInputs = runtimeDeps;
|
propagatedBuildInputs = runtimeDeps;
|
||||||
|
|
||||||
cmakeFlags = [
|
cmakeFlags = [
|
||||||
(lib.cmakeFeature "ENABLE_MODULES" "shell")
|
(lib.cmakeFeature "ENABLE_MODULES" "shell")
|
||||||
|
(lib.cmakeFeature "INSTALL_QSCONFDIR" "${placeholder "out"}/share/ZShell")
|
||||||
]
|
]
|
||||||
++ cmakeVersionFlags;
|
++ cmakeVersionFlags;
|
||||||
|
|
||||||
prePatch = ''
|
prePatch = ''
|
||||||
substituteInPlace assets/pam.d/fprint \
|
|
||||||
--replace-fail pam_fprintd.so /run/current-system/sw/lib/security/pam_fprintd.so
|
|
||||||
substituteInPlace shell.qml \
|
substituteInPlace shell.qml \
|
||||||
--replace-fail 'ShellRoot {' 'ShellRoot { settings.watchFiles: false'
|
--replace-fail 'ShellRoot {' 'ShellRoot { settings.watchFiles: false'
|
||||||
'';
|
'';
|
||||||
|
|
||||||
postInstall = ''
|
postInstall = ''
|
||||||
makeWrapper ${quickshell}/bin/qs $out/bin/zshell \
|
makeWrapper ${quickshell}/bin/qs $out/bin/zshell \
|
||||||
--prefix PATH : "${lib.makeBinPath runtimeDeps}" \
|
--prefix PATH : "${lib.makeBinPath runtimeDeps}" \
|
||||||
--set FONTCONFIG_FILE "${fontconfig}" \
|
--set FONTCONFIG_FILE "${fontconfig}" \
|
||||||
--add-flags "-p $out/share/ZShell"
|
--add-flags "-p $out/share/ZShell"
|
||||||
|
|
||||||
mkdir -p $out/lib
|
echo "$out"
|
||||||
|
mkdir -p $out/lib
|
||||||
'';
|
'';
|
||||||
|
|
||||||
passthru = {
|
passthru = {
|
||||||
|
|||||||
Reference in New Issue
Block a user