nixpkgs/pkgs/applications/editors/textadept/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

45 lines
1.2 KiB
Nix
Raw Normal View History

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";
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
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;
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
};
}