squirrel.scm 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. ;;; GNU Guix --- Functional package management for GNU
  2. ;;; Copyright © 2019 Li-cheng (Andy) Tai <atai@atai.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 squirrel)
  19. #:use-module (gnu packages)
  20. #:use-module (gnu packages cmake)
  21. #:use-module (gnu packages sphinx)
  22. #:use-module (guix build-system cmake)
  23. #:use-module (guix download)
  24. #:use-module ((guix licenses) #:prefix license:)
  25. #:use-module (guix build utils)
  26. #:use-module (guix packages)
  27. #:use-module (guix utils))
  28. (define-public squirrel
  29. (package
  30. (name "squirrel")
  31. (version "3.1")
  32. (source (origin
  33. (method url-fetch)
  34. (uri (string-append "mirror://sourceforge/squirrel/squirrel3/"
  35. "squirrel " version " stable/squirrel_"
  36. (string-join (string-split version #\.) "_")
  37. "_stable.tar.gz"))
  38. (file-name (string-append name "-" version ".tar.gz"))
  39. (sha256
  40. (base32
  41. "1jyh1523zrrnh9swanfrda0s14mvwc9431dh07g0nx74hbxsfia8"))))
  42. (build-system cmake-build-system)
  43. (arguments
  44. '(#:configure-flags '("-DDISABLE_STATIC=ON")
  45. #:tests? #f ; no tests
  46. #:phases
  47. (modify-phases %standard-phases
  48. (add-after 'install 'install-documentation
  49. (lambda* (#:key outputs #:allow-other-keys)
  50. (let* ((out (assoc-ref outputs "out"))
  51. (doc-dir (string-append out "/share/doc/squirrel")))
  52. (for-each
  53. (lambda (file)
  54. (install-file (string-append "../squirrel3/" file) doc-dir))
  55. '("COPYRIGHT" "HISTORY" "README"
  56. "doc/sqstdlib3.pdf" "doc/squirrel3.pdf")))
  57. #t))
  58. (add-after 'install 'install-headers
  59. (lambda* (#:key outputs #:allow-other-keys)
  60. (let* ((out (assoc-ref outputs "out"))
  61. (include-dir (string-append out "/include/squirrel")))
  62. (mkdir-p include-dir)
  63. (for-each
  64. (lambda (header-file)
  65. (copy-recursively header-file
  66. (string-append include-dir
  67. "/"
  68. (basename header-file))))
  69. (find-files "../squirrel3/include")))
  70. #t)))))
  71. (native-inputs
  72. `(("cmake" ,cmake-minimal)
  73. ("python-sphinx" ,python-sphinx)))
  74. (home-page "https://squirrel-lang.org/")
  75. (synopsis "High level imperative, object-oriented programming language")
  76. (description
  77. "Squirrel is a high level imperative, object-oriented programming
  78. language, designed to be a light-weight scripting language that fits in the
  79. size, memory bandwidth, and real-time requirements of applications like video
  80. games.")
  81. (license license:expat)))