From c634dae2798046a6d27734e708c83909b359eb59 Mon Sep 17 00:00:00 2001 From: sternenseemann Date: Fri, 18 Aug 2023 16:38:01 +0200 Subject: [PATCH] pandoc: use library's version Since pandoc --version reports this, it makes the whole affair less counter intuitive. Also one step towards #249946. --- pkgs/development/tools/pandoc/default.nix | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/pkgs/development/tools/pandoc/default.nix b/pkgs/development/tools/pandoc/default.nix index 1e9eec3f804c..528a1b3f5355 100644 --- a/pkgs/development/tools/pandoc/default.nix +++ b/pkgs/development/tools/pandoc/default.nix @@ -6,6 +6,15 @@ let in (haskell.lib.compose.overrideCabal (drv: { + # pandoc-cli's pandoc executable report the libraries version via --version, match that, + inherit (static.scope.pandoc) version; + # but prevent haskellPackages.mkDerivation from recomputing the src tarball based on that. + inherit (static) src; + # Make it possible to recover the cli version if necessary. + passthru = drv.passthru or {} // { + cliVersion = static.version; + }; + configureFlags = drv.configureFlags or [] ++ ["-fembed_data_files"]; buildDepends = drv.buildDepends or [] ++ [haskellPackages.file-embed]; buildTools = (drv.buildTools or []) ++ [ removeReferencesTo ];