mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-10-04 05:50:00 +00:00
This pattern is error prone, especially with __structuredAttrs, where nested lists can leave important attributes such as `patches` null. The treewide rewrite was produced with ast-grep, followed by `nix fmt` and manual fixes for two `sema-undefined-variable` violations. Future occurrences will be rejected by nixpkgs-vet once this change is merged: https://github.com/NixOS/nixpkgs-vet/pull/301
59 lines
1.4 KiB
Nix
59 lines
1.4 KiB
Nix
{
|
|
lib,
|
|
stdenv,
|
|
fetchFromGitHub,
|
|
fetchurl,
|
|
cmake,
|
|
withQt ? true,
|
|
libsForQt5,
|
|
withCurses ? false,
|
|
ncurses,
|
|
}:
|
|
stdenv.mkDerivation (finalAttrs: {
|
|
version = "12.9";
|
|
pname = "textadept";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "orbitalquark";
|
|
repo = "textadept";
|
|
tag = "textadept_${finalAttrs.version}";
|
|
hash = "sha256-vpBmDcnaHdpYZIfcy482G4NGor+64Dh1tzryb8JJ+c8=";
|
|
};
|
|
|
|
nativeBuildInputs = [ cmake ] ++ lib.optionals withQt [ libsForQt5.wrapQtAppsHook ];
|
|
|
|
buildInputs = lib.optionals withQt [ libsForQt5.qtbase ] ++ lib.optionals withCurses ncurses;
|
|
|
|
cmakeFlags =
|
|
lib.optionals withQt [ "-DQT=ON" ]
|
|
++ lib.optionals withCurses [
|
|
"-DCURSES=ON"
|
|
"-DQT=OFF"
|
|
];
|
|
|
|
preConfigure = ''
|
|
mkdir -p $PWD/build/_deps
|
|
|
|
''
|
|
+ lib.concatStringsSep "\n" (
|
|
lib.mapAttrsToList (name: params: "ln -s ${fetchurl params} $PWD/build/_deps/${name}") (
|
|
import ./deps.nix
|
|
)
|
|
);
|
|
|
|
meta = {
|
|
description = "Extensible text editor based on Scintilla with Lua scripting";
|
|
homepage = "http://foicica.com/textadept";
|
|
downloadPage = "https://github.com/orbitalquark/textadept";
|
|
changelog = "https://github.com/orbitalquark/textadept/releases/tag/textadept_${finalAttrs.version}";
|
|
license = lib.licenses.mit;
|
|
maintainers = with lib.maintainers; [
|
|
raskin
|
|
mirrexagon
|
|
arcuru
|
|
];
|
|
platforms = lib.platforms.linux;
|
|
mainProgram = "textadept";
|
|
};
|
|
})
|