anchor.diff:    ] ++ lib.optionals enableShared [
       python3.pkgs.python
       python3.pkgs.numpy
  +  ] ++ lib.optionals enableFlight [
  +    grpc
  +    libnsl
  +    openssl
  +    protobuf
     ];
   
     preConfigure = ''
  
positive.code:   ] ++ lib.optional (!stdenv.isx86_64) "-DARROW_USE_SIMD=OFF";
  
    doInstallCheck = true;
    ARROW_TEST_DATA =
      if doInstallCheck then "${arrow-testing}/data" else null;
    PARQUET_TEST_DATA =
      if doInstallCheck then "${parquet-testing}/data" else null;
    GTEST_FILTER =
      if doInstallCheck then let
        # Upstream Issue: https://issues.apache.org/jira/browse/ARROW-11398
        filteredTests = lib.optionals stdenv.hostPlatform.isAarch64 [
          "TestFilterKernelWithNumeric/3.CompareArrayAndFilterRandomNumeric"
          "TestFilterKernelWithNumeric/7.CompareArrayAndFilterRandomNumeric"
          "TestCompareKernel.PrimitiveRandomTests"
        ];
      in "-${builtins.concatStringsSep ":" filteredTests}" else null;
    installCheckInputs = [ perl which ];
    installCheckPhase =
    let
      excludedTests = lib.optionals stdenv.isDarwin [
        # Some plasma tests need to be patched to use a shorter AF_UNIX socket
        # path on Darwin. See https://github.com/NixOS/nix/pull/1085
        "plasma-external-store-tests"
        "plasma-client-tests"
      ];
    in ''
      ctest -L unittest -V \
        --exclude-regex '^(${builtins.concatStringsSep "|" excludedTests})$'
    '';
  
    meta = with lib; {
      description = "A cross-language development platform for in-memory data";
  
negative.code: { stdenv
  , lib
  , fetchurl
  , fetchFromGitHub
  , fixDarwinDylibNames
  , autoconf
  , boost
  , brotli
  , c-ares
  , cmake
  , flatbuffers
  , gflags
  , glog
  , grpc
  , gtest
  , jemalloc
  , libnsl
  , lz4
  , openssl
  , perl
  , protobuf
  , python3
  , rapidjson
  , re2
  , snappy
  , thrift
  , tzdata
  , utf8proc
  , which
  , zlib
  , zstd
  , enableShared ? !stdenv.hostPlatform.isStatic
  , enableFlight ? !stdenv.isDarwin # libnsl is not supported on darwin
  }:
  
  let
  