diff --git a/integration-tests/default.nix b/integration-tests/default.nix new file mode 100644 index 00000000000..5dc72302416 --- /dev/null +++ b/integration-tests/default.nix @@ -0,0 +1,14 @@ +{ pkgs # pkgs is a nixpkgs inheriting the system with the gomod2nix overlay to build Go pkgs +}: + + +let + # imports ./ethereum.print-chain/default.nix inheriting pkgs and chainlink-dev args + test-run-smoke = pkgs.callPackage ./smoke { inherit pkgs; }; +in +{ + # exports a package. to be consumed by the flake.nix + packages = { + integration-tests_run-smoke = test-run-smoke.package; + }; +} diff --git a/integration-tests/flake.lock b/integration-tests/flake.lock new file mode 100644 index 00000000000..ae1a872fabb --- /dev/null +++ b/integration-tests/flake.lock @@ -0,0 +1,410 @@ +{ + "nodes": { + "chainlink": { + "inputs": { + "cl_src": "cl_src", + "flake-utils": "flake-utils", + "gomod2nix": "gomod2nix", + "nixpkgs": "nixpkgs_2" + }, + "locked": { + "dir": "chainlink", + "lastModified": 1701700033, + "narHash": "sha256-C6iZcbWN4EDL+TIBa9oYCnVmzUrGvu7mA8Lo3OxlXMo=", + "ref": "main", + "rev": "0b5484846caac8f542d9082ec08700c4205fde07", + "revCount": 121, + "type": "git", + "url": "ssh://git@github.com/smartcontractkit/chainlink-project-nix-poc?dir=chainlink" + }, + "original": { + "dir": "chainlink", + "ref": "main", + "type": "git", + "url": "ssh://git@github.com/smartcontractkit/chainlink-project-nix-poc?dir=chainlink" + } + }, + "chainlink-dev": { + "inputs": { + "flake-utils": "flake-utils_3", + "gomod2nix": "gomod2nix_2", + "nixpkgs": "nixpkgs_4" + }, + "locked": { + "dir": "chainlink-dev", + "lastModified": 1701700033, + "narHash": "sha256-C6iZcbWN4EDL+TIBa9oYCnVmzUrGvu7mA8Lo3OxlXMo=", + "ref": "main", + "rev": "0b5484846caac8f542d9082ec08700c4205fde07", + "revCount": 121, + "type": "git", + "url": "ssh://git@github.com/smartcontractkit/chainlink-project-nix-poc?dir=chainlink-dev" + }, + "original": { + "dir": "chainlink-dev", + "ref": "main", + "type": "git", + "url": "ssh://git@github.com/smartcontractkit/chainlink-project-nix-poc?dir=chainlink-dev" + } + }, + "cl_src": { + "flake": false, + "locked": { + "lastModified": 1694793897, + "narHash": "sha256-mh1D+6Ie/cxoCqobHgora70HJ8Lmj5iOZsKfmty1JZM=", + "owner": "smartcontractkit", + "repo": "chainlink", + "rev": "5036be4a1c953e81b92685eb47423b92248f28b5", + "type": "github" + }, + "original": { + "owner": "smartcontractkit", + "repo": "chainlink", + "type": "github" + } + }, + "flake-utils": { + "inputs": { + "systems": "systems" + }, + "locked": { + "lastModified": 1694529238, + "narHash": "sha256-zsNZZGTGnMOf9YpHKJqMSsa0dXbfmxeoJ7xHlrt+xmY=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "ff7b65b44d01cf9ba6a71320833626af21126384", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "flake-utils_2": { + "inputs": { + "systems": "systems_2" + }, + "locked": { + "lastModified": 1694529238, + "narHash": "sha256-zsNZZGTGnMOf9YpHKJqMSsa0dXbfmxeoJ7xHlrt+xmY=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "ff7b65b44d01cf9ba6a71320833626af21126384", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "flake-utils_3": { + "inputs": { + "systems": "systems_3" + }, + "locked": { + "lastModified": 1692799911, + "narHash": "sha256-3eihraek4qL744EvQXsK1Ha6C3CR7nnT8X2qWap4RNk=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "f9e7cf818399d17d347f847525c5a5a8032e4e44", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "flake-utils_4": { + "inputs": { + "systems": "systems_4" + }, + "locked": { + "lastModified": 1701680307, + "narHash": "sha256-kAuep2h5ajznlPMD9rnQyffWG8EM/C73lejGofXvdM8=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "4022d587cbbfd70fe950c1e2083a02621806a725", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "flake-utils_5": { + "inputs": { + "systems": "systems_5" + }, + "locked": { + "lastModified": 1694529238, + "narHash": "sha256-zsNZZGTGnMOf9YpHKJqMSsa0dXbfmxeoJ7xHlrt+xmY=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "ff7b65b44d01cf9ba6a71320833626af21126384", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "gomod2nix": { + "inputs": { + "flake-utils": "flake-utils_2", + "nixpkgs": "nixpkgs" + }, + "locked": { + "lastModified": 1694616124, + "narHash": "sha256-c49BVhQKw3XDRgt+y+uPAbArtgUlMXCET6VxEBmzHXE=", + "owner": "nix-community", + "repo": "gomod2nix", + "rev": "f95720e89af6165c8c0aa77f180461fe786f3c21", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "gomod2nix", + "type": "github" + } + }, + "gomod2nix_2": { + "inputs": { + "nixpkgs": "nixpkgs_3", + "utils": "utils" + }, + "locked": { + "lastModified": 1677459247, + "narHash": "sha256-JbakfAiPYmCCV224yAMq/XO0udN5coWv/oazblMKdoY=", + "owner": "nix-community", + "repo": "gomod2nix", + "rev": "3cbf3a51fe32e2f57af4c52744e7228bab22983d", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "gomod2nix", + "type": "github" + } + }, + "gomod2nix_3": { + "inputs": { + "flake-utils": "flake-utils_5", + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1701687253, + "narHash": "sha256-qJCMxIKWXonJODPF2oV7mCd0xu7VYVenTucrY0bizto=", + "owner": "tweag", + "repo": "gomod2nix", + "rev": "001bbfa22e2adeb87c34c6015e5694e88721cabe", + "type": "github" + }, + "original": { + "owner": "tweag", + "repo": "gomod2nix", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1658285632, + "narHash": "sha256-zRS5S/hoeDGUbO+L95wXG9vJNwsSYcl93XiD0HQBXLk=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "5342fc6fb59d0595d26883c3cadff16ce58e44f3", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "master", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_2": { + "locked": { + "lastModified": 1694794664, + "narHash": "sha256-+xvmbTgCKFI5PipQ/Gp6RzeSQPYBoErb6/sGWbwPriw=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "bdc382d331167df7ec767268f07038f776ee2303", + "type": "github" + }, + "original": { + "owner": "NixOS", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_3": { + "locked": { + "lastModified": 1658285632, + "narHash": "sha256-zRS5S/hoeDGUbO+L95wXG9vJNwsSYcl93XiD0HQBXLk=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "5342fc6fb59d0595d26883c3cadff16ce58e44f3", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "master", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_4": { + "locked": { + "lastModified": 1693377291, + "narHash": "sha256-vYGY9bnqEeIncNarDZYhm6KdLKgXMS+HA2mTRaWEc80=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "e7f38be3775bab9659575f192ece011c033655f0", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_5": { + "locked": { + "lastModified": 1701436327, + "narHash": "sha256-tRHbnoNI8SIM5O5xuxOmtSLnswEByzmnQcGGyNRjxsE=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "91050ea1e57e50388fa87a3302ba12d188ef723a", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "plugins": { + "flake": false, + "locked": { + "lastModified": 1, + "narHash": "sha256-5opfeYSAUWRs9vmSNlRQuD9XxnRjIH6+1ee0U815S+s=", + "path": "/nix/store/p8srg1wh944kx3h1pp1qyzsrg8y9rl03-source/integration-tests", + "type": "path" + }, + "original": { + "path": "/nix/store/p8srg1wh944kx3h1pp1qyzsrg8y9rl03-source/integration-tests", + "type": "path" + } + }, + "root": { + "inputs": { + "chainlink": "chainlink", + "chainlink-dev": "chainlink-dev", + "flake-utils": "flake-utils_4", + "gomod2nix": "gomod2nix_3", + "nixpkgs": "nixpkgs_5", + "plugins": "plugins" + } + }, + "systems": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, + "systems_2": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, + "systems_3": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, + "systems_4": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, + "systems_5": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, + "utils": { + "locked": { + "lastModified": 1653893745, + "narHash": "sha256-0jntwV3Z8//YwuOjzhV2sgJJPt+HY6KhU7VZUL0fKZQ=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "1ed9fb1935d260de5fe1c2f7ee0ebaae17ed2fa1", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/integration-tests/flake.nix b/integration-tests/flake.nix new file mode 100644 index 00000000000..56df8615496 --- /dev/null +++ b/integration-tests/flake.nix @@ -0,0 +1,92 @@ +{ + description = "Integration tests"; + + inputs = { + nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; + flake-utils.url = "github:numtide/flake-utils"; + + # define gomod2nix which is a dependency to build Go lang plugins + gomod2nix = { + url = "github:tweag/gomod2nix"; + inputs.nixpkgs.follows = "nixpkgs"; + inputs.utils.follows = "flake-utils"; + }; + + # define chainlink-dev flake as a input + chainlink-dev.url = "git+ssh://git@github.com/smartcontractkit/chainlink-project-nix-poc?ref=main&dir=chainlink-dev"; # this could also be a project URL + chainlink.url = "git+ssh://git@github.com/smartcontractkit/chainlink-project-nix-poc?ref=main&dir=chainlink"; + + # defines plugins module (default.nix) that aggregates all plugins of this project + plugins = { + url = "./"; + flake = false; + }; + }; + outputs = { self, nixpkgs, flake-utils, gomod2nix, ... }@inputs: + # it enables us to generate all outputs for each default system + (flake-utils.lib.eachDefaultSystem + (system: + let + pkgs = import nixpkgs { + inherit system; + + # add gomod2nix in pkgs as a Go lang dependecy for plugins + overlays = [ + gomod2nix.overlays.default + ]; + }; + + # wrap together dependencies for plugins + commonArgs = { + inherit pkgs; + }; + + # import custom plugins with required args + plugins = pkgs.callPackage ./. commonArgs; + + # it flats the set tree of the plugins for packages and shell. + # (e.g. [ packages.pkg1, packages.pkg2 ] -> [ pkg1, pkg2 ] ) + pluginsPackage = flake-utils.lib.flattenTree plugins.packages; + in + { + # it outputs packages all packages defined in plugins + packages = pluginsPackage; + + # it outputs the default shell + devShells.default = + pkgs.mkShell { + buildInputs = with pkgs; [ + # Go + tools + go + gopls + gotools + go-tools + + # k8s + kube3d + kubectl + k9s + kubernetes-helm + + # NOTE: cannot import all packages through chainlink-dev + # nested relative path import of chainlink breaks nix (cannot dynamically calculate absoluate path) + inputs.chainlink-dev.packages.${system}.chainlink-dev + inputs.chainlink.packages.${system}.chainlink + + # add all local plugins of this project + self.packages.${system}.integration-tests_run-smoke + ]++ pkgs.lib.optionals pkgs.stdenv.isDarwin [ + # Additional darwin specific inputs can be set here + pkgs.libiconv + pkgs.darwin.apple_sdk.frameworks.Security + ]; + }; + + apps.integration-tests_run-smoke = { + type = "app"; + program = "${self.packages.${system}.integration-tests_run-smoke}/bin/integration-tests_run-smoke"; + }; + }) + ); + +} diff --git a/integration-tests/smoke/default.nix b/integration-tests/smoke/default.nix new file mode 100644 index 00000000000..e7990ba5889 --- /dev/null +++ b/integration-tests/smoke/default.nix @@ -0,0 +1,61 @@ +{ pkgs }: + +let + scriptName = "integration-tests_run-smoke"; + go = pkgs.go_1_21; + scriptBuildInputs = with pkgs; [ go go-ethereum ]; # add geth to handle missing underlying dependencies + testDir = toString ./.; + + wrapperScript = pkgs.writeShellScriptBin scriptName '' + #!/usr/bin/env bash + cd ${testDir} + ${testDir}/run_test.sh "$@" + ''; + + symlink = pkgs.symlinkJoin { + name = scriptName; + paths = [ wrapperScript ] ++ scriptBuildInputs; + buildInputs = [ pkgs.makeWrapper ]; + postBuild = '' + wrapProgram $out/bin/${scriptName} \ + --prefix PATH : $out/bin \ + --set GOROOT "${go}/share/go" \ + --run 'export GOPATH=$HOME/go' \ + --run 'export PATH=$GOPATH/bin:$PATH' + ''; + }; + + package = pkgs.stdenv.mkDerivation { + name = scriptName; + buildCommand = "ln -s ${symlink} $out"; + installPhase = '' + mkdir -p $out/bin + cp ${wrapperScript}/bin/${scriptName} $out/bin/ + chmod +x $out/bin/${scriptName} + ''; + meta = { + description = "Main script to run ethereum smoke tests"; + longDescription = '' + TBD + ''; + homepage = "TBD"; + maintainers = [ "QA, TT" ]; + }; + }; +in +{ + package = package; + devShells.default = pkgs.mkShell { + # based on pkgs, add those packages into env + buildInputs = with pkgs; [ + # Go + tools + go + gopls + gotools + go-tools + ]; + + # import any additional build inputs from goPackage + inputsFrom = [ package ]; + }; +} diff --git a/integration-tests/smoke/run_test.sh b/integration-tests/smoke/run_test.sh new file mode 100755 index 00000000000..ab04dc8ac70 --- /dev/null +++ b/integration-tests/smoke/run_test.sh @@ -0,0 +1,152 @@ +#!/bin/bash + +# Get working dir of script +SCRIPT=$(readlink -f "$0") +TEST_PATH=$(dirname "$SCRIPT") + +# Init +SELECTED_NETWORKS="" +http_url="" +ws_url="" +user="" +log_level="DEBUG" # Default value +private_key="" +docker_image_repo="" +funding_per_node="0.1" # Default value +docker_image_version="" +additional_args="" +product="" +list_networks=0 +load_config="" +show_help=0 + +# Help +usage() { + echo "Usage: $0 [--list-networks] [--load-config file] [--selected-networks SELECTED_NETWORKS] [--http-url http_url] [--ws-url ws_url] [--user user] [--log-level log_level] [--private-key private_key] [--docker-image-repo docker_image_repo] [--funding-per-node funding_per_node] [--docker-image-version docker_image_version] [--test-suite test_suite] [--product product]" + echo + echo "Options:" + echo " --list-networks List all available networks" + echo " --load-config Load configuration from a file" + echo " --selected-networks Specify the selected networks" + echo " --http-url Specify HTTP RPC url" + echo " --ws-url Specify WS RPC url" + echo " --user Specify the user" + echo " --log-level Specify the log level (INFO, DEBUG, ERROR). Default: DEBUG" + echo " --private-key Specify the private key" + echo " --docker-image-repo Specify docker image repository" + echo " --funding-per-node Specify funding per node. Default: 0.1" + echo " --docker-image-version Specify docker image version" + echo " --test-suite Specify additional test suite args" + echo " --product Specify the product (Automation)" + exit 0 +} + +list_networks() { + echo "Available networks:" + networks="SIMULATED SIMULATED_1 SIMULATED_2 SIMULATED_BESU_NONDEV_1 SIMULATED_BESU_NONDEV_2 SIMULATED_NONDEV ETHEREUM_MAINNET GOERLI SEPOLIA KLAYTN_MAINNET KLAYTN_BAOBAB METIS_ANDROMEDA METIS_STARDUST ARBITRUM_MAINNET ARBITRUM_GOERLI ARBITRUM_SEPOLIA OPTIMISM_MAINNET OPTIMISM_GOERLI OPTIMISM_SEPOLIA BASE_GOERLI BASE_SEPOLIA CELO_ALFAJORES CELO_MAINNET RSK POLYGON_MUMBAI POLYGON_MAINNET AVALANCHE_FUJI AVALANCHE_MAINNET QUORUM SCROLL_SEPOLIA SCROLL_MAINNET BASE_MAINNET BSC_TESTNET BSC_MAINNET LINEA_GOERLI LINEA_MAINNET POLYGON_ZKEVM_GOERLI POLYGON_ZKEVM_MAINNET FANTOM_TESTNET FANTOM_MAINNET WEMIX_TESTNET WEMIX_MAINNET KROMA_SEPOLIA KROMA_MAINNET ZK_SYNC_GOERLI ZK_SYNC_MAINNET" + read -r -a network_array <<< "$networks" + columns=4 + for (( i=0; i<${#network_array[@]}; i++ )); do + # Print network name + printf '%-30s' "${network_array[i]}" + + # New line every 'columns' networks + if (( (i + 1) % columns == 0 )); then + echo + fi + done + echo + exit 0 +} + +# Validate config +load_and_validate_config() { + if [ -f "$load_config" ]; then + source "$load_config" + + # Validate mandatory variables + if [ -z "$SELECTED_NETWORKS" ]; then + echo "Error: SELECTED_NETWORKS variable is missing in the configuration file." + exit 1 + fi + else + echo "Error: Configuration file '$load_config' not found." + exit 1 + fi +} + +# Parse command-line options +while [[ $# -gt 0 ]]; do + case "$1" in + --list-networks ) list_networks=1; shift ;; + --help ) show_help=1; shift ;; + --load-config ) load_config="$2"; shift 2 ;; + --selected-networks ) SELECTED_NETWORKS="$2"; shift 2 ;; + --http-url ) http_url="$2"; shift 2 ;; + --ws-url ) ws_url="$2"; shift 2 ;; + --user ) user="$2"; shift 2 ;; + --log-level ) log_level="$2"; shift 2 ;; + --private-key ) private_key="$2"; shift 2 ;; + --docker-image-repo ) docker_image_repo="$2"; shift 2 ;; + --funding-per-node ) funding_per_node="$2"; shift 2 ;; + --docker-image-version ) docker_image_version="$2"; shift 2 ;; + --test-suite ) additional_args="$2"; shift 2 ;; + --product ) product="$2"; shift 2 ;; + --) shift; break ;; + *) break ;; + esac +done + +if [[ "$list_networks" -eq 1 ]]; then + list_networks +fi + +# Run tests +run_automation() { + echo "Running command with provided environment variables..." + go test -v -test.run "$SUITE" "${TEST_PATH}/automation_test.go" +} + +# Load config +if [[ -n "$load_config" ]]; then + load_and_validate_config + run_automation + exit 0 +fi + +if [[ "$show_help" -eq 1 ]]; then + usage + exit 0 +fi + +# Check arguments +if [[ -z "$SELECTED_NETWORKS" || -z "$http_url" || -z "$ws_url" || -z "$user" || -z "$private_key" || -z "$docker_image_repo" || -z "$docker_image_version" || -z "$additional_args" || -z "$product" ]]; then + echo "All options are mandatory." + usage + exit 1 +fi + +# Save config +save_current_config() { + local config_file="/tmp/${product}_config.env" + cat << EOF > "$config_file" +export SELECTED_NETWORKS="$SELECTED_NETWORKS" +export ${SELECTED_NETWORKS}_HTTP_URLS="$http_url" +export ${SELECTED_NETWORKS}_WS_URLS="$ws_url" +export CHAINLINK_ENV_USER="$user" +export TEST_LOG_LEVEL="$log_level" +export ${SELECTED_NETWORKS}_KEYS="$private_key" +export CHAINLINK_IMAGE="$docker_image_repo" +export CHAINLINK_NODE_FUNDING="$funding_per_node" +export CHAINLINK_VERSION="$docker_image_version" +export product="$product" +export SUITE="$additional_args" +EOF + source "$config_file" +} + +trap 'echo "An error occurred. Exiting..."; exit 1;' ERR + +# Main execution +save_current_config +run_automation diff --git a/integration-tests/smoke/shell.nix b/integration-tests/smoke/shell.nix new file mode 100644 index 00000000000..f19e1e732a4 --- /dev/null +++ b/integration-tests/smoke/shell.nix @@ -0,0 +1,21 @@ +{ pkgs # pkgs is a nixpkgs inheriting based on system with the gomod2nix overlay to build Go pkgs +, chainlink-dev # chainlink-dev is the devShell of the chainlink-dev CLI +}: + +# exports an shell derivation to be imported by the default.nix +pkgs.mkShell { + # based on pkgs, add those packages into env + buildInputs = with pkgs; [ + # Go + tools + go + gopls + gotools + go-tools + k3dnix + ]; + + # composing chainlink-dev shell to this shell enables us to have chainlink-dev CLI into env + inputsFrom = [ + chainlink-dev + ]; +}