nixpkgs/pkgs/applications/science/logic/elan/default.nix

45 lines
1.3 KiB
Nix
Raw Normal View History

{ lib, pkgconfig, curl, openssl, zlib, fetchFromGitHub, rustPlatform }:
2018-04-10 17:36:12 +01:00
rustPlatform.buildRustPackage rec {
2019-08-31 12:41:23 +01:00
pname = "elan";
2020-05-19 06:02:43 +01:00
version = "0.10.2";
2018-04-10 17:36:12 +01:00
src = fetchFromGitHub {
owner = "kha";
repo = "elan";
rev = "v${version}";
2020-05-19 06:02:43 +01:00
sha256 = "0ycw1r364g5gwh8796dpv1israpg7zqwx8mcvnacv2lqj5iijmby";
2018-04-10 17:36:12 +01:00
};
2020-05-19 06:02:43 +01:00
cargoSha256 = "0hcaiy046d2gnkp6sfpnkkprb3nd94i9q8dgqxxpwrc1j157x6z9";
2018-04-10 17:36:12 +01:00
nativeBuildInputs = [ pkgconfig ];
buildInputs = [ curl zlib openssl ];
cargoBuildFlags = [ "--features no-self-update" ];
postInstall = ''
pushd $out/bin
mv elan-init elan
2020-05-07 14:35:13 +01:00
for link in lean leanpkg leanchecker leanc leanmake; do
2018-04-10 17:36:12 +01:00
ln -s elan $link
done
popd
# tries to create .elan
export HOME=$(mktemp -d)
mkdir -p "$out/share/"{bash-completion/completions,fish/vendor_completions.d,zsh/site-functions}
$out/bin/elan completions bash > "$out/share/bash-completion/completions/elan"
$out/bin/elan completions fish > "$out/share/fish/vendor_completions.d/elan.fish"
$out/bin/elan completions zsh > "$out/share/zsh/site-functions/_elan"
'';
meta = with lib; {
2018-04-10 17:36:12 +01:00
description = "Small tool to manage your installations of the Lean theorem prover";
homepage = "https://github.com/Kha/elan";
license = with licenses; [ asl20 /* or */ mit ];
maintainers = with maintainers; [ gebner ];
};
}