nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 stdenv,
4 fetchFromGitHub,
5 fetchurl,
6 cmake,
7 withQt ? true,
8 libsForQt5,
9 withCurses ? false,
10 ncurses,
11}:
12stdenv.mkDerivation (finalAttrs: {
13 version = "12.9";
14 pname = "textadept";
15
16 src = fetchFromGitHub {
17 owner = "orbitalquark";
18 repo = "textadept";
19 tag = "textadept_${finalAttrs.version}";
20 hash = "sha256-vpBmDcnaHdpYZIfcy482G4NGor+64Dh1tzryb8JJ+c8=";
21 };
22
23 nativeBuildInputs = [ cmake ] ++ lib.optionals withQt [ libsForQt5.wrapQtAppsHook ];
24
25 buildInputs = lib.optionals withQt [ libsForQt5.qtbase ] ++ lib.optionals withCurses ncurses;
26
27 cmakeFlags =
28 lib.optional withQt [ "-DQT=ON" ]
29 ++ lib.optional withCurses [
30 "-DCURSES=ON"
31 "-DQT=OFF"
32 ];
33
34 preConfigure = ''
35 mkdir -p $PWD/build/_deps
36
37 ''
38 + lib.concatStringsSep "\n" (
39 lib.mapAttrsToList (name: params: "ln -s ${fetchurl params} $PWD/build/_deps/${name}") (
40 import ./deps.nix
41 )
42 );
43
44 meta = {
45 description = "Extensible text editor based on Scintilla with Lua scripting";
46 homepage = "http://foicica.com/textadept";
47 downloadPage = "https://github.com/orbitalquark/textadept";
48 changelog = "https://github.com/orbitalquark/textadept/releases/tag/textadept_${finalAttrs.version}";
49 license = lib.licenses.mit;
50 maintainers = with lib.maintainers; [
51 raskin
52 mirrexagon
53 arcuru
54 ];
55 platforms = lib.platforms.linux;
56 mainProgram = "textadept";
57 };
58})