https://wiki.nixos.org/wiki/Python#Running_Python_packages_which_requires_compilation_and/or_contains_libraries_precompiled_without_nix
{ lib, pkgs, ... }:
{
home.packages = [
(pkgs.buildFHSEnv {
name = "pixi";
runScript = "pixi";
targetPkgs = pkgs: with pkgs; [ pixi ];
})
];
}
给pixi fhs,用pixi管理py env,应该是最简洁之一?
另外,为了让vscode可以在不是pixi的环境下运行jupyter等,需要再加一个
programs = {
nix-ld = {
enable = true;
libraries = [
# pkgs.libGL, any other libraries your code may need...
# See nix-alien and nix-autobahn for help finding which
# libraries you need to install... not sure the best way
# to use these to find required libraries for Python packages
];
};
};