Merge pull request #125402 from Pamplemousse/ptags

This commit is contained in:
Sandro 2021-06-02 19:57:03 +02:00 committed by GitHub
commit 50aeda3131
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,8 +1,9 @@
{ fetchFromGitHub
, cargo
, ctags
, lib
, makeWrapper
, rustPlatform
}:
rustPlatform.buildRustPackage rec {
@ -18,6 +19,14 @@ rustPlatform.buildRustPackage rec {
cargoSha256 = "1pz5hvn1iq26i8c2cmqavhnri8h0sn40khrxvcdkj9q47nsj5wcx";
nativeBuildInputs = [ makeWrapper ];
postInstall = ''
# `ctags` must be accessible in `PATH` for `ptags` to work.
wrapProgram "$out/bin/ptags" \
--prefix PATH : "${lib.makeBinPath [ ctags ]}"
'';
# Sanity check.
checkPhase = ''
$releaseDir/ptags --help > /dev/null