Some checks failed
Build a docker image. / build-docker-image (push) Failing after 4s
10 lines
320 B
Nix
10 lines
320 B
Nix
{lib, ...}: let
|
|
firstNonNull = xs: lib.findFirst (x: x != null) "unknown" xs;
|
|
in {
|
|
gitRevOrLastModified = flake:
|
|
firstNonNull [
|
|
(lib.mapNullable (r: "git-" + r) (flake.shortRev or flake.rev or null))
|
|
(lib.mapNullable (n: "from-" + (lib.toLower n)) flake.sourceInfo.lastModifiedDate or null)
|
|
];
|
|
}
|