Commit 57970bb7 authored by Mario Rodas's avatar Mario Rodas
Browse files

postgresql_jit: fix build

These patches are already included in the latest release.

This reverts commit 8fbd381b.
parent 1b3033eb
Loading
Loading
Loading
Loading
+3 −33
Original line number Diff line number Diff line
@@ -37,8 +37,6 @@ let
    pname = "postgresql";

    stdenv' = if jitSupport then llvmPackages.stdenv else stdenv;

    majorVersion = lib.versions.major version;
  in stdenv'.mkDerivation (finalAttrs: {
    inherit pname version;

@@ -112,36 +110,8 @@ let
        src = ./locale-binary-path.patch;
        locale = "${if stdenv.isDarwin then darwin.adv_cmds else lib.getBin stdenv.cc.libc}/bin/locale";
      })
    ] ++ (let
      llvmJITPatches = {
        "12" = {
          rev = "15ddc9725eb73d97a16652c7c90d993302773544";
          hash = "sha256-3dsaN/YTmc9JfIO/eXTr6tUqxMXHih58yhhtCW6Cz4E=";
        };
        "13" = {
          rev = "f28956b239f19858e7c429d3065678ce79c5104b";
          hash = "sha256-C31RF6sPYr0iSmGBjKWIq9oPMpLkZ1FIkPGhGANJecU=";
        };
        "14" = {
          rev = "82d9a782a29633a7d2c8c0785e4162a46f93d23b";
          hash = "sha256-qDStZ2fQyTnng3sjf502aNLIsqRsa59bpaZLY3cE2BY=";
        };
        "15" = {
          rev = "eed1feb3fee1a558b67b04cbd709f31142f071d5";
          hash = "sha256-IflqFi93Pyr/VfgS+jMdI/lYu4ISrgVlInWKueYqpZc=";
        };
        "16" = {
          rev = "74d19ec096dfbda5782e62892de7e86a104f8265";
          hash = "sha256-VB1Uc5waS8u5LjtvjLfeZcrHPSxmP2PyRVpMhK9+Xgc=";
        };
      };
    in lib.optional
      (jitSupport && llvmJITPatches?${majorVersion})
      (fetchpatch {
        url = "https://github.com/postgres/postgres/commit/${llvmJITPatches.${majorVersion}.rev}.patch";
        inherit (llvmJITPatches.${majorVersion}) hash;
      })
    ) ++ lib.optionals stdenv'.hostPlatform.isMusl (

    ] ++ lib.optionals stdenv'.hostPlatform.isMusl (
      let
        self = {
          "12" = {
@@ -181,7 +151,7 @@ let
          };
        };

        patchesForVersion = self.${majorVersion} or (throw "no musl patches for postgresql ${version}");
        patchesForVersion = self.${lib.versions.major version} or (throw "no musl patches for postgresql ${version}");
      in
        lib.attrValues patchesForVersion
    ) ++ lib.optionals stdenv'.isLinux  [