mirror of
https://gitlab.com/famedly/conduit.git
synced 2025-09-05 18:41:00 +00:00
fix: make cross build work
This commit is contained in:
parent
6682530ea5
commit
97e36dc237
2 changed files with 9 additions and 17 deletions
|
@ -61,6 +61,13 @@
|
||||||
# See also `rust-toolchain.toml`
|
# See also `rust-toolchain.toml`
|
||||||
sha256 = "sha256-AJ6LX/Q/Er9kS15bn9iflkUwcgYqRQxiOIL2ToVAXaU=";
|
sha256 = "sha256-AJ6LX/Q/Er9kS15bn9iflkUwcgYqRQxiOIL2ToVAXaU=";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# The timestamp of the last commit in ISO 8601 format
|
||||||
|
timestamp = pkgs.lib.strings.trim (builtins.readFile (
|
||||||
|
pkgs.runCommand "iso-timestamp" {} ''
|
||||||
|
date -u -d "@${toString inputs.self.lastModified}" +%Y-%m-%dT%H:%M:%SZ > $out
|
||||||
|
''
|
||||||
|
));
|
||||||
});
|
});
|
||||||
in
|
in
|
||||||
inputs.flake-utils.lib.eachDefaultSystem (system:
|
inputs.flake-utils.lib.eachDefaultSystem (system:
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
, inputs
|
, inputs
|
||||||
, lib
|
, lib
|
||||||
, pkgs
|
, pkgs
|
||||||
|
, timestamp
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
# See https://github.com/krallin/tini/pull/223
|
# See https://github.com/krallin/tini/pull/223
|
||||||
|
@ -14,27 +15,11 @@ let
|
||||||
})
|
})
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
# This is a unix timestamp of the last commit
|
|
||||||
timestamp = inputs.self.lastModified;
|
|
||||||
|
|
||||||
# Convert the timestamp to an ISO 8601 string
|
|
||||||
iso = builtins.readFile (
|
|
||||||
pkgs.runCommand "timestamp" {
|
|
||||||
when = timestamp;
|
|
||||||
nativeBuildInputs = [ pkgs.coreutils ];
|
|
||||||
} ''
|
|
||||||
date -u -d "@$when" +%Y-%m-%dT%H:%M:%SZ > $out
|
|
||||||
''
|
|
||||||
);
|
|
||||||
|
|
||||||
# Remove trailing newline
|
|
||||||
isoTrimmed = lib.strings.trim iso;
|
|
||||||
in
|
in
|
||||||
dockerTools.buildImage {
|
dockerTools.buildImage {
|
||||||
name = default.pname;
|
name = default.pname;
|
||||||
tag = "next";
|
tag = "next";
|
||||||
created = isoTrimmed;
|
created = timestamp;
|
||||||
copyToRoot = [
|
copyToRoot = [
|
||||||
dockerTools.caCertificates
|
dockerTools.caCertificates
|
||||||
];
|
];
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue