1{
2 lib,
3 stdenv,
4 fetchFromGitHub,
5 python3,
6}:
7
8stdenv.mkDerivation rec {
9 version = "9.2";
10 pname = "tab";
11
12 src = fetchFromGitHub {
13 owner = "ivan-tkatchev";
14 repo = "tab";
15 rev = version;
16 hash = "sha256-UOXfnpzYMKDdp8EeBo2HsVPGn61hkCqHe8olX9KAgOU=";
17 };
18
19 # gcc12; see https://github.com/ivan-tkatchev/tab/commit/673bdac998
20 postPatch = ''
21 sed '1i#include <cstring>' -i deps.h
22 '';
23
24 nativeCheckInputs = [ python3 ];
25
26 doCheck = !stdenv.hostPlatform.isDarwin;
27
28 checkTarget = "test";
29
30 installPhase = ''
31 runHook preInstall
32
33 install -Dm555 -t $out/bin tab
34 install -Dm444 -t $out/share/doc/tab docs/*.html
35
36 runHook postInstall
37 '';
38
39 meta = with lib; {
40 description = "Programming language/shell calculator";
41 mainProgram = "tab";
42 homepage = "https://tab-lang.xyz";
43 license = licenses.boost;
44 maintainers = with maintainers; [ mstarzyk ];
45 platforms = with platforms; unix;
46 };
47}