CMake, Nix: add VERSION file

This commit is contained in:
Mihai Fufezan 2024-07-18 22:18:35 +03:00
parent a5c0d57325
commit 4efcbd36a2
Signed by: fufexan
SSH Key Fingerprint: SHA256:SdnKmEpJrDu1+2UO1QpB/Eg4HKcdDi6n+xSRqFNJVpg
3 changed files with 6 additions and 2 deletions

View File

@ -1,6 +1,8 @@
cmake_minimum_required(VERSION 3.19)
set(HYPRCURSOR_VERSION "0.1.9")
file(READ "${CMAKE_SOURCE_DIR}/VERSION" VER_RAW)
string(STRIP ${VER_RAW} HYPRCURSOR_VERSION)
add_compile_definitions(HYPRCURSOR_VERSION="${HYPRCURSOR_VERSION}")
project(hyprcursor

1
VERSION Normal file
View File

@ -0,0 +1 @@
0.1.9

View File

@ -7,6 +7,7 @@
(builtins.substring 4 2 longDate)
(builtins.substring 6 2 longDate)
]);
version = lib.removeSuffix "\n" (builtins.readFile ../VERSION);
in {
default = inputs.self.overlays.hyprcursor;
@ -15,7 +16,7 @@ in {
(final: prev: {
hyprcursor = 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;
};
})