···99 sha256 = "1z2hx357xp3v4cv44xmqp7lli3frndqpyfmpbxf7n76h7s1zaaxm";
1010 };
11111212+ # Disable tests that fail on Darwin
1313+ # Some of the failures are due to Nix using GNU coreutils
1414+ patches = [ ./disable-broken-tests-darwin.patch ];
1515+1216 postPatch = ''
1317 sed -i 's#/usr/bin/env python#${python.interpreter}#' test.py
1418 '';
···11+From 264f2f6a04d25156bba43524a6b172d2e99c53f4 Mon Sep 17 00:00:00 2001
22+From: Ben Wolsieffer <benwolsieffer@gmail.com>
33+Date: Fri, 21 Dec 2018 17:39:45 -0500
44+Subject: [PATCH] Disable tests that fail on OSX.
55+66+Some of the failures are due to the use of GNU ls.
77+---
88+ test.py | 4 ++++
99+ 1 file changed, 4 insertions(+)
1010+1111+diff --git a/test.py b/test.py
1212+index 68ef40c..2f53360 100644
1313+--- a/test.py
1414++++ b/test.py
1515+@@ -352,6 +352,7 @@ exit(3)
1616+ self.assertEqual(sed(_in="one test three", e="s/test/two/").strip(),
1717+ "one two three")
1818+1919++ @not_osx
2020+ def test_ok_code(self):
2121+ from sh import ls, ErrorReturnCode_1, ErrorReturnCode_2
2222+2323+@@ -498,6 +499,7 @@ while True:
2424+ self.assertEqual(out, match)
2525+2626+2727++ @not_osx
2828+ def test_environment(self):
2929+ """ tests that environments variables that we pass into sh commands
3030+ exist in the environment, and on the sh module """
3131+@@ -861,6 +863,7 @@ print(sys.argv[1])
3232+ self.assertTrue(now - start > sleep_time)
3333+3434+3535++ @not_osx
3636+ def test_background_exception(self):
3737+ from sh import ls, ErrorReturnCode_1, ErrorReturnCode_2
3838+ p = ls("/ofawjeofj", _bg=True) # should not raise
3939+@@ -2036,6 +2039,7 @@ else:
4040+ self.assertEqual(p, "test")
4141+4242+4343++ @not_osx
4444+ def test_signal_exception(self):
4545+ from sh import SignalException_15
4646+4747+--
4848+2.20.0
4949+