From b0fe4f6ec7516d61bf8eab2feb5b4bc3d5944f73 Mon Sep 17 00:00:00 2001 From: Dmitry Voronin Date: Tue, 7 May 2024 22:45:53 +0300 Subject: [PATCH] Template : Add SOURCE_DATE_EPOCH. --- user/common/template/Android.nix | 9 +++++---- user/common/template/Blank.nix | 2 ++ user/common/template/Latex.nix | 1 + user/common/template/Rust.nix | 1 + 4 files changed, 9 insertions(+), 4 deletions(-) diff --git a/user/common/template/Android.nix b/user/common/template/Android.nix index 39d9c8a1..d8ef3c0d 100644 --- a/user/common/template/Android.nix +++ b/user/common/template/Android.nix @@ -49,10 +49,11 @@ ]; buildInputs = with pkgs; []; - GRADLE_OPTS = "-Dorg.gradle.project.android.aapt2FromMavenOverride=${androidSdk}/libexec/android-sdk/build-tools/${buildTools}/aapt2"; - JAVA_HOME = "${jdk}"; - LD_LIBRARY_PATH = "${lib.makeLibraryPath buildInputs}"; - ANDROID_SDK_ROOT = "${androidSdk}/libexec/android-sdk/"; + GRADLE_OPTS = "-Dorg.gradle.project.android.aapt2FromMavenOverride = ${androidSdk}/libexec/android-sdk/build-tools/${buildTools}/aapt2"; + JAVA_HOME = "${jdk}"; + LD_LIBRARY_PATH = "${lib.makeLibraryPath buildInputs}"; + ANDROID_SDK_ROOT = "${androidSdk}/libexec/android-sdk/"; + SOURCE_DATE_EPOCH = "${toString(self.lastModified)}"; }; }; }; diff --git a/user/common/template/Blank.nix b/user/common/template/Blank.nix index ebcae41f..6d365668 100644 --- a/user/common/template/Blank.nix +++ b/user/common/template/Blank.nix @@ -14,6 +14,8 @@ default = pkgs.mkShell rec { nativeBuildInputs = with pkgs; [ ]; buildInputs = with pkgs; [ ]; + + SOURCE_DATE_EPOCH = "${toString(self.lastModified)}"; }; }; }; diff --git a/user/common/template/Latex.nix b/user/common/template/Latex.nix index cee148a4..131d42eb 100644 --- a/user/common/template/Latex.nix +++ b/user/common/template/Latex.nix @@ -47,6 +47,7 @@ tex ]; buildInputs = with pkgs; [ ]; + SOURCE_DATE_EPOCH = "${toString(self.lastModified)}"; }; }; }; diff --git a/user/common/template/Rust.nix b/user/common/template/Rust.nix index a50c097d..a3559a58 100644 --- a/user/common/template/Rust.nix +++ b/user/common/template/Rust.nix @@ -32,6 +32,7 @@ xorg.libXi ]; LD_LIBRARY_PATH = "${lib.makeLibraryPath buildInputs}"; + SOURCE_DATE_EPOCH = "${toString(self.lastModified)}"; }; }; }