File tree Expand file tree Collapse file tree 1 file changed +16
-9
lines changed Expand file tree Collapse file tree 1 file changed +16
-9
lines changed Original file line number Diff line number Diff line change 11{
22 lib ,
33 stdenv ,
4- cmake ,
4+ rustPlatform ,
55 fetchFromGitHub ,
6+
7+ # nativeBuildInputs
8+ cmake ,
69 installShellFiles ,
710 pkg-config ,
8- rustPlatform ,
11+
12+ buildPackages ,
913 versionCheckHook ,
1014 python3Packages ,
1115 nix-update-script ,
@@ -41,13 +45,16 @@ rustPlatform.buildRustPackage rec {
4145 # Tests require python3
4246 doCheck = false ;
4347
44- postInstall = lib . optionalString ( stdenv . buildPlatform . canExecute stdenv . hostPlatform ) ''
45- export HOME=$TMPDIR
46- installShellCompletion --cmd uv \
47- --bash <($out/bin/uv --generate-shell-completion bash) \
48- --fish <($out/bin/uv --generate-shell-completion fish) \
49- --zsh <($out/bin/uv --generate-shell-completion zsh)
50- '' ;
48+ postInstall =
49+ let
50+ emulator = stdenv . hostPlatform . emulator buildPackages ;
51+ in
52+ ''
53+ installShellCompletion --cmd uv \
54+ --bash <(${ emulator } $out/bin/uv generate-shell-completion bash) \
55+ --fish <(${ emulator } $out/bin/uv generate-shell-completion fish) \
56+ --zsh <(${ emulator } $out/bin/uv generate-shell-completion zsh)
57+ '' ;
5158
5259 nativeInstallCheckInputs = [
5360 versionCheckHook
You can’t perform that action at this time.
0 commit comments