From a232d2cd9a70999914d786efb6986e5a141ffc7f Mon Sep 17 00:00:00 2001 From: Thiago Kenji Okada Date: Fri, 22 Dec 2023 20:37:22 +0000 Subject: [PATCH] Set version in nix --- flake.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/flake.nix b/flake.nix index 6441cf1..2b104e3 100644 --- a/flake.nix +++ b/flake.nix @@ -9,7 +9,7 @@ outputs = { self, nixpkgs, ... }: let - version = builtins.substring 0 8 self.lastModifiedDate; + version = "nix-${self.shortRev or self.dirtyShortRev}"; supportedSystems = [ "x86_64-linux" "x86_64-darwin" "aarch64-linux" "aarch64-darwin" ]; @@ -40,6 +40,8 @@ darwin.apple_sdk_11_0.frameworks.UserNotifications ]; + ldflags = [ "-X=main.Version=${version}" ]; + meta = with pkgs.lib; { description = "Alerts every 20 minutes to look something at 20 feet away for 20 seconds"; homepage = "https://github.com/thiagokokada/twenty-twenty-twenty";