summary refs log tree commit diff
path: root/pkgs/development/python-modules/sh
diff options
context:
space:
mode:
authorKlaas van Schelven <klaas@vanschelven.com>2019-06-05 17:12:27 +0200
committerKlaas van Schelven <klaas@vanschelven.com>2019-06-05 17:12:27 +0200
commit927e9d4ff2a7f46a6594654b882287449fd5fa57 (patch)
tree7df7b1714dc40d40e7e4e4090c1ffdc5718239cf /pkgs/development/python-modules/sh
parent474566bccbe50dc12c5142d2759fad53bed47c28 (diff)
downloadnixpkgs-927e9d4ff2a7f46a6594654b882287449fd5fa57.tar
nixpkgs-927e9d4ff2a7f46a6594654b882287449fd5fa57.tar.gz
nixpkgs-927e9d4ff2a7f46a6594654b882287449fd5fa57.tar.bz2
nixpkgs-927e9d4ff2a7f46a6594654b882287449fd5fa57.tar.lz
nixpkgs-927e9d4ff2a7f46a6594654b882287449fd5fa57.tar.xz
nixpkgs-927e9d4ff2a7f46a6594654b882287449fd5fa57.tar.zst
nixpkgs-927e9d4ff2a7f46a6594654b882287449fd5fa57.zip
python: sh: fix (patch a test to be able to install again)
See https://github.com/amoffat/sh/pull/468
Diffstat (limited to 'pkgs/development/python-modules/sh')
-rw-r--r--pkgs/development/python-modules/sh/default.nix16
1 files changed, 12 insertions, 4 deletions
diff --git a/pkgs/development/python-modules/sh/default.nix b/pkgs/development/python-modules/sh/default.nix
index 964386564e4..aa18f07e49e 100644
--- a/pkgs/development/python-modules/sh/default.nix
+++ b/pkgs/development/python-modules/sh/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, buildPythonPackage, fetchPypi, python, coverage, lsof, glibcLocales }:
+{ stdenv, buildPythonPackage, fetchPypi, fetchpatch, python, coverage, lsof, glibcLocales }:
 
 buildPythonPackage rec {
   pname = "sh";
@@ -9,9 +9,17 @@ buildPythonPackage rec {
     sha256 = "1z2hx357xp3v4cv44xmqp7lli3frndqpyfmpbxf7n76h7s1zaaxm";
   };
 
-  # Disable tests that fail on Darwin
-  # Some of the failures are due to Nix using GNU coreutils
-  patches = [ ./disable-broken-tests-darwin.patch ];
+  patches = [
+    # Disable tests that fail on Darwin
+    # Some of the failures are due to Nix using GNU coreutils
+    ./disable-broken-tests-darwin.patch
+    # Fix tests for Python 3.7. See: https://github.com/amoffat/sh/pull/468
+    (fetchpatch {
+      url = "https://github.com/amoffat/sh/commit/b6202f75706473f02084d819e0765056afa43664.patch";
+      sha256 = "1kzxyxcc88zhgn2kmfg9yrbs4n405b2jq7qykb453l52hy10vi94";
+      excludes = [ ".travis.yml" ];
+    })
+  ];
 
   postPatch = ''
     sed -i 's#/usr/bin/env python#${python.interpreter}#' test.py