about summary refs log tree commit diff
path: root/pkgs/os-specific
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2016-02-01 15:36:05 +0100
committerEelco Dolstra <eelco.dolstra@logicblox.com>2016-02-01 18:19:23 +0100
commit72a30ae66ff21a1cda46f6a0abf3d25094c99b9b (patch)
tree3a28c2496bbbaa72e632a9e8f0ef64a4d2e252ef /pkgs/os-specific
parent0a7cd3c110a45e1a96cb283767b7c61e6704a27b (diff)
linux: Use $SOURCE_DATE_EPOCH as the build timestamp
Diffstat (limited to 'pkgs/os-specific')
-rw-r--r--pkgs/os-specific/linux/kernel/generic.nix4
-rw-r--r--pkgs/os-specific/linux/kernel/manual-config.nix3
2 files changed, 2 insertions, 5 deletions
diff --git a/pkgs/os-specific/linux/kernel/generic.nix b/pkgs/os-specific/linux/kernel/generic.nix
index 59d3642e62278..af14434b08f2c 100644
--- a/pkgs/os-specific/linux/kernel/generic.nix
+++ b/pkgs/os-specific/linux/kernel/generic.nix
@@ -57,10 +57,6 @@ let
     autoModules = stdenv.platform.kernelAutoModules;
     arch = stdenv.platform.kernelArch;
 
-    preConfigure = ''
-        buildFlagsArray+=("KBUILD_BUILD_TIMESTAMP=Thu Jan 1 00:00:01 UTC 1970")
-    '';
-
     crossAttrs = let
         cp = stdenv.cross.platform;
       in {
diff --git a/pkgs/os-specific/linux/kernel/manual-config.nix b/pkgs/os-specific/linux/kernel/manual-config.nix
index 4a826ff7ae3d1..2b1e55a880a02 100644
--- a/pkgs/os-specific/linux/kernel/manual-config.nix
+++ b/pkgs/os-specific/linux/kernel/manual-config.nix
@@ -102,7 +102,8 @@ let
         make $makeFlags "''${makeFlagsArray[@]}" oldconfig
         runHook postConfigure
 
-        buildFlagsArray+=("KBUILD_BUILD_TIMESTAMP=Thu Jan 1 00:00:01 UTC 1970")
+        # Note: we can get rid of this once http://permalink.gmane.org/gmane.linux.kbuild.devel/13800 is merged.
+        buildFlagsArray+=("KBUILD_BUILD_TIMESTAMP=$(date -u -d @$SOURCE_DATE_EPOCH)")
       '';
 
       buildFlags = [