Skip to content

Commit e0d826b

Browse files
nix: remove libpq overlay
We have fixed the static build of PostgreSQL upstream, so we don't need our separate overlay anymore. One more step towards building a static executable on other platforms.
1 parent 4119f2a commit e0d826b

File tree

6 files changed

+13
-94
lines changed

6 files changed

+13
-94
lines changed

default.nix

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ let
3535
allOverlays.build-toolbox
3636
allOverlays.checked-shell-script
3737
allOverlays.gitignore
38-
allOverlays.postgresql-libpq
3938
(allOverlays.haskell-packages { inherit compiler; })
4039
allOverlays.slocat
4140
];

nix/libpq.nix

Lines changed: 0 additions & 61 deletions
This file was deleted.

nix/overlays/default.nix

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,5 @@
33
checked-shell-script = import ./checked-shell-script;
44
gitignore = import ./gitignore.nix;
55
haskell-packages = import ./haskell-packages.nix;
6-
postgresql-libpq = import ./postgresql-libpq.nix;
76
slocat = import ./slocat.nix;
87
}

nix/overlays/haskell-packages.nix

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -60,15 +60,20 @@ let
6060

6161
jose-jwt = prev.jose-jwt_0_10_0;
6262

63-
postgresql-libpq = lib.dontCheck (prev.callHackageDirect
63+
postgresql-libpq = lib.overrideCabal
64+
(lib.dontCheck (prev.callHackageDirect
65+
{
66+
pkg = "postgresql-libpq";
67+
ver = "0.10.1.0";
68+
sha256 = "sha256-tXOMqCO8opMilI9rx0D+njqjIjbZsH168Bzb8Aq8Ff4=";
69+
}
70+
{ }
71+
))
6472
{
65-
pkg = "postgresql-libpq";
66-
ver = "0.10.1.0";
67-
sha256 = "sha256-tXOMqCO8opMilI9rx0D+njqjIjbZsH168Bzb8Aq8Ff4=";
68-
}
69-
{
70-
postgresql = super.libpq;
71-
});
73+
configureFlags = [ "-fuse-pkg-config" ];
74+
libraryPkgconfigDepends = [ super.postgresql_16 ];
75+
librarySystemDepends = [ ];
76+
};
7277
};
7378
in
7479
{

nix/overlays/postgresql-libpq.nix

Lines changed: 0 additions & 6 deletions
This file was deleted.

nix/static.nix

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -18,23 +18,6 @@ let
1818
# Cross compiling with native bignum works better than with gmp
1919
enableNativeBignum = true;
2020
};
21-
22-
overrides = pkgs.lib.composeExtensions old.overrides (_: prev: {
23-
postgresql-libpq = (lib.overrideCabal prev.postgresql-libpq {
24-
# TODO: This section can be simplified when this PR has made it's way to us:
25-
# https://github.com/NixOS/nixpkgs/pull/286370
26-
# Additionally, we need to use the default version in nixpkgs, otherwise the
27-
# override will not be active as well.
28-
# Using use-pkg-config flag, because pg_config won't work when cross-compiling
29-
configureFlags = [ "-fuse-pkg-config" ];
30-
# postgresql doesn't build in the fully static overlay - but the default
31-
# derivation is built with static libraries anyway.
32-
libraryPkgconfigDepends = [ pkgsStatic.libpq ];
33-
librarySystemDepends = [ ];
34-
}).overrideAttrs (_: prevAttrs: {
35-
buildInputs = prevAttrs.buildInputs ++ [ pkgsStatic.openssl ];
36-
});
37-
});
3821
});
3922

4023
makeExecutableStatic = drv: pkgs.lib.pipe drv [

0 commit comments

Comments
 (0)