less: Build with pcre2 regex engine and reformat

Add a notice about their versioning/release policy.
This commit is contained in:
Martin Weinelt 2023-02-08 01:56:11 +01:00
parent 5277b187cc
commit 3b3e38b4d1
No known key found for this signature in database
GPG key ID: 87C1E9888F856759

View file

@ -1,12 +1,20 @@
{ lib, stdenv, fetchurl, fetchpatch, ncurses, lessSecure ? false }:
{ lib
, stdenv
, fetchurl
, fetchpatch
, ncurses
, pcre2
}:
stdenv.mkDerivation rec {
pname = "less";
version = "608";
# Only tarballs on the website are valid releases,
# other versions, e.g. git tags are considered snapshots.
src = fetchurl {
url = "https://www.greenwoodsoftware.com/less/less-${version}.tar.gz";
sha256 = "02f2d9d6hyf03va28ip620gjc6rf4aikmdyk47h7frqj18pbx6m6";
hash = "sha256-ppq+LgoSZ3fgIdO3OqMiLhsmHxDmRiTUHsB5aFpqwgk=";
};
patches = [
@ -18,10 +26,16 @@ stdenv.mkDerivation rec {
})
];
configureFlags = [ "--sysconfdir=/etc" ] # Look for sysless in /etc.
++ lib.optionals lessSecure [ "--with-secure" ];
configureFlags = [
# Look for sysless in /etc.
"--sysconfdir=/etc"
"--with-regex=pcre2"
];
buildInputs = [ ncurses ];
buildInputs = [
ncurses
pcre2
];
meta = with lib; {
homepage = "https://www.greenwoodsoftware.com/less/";