mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-22 11:45:58 +01:00
CMake, Meson, Nix: replace props.json with VERSION
This commit is contained in:
parent
faa157e162
commit
928d1dd38a
5 changed files with 6 additions and 9 deletions
|
@ -4,8 +4,8 @@ include(CheckIncludeFile)
|
||||||
include(GNUInstallDirs)
|
include(GNUInstallDirs)
|
||||||
|
|
||||||
# Get version
|
# Get version
|
||||||
file(READ ${CMAKE_CURRENT_SOURCE_DIR}/props.json PROPS)
|
file(READ "${CMAKE_SOURCE_DIR}/VERSION" VER_RAW)
|
||||||
string(JSON VER GET ${PROPS} version)
|
string(STRIP ${VER_RAW} VER)
|
||||||
|
|
||||||
project(Hyprland
|
project(Hyprland
|
||||||
DESCRIPTION "A Modern C++ Wayland Compositor"
|
DESCRIPTION "A Modern C++ Wayland Compositor"
|
||||||
|
|
1
VERSION
Normal file
1
VERSION
Normal file
|
@ -0,0 +1 @@
|
||||||
|
0.41.2
|
|
@ -1,5 +1,5 @@
|
||||||
project('Hyprland', 'cpp', 'c',
|
project('Hyprland', 'cpp', 'c',
|
||||||
version : run_command('jq', '-r', '.version', join_paths(meson.source_root(), 'props.json'), check: true).stdout().strip(),
|
version : run_command('cat', join_paths(meson.source_root(), 'VERSION'), check: true).stdout().strip(),
|
||||||
default_options : [
|
default_options : [
|
||||||
'warning_level=2',
|
'warning_level=2',
|
||||||
'default_library=static',
|
'default_library=static',
|
||||||
|
|
|
@ -3,13 +3,12 @@
|
||||||
lib,
|
lib,
|
||||||
inputs,
|
inputs,
|
||||||
}: let
|
}: let
|
||||||
props = builtins.fromJSON (builtins.readFile ../props.json);
|
|
||||||
|
|
||||||
mkDate = longDate: (lib.concatStringsSep "-" [
|
mkDate = longDate: (lib.concatStringsSep "-" [
|
||||||
(builtins.substring 0 4 longDate)
|
(builtins.substring 0 4 longDate)
|
||||||
(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 {
|
||||||
# Contains what a user is most likely to care about:
|
# Contains what a user is most likely to care about:
|
||||||
# Hyprland itself, XDPH and the Share Picker.
|
# Hyprland itself, XDPH and the Share Picker.
|
||||||
|
@ -33,7 +32,7 @@ in {
|
||||||
in {
|
in {
|
||||||
hyprland = final.callPackage ./default.nix {
|
hyprland = final.callPackage ./default.nix {
|
||||||
stdenv = final.gcc13Stdenv;
|
stdenv = final.gcc13Stdenv;
|
||||||
version = "${props.version}+date=${date}_${self.shortRev or "dirty"}";
|
version = "${version}+date=${date}_${self.shortRev or "dirty"}";
|
||||||
commit = self.rev or "";
|
commit = self.rev or "";
|
||||||
inherit date;
|
inherit date;
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,3 +0,0 @@
|
||||||
{
|
|
||||||
"version": "0.41.2"
|
|
||||||
}
|
|
Loading…
Reference in a new issue