1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-24 06:31:02 +00:00

pyre: simplify build phases

This commit is contained in:
Jörg Thalheim 2018-12-03 08:19:28 +00:00
parent 92cba3aa0c
commit 3d444cfd8e
No known key found for this signature in database
GPG key ID: CA4106B8D7CC79FA

View file

@ -44,32 +44,29 @@ let
# python36Packages.python36Full # TODO
];
buildPhase = ''
preBuild = ''
# build requires HOME to be set
export HOME=.
export HOME=$TMPDIR
# "external" because https://github.com/facebook/pyre-check/pull/8/files
sed "s/%VERSION%/external/" dune.in > dune
cp ${versionFile} ./scripts/generate-version-number.sh
ln -sf ${versionFile} ./scripts/generate-version-number.sh
mkdir $(pwd)/build
export OCAMLFIND_DESTDIR=$(pwd)/build
export OCAMLPATH=$OCAMLPATH:$(pwd)/build
make release
'';
checkPhase = ''
make test
# ./scripts/run-python-tests.sh # TODO: once typeshed and python bits are added
'';
buildFlags = [ "release" ];
doCheck = true;
# ./scripts/run-python-tests.sh # TODO: once typeshed and python bits are added
# Note that we're not installing the typeshed yet.
# Improvement for a future version.
installPhase = ''
mkdir -p $out/bin
cp ./_build/default/main.exe $out/bin/pyre.bin
install -D ./_build/default/main.exe $out/bin/pyre.bin
'';
meta = with stdenv.lib; {