[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
03/03: gnu: Add lexilla.
From: |
guix-commits |
Subject: |
03/03: gnu: Add lexilla. |
Date: |
Wed, 14 Jun 2023 15:33:49 -0400 (EDT) |
apteryx pushed a commit to branch master
in repository guix.
commit 10186bc291580a5a3403739eb4623c2ba63c0190
Author: Maxim Cournoyer <maxim.cournoyer@gmail.com>
AuthorDate: Wed Jun 14 15:01:58 2023 -0400
gnu: Add lexilla.
* gnu/packages/text-editors.scm (lexilla): New variable.
---
gnu/packages/text-editors.scm | 61 +++++++++++++++++++++++++++++++++++++++++++
1 file changed, 61 insertions(+)
diff --git a/gnu/packages/text-editors.scm b/gnu/packages/text-editors.scm
index 606d85584b..1781e75af2 100644
--- a/gnu/packages/text-editors.scm
+++ b/gnu/packages/text-editors.scm
@@ -23,6 +23,7 @@
;;; Copyright © 2022 jgart <jgart@dismail.de>
;;; Copyright © 2022 Andy Tai <atai@atai.org>
;;; Copyright © 2023 Eidvilas Markevičius <markeviciuseidvilas@gmail.com>
+;;; Copyright © 2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -1044,6 +1045,66 @@ fonts, bold and italics, multiple foreground and
background colours,
and multiple fonts.")
(license license:hpnd)))
+(define-public lexilla
+ (package
+ (name "lexilla")
+ (version "5.2.5")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append "https://www.scintilla.org/lexilla"
+ (string-delete #\. version) ".tgz"))
+ (sha256
+ (base32
+ "0sc3z6y82h1vq8aaydp119kymzvrv0p1xvy56r5j996jl6zxikk4"))))
+ (build-system gnu-build-system)
+ (arguments
+ (list
+ #:make-flags #~(list (string-append "CXX=" #$(cxx-for-target))
+ (string-append "SCINTILLA_INCLUDE="
+ #$(this-package-input "scintilla")
+ "/include"))
+ #:test-target "test"
+ #:phases
+ #~(modify-phases %standard-phases
+ (replace 'build
+ (lambda args
+ (with-directory-excursion "src"
+ (apply (assoc-ref %standard-phases 'build) args))))
+ (add-after 'build 'patch-more-shebangs
+ (lambda _
+ ;; Patch these bash shebangs to avoid them failing the tests.
+ (substitute* '("test/examples/bash/x.bsh.folded"
+ "test/examples/bash/x.bsh.styled")
+ (("/usr/bin/env bash")
+ (which "bash")))))
+ (replace 'check
+ (lambda args
+ (with-directory-excursion "test"
+ (apply (assoc-ref %standard-phases 'check) args))))
+ (add-after 'unpack 'fix-deps.mak
+ (lambda _
+ (substitute* "src/deps.mak"
+ (("../../scintilla")
+ #$(this-package-input "scintilla")))))
+ (delete 'configure) ;no configure script
+ (replace 'install
+ ;; Upstream provides no install script.
+ (lambda _
+ (let ((lib (string-append #$output "/lib"))
+ (inc (string-append #$output "/include")))
+ (for-each (lambda (f) (install-file f lib))
+ (find-files "bin/" "\\.so$"))
+ (for-each (lambda (f) (install-file f inc))
+ (find-files "include/" "\\.h$"))))))))
+ (native-inputs (list python))
+ (inputs (list scintilla))
+ (home-page "https://www.scintilla.org/Lexilla.html")
+ (synopsis "Language lexers for Scintilla")
+ (description "Lexilla is a library of language lexers that can be
+used with the Scintilla editing component.")
+ (license license:hpnd)))
+
(define-public geany
(package
(name "geany")