;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2016, 2019 Efraim Flashner ;;; Copyright © 2016 Ricardo Wurmus ;;; Copyright © 2017 Marius Bakke ;;; Copyright © 2017 Ludovic Courtès ;;; Copyright © 2017, 2018, 2019, 2020 Tobias Geerinckx-Rice ;;; Copyright © 2019 Meiyo Peng ;;; Copyright © 2020 Paul Garlick ;;; Copyright © 2020 Vincent Legoll ;;; ;;; This file is part of GNU Guix. ;;; ;;; GNU Guix is free software; you can redistribute it and/or modify it ;;; under the terms of the GNU General Public License as published by ;;; the Free Software Foundation; either version 3 of the License, or (at ;;; your option) any later version. ;;; ;;; GNU Guix is distributed in the hope that it will be useful, but ;;; WITHOUT ANY WARRANTY; without even the implied warranty of ;;; MERCHANTABILITY or FITNESS FOR A PARTICULA
aboutsummaryrefslogtreecommitdiff
blob: c61626d1147113e53a51705b0650a87a0cad2f4a (about) (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2019 Josh Holland <josh@inv.alid.pw>
;;;
;;; This file is part of GNU Guix.
;;;
;;; GNU Guix is free software; you can redistribute it and/or modify it
;;; under the terms of the GNU General Public License as published by
;;; the Free Software Foundation; either version 3 of the License, or (at
;;; your option) any later version.
;;;
;;; GNU Guix is distributed in the hope that it will be useful, but
;;; WITHOUT ANY WARRANTY; without even the implied warranty of
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
;;; GNU General Public License for more details.
;;;
;;; You should have received a copy of the GNU General Public License
;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.

(define-module (gnu packages rcm)
  #:use-module (guix packages)
  #:use-module (guix download)
  #:use-module (guix build-system gnu)
  #:use-module (guix licenses)
  #:use-module (gnu packages python-xyz)
  #:use-module (gnu packages perl))

(define-public rcm
  (package
    (name "rcm")
    (version "1.3.3")
    (source (origin
              (method url-fetch)
              (uri (string-append "https://thoughtbot.github.io/rcm/dist/rcm-"
                                  version ".tar.gz"))
              (sha256
               (base32 "1bqk7rrp1ckzvsvl9wghsr77m8xl3a7yc5gqdsisz492dx2j8mck"))))
    (build-system gnu-build-system)
    (arguments '(#:phases
                 (modify-phases %standard-phases
                   (add-after 'patch-source-shebangs 'patch-tests
                     (lambda _
                       (substitute* '("test/rcrc-tilde.t"
                                      "test/rcdn-hooks-run-in-order.t"
                                      "test/rcup-hooks-run-in-order.t")
                         (("/bin/sh") (which "sh")))
                       (substitute* "test/rcup-hooks.t"
                         (("/usr/bin/env") (which "env")))
                       #t)))
                  #:parallel-tests? #f))
    (native-inputs `(("perl" ,perl)
                     ("python-cram" ,python-cram)))
    (synopsis "Management suite for dotfiles")
    (description "The rcm suite of tools is for managing dotfiles directories.  This is
a directory containing all the @code{.*rc} files in your home directory
(@code{.zshrc}, @code{.vimrc}, and so on). These files have gone by many
names in history, such as “rc files” because they typically end in rc
or “dotfiles” because they begin with a period.  This suite is useful
for committing your rc files to a central repository to share, but it also
scales to a more complex situation such as multiple source directories
shared between computers with some host-specific or task-specific files.")
    (license bsd-3)
    (home-page "https://github.com/thoughtbot/rcm")))
rce-highlight-" version ".tar.gz")) (sha256 (base32 "148w47k3zswbxvhg83z38ifi85f9dqcpg7icvvw1cm6bg21x4zrs")))) (build-system gnu-build-system) ;; The ctags that comes with emacs does not support the --excmd options, ;; so can't be used (inputs `(("boost" ,boost))) (native-inputs `(("bison" ,bison) ("flex" ,flex))) (arguments `(#:configure-flags (list (string-append "--with-boost=" (assoc-ref %build-inputs "boost"))) #:parallel-tests? #f ;There appear to be race conditions #:phases (modify-phases %standard-phases (add-before 'check 'patch-test-files (lambda _ ;; Unpatch shebangs in test input so that source-highlight ;; is still able to infer input language (substitute* '("tests/test.sh" "tests/test2.sh" "tests/test.tcl") (((string-append "#! *" (which "sh"))) "#!/bin/sh")) ;; Initial patching unrecoverably removes whitespace, so ;; remove it also in the comparison output. (substitute* '("tests/test.sh.html" "tests/test2.sh.html" "tests/test.tcl.html") (("#! */bin/sh") "#!/bin/sh")) #t))))) (home-page "https://www.gnu.org/software/src-highlite/") (synopsis "Produce a document with syntax highlighting from a source file") (description "GNU source-highlight reads in a source code file and produces an output file in which the keywords are highlighted in different colors to designate their syntactic role. It supports over 150 different languages and it can output to 8 different formats, including HTML, LaTeX and ODF. It can also output to ANSI color escape sequences, so that highlighted source code can be seen in a terminal.") (license gpl3+) (properties '((ftp-directory . "/gnu/src-highlite"))))) (define-public highlight (package (name "highlight") (version "3.54") (source (origin (method url-fetch) (uri (string-append "http://www.andre-simon.de/zip/highlight-" version ".tar.bz2")) (sha256 (base32 "1l6nxk3vwd7rkxpq9aqisjyps89r008wzn3abh4566q6jigahl4a")))) (build-system gnu-build-system) (arguments `(#:tests? #f ; no tests #:make-flags (let ((confdir (string-append %output "/share/highlight/config/"))) (list (string-append "PREFIX=" %output) (string-append "HL_CONFIG_DIR=" confdir) (string-append "conf_dir=" confdir))) #:phases (modify-phases %standard-phases (delete 'configure) ; no configure script (add-after 'unpack 'fix-search-for-lua (lambda _ (substitute* "src/makefile" (("(LUA_PKG_NAME=).*" _ assignment) (string-append assignment "lua-" ,(version-major+minor (package-version lua)) "\n"))) (substitute* "extras/swig/makefile" (("lua") (string-append "lua-" ,(version-major+minor (package-version lua))))) #t)) (add-after 'install 'install-perl-bindings (lambda* (#:key outputs #:allow-other-keys) (let* ((perldir (string-append (assoc-ref outputs "out") "/lib/perl5/site_perl/" ,(package-version perl))) (autodir (string-append perldir "/auto/highlight"))) (with-directory-excursion "extras/swig" (invoke "make" "perl") (invoke "perl" "-I" "." "testmod.pl") (install-file "highlight.pm" perldir) (install-file "highlight.so" autodir)) #t)))))) (inputs `(("lua" ,lua) ("boost" ,boost) ("perl" ,perl))) (native-inputs `(("pkg-config" ,pkg-config) ("swig" ,swig))) (home-page "http://www.andre-simon.de/doku/highlight/en/highlight.php") (synopsis "Convert code to documents with syntax highlighting") (description "Highlight converts source code to HTML, XHTML, RTF, LaTeX, TeX, SVG, BBCode and terminal escape sequences with colored syntax highlighting. Language definitions and color themes are customizable.") (license gpl3+)))