ada.scm 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. ;;; GNU Guix --- Functional package management for GNU
  2. ;;; Copyright © 2018 Danny Milosavljevic <dannym@scratchpost.org>
  3. ;;;
  4. ;;; This file is part of GNU Guix.
  5. ;;;
  6. ;;; GNU Guix is free software; you can redistribute it and/or modify it
  7. ;;; under the terms of the GNU General Public License as published by
  8. ;;; the Free Software Foundation; either version 3 of the License, or (at
  9. ;;; your option) any later version.
  10. ;;;
  11. ;;; GNU Guix is distributed in the hope that it will be useful, but
  12. ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
  13. ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. ;;; GNU General Public License for more details.
  15. ;;;
  16. ;;; You should have received a copy of the GNU General Public License
  17. ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
  18. (define-module (gnu packages ada)
  19. #:use-module ((guix licenses) #:prefix license:)
  20. #:use-module (guix build-system gnu)
  21. #:use-module (guix build-system python)
  22. #:use-module (guix packages)
  23. #:use-module (guix download)
  24. #:use-module (guix git-download)
  25. #:use-module (gnu packages)
  26. #:use-module (gnu packages check)
  27. #:use-module (gnu packages compression)
  28. #:use-module (gnu packages python)
  29. #:use-module (gnu packages python-xyz))
  30. (define-public python2-langkit
  31. (let ((commit "fe0bc8bf60dbd2937759810df76ac420d99fc15f")
  32. (revision "0"))
  33. (package
  34. (name "python2-langkit")
  35. (version (git-version "0.0.0" revision commit))
  36. (source (origin
  37. (method git-fetch)
  38. (uri (git-reference
  39. (url "https://github.com/AdaCore/langkit.git")
  40. (commit commit)))
  41. (sha256
  42. (base32
  43. "1abqgw2p8pb1pm54my5kkbbixfhc6l0bwajdv1xlzyrh31xki3wx"))
  44. (file-name (string-append name "-" version "-checkout"))))
  45. (build-system python-build-system)
  46. (propagated-inputs
  47. `(("python2-docutils" ,python2-docutils)
  48. ("python2-enum34" ,python2-enum34)
  49. ("python2-funcy" ,python2-funcy)
  50. ("python2-mako" ,python2-mako)))
  51. (arguments
  52. `(#:python ,python-2
  53. #:tests? #f)) ; Tests would requite gprbuild (Ada).
  54. (synopsis "Semantic analysis tool generator in Python")
  55. (description "@code{Langkit} is a tool whose purpose is to make it easy
  56. to create syntactic and semantic analysis engines. Write a language
  57. specification in our Python DSL and Langkit will generate for you an
  58. Ada library with bindings for the C and Python programming languages.")
  59. (home-page "https://github.com/AdaCore/langkit/")
  60. (license license:gpl3+)))) ; and gcc runtime library exception
  61. (define-public python2-libadalang
  62. (let ((commit "9b205e9bacdd50a68117727332e16fbef5f6ac49")
  63. (revision "0"))
  64. (package
  65. (name "python2-libadalang")
  66. (version (git-version "0.0.0" revision commit))
  67. (source (origin
  68. (method git-fetch)
  69. (uri (git-reference
  70. (url "https://github.com/AdaCore/libadalang.git")
  71. (commit commit)))
  72. (sha256
  73. (base32
  74. "06hsnzj2syqpq2yhg1bb0zil7ydbyqkdmkjbf8j9b5sdgkyh5xrp"))
  75. (file-name (string-append name "-" version "-checkout"))))
  76. (build-system python-build-system)
  77. (native-inputs
  78. `(("python2-langkit" ,python2-langkit)
  79. ("python2-quex" ,python2-quex-0.67.3)))
  80. (arguments
  81. `(#:python ,python-2
  82. #:phases
  83. (modify-phases %standard-phases
  84. (replace 'build
  85. (lambda _
  86. (invoke "python2" "ada/manage.py" "generate")
  87. (invoke "python2" "ada/manage.py" "build")))
  88. (replace 'check
  89. (lambda _
  90. (invoke "python2" "ada/manage.py" "test")))
  91. (replace 'install
  92. (lambda* (#:key outputs #:allow-other-keys)
  93. (let* ((out (assoc-ref outputs "out")))
  94. (invoke "python2" "ada/manage.py" "install" out)))))))
  95. (synopsis "Semantic Analysis for Ada in Python")
  96. (description "@code{libadalang} provides a high-performance semantic
  97. engine for the Ada programming language.")
  98. (home-page "https://github.com/AdaCore/libadalang")
  99. (license license:gpl3)))) ; and gcc runtime gcc lib exception