mirror of
https://github.com/hyprwm/hyprutils.git
synced 2024-12-22 15:29:49 +01:00
CMake, Nix: add VERSION file
This commit is contained in:
parent
eb1ceff2b8
commit
928d9b4ee9
3 changed files with 6 additions and 2 deletions
|
@ -1,6 +1,7 @@
|
||||||
cmake_minimum_required(VERSION 3.19)
|
cmake_minimum_required(VERSION 3.19)
|
||||||
|
|
||||||
set(HYPRUTILS_VERSION "0.2.0")
|
file(READ "${CMAKE_SOURCE_DIR}/VERSION" VER_RAW)
|
||||||
|
string(STRIP ${VER_RAW} HYPRUTILS_VERSION)
|
||||||
add_compile_definitions(HYPRUTILS_VERSION="${HYPRUTILS_VERSION}")
|
add_compile_definitions(HYPRUTILS_VERSION="${HYPRUTILS_VERSION}")
|
||||||
|
|
||||||
project(hyprutils
|
project(hyprutils
|
||||||
|
|
1
VERSION
Normal file
1
VERSION
Normal file
|
@ -0,0 +1 @@
|
||||||
|
0.2.0
|
|
@ -23,13 +23,15 @@
|
||||||
(builtins.substring 4 2 longDate)
|
(builtins.substring 4 2 longDate)
|
||||||
(builtins.substring 6 2 longDate)
|
(builtins.substring 6 2 longDate)
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
version = lib.removeSuffix "\n" (builtins.readFile ./VERSION);
|
||||||
in {
|
in {
|
||||||
overlays = {
|
overlays = {
|
||||||
default = self.overlays.hyprutils;
|
default = self.overlays.hyprutils;
|
||||||
hyprutils = final: prev: {
|
hyprutils = final: prev: {
|
||||||
hyprutils = final.callPackage ./nix/default.nix {
|
hyprutils = final.callPackage ./nix/default.nix {
|
||||||
stdenv = final.gcc13Stdenv;
|
stdenv = final.gcc13Stdenv;
|
||||||
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");
|
||||||
};
|
};
|
||||||
hyprutils-with-tests = final.hyprutils.override {doCheck = true;};
|
hyprutils-with-tests = final.hyprutils.override {doCheck = true;};
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue