overlays #3

Merged
JustScreaMy merged 4 commits from overlays into master 2024-11-29 20:46:45 +01:00
Showing only changes of commit 2ae131956d - Show all commits

View file

@ -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
];