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