summaryrefslogtreecommitdiff
path: root/derivations/st/default.nix
blob: eb7c6bcadd616d40c92fd281869da29254dcfb5d (plain)
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
44
45
46
47
48
49
50
{
  lib,
  stdenv,
  fetchzip,
  fontconfig,
  libX11,
  libXcursor,
  libXext,
  libXft,
  ncurses,
  pkg-config,
}:

stdenv.mkDerivation rec {
  pname = "st";
  version = "tj-0.9.2.2";

  src = fetchzip {
    url = "https://git.tjkeller.xyz/${pname}/snapshot/${pname}-${version}.tar.xz";
    sha256 = "sha256-p1u7TEeLeC5Kjvi8na4YhyQQ0qdPaUWZL6hq9O4HaKA=";
  };

  nativeBuildInputs = [
    pkg-config
  ];
  buildInputs = [
    fontconfig
    libX11
    libXcursor
    libXext
    libXft
    ncurses
  ];

  installPhase = ''
    runHook preInstall

    TERMINFO=$out/share/terminfo make install PREFIX=$out

    runHook postInstall
  '';

  meta = with lib; {
    homepage = "https://git.tjkeller.xyz/st";
    description = "My st with various patches";
    mainProgram = "st";
    license = licenses.mit;
    maintainers = [ maintainers.tjkeller ];
  };
}