Make it possible to run the local simulation on nixOS
This commit is contained in:
parent
f71a279d17
commit
b4d731a1cc
|
@ -7,8 +7,11 @@ mkShell {
|
|||
git
|
||||
gnumake
|
||||
|
||||
# For installing ganache for local simulations
|
||||
nodePackages.ganache-cli
|
||||
# For the local simulation
|
||||
openssl # for generating the JWT file
|
||||
lsof # for killing processes by port
|
||||
killall # for killing processes manually
|
||||
curl # for working with the node APIs
|
||||
] ++ lib.optionals (!stdenv.isDarwin) [
|
||||
lsb-release
|
||||
];
|
||||
|
|
|
@ -17,4 +17,12 @@ fi
|
|||
# Architecture detection
|
||||
ARCH="$(uname -m)"
|
||||
|
||||
patchelf_when_on_nixos () {
|
||||
if [ -f /etc/NIXOS ]; then
|
||||
nix-shell \
|
||||
-p stdenv.cc \
|
||||
--command 'patchelf --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) "'$1'"'
|
||||
fi
|
||||
}
|
||||
|
||||
fi
|
||||
|
|
|
@ -51,6 +51,7 @@ download_geth_stable() {
|
|||
mkdir -p "$(dirname "$STABLE_GETH_BINARY")"
|
||||
mv "$tmp_extract_dir/geth$EXE_EXTENSION" "$STABLE_GETH_BINARY"
|
||||
chmod +x "$STABLE_GETH_BINARY"
|
||||
patchelf_when_on_nixos "$STABLE_GETH_BINARY"
|
||||
fi
|
||||
}
|
||||
|
||||
|
@ -96,6 +97,7 @@ download_status_geth_binary() {
|
|||
mkdir -p "$(dirname "$BINARY_FS_PATH")"
|
||||
mv "$tmp_extract_dir/geth$EXE_EXTENSION" "$BINARY_FS_PATH"
|
||||
chmod +x "$BINARY_FS_PATH"
|
||||
patchelf_when_on_nixos "$BINARY_FS_PATH"
|
||||
fi
|
||||
}
|
||||
|
||||
|
|
|
@ -577,6 +577,7 @@ download_nimbus_eth1() {
|
|||
mkdir -p "$(dirname "$NIMBUS_ETH1_BINARY")"
|
||||
mv "$tmp_extract_dir/build/nimbus$EXE_EXTENSION" "$NIMBUS_ETH1_BINARY"
|
||||
chmod +x "$NIMBUS_ETH1_BINARY"
|
||||
patchelf_when_on_nixos "$NIMBUS_ETH1_BINARY"
|
||||
fi
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue