Merge pull request #1364 from urbit/ivory-script

Added update-ivory-pill script
This commit is contained in:
Jared Tobin 2019-07-20 05:52:43 -02:30 committed by GitHub
commit 8fe2bb21b9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 53 additions and 0 deletions

View File

@ -21,6 +21,7 @@ test:
pills:
sh/update-solid-pill
sh/update-brass-pill
sh/update-ivory-pill
clean:
rm -rf ./out ./work

View File

@ -48,4 +48,9 @@ rec {
pier = zod;
};
ivory = import ./ivory {
inherit arvo pkgs tlon deps debug;
pier = zod;
};
}

22
nix/ops/ivory/builder.sh Executable file
View File

@ -0,0 +1,22 @@
source $stdenv/setup
set -ex
cp -r $PIER ./pier
chmod -R u+rw ./pier
$URBIT -d ./pier
cleanup () {
if [ -e ./pier/.vere.lock ]
then kill $(< ./pier/.vere.lock) || true;
fi
}
trap cleanup EXIT
herb ./pier -P ivory.pill -d '+ivory'
mv ivory.pill $out
set +x

19
nix/ops/ivory/default.nix Normal file
View File

@ -0,0 +1,19 @@
{ pkgs, tlon, deps, pier, arvo, debug }:
let
urbitExe = if debug
then "${tlon.urbit-debug}/bin/urbit-debug -g"
else "${tlon.urbit}/bin/urbit";
in
pkgs.stdenv.mkDerivation rec {
name = "ivory";
builder = ./builder.sh;
buildInputs = [ tlon.herb pkgs.coreutils ];
URBIT = urbitExe;
PIER = pier;
ARVO = arvo;
}

6
sh/update-ivory-pill Executable file
View File

@ -0,0 +1,6 @@
#!/usr/bin/env bash
set -ex
pkg=$(nix-build nix/ops -A ivory --no-out-link)
cp $pkg bin/ivory.pill