aboutsummaryrefslogtreecommitdiffhomepage
path: root/nix/default.nix
diff options
context:
space:
mode:
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 ""