move fixup
This commit is contained in:
parent
63f888db9b
commit
2ae131956d
1 changed files with 28 additions and 1 deletions
|
@ -2,6 +2,8 @@
|
||||||
stdenv,
|
stdenv,
|
||||||
versionCheckHook,
|
versionCheckHook,
|
||||||
lib,
|
lib,
|
||||||
|
installShellFiles,
|
||||||
|
autoPatchelfHook,
|
||||||
}:
|
}:
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "uv-bin";
|
pname = "uv-bin";
|
||||||
|
@ -9,9 +11,34 @@ stdenv.mkDerivation rec {
|
||||||
|
|
||||||
src = fetchTarball {
|
src = fetchTarball {
|
||||||
url = "https://github.com/astral-sh/uv/releases/download/${version}/uv-x86_64-unknown-linux-gnu.tar.gz";
|
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 = [
|
nativeCheckInputs = [
|
||||||
versionCheckHook
|
versionCheckHook
|
||||||
];
|
];
|
||||||
|
|
Loading…
Reference in a new issue