overlays #3
1 changed files with 28 additions and 1 deletions
|
@ -2,6 +2,8 @@
|
|||
stdenv,
|
||||
versionCheckHook,
|
||||
lib,
|
||||
installShellFiles,
|
||||
autoPatchelfHook,
|
||||
}:
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "uv-bin";
|
||||
|
@ -9,9 +11,34 @@ stdenv.mkDerivation rec {
|
|||
|
||||
src = fetchTarball {
|
||||
url = "https://github.com/astral-sh/uv/releases/download/${version}/uv-x86_64-unknown-linux-gnu.tar.gz";
|
||||
sha256 = "";
|
||||
sha256 = "1rgqmgj9syjansfmkvg1819i70f41za647izgh5hrvjsmcnm6nk7";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
installShellFiles
|
||||
autoPatchelfHook
|
||||
stdenv.cc.cc.lib
|
||||
];
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
mkdir -p $out/bin
|
||||
|
||||
cp * $out/bin
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
postInstall = ''
|
||||
$out/bin/uv --version || echo "Binary execution failed."
|
||||
export HOME=$TMPDIR
|
||||
installShellCompletion --cmd uv \
|
||||
--bash <($out/bin/uv --generate-shell-completion bash) \
|
||||
--fish <($out/bin/uv --generate-shell-completion fish) \
|
||||
--zsh <($out/bin/uv --generate-shell-completion zsh)
|
||||
'';
|
||||
|
||||
nativeCheckInputs = [
|
||||
versionCheckHook
|
||||
];
|
||||
|
|
Loading…
Reference in a new issue