Unverified Commit 4dbb808a authored by Philip Taron's avatar Philip Taron Committed by GitHub
Browse files

treewide: use stdenv.buildPlatform.canExecute (#350195)

parents c73098df e77269f1
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -116,7 +116,7 @@ buildPythonApplication rec {
  ];

  # check phase uses the output bin, which is not possible when cross-compiling
  doCheck = stdenv.buildPlatform == stdenv.hostPlatform;
  doCheck = stdenv.buildPlatform.canExecute stdenv.hostPlatform;

  checkPhase = ''
    runHook preCheck
+1 −1
Original line number Diff line number Diff line
@@ -29,7 +29,7 @@ buildGoModule rec {

  doCheck = false; # requires docker, container-diff (unpackaged yet)

  postInstall = lib.optionalString (stdenv.hostPlatform == stdenv.buildPlatform) ''
  postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
    for shell in bash fish zsh; do
      $out/bin/executor completion $shell > executor.$shell
      installShellCompletion executor.$shell
+1 −1
Original line number Diff line number Diff line
@@ -29,7 +29,7 @@ buildGoModule rec {
  '';
  doCheck = true;

  postInstall = lib.optionalString (stdenv.hostPlatform == stdenv.buildPlatform) ''
  postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
    installShellCompletion --cmd kubeshark \
      --bash <($out/bin/kubeshark completion bash) \
      --fish <($out/bin/kubeshark completion fish) \
+1 −1
Original line number Diff line number Diff line
@@ -40,7 +40,7 @@ buildGoModule rec {
  '';

  nativeBuildInputs = [ installShellFiles ];
  postInstall = lib.optionalString (stdenv.hostPlatform == stdenv.buildPlatform) ''
  postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
    installShellCompletion --cmd vela \
      --bash <($out/bin/vela completion bash) \
      --zsh <($out/bin/vela completion zsh)
+1 −1
Original line number Diff line number Diff line
@@ -117,7 +117,7 @@ let
        --prefix GST_PLUGIN_SYSTEM_PATH_1_0 : "$GST_PLUGIN_SYSTEM_PATH_1_0"
    '';

    doInstallCheck = stdenv.hostPlatform == stdenv.buildPlatform;
    doInstallCheck = stdenv.buildPlatform.canExecute stdenv.hostPlatform;
    # In particular, this detects missing python imports in some of the tools.
    postFixup = let
      # TODO: python is a script, so it doesn't work as interpreter on darwin
Loading