build: use generic builder in urbit derivation

'installPhase' captures all the important stuff that builder.sh
previously did, and use of the generic builder allows stages of the
build to be more easily overridden.
This commit is contained in:
Jared Tobin 2020-01-30 11:14:30 +04:00
parent 4915ceb96b
commit 46a438f26e
No known key found for this signature in database
GPG Key ID: 0E4647D58F8A69E4
2 changed files with 9 additions and 16 deletions

View File

@ -1,15 +0,0 @@
source $stdenv/setup
cp -r $src ./src
chmod -R u+w ./src
cd src
bash ./configure
make clean
make all -j8
make test
mkdir -p $out/bin
cp ./build/urbit $out/bin/$exename
cp ./build/urbit-worker $out/bin/$exename-worker

View File

@ -27,9 +27,17 @@ let
inherit name meta; inherit name meta;
exename = name; exename = name;
src = ../../../pkg/urbit; src = ../../../pkg/urbit;
builder = ./builder.sh;
nativeBuildInputs = deps ++ vendor; nativeBuildInputs = deps ++ vendor;
installPhase = ''
make all -j8
make test
mkdir -p $out/bin
cp ./build/urbit $out/bin/$exename
cp ./build/urbit-worker $out/bin/$exename-worker
'';
# See https://github.com/NixOS/nixpkgs/issues/18995 # See https://github.com/NixOS/nixpkgs/issues/18995
hardeningDisable = if debug then [ "all" ] else []; hardeningDisable = if debug then [ "all" ] else [];