diff options
| author | Danny Milosavljevic <dannym@friendly-machines.com> | 2025-06-09 01:47:39 +0200 |
|---|---|---|
| committer | jgart <jgart@dismail.de> | 2025-06-14 14:24:37 -0500 |
| commit | 18a958a8f5a3da3efda77cd2c2b2ca2a3c4a0713 (patch) | |
| tree | 0fbdd496f08cfcf75c0f178ee1366f350cfa3246 /gnu | |
| parent | c2a77c9016c6991a5a2a6d2ba434735a2ba47395 (diff) | |
gnu: mono@6.12.0: Make it find libgdiplus, libX11 and unixodbc.
* gnu/packages/dotnet.scm (mono-6.12.0)[arguments]<#:phases>[configure-external-libs]:
New phase.
Fixes: #490
Change-Id: Ifd9f3eae7e2533227ec530a9886cdf2776910dda
Diffstat (limited to 'gnu')
| -rw-r--r-- | gnu/packages/dotnet.scm | 47 |
1 files changed, 45 insertions, 2 deletions
diff --git a/gnu/packages/dotnet.scm b/gnu/packages/dotnet.scm index cf59ae7a64e..bfbaf7edb94 100644 --- a/gnu/packages/dotnet.scm +++ b/gnu/packages/dotnet.scm | |||
| @@ -6,6 +6,7 @@ | |||
| 6 | #:use-module (gnu packages cmake) | 6 | #:use-module (gnu packages cmake) |
| 7 | #:use-module (gnu packages compression) | 7 | #:use-module (gnu packages compression) |
| 8 | #:use-module (gnu packages curl) | 8 | #:use-module (gnu packages curl) |
| 9 | #:use-module (gnu packages databases) | ||
| 9 | #:use-module (gnu packages flex) | 10 | #:use-module (gnu packages flex) |
| 10 | #:use-module (gnu packages gettext) | 11 | #:use-module (gnu packages gettext) |
| 11 | #:use-module (gnu packages pkg-config) | 12 | #:use-module (gnu packages pkg-config) |
| @@ -37,6 +38,7 @@ | |||
| 37 | #:use-module (guix git-download) | 38 | #:use-module (guix git-download) |
| 38 | #:use-module (guix gexp) | 39 | #:use-module (guix gexp) |
| 39 | #:use-module (guix utils) | 40 | #:use-module (guix utils) |
| 41 | #:use-module (guix build-system cmake) | ||
| 40 | #:use-module (guix build-system gnu) | 42 | #:use-module (guix build-system gnu) |
| 41 | #:use-module (guix build-system python) | 43 | #:use-module (guix build-system python) |
| 42 | #:use-module (ice-9 match)) | 44 | #:use-module (ice-9 match)) |
| @@ -1749,11 +1751,15 @@ most of the heavy lifting.") | |||
| 1749 | (native-inputs (modify-inputs (package-native-inputs mono-5.10.0) | 1751 | (native-inputs (modify-inputs (package-native-inputs mono-5.10.0) |
| 1750 | (replace "mono" mono-5.10.0))) | 1752 | (replace "mono" mono-5.10.0))) |
| 1751 | (inputs (modify-inputs (package-inputs mono-5.10.0) | 1753 | (inputs (modify-inputs (package-inputs mono-5.10.0) |
| 1752 | (append libgdiplus))) | 1754 | (append libgdiplus unixodbc))) |
| 1753 | (arguments | 1755 | (arguments |
| 1754 | (substitute-keyword-arguments | 1756 | (substitute-keyword-arguments |
| 1755 | (strip-keyword-arguments (list #:parallel-build?) | 1757 | (strip-keyword-arguments (list #:parallel-build?) |
| 1756 | (package-arguments mono-5.10.0)) | 1758 | (package-arguments mono-5.10.0)) |
| 1759 | ((#:modules modules '((guix build gnu-build-system) | ||
| 1760 | (guix build utils))) | ||
| 1761 | `((sxml simple) | ||
| 1762 | ,@modules)) | ||
| 1757 | ((#:make-flags make-flags #~'()) | 1763 | ((#:make-flags make-flags #~'()) |
| 1758 | #~(append #$make-flags | 1764 | #~(append #$make-flags |
| 1759 | (list | 1765 | (list |
| @@ -1861,4 +1867,41 @@ most of the heavy lifting.") | |||
| 1861 | (with-directory-excursion "mono/mini" | 1867 | (with-directory-excursion "mono/mini" |
| 1862 | (apply invoke "make" "check" make-flags)) | 1868 | (apply invoke "make" "check" make-flags)) |
| 1863 | (with-directory-excursion "mono/tests" | 1869 | (with-directory-excursion "mono/tests" |
| 1864 | (apply invoke "make" "check" make-flags))))))))))) | 1870 | (apply invoke "make" "check" make-flags))))) |
| 1871 | (add-after 'install 'configure-external-libs | ||
| 1872 | (lambda* (#:key inputs #:allow-other-keys) | ||
| 1873 | (let ((gac (string-append #$output | ||
| 1874 | "/lib/mono/gac")) | ||
| 1875 | (libgdiplus (search-input-file inputs "/lib/libgdiplus.so.0")) | ||
| 1876 | (libx11 (search-input-file inputs "/lib/libX11.so.6")) | ||
| 1877 | (unixodbc (search-input-file inputs "/lib/libodbc.so.2"))) | ||
| 1878 | ;;; gamin purposefully not fixed since nowadays mono can | ||
| 1879 | ;;; just use inotify--and does. | ||
| 1880 | (for-each | ||
| 1881 | (lambda (name) | ||
| 1882 | (call-with-output-file (string-append name ".config") | ||
| 1883 | (lambda (port) | ||
| 1884 | (sxml->xml | ||
| 1885 | `(configuration | ||
| 1886 | (dllmap (@ (dll "libodbc.so.2") | ||
| 1887 | (target ,unixodbc)))) | ||
| 1888 | port)))) | ||
| 1889 | (find-files gac "^System[.]Data[.]dll$")) | ||
| 1890 | (for-each | ||
| 1891 | (lambda (name) | ||
| 1892 | (call-with-output-file (string-append name ".config") | ||
| 1893 | (lambda (port) | ||
| 1894 | (sxml->xml | ||
| 1895 | `(configuration (dllmap (@ (dll "gdiplus") | ||
| 1896 | (target ,libgdiplus)))) | ||
| 1897 | port)))) | ||
| 1898 | (find-files gac "^System[.]Drawing[.]dll$")) | ||
| 1899 | (for-each | ||
| 1900 | (lambda (name) | ||
| 1901 | (call-with-output-file (string-append name ".config") | ||
| 1902 | (lambda (port) | ||
| 1903 | (sxml->xml | ||
| 1904 | `(configuration (dllmap (@ (dll "libX11") | ||
| 1905 | (target ,libx11)))) | ||
| 1906 | port)))) | ||
| 1907 | (find-files gac "^System[.]Windows[.]Forms[.]dll$"))))))))))) | ||
