gnu: arcanist: Update to 0.0.0-2.ceb082e.
[jackhill/guix/guix.git] / gnu / packages / phabricator.scm
CommitLineData
0a059eae
RT
1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2018 Robin Templeton <robin@igalia.com>
c4c625b3 3;;; Copyright © 2020 Efraim Flashner <efraim@flashner.co.il>
0a059eae
RT
4;;;
5;;; This file is part of GNU Guix.
6;;;
7;;; GNU Guix is free software; you can redistribute it and/or modify it
8;;; under the terms of the GNU General Public License as published by
9;;; the Free Software Foundation; either version 3 of the License, or (at
10;;; your option) any later version.
11;;;
12;;; GNU Guix is distributed in the hope that it will be useful, but
13;;; WITHOUT ANY WARRANTY; without even the implied warranty of
14;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15;;; GNU General Public License for more details.
16;;;
17;;; You should have received a copy of the GNU General Public License
18;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
19
20(define-module (gnu packages phabricator)
21 #:use-module (gnu packages php)
22 #:use-module (gnu packages version-control)
23 #:use-module (guix build-system gnu)
24 #:use-module (guix git-download)
25 #:use-module ((guix licenses) #:prefix license:)
26 #:use-module (guix packages))
27
28(define-public libphutil
29 (let ((commit "b29d76e1709ef018cc5edc7c03033fd9fdebc578")
30 (revision "1"))
31 (package
32 (name "libphutil")
33 (version (git-version "0.0.0" revision commit))
34 (source (origin
35 (method git-fetch)
36 (uri (git-reference
b0e7b699 37 (url "https://github.com/phacility/libphutil")
0a059eae
RT
38 (commit commit)))
39 (file-name (git-file-name name version))
40 (sha256
41 (base32
42 "06j84721r9r8624fmil62b5crs2qs0v6rr3cvv2zvkvwhxwrwv1l"))))
43 (build-system gnu-build-system)
44 ;; TODO: Unbundle jsonlint and porter-stemmer.
45 (arguments
46 '(#:tests? #f
47 #:phases
48 (modify-phases %standard-phases
49 (delete 'configure)
50 (delete 'build)
51 (replace 'install
52 (lambda _
53 (let ((lib (string-append %output "/lib/libphutil")))
54 (mkdir-p lib)
55 (copy-recursively "." lib))
56 #t)))))
57 (inputs
58 `(("php" ,php)))
59 (home-page "https://github.com/phacility/libphutil")
60 (synopsis "PHP utility library")
61 (description
62 "@code{libphutil} is a collection of utility classes and functions for
63PHP.")
64 ;; Bundled libraries are expat-licensed.
65 (license (list license:asl2.0 license:expat)))))
66
67(define-public arcanist
c4c625b3
EF
68 (let ((commit "ceb082ef6b2919d76a90d4a53ca84f5b1e0c2c06")
69 (revision "2"))
0a059eae
RT
70 (package
71 (name "arcanist")
72 (version (git-version "0.0.0" revision commit))
73 (source (origin
74 (method git-fetch)
75 (uri (git-reference
b0e7b699 76 (url "https://github.com/phacility/arcanist")
0a059eae
RT
77 (commit commit)))
78 (file-name (git-file-name name version))
79 (sha256
80 (base32
c4c625b3 81 "16590nywh3cpm2yq4igw3nfa8g84kwza215mrnqr2k6b2cqzjak3"))))
0a059eae 82 (build-system gnu-build-system)
c4c625b3 83 ;; TODO: Unbundle jsonlint
0a059eae
RT
84 (arguments
85 '(#:tests? #f
86 #:phases
87 (modify-phases %standard-phases
88 (delete 'configure)
89 (delete 'build)
90 (replace 'install
c4c625b3
EF
91 (lambda* (#:key outputs #:allow-other-keys)
92 (let* ((out (assoc-ref outputs "out"))
93 (bin (string-append out "/bin"))
94 (lib (string-append out "/lib/arcanist")))
0a059eae
RT
95 (mkdir-p lib)
96 (copy-recursively "." lib)
97 (mkdir-p bin)
98 (symlink (string-append lib "/bin/arc")
99 (string-append bin "/arc"))
100 (wrap-program (string-append bin "/arc")
0a059eae
RT
101 `("PATH" ":" prefix
102 (,@(map (lambda (i)
103 (string-append (assoc-ref %build-inputs i) "/bin"))
c4c625b3 104 '("php" "git" "mercurial" "subversion"))))))
0a059eae
RT
105 #t))
106 (add-before 'reset-gzip-timestamps 'make-compressed-files-writable
107 (lambda _
108 (for-each make-file-writable
109 (find-files %output ".*\\.t?gz$"))
110 #t)))))
111 (inputs
112 `(("php" ,php)
0a059eae
RT
113 ("git" ,git)
114 ("mercurial" ,mercurial)
115 ("subversion" ,subversion)))
116 (home-page "https://github.com/phacility/arcanist")
117 (synopsis "Command-line interface for Phabricator")
118 (description
119 "Arcanist is the command-line tool for the Phabricator software
120development service. It allows you to interact with Phabricator installs to
121send code for review, download patches, transfer files, view status, make API
122calls, and various other things.")
c4c625b3
EF
123 ;; Bundled libraries are expat-licensed.
124 (license (list license:asl2.0 license:expat)))))