nix: use HEAD commit's date for docker image creation and reproducible images

Signed-off-by: strawberry <strawberry@puppygock.gay>
This commit is contained in:
strawberry 2024-04-10 20:48:44 -04:00 committed by June
parent a94387dcdc
commit 354487fa10

View file

@ -74,6 +74,8 @@
env = pkgs: {
CONDUIT_VERSION_EXTRA = self.shortRev or self.dirtyShortRev;
# Debian makes builds reproducible through using the HEAD commit's date
TIMESTAMP = self.lastModified;
ROCKSDB_INCLUDE_DIR = "${rocksdb' pkgs}/include";
ROCKSDB_LIB_DIR = "${rocksdb' pkgs}/lib";
}
@ -233,6 +235,7 @@
pkgs.dockerTools.buildImage {
name = package.pname;
tag = "main";
created = "${env.TIMESTAMP}";
copyToRoot = [
pkgs.dockerTools.caCertificates
];
@ -253,6 +256,7 @@
pkgs.dockerTools.buildImage {
name = "${package.pname}-jemalloc";
tag = "main";
created = "${env.TIMESTAMP}";
copyToRoot = [
pkgs.dockerTools.caCertificates
];
@ -271,8 +275,9 @@
mkOciImageHMalloc = pkgs: packageHMalloc:
pkgs.dockerTools.buildImage {
name = "${package.pname}-hmalloc";
name = "${package.pname}-hmalloc";
tag = "main";
created = "${env.TIMESTAMP}";
copyToRoot = [
pkgs.dockerTools.caCertificates
];