From 0d4c3913b217c783efaacf45e8d482bc7373959f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Wed, 5 Jul 2023 00:21:17 +0200 Subject: [PATCH] nixos/no-x-libs: use pythonPackagesExtensions to construct python overlay to construct it for all supported python package sets at the same time --- nixos/modules/config/no-x-libs.nix | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/nixos/modules/config/no-x-libs.nix b/nixos/modules/config/no-x-libs.nix index f8622be59a1..b2eb46f273b 100644 --- a/nixos/modules/config/no-x-libs.nix +++ b/nixos/modules/config/no-x-libs.nix @@ -26,12 +26,7 @@ with lib; fonts.fontconfig.enable = false; - nixpkgs.overlays = singleton (self: super: let - packageOverrides = const (python-prev: { - # tk feature requires wayland which fails to compile - matplotlib = python-prev.matplotlib.override { enableGtk3 = false; enableTk = false; enableQt = false; }; - }); - in { + nixpkgs.overlays = singleton (const (super: { beam = super.beam_nox; cairo = super.cairo.override { x11Support = false; }; dbus = super.dbus.override { x11Support = false; }; @@ -67,8 +62,12 @@ with lib; pango = super.pango.override { x11Support = false; }; pinentry = super.pinentry.override { enabledFlavors = [ "curses" "tty" "emacs" ]; withLibsecret = false; }; pipewire = super.pipewire.override { x11Support = false; }; - python3 = super.python3.override { inherit packageOverrides; }; - python3Packages = self.python3.pkgs; # required otherwise overlays from above are not forwarded + pythonPackagesExtensions = super.pythonPackagesExtensions ++ [ + (python-final: python-prev: { + # tk feature requires wayland which fails to compile + matplotlib = python-prev.matplotlib.override { enableTk = false; }; + }) + ]; qemu = super.qemu.override { gtkSupport = false; spiceSupport = false; sdlSupport = false; }; qrencode = super.qrencode.overrideAttrs (_: { doCheck = false; }); qt5 = super.qt5.overrideScope (const (super': { @@ -79,6 +78,6 @@ with lib; util-linux = super.util-linux.override { translateManpages = false; }; vim-full = super.vim-full.override { guiSupport = false; }; zbar = super.zbar.override { enableVideo = false; withXorg = false; }; - }); + })); }; }