phabricator.scm 3.6 KB

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