ci: add docker image build
Some checks failed
Build a docker image. / build-docker-image (push) Failing after 4s
Some checks failed
Build a docker image. / build-docker-image (push) Failing after 4s
This commit is contained in:
9
nix/lib.nix
Normal file
9
nix/lib.nix
Normal file
@@ -0,0 +1,9 @@
|
||||
{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)
|
||||
];
|
||||
}
|
||||
Reference in New Issue
Block a user