flakes/python/uv/flake.nix

37 lines
1 KiB
Nix

{
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";
};
});
}