about summary refs log tree commit diff stats
path: root/nix/package.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nix/package.nix')
-rw-r--r--nix/package.nix11
1 files changed, 10 insertions, 1 deletions
diff --git a/nix/package.nix b/nix/package.nix
index 8e1cf54..5e47c9b 100644
--- a/nix/package.nix
+++ b/nix/package.nix
@@ -11,10 +11,19 @@
   )
 , buildGoApplication ? pkgs.buildGoApplication
 , css
+, self
 }:
+let
+  inherit (builtins) concatStringsSep match;
+
+  version = concatStringsSep "-" (match
+    "([[:digit:]]{4})([[:digit:]]{2})([[:digit:]]{2}).*"
+    self.lastModifiedDate
+  );
+in
 buildGoApplication {
   pname = "searchix";
-  version = "0.1";
+  inherit version;
   src = with pkgs.lib.fileset; toSource {
     root = ../.;
     fileset = difference