unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
blob 467e6d68d1aa3b4e102f99d686852ce1e8c876ea 936 bytes (raw)
name: gnu/packages/patches/julia-SOURCE_DATE_EPOCH-mtime.patch 	 # note: path name is non-authoritative(*)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
 
From e4dc28db1d70819505fd1a68fd9d2bfc4fb61a7d Mon Sep 17 00:00:00 2001
From: nixo <nicolo@nixo.xyz>
Date: Fri, 17 Jan 2020 11:28:30 +0100
Subject: [PATCH] base: loading: support fake mtime with SOURCE_DATE_EPCOCH

Do this when loading libraries
---
 base/loading.jl | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/base/loading.jl b/base/loading.jl
index 7f11a2d4fc..1b4686d1dc 100644
--- a/base/loading.jl
+++ b/base/loading.jl
@@ -807,7 +807,10 @@ function _include_dependency(mod::Module, _path::AbstractString)
         path = normpath(joinpath(dirname(prev), _path))
     end
     if _track_dependencies[]
-        push!(_require_dependencies, (mod, path, mtime(path)))
+        push!(_require_dependencies,
+              (mod, path,
+               haskey(ENV, "SOURCE_DATE_EPOCH") ?
+               parse(Float64, ENV["SOURCE_DATE_EPOCH"]) : mtime(path)))
     end
     return path, prev
 end
-- 
2.24.1


debug log:

solving 467e6d68d1 ...
found 467e6d68d1 in https://yhetil.org/guix-patches/87d0bcly8f.fsf@guixSD.i-did-not-set--mail-host-address--so-tickle-me/

applying [1/1] https://yhetil.org/guix-patches/87d0bcly8f.fsf@guixSD.i-did-not-set--mail-host-address--so-tickle-me/
diff --git a/gnu/packages/patches/julia-SOURCE_DATE_EPOCH-mtime.patch b/gnu/packages/patches/julia-SOURCE_DATE_EPOCH-mtime.patch
new file mode 100644
index 0000000000..467e6d68d1

1:33: trailing whitespace.
-- 
Checking patch gnu/packages/patches/julia-SOURCE_DATE_EPOCH-mtime.patch...
1:35: new blank line at EOF.
+
Applied patch gnu/packages/patches/julia-SOURCE_DATE_EPOCH-mtime.patch cleanly.
warning: 2 lines add whitespace errors.

index at:
100644 467e6d68d1aa3b4e102f99d686852ce1e8c876ea	gnu/packages/patches/julia-SOURCE_DATE_EPOCH-mtime.patch

(*) Git path names are given by the tree(s) the blob belongs to.
    Blobs themselves have no identifier aside from the hash of its contents.^

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).