2023-10-23 15:40:12 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, fetchurl, cmake
|
|
|
|
, withQt ? true, qtbase, wrapQtAppsHook
|
|
|
|
, withCurses ? false, ncurses
|
|
|
|
}:
|
2020-11-02 14:19:55 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2023-10-23 15:40:12 +00:00
|
|
|
version = "12.1";
|
2022-06-06 21:27:40 +00:00
|
|
|
pname = "textadept";
|
2020-11-02 14:19:55 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
name = "textadept11";
|
|
|
|
owner = "orbitalquark";
|
|
|
|
repo = "textadept";
|
2023-08-01 14:40:06 +00:00
|
|
|
rev = "textadept_${version}";
|
2023-10-23 15:40:12 +00:00
|
|
|
sha256 = "sha256-ce7U/GR/4zkjnRN3fx3FLecc9vuvFqCONy275SWnpNc=";
|
2020-11-02 14:19:55 +00:00
|
|
|
};
|
|
|
|
|
2023-10-23 15:40:12 +00:00
|
|
|
nativeBuildInputs = [ cmake ]
|
|
|
|
++ lib.optionals withQt [ wrapQtAppsHook ];
|
2020-11-02 14:19:55 +00:00
|
|
|
|
2023-10-23 15:40:12 +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-02 14:19:55 +00:00
|
|
|
|
2023-02-05 15:57:20 +00:00
|
|
|
preConfigure = ''
|
|
|
|
mkdir -p $PWD/build/_deps
|
2020-11-02 14:19:55 +00:00
|
|
|
|
2023-02-05 15:57:20 +00:00
|
|
|
'' +
|
|
|
|
lib.concatStringsSep "\n" (lib.mapAttrsToList (name: params:
|
|
|
|
"ln -s ${fetchurl params} $PWD/build/_deps/${name}"
|
|
|
|
) (import ./deps.nix));
|
2020-11-02 14:19:55 +00:00
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2022-05-25 23:09:24 +00:00
|
|
|
description = "An extensible text editor based on Scintilla with Lua scripting.";
|
2020-11-02 14:19:55 +00:00
|
|
|
homepage = "http://foicica.com/textadept";
|
|
|
|
license = licenses.mit;
|
2023-10-25 22:42:48 +00:00
|
|
|
maintainers = with maintainers; [ raskin mirrexagon arcuru ];
|
2020-11-02 14:19:55 +00:00
|
|
|
platforms = platforms.linux;
|
2023-11-27 01:17:53 +00:00
|
|
|
mainProgram = "textadept";
|
2020-11-02 14:19:55 +00:00
|
|
|
};
|
|
|
|
}
|