about summary refs log tree commit diff
path: root/pkgs/development/tools/hobbes/default.nix
blob: 5c3eb84b2d5ab1cd11268c36afd68bb3ce993635 (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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
{ lib
, stdenv
, llvmPackages_10
, fetchFromGitHub
, cmake
, llvm_12
, ncurses
, readline
, zlib
, libxml2
, python3
}:
llvmPackages_10.stdenv.mkDerivation {
  pname = "hobbes";
  version = "unstable-2023-06-03";

  src = fetchFromGitHub {
    owner = "morganstanley";
    repo = "hobbes";
    rev = "88a712b85bc896a4c87e60c12321445f1cdcfd00";
    hash = "sha256-2v0yk35/cLKTjX0Qbc8cjc7Y6bamRSa9GpPvGoxL2Cw=";
  };

  # TODO: re-enable Python tests once they work on Python 3
  # currently failing with "I don't know how to decode the primitive type: b'bool'"
  postPatch = ''
    rm test/Python.C
  '';

  nativeBuildInputs = [
    cmake
  ];

  buildInputs = [
    llvm_12
    ncurses
    readline
    zlib
    libxml2
    python3
  ];

  doCheck = true;
  checkTarget = "test";

  meta = with lib; {
    broken = stdenv.isDarwin;
    description = "A language and an embedded JIT compiler";
    longDescription = ''
      Hobbes is a a language, embedded compiler, and runtime for efficient
      dynamic expression evaluation, data storage and analysis.
    '';
    homepage = "https://github.com/morganstanley/hobbes";
    license = licenses.asl20;
    maintainers = with maintainers; [ kthielen thmzlt ];
    platforms = [ "x86_64-linux" "x86_64-darwin" ];
  };
}