ipcalc: add patch to disable tests failing in Darwin sandbox

Signed-off-by: Sirio Balmelli <sirio@b-ad.ch>

authored by Sirio Balmelli and committed by Peter Hoeg 5f4cfa67 47709a98

+64
+5
pkgs/tools/networking/ipcalc/default.nix
··· 24 hash = "sha256-UQq5TqK83I44ANU0yXD8YUTQWvBFLiAxmLSRtKUJ5WE="; 25 }; 26 27 # technically not needed as we do not support the paid maxmind databases, but 28 # keep it around if someone wants to add support and /usr/share/GeoIP is 29 # broken anyway
··· 24 hash = "sha256-UQq5TqK83I44ANU0yXD8YUTQWvBFLiAxmLSRtKUJ5WE="; 25 }; 26 27 + patches = [ 28 + # disable tests which fail in NixOS sandbox (trying to access the network) 29 + ./sandbox_tests.patch 30 + ]; 31 + 32 # technically not needed as we do not support the paid maxmind databases, but 33 # keep it around if someone wants to add support and /usr/share/GeoIP is 34 # broken anyway
+59
pkgs/tools/networking/ipcalc/sandbox_tests.patch
···
··· 1 + diff --git a/tests/meson.build b/tests/meson.build 2 + index 536c169..0ce23f1 100644 3 + --- a/tests/meson.build 4 + +++ b/tests/meson.build 5 + @@ -64,54 +64,6 @@ test('RandomIPv6Explicit', 6 + ipcalc.full_path() + ' -6 -r 24' + '|grep Address' 7 + ] 8 + ) 9 + -test('HostnameIPv6Localhost', 10 + - testrunner, 11 + - args : [ 12 + - '--test-outfile', 13 + - ipcalc.full_path() + ' -6 -o localhost', 14 + - files('hostname-localhost-ipv6') 15 + - ] 16 + -) 17 + -test('HostnameIPv4Localhost', 18 + - testrunner, 19 + - args : [ 20 + - '--test-outfile', 21 + - ipcalc.full_path() + ' -4 -o localhost', 22 + - files('hostname-localhost-ipv4') 23 + - ] 24 + -) 25 + -test('HostnameIPv4LocalhostJson', 26 + - testrunner, 27 + - args : [ 28 + - '--test-outfile', 29 + - ipcalc.full_path() + ' -j -4 -o localhost', 30 + - files('hostname-localhost-ipv4-json') 31 + - ] 32 + -) 33 + -test('IPIPv6Localhost', 34 + - testrunner, 35 + - args : [ 36 + - '--test-outfile', 37 + - ipcalc.full_path() + ' -h ::1', 38 + - files('ip-localhost-ipv6') 39 + - ] 40 + -) 41 + -test('IPIPv4Localhost', 42 + - testrunner, 43 + - args : [ 44 + - '--test-outfile', 45 + - ipcalc.full_path() + ' -h 127.0.0.1', 46 + - files('ip-localhost-ipv4') 47 + - ] 48 + -) 49 + -test('IPIPv4LocalhostJson', 50 + - testrunner, 51 + - args : [ 52 + - '--test-outfile', 53 + - ipcalc.full_path() + ' -j -h 127.0.0.1', 54 + - files('ip-localhost-ipv4-json') 55 + - ] 56 + -) 57 + # --class-prefix tests 58 + test('AssignClassPrefix12', 59 + testrunner,