3
5
Fork 0
mirror of git://git.savannah.gnu.org/guix.git synced 2023-12-14 03:33:07 +01:00
guix/gnu/packages/patches/mono-mdoc-timestamping.patch
Danny Milosavljevic bc0d24292d
gnu: mono: Make build reproducible.
* gnu/packages/patches/mono-mdoc-timestamping.patch: New file.
* gnu/local.mk (dist_patch_DATA): Add it.
* gnu/packages/mono.scm (mono)[source]: Use patch.
[arguments]<#:phases>[make-reproducible]: New phase.
<#:phases>[set-env]: Set SOURCE_DATE_EPOCH.
2018-11-27 00:36:47 +01:00

15 lines
623 B
Diff

--- mono-4.4.1/mcs/class/monodoc/Monodoc/storage/ZipStorage.cs.orig 2018-11-26 22:16:25.008879747 +0100
+++ mono-4.4.1/mcs/class/monodoc/Monodoc/storage/ZipStorage.cs 2018-11-26 22:21:53.969770985 +0100
@@ -74,6 +74,12 @@
id = GetNewCode ();
ZipEntry entry = new ZipEntry (id);
+ var SOURCE_DATE_EPOCH_string = Environment.GetEnvironmentVariable("SOURCE_DATE_EPOCH");
+ if (SOURCE_DATE_EPOCH_string != null)
+ {
+ var SOURCE_DATE_EPOCH = Convert.ToInt64(SOURCE_DATE_EPOCH_string);
+ entry.DateTime = new DateTime(SOURCE_DATE_EPOCH, DateTimeKind.Utc);
+ }
zipOutput.PutNextEntry (entry);
}