mirror of
https://github.com/daylinmorgan/oizys.git
synced 2024-11-09 20:33:15 -06:00
refactor python module
This commit is contained in:
parent
cb6c14f81e
commit
506e9abcee
2 changed files with 16 additions and 21 deletions
|
@ -30,7 +30,6 @@
|
||||||
# setLdLibraryPath = true;
|
# setLdLibraryPath = true;
|
||||||
# };
|
# };
|
||||||
|
|
||||||
|
|
||||||
# Load nvidia driver for Xorg and Wayland
|
# Load nvidia driver for Xorg and Wayland
|
||||||
services.xserver.videoDrivers = [ "nvidia" ];
|
services.xserver.videoDrivers = [ "nvidia" ];
|
||||||
|
|
||||||
|
|
|
@ -8,30 +8,26 @@
|
||||||
let
|
let
|
||||||
inherit (lib) mkIfIn;
|
inherit (lib) mkIfIn;
|
||||||
cfg = config.oizys.languages;
|
cfg = config.oizys.languages;
|
||||||
|
|
||||||
|
python = pkgs.python3.withPackages (ps: with ps; [ pip ]);
|
||||||
|
pixi = inputs.pixi.packages.${pkgs.system}.default;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
config = mkIfIn "python" cfg {
|
config = mkIfIn "python" cfg {
|
||||||
environment.systemPackages =
|
environment.systemPackages = [
|
||||||
let
|
# https://github.com/Mic92/nix-ld?tab=readme-ov-file#my-pythonnodejsrubyinterpreter-libraries-do-not-find-the-libraries-configured-by-nix-ld
|
||||||
python = pkgs.python3.withPackages (ps: with ps; [ pip ]);
|
(pkgs.writeShellScriptBin "python" ''
|
||||||
pixi = inputs.pixi.packages.${pkgs.system}.default;
|
export LD_LIBRARY_PATH=$NIX_LD_LIBRARY_PATH
|
||||||
in
|
exec ${python}/bin/python "$@"
|
||||||
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" ''
|
(pkgs.writeShellScriptBin "python3" ''
|
||||||
export LD_LIBRARY_PATH=$NIX_LD_LIBRARY_PATH
|
export LD_LIBRARY_PATH=$NIX_LD_LIBRARY_PATH
|
||||||
exec ${python}/bin/python "$@"
|
exec ${python}/bin/python "$@"
|
||||||
'')
|
'')
|
||||||
|
|
||||||
(python3.withPackages (ps: with ps; [ pip ]))
|
pixi
|
||||||
micromamba
|
pkgs.micromamba
|
||||||
pixi
|
];
|
||||||
];
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue