2020-07-20 19:07:42 +01:00
|
|
|
{ lib, buildPythonPackage, fetchPypi, fetchpatch, python, coverage, lsof, glibcLocales, coreutils }:
|
2018-10-24 15:10:04 +01:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "sh";
|
2020-10-03 06:50:54 +01:00
|
|
|
version = "1.14.0";
|
2018-10-24 15:10:04 +01:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2020-10-03 06:50:54 +01:00
|
|
|
sha256 = "05c7e520cdf70f70a7228a03b589da9f96c6e0d06fc487ab21fc62b26a592e59";
|
2018-10-24 15:10:04 +01:00
|
|
|
};
|
|
|
|
|
2019-06-05 16:12:27 +01:00
|
|
|
patches = [
|
2020-07-20 19:07:42 +01:00
|
|
|
# Disable tests that fail on Darwin sandbox
|
2019-06-05 16:12:27 +01: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 19:07:42 +01: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 15:10:04 +01: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 15:10:04 +01:00
|
|
|
HOME=$(mktemp -d)
|
|
|
|
'';
|
|
|
|
|
2020-07-20 19:07:42 +01:00
|
|
|
meta = with lib; {
|
2018-10-24 15:10:04 +01:00
|
|
|
description = "Python subprocess interface";
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://pypi.python.org/pypi/sh/";
|
2020-07-20 19:07:42 +01:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ siriobalmelli ];
|
2018-10-24 15:10:04 +01:00
|
|
|
};
|
|
|
|
}
|