From 29e68d1714767bf3c8937f3cbd2180db954f22cb Mon Sep 17 00:00:00 2001 From: Ivan Malison Date: Sun, 28 Apr 2024 17:17:06 -0600 Subject: [PATCH] [NixOS] Move my-python-packages to overlay --- nixos/essential.nix | 16 +--------------- nixos/overlay.nix | 30 ++++++++++++++++++++++++------ 2 files changed, 25 insertions(+), 21 deletions(-) diff --git a/nixos/essential.nix b/nixos/essential.nix index 6524e593..acd53216 100644 --- a/nixos/essential.nix +++ b/nixos/essential.nix @@ -1,19 +1,4 @@ { pkgs, ... }: -let - my-python-packages = python-packages: with python-packages; [ - appdirs - ipdb - ipython - numpy - openpyxl - pip - requests - tox - virtualenv - virtualenvwrapper - ]; - python-with-my-packages = pkgs.python311.withPackages my-python-packages; -in { nixpkgs.config.allowBroken = true; @@ -31,6 +16,7 @@ in emacs fd ffmpeg + bento4 file gawk gcc diff --git a/nixos/overlay.nix b/nixos/overlay.nix index a505142c..66e7f8cb 100644 --- a/nixos/overlay.nix +++ b/nixos/overlay.nix @@ -1,5 +1,5 @@ final: prev: { - rofi-systemd = prev.rofi-systemd.overrideAttrs(_: { + rofi-systemd = prev.rofi-systemd.overrideAttrs (_: { src = prev.fetchFromGitHub { repo = "rofi-systemd"; owner = "IvanMalison"; @@ -8,7 +8,7 @@ final: prev: { }; }); - git-sync = prev.git-sync.overrideAttrs(_: { + git-sync = prev.git-sync.overrideAttrs (_: { src = prev.fetchFromGitHub { repo = "git-sync"; owner = "IvanMalison"; @@ -17,24 +17,24 @@ final: prev: { }; }); - picom = prev.picom.overrideAttrs(old: { + picom = prev.picom.overrideAttrs (old: { src = prev.fetchFromGitHub { repo = "picom"; owner = "dccsillag"; rev = "51b21355696add83f39ccdb8dd82ff5009ba0ae5"; sha256 = "sha256-crCwRJd859DCIC0pEerpDqdX2j8ZrNAzVaSSB3mTPN8=="; }; - nativeBuildInputs = old.nativeBuildInputs ++ [ final.pcre ]; + nativeBuildInputs = old.nativeBuildInputs ++ [final.pcre]; }); - expressvpn = prev.expressvpn.overrideAttrs(_: { + expressvpn = prev.expressvpn.overrideAttrs (_: { src = prev.fetchurl { url = "https://www.expressvpn.works/clients/linux/expressvpn_3.46.0.7-1_amd64.deb"; hash = "sha256-v0rr1s32jj79A8IGfJgSGJVlz7rSnZYn4ealOpqee0w="; }; }); - gnupg_2_4_0 = prev.gnupg.overrideAttrs(_: rec { + gnupg_2_4_0 = prev.gnupg.overrideAttrs (_: rec { pname = "gnupg"; # 2.4.1 breaks emacs version = "2.4.0"; @@ -49,6 +49,24 @@ final: prev: { withTreeSitter = true; }; + python-with-my-packages = let + my-python-packages = python-packages: + with python-packages; [ + argcomplete + appdirs + ipdb + ipython + numpy + openpyxl + pip + requests + tox + virtualenv + virtualenvwrapper + ]; + in + final.python311.withPackages my-python-packages; + # gitea = prev.gitea.overrideAttrs(_: { # src = prev.fetchFromGitHub { # repo = "gitea";