about summary refs log tree commit diff
diff options
context:
space:
mode:
authorNorbert Melzer <timmelzer@gmail.com>2022-08-20 23:00:04 +0200
committerNorbert Melzer <timmelzer@gmail.com>2022-08-21 08:03:29 +0200
commitb28346740171ba85992d57cb9072afb7900c821d (patch)
treee15feb4c2e36809fae0f57c35367d3a59c034266
parent6a84022c439ec2f71d0feb1614f2398279a7aa46 (diff)
berry: patch the version in the configure script
This fixes how berry internalizes its own version. By default a static 0.1.7 is
and overriden if a `.git` folder does exist. In that case `git describe` is used
and the version parsed out of it.

This PR unconditionally patches the version in the configure file as that appears
to be easier and more idiomatic than a "fake git".
-rw-r--r--pkgs/applications/window-managers/berry/default.nix4
1 files changed, 4 insertions, 0 deletions
diff --git a/pkgs/applications/window-managers/berry/default.nix b/pkgs/applications/window-managers/berry/default.nix
index 5c2c7dcb5ce45..96054e86f5054 100644
--- a/pkgs/applications/window-managers/berry/default.nix
+++ b/pkgs/applications/window-managers/berry/default.nix
@@ -39,6 +39,10 @@ stdenv.mkDerivation rec {
     freetype
   ];
 
+  postPatch = ''
+    sed -i --regexp-extended 's/(pkg_verstr=").*(")/\1${version}\2/' configure
+  '';
+
   preConfigure = ''
     patchShebangs configure
   '';