Skip to content

Commit

Permalink
Upgrade to Postgres 10 (#11751)
Browse files Browse the repository at this point in the history
1.18 is out and we’re bumping our requirements to 10 for 2.0 so this
seems like a good time to make the switch.

changelog_begin
changelog_end
  • Loading branch information
cocreature authored Nov 18, 2021
1 parent 39c5966 commit 85979b3
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -852,7 +852,7 @@ filegroup(

nixpkgs_package(
name = "postgresql_nix",
attribute_path = "postgresql_9_6",
attribute_path = "postgresql_10",
fail_not_supported = False,
nix_file = "//nix:bazel.nix",
nix_file_deps = common_nix_file_deps,
Expand Down
2 changes: 1 addition & 1 deletion compatibility/WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ dev_env_tool(

nixpkgs_package(
name = "postgresql_nix",
attribute_path = "postgresql_9_6",
attribute_path = "postgresql_10",
build_file_content = """
package(default_visibility = ["//visibility:public"])
filegroup(
Expand Down
14 changes: 7 additions & 7 deletions nix/bazel.nix
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,16 @@ let shared = rec {
zip
;

postgresql_9_6 = if pkgs.buildPlatform.libc == "glibc"
then pkgs.runCommand "postgresql_9_6_wrapper" { buildInputs = [ pkgs.makeWrapper ]; } ''
postgresql_10 = if pkgs.buildPlatform.libc == "glibc"
then pkgs.runCommand "postgresql_10_wrapper" { buildInputs = [ pkgs.makeWrapper ]; } ''
mkdir -p $out/bin
for tool in ${pkgs.postgresql_9_6}/bin/*; do
for tool in ${pkgs.postgresql_10}/bin/*; do
makeWrapper $tool $out/bin/$(basename $tool) --set LOCALE_ARCHIVE ${pkgs.glibcLocales}/lib/locale/locale-archive
done
ln -s ${pkgs.postgresql_9_6}/include $out/include
ln -s ${pkgs.postgresql_9_6}/lib $out/lib
ln -s ${pkgs.postgresql_9_6}/share $out/share
'' else pkgs.postgresql_9_6;
ln -s ${pkgs.postgresql_10}/include $out/include
ln -s ${pkgs.postgresql_10}/lib $out/lib
ln -s ${pkgs.postgresql_10}/share $out/share
'' else pkgs.postgresql_10;


scala_2_13 = (pkgs.scala_2_13.override { }).overrideAttrs (attrs: {
Expand Down
2 changes: 1 addition & 1 deletion nix/nixpkgs.nix
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ let
installPhase = ''
mkdir -p $out
PREFIX=$out make install
wrapProgram $out/bin/pg_tmp --prefix PATH : ${pkgs.postgresql_9_6}/bin:$out/bin
wrapProgram $out/bin/pg_tmp --prefix PATH : ${pkgs.postgresql_10}/bin:$out/bin
'';
});
scala_2_13 = pkgs.scala_2_13.overrideAttrs (oldAttrs: rec {
Expand Down

0 comments on commit 85979b3

Please sign in to comment.