mirror of
https://github.com/urbit/shrub.git
synced 2024-11-24 04:58:08 +03:00
build: add Ropsten derivations for arvo and pills
Arvo testnets typically use Ropsten's deploy of the Azimuth contract instead of mainnet's. This commit adds an 'arvo-ropsten' derivation for Arvo as specialised to Ropsten. In addition to using a different Azimuth address in %zuse, this also configures %ames and :acme appropriately for running an alternate network on Ropsten. %ames has its protocol version incremented, and :acme uses the Let's Encrypt staging API. Included here are derivations for creating brass and ivory pills using arvo-ropsten, to boot.
This commit is contained in:
parent
536e56d675
commit
0bdced981e
@ -2,10 +2,11 @@
|
||||
|
||||
let
|
||||
|
||||
tlon = import ../pkgs { inherit pkgs; };
|
||||
arvo = tlon.arvo;
|
||||
herb = tlon.herb;
|
||||
urbit = if debug then tlon.urbit-debug else tlon.urbit;
|
||||
tlon = import ../pkgs { inherit pkgs; };
|
||||
arvo = tlon.arvo;
|
||||
arvo-ropsten = tlon.arvo-ropsten;
|
||||
herb = tlon.herb;
|
||||
urbit = if debug then tlon.urbit-debug else tlon.urbit;
|
||||
|
||||
bootbrass = ../../bin/brass.pill;
|
||||
bootsolid = ../../bin/solid.pill;
|
||||
@ -17,6 +18,13 @@ let
|
||||
arvo = null;
|
||||
};
|
||||
|
||||
ropzod = import ./fakeship {
|
||||
inherit pkgs herb urbit;
|
||||
pill = bootsolid;
|
||||
ship = "zod";
|
||||
arvo = arvo-ropsten;
|
||||
};
|
||||
|
||||
zod = import ./fakeship {
|
||||
inherit pkgs herb urbit arvo;
|
||||
pill = bootsolid;
|
||||
@ -48,11 +56,23 @@ rec {
|
||||
pier = zod;
|
||||
};
|
||||
|
||||
brass-ropsten = import ./brass {
|
||||
inherit pkgs herb urbit;
|
||||
arvo = arvo-ropsten;
|
||||
pier = ropzod;
|
||||
};
|
||||
|
||||
ivory = import ./ivory {
|
||||
inherit pkgs herb urbit arvo;
|
||||
pier = zod;
|
||||
};
|
||||
|
||||
ivory-ropsten = import ./ivory {
|
||||
inherit pkgs herb urbit;
|
||||
arvo = arvo-ropsten;
|
||||
pier = ropzod;
|
||||
};
|
||||
|
||||
image = import ./image {
|
||||
inherit pkgs urbit;
|
||||
pill = bootsolid;
|
||||
|
26
nix/pkgs/arvo-ropsten/builder.sh
Normal file
26
nix/pkgs/arvo-ropsten/builder.sh
Normal file
@ -0,0 +1,26 @@
|
||||
source $stdenv/setup
|
||||
|
||||
cp -r $src tmp
|
||||
chmod -R u+w tmp
|
||||
|
||||
ZUSE=tmp/sys/zuse.hoon
|
||||
AMES=tmp/sys/vane/ames.hoon
|
||||
ACME=tmp/app/acme.hoon
|
||||
|
||||
# replace the mainnet azimuth contract with the ropsten contract
|
||||
sed --in-place \
|
||||
's/\(\+\+ contracts \)mainnet\-contracts/\1ropsten-contracts/' \
|
||||
$ZUSE
|
||||
|
||||
# increment the %ames protocol version
|
||||
sed -r --in-place \
|
||||
's/^(=\+ protocol\-version=)([0-9])/echo "\1$(echo "(\2+1) % 8" | bc)"/e' \
|
||||
$AMES
|
||||
|
||||
# use the staging API in :acme
|
||||
sed --in-place \
|
||||
's_https://acme-v02.api.letsencrypt.org/directory_https://acme-staging-v02.api.letsencrypt.org/directory_' \
|
||||
$ACME
|
||||
|
||||
cp -r tmp $out
|
||||
chmod -R u+w $out
|
8
nix/pkgs/arvo-ropsten/default.nix
Normal file
8
nix/pkgs/arvo-ropsten/default.nix
Normal file
@ -0,0 +1,8 @@
|
||||
{ pkgs }:
|
||||
|
||||
pkgs.stdenv.mkDerivation {
|
||||
name = "arvo-ropsten";
|
||||
buildInputs = [ pkgs.bc ];
|
||||
builder = ./builder.sh;
|
||||
src = pkgs.buildRustCrateHelpers.exclude [ ".git" ] ../../../pkg/arvo;
|
||||
}
|
@ -6,6 +6,7 @@ let
|
||||
|
||||
ent = import ./ent { inherit pkgs; };
|
||||
arvo = import ./arvo { inherit pkgs; };
|
||||
arvo-ropsten = import ./arvo-ropsten { inherit pkgs; };
|
||||
herb = import ../../pkg/herb { inherit pkgs; };
|
||||
|
||||
ge-additions = import ./ge-additions {
|
||||
@ -25,4 +26,4 @@ let
|
||||
|
||||
in
|
||||
|
||||
{ inherit ent ge-additions arvo herb urbit urbit-debug; }
|
||||
{ inherit ent ge-additions arvo arvo-ropsten herb urbit urbit-debug; }
|
||||
|
Loading…
Reference in New Issue
Block a user