2021-09-15 20:18:05 +02:00
|
|
|
{ lib, buildPythonApplication, fetchFromGitHub, bash, cmake, flex
|
2021-05-09 00:52:23 +02:00
|
|
|
, libclang, llvm, unifdef
|
2021-10-31 21:23:34 +01:00
|
|
|
, chardet, pebble, psutil, pytestCheckHook, pytest-flake8
|
2021-02-28 05:12:14 +01:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonApplication rec {
|
|
|
|
pname = "cvise";
|
2021-10-31 21:23:34 +01:00
|
|
|
version = "2.4.0";
|
2021-02-28 05:12:14 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "marxin";
|
|
|
|
repo = "cvise";
|
|
|
|
rev = "v${version}";
|
2021-10-31 21:23:34 +01:00
|
|
|
sha256 = "0cfzikkhp91hjgxjk3izzczb8d9p8v9zsfyk6iklk92n5qf1aakq";
|
2021-02-28 05:12:14 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
patches = [
|
|
|
|
# Refer to unifdef by absolute path.
|
|
|
|
./unifdef.patch
|
|
|
|
];
|
|
|
|
|
2021-05-09 00:52:23 +02:00
|
|
|
nativeBuildInputs = [ cmake flex llvm.dev ];
|
2021-09-15 20:18:05 +02:00
|
|
|
buildInputs = [ bash libclang llvm llvm.dev unifdef ];
|
2021-10-31 21:23:34 +01:00
|
|
|
propagatedBuildInputs = [ chardet pebble psutil ];
|
2021-02-28 05:12:14 +01:00
|
|
|
checkInputs = [ pytestCheckHook pytest-flake8 unifdef ];
|
|
|
|
|
2021-09-15 20:18:05 +02:00
|
|
|
# 'cvise --command=...' generates a script with hardcoded shebang.
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace cvise.py \
|
|
|
|
--replace "#!/bin/bash" "#!${bash}/bin/bash"
|
|
|
|
'';
|
|
|
|
|
2021-02-28 05:12:14 +01:00
|
|
|
preCheck = ''
|
|
|
|
patchShebangs cvise.py
|
|
|
|
'';
|
|
|
|
disabledTests = [
|
|
|
|
# Needs gcc, fails when run noninteractively (without tty).
|
|
|
|
"test_simple_reduction"
|
|
|
|
];
|
|
|
|
|
|
|
|
dontUsePipInstall = true;
|
|
|
|
dontUseSetuptoolsBuild = true;
|
|
|
|
dontUseSetuptoolsCheck = true;
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://github.com/marxin/cvise";
|
|
|
|
description = "Super-parallel Python port of C-Reduce";
|
|
|
|
license = licenses.ncsa;
|
|
|
|
maintainers = with maintainers; [ orivej ];
|
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|