Commit de5759ec authored by Sergei Trofimovich's avatar Sergei Trofimovich
Browse files

cvise: fix `unifdef.patch` (crashes otherwise)

Without the change `cvise` does not even parse:

    $ cvise --help |& unnix
      File "/<<NIX>>/cvise-2.12.0/bin/.cvise-wrapped", line 96
        programs['unifdef'] = '/<<NIX>>/unifdef-2.12/bin/unifdef'
        ^^^^^^^^
    SyntaxError: expected 'except' or 'finally' block

Happens because the patch applies to the unrelated bit of the source.

While at it added minimal `cvise --help` test.
parent df65e0ab
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
@@ -13,6 +13,8 @@
  pebble,
  psutil,
  pytestCheckHook,
  testers,
  cvise,
}:

buildPythonApplication rec {
@@ -78,6 +80,16 @@ buildPythonApplication rec {
    "test_simple_reduction"
  ];

  passthru = {
    tests = {
      # basic syntax check
      help-output = testers.testVersion {
        package = cvise;
        command = "cvise --version";
      };
    };
  };

  meta = with lib; {
    homepage = "https://github.com/marxin/cvise";
    description = "Super-parallel Python port of C-Reduce";
+4 −3
Original line number Diff line number Diff line
--- a/cvise.py
+++ b/cvise.py
@@ -93,4 +93,5 @@ def find_external_programs():
--- a/cvise/utils/externalprograms.py
+++ b/cvise/utils/externalprograms.py
@@ -43,5 +43,6 @@ def find_external_programs():
 
     # Special case for clang-format
     programs['clang-format'] = '@CLANG_FORMAT_PATH@'
+    programs['unifdef'] = '@UNIFDEF@'