From 10186bc291580a5a3403739eb4623c2ba63c0190 Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Wed, 14 Jun 2023 15:01:58 -0400 Subject: 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 ;;; Copyright © 2022 Andy Tai ;;; Copyright © 2023 Eidvilas Markevičius +;;; Copyright © 2023 Maxim Cournoyer ;;; ;;; This file is part of GNU Guix. ;;; @@ -1044,6 +1045,66 @@ (define-public scintilla 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") -- cgit v1.2.3