This commit is contained in:
alsaiduq-lab 2025-03-28 10:45:39 -06:00
parent 90d8370b82
commit d9746c34ae
2 changed files with 35 additions and 37 deletions

View file

@ -8,16 +8,10 @@ in {
imports = [ imports = [
../modules/python.nix ../modules/python.nix
]; ];
python.enable = true; python.enable = true;
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
(python311.withPackages (pyPkgs:
with pyPkgs; [
requests
pip
virtualenv
ipython
]))
python3Packages.pip
black black
brave # TODO: make a module to save browser stuff brave # TODO: make a module to save browser stuff
vesktop vesktop
@ -103,7 +97,4 @@ in {
nodePackages.pnpm nodePackages.pnpm
zlib.dev zlib.dev
]; ];
environment.shellAliases = {
python = "python3.11";
};
} }

View file

@ -1,6 +1,11 @@
{ config, pkgs, lib, ... }: {
let config,
customPkgs = pkgs.callPackage ../pkgs { inherit pkgs lib; }; pkgs,
lib,
...
}: let
customPkgs = pkgs.callPackage ../pkgs {inherit pkgs lib;};
py = pkgs.python311Packages;
pipConf = pkgs.writeText "pip.conf" '' pipConf = pkgs.writeText "pip.conf" ''
[global] [global]
no-cache-dir = false no-cache-dir = false
@ -10,32 +15,34 @@ let
numpy = "<2.0.0" numpy = "<2.0.0"
''; '';
pythonEnv = pkgs.python311.buildEnv.override { pythonEnv = pkgs.python311.buildEnv.override {
extraLibs = [ extraLibs = with py; [
customPkgs.python-pymatting customPkgs.python-pymatting
customPkgs.python-opencv-headless customPkgs.python-opencv-headless
customPkgs.python-rembg customPkgs.python-rembg
customPkgs.pythonPackages.numpy # This should be numpy 1.x customPkgs.pythonPackages.numpy # should force the monkeypatch'd numpy
pkgs.python311Packages.i3ipc i3ipc
pkgs.python311Packages.pandas pandas
pkgs.python311Packages.matplotlib matplotlib
pkgs.python311Packages.scipy scipy
pkgs.python311Packages.requests requests
pkgs.python311Packages.pip pip
pkgs.python311Packages.virtualenv virtualenv
pkgs.python311Packages.ipython ipython
pkgs.python311Packages.six six
pkgs.python311Packages.psutil psutil
pkgs.python311Packages.pynvml pynvml
pkgs.python311Packages.pyqtgraph pyqtgraph
pkgs.python311Packages.pyqt6 pyqt6
pkgs.python311Packages.click click
pkgs.python311Packages.typer typer
pkgs.python311Packages.rich rich
pkgs.python311Packages.pyyaml pyyaml
pkgs.python311Packages.pytz pytz
pkgs.python311Packages.pillow pillow
pkgs.python311Packages.jedi jedi
pkgs.python311Packages.libcst libcst
ruff
ruff-lsp
]; ];
}; };
in { in {