Added update-ivory-pill script

This commit is contained in:
Logan Allen 2019-07-19 16:05:46 -07:00
parent 4ec911895f
commit d4b5e0114c
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