diff options
| author | Julien Lepiller <julien@lepiller.eu> | 2021-08-05 02:57:32 +0200 |
|---|---|---|
| committer | Julien Lepiller <julien@lepiller.eu> | 2021-09-02 22:56:20 +0200 |
| commit | 5dac09e263d566ccf99776df97c47eed0d30c172 (patch) | |
| tree | 60cf8f44bd61f379ffdfcf308df558f4a7cc6946 | |
| parent | bc68f23aadd51527843a75476fa9e3d422e86151 (diff) | |
gnu: Add gitile.
* gnu/packages/version-control.scm (gitile): New variable.
| -rw-r--r-- | gnu/packages/version-control.scm | 94 |
1 files changed, 94 insertions, 0 deletions
diff --git a/gnu/packages/version-control.scm b/gnu/packages/version-control.scm index 22bf9b408f0..5f6379dbcdb 100644 --- a/gnu/packages/version-control.scm +++ b/gnu/packages/version-control.scm | |||
| @@ -39,6 +39,7 @@ | |||
| 39 | ;;; Copyright © 2021 LibreMiami <packaging-guix@libremiami.org> | 39 | ;;; Copyright © 2021 LibreMiami <packaging-guix@libremiami.org> |
| 40 | ;;; Copyright © 2021 Xinglu Chen <public@yoctocell.xyz> | 40 | ;;; Copyright © 2021 Xinglu Chen <public@yoctocell.xyz> |
| 41 | ;;; Copyright © 2021 François J. <francois-oss@avalenn.eu> | 41 | ;;; Copyright © 2021 François J. <francois-oss@avalenn.eu> |
| 42 | ;;; Copyright © 2021 Julien Lepiller <julien@lepiller.eu> | ||
| 42 | ;;; | 43 | ;;; |
| 43 | ;;; This file is part of GNU Guix. | 44 | ;;; This file is part of GNU Guix. |
| 44 | ;;; | 45 | ;;; |
| @@ -93,6 +94,7 @@ | |||
| 93 | #:use-module (gnu packages golang) | 94 | #:use-module (gnu packages golang) |
| 94 | #:use-module (gnu packages groff) | 95 | #:use-module (gnu packages groff) |
| 95 | #:use-module (gnu packages guile) | 96 | #:use-module (gnu packages guile) |
| 97 | #:use-module (gnu packages guile-xyz) | ||
| 96 | #:use-module (gnu packages image) | 98 | #:use-module (gnu packages image) |
| 97 | #:use-module (gnu packages linux) | 99 | #:use-module (gnu packages linux) |
| 98 | #:use-module (gnu packages mail) | 100 | #:use-module (gnu packages mail) |
| @@ -114,6 +116,7 @@ | |||
| 114 | #:use-module (gnu packages readline) | 116 | #:use-module (gnu packages readline) |
| 115 | #:use-module (gnu packages rsync) | 117 | #:use-module (gnu packages rsync) |
| 116 | #:use-module (gnu packages sqlite) | 118 | #:use-module (gnu packages sqlite) |
| 119 | #:use-module (gnu packages texinfo) | ||
| 117 | #:use-module (gnu packages admin) | 120 | #:use-module (gnu packages admin) |
| 118 | #:use-module (gnu packages xml) | 121 | #:use-module (gnu packages xml) |
| 119 | #:use-module (gnu packages emacs) | 122 | #:use-module (gnu packages emacs) |
| @@ -1524,6 +1527,97 @@ also walk each side of a merge and test those changes individually.") | |||
| 1524 | control to Git repositories.") | 1527 | control to Git repositories.") |
| 1525 | (license license:gpl2))) | 1528 | (license license:gpl2))) |
| 1526 | 1529 | ||
| 1530 | ;; gitile requires a more recent version than the latest release. | ||
| 1531 | (define guile-syntax-highlight-for-gitile | ||
| 1532 | (let ((commit "897fa5156ff41588e0d281eb00e4e94de63ccd8a") | ||
| 1533 | (revision "0")) | ||
| 1534 | (package | ||
| 1535 | (inherit guile-syntax-highlight) | ||
| 1536 | (version (git-version "0.1" revision commit)) | ||
| 1537 | (source (origin | ||
| 1538 | (method git-fetch) | ||
| 1539 | (uri (git-reference | ||
| 1540 | (url "https://git.dthompson.us/guile-syntax-highlight.git") | ||
| 1541 | (commit commit))) | ||
| 1542 | (file-name (git-file-name "guile-syntax-highlight" version)) | ||
| 1543 | (sha256 | ||
| 1544 | (base32 | ||
| 1545 | "18zlg4mkgd3swgv2ggfz91ivnnzc0zhvc9ybgrxg1y762va9hyvj")))) | ||
| 1546 | (native-inputs | ||
| 1547 | `(("autoconf" ,autoconf) | ||
| 1548 | ("automake" ,automake) | ||
| 1549 | ("texinfo" ,texinfo) | ||
| 1550 | ,@(package-native-inputs guile-syntax-highlight)))))) | ||
| 1551 | |||
| 1552 | (define-public gitile | ||
| 1553 | (package | ||
| 1554 | (name "gitile") | ||
| 1555 | (version "0.1.3") | ||
| 1556 | (source | ||
| 1557 | (origin | ||
| 1558 | (method git-fetch) | ||
| 1559 | (uri (git-reference | ||
| 1560 | (url "https://git.lepiller.eu/git/gitile") | ||
| 1561 | (commit version))) | ||
| 1562 | (file-name (git-file-name name version)) | ||
| 1563 | (sha256 | ||
| 1564 | (base32 "1fnmgrrsdc24mvicj2gkv3vasag7h5x27xc12w55i0id9vw7k9sw")))) | ||
| 1565 | (build-system gnu-build-system) | ||
| 1566 | (arguments | ||
| 1567 | `(#:imported-modules ((guix build guile-build-system) | ||
| 1568 | ,@%gnu-build-system-modules) | ||
| 1569 | #:make-flags (list "GUILE_AUTO_COMPILE=0") | ||
| 1570 | #:phases | ||
| 1571 | (modify-phases %standard-phases | ||
| 1572 | (add-after 'install-bin 'wrap-program | ||
| 1573 | (lambda* (#:key inputs outputs #:allow-other-keys) | ||
| 1574 | (use-modules (guix build guile-build-system)) | ||
| 1575 | ;; Wrap the 'gitile' command to refer to the right modules. | ||
| 1576 | (let* ((out (assoc-ref outputs "out")) | ||
| 1577 | (commonmark (assoc-ref inputs "guile-commonmark")) | ||
| 1578 | (git (assoc-ref inputs "guile-git")) | ||
| 1579 | (bytes (assoc-ref inputs "guile-bytestructures")) | ||
| 1580 | (fibers (assoc-ref inputs "guile-fibers")) | ||
| 1581 | (gcrypt (assoc-ref inputs "guile-gcrypt")) | ||
| 1582 | (syntax-highlight (assoc-ref inputs "guile-syntax-highlight")) | ||
| 1583 | (deps (list out commonmark git bytes fibers gcrypt | ||
| 1584 | syntax-highlight)) | ||
| 1585 | (guile (assoc-ref inputs "guile")) | ||
| 1586 | (effective (target-guile-effective-version)) | ||
| 1587 | (mods (string-drop-right ;drop trailing colon | ||
| 1588 | (string-join deps | ||
| 1589 | (string-append "/share/guile/site/" | ||
| 1590 | effective ":") | ||
| 1591 | 'suffix) | ||
| 1592 | 1)) | ||
| 1593 | (objs (string-drop-right | ||
| 1594 | (string-join deps | ||
| 1595 | (string-append "/lib/guile/" effective | ||
| 1596 | "/site-ccache:") | ||
| 1597 | 'suffix) | ||
| 1598 | 1))) | ||
| 1599 | (wrap-program (string-append out "/bin/gitile") | ||
| 1600 | `("GUILE_LOAD_PATH" ":" prefix (,mods)) | ||
| 1601 | `("GUILE_LOAD_COMPILED_PATH" ":" prefix (,objs))))))))) | ||
| 1602 | (native-inputs | ||
| 1603 | `(("autoconf" ,autoconf) | ||
| 1604 | ("automake" ,automake) | ||
| 1605 | ("guile" ,guile-3.0) | ||
| 1606 | ("pkg-config" ,pkg-config))) | ||
| 1607 | (inputs | ||
| 1608 | `(("guile" ,guile-3.0) | ||
| 1609 | ("guile-commonmark" ,guile-commonmark) | ||
| 1610 | ("guile-fibers" ,guile-fibers) | ||
| 1611 | ("guile-gcrypt" ,guile-gcrypt) | ||
| 1612 | ("guile-git" ,guile-git) | ||
| 1613 | ("guile-syntax-highlight" ,guile-syntax-highlight-for-gitile) | ||
| 1614 | ("gnutls" ,gnutls))) | ||
| 1615 | (home-page "https://git.lepiller.eu/gitile") | ||
| 1616 | (synopsis "Simple Git forge written in Guile") | ||
| 1617 | (description "Gitile is a Git forge written in Guile that lets you | ||
| 1618 | visualize your public Git repositories on a web interface.") | ||
| 1619 | (license license:agpl3+))) | ||
| 1620 | |||
| 1527 | (define-public pre-commit | 1621 | (define-public pre-commit |
| 1528 | (package | 1622 | (package |
| 1529 | (name "pre-commit") | 1623 | (name "pre-commit") |
