mirror of
https://github.com/daylinmorgan/oizys.git
synced 2024-11-15 00:07:54 -06:00
34 lines
802 B
Nix
34 lines
802 B
Nix
{
|
|
config,
|
|
lib,
|
|
pkgs,
|
|
flake,
|
|
...
|
|
}:
|
|
let
|
|
inherit (lib) mkIfIn;
|
|
cfg = config.oizys.languages;
|
|
|
|
python = pkgs.python3.withPackages (ps: with ps; [ pip ]);
|
|
pixi = flake.pkg "pixi";
|
|
in
|
|
{
|
|
config = mkIfIn "python" cfg {
|
|
environment.systemPackages = [
|
|
# https://github.com/Mic92/nix-ld?tab=readme-ov-file#my-pythonnodejsrubyinterpreter-libraries-do-not-find-the-libraries-configured-by-nix-ld
|
|
(pkgs.writeShellScriptBin "python" ''
|
|
export LD_LIBRARY_PATH=$NIX_LD_LIBRARY_PATH
|
|
exec ${python}/bin/python "$@"
|
|
'')
|
|
|
|
(pkgs.writeShellScriptBin "python3" ''
|
|
export LD_LIBRARY_PATH=$NIX_LD_LIBRARY_PATH
|
|
exec ${python}/bin/python "$@"
|
|
'')
|
|
pixi
|
|
pkgs.uv
|
|
|
|
pkgs.python3Packages.pip # needed for viv to work
|
|
];
|
|
};
|
|
}
|