CMake, Nix: add VERSION file

This commit is contained in:
Mihai Fufezan 2024-07-18 20:52:39 +03:00
parent cffd2ca3f8
commit bf6dface52
Signed by: fufexan
SSH key fingerprint: SHA256:SdnKmEpJrDu1+2UO1QpB/Eg4HKcdDi6n+xSRqFNJVpg
3 changed files with 8 additions and 1 deletions

View file

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

1
VERSION Normal file
View file

@ -0,0 +1 @@
0.3.0

View file

@ -20,11 +20,12 @@
(builtins.substring 4 2 longDate)
(builtins.substring 6 2 longDate)
]);
version = lib.removeSuffix "\n" (builtins.readFile ./VERSION);
in {
overlays.default = _: prev: rec {
hyprpicker = prev.callPackage ./nix/default.nix {
stdenv = prev.gcc12Stdenv;
version = "0.pre" + "+date=" + (mkDate (self.lastModifiedDate or "19700101")) + "_" + (self.shortRev or "dirty");
version = version + "+date=" + (mkDate (self.lastModifiedDate or "19700101")) + "_" + (self.shortRev or "dirty");
wayland-protocols = prev.wayland-protocols.overrideAttrs (self: super: {
version = "1.34";
src = prev.fetchurl {