anchor.diff:        "--with-system-tzdata=${tzdata}/share/zoneinfo"
         (lib.optionalString (atLeast "9.6" && !stdenv.isDarwin) "--with-systemd")
         (if stdenv.isDarwin then "--with-uuid=e2fs" else "--with-ossp-uuid")
  -    ];
  +    ] ++ lib.optionals icuEnabled [ "--with-icu" ];
   
       patches =
         [ (if atLeast "9.4" then ./disable-resolve_symlinks-94.patch else ./disable-resolve_symlinks.patch)
  
positive.code: { lib, stdenv, glibc, fetchurl, zlib, readline, libossp_uuid, openssl, libxml2, makeWrapper, tzdata, systemd }:
  
  let
  
    common = { version, sha256, psqlSchema }:
     let atLeast = lib.versionAtLeast version; in stdenv.mkDerivation (rec {
      name = "postgresql-${version}";
      inherit version;
  
  
negative.code: 
      buildInputs =
        [ zlib readline openssl libxml2 makeWrapper ]
        ++ lib.optionals icuEnabled [ icu ]
        ++ lib.optionals (atLeast "9.6" && !stdenv.isDarwin) [ systemd ]
        ++ lib.optionals (!stdenv.isDarwin) [ libossp_uuid ];
  
      nativeBuildInputs = lib.optionals icuEnabled [ pkgconfig ];
  
      enableParallelBuilding = !stdenv.isDarwin;
  
  