1{ lib, stdenv, fetchFromGitHub, ncurses }:
2
3stdenv.mkDerivation rec {
4 pname = "sl";
5 version = "5.05";
6
7 src = fetchFromGitHub {
8 owner = "eyJhb";
9 repo = "sl";
10 rev = version;
11 sha256 = "11a1rdgb8wagikhxgm81g80g5qsl59mv4qgsval3isykqh8729bj";
12 };
13
14 buildInputs = [ ncurses ];
15
16 makeFlags = [ "CC:=$(CC)" ];
17
18 installPhase = ''
19 runHook preInstall
20
21 install -Dm755 -t $out/bin sl
22 install -Dm644 -t $out/share/man/man1 sl.1{,.ja}
23
24 runHook postInstall
25 '';
26
27 meta = with lib; {
28 description = "Steam Locomotive runs across your terminal when you type 'sl'";
29 homepage = "http://www.tkl.iis.u-tokyo.ac.jp/~toyoda/index_e.html";
30 license = rec {
31 shortName = "Toyoda Masashi's free software license";
32 fullName = shortName;
33 url = "https://github.com/eyJhb/sl/blob/master/LICENSE";
34 };
35 maintainers = with maintainers; [ eyjhb ];
36 platforms = platforms.unix;
37 mainProgram = "sl";
38 };
39}