2023-03-07 11:25:53 +01:00
|
|
|
{ lib, ... }:
|
|
|
|
|
|
|
|
lib.makeExtensible (self: rec {
|
|
|
|
mkDate = longDate: lib.concatStringsSep "-" [
|
|
|
|
(builtins.substring 0 4 longDate)
|
|
|
|
(builtins.substring 4 2 longDate)
|
|
|
|
(builtins.substring 6 2 longDate)
|
|
|
|
];
|
|
|
|
mkVersionSrc = src: "unstable-" + builtins.substring 0 7 src.rev;
|
|
|
|
mkVersionInput = input:
|
|
|
|
let
|
|
|
|
date = mkDate (input.lastModifiedDate or "19700101");
|
|
|
|
rev = input.shortRev or "dirty";
|
|
|
|
in
|
2023-03-09 16:15:58 +01:00
|
|
|
"unstable-${date}_${rev}";
|
2023-03-07 11:25:53 +01:00
|
|
|
})
|