Merge pull request #136095 from boppyt/lite-xl

This commit is contained in:
Sandro 2021-11-18 13:22:05 +01:00 committed by GitHub
commit 7280fda66f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 97 additions and 4 deletions

View File

@ -1564,6 +1564,16 @@
githubId = 87764;
name = "Ben Ford";
};
boppyt = {
email = "boppy@nwcpz.com";
github = "boppyt";
githubId = 71049646;
name = "Zack A";
keys = [{
longkeyid = "rsa4096/0x6310C97DE31D1545";
fingerprint = "E8D7 5C19 9F65 269B 439D F77B 6310 C97D E31D 1545";
}];
};
borisbabic = {
email = "boris.ivan.babic@gmail.com";
github = "borisbabic";

View File

@ -0,0 +1,65 @@
{ agg
, fetchFromGitHub
, fetchpatch
, Foundation
, freetype
, lib
, lua5_2
, meson
, ninja
, pcre2
, pkg-config
, reproc
, SDL2
, stdenv
}:
stdenv.mkDerivation rec {
pname = "lite-xl";
version = "2.0.1";
src = fetchFromGitHub {
owner = "lite-xl";
repo = "lite-xl";
rev = "v${version}";
sha256 = "sha256-+RbmT6H/5Ldhv3qOClxMjCSGMudbkGtkjo2SpGqExao=";
};
patches = [
# Fixes compatibility with Lua5.2, remove patch when PR merged
# https://github.com/lite-xl/lite-xl/pull/435
(fetchpatch {
name = "0001-replace-unpack-with-table.unpack.patch";
url = "https://github.com/lite-xl/lite-xl/commit/30ccde896d1ffe37cbd8990e9b8aaef275e18935.patch";
sha256 = "sha256-IAe3jIyD3OtZtu1V7MtPR4QzFKvU/aV/nLQ4U9nHyIQ=";
})
# Lets meson fallback to the system reproc if available.
# remove patch when 2.0.2 is proposed.
(fetchpatch {
name = "0002-use-dependency-fallbacks-use-system-reproc-if-available.patch";
url = "https://github.com/lite-xl/lite-xl/commit/973acb787aacb0164b2f4ae6fe335d250ba80a7b.patch";
sha256 = "sha256-GmgATsRlj1FePmw3+AoWEMZIo2eujHYewKQCx583qbU=";
})
];
nativeBuildInputs = [ meson ninja pkg-config ];
buildInputs = [
agg
freetype
lua5_2
pcre2
reproc
SDL2
] ++ lib.optionals stdenv.isDarwin [
Foundation
];
meta = with lib; {
description = "A lightweight text editor written in Lua";
homepage = "https://github.com/lite-xl/lite-xl";
license = licenses.mit;
maintainers = with maintainers; [ boppyt ];
platforms = platforms.unix;
};
}

View File

@ -8,8 +8,18 @@ stdenv.mkDerivation rec {
url = "https://www.antigrain.com/${pname}-${version}.tar.gz";
sha256 = "07wii4i824vy9qsvjsgqxppgqmfdxq0xa87i5yk53fijriadq7mb";
};
nativeBuildInputs = [ pkg-config ];
buildInputs = [ autoconf automake libtool freetype SDL libX11 ];
nativeBuildInputs = [
pkg-config
autoconf
automake
libtool
];
buildInputs = [
freetype
SDL
] ++ lib.optionals stdenv.isLinux [
libX11
];
postPatch = ''
substituteInPlace include/agg_renderer_outline_aa.h \
@ -22,7 +32,11 @@ stdenv.mkDerivation rec {
sh autogen.sh
'';
configureFlags = [ "--x-includes=${libX11.dev}/include" "--x-libraries=${libX11.out}/lib" "--enable-examples=no" ];
configureFlags = lib.optionals stdenv.isLinux [
"--x-includes=${lib.getDev libX11}/include"
"--x-libraries=${lib.getLib libX11}/lib"
"--enable-examples=no"
];
# libtool --tag=CXX --mode=link g++ -g -O2 libexamples.la ../src/platform/X11/libaggplatformX11.la ../src/libagg.la -o alpha_mask2 alpha_mask2.o
# libtool: error: cannot find the library 'libexamples.la'
@ -43,6 +57,6 @@ stdenv.mkDerivation rec {
license = lib.licenses.gpl2Plus;
homepage = "http://www.antigrain.com/";
platforms = lib.platforms.linux;
platforms = lib.platforms.unix;
};
}

View File

@ -3222,6 +3222,10 @@ with pkgs;
lite = callPackage ../applications/editors/lite { };
lite-xl = callPackage ../applications/editors/lite-xl {
inherit (darwin.apple_sdk.frameworks) Foundation;
};
loadwatch = callPackage ../tools/system/loadwatch { };
loccount = callPackage ../development/tools/misc/loccount { };