1{
2 buildPythonPackage,
3 installShellFiles,
4 pkg-config,
5 rustPlatform,
6 pkgs,
7}:
8
9buildPythonPackage {
10 inherit (pkgs.uv)
11 pname
12 version
13 src
14 cargoDeps
15 dontUseCmakeConfigure
16 meta
17 cargoBuildFlags
18 postInstall
19 versionCheckProgramArg
20 ;
21
22 postPatch = ''
23 substituteInPlace python/uv/_find_uv.py \
24 --replace-fail '"""Return the uv binary path."""' "return '$out/bin/uv'"
25 '';
26
27 nativeBuildInputs = [
28 pkgs.cmake
29 installShellFiles
30 pkg-config
31 rustPlatform.cargoSetupHook
32 rustPlatform.maturinBuildHook
33 ];
34
35 pyproject = true;
36 pythonImportsCheck = [ "uv" ];
37}