From 8901aab5ed636c63d18e9791b8be39fff03a6836 Mon Sep 17 00:00:00 2001 From: Stefan Frijters Date: Mon, 25 Nov 2024 13:38:54 +0100 Subject: [PATCH] uv: only generate shell completions when possible This fixes cross builds --- pkgs/by-name/uv/uv/package.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkgs/by-name/uv/uv/package.nix b/pkgs/by-name/uv/uv/package.nix index bbaa205a05a6..73ec3e84f860 100644 --- a/pkgs/by-name/uv/uv/package.nix +++ b/pkgs/by-name/uv/uv/package.nix @@ -1,5 +1,6 @@ { lib, + stdenv, cmake, fetchFromGitHub, installShellFiles, @@ -40,7 +41,7 @@ rustPlatform.buildRustPackage rec { # Tests require python3 doCheck = false; - postInstall = '' + postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) '' export HOME=$TMPDIR installShellCompletion --cmd uv \ --bash <($out/bin/uv --generate-shell-completion bash) \