lol
1{
2 lib,
3 fetchurl,
4 fetchpatch,
5 ncurses,
6 pcre2,
7 stdenv,
8 versionCheckHook,
9 # Boolean options
10 withSecure ? false,
11}:
12
13stdenv.mkDerivation (finalAttrs: {
14 pname = "less";
15 version = "679";
16
17 # `less` is provided by the following sources:
18 # - meta.homepage
19 # - GitHub: https://github.com/gwsw/less/
20 # The releases recommended for general consumption are only those from
21 # homepage, and only those not marked as beta.
22 src = fetchurl {
23 url = "https://www.greenwoodsoftware.com/less/less-${finalAttrs.version}.tar.gz";
24 hash = "sha256-m2iCDDT6igr2sOAbdPApi83UCgSJxhZJtHBYkIoVPXg=";
25 };
26
27 buildInputs = [
28 ncurses
29 pcre2
30 ];
31
32 outputs = [
33 "out"
34 "man"
35 ];
36
37 configureFlags = [
38 "--sysconfdir=/etc" # Look for 'sysless' in /etc
39 (lib.withFeatureAs true "regex" "pcre2")
40 (lib.withFeature withSecure "secure")
41 ];
42
43 strictDeps = true;
44
45 nativeInstallCheckInputs = [
46 versionCheckHook
47 ];
48 versionCheckProgramArg = "--version";
49 doInstallCheck = true;
50
51 meta = {
52 homepage = "https://www.greenwoodsoftware.com/less/";
53 description = "More advanced file pager than 'more'";
54 changelog = "https://www.greenwoodsoftware.com/less/news.${finalAttrs.version}.html";
55 license = lib.licenses.gpl3Plus;
56 mainProgram = "less";
57 maintainers = with lib.maintainers; [
58 # not active
59 dtzWill
60 ];
61 platforms = lib.platforms.unix;
62 };
63})