2023-06-07 08:56:34 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
2024-01-25 06:04:26 +00:00
|
|
|
, llvmPackages
|
2023-06-07 08:56:34 +00:00
|
|
|
, fetchFromGitHub
|
2024-01-25 06:04:26 +00:00
|
|
|
, fetchpatch
|
2023-06-07 08:56:34 +00:00
|
|
|
, cmake
|
|
|
|
, llvm_12
|
|
|
|
, ncurses
|
|
|
|
, readline
|
|
|
|
, zlib
|
|
|
|
, libxml2
|
|
|
|
, python3
|
|
|
|
}:
|
2024-01-25 06:04:26 +00:00
|
|
|
llvmPackages.stdenv.mkDerivation {
|
2021-06-25 13:56:24 +00:00
|
|
|
pname = "hobbes";
|
2024-01-25 06:04:26 +00:00
|
|
|
version = "0-unstable-2023-06-03";
|
2020-03-11 12:03:55 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2023-06-07 08:56:34 +00:00
|
|
|
owner = "morganstanley";
|
2020-03-11 12:03:55 +00:00
|
|
|
repo = "hobbes";
|
2023-06-07 08:56:34 +00:00
|
|
|
rev = "88a712b85bc896a4c87e60c12321445f1cdcfd00";
|
|
|
|
hash = "sha256-2v0yk35/cLKTjX0Qbc8cjc7Y6bamRSa9GpPvGoxL2Cw=";
|
2020-03-11 12:03:55 +00:00
|
|
|
};
|
|
|
|
|
2024-01-25 06:04:26 +00:00
|
|
|
patches = [
|
|
|
|
# fix build for LLVM-12+
|
|
|
|
# https://github.com/morganstanley/hobbes/pull/452
|
|
|
|
(fetchpatch {
|
|
|
|
name = "include-cstdint.patch";
|
|
|
|
url = "https://github.com/morganstanley/hobbes/commit/924b71fca06c61e606792cc8db8521fb499d4237.patch";
|
|
|
|
hash = "sha256-/VsWtTYc3LBOnm4Obgx/MOqaaWZhUc8yzmkygtNz+mY=";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
|
|
|
# only one warning generated. try to remove on next update
|
|
|
|
env.CXXFLAGS = "-Wno-error=deprecated-copy";
|
|
|
|
|
2021-06-25 13:56:24 +00:00
|
|
|
# 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
|
|
|
|
'';
|
|
|
|
|
2020-03-11 12:03:55 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
cmake
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
2021-06-25 13:56:24 +00:00
|
|
|
llvm_12
|
2020-03-11 12:03:55 +00:00
|
|
|
ncurses
|
|
|
|
readline
|
|
|
|
zlib
|
2021-05-21 23:13:30 +00:00
|
|
|
libxml2
|
2023-06-07 08:56:34 +00:00
|
|
|
python3
|
2020-03-11 12:03:55 +00:00
|
|
|
];
|
|
|
|
|
2021-06-25 13:56:24 +00:00
|
|
|
doCheck = true;
|
2020-03-11 12:03:55 +00:00
|
|
|
checkTarget = "test";
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2022-05-29 09:09:52 +00:00
|
|
|
broken = stdenv.isDarwin;
|
2020-03-11 12:03:55 +00:00
|
|
|
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.
|
|
|
|
'';
|
2021-06-25 13:56:24 +00:00
|
|
|
homepage = "https://github.com/morganstanley/hobbes";
|
2020-03-11 12:03:55 +00:00
|
|
|
license = licenses.asl20;
|
2020-05-17 03:54:52 +00:00
|
|
|
maintainers = with maintainers; [ kthielen thmzlt ];
|
2020-03-11 12:03:55 +00:00
|
|
|
platforms = [ "x86_64-linux" "x86_64-darwin" ];
|
|
|
|
};
|
|
|
|
}
|