mirror of
https://github.com/daylinmorgan/oizys.git
synced 2024-11-05 06:03:15 -06:00
37 lines
908 B
Nix
37 lines
908 B
Nix
{
|
|
inputs,
|
|
config,
|
|
lib,
|
|
pkgs,
|
|
...
|
|
}:
|
|
let
|
|
inherit (lib) mkIfIn;
|
|
cfg = config.oizys.languages;
|
|
in
|
|
{
|
|
config = mkIfIn "python" cfg {
|
|
environment.systemPackages =
|
|
let
|
|
python = pkgs.python3.withPackages (ps: with ps; [ pip ]);
|
|
pixi = inputs.pixi.packages.${pkgs.system}.default;
|
|
in
|
|
with pkgs;
|
|
[
|
|
# 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 "$@"
|
|
'')
|
|
|
|
(python3.withPackages (ps: with ps; [ pip ]))
|
|
micromamba
|
|
pixi
|
|
];
|
|
};
|
|
}
|