overlays: improve mkVersion

Add dash to mkVersionInput
Add mkVersionSrc for normal src.
This commit is contained in:
Moritz Böhme 2023-03-02 09:15:09 +01:00
parent 05631f016d
commit 8f6650bbd1
Signed by: moritz
GPG key ID: 970C6E89EB0547A9

View file

@ -5,7 +5,8 @@ let
(builtins.substring 4 2 longDate) (builtins.substring 4 2 longDate)
(builtins.substring 6 2 longDate) (builtins.substring 6 2 longDate)
]); ]);
mkVersionInput = input: "unstable" + mkDate (input.lastModifiedDate or "19700101") + "_" + (input.shortRev or "dirty"); mkVersionSrc = src: "unstable-" + builtins.substring 0 7 src.rev;
mkVersionInput = input: "unstable-" + mkDate (input.lastModifiedDate or "19700101") + "_" + (input.shortRev or "dirty");
in in
{ {
agenix = inputs.agenix.packages.${prev.system}.default; agenix = inputs.agenix.packages.${prev.system}.default;