From b1c14fb636d4a89db98face9a6f3de6ea9a96f0a Mon Sep 17 00:00:00 2001 From: snicket2100 <57048005+snicket2100@users.noreply.github.com> Date: Mon, 13 Apr 2020 10:19:44 +0200 Subject: [PATCH] advancecomp: version number correctly embedded in binaries without this fix, binaries report their version number as "vnone" which for example stops `image_optim` from using `advpng` (refuses to use it not being able to tell what version number it has) --- pkgs/tools/compression/advancecomp/default.nix | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pkgs/tools/compression/advancecomp/default.nix b/pkgs/tools/compression/advancecomp/default.nix index fb027c4e2d54..e648aa6feb64 100644 --- a/pkgs/tools/compression/advancecomp/default.nix +++ b/pkgs/tools/compression/advancecomp/default.nix @@ -28,6 +28,13 @@ stdenv.mkDerivation rec { }) ]; + # autover.sh relies on 'git describe', which obviously doesn't work as we're not cloning + # the full git repo. so we have to put the version number in `.version`, otherwise + # the binaries get built reporting "none" as their version number. + postPatch = '' + echo "${version}" >.version + ''; + meta = with stdenv.lib; { description = ''A set of tools to optimize deflate-compressed files''; license = licenses.gpl3 ;