diff options
author | Zack A <boppy@nwcpz.com> | 2021-08-30 04:25:51 -0700 |
---|---|---|
committer | Zack A <boppy@nwcpz.com> | 2021-09-17 03:23:55 -0700 |
commit | edfd0b67c38bbbe5db707a2937afac051f938dfa (patch) | |
tree | 24ab52e23de8e8c6f306f819706e0785e0945d5a /pkgs/applications/editors | |
parent | ba489ce3183a840d96cb3e8e1a431a63eb6c2f79 (diff) | |
download | nixpkgs-edfd0b67c38bbbe5db707a2937afac051f938dfa.tar nixpkgs-edfd0b67c38bbbe5db707a2937afac051f938dfa.tar.gz nixpkgs-edfd0b67c38bbbe5db707a2937afac051f938dfa.tar.bz2 nixpkgs-edfd0b67c38bbbe5db707a2937afac051f938dfa.tar.lz nixpkgs-edfd0b67c38bbbe5db707a2937afac051f938dfa.tar.xz nixpkgs-edfd0b67c38bbbe5db707a2937afac051f938dfa.tar.zst nixpkgs-edfd0b67c38bbbe5db707a2937afac051f938dfa.zip |
lite-xl: init at 2.0.1
Co-authored-by: Bobby Rong <rjl931189261@126.com> Co-authored-by: OPNA2608 <christoph.neidahl@gmail.com> Co-authored-by: SuperSandro2000 <sandro.jaeckel@gmail.com> Co-authored-by: Samuel Ainsworth <skainsworth@gmail.com>
Diffstat (limited to 'pkgs/applications/editors')
-rw-r--r-- | pkgs/applications/editors/lite-xl/default.nix | 65 |
1 files changed, 65 insertions, 0 deletions
diff --git a/pkgs/applications/editors/lite-xl/default.nix b/pkgs/applications/editors/lite-xl/default.nix new file mode 100644 index 00000000000..3b38004eddb --- /dev/null +++ b/pkgs/applications/editors/lite-xl/default.nix @@ -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; + }; +} |