anchor.diff:          "test/common/test_cast_hugeint.test"
           "test/sql/copy/csv/test_csv_remote.test"
           "test/sql/copy/parquet/test_parquet_remote.test"
  +        "test/sql/copy/parquet/test_parquet_remote_foreign_files.test"
         ] ++ lib.optionals stdenv.isAarch64 [
           "test/sql/aggregate/aggregates/test_kurtosis.test"
           "test/sql/aggregate/aggregates/test_skewness.test"
  
positive.code: { lib
  , stdenv
  , fetchFromGitHub
  , cmake
  , ninja
  , openssl
  
negative.code: in
  stdenv.mkDerivation rec {
    pname = "duckdb";
    version = "0.4.0";
  
    src = fetchFromGitHub {
      owner = pname;
      repo = pname;
      rev = "v${version}";
      sha256 = "sha256-pQ/t26dv9ZWLl0MHcAn0sgxryW2T2hM8XyOkXyfC5CY=";
    };
  
    patches = [
      ./version.patch
      (fetchpatch {
        url = "https://patch-diff.githubusercontent.com/raw/duckdb/duckdb/pull/3927.patch";
        sha256 = "sha256-m0Bs0DOJQtkadbKZKk88NHyBFJkjxXUsiWYciuRIJLU=";
      })
    ];
  
    postPatch = ''
      substituteInPlace CMakeLists.txt --subst-var-by DUCKDB_VERSION "v${version}"
    '';
  