diff --git a/CMakeLists.txt b/CMakeLists.txt index 4d1cda9..211f751 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(hyprwayland-scanner DESCRIPTION "A hyprland version of wayland-scanner in and for C++" 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/flake.nix b/flake.nix index 57aee4b..6d4473b 100644 --- a/flake.nix +++ b/flake.nix @@ -29,13 +29,15 @@ (builtins.substring 4 2 longDate) (builtins.substring 6 2 longDate) ]); + + version = lib.removeSuffix "\n" (builtins.readFile ./VERSION); in { overlays = { default = self.overlays.hyprwayland-scanner; hyprwayland-scanner = final: prev: { hyprwayland-scanner = final.callPackage ./nix/default.nix { stdenv = final.gcc13Stdenv; - version = "0.1.0" + "+date=" + (mkDate (self.lastModifiedDate or "19700101")) + "_" + (self.shortRev or "dirty"); + version = version + "+date=" + (mkDate (self.lastModifiedDate or "19700101")) + "_" + (self.shortRev or "dirty"); }; }; };