Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Nix Mac issues building chainlink missing newer apple sdk libs #12746

Merged
merged 2 commits into from
Apr 9, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Fix nix mac issues building core missing newer apple sdk libs
  • Loading branch information
tateexon committed Apr 8, 2024
commit f3ef85820033bdb29507c70c760cfdc6a075efc3
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
Loading