Merge pull request #51424 from marsam/feature/update-pyre
pyre: 0.0.17 -> 0.0.18
This commit is contained in:
@@ -3,12 +3,12 @@
|
|||||||
let
|
let
|
||||||
# Manually set version - the setup script requires
|
# Manually set version - the setup script requires
|
||||||
# hg and git + keeping the .git directory around.
|
# hg and git + keeping the .git directory around.
|
||||||
pyre-version = "0.0.17"; # also change typeshed revision below with $pyre-src/.typeshed-version
|
pyre-version = "0.0.18"; # also change typeshed revision below with $pyre-src/.typeshed-version
|
||||||
pyre-src = fetchFromGitHub {
|
pyre-src = fetchFromGitHub {
|
||||||
owner = "facebook";
|
owner = "facebook";
|
||||||
repo = "pyre-check";
|
repo = "pyre-check";
|
||||||
rev = "v${pyre-version}";
|
rev = "v${pyre-version}";
|
||||||
sha256 = "0y86a3g5xbgh0byksyx5jw7yq7w840x85dhz9inz6mkg5j06mcis";
|
sha256 = "1sy1lk9j3hq20dabfkr9s4r7prrcndrs345a5iqz6yzvakr4r74d";
|
||||||
};
|
};
|
||||||
versionFile = writeScript "version.ml" ''
|
versionFile = writeScript "version.ml" ''
|
||||||
cat > "./version.ml" <<EOF
|
cat > "./version.ml" <<EOF
|
||||||
@@ -21,6 +21,7 @@ let
|
|||||||
let log_version_banner () =
|
let log_version_banner () =
|
||||||
Log.info "Running as pid: %d" (Pid.to_int (Unix.getpid ()));
|
Log.info "Running as pid: %d" (Pid.to_int (Unix.getpid ()));
|
||||||
Log.info "Version: %s" (version ());
|
Log.info "Version: %s" (version ());
|
||||||
|
Log.info "Build info: %s" (build_info ())
|
||||||
EOF
|
EOF
|
||||||
'';
|
'';
|
||||||
pyre-bin = stdenv.mkDerivation {
|
pyre-bin = stdenv.mkDerivation {
|
||||||
@@ -28,8 +29,6 @@ let
|
|||||||
|
|
||||||
src = pyre-src;
|
src = pyre-src;
|
||||||
|
|
||||||
nativeBuildInputs = [ makeWrapper ];
|
|
||||||
|
|
||||||
buildInputs = with ocamlPackages; [
|
buildInputs = with ocamlPackages; [
|
||||||
ocaml
|
ocaml
|
||||||
findlib
|
findlib
|
||||||
@@ -45,32 +44,29 @@ let
|
|||||||
# python36Packages.python36Full # TODO
|
# python36Packages.python36Full # TODO
|
||||||
];
|
];
|
||||||
|
|
||||||
buildPhase = ''
|
preBuild = ''
|
||||||
# build requires HOME to be set
|
# build requires HOME to be set
|
||||||
export HOME=.
|
export HOME=$TMPDIR
|
||||||
|
|
||||||
# "external" because https://github.com/facebook/pyre-check/pull/8/files
|
# "external" because https://github.com/facebook/pyre-check/pull/8/files
|
||||||
sed "s/%VERSION%/external/" dune.in > dune
|
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
|
mkdir $(pwd)/build
|
||||||
export OCAMLFIND_DESTDIR=$(pwd)/build
|
export OCAMLFIND_DESTDIR=$(pwd)/build
|
||||||
export OCAMLPATH=$OCAMLPATH:$(pwd)/build
|
export OCAMLPATH=$OCAMLPATH:$(pwd)/build
|
||||||
|
|
||||||
make release
|
|
||||||
'';
|
'';
|
||||||
|
|
||||||
checkPhase = ''
|
buildFlags = [ "release" ];
|
||||||
make test
|
|
||||||
# ./scripts/run-python-tests.sh # TODO: once typeshed and python bits are added
|
doCheck = true;
|
||||||
'';
|
# ./scripts/run-python-tests.sh # TODO: once typeshed and python bits are added
|
||||||
|
|
||||||
# Note that we're not installing the typeshed yet.
|
# Note that we're not installing the typeshed yet.
|
||||||
# Improvement for a future version.
|
# Improvement for a future version.
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
mkdir -p $out/bin
|
install -D ./_build/default/main.exe $out/bin/pyre.bin
|
||||||
cp ./_build/default/main.exe $out/bin/pyre.bin
|
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with stdenv.lib; {
|
||||||
|
|||||||
Reference in New Issue
Block a user