projects/guix·blob javascript-team · refs

96 lines · 3.7 KiB

1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2025 Marcel Steinbeck <[email protected]>
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
19(define-module (gnu packages fusion)
20 #:use-module (gnu packages dlang)
21 #:use-module (gnu packages glib)
22 #:use-module (gnu packages icu4c)
23 #:use-module (gnu packages java)
24 #:use-module (gnu packages llvm)
25 #:use-module (gnu packages node)
26 #:use-module (gnu packages perl)
27 #:use-module (gnu packages pkg-config)
28 #:use-module (gnu packages python)
29 #:use-module (gnu packages python-check)
30 #:use-module (guix build-system gnu)
31 #:use-module (guix gexp)
32 #:use-module (guix git-download)
33 #:use-module (guix packages)
34 #:use-module (guix utils)
35 #:use-module ((guix licenses) #:prefix license:))
36
37(define-public fusion
38 (package
39 (name "fusion")
40 (version "3.2.13")
41 (source
42 (origin
43 (method git-fetch)
44 (uri (git-reference
45 (url "https://github.com/fusionlanguage/fut")
46 (commit (string-append "fut-" version))))
47 (file-name (git-file-name name version))
48 (sha256
49 (base32
50 "06qn098nbspz3srhb4n3fycsk75f2xala25gpyjryby3f5ijb9md"))))
51 (build-system gnu-build-system)
52 (outputs '("out" "doc"))
53 (arguments
54 (list
55 #:make-flags #~(list (string-append "CC=" #$(cc-for-target))
56 (string-append "prefix=" #$output))
57 #:test-target "test"
58 #:phases
59 #~(modify-phases %standard-phases
60 (delete 'configure)
61 (add-after 'unpack 'remove-unsupported-tests
62 (lambda _
63 (substitute* "Makefile"
64 ;; The following targets cannot be executed in the Guix build
65 ;; environment:
66 ;;
67 ;; test-cs - needs `dotnet'
68 ;; test-ts - tries to download packages
69 ;; test-swift - needs Swift
70 ;;
71 ;; We therefore remove them from the `test' target.
72 (("^(test:.*)test-cs (.*)test-ts (.*)test-swift (.*)$"
73 _ prefix a b suffix)
74 (string-append prefix a b suffix)))))
75 (add-after 'install 'install-doc
76 (lambda _
77 (let ((doc (string-append #$output:doc "/share/doc/fusion/")))
78 (mkdir-p doc)
79 (copy-recursively "doc" doc)))))))
80 (native-inputs
81 (list clang-13 ;; test-cl
82 dmd ;; test-d
83 glib ;; test-c
84 icu4c ;; test-cpp
85 node ;; test-js
86 `(,openjdk "jdk") ;; test-java
87 perl ;; for evaluating test results
88 pkg-config ;; test-c
89 python ;; test-py
90 python-mypy)) ;; test-py
91 (home-page "https://fusion-lang.org")
92 (synopsis "The Fusion programming language transpiler (fut)")
93 (description "Fusion is a programming language designed for implementing reusable
94components (libraries) for C, C++, C#, D, Java, JavaScript, Python, Swift,
95TypeScript and OpenCL C, all from single codebase.")
96 (license license:gpl3+)))