diff --git a/darwin-configuration.nix b/darwin-configuration.nix index a649ab5..e69b74c 100644 --- a/darwin-configuration.nix +++ b/darwin-configuration.nix @@ -2,19 +2,7 @@ let pkgs = import { config = import ./config.nix; }; in -let - my-python-packages = python-packages: with python-packages; [ - pip - mathlibtools - ]; - in - let python = - let packageOverrides = self: super: { - # Test failures on darwin ("windows-1252"); just skip pytest - beautifulsoup4 = super.beautifulsoup4.overridePythonAttrs(old: { pytestCheckPhase="true"; }); - }; - in (pkgs.python3.override { inherit packageOverrides; }).withPackages my-python-packages; -in +let python = import ./python.nix { inherit pkgs; }; in { diff --git a/python.nix b/python.nix new file mode 100644 index 0000000..50e3f89 --- /dev/null +++ b/python.nix @@ -0,0 +1,15 @@ +{ pkgs }: + +let my-python-packages = python-packages: with python-packages; [ + pip + mathlibtools +]; +in + +let packageOverrides = self: super: { + # Test failures on darwin ("windows-1252"); just skip pytest + beautifulsoup4 = super.beautifulsoup4.overridePythonAttrs(old: { pytestCheckPhase="true"; }); +}; +in + +(pkgs.python3.override { inherit packageOverrides; }).withPackages my-python-packages