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-11-07 05:38:56 +00:00
|
|
|
version = "1.14.1";
|
2018-10-24 15:10:04 +01:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2020-11-07 05:38:56 +00:00
|
|
|
sha256 = "39aa9af22f6558a0c5d132881cf43e34828ca03e4ae11114852ca6a55c7c1d8e";
|
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
|
|
|
};
|
|
|
|
}
|