Skip to content

Commit

Permalink
sad
Browse files Browse the repository at this point in the history
  • Loading branch information
dbarrosop committed Sep 27, 2024
1 parent 57729c8 commit 3cb9296
Showing 1 changed file with 6 additions and 35 deletions.
41 changes: 6 additions & 35 deletions overlays/postgres.nix
Original file line number Diff line number Diff line change
@@ -1,13 +1,4 @@
final: prev: rec {
locales = prev.glibcLocales.override {
allLocales = false;
locales = [
"en_US.UTF-8/UTF-8"
"C.UTF-8/UTF-8"
];
};


postgresql_14_13 = prev.postgresql_14.overrideAttrs
(finalAttrs: previousAttrs: rec {
pname = "postgresql";
Expand Down Expand Up @@ -45,15 +36,8 @@ final: prev: rec {
moveToOutput "lib/libecpg*" "$out"
'';

postFixup = final.lib.optionalString final.stdenv.hostPlatform.isGnu
''
wrapProgram $out/bin/pg_dump --prefix LOCALE_ARCHIVE ${locales}/lib/locale/locale-archive
wrapProgram $out/bin/pg_dumpall --prefix LOCALE_ARCHIVE ${locales}/lib/locale/locale-archive
wrapProgram $out/bin/pg_restore --prefix LOCALE_ARCHIVE ${locales}/lib/locale/locale-archive
wrapProgram $out/bin/psql --prefix LOCALE_ARCHIVE ${locales}/lib/locale/locale-archive
'';
outputs = [ "out" "lib" "dev" ];

# postFixup = "";
# outputs = [ "out" "lib" "dev" ];
});

postgresql_15_8 = prev.postgresql_15.overrideAttrs
Expand Down Expand Up @@ -93,15 +77,8 @@ final: prev: rec {
moveToOutput "lib/libecpg*" "$out"
'';

postFixup = final.lib.optionalString final.stdenv.hostPlatform.isGnu
''
wrapProgram $out/bin/pg_dump --prefix LOCALE_ARCHIVE ${locales}/lib/locale/locale-archive
wrapProgram $out/bin/pg_dumpall --prefix LOCALE_ARCHIVE ${locales}/lib/locale/locale-archive
wrapProgram $out/bin/pg_restore --prefix LOCALE_ARCHIVE ${locales}/lib/locale/locale-archive
wrapProgram $out/bin/psql --prefix LOCALE_ARCHIVE ${locales}/lib/locale/locale-archive
'';
outputs = [ "out" "lib" "dev" ];

# postFixup = "";
# outputs = [ "out" "lib" "dev" ];
});

postgresql_16_4 = prev.postgresql_16.overrideAttrs
Expand Down Expand Up @@ -142,13 +119,7 @@ final: prev: rec {
moveToOutput "lib/libecpg*" "$out"
'';

postFixup = final.lib.optionalString final.stdenv.hostPlatform.isGnu
''
wrapProgram $out/bin/pg_dump --prefix LOCALE_ARCHIVE ${locales}/lib/locale/locale-archive
wrapProgram $out/bin/pg_dumpall --prefix LOCALE_ARCHIVE ${locales}/lib/locale/locale-archive
wrapProgram $out/bin/pg_restore --prefix LOCALE_ARCHIVE ${locales}/lib/locale/locale-archive
wrapProgram $out/bin/psql --prefix LOCALE_ARCHIVE ${locales}/lib/locale/locale-archive
'';
outputs = [ "out" "lib" "dev" ];
# postFixup = ""; # this may need fixing to add locales
# outputs = [ "out" "lib" "dev" ];
});
}

0 comments on commit 3cb9296

Please sign in to comment.