about summary refs log tree commit diff
path: root/nixpkgs/pkgs/tools/misc/less/default.nix
blob: 76b0572353607a00fbf82bd333d7b205f4dad963 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
{ lib
, stdenv
, fetchurl
, ncurses
, pcre2
}:

stdenv.mkDerivation rec {
  pname = "less";
  version = "633";

  # 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";
    hash = "sha256-LyAdZLgouIrzbf5s/bo+CBns4uRG6+YiSBMgmq7+0E8=";
  };

  configureFlags = [
    # Look for ‘sysless’ in /etc.
    "--sysconfdir=/etc"
    "--with-regex=pcre2"
  ];

  buildInputs = [
    ncurses
    pcre2
  ];

  meta = with lib; {
    homepage = "https://www.greenwoodsoftware.com/less/";
    description = "A more advanced file pager than ‘more’";
    platforms = platforms.unix;
    license = licenses.gpl3Plus;
    maintainers = with maintainers; [ eelco dtzWill ];
  };
}