Merge pull request #86372 from marsam/fstar-completions

fstar: install completions
This commit is contained in:
Jörg Thalheim 2020-04-30 10:40:35 +01:00 committed by GitHub
commit 2b3da2708e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,4 +1,4 @@
{ stdenv, fetchFromGitHub, z3, ocamlPackages, makeWrapper }:
{ stdenv, fetchFromGitHub, z3, ocamlPackages, makeWrapper, installShellFiles }:
stdenv.mkDerivation rec {
pname = "fstar";
@ -11,7 +11,7 @@ stdenv.mkDerivation rec {
sha256 = "0wix7l229afkn6c6sk4nwkfq0nznsiqdkds4ixi2yyf72immwmmb";
};
nativeBuildInputs = [ makeWrapper ];
nativeBuildInputs = [ makeWrapper installShellFiles ];
buildInputs = with ocamlPackages; [
z3 ocaml findlib batteries menhir stdint
@ -33,6 +33,9 @@ stdenv.mkDerivation rec {
installFlags = [ "-C" "src/ocaml-output" ];
postInstall = ''
wrapProgram $out/bin/fstar.exe --prefix PATH ":" "${z3}/bin"
installShellCompletion --bash .completion/bash/fstar.exe.bash
installShellCompletion --fish .completion/fish/fstar.exe.fish
installShellCompletion --zsh --name _fstar.exe .completion/zsh/__fstar.exe
'';
meta = with stdenv.lib; {