anchor.diff: -{ buildPythonApplication
  +{ stdenv
   , lib
  +, buildPythonApplication
   , fetchFromGitHub
   , dateutil
   , pandas
  
positive.code: , wcwidth
  , zstandard
  , setuptools
  , withPcap ? true, dpkt, dnslib
  }:
  buildPythonApplication rec {
  
negative.code:     setuptools
    ] ++ lib.optionals withPcap [ dpkt dnslib ];
  
    checkInputs = [
      git
    ];
  
    # check phase uses the output bin, which is not possible when cross-compiling
    doCheck = stdenv.buildPlatform == stdenv.hostPlatform;
  
    checkPhase = ''
      # disable some tests which require access to the network
      rm tests/load-http.vd            # http
      rm tests/graph-cursor-nosave.vd  # http
      rm tests/messenger-nosave.vd     # dns
  
      # disable some tests which expect Python == 3.6 (not our current version)
      # see https://github.com/saulpw/visidata/issues/1014
      rm tests/describe.vd
      rm tests/describe-error.vd
      rm tests/edit-type.vd
  
      # tests use git to compare outputs to references
      git init -b "test-reference"
      git config user.name "nobody"; git config user.email "no@where"
      git add .; git commit -m "test reference"
  
      substituteInPlace dev/test.sh --replace "bin/vd" "$out/bin/vd"
      bash dev/test.sh
    '';
  
    meta = {
      inherit version;
  