mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-20 20:53:48 +00:00
223ed16ba9
Sandbox build will now succeed on Darwin and Linux Signed-off-by: Sirio Balmelli <sirio@b-ad.ch>
37 lines
955 B
Nix
37 lines
955 B
Nix
{ lib, buildPythonPackage, fetchPypi, fetchpatch, python, coverage, lsof, glibcLocales, coreutils }:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "sh";
|
|
version = "1.13.1";
|
|
|
|
src = fetchPypi {
|
|
inherit pname version;
|
|
sha256 = "18w6wawmpzfh52s0jimwn59a7rfa7blrmg7bhwnq8siwbqhd58wp";
|
|
};
|
|
|
|
patches = [
|
|
# Disable tests that fail on Darwin sandbox
|
|
./disable-broken-tests-darwin.patch
|
|
];
|
|
|
|
postPatch = ''
|
|
sed -i 's#/usr/bin/env python#${python.interpreter}#' test.py
|
|
sed -i 's#/bin/sleep#${coreutils.outPath}/bin/sleep#' test.py
|
|
'';
|
|
|
|
checkInputs = [ coverage lsof glibcLocales ];
|
|
|
|
# A test needs the HOME directory to be different from $TMPDIR.
|
|
preCheck = ''
|
|
export LC_ALL="en_US.UTF-8"
|
|
HOME=$(mktemp -d)
|
|
'';
|
|
|
|
meta = with lib; {
|
|
description = "Python subprocess interface";
|
|
homepage = "https://pypi.python.org/pypi/sh/";
|
|
license = licenses.mit;
|
|
maintainers = with maintainers; [ siriobalmelli ];
|
|
};
|
|
}
|