Merge pull request #326243 from jcaesar/pr-13
treewide: skip generating shell completions using $out/bin/… when cross compiling
This commit is contained in:
@@ -3,8 +3,8 @@
|
||||
, fetchFromGitHub
|
||||
, stdenv
|
||||
, installShellFiles
|
||||
, installShellCompletions ? stdenv.hostPlatform == stdenv.buildPlatform
|
||||
, installManPages ? stdenv.hostPlatform == stdenv.buildPlatform
|
||||
, installShellCompletions ? stdenv.buildPlatform.canExecute stdenv.hostPlatform
|
||||
, installManPages ? stdenv.buildPlatform.canExecute stdenv.hostPlatform
|
||||
, withTcp ? true
|
||||
}:
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ rustPlatform.buildRustPackage rec {
|
||||
|
||||
nativeBuildInputs = [ installShellFiles ];
|
||||
|
||||
postInstall = ''
|
||||
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
|
||||
installShellCompletion --cmd flavours \
|
||||
--zsh <($out/bin/flavours --completions zsh) \
|
||||
--fish <($out/bin/flavours --completions fish) \
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ lib, rustPlatform, fetchFromGitHub, installShellFiles }:
|
||||
{ lib, rustPlatform, fetchFromGitHub, installShellFiles, stdenv }:
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "genact";
|
||||
@@ -15,7 +15,7 @@ rustPlatform.buildRustPackage rec {
|
||||
|
||||
nativeBuildInputs = [ installShellFiles ];
|
||||
|
||||
postInstall = ''
|
||||
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
|
||||
$out/bin/genact --print-manpage > genact.1
|
||||
installManPage genact.1
|
||||
|
||||
|
||||
@@ -51,11 +51,11 @@ rustPlatform.buildRustPackage rec {
|
||||
"--skip=watcher::tests::the_gauntlet"
|
||||
];
|
||||
|
||||
postInstall = ''
|
||||
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
|
||||
installShellCompletion --cmd inlyne \
|
||||
--bash <($out/bin/inlyne --gen-completions bash) \
|
||||
--fish <($out/bin/inlyne --gen-completions fish) \
|
||||
--zsh <($out/bin/inlyne --gen-completions zsh)
|
||||
--bash completions/inlyne.bash \
|
||||
--fish completions/inlyne.fish \
|
||||
--zsh completions/_inlyne
|
||||
'';
|
||||
|
||||
postFixup = lib.optionalString stdenv.isLinux ''
|
||||
|
||||
@@ -34,7 +34,7 @@ rustPlatform.buildRustPackage rec {
|
||||
sqlite
|
||||
] ++ lib.optionals stdenv.isDarwin [ darwin.apple_sdk.frameworks.Security ];
|
||||
|
||||
postInstall = ''
|
||||
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
|
||||
installShellCompletion --cmd leetcode \
|
||||
--bash <($out/bin/leetcode completions bash) \
|
||||
--fish <($out/bin/leetcode completions fish) \
|
||||
|
||||
@@ -19,6 +19,7 @@ rustPlatform.buildRustPackage rec {
|
||||
|
||||
postInstall = ''
|
||||
installManPage Documentation/git-absorb.1
|
||||
'' + lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
|
||||
installShellCompletion --cmd git-absorb \
|
||||
--bash <($out/bin/git-absorb --gen-completions bash) \
|
||||
--fish <($out/bin/git-absorb --gen-completions fish) \
|
||||
|
||||
@@ -52,7 +52,7 @@ rustPlatform.buildRustPackage rec {
|
||||
libiconv
|
||||
];
|
||||
|
||||
postInstall = ''
|
||||
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
|
||||
$out/bin/jj util mangen > ./jj.1
|
||||
installManPage ./jj.1
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
, dbus
|
||||
, libseccomp
|
||||
, systemd
|
||||
, stdenv
|
||||
}:
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
@@ -27,7 +28,7 @@ rustPlatform.buildRustPackage rec {
|
||||
|
||||
buildInputs = [ dbus libseccomp systemd ];
|
||||
|
||||
postInstall = ''
|
||||
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
|
||||
installShellCompletion --cmd youki \
|
||||
--bash <($out/bin/youki completion -s bash) \
|
||||
--fish <($out/bin/youki completion -s fish) \
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ lib, rustPlatform, fetchFromGitHub, installShellFiles }:
|
||||
{ lib, rustPlatform, fetchFromGitHub, installShellFiles, stdenv }:
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "ab-av1";
|
||||
@@ -15,7 +15,7 @@ rustPlatform.buildRustPackage rec {
|
||||
|
||||
nativeBuildInputs = [ installShellFiles ];
|
||||
|
||||
postInstall = ''
|
||||
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
|
||||
installShellCompletion --cmd ab-av1 \
|
||||
--bash <($out/bin/ab-av1 print-completions bash) \
|
||||
--fish <($out/bin/ab-av1 print-completions fish) \
|
||||
|
||||
@@ -25,7 +25,7 @@ rustPlatform.buildRustPackage rec {
|
||||
rm .cargo/config.toml
|
||||
'';
|
||||
|
||||
postInstall = ''
|
||||
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
|
||||
installShellCompletion --cmd sg \
|
||||
--bash <($out/bin/sg completions bash) \
|
||||
--fish <($out/bin/sg completions fish) \
|
||||
|
||||
@@ -46,7 +46,7 @@ rustPlatform.buildRustPackage {
|
||||
# to nix-daemon to import NARs, which is not possible in the build sandbox.
|
||||
doCheck = false;
|
||||
|
||||
postInstall = lib.optionalString (stdenv.hostPlatform == stdenv.buildPlatform) ''
|
||||
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
|
||||
if [[ -f $out/bin/attic ]]; then
|
||||
installShellCompletion --cmd attic \
|
||||
--bash <($out/bin/attic gen-completions bash) \
|
||||
|
||||
@@ -38,7 +38,7 @@ rustPlatform.buildRustPackage rec {
|
||||
"--skip=test_x11_primary"
|
||||
];
|
||||
|
||||
postInstall = ''
|
||||
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
|
||||
for cmd in clipcatd clipcatctl clipcat-menu clipcat-notify; do
|
||||
installShellCompletion --cmd $cmd \
|
||||
--bash <($out/bin/$cmd completions bash) \
|
||||
|
||||
@@ -39,7 +39,7 @@ rustPlatform.buildRustPackage rec {
|
||||
]
|
||||
);
|
||||
|
||||
postInstall = ''
|
||||
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
|
||||
installShellCompletion --cmd berg \
|
||||
--bash <($out/bin/berg completion bash) \
|
||||
--fish <($out/bin/berg completion fish) \
|
||||
|
||||
@@ -79,7 +79,7 @@ rustPlatform.buildRustPackage rec {
|
||||
# Tests currently fail due to *many* duplicate definition errors
|
||||
doCheck = false;
|
||||
|
||||
postInstall = ''
|
||||
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
|
||||
installShellCompletion --cmd diesel \
|
||||
--bash <($out/bin/diesel completions bash) \
|
||||
--fish <($out/bin/diesel completions fish) \
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
, lib
|
||||
, micronucleus
|
||||
, rustPlatform
|
||||
, stdenv
|
||||
}:
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
@@ -23,7 +24,7 @@ rustPlatform.buildRustPackage rec {
|
||||
|
||||
buildInputs = [ micronucleus ];
|
||||
|
||||
postInstall = ''
|
||||
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
|
||||
installShellCompletion --cmd elf2nucleus \
|
||||
--bash <($out/bin/elf2nucleus --completions bash) \
|
||||
--fish <($out/bin/elf2nucleus --completions fish) \
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
, installShellFiles
|
||||
, rustPlatform
|
||||
, fetchFromGitLab
|
||||
, stdenv
|
||||
}:
|
||||
|
||||
let
|
||||
@@ -25,7 +26,8 @@ rustPlatform.buildRustPackage {
|
||||
installShellFiles
|
||||
];
|
||||
|
||||
postInstall = "installShellCompletion --cmd ${pname} "
|
||||
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) (
|
||||
"installShellCompletion --cmd ${pname} "
|
||||
+ builtins.concatStringsSep
|
||||
" "
|
||||
(builtins.map
|
||||
@@ -35,7 +37,8 @@ rustPlatform.buildRustPackage {
|
||||
"fish"
|
||||
"zsh"
|
||||
]
|
||||
);
|
||||
)
|
||||
);
|
||||
|
||||
meta = {
|
||||
description = "Task runner with DAG-based parallelism";
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
, pkg-config
|
||||
, darwin
|
||||
, installShellFiles
|
||||
, installShellCompletions ? stdenv.hostPlatform == stdenv.buildPlatform
|
||||
, installManPages ? stdenv.hostPlatform == stdenv.buildPlatform
|
||||
, installShellCompletions ? stdenv.buildPlatform.canExecute stdenv.hostPlatform
|
||||
, installManPages ? stdenv.buildPlatform.canExecute stdenv.hostPlatform
|
||||
, notmuch
|
||||
, gpgme
|
||||
, buildNoDefaultFeatures ? false
|
||||
|
||||
@@ -25,7 +25,7 @@ rustPlatform.buildRustPackage rec {
|
||||
darwin.apple_sdk.frameworks.Foundation
|
||||
];
|
||||
|
||||
postInstall = ''
|
||||
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
|
||||
installShellCompletion --cmd joshuto \
|
||||
--bash <($out/bin/joshuto completions bash) \
|
||||
--zsh <($out/bin/joshuto completions zsh) \
|
||||
|
||||
@@ -51,29 +51,32 @@ rustPlatform.buildRustPackage rec {
|
||||
|
||||
# maa-cli would only seach libMaaCore.so and resources in itself's path
|
||||
# https://github.com/MaaAssistantArknights/maa-cli/issues/67
|
||||
postInstall = ''
|
||||
mkdir -p $out/share/maa-assistant-arknights/
|
||||
ln -s ${maa-assistant-arknights}/share/maa-assistant-arknights/* $out/share/maa-assistant-arknights/
|
||||
ln -s ${maa-assistant-arknights}/lib/* $out/share/maa-assistant-arknights/
|
||||
mv $out/bin/maa $out/share/maa-assistant-arknights/
|
||||
postInstall =
|
||||
''
|
||||
mkdir -p $out/share/maa-assistant-arknights/
|
||||
ln -s ${maa-assistant-arknights}/share/maa-assistant-arknights/* $out/share/maa-assistant-arknights/
|
||||
ln -s ${maa-assistant-arknights}/lib/* $out/share/maa-assistant-arknights/
|
||||
mv $out/bin/maa $out/share/maa-assistant-arknights/
|
||||
|
||||
makeWrapper $out/share/maa-assistant-arknights/maa $out/bin/maa \
|
||||
--prefix PATH : "${
|
||||
lib.makeBinPath [
|
||||
android-tools
|
||||
git
|
||||
]
|
||||
}"
|
||||
makeWrapper $out/share/maa-assistant-arknights/maa $out/bin/maa \
|
||||
--prefix PATH : "${
|
||||
lib.makeBinPath [
|
||||
android-tools
|
||||
git
|
||||
]
|
||||
}"
|
||||
|
||||
installShellCompletion --cmd maa \
|
||||
--bash <($out/bin/maa complete bash) \
|
||||
--fish <($out/bin/maa complete fish) \
|
||||
--zsh <($out/bin/maa complete zsh)
|
||||
''
|
||||
+ lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
|
||||
installShellCompletion --cmd maa \
|
||||
--bash <($out/bin/maa complete bash) \
|
||||
--fish <($out/bin/maa complete fish) \
|
||||
--zsh <($out/bin/maa complete zsh)
|
||||
|
||||
mkdir -p manpage
|
||||
$out/bin/maa mangen --path manpage
|
||||
installManPage manpage/*
|
||||
'';
|
||||
mkdir -p manpage
|
||||
$out/bin/maa mangen --path manpage
|
||||
installManPage manpage/*
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Simple CLI for MAA by Rust";
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
, pkg-config
|
||||
, darwin
|
||||
, installShellFiles
|
||||
, installShellCompletions ? stdenv.hostPlatform == stdenv.buildPlatform
|
||||
, installManPages ? stdenv.hostPlatform == stdenv.buildPlatform
|
||||
, installShellCompletions ? stdenv.buildPlatform.canExecute stdenv.hostPlatform
|
||||
, installManPages ? stdenv.buildPlatform.canExecute stdenv.hostPlatform
|
||||
, notmuch
|
||||
, buildNoDefaultFeatures ? false
|
||||
, buildFeatures ? []
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
rustPlatform,
|
||||
fetchFromGitHub,
|
||||
installShellFiles,
|
||||
stdenv,
|
||||
}: let
|
||||
version = "0.15.2";
|
||||
in
|
||||
@@ -21,7 +22,7 @@ in
|
||||
|
||||
nativeBuildInputs = [installShellFiles];
|
||||
|
||||
postInstall = ''
|
||||
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
|
||||
installShellCompletion --cmd pace \
|
||||
--bash <($out/bin/pace setup completions bash) \
|
||||
--fish <($out/bin/pace setup completions fish) \
|
||||
|
||||
@@ -86,7 +86,7 @@ rustPlatform.buildRustPackage rec {
|
||||
"--skip=task::task_graph::test::test_multi_env_defaults_ambigu"
|
||||
];
|
||||
|
||||
postInstall = ''
|
||||
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
|
||||
installShellCompletion --cmd pixi \
|
||||
--bash <($out/bin/pixi completion --shell bash) \
|
||||
--fish <($out/bin/pixi completion --shell fish) \
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
{ lib
|
||||
, stdenv
|
||||
, fetchFromGitHub
|
||||
, rustPlatform
|
||||
, asciidoctor
|
||||
@@ -24,6 +25,7 @@ rustPlatform.buildRustPackage rec {
|
||||
# Built by ./build.rs using `asciidoctor`
|
||||
installManPage ./target/*/release/build/qrtool*/out/*.?
|
||||
|
||||
'' + lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
|
||||
installShellCompletion --cmd qrtool \
|
||||
--bash <($out/bin/qrtool --generate-completion bash) \
|
||||
--fish <($out/bin/qrtool --generate-completion fish) \
|
||||
|
||||
@@ -28,7 +28,7 @@ rustPlatform.buildRustPackage rec {
|
||||
# Tests depend on additional infrastructure to be running locally
|
||||
doCheck = false;
|
||||
|
||||
postInstall = ''
|
||||
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
|
||||
installShellCompletion --cmd ${meta.mainProgram} \
|
||||
--bash <($out/bin/${meta.mainProgram} generate-completions bash) \
|
||||
--fish <($out/bin/${meta.mainProgram} generate-completions fish) \
|
||||
|
||||
@@ -41,7 +41,7 @@ rustPlatform.buildRustPackage rec {
|
||||
# in "checkPhase", hence fails in sandbox of "nix".
|
||||
doCheck = false;
|
||||
|
||||
postInstall = ''
|
||||
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
|
||||
installShellCompletion --cmd sn0int \
|
||||
--bash <($out/bin/sn0int completions bash) \
|
||||
--fish <($out/bin/sn0int completions fish) \
|
||||
|
||||
@@ -80,7 +80,7 @@ rustPlatform.buildRustPackage rec {
|
||||
Libsystem
|
||||
];
|
||||
|
||||
postInstall = ''
|
||||
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
|
||||
installShellCompletion --cmd solana \
|
||||
--bash <($out/bin/solana completion --shell bash) \
|
||||
--fish <($out/bin/solana completion --shell fish) \
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
, lib
|
||||
, rustPlatform
|
||||
, fetchFromGitHub
|
||||
, stdenv
|
||||
}:
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
@@ -18,7 +19,7 @@ rustPlatform.buildRustPackage rec {
|
||||
cargoHash = "sha256-MSN0xQj6IfOjI0qQqVBaGhh0BQJa4z24El2rGLlFBSM=";
|
||||
|
||||
nativeBuildInputs = [ installShellFiles ];
|
||||
postInstall = ''
|
||||
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
|
||||
installShellCompletion --cmd steamguard \
|
||||
--bash <($out/bin/steamguard completion --shell bash) \
|
||||
--fish <($out/bin/steamguard completion --shell fish) \
|
||||
|
||||
@@ -36,7 +36,7 @@ rustPlatform.buildRustPackage rec {
|
||||
|
||||
RUSTONIG_SYSTEM_LIBONIG = true;
|
||||
|
||||
postInstall = ''
|
||||
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
|
||||
installShellCompletion --cmd zola \
|
||||
--bash <($out/bin/zola completion bash) \
|
||||
--fish <($out/bin/zola completion fish) \
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ lib, rustPlatform, fetchFromGitHub, installShellFiles }:
|
||||
{ lib, rustPlatform, fetchFromGitHub, installShellFiles, stdenv }:
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "jrsonnet";
|
||||
@@ -28,6 +28,7 @@ rustPlatform.buildRustPackage rec {
|
||||
postInstall = ''
|
||||
ln -s $out/bin/jrsonnet $out/bin/jsonnet
|
||||
|
||||
'' + lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
|
||||
for shell in bash zsh fish; do
|
||||
installShellCompletion --cmd jrsonnet \
|
||||
--$shell <($out/bin/jrsonnet --generate $shell /dev/null)
|
||||
|
||||
@@ -21,7 +21,7 @@ rustPlatform.buildRustPackage rec {
|
||||
|
||||
buildInputs = [ libgit2 ] ++ lib.optional stdenv.isDarwin Security;
|
||||
|
||||
postInstall = ''
|
||||
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
|
||||
installShellCompletion --cmd cog \
|
||||
--bash <($out/bin/cog generate-completions bash) \
|
||||
--fish <($out/bin/cog generate-completions fish) \
|
||||
|
||||
@@ -56,7 +56,7 @@ rustPlatform.buildRustPackage rec {
|
||||
"--skip=toolchain::rust::tests::test_xtensa_rust_parse_version"
|
||||
];
|
||||
|
||||
postInstall = ''
|
||||
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
|
||||
installShellCompletion --cmd espup \
|
||||
--bash <($out/bin/espup completions bash) \
|
||||
--fish <($out/bin/espup completions fish) \
|
||||
|
||||
@@ -27,7 +27,7 @@ rustPlatform.buildRustPackage rec {
|
||||
|
||||
doCheck = false;
|
||||
|
||||
postInstall = ''
|
||||
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
|
||||
installShellCompletion --cmd fnm \
|
||||
--bash <($out/bin/fnm completions --shell bash) \
|
||||
--fish <($out/bin/fnm completions --shell fish) \
|
||||
|
||||
@@ -22,7 +22,7 @@ rustPlatform.buildRustPackage rec {
|
||||
installShellFiles
|
||||
];
|
||||
|
||||
postInstall = ''
|
||||
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
|
||||
installShellCompletion --cmd cargo-asm \
|
||||
--bash <($out/bin/cargo-asm --bpaf-complete-style-bash) \
|
||||
--fish <($out/bin/cargo-asm --bpaf-complete-style-fish) \
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ lib, rustPlatform, fetchCrate, installShellFiles }:
|
||||
{ lib, rustPlatform, fetchCrate, installShellFiles, stdenv }:
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "cauwugo";
|
||||
@@ -14,7 +14,7 @@ rustPlatform.buildRustPackage rec {
|
||||
|
||||
nativeBuildInputs = [ installShellFiles ];
|
||||
|
||||
postInstall = ''
|
||||
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
|
||||
installShellCompletion --cmd cauwugo \
|
||||
--bash <($out/bin/cauwugo --bpaf-complete-style-bash) \
|
||||
--fish <($out/bin/cauwugo --bpaf-complete-style-fish) \
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
, rustPlatform
|
||||
, fetchFromGitHub
|
||||
, installShellFiles
|
||||
, stdenv
|
||||
}:
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
@@ -21,7 +22,7 @@ rustPlatform.buildRustPackage rec {
|
||||
|
||||
buildFeatures = [ "go" ];
|
||||
|
||||
postInstall = ''
|
||||
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
|
||||
installShellCompletion --cmd typeshare \
|
||||
--bash <($out/bin/typeshare completions bash) \
|
||||
--fish <($out/bin/typeshare completions fish) \
|
||||
|
||||
@@ -29,7 +29,7 @@ rustPlatform.buildRustPackage rec {
|
||||
|
||||
cargoHash = "sha256-9L02ox2T+dBRx+mmFpy5Bktsyp3C/havfZoDaNevIMw=";
|
||||
|
||||
postInstall = ''
|
||||
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
|
||||
installShellCompletion --cmd sentry-cli \
|
||||
--bash <($out/bin/sentry-cli completions bash) \
|
||||
--fish <($out/bin/sentry-cli completions fish) \
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
, rustPlatform
|
||||
, fetchFromGitHub
|
||||
, installShellFiles
|
||||
, stdenv
|
||||
}:
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
@@ -19,7 +20,7 @@ rustPlatform.buildRustPackage rec {
|
||||
|
||||
nativeBuildInputs = [ installShellFiles ];
|
||||
|
||||
postInstall = ''
|
||||
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
|
||||
installShellCompletion --cmd snazy \
|
||||
--bash <($out/bin/snazy --shell-completion bash) \
|
||||
--fish <($out/bin/snazy --shell-completion fish) \
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
, installShellFiles
|
||||
, rustPlatform
|
||||
, protobuf
|
||||
, stdenv
|
||||
}:
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
@@ -35,7 +36,7 @@ rustPlatform.buildRustPackage rec {
|
||||
"--skip config::tests::toml_example_changed"
|
||||
];
|
||||
|
||||
postInstall = ''
|
||||
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
|
||||
installShellCompletion --cmd tokio-console \
|
||||
--bash <($out/bin/tokio-console --log-dir $(mktemp -d) gen-completion bash) \
|
||||
--fish <($out/bin/tokio-console --log-dir $(mktemp -d) gen-completion fish) \
|
||||
|
||||
@@ -32,7 +32,7 @@ rustPlatform.buildRustPackage rec {
|
||||
|
||||
HOME = "$TMPDIR";
|
||||
|
||||
postInstall = ''
|
||||
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
|
||||
installShellCompletion --cmd volta \
|
||||
--bash <($out/bin/volta completions bash) \
|
||||
--fish <($out/bin/volta completions fish) \
|
||||
|
||||
@@ -68,7 +68,7 @@ rustPlatform.buildRustPackage rec {
|
||||
find ./target -name libswc_common${stdenv.hostPlatform.extensions.sharedLibrary} -delete
|
||||
'';
|
||||
|
||||
postInstall = ''
|
||||
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
|
||||
installShellCompletion --cmd deno \
|
||||
--bash <($out/bin/deno completions bash) \
|
||||
--fish <($out/bin/deno completions fish) \
|
||||
|
||||
@@ -33,7 +33,7 @@ rustPlatform.buildRustPackage rec {
|
||||
"--skip=validate_printed_urls"
|
||||
];
|
||||
|
||||
postInstall = ''
|
||||
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
|
||||
installShellCompletion --cmd dufs \
|
||||
--bash <($out/bin/dufs --completions bash) \
|
||||
--fish <($out/bin/dufs --completions fish) \
|
||||
|
||||
@@ -20,7 +20,7 @@ rustPlatform.buildRustPackage rec {
|
||||
|
||||
NIX_EVAL_JOBS = "${nix-eval-jobs}/bin/nix-eval-jobs";
|
||||
|
||||
postInstall = lib.optionalString (stdenv.hostPlatform == stdenv.buildPlatform) ''
|
||||
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
|
||||
installShellCompletion --cmd colmena \
|
||||
--bash <($out/bin/colmena gen-completions bash) \
|
||||
--zsh <($out/bin/colmena gen-completions zsh) \
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
, rustPlatform
|
||||
, fetchFromGitHub
|
||||
, installShellFiles
|
||||
, stdenv
|
||||
}:
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
@@ -23,11 +24,11 @@ rustPlatform.buildRustPackage rec {
|
||||
rm .cargo/config.toml
|
||||
'';
|
||||
|
||||
postInstall = ''
|
||||
installShellCompletion --cmd himalaya \
|
||||
--bash <($out/bin/chara completion --shell bash) \
|
||||
--fish <($out/bin/chara completion --shell fish) \
|
||||
--zsh <($out/bin/chara completion --shell zsh)
|
||||
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
|
||||
installShellCompletion --cmd chara \
|
||||
--bash <($out/bin/chara completions --shell bash) \
|
||||
--fish <($out/bin/chara completions --shell fish) \
|
||||
--zsh <($out/bin/chara completions --shell zsh)
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
|
||||
@@ -25,7 +25,7 @@ rustPlatform.buildRustPackage rec {
|
||||
|
||||
nativeCheckInputs = [ which installShellFiles ];
|
||||
|
||||
postInstall = ''
|
||||
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
|
||||
installShellCompletion --cmd dotter \
|
||||
--bash <($out/bin/dotter gen-completions --shell bash) \
|
||||
--fish <($out/bin/dotter gen-completions --shell fish) \
|
||||
|
||||
@@ -18,7 +18,7 @@ rustPlatform.buildRustPackage rec {
|
||||
|
||||
nativeBuildInputs = [ installShellFiles ];
|
||||
|
||||
postInstall = ''
|
||||
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
|
||||
installShellCompletion --cmd imdl \
|
||||
--bash <($out/bin/imdl completions bash) \
|
||||
--fish <($out/bin/imdl completions fish) \
|
||||
|
||||
@@ -41,7 +41,7 @@ rustPlatform.buildRustPackage rec {
|
||||
"--skip=validate_printed_urls"
|
||||
];
|
||||
|
||||
postInstall = ''
|
||||
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
|
||||
$out/bin/miniserve --print-manpage >miniserve.1
|
||||
installManPage miniserve.1
|
||||
|
||||
|
||||
@@ -47,7 +47,7 @@ rustPlatform.buildRustPackage rec {
|
||||
git commit -m test
|
||||
'';
|
||||
|
||||
postInstall = ''
|
||||
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
|
||||
installShellCompletion --cmd onefetch \
|
||||
--bash <($out/bin/onefetch --generate bash) \
|
||||
--fish <($out/bin/onefetch --generate fish) \
|
||||
|
||||
@@ -50,7 +50,7 @@ rustPlatform.buildRustPackage rec {
|
||||
"--skip lock_and_source_profiles"
|
||||
];
|
||||
|
||||
postInstall = ''
|
||||
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
|
||||
installShellCompletion --cmd sheldon \
|
||||
--bash <($out/bin/sheldon completions --shell bash) \
|
||||
--zsh <($out/bin/sheldon completions --shell zsh)
|
||||
|
||||
@@ -34,14 +34,14 @@ rustPlatform.buildRustPackage rec {
|
||||
'';
|
||||
|
||||
postInstall = ''
|
||||
presetdir=$out/share/starship/presets/
|
||||
mkdir -p $presetdir
|
||||
cp docs/public/presets/toml/*.toml $presetdir
|
||||
'' + lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
|
||||
installShellCompletion --cmd starship \
|
||||
--bash <($out/bin/starship completions bash) \
|
||||
--fish <($out/bin/starship completions fish) \
|
||||
--zsh <($out/bin/starship completions zsh)
|
||||
|
||||
presetdir=$out/share/starship/presets/
|
||||
mkdir -p $presetdir
|
||||
cp docs/public/presets/toml/*.toml $presetdir
|
||||
'';
|
||||
|
||||
cargoHash = "sha256-yJ32HFaRpujJ9mQa+07b5cQcl1ATO/56dpm1IeKcbzs=";
|
||||
|
||||
@@ -36,7 +36,7 @@ rustPlatform.buildRustPackage rec {
|
||||
"AppKit"
|
||||
]);
|
||||
|
||||
postInstall = ''
|
||||
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
|
||||
installShellCompletion --cmd topgrade \
|
||||
--bash <($out/bin/topgrade --gen-completion bash) \
|
||||
--fish <($out/bin/topgrade --gen-completion fish) \
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ lib, rustPlatform, fetchCrate, installShellFiles }:
|
||||
{ lib, rustPlatform, fetchCrate, installShellFiles, stdenv }:
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "trashy";
|
||||
@@ -13,7 +13,7 @@ rustPlatform.buildRustPackage rec {
|
||||
|
||||
nativeBuildInputs = [ installShellFiles ];
|
||||
|
||||
preFixup = ''
|
||||
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
|
||||
installShellCompletion --cmd trash \
|
||||
--bash <($out/bin/trash completions bash) \
|
||||
--fish <($out/bin/trash completions fish) \
|
||||
|
||||
@@ -50,6 +50,7 @@ rustPlatform.buildRustPackage rec {
|
||||
# Copy the standard library to $out/lib
|
||||
cp -r ${src}/tremor-script/lib/ $out
|
||||
|
||||
'' + lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
|
||||
installShellCompletion --cmd tremor \
|
||||
--bash <($out/bin/tremor completions bash) \
|
||||
--fish <($out/bin/tremor completions fish) \
|
||||
|
||||
@@ -25,7 +25,7 @@ rustPlatform.buildRustPackage rec {
|
||||
nativeBuildInputs = [ pkg-config installShellFiles ];
|
||||
buildInputs = [ openssl ] ++ lib.optionals stdenv.isDarwin [ Security ];
|
||||
|
||||
postInstall = ''
|
||||
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
|
||||
installShellCompletion --cmd twm \
|
||||
--bash <($out/bin/twm --print-bash-completion) \
|
||||
--zsh <($out/bin/twm --print-zsh-completion) \
|
||||
|
||||
@@ -50,6 +50,7 @@ rustPlatform.buildRustPackage rec {
|
||||
mandown docs/MANPAGE.md > zellij.1
|
||||
installManPage zellij.1
|
||||
|
||||
'' + lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
|
||||
installShellCompletion --cmd $pname \
|
||||
--bash <($out/bin/zellij setup --generate-completion bash) \
|
||||
--fish <($out/bin/zellij setup --generate-completion fish) \
|
||||
|
||||
@@ -28,7 +28,7 @@ rustPlatform.buildRustPackage rec {
|
||||
# all tests involve networking and are bound fail
|
||||
doCheck = false;
|
||||
|
||||
postInstall = ''
|
||||
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
|
||||
installShellCompletion --cmd wormhole-rs \
|
||||
--bash <($out/bin/wormhole-rs completion bash) \
|
||||
--fish <($out/bin/wormhole-rs completion fish) \
|
||||
|
||||
@@ -35,7 +35,7 @@ rustPlatform.buildRustPackage rec {
|
||||
NIX_CFLAGS_COMPILE = "-I${lib.getDev libcxx}/include/c++/v1";
|
||||
};
|
||||
|
||||
postInstall = ''
|
||||
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
|
||||
installShellCompletion --cmd fh \
|
||||
--bash <($out/bin/fh completion bash) \
|
||||
--fish <($out/bin/fh completion fish) \
|
||||
|
||||
@@ -35,6 +35,7 @@ rustPlatform.buildRustPackage rec {
|
||||
wrapProgram $out/bin/nix-template \
|
||||
--prefix PATH : ${lib.makeBinPath [ nix ]}
|
||||
|
||||
'' + lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
|
||||
installShellCompletion --cmd nix-template \
|
||||
--bash <($out/bin/nix-template completions bash) \
|
||||
--fish <($out/bin/nix-template completions fish) \
|
||||
|
||||
@@ -55,7 +55,7 @@ rustPlatform.buildRustPackage rec {
|
||||
|
||||
cargoTestFlags = [ "--package" "bws" ];
|
||||
|
||||
postInstall = ''
|
||||
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
|
||||
installShellCompletion --cmd bws \
|
||||
--bash <($out/bin/bws completions bash) \
|
||||
--fish <($out/bin/bws completions fish) \
|
||||
|
||||
@@ -17,7 +17,7 @@ rustPlatform.buildRustPackage rec {
|
||||
|
||||
buildInputs = lib.optional stdenv.isDarwin Security;
|
||||
|
||||
postInstall = ''
|
||||
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
|
||||
installShellCompletion --cmd jwt \
|
||||
--bash <($out/bin/jwt completion bash) \
|
||||
--fish <($out/bin/jwt completion fish) \
|
||||
|
||||
@@ -39,6 +39,7 @@ rustPlatform.buildRustPackage rec {
|
||||
postInstall = ''
|
||||
mkdir -p $out/share/kbs2
|
||||
cp -r contrib/ $out/share/kbs2
|
||||
'' + lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
|
||||
installShellCompletion --cmd kbs2 \
|
||||
--bash <($out/bin/kbs2 --completions bash) \
|
||||
--fish <($out/bin/kbs2 --completions fish) \
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
, gtk3
|
||||
, libxcb
|
||||
, libxkbcommon
|
||||
, stdenv
|
||||
}:
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
@@ -44,7 +45,7 @@ rustPlatform.buildRustPackage rec {
|
||||
libxkbcommon
|
||||
];
|
||||
|
||||
postInstall = ''
|
||||
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
|
||||
for shell in bash fish zsh; do
|
||||
installShellCompletion --cmd prs --$shell <($out/bin/prs internal completions $shell --stdout)
|
||||
done
|
||||
|
||||
@@ -51,6 +51,7 @@ rustPlatform.buildRustPackage rec {
|
||||
|
||||
postInstall = ''
|
||||
install -Dm755 -t $out/bin bin/git-credential-rbw
|
||||
'' + lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
|
||||
installShellCompletion --cmd rbw \
|
||||
--bash <($out/bin/rbw gen-completions bash) \
|
||||
--fish <($out/bin/rbw gen-completions fish) \
|
||||
|
||||
@@ -24,7 +24,7 @@ rustPlatform.buildRustPackage rec {
|
||||
|
||||
cargoBuildFlags = [ "--bin" "sy" ];
|
||||
|
||||
postInstall = ''
|
||||
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
|
||||
installShellCompletion --cmd sy \
|
||||
--bash <($out/bin/sy completions bash) \
|
||||
--fish <($out/bin/sy completions fish) \
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
, rustPlatform
|
||||
, installShellFiles
|
||||
, rustfmt
|
||||
, stdenv
|
||||
}:
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
@@ -24,7 +25,7 @@ rustPlatform.buildRustPackage rec {
|
||||
rustfmt
|
||||
];
|
||||
|
||||
postInstall = ''
|
||||
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
|
||||
installShellCompletion --cmd shisho \
|
||||
--bash <($out/bin/shisho completion bash) \
|
||||
--fish <($out/bin/shisho completion fish) \
|
||||
|
||||
@@ -68,7 +68,7 @@ rustPlatform.buildRustPackage rec {
|
||||
"--skip=test_words_delete"
|
||||
];
|
||||
|
||||
postInstall = ''
|
||||
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
|
||||
installShellCompletion --cmd ltrs \
|
||||
--bash <($out/bin/ltrs completions bash) \
|
||||
--fish <($out/bin/ltrs completions fish) \
|
||||
|
||||
@@ -43,7 +43,7 @@ rustPlatform.buildRustPackage rec {
|
||||
ln -sf ${./Cargo.lock} Cargo.lock
|
||||
'';
|
||||
|
||||
postInstall = ''
|
||||
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
|
||||
installShellCompletion --cmd termbook \
|
||||
--bash <($out/bin/termbook completions bash) \
|
||||
--fish <($out/bin/termbook completions fish) \
|
||||
|
||||
Reference in New Issue
Block a user