uv: format with nixfmt

This commit is contained in:
Gaetan Lepage 2024-08-18 10:10:19 +02:00
parent 3b1ac17270
commit ed92740818

View File

@ -1,16 +1,17 @@
{ lib {
, cmake lib,
, darwin cmake,
, fetchFromGitHub darwin,
, installShellFiles fetchFromGitHub,
, libiconv installShellFiles,
, pkg-config libiconv,
, python3Packages pkg-config,
, rustPlatform python3Packages,
, stdenv rustPlatform,
, testers stdenv,
, uv testers,
, nix-update-script uv,
nix-update-script,
}: }:
python3Packages.buildPythonApplication rec { python3Packages.buildPythonApplication rec {
@ -44,13 +45,14 @@ python3Packages.buildPythonApplication rec {
buildInputs = [ buildInputs = [
libiconv libiconv
] ++ lib.optionals stdenv.isDarwin [ ] ++ lib.optionals stdenv.isDarwin [ darwin.apple_sdk.frameworks.SystemConfiguration ];
darwin.apple_sdk.frameworks.SystemConfiguration
];
dontUseCmakeConfigure = true; dontUseCmakeConfigure = true;
cargoBuildFlags = [ "--package" "uv" ]; cargoBuildFlags = [
"--package"
"uv"
];
postInstall = '' postInstall = ''
export HOME=$TMPDIR export HOME=$TMPDIR
@ -60,14 +62,10 @@ python3Packages.buildPythonApplication rec {
--zsh <($out/bin/uv --generate-shell-completion zsh) --zsh <($out/bin/uv --generate-shell-completion zsh)
''; '';
pythonImportsCheck = [ pythonImportsCheck = [ "uv" ];
"uv"
];
passthru = { passthru = {
tests.version = testers.testVersion { tests.version = testers.testVersion { package = uv; };
package = uv;
};
updateScript = nix-update-script { }; updateScript = nix-update-script { };
}; };
@ -75,7 +73,10 @@ python3Packages.buildPythonApplication rec {
description = "Extremely fast Python package installer and resolver, written in Rust"; description = "Extremely fast Python package installer and resolver, written in Rust";
homepage = "https://github.com/astral-sh/uv"; homepage = "https://github.com/astral-sh/uv";
changelog = "https://github.com/astral-sh/uv/blob/${src.rev}/CHANGELOG.md"; changelog = "https://github.com/astral-sh/uv/blob/${src.rev}/CHANGELOG.md";
license = with lib.licenses; [ asl20 mit ]; license = with lib.licenses; [
asl20
mit
];
maintainers = with lib.maintainers; [ GaetanLepage ]; maintainers = with lib.maintainers; [ GaetanLepage ];
mainProgram = "uv"; mainProgram = "uv";
}; };