Skip to content

Commit

Permalink
Fix nix mac issues building core missing newer apple sdk libs (#12746)
Browse files Browse the repository at this point in the history
  • Loading branch information
tateexon authored Apr 9, 2024
1 parent bd9f16e commit b3aab74
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
7 changes: 6 additions & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,14 @@
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs { inherit system; overlays = [ ]; };
# The current default sdk for macOS fails to compile go projects, so we use a newer one for now.
# This has no effect on other platforms.
callPackage = pkgs.darwin.apple_sdk_11_0.callPackage or pkgs.callPackage;
in
rec {
devShell = pkgs.callPackage ./shell.nix { };
devShell = callPackage ./shell.nix {
inherit pkgs;
};
formatter = pkgs.nixpkgs-fmt;
});
}
1 change: 1 addition & 0 deletions nix.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
experimental-features = nix-command flakes
3 changes: 2 additions & 1 deletion shell.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ pkgs ? import <nixpkgs> { } }:
{ pkgs }:
with pkgs;
let
go = go_1_21;
Expand Down Expand Up @@ -46,6 +46,7 @@ mkShell {
];
LD_LIBRARY_PATH = "${stdenv.cc.cc.lib}/lib64:$LD_LIBRARY_PATH";
GOROOT = "${go}/share/go";
CGO_ENABLED = 0;

PGDATA = "db";
CL_DATABASE_URL = "postgresql://chainlink:chainlink@localhost:5432/chainlink_test?sslmode=disable";
Expand Down

0 comments on commit b3aab74

Please sign in to comment.