mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-03-13 23:06:35 +01:00
55 lines
1.3 KiB
Nix
55 lines
1.3 KiB
Nix
{
|
|
lib,
|
|
pkgs,
|
|
fetchFromGitHub,
|
|
buildPythonPackage,
|
|
rustPlatform,
|
|
callPackage,
|
|
}:
|
|
|
|
buildPythonPackage (finalAttrs: {
|
|
pname = "uv-build";
|
|
version = "0.10.0";
|
|
pyproject = true;
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "astral-sh";
|
|
repo = "uv";
|
|
tag = finalAttrs.version;
|
|
hash = "sha256-nD26zqKMK5LNkeYdqVYteeYL4mYaQQ/QlyjbMDDhLAY=";
|
|
};
|
|
|
|
nativeBuildInputs = [
|
|
rustPlatform.cargoSetupHook
|
|
rustPlatform.maturinBuildHook
|
|
];
|
|
|
|
cargoDeps = rustPlatform.fetchCargoVendor {
|
|
inherit (finalAttrs) pname version src;
|
|
hash = "sha256-lEynVemQHCI7ZKD2+1n4K/AtEYRld2+aRLkDMSX8ejM=";
|
|
};
|
|
|
|
buildAndTestSubdir = "crates/uv-build";
|
|
|
|
# $src/.github/workflows/build-binaries.yml#L139
|
|
maturinBuildProfile = "minimal-size";
|
|
|
|
pythonImportsCheck = [ "uv_build" ];
|
|
|
|
# The package has no tests
|
|
doCheck = false;
|
|
|
|
# Run the tests of a package built by `uv_build`.
|
|
passthru = {
|
|
tests.built-by-uv = callPackage ./built-by-uv.nix { };
|
|
|
|
# updateScript is not needed here, as updating is done on staging
|
|
};
|
|
|
|
meta = {
|
|
description = "Minimal build backend for uv";
|
|
homepage = "https://docs.astral.sh/uv/reference/settings/#build-backend";
|
|
inherit (pkgs.uv.meta) changelog license;
|
|
maintainers = with lib.maintainers; [ bengsparks ];
|
|
};
|
|
})
|