about summary refs log tree commit diff
path: root/pkgs/tools/misc/most/default.nix
blob: 87280b9f295efe27d98cfd584b7d5286b63b5fb2 (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
38
39
40
41
42
43
{ lib, stdenv, fetchurl, slang, ncurses }:

stdenv.mkDerivation rec {
  pname = "most";
  version = "5.2.0";

  src = fetchurl {
    url = "https://www.jedsoft.org/releases/${pname}/${pname}-${version}.tar.gz";
    hash = "sha256-lFWuuPgm+oOFyFDcIr8PIs+QabPDQj+6S/LG9iJtmQM=";
  };

  outputs = [ "out" "doc" ];

  makeFlags = [
    "DOC_DIR=${placeholder "doc"}/share/doc/most"
  ];

  preConfigure = ''
    sed -i -e "s|-ltermcap|-lncurses|" configure
    sed -i autoconf/Makefile.in src/Makefile.in \
      -e "s|/bin/cp|cp|"  \
      -e "s|/bin/rm|rm|"
  '';

  configureFlags = [ "--with-slang=${slang.dev}" ];

  buildInputs = [ slang ncurses ];

  enableParallelBuilding = true;

  meta = with lib; {
    description = "A terminal pager similar to 'more' and 'less'";
    longDescription = ''
      MOST is a powerful paging program for Unix, VMS, MSDOS, and win32
      systems. Unlike other well-known paging programs most supports multiple
      windows and can scroll left and right. Why settle for less?
    '';
    homepage = "https://www.jedsoft.org/most/index.html";
    license = licenses.gpl2;
    platforms = platforms.unix;
    mainProgram = "most";
  };
}