2020-07-20 18:07:42 +00:00
|
|
|
{ lib, buildPythonPackage, fetchPypi, fetchpatch, python, coverage, lsof, glibcLocales, coreutils }:
|
2018-10-24 14:10:04 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "sh";
|
2020-07-20 18:07:42 +00:00
|
|
|
version = "1.13.1";
|
2018-10-24 14:10:04 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2020-07-20 18:07:42 +00:00
|
|
|
sha256 = "18w6wawmpzfh52s0jimwn59a7rfa7blrmg7bhwnq8siwbqhd58wp";
|
2018-10-24 14:10:04 +00:00
|
|
|
};
|
|
|
|
|
2019-06-05 15:12:27 +00:00
|
|
|
patches = [
|
2020-07-20 18:07:42 +00:00
|
|
|
# Disable tests that fail on Darwin sandbox
|
2019-06-05 15:12:27 +00:00
|
|
|
./disable-broken-tests-darwin.patch
|
|
|
|
];
|
2018-12-21 22:44:21 +00:00
|
|
|
|
2018-12-21 05:01:13 +00:00
|
|
|
postPatch = ''
|
|
|
|
sed -i 's#/usr/bin/env python#${python.interpreter}#' test.py
|
2020-07-20 18:07:42 +00:00
|
|
|
sed -i 's#/bin/sleep#${coreutils.outPath}/bin/sleep#' test.py
|
2018-12-21 05:01:13 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
checkInputs = [ coverage lsof glibcLocales ];
|
2018-10-24 14:10:04 +00:00
|
|
|
|
|
|
|
# A test needs the HOME directory to be different from $TMPDIR.
|
|
|
|
preCheck = ''
|
2018-12-21 05:01:13 +00:00
|
|
|
export LC_ALL="en_US.UTF-8"
|
2018-10-24 14:10:04 +00:00
|
|
|
HOME=$(mktemp -d)
|
|
|
|
'';
|
|
|
|
|
2020-07-20 18:07:42 +00:00
|
|
|
meta = with lib; {
|
2018-10-24 14:10:04 +00:00
|
|
|
description = "Python subprocess interface";
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "https://pypi.python.org/pypi/sh/";
|
2020-07-20 18:07:42 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ siriobalmelli ];
|
2018-10-24 14:10:04 +00:00
|
|
|
};
|
|
|
|
}
|