Unverified Commit 462b96d2 authored by Peder Bergebakken Sundt's avatar Peder Bergebakken Sundt Committed by GitHub
Browse files

Merge pull request #326243 from jcaesar/pr-13

treewide: skip generating shell completions using $out/bin/… when cross compiling
parents 6386378e 11d02a13
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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
}:

+1 −1
Original line number Diff line number Diff line
@@ -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) \
+2 −2
Original line number Diff line number Diff line
{ 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

+4 −4
Original line number Diff line number Diff line
@@ -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 ''
+1 −1
Original line number Diff line number Diff line
@@ -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) \
Loading