Skip to content

Commit

Permalink
Try #1056:
Browse files Browse the repository at this point in the history
  • Loading branch information
iohk-bors[bot] committed Feb 24, 2021
2 parents b82002e + a060b58 commit 27ac386
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/pkgconf-nixpkgs-map.nix
Expand Up @@ -21,7 +21,6 @@ pkgs:
"cairo-ps" = [ pkgs."cairo" ];
"cairo-svg" = [ pkgs."cairo" ];
"crypt" = []; # provided by glibc
"crypto" = [ pkgs."openssl" ];
"curses" = [ pkgs."ncurses" ];
"dbusmenu-glib-0.4" = [ pkgs."libdbusmenu" ];
"dbusmenu-gtk3-0.4" = [ pkgs."libdbusmenu-gtk3" ]; # do we also need pkgs."gtk3"
Expand Down Expand Up @@ -80,6 +79,7 @@ pkgs:
"lber" = [ pkgs."openldap" ];
"ldap" = [ pkgs."openldap" ];
"libavutil" = [ pkgs."ffmpeg" ];
"libcrypto" = [ pkgs."openssl".dev ];
"libgsasl" = [ pkgs."gsasl" ];
"libpcre" = [ pkgs."pcre" ];
"libqrencode" = [ pkgs."qrencode" ];
Expand All @@ -88,6 +88,7 @@ pkgs:
"libsecp256k1" = [ pkgs."secp256k1" ];
"libsoup-2.4" = [ pkgs."libsoup" ];
"libsoup-gnome-2.4" = [ pkgs."libsoup" ];
"libssl" = [ pkgs."openssl".dev ];
"libsystemd" = [ pkgs."systemd" ];
"libudev" = [ pkgs."systemd" ];
"libusb-1.0" = [ pkgs."libusb1" ];
Expand Down Expand Up @@ -115,6 +116,7 @@ pkgs:
"png" = [ pkgs."libpng" ];
"poppler-glib" = [ pkgs."poppler" ];
"pq" = [ pkgs."postgresql" ];
"libpq" = [ pkgs."postgresql" ];
"pthread" = [];
"pulse" = [ pkgs."libpulseaudio" ];
"pulse-simple" = [ pkgs."libpulseaudio" ];
Expand All @@ -136,7 +138,6 @@ pkgs:
"sodium" = [ pkgs."libsodium" ];
"sqlite3" = [ pkgs."sqlite" ];
"ssh2" = [ pkgs."libssh2" ];
"ssl" = [ pkgs."openssl" ];
"statgrab" = [ pkgs."libstatgrab" ];
"stdc++" = []; # What is that?
"stdc++.dll" = []; # What is that?
Expand Down
18 changes: 18 additions & 0 deletions overlays/hackage-quirks.nix
Expand Up @@ -73,6 +73,24 @@ in { haskell-nix = prev.haskell-nix // {
'';
};

# See https://github.com/input-output-hk/haskell.nix/issues/948
postgrest = {
cabalProject = ''
packages: .
package postgresql-libpq
flags: +use-pkg-config
'';
modules = [(
{pkgs, ...}: final.lib.mkIf pkgs.stdenv.hostPlatform.isMusl {
# The order of -lssl and -lcrypto is important here
packages.postgrest.configureFlags = [
"--ghc-option=-optl=-lssl"
"--ghc-option=-optl=-lcrypto"
"--ghc-option=-optl=-L${pkgs.openssl.out}/lib"
];
})];
};

}."${name}" or {};

}; }
5 changes: 5 additions & 0 deletions overlays/musl.nix
Expand Up @@ -15,6 +15,11 @@ final: prev: prev.lib.optionalAttrs prev.stdenv.hostPlatform.isMusl ({

numactl = prev.numactl.overrideAttrs (_: { configureFlags = "--enable-static"; });

# See https://github.com/input-output-hk/haskell.nix/issues/948
postgresql = (prev.postgresql.overrideAttrs (old: { dontDisableStatic = true; }))
.override { enableSystemd = false; };
openssl = prev.openssl.override { static = true; };

# Fails on cross compile
nix = prev.nix.overrideAttrs (_: { doInstallCheck = false; });
} // prev.lib.optionalAttrs (prev.lib.versionAtLeast prev.lib.trivial.release "20.03") {
Expand Down

0 comments on commit 27ac386

Please sign in to comment.