| 1 | ;;; GNU Guix --- Functional package management for GNU |
| 2 | ;;; Copyright © 2018 Robin Templeton <robin@igalia.com> |
| 3 | ;;; Copyright © 2020 Efraim Flashner <efraim@flashner.co.il> |
| 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 arcanist |
| 29 | (let ((commit "ceb082ef6b2919d76a90d4a53ca84f5b1e0c2c06") |
| 30 | (revision "2")) |
| 31 | (package |
| 32 | (name "arcanist") |
| 33 | (version (git-version "0.0.0" revision commit)) |
| 34 | (source (origin |
| 35 | (method git-fetch) |
| 36 | (uri (git-reference |
| 37 | (url "https://github.com/phacility/arcanist") |
| 38 | (commit commit))) |
| 39 | (file-name (git-file-name name version)) |
| 40 | (sha256 |
| 41 | (base32 |
| 42 | "16590nywh3cpm2yq4igw3nfa8g84kwza215mrnqr2k6b2cqzjak3")))) |
| 43 | (build-system gnu-build-system) |
| 44 | ;; TODO: Unbundle jsonlint |
| 45 | (arguments |
| 46 | '(#:tests? #f |
| 47 | #:phases |
| 48 | (modify-phases %standard-phases |
| 49 | (delete 'configure) |
| 50 | (delete 'build) |
| 51 | (replace 'install |
| 52 | (lambda* (#:key outputs #:allow-other-keys) |
| 53 | (let* ((out (assoc-ref outputs "out")) |
| 54 | (bin (string-append out "/bin")) |
| 55 | (lib (string-append out "/lib/arcanist"))) |
| 56 | (mkdir-p lib) |
| 57 | (copy-recursively "." lib) |
| 58 | (mkdir-p bin) |
| 59 | (symlink (string-append lib "/bin/arc") |
| 60 | (string-append bin "/arc")) |
| 61 | (wrap-program (string-append bin "/arc") |
| 62 | `("PATH" ":" prefix |
| 63 | (,@(map (lambda (i) |
| 64 | (string-append (assoc-ref %build-inputs i) "/bin")) |
| 65 | '("php" "git" "mercurial" "subversion")))))) |
| 66 | #t)) |
| 67 | (add-before 'reset-gzip-timestamps 'make-compressed-files-writable |
| 68 | (lambda _ |
| 69 | (for-each make-file-writable |
| 70 | (find-files %output ".*\\.t?gz$")) |
| 71 | #t))))) |
| 72 | (inputs |
| 73 | `(("php" ,php) |
| 74 | ("git" ,git) |
| 75 | ("mercurial" ,mercurial) |
| 76 | ("subversion" ,subversion))) |
| 77 | (home-page "https://github.com/phacility/arcanist") |
| 78 | (synopsis "Command-line interface for Phabricator") |
| 79 | (description |
| 80 | "Arcanist is the command-line tool for the Phabricator software |
| 81 | development service. It allows you to interact with Phabricator installs to |
| 82 | send code for review, download patches, transfer files, view status, make API |
| 83 | calls, and various other things.") |
| 84 | ;; Bundled libraries are expat-licensed. |
| 85 | (license (list license:asl2.0 license:expat))))) |
| 86 | |
| 87 | (define-public libphutil |
| 88 | (deprecated-package "libphutil" arcanist)) |