mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-23 15:33:13 +00:00
mise: fix shell completion
Replace 'usage' cmd in completion files with nix store path
This commit is contained in:
parent
796699f22b
commit
e7062a6b06
@ -1,18 +1,20 @@
|
||||
{ lib
|
||||
, nix-update-script
|
||||
, rustPlatform
|
||||
, fetchFromGitHub
|
||||
, installShellFiles
|
||||
, stdenv
|
||||
, coreutils
|
||||
, bash
|
||||
, pkg-config
|
||||
, openssl
|
||||
, direnv
|
||||
, Security
|
||||
, SystemConfiguration
|
||||
, mise
|
||||
, testers
|
||||
{
|
||||
lib,
|
||||
nix-update-script,
|
||||
rustPlatform,
|
||||
fetchFromGitHub,
|
||||
installShellFiles,
|
||||
stdenv,
|
||||
coreutils,
|
||||
bash,
|
||||
pkg-config,
|
||||
openssl,
|
||||
direnv,
|
||||
Security,
|
||||
SystemConfiguration,
|
||||
usage,
|
||||
mise,
|
||||
testers,
|
||||
}:
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
@ -34,8 +36,16 @@ rustPlatform.buildRustPackage rec {
|
||||
|
||||
cargoHash = "sha256-jGqaGbue+AEK0YjhHMlm84XBgA20p8Um03TjctjXVz0=";
|
||||
|
||||
nativeBuildInputs = [ installShellFiles pkg-config ];
|
||||
buildInputs = [ openssl ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ Security SystemConfiguration ];
|
||||
nativeBuildInputs = [
|
||||
installShellFiles
|
||||
pkg-config
|
||||
];
|
||||
buildInputs =
|
||||
[ openssl ]
|
||||
++ lib.optionals stdenv.hostPlatform.isDarwin [
|
||||
Security
|
||||
SystemConfiguration
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
patchShebangs --build \
|
||||
@ -70,6 +80,10 @@ rustPlatform.buildRustPackage rec {
|
||||
postInstall = ''
|
||||
installManPage ./man/man1/mise.1
|
||||
|
||||
substituteInPlace ./completions/{mise.bash,mise.fish,_mise} \
|
||||
--replace-fail '-v usage' '-v ${usage}/bin/usage' \
|
||||
--replace-fail 'usage complete-word' '${usage}/bin/usage complete-word'
|
||||
|
||||
installShellCompletion \
|
||||
--bash ./completions/mise.bash \
|
||||
--fish ./completions/mise.fish \
|
||||
|
Loading…
Reference in New Issue
Block a user