update nix build
Some checks failed
Release / Bump Homebrew formula (push) Has been cancelled

This commit is contained in:
2025-11-30 16:07:30 -08:00
parent 8d1e9b2799
commit b91406860c
8 changed files with 129 additions and 191 deletions

View File

@@ -2,36 +2,37 @@
lib,
stdenv,
cmake,
libGL,
ncurses,
SDL2,
xorg.libX11
libGL,
xorg,
installShellFiles,
...
}:
let
cmakeContent = builtins.readFile ./CMakeLists.txt;
cmakeLines = lib.splitString "\n" cmakeContent;
versionLine = lib.findFirst (l: builtins.match ".*set\\(KE_VERSION \".+\"\\).*" l
version = builtins.head (builtins.match ".*set\\(KE_VERSION \"(.+)\"\\).*" versio
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
pkgs.stdenv.mkDerivation {
stdenv.mkDerivation {
pname = "kte";
inherit version;
src = ./.;
src = lib.cleanSource ./.;
nativeBuildInputs = [ pkgs.cmake pkgs.pkg-config ];
buildInputs = with pkgs; [
nativeBuildInputs = [
cmake
ncurses
SDL2
libGL
xorg.libX11
installShellFiles
];
cmakeFlags = [
"-DBUILD_GUI=ON"
"-DCURSES_NEED_NCURSES=TRUE"
"-DCURSES_NEED_WIDE=TRUE"
"-DCMAKE_BUILD_TYPE=Debug"
];
installPhase = ''
@@ -42,7 +43,8 @@ pkgs.stdenv.mkDerivation {
cp kge $out/bin/
installManPage ../docs/kte.1
installManPage ../docs/kte.1
installManPage ../docs/kge.1
runHook postInstall
'';