diff options
author | Julius Michaelis <gitter@liftm.de> | 2024-07-10 20:52:28 +0900 |
---|---|---|
committer | Julius Michaelis <gitter@liftm.de> | 2024-08-04 10:50:48 +0900 |
commit | 6a9beaf893707ea2ce653dc2bacad484f084b5ad (patch) | |
tree | 7df739aa273a8db9b759c324434fd7a79ca6540e /pkgs/by-name/pi | |
parent | 59b930d820bbda1b1e83627088a45a689617581a (diff) |
treewide: skip generating shell completions using $out/bin/… when cross compiling
This focuses on Rust packages, since the most commonly used argument parser library (clap/structopt) makes the following pattern natural and thus common: postInstall = '' installShellCompletion --cmd foo \ --bash <($out/bin/foo completion bash) \ … This commit just guards those with lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) splitting the string where unrelated actions are performed.
Diffstat (limited to 'pkgs/by-name/pi')
-rw-r--r-- | pkgs/by-name/pi/pixi/package.nix | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/pkgs/by-name/pi/pixi/package.nix b/pkgs/by-name/pi/pixi/package.nix index e6b4c55783929..8fe5169127e64 100644 --- a/pkgs/by-name/pi/pixi/package.nix +++ b/pkgs/by-name/pi/pixi/package.nix @@ -80,7 +80,7 @@ rustPlatform.buildRustPackage rec { "--skip=cli::shell_hook::tests::test_environment_json" ]; - 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) \ |