From b048be052ccff215e125b9fbef825f296dcbe599 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20=C4=8Cun=C3=A1t?= Date: Tue, 5 Nov 2024 08:11:12 +0100 Subject: [PATCH] Reapply "less: Fix withSecure regression" This reverts commit 6df0b10df6903be10245355ef35dd8435084bd95. This change was originally merged as PR #352298 but it got moved to staging here. --- pkgs/by-name/le/less/package.nix | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/pkgs/by-name/le/less/package.nix b/pkgs/by-name/le/less/package.nix index ba57f5460ccd..452944aa9a75 100644 --- a/pkgs/by-name/le/less/package.nix +++ b/pkgs/by-name/le/less/package.nix @@ -1,6 +1,8 @@ { lib, fetchurl, + fetchpatch, + autoreconfHook, ncurses, pcre2, stdenv, @@ -22,6 +24,23 @@ stdenv.mkDerivation (finalAttrs: { hash = "sha256-KBn1VWTYbVQqu+yv2C/2HoGaPuyWf6o2zT5o8VlqRLg="; }; + patches = [ + (fetchpatch { + # Fix configure parameters --with-secure=no and --without-secure. + url = "https://github.com/gwsw/less/commit/8fff6c56bfc833528b31ebdaee871f65fbe342b1.patch"; + hash = "sha256-XV5XufivNWWLGeIpaP04YQPWcxIUKYYEINdT+eEx+WA="; + includes = [ + "configure.ac" + ]; + }) + ]; + + # Need `autoreconfHook` since we patch `configure.ac`. + # TODO: Remove the `configure.ac` patch and `autoreconfHook` next release + nativeBuildInputs = [ + autoreconfHook + ]; + buildInputs = [ ncurses pcre2