nix configuration for uv

This commit is contained in:
Timofey Ivankov 2025-12-15 17:58:40 +03:00
parent a2d64aa224
commit e66739ce0b
1 changed files with 30 additions and 0 deletions

30
flake.nix Normal file
View File

@ -0,0 +1,30 @@
{
description = "uv fast Python package manager";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = { self, nixpkgs, flake-utils }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs { inherit system; };
in
{
packages.default = pkgs.stdenv.mkDerivation {
name = "uv";
buildCommand = ''
mkdir -p $out/bin
curl -LsSf https://astral.sh/uv/install.sh | sh
cp -r ~/.local/bin/uv $out/bin/
'';
};
apps.uv = flake-utils.lib.mkApp {
drv = self.packages.${system}.default;
};
apps.default = self.apps.${system}.uv;
});
}