feat(python): Add uv config
This commit is contained in:
parent
21ba9138b3
commit
1f03b8e800
2 changed files with 115 additions and 0 deletions
37
python/uv/flake.nix
Normal file
37
python/uv/flake.nix
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
{
|
||||
inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.05";
|
||||
nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||
flake-utils.url = "github:numtide/flake-utils";
|
||||
};
|
||||
|
||||
outputs = { self, nixpkgs, nixpkgs-unstable, flake-utils }:
|
||||
flake-utils.lib.eachDefaultSystem (system: let
|
||||
pkgs = import nixpkgs {
|
||||
inherit system;
|
||||
config.allowUnfree = true;
|
||||
};
|
||||
pkgs-unstable = import nixpkgs-unstable {
|
||||
inherit system;
|
||||
config.allowUnfree = true;
|
||||
};
|
||||
|
||||
mkShell = pkgs.mkShell.override {
|
||||
stdenv = pkgs.stdenvAdapters.useMoldLinker pkgs.stdenv;
|
||||
};
|
||||
in {
|
||||
devShells.default = pkgs.mkShell {
|
||||
packages = (with pkgs; [
|
||||
# python312Full
|
||||
]) ++ (with pkgs-unstable; [
|
||||
uv
|
||||
]);
|
||||
|
||||
# Stop uv from downloading Python binaries automatically if needed.
|
||||
# UV_PYTHON_DOWNLOADS = "never";
|
||||
|
||||
# ImportError: libstdc++.so.6: cannot open shared object file: No such file or directory
|
||||
LD_LIBRARY_PATH = "${pkgs.stdenv.cc.cc.lib}/lib";
|
||||
};
|
||||
});
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue