mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-10-05 12:08:02 +03:00
treewide: rewrite some uses of hostPlatform == buildPlatform to canExecute
This rewrites uses of stdenv.hostPlatform == stdenv.buildPlatform to stdenv.buildPlatform.canExecute stdenv.hostPlatform when guarding postInstall scripts that use $out/bin/… to generate shell completions
This commit is contained in:
parent
6a9beaf893
commit
87e574e110
@ -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
|
||||
}:
|
||||
|
||||
|
@ -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) \
|
||||
|
@ -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
|
||||
|
@ -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 ? []
|
||||
|
@ -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) \
|
||||
|
Loading…
Reference in New Issue
Block a user