all repos — searchix @ f08094f23aa4dc7d63a7c98b4429d88005fe3a2d

Search engine for NixOS, nix-darwin, home-manager and NUR users

build: use a nixpkgs-approved version scheme
Alan Pearce alan@alanpearce.eu
Tue, 14 May 2024 21:15:19 +0200
commit

f08094f23aa4dc7d63a7c98b4429d88005fe3a2d

parent

606030924bbfeec7a1ff42351c844bb20eb6dc08

2 files changed, 11 insertions(+), 1 deletions(-)

jump to
M flake.nixflake.nix
@@ -45,6 +45,7 @@ {           packages.default = callPackage ./nix/package.nix {
             inherit (gomod2nix.legacyPackages.${system}) buildGoApplication;
             css = simple-css;
+            inherit self;
           };
           devShells.default = callPackage ./nix/dev-shell.nix {
             pre-commit-check = {
M nix/package.nixnix/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