From f08094f23aa4dc7d63a7c98b4429d88005fe3a2d Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Tue, 14 May 2024 21:15:19 +0200 Subject: build: use a nixpkgs-approved version scheme --- nix/package.nix | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'nix') 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 -- cgit 1.4.1