From 2f0e31f77ab65d9cfb8eedb7de2845f4bcbf0f94 Mon Sep 17 00:00:00 2001 From: Moraxyc Date: Fri, 4 Jul 2025 12:41:14 +0800 Subject: [PATCH] openlist: avoid using emulator for completions --- pkgs/by-name/op/openlist/package.nix | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) diff --git a/pkgs/by-name/op/openlist/package.nix b/pkgs/by-name/op/openlist/package.nix index 515b7d9b479a..818b49426bbf 100644 --- a/pkgs/by-name/op/openlist/package.nix +++ b/pkgs/by-name/op/openlist/package.nix @@ -4,7 +4,6 @@ buildGoModule, fetchFromGitHub, callPackage, - buildPackages, installShellFiles, versionCheckHook, fuse, @@ -71,20 +70,15 @@ buildGoModule (finalAttrs: { nativeBuildInputs = [ installShellFiles ]; - postInstall = lib.optionalString (stdenv.hostPlatform.emulatorAvailable buildPackages) ( - let - emulator = stdenv.hostPlatform.emulator buildPackages; - in - '' - installShellCompletion --cmd OpenList \ - --bash <(${emulator} $out/bin/OpenList completion bash) \ - --fish <(${emulator} $out/bin/OpenList completion fish) \ - --zsh <(${emulator} $out/bin/OpenList completion zsh) + postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) '' + installShellCompletion --cmd OpenList \ + --bash <($out/bin/OpenList completion bash) \ + --fish <($out/bin/OpenList completion fish) \ + --zsh <($out/bin/OpenList completion zsh) - mkdir $out/share/powershell/ -p - ${emulator} $out/bin/OpenList completion powershell > $out/share/powershell/OpenList.Completion.ps1 - '' - ); + mkdir $out/share/powershell/ -p + $out/bin/OpenList completion powershell > $out/share/powershell/OpenList.Completion.ps1 + ''; doInstallCheck = true; nativeInstallCheckInputs = [ versionCheckHook ];