diff options
| author | Seth Flynn <[email protected]> | 2025-03-30 21:38:57 -0400 |
|---|---|---|
| committer | Seth Flynn <[email protected]> | 2025-03-30 22:08:05 -0400 |
| commit | c8610cb1cdfe2ffc360a14ae52cee97d4e915035 (patch) | |
| tree | baf5276c413563539657f7638f2409eaa709b390 /nix/package.nix | |
| parent | b75b85d4a7130ee051004c187c0a5af00f449e6e (diff) | |
chore(nix): use date for version
Diffstat (limited to 'nix/package.nix')
| -rw-r--r-- | nix/package.nix | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/nix/package.nix b/nix/package.nix index 1c9cc4e..483c786 100644 --- a/nix/package.nix +++ b/nix/package.nix @@ -11,9 +11,27 @@ optimizeSize ? false, }: +let + inherit (self) lastModifiedDate; + date = + let + year = lib.substring 0 4 lastModifiedDate; + month = lib.substring 4 2 lastModifiedDate; + day = lib.substring 6 2 lastModifiedDate; + in + if (self ? "lastModifiedDate") then + lib.concatStringsSep "-" [ + year + month + day + ] + else + "0"; +in + rustPlatform.buildRustPackage { pname = "nixpkgs-tracker-bot"; - version = self.shortRev or self.dirtyShortRev or "unknown"; + version = "0.2.0-unstable-${date}"; src = lib.fileset.toSource { root = ../.; @@ -65,7 +83,7 @@ rustPlatform.buildRustPackage { }; meta = { - description = "A Discord app for tracking nixpkgs pull requests"; + description = "Discord app for tracking Nixpkgs pull requests"; homepage = "https://github.com/getchoo/nixpkgs-tracker-bot"; license = lib.licenses.mit; maintainers = [ lib.maintainers.getchoo ]; |
