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