- Added `QtFrontend`, `QtRenderer`, and `QtInputHandler` for Qt-based UI rendering and input handling. - Implemented support for theming, font customization, and palette overrides in GUITheme. - Renamed and refactored ImGui-specific components (e.g., `GUIRenderer` -> `ImGuiRenderer`). - Added cross-frontend integration for commands and visual font picker.
69 lines
1.3 KiB
Nix
69 lines
1.3 KiB
Nix
{
|
|
lib,
|
|
stdenv,
|
|
cmake,
|
|
ncurses,
|
|
SDL2,
|
|
libGL,
|
|
xorg,
|
|
installShellFiles,
|
|
|
|
graphical ? false,
|
|
graphical-qt ? false,
|
|
...
|
|
}:
|
|
let
|
|
cmakeContent = builtins.readFile ./CMakeLists.txt;
|
|
cmakeLines = lib.splitString "\n" cmakeContent;
|
|
versionLine = lib.findFirst (
|
|
l: builtins.match ".*set\\(KTE_VERSION \".+\"\\).*" l != null
|
|
) (throw "KTE_VERSION not found in CMakeLists.txt") cmakeLines;
|
|
version = builtins.head (builtins.match ".*set\\(KTE_VERSION \"(.+)\"\\).*" versionLine);
|
|
in
|
|
stdenv.mkDerivation {
|
|
pname = "kte";
|
|
inherit version;
|
|
|
|
src = lib.cleanSource ./.;
|
|
|
|
nativeBuildInputs = [
|
|
cmake
|
|
ncurses
|
|
installShellFiles
|
|
]
|
|
++ lib.optionals graphical [
|
|
SDL2
|
|
libGL
|
|
xorg.libX11
|
|
]
|
|
++ lib.optionals graphical-qt [
|
|
qt5Full
|
|
qtcreator ## not sure if this is actually needed
|
|
];
|
|
|
|
cmakeFlags = [
|
|
"-DBUILD_GUI=${if graphical or graphical-qt then "ON" else "OFF"}"
|
|
"-DKTE_USE_QT=${if graphical-qt then "ON" else "OFF"}"
|
|
"-DCMAKE_BUILD_TYPE=Debug"
|
|
];
|
|
|
|
installPhase = ''
|
|
runHook preInstall
|
|
|
|
mkdir -p $out/bin
|
|
cp kte $out/bin/
|
|
|
|
installManPage ../docs/kte.1
|
|
|
|
''
|
|
+ lib.optionalString graphical ''
|
|
cp kge $out/bin/
|
|
installManPage ../docs/kge.1
|
|
mkdir -p $out/share/icons
|
|
cp ../kge.png $out/share/icons/
|
|
''
|
|
+ ''
|
|
runHook postInstall
|
|
'';
|
|
}
|