diff --git a/CMakeLists.txt b/CMakeLists.txt index 8500386..1707cb9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,6 +1,7 @@ cmake_minimum_required(VERSION 3.19) -set(VERSION 0.4.0) +file(READ "${CMAKE_SOURCE_DIR}/VERSION" VER_RAW) +string(STRIP ${VER_RAW} VERSION) project(hyprlock DESCRIPTION "A gpu-accelerated screen lock for Hyprland" diff --git a/VERSION b/VERSION new file mode 100644 index 0000000..1d0ba9e --- /dev/null +++ b/VERSION @@ -0,0 +1 @@ +0.4.0 diff --git a/nix/overlays.nix b/nix/overlays.nix index 414b1ae..d4ec360 100644 --- a/nix/overlays.nix +++ b/nix/overlays.nix @@ -7,6 +7,8 @@ (builtins.substring 4 2 longDate) (builtins.substring 6 2 longDate) ]); + + version = lib.removeSuffix "\n" (builtins.readFile ../VERSION); in { default = inputs.self.overlays.hyprlock; @@ -16,7 +18,7 @@ in { (final: prev: { hyprlock = prev.callPackage ./default.nix { stdenv = prev.gcc13Stdenv; - version = "0.pre" + "+date=" + (mkDate (inputs.self.lastModifiedDate or "19700101")) + "_" + (inputs.self.shortRev or "dirty"); + version = version + "+date=" + (mkDate (inputs.self.lastModifiedDate or "19700101")) + "_" + (inputs.self.shortRev or "dirty"); inherit (final) hyprlang; }; })