Commit | Line | Data |
---|---|---|
763b3d50 JN |
1 | ;;; GNU Guix --- Functional package management for GNU |
2 | ;;; Copyright © 2016 Jan Nieuwenhuizen <janneke@gnu.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 | ||
19 | (define-module (gnu packages mono) | |
20 | #:use-module ((guix licenses) #:prefix license:) | |
21 | #:use-module (gnu packages gettext) | |
22 | #:use-module (gnu packages glib) | |
23 | #:use-module (gnu packages perl) | |
24 | #:use-module (gnu packages python) | |
25 | #:use-module (gnu packages xml) | |
26 | #:use-module (gnu packages) | |
27 | #:use-module (guix packages) | |
28 | #:use-module (guix download) | |
29 | #:use-module (guix git-download) | |
30 | #:use-module (guix build-system gnu)) | |
31 | ||
32 | (define-public mono | |
33 | (package | |
34 | (name "mono") | |
35 | (version "4.4.1.0") | |
36 | (source (origin | |
37 | (method url-fetch) | |
38 | (uri (string-append | |
39 | "http://download.mono-project.com/sources/mono/" | |
40 | name "-" version | |
41 | ".tar.bz2")) | |
42 | (sha256 | |
43 | (base32 | |
44 | "0jibyvyv2jy8dq5ij0j00iq3v74r0y90dcjc3dkspcfbnn37cphn")))) | |
45 | (build-system gnu-build-system) | |
46 | (native-inputs | |
b94a6ca0 | 47 | `(("gettext" ,gettext-minimal) |
763b3d50 JN |
48 | ("glib" ,glib) |
49 | ("libxslt" ,libxslt) | |
50 | ("perl" ,perl) | |
51 | ("python" ,python-2))) | |
52 | (arguments | |
53 | `(#:phases | |
54 | (modify-phases %standard-phases | |
55 | (add-after 'unpack 'set-env | |
56 | (lambda _ ;;* (#:key inputs #:allow-other-keys) | |
57 | ;; all tests under mcs/class fail trying to access $HOME | |
58 | (setenv "HOME" "/tmp"))) | |
59 | (add-after 'unpack 'patch-tests | |
60 | (lambda _ ;;* (#:key inputs #:allow-other-keys) | |
61 | (substitute* "mono/tests/Makefile.in" | |
62 | ;; does not build: no rule to make unhandled-exception-* | |
63 | (("@test-unhandled-exception-2:" all) | |
64 | (string-append all "#"))) | |
65 | (substitute* "mcs/tools/mono-symbolicate/Makefile" | |
66 | ;; does not build: Source file `Test/StackTraceDumper.cs' | |
67 | ;; could not be found | |
68 | (("^check: test-local") "check:\ntest-local:") | |
69 | (("^test-local: all") "disabled-test-local:")) | |
70 | (substitute* "mono/unit-tests/Makefile.in" | |
71 | ;; test fails | |
72 | (("^test-sgen-qsort.log:") | |
73 | "disabled-test-sgen-qsort.log:\ntest-sgen-qsort.log:")) | |
74 | ;; tests fail, trying to access $HOME | |
75 | (substitute* "mcs/class/Makefile" | |
76 | (("^include ../build/rules.make" all) | |
77 | (string-append | |
78 | all | |
79 | "\nrun-test-recursive:\n\t@echo skipping tests\n"))) | |
80 | ;; tests fail, trying to access $HOME | |
81 | (substitute* "mcs/class/Microsoft.Build.Tasks/Makefile" | |
82 | (("^include ../../build/rules.make" all) | |
83 | (string-append | |
84 | all | |
85 | "\nrun-test-recursive:\n\t@echo skipping tests\n"))) | |
86 | (substitute* '("mcs/tools/mono-shlib-cop/Makefile" | |
87 | "mcs/tools/mdoc/Makefile") | |
88 | (("^run-test-local:" all) | |
89 | (string-append "#" all))) | |
90 | (substitute* "mcs/tools/sqlmetal/Makefile" | |
91 | (("^include ../../build/rules.make" all) | |
92 | (string-append | |
93 | "NO_TEST:=true\n" | |
94 | all | |
95 | "\nrun-test-lib:\n\t@echo skipping test\n")))))) | |
96 | ;; these 4 tests fail | |
97 | #:make-flags `(,(string-append "PLATFORM_DISABLED_TESTS=" | |
98 | " appdomain-unload.exe" | |
99 | " delegate2.exe" | |
100 | " finally_guard.exe" | |
101 | " remoting4.exe")) | |
102 | ;; running tests in parallel fails | |
103 | #:parallel-tests? #f)) | |
104 | (synopsis "Compiler and libraries for the C# programming language") | |
105 | (description "Mono is a compiler, vm, debugger and set of libraries for | |
106 | C#, a C-style programming language from Microsoft that is very similar to | |
107 | Java.") | |
108 | (home-page "http://mono-project.com/") | |
109 | (license license:x11))) |