Skip to content

Commit

Permalink
fix: Add postgresql, R to iog-full flavor (#175)
Browse files Browse the repository at this point in the history
* Use correct variant of optional/optionals
 * Clean up formatting
  • Loading branch information
sgillespie authored Dec 18, 2024
1 parent 1ebe012 commit 3493951
Showing 1 changed file with 29 additions and 26 deletions.
55 changes: 29 additions & 26 deletions dynamic.nix
Original file line number Diff line number Diff line change
Expand Up @@ -83,39 +83,42 @@ pkgs.mkShell {
export DYLD_LIBRARY_PATH="${lib.getLib openssl}/lib"
'';

buildInputs = [
buildInputs =
let
inherit (pkgs) lib stdenv;
inherit (lib) attrValues optional optionals;
in [
wrapped-cabal
fixup-nix-deps
compiler
] ++ (with pkgs; [
(pkgs.pkg-config or pkgconfig)
# for libstdc++; ghc not being able to find this properly is bad,
# it _should_ probably call out to a g++ or clang++ but doesn't.
stdenv.cc.cc.lib
]) ++ map pkgs.lib.getDev (
with pkgs;
[
zlib
pcre
openssl
]
++ pkgs.lib.optional pkgs.stdenv.hostPlatform.isLinux systemd
)
++ builtins.attrValues haskell-tools
++ pkgs.lib.optional withIOG
(with pkgs; [
cddl
cbor-diag
gh
jq
yq-go
]
++ (with pkgs; [
openssl
pcre
pkg-config
zlib
])
++ optional stdenv.hostPlatform.isLinux pkgs.systemd
++ optionals withIOG (
with pkgs; [
cbor-diag
cddl
gh
icu
jq
libblst
libsodium-vrf
secp256k1
yq-go
]
++ map pkgs.lib.getDev (with pkgs; [ libblst libsodium-vrf secp256k1 icu ]
++ pkgs.lib.optional (withIOGFull) [
(if pkgs.stdenv.hostPlatform.isAarch64 then null else R) # for plutus; R is broken on aarch64
postgresql # for db-sync
]))
;
++ optionals withIOGFull (
[ postgresql ] ++ (optional stdenv.hostPlatform.isAarch64 R)
)
++ attrValues haskell-tools
);

passthru = {
plans = if haskell-tools == {} then {} else
Expand Down

0 comments on commit 3493951

Please sign in to comment.