gnu: mono@2.4.2.3: Make it reproducible.

* gnu/packages/patches/mono-2.4.2.3-fix-parallel-builds.patch: New file.
* gnu/packages/patches/mono-2.4.2.3-reproducibility.patch: New file.
* gnu/local.mk (dist_patch_DATA): Add references to those patches.
* gnu/packages/dotnet.scm (mono-2.4.2.3)[source]: Use those patches.
[arguments]<#:phases>[disable-mono-mini-timestamps]: New phase.

Change-Id: Ib0a57d2e93b8b72c10fa9854a77eadeee578266c
Reviewed-by: Ludovic Courtès <ludo@gnu.org>
Signed-off-by: Sharlatan Hellseher <sharlatanus@gmail.com>
This commit is contained in:
Danny Milosavljevic 2025-06-10 17:15:08 +02:00 committed by Sharlatan Hellseher
parent 4f10384b54
commit fd256bb786
No known key found for this signature in database
GPG key ID: 76D727BFF62CD2B5
5 changed files with 90 additions and 12 deletions

View file

@ -497,7 +497,9 @@ a C-style programming language from Microsoft that is very similar to Java.")
(modules '((guix build utils)
(ice-9 string-fun)))
(snippet prepare-mono-source)
(patches (search-patches "mono-2.4.2.3-fixes.patch"))))
(patches (search-patches "mono-2.4.2.3-reproducibility.patch"
"mono-2.4.2.3-fixes.patch"
"mono-2.4.2.3-fix-parallel-builds.patch"))))
(native-inputs (modify-inputs (package-native-inputs mono-1.9.1)
(replace "mono" mono-1.9.1)))
(inputs (modify-inputs (package-inputs mono-1.9.1)
@ -513,6 +515,13 @@ a C-style programming language from Microsoft that is very similar to Java.")
#f)
((#:phases phases #~%standard-phases)
#~(modify-phases #$phases
(add-after 'unpack 'disable-mono-mini-timestamps
(lambda _
;; Note: Newer monos have mono/mini/Makefile.am.in .
(substitute* '("mono/mini/Makefile.am")
(("`date`")
;; This timestamp is the same as SOURCE_DATE_EPOCH.
"Tue Jan 1 12:00:00 AM UTC 1980"))))
(add-before 'bootstrap 'patch-sub-autogen.sh-shebang
(lambda _
(patch-shebang "eglib/autogen.sh")))))))