anchor.diff:      libnsl
       openssl
       protobuf
  -  ];
  +  ] ++ lib.optionals enableS3 [ aws-sdk-cpp openssl ];
   
     preConfigure = ''
       patchShebangs build-support/
  
positive.code:     "-DARROW_PARQUET=ON"
      "-DPARQUET_BUILD_EXECUTABLES=ON"
      "-DARROW_FLIGHT=${if enableFlight then "ON" else "OFF"}"
    ] ++ lib.optionals (!enableShared) [
      "-DARROW_TEST_LINKAGE=static"
    ] ++ lib.optionals stdenv.isDarwin [
      "-DCMAKE_SKIP_BUILD_RPATH=OFF" # needed for tests
      "-DCMAKE_INSTALL_RPATH=@loader_path/../lib" # needed for tools executables
    ] ++ lib.optional (!stdenv.isx86_64) "-DARROW_USE_SIMD=OFF";
  
    doInstallCheck = true;
    ARROW_TEST_DATA = lib.optionalString doInstallCheck "${arrow-testing}/data";
  
negative.code: , zstd
  , enableShared ? !stdenv.hostPlatform.isStatic
  , enableFlight ? !stdenv.isDarwin # libnsl is not supported on darwin
  , enableS3 ? true
  }:
  
  let
  