CMake, Nix: add VERSION file

This commit is contained in:
Mihai Fufezan 2024-07-18 20:48:30 +03:00
parent cbc16f939f
commit 06b93bbb77
Signed by: fufexan
SSH Key Fingerprint: SHA256:SdnKmEpJrDu1+2UO1QpB/Eg4HKcdDi6n+xSRqFNJVpg
3 changed files with 8 additions and 2 deletions

View File

@ -1,7 +1,11 @@
cmake_minimum_required(VERSION 3.12)
file(READ "${CMAKE_SOURCE_DIR}/VERSION" VER_RAW)
string(STRIP ${VER_RAW} VERSION)
project(hyprpaper
DESCRIPTION "A blazing fast wayland wallpaper utility"
VERSION 0.7.0
VERSION ${VERSION}
)
set(CMAKE_MESSAGE_LOG_LEVEL "STATUS")

1
VERSION Normal file
View File

@ -0,0 +1 @@
0.7.0

View File

@ -44,6 +44,7 @@
(builtins.substring 4 2 longDate)
(builtins.substring 6 2 longDate)
]);
version = lib.removeSuffix "\n" (builtins.readFile ./VERSION);
in {
overlays = {
default = self.overlays.hyprpaper;
@ -54,7 +55,7 @@
(final: prev: rec {
hyprpaper = final.callPackage ./nix/default.nix {
stdenv = final.gcc13Stdenv;
version = "0.7.0" + "+date=" + (mkDate (self.lastModifiedDate or "19700101")) + "_" + (self.shortRev or "dirty");
version = version + "+date=" + (mkDate (self.lastModifiedDate or "19700101")) + "_" + (self.shortRev or "dirty");
commit = self.rev or "";
};
hyprpaper-debug = hyprpaper.override {debug = true;};