Skip to content

Commit

Permalink
Nix shell bump pnpm to v9 (#13873)
Browse files Browse the repository at this point in the history
  • Loading branch information
krebernisak authored Jul 17, 2024
1 parent 02361de commit ce7d99a
Show file tree
Hide file tree
Showing 3 changed files with 79 additions and 68 deletions.
12 changes: 6 additions & 6 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

29 changes: 18 additions & 11 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,22 @@
foundry.inputs.flake-utils.follows = "flake-utils";
};

outputs = inputs@{ self, nixpkgs, flake-utils, foundry, ... }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs { inherit system; overlays = [ foundry.overlay ]; };
in
rec {
devShell = pkgs.callPackage ./shell.nix {
inherit pkgs;
};
formatter = pkgs.nixpkgs-fmt;
});
outputs = inputs @ {
self,
nixpkgs,
flake-utils,
foundry,
...
}:
flake-utils.lib.eachDefaultSystem (system: let
pkgs = import nixpkgs {
inherit system;
overlays = [foundry.overlay];
};
in rec {
devShell = pkgs.callPackage ./shell.nix {
inherit pkgs;
};
formatter = pkgs.nixpkgs-fmt;
});
}
106 changes: 55 additions & 51 deletions shell.nix
Original file line number Diff line number Diff line change
@@ -1,59 +1,63 @@
{ pkgs }:
with pkgs;
let
{pkgs}:
with pkgs; let
go = go_1_21;
postgresql = postgresql_14;
nodejs = nodejs-18_x;
nodePackages = pkgs.nodePackages.override { inherit nodejs; };
nodePackages = pkgs.nodePackages.override {inherit nodejs;};
pnpm = pnpm_9;

mkShell' = mkShell.override {
# The current nix default sdk for macOS fails to compile go projects, so we use a newer one for now.
stdenv = if stdenv.isDarwin then overrideSDK stdenv "11.0" else stdenv;
stdenv =
if stdenv.isDarwin
then overrideSDK stdenv "11.0"
else stdenv;
};
in
mkShell' {
nativeBuildInputs = [
go
goreleaser
postgresql

python3
python3Packages.pip
protobuf
protoc-gen-go
protoc-gen-go-grpc

foundry-bin

curl
nodejs
nodePackages.pnpm
# TODO: compiler / gcc for secp compilation
go-ethereum # geth
go-mockery

# tooling
gotools
gopls
delve
golangci-lint
github-cli
jq

# cross-compiling, used in CRIB
zig

# gofuzz
] ++ lib.optionals stdenv.isLinux [
# some dependencies needed for node-gyp on pnpm install
pkg-config
libudev-zero
libusb1
];
LD_LIBRARY_PATH = "${stdenv.cc.cc.lib}/lib64:$LD_LIBRARY_PATH";
GOROOT = "${go}/share/go";

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

}
mkShell' {
nativeBuildInputs =
[
go
goreleaser
postgresql

python3
python3Packages.pip
protobuf
protoc-gen-go
protoc-gen-go-grpc

foundry-bin

curl
nodejs
pnpm
# TODO: compiler / gcc for secp compilation
go-ethereum # geth
go-mockery

# tooling
gotools
gopls
delve
golangci-lint
github-cli
jq

# cross-compiling, used in CRIB
zig

# gofuzz
]
++ lib.optionals stdenv.isLinux [
# some dependencies needed for node-gyp on pnpm install
pkg-config
libudev-zero
libusb1
];
LD_LIBRARY_PATH = "${stdenv.cc.cc.lib}/lib64:$LD_LIBRARY_PATH";
GOROOT = "${go}/share/go";

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

0 comments on commit ce7d99a

Please sign in to comment.