2023-11-16 04:20:00 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, fetchurl, cmake
|
|
|
|
, withQt ? true, qtbase, wrapQtAppsHook
|
|
|
|
, withCurses ? false, ncurses
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2023-11-16 04:20:00 +00:00
|
|
|
version = "12.1";
|
2022-06-16 17:23:12 +00:00
|
|
|
pname = "textadept";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2020-11-06 00:33:48 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
name = "textadept11";
|
|
|
|
owner = "orbitalquark";
|
|
|
|
repo = "textadept";
|
2022-06-16 17:23:12 +00:00
|
|
|
rev = "textadept_${version}";
|
2023-11-16 04:20:00 +00:00
|
|
|
sha256 = "sha256-ce7U/GR/4zkjnRN3fx3FLecc9vuvFqCONy275SWnpNc=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2023-11-16 04:20:00 +00:00
|
|
|
nativeBuildInputs = [ cmake ]
|
|
|
|
++ lib.optionals withQt [ wrapQtAppsHook ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-11-16 04:20:00 +00:00
|
|
|
buildInputs =
|
|
|
|
lib.optionals withQt [ qtbase ]
|
|
|
|
++ lib.optionals withCurses ncurses;
|
|
|
|
|
|
|
|
cmakeFlags =
|
|
|
|
lib.optional withQt [ "-DQT=ON" ]
|
|
|
|
++ lib.optional withCurses [ "-DCURSES=ON" "-DQT=OFF"];
|
2020-11-03 02:18:15 +00:00
|
|
|
|
2023-08-04 22:07:22 +00:00
|
|
|
preConfigure = ''
|
|
|
|
mkdir -p $PWD/build/_deps
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-08-04 22:07:22 +00:00
|
|
|
'' +
|
|
|
|
lib.concatStringsSep "\n" (lib.mapAttrsToList (name: params:
|
|
|
|
"ln -s ${fetchurl params} $PWD/build/_deps/${name}"
|
|
|
|
) (import ./deps.nix));
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2022-06-16 17:23:12 +00:00
|
|
|
description = "An extensible text editor based on Scintilla with Lua scripting.";
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "http://foicica.com/textadept";
|
|
|
|
license = licenses.mit;
|
2023-11-16 04:20:00 +00:00
|
|
|
maintainers = with maintainers; [ raskin mirrexagon arcuru ];
|
2020-04-24 23:36:52 +00:00
|
|
|
platforms = platforms.linux;
|
2024-01-02 11:29:13 +00:00
|
|
|
mainProgram = "textadept";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|