mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-16 18:53:17 +00:00
fb14b7846c
Mainly llvm-16 support and early phase reduction speedup. Changes: https://github.com/marxin/cvise/releases/tag/v2.8.0
86 lines
1.6 KiB
Nix
86 lines
1.6 KiB
Nix
{ lib
|
|
, buildPythonApplication
|
|
, fetchFromGitHub
|
|
, bash
|
|
, cmake
|
|
, colordiff
|
|
, flex
|
|
, libclang
|
|
, llvm
|
|
, unifdef
|
|
, chardet
|
|
, pebble
|
|
, psutil
|
|
, pytestCheckHook
|
|
}:
|
|
|
|
buildPythonApplication rec {
|
|
pname = "cvise";
|
|
version = "2.8.0";
|
|
format = "other";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "marxin";
|
|
repo = "cvise";
|
|
rev = "refs/tags/v${version}";
|
|
hash = "sha256-9HFCFgpRXqefFJLulwvi6nx0fl0G6IXI9gSinekJXRU=";
|
|
};
|
|
|
|
patches = [
|
|
# Refer to unifdef by absolute path.
|
|
./unifdef.patch
|
|
];
|
|
|
|
postPatch = ''
|
|
# Avoid blanket -Werror to evade build failures on less
|
|
# tested compilers.
|
|
substituteInPlace CMakeLists.txt \
|
|
--replace " -Werror " " "
|
|
|
|
# 'cvise --command=...' generates a script with hardcoded shebang.
|
|
substituteInPlace cvise.py \
|
|
--replace "#!/bin/bash" "#!${bash}/bin/bash"
|
|
|
|
substituteInPlace cvise/utils/testing.py \
|
|
--replace "'colordiff --version'" "'${colordiff}/bin/colordiff --version'" \
|
|
--replace "'colordiff'" "'${colordiff}/bin/colordiff'"
|
|
'';
|
|
|
|
nativeBuildInputs = [
|
|
cmake
|
|
flex
|
|
llvm.dev
|
|
];
|
|
|
|
buildInputs = [
|
|
libclang
|
|
llvm
|
|
llvm.dev
|
|
unifdef
|
|
];
|
|
|
|
propagatedBuildInputs = [
|
|
chardet
|
|
pebble
|
|
psutil
|
|
];
|
|
|
|
nativeCheckInputs = [
|
|
pytestCheckHook
|
|
unifdef
|
|
];
|
|
|
|
disabledTests = [
|
|
# Needs gcc, fails when run noninteractively (without tty).
|
|
"test_simple_reduction"
|
|
];
|
|
|
|
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;
|
|
};
|
|
}
|