git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #51424 from marsam/feature/update-pyre

pyre: 0.0.17 -> 0.0.18

commit60ede4d711834290503a69c7e6dad4356a06680d authorJörg Thalheim <Mic92@users.noreply.github.com> dateMon 3 Dec 2018, 08:47 (8 years ago) parente59970e3d444cf
1 file changed+11−15
pkgs/development/tools/pyre/default.nix+11−15
pkgs/development/tools/pyre/default.nix+11−15
@@ -3,12 +3,12 @@
33let
44 # Manually set version - the setup script requires
55 # hg and git + keeping the .git directory around.
6− pyre-version = "0.0.17"; # also change typeshed revision below with $pyre-src/.typeshed-version
6+ pyre-version = "0.0.18"; # also change typeshed revision below with $pyre-src/.typeshed-version
77 pyre-src = fetchFromGitHub {
88 owner = "facebook";
99 repo = "pyre-check";
1010 rev = "v${pyre-version}";
11− sha256 = "0y86a3g5xbgh0byksyx5jw7yq7w840x85dhz9inz6mkg5j06mcis";
11+ sha256 = "1sy1lk9j3hq20dabfkr9s4r7prrcndrs345a5iqz6yzvakr4r74d";
1212 };
1313 versionFile = writeScript "version.ml" ''
1414 cat > "./version.ml" <<EOF
@@ -21,6 +21,7 @@ let
2121 let log_version_banner () =
2222 Log.info "Running as pid: %d" (Pid.to_int (Unix.getpid ()));
2323 Log.info "Version: %s" (version ());
24+ Log.info "Build info: %s" (build_info ())
2425 EOF
2526 '';
2627 pyre-bin = stdenv.mkDerivation {
@@ -28,8 +29,6 @@ let
2829
2930 src = pyre-src;
3031
31− nativeBuildInputs = [ makeWrapper ];
32−
3332 buildInputs = with ocamlPackages; [
3433 ocaml
3534 findlib
@@ -45,32 +44,29 @@ let
4544 # python36Packages.python36Full # TODO
4645 ];
4746
48− buildPhase = ''
47+ preBuild = ''
4948 # build requires HOME to be set
50− export HOME=.
49+ export HOME=$TMPDIR
5150
5251 # "external" because https://github.com/facebook/pyre-check/pull/8/files
5352 sed "s/%VERSION%/external/" dune.in > dune
5453
55− cp ${versionFile} ./scripts/generate-version-number.sh
54+ ln -sf ${versionFile} ./scripts/generate-version-number.sh
5655
5756 mkdir $(pwd)/build
5857 export OCAMLFIND_DESTDIR=$(pwd)/build
5958 export OCAMLPATH=$OCAMLPATH:$(pwd)/build
60−
61− make release
6259 '';
6360
64− checkPhase = ''
65− make test
66− # ./scripts/run-python-tests.sh # TODO: once typeshed and python bits are added
67− '';
61+ buildFlags = [ "release" ];
62+
63+ doCheck = true;
64+ # ./scripts/run-python-tests.sh # TODO: once typeshed and python bits are added
6865
6966 # Note that we're not installing the typeshed yet.
7067 # Improvement for a future version.
7168 installPhase = ''
72− mkdir -p $out/bin
73− cp ./_build/default/main.exe $out/bin/pyre.bin
69+ install -D ./_build/default/main.exe $out/bin/pyre.bin
7470 '';
7571
7672 meta = with stdenv.lib; {