Meson, Nix: add VERSION file

This commit is contained in:
Mihai Fufezan 2024-07-18 21:14:43 +03:00
parent 1b61f0093a
commit 01fc77926a
Signed by: fufexan
SSH key fingerprint: SHA256:SdnKmEpJrDu1+2UO1QpB/Eg4HKcdDi6n+xSRqFNJVpg
3 changed files with 5 additions and 3 deletions

1
VERSION Normal file
View file

@ -0,0 +1 @@
0.3.0

View file

@ -25,11 +25,12 @@
(builtins.substring 4 2 longDate) (builtins.substring 4 2 longDate)
(builtins.substring 6 2 longDate) (builtins.substring 6 2 longDate)
]); ]);
version = "0.1" + "+date=" + (mkDate (self.lastModifiedDate or "19700101")) + "_" + (self.shortRev or "dirty"); version = lib.removeSuffix "\n" (builtins.readFile ./VERSION);
in { in {
overlays = { overlays = {
hyprland-protocols = final: prev: { hyprland-protocols = final: prev: {
hyprland-protocols = final.callPackage ./nix/default.nix {inherit version;}; hyprland-protocols = final.callPackage ./nix/default.nix {inherit version;};
version = version + "+date=" + (mkDate (self.lastModifiedDate or "19700101")) + "_" + (self.shortRev or "dirty");
}; };
default = self.overlays.hyprland-protocols; default = self.overlays.hyprland-protocols;
}; };

View file

@ -1,6 +1,6 @@
project('hyprland-protocols', project('hyprland-protocols',
version: '0.3.0', version: run_command('cat', 'VERSION', check: true).stdout().strip(),
meson_version: '>= 0.55.0', meson_version: '>= 0.60.3',
) )
hyprland_protocols_version = meson.project_version() hyprland_protocols_version = meson.project_version()