gnu: dealii: Update to 8.5.0.
[jackhill/guix/guix.git] / gnu / packages / nim.scm
CommitLineData
84aafbbb
JMSG
1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2017 José Miguel Sánchez García <jmi2k@openmailbox.org>
6eed2644 3;;; Copyright © 2017 Efraim Flashner <efraim@flashner.co.il>
84aafbbb
JMSG
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 nim)
21 #:use-module (guix build-system gnu)
22 #:use-module (guix download)
23 #:use-module ((guix licenses) #:prefix license:)
24 #:use-module (guix packages))
25
26(define-public nim
27 (package
28 (name "nim")
6eed2644 29 (version "0.17.0")
84aafbbb
JMSG
30 (source
31 (origin
32 (method url-fetch)
6eed2644 33 (uri (string-append "https://nim-lang.org/download/"
84aafbbb
JMSG
34 name "-" version ".tar.xz"))
35 (sha256
36 (base32
6eed2644 37 "16vsmk4rqnkg9lc9h9jk62ps0x778cdqg6qrs3k6fv2g73cqvq9n"))))
84aafbbb
JMSG
38 (build-system gnu-build-system)
39 (arguments
40 `(#:tests? #f ; No tests.
41 #:phases
42 (modify-phases %standard-phases
43 (delete 'configure)
44 (add-after 'unpack 'patch-installer
45 (lambda* (#:key outputs #:allow-other-keys)
46 (let ((out (assoc-ref outputs "out")))
47 (substitute* "install.sh"
48 (("1/nim") "1"))
49 #t)))
6eed2644
EF
50 (add-after 'patch-source-shebangs 'patch-more-shebangs
51 (lambda _
52 (substitute* (append '("tests/stdlib/tosprocterminate.nim"
53 "lib/pure/osproc.nim")
54 (find-files "c_code" "stdlib_osproc.c"))
55 (("/bin/sh") (which "sh")))
56 #t))
57 (replace 'build
58 (lambda _
59 (zero? (system* "sh" "build.sh"))))
84aafbbb
JMSG
60 (replace 'install
61 (lambda* (#:key outputs #:allow-other-keys)
62 (let ((out (assoc-ref outputs "out")))
63 (zero? (system* "./install.sh" out))))))))
6eed2644 64 (home-page "https://nim-lang.org")
84aafbbb
JMSG
65 (synopsis "Statically-typed, imperative programming language")
66 (description "Nim (formerly known as Nimrod) is a statically-typed,
67imperative programming language that tries to give the programmer ultimate power
68without compromises on runtime efficiency. This means it focuses on compile-time
69mechanisms in all their various forms.")
70 (license license:expat)))