CMake, Nix: add VERSION file

This commit is contained in:
Mihai Fufezan 2024-07-18 20:23:36 +03:00
parent d5fa094ca2
commit 117b6d93ed
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,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++"

1
VERSION Normal file
View file

@ -0,0 +1 @@
0.4.0

View file

@ -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");
};
};
};