8ac5e011d6
GitOrigin-RevId: 2c3273caa153ee8eb5786bc8141b85b859e7efd7
44 lines
1.3 KiB
Nix
44 lines
1.3 KiB
Nix
{ lib, pkgconfig, curl, openssl, zlib, fetchFromGitHub, rustPlatform }:
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
pname = "elan";
|
|
version = "0.8.0";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "kha";
|
|
repo = "elan";
|
|
rev = "v${version}";
|
|
sha256 = "0n2ncssjcmp3x5kbnci7xbq5fgcihlr3vaglyhhwzrxkjy2vpmpd";
|
|
};
|
|
|
|
cargoSha256 = "1pkg0n7kxckr0zhr8dr12b9fxg5q185kj3r9k2rmnkj2dpa2mxh3";
|
|
|
|
nativeBuildInputs = [ pkgconfig ];
|
|
|
|
buildInputs = [ curl zlib openssl ];
|
|
|
|
cargoBuildFlags = [ "--features no-self-update" ];
|
|
|
|
postInstall = ''
|
|
pushd $out/bin
|
|
mv elan-init elan
|
|
for link in lean leanpkg leanchecker leanc; do
|
|
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; {
|
|
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 ];
|
|
};
|
|
}
|