diff options
author | Jiajie Chen <c@jia.je> | 2022-07-11 18:27:09 +0800 |
---|---|---|
committer | Jiajie Chen <c@jia.je> | 2022-07-11 20:00:05 +0800 |
commit | efb1ce5cd0098252aa9022220e3ae7de9247e0a1 (patch) | |
tree | 59e1a23a8cf200ee4dfe48e5098b35622a1099bf /pkgs/applications/system | |
parent | 0dc7730340d405dbaa4b82c276df4862db9255b0 (diff) |
glances: fix tests on darwin
Apply changes from https://github.com/nicolargo/glances/pull/2082
Diffstat (limited to 'pkgs/applications/system')
-rw-r--r-- | pkgs/applications/system/glances/default.nix | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/pkgs/applications/system/glances/default.nix b/pkgs/applications/system/glances/default.nix index dae9d5cd5195f..60339bf2e5811 100644 --- a/pkgs/applications/system/glances/default.nix +++ b/pkgs/applications/system/glances/default.nix @@ -1,4 +1,4 @@ -{ stdenv, buildPythonApplication, fetchFromGitHub, isPyPy, lib +{ stdenv, buildPythonApplication, fetchFromGitHub, fetchpatch, isPyPy, lib , defusedxml, future, packaging, psutil, setuptools # Optional dependencies: , bottle, pysnmp @@ -20,7 +20,17 @@ buildPythonApplication rec { }; # Some tests fail in the sandbox (they e.g. require access to /sys/class/power_supply): - patches = lib.optional (doCheck && stdenv.isLinux) ./skip-failing-tests.patch; + patches = lib.optional (doCheck && stdenv.isLinux) ./skip-failing-tests.patch + ++ lib.optional (doCheck && stdenv.isDarwin) + [ + # Fix "TypeError: unsupported operand type(s) for +=: 'int' and 'NoneType'" on darwin + # https://github.com/nicolargo/glances/pull/2082 + (fetchpatch { + name = "fix-typeerror-when-testing-on-darwin.patch"; + url = "https://patch-diff.githubusercontent.com/raw/nicolargo/glances/pull/2082.patch"; + sha256 = "sha256-MIePPywZ2dTTqXjf7EJiHlQ7eltiHzgocqrnLeLJwZ4="; + }) + ]; # On Darwin this package segfaults due to mismatch of pure and impure # CoreFoundation. This issues was solved for binaries but for interpreted |