nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at python-updates 100 lines 1.9 kB view raw
1{ 2 lib, 3 buildPythonApplication, 4 fetchFromGitHub, 5 clang-tools, 6 cmake, 7 colordiff, 8 flex, 9 libclang, 10 llvm, 11 unifdef, 12 chardet, 13 pebble, 14 psutil, 15 pytestCheckHook, 16 testers, 17 cvise, 18}: 19 20buildPythonApplication rec { 21 pname = "cvise"; 22 version = "2.12.0"; 23 pyproject = false; 24 25 src = fetchFromGitHub { 26 owner = "marxin"; 27 repo = "cvise"; 28 tag = "v${version}"; 29 hash = "sha256-UaWOHjgTiSVvpKKw6VFAeRAYkYp4y0Dnamzr7yhH0vQ="; 30 }; 31 32 patches = [ 33 # Refer to unifdef by absolute path. 34 ./unifdef.patch 35 ]; 36 37 postPatch = '' 38 # Avoid blanket -Werror to evade build failures on less 39 # tested compilers. 40 substituteInPlace CMakeLists.txt \ 41 --replace-fail " -Werror " " " 42 43 substituteInPlace cvise/utils/testing.py \ 44 --replace-fail "'colordiff --version'" "'${colordiff}/bin/colordiff --version'" \ 45 --replace-fail "'colordiff'" "'${colordiff}/bin/colordiff'" 46 ''; 47 48 nativeBuildInputs = [ 49 cmake 50 flex 51 llvm.dev 52 ]; 53 54 buildInputs = [ 55 libclang 56 llvm 57 llvm.dev 58 unifdef 59 ]; 60 61 propagatedBuildInputs = [ 62 chardet 63 pebble 64 psutil 65 ]; 66 67 nativeCheckInputs = [ 68 pytestCheckHook 69 unifdef 70 ]; 71 72 cmakeFlags = [ 73 # By default `cvise` looks it up in `llvm` bin directory. But 74 # `nixpkgs` moves it into a separate derivation. 75 "-DCLANG_FORMAT_PATH=${clang-tools}/bin/clang-format" 76 ]; 77 78 disabledTests = [ 79 # Needs gcc, fails when run noninteractively (without tty). 80 "test_simple_reduction" 81 ]; 82 83 passthru = { 84 tests = { 85 # basic syntax check 86 help-output = testers.testVersion { 87 package = cvise; 88 command = "cvise --version"; 89 }; 90 }; 91 }; 92 93 meta = { 94 homepage = "https://github.com/marxin/cvise"; 95 description = "Super-parallel Python port of C-Reduce"; 96 license = lib.licenses.ncsa; 97 maintainers = [ ]; 98 platforms = lib.platforms.linux; 99 }; 100}