aboutsummaryrefslogtreecommitdiffhomepage
path: root/nix/default.nix
diff options
context:
space:
mode:
authorMihai Fufezan <[email protected]>2023-10-10 21:45:25 +0300
committerMihai Fufezan <[email protected]>2023-10-10 21:51:33 +0300
commit3a8a30b83cbe523b6ab3488b4aaa79361335c467 (patch)
tree5aa8ba2243cebcf615a0f4085d5cfda6f2de2725 /nix/default.nix
parent0a908acc05ed8c163beacfb0f0004c01a8d6dd4f (diff)
downloadHyprland-3a8a30b83cbe523b6ab3488b4aaa79361335c467.tar.gz
Hyprland-3a8a30b83cbe523b6ab3488b4aaa79361335c467.zip
nix: better versioningbetter-versioning
Diffstat (limited to 'nix/default.nix')
-rw-r--r--nix/default.nix12
1 files changed, 9 insertions, 3 deletions
diff --git a/nix/default.nix b/nix/default.nix
index 96fa12d7..d12bc073 100644
--- a/nix/default.nix
+++ b/nix/default.nix
@@ -105,9 +105,15 @@ assert lib.assertMsg (!hidpiXWayland) "The option `hidpiXWayland` has been remov
postPatch = ''
# Fix hardcoded paths to /usr installation
sed -i "s#/usr#$out#" src/render/OpenGL.cpp
- substituteInPlace meson.build \
- --replace "@GIT_COMMIT_HASH@" '${commit}' \
- --replace "@GIT_DIRTY@" '${
+
+ # Generate version.h
+ cp src/version.h.in src/version.h
+ substituteInPlace src/version.h \
+ --replace "@HASH@" '${commit}' \
+ --replace "@BRANCH@" "" \
+ --replace "@MESSAGE@" "" \
+ --replace "@TAG@" "" \
+ --replace "@DIRTY@" '${
if commit == ""
then "dirty"
else ""