Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at 21.05 36 lines 967 B view raw
1{ lib, buildPythonPackage, fetchPypi, fetchpatch, python, coverage, lsof, glibcLocales, coreutils }: 2 3buildPythonPackage rec { 4 pname = "sh"; 5 version = "1.14.1"; 6 7 src = fetchPypi { 8 inherit pname version; 9 sha256 = "39aa9af22f6558a0c5d132881cf43e34828ca03e4ae11114852ca6a55c7c1d8e"; 10 }; 11 12 patches = [ 13 # Disable tests that fail on Darwin sandbox 14 ./disable-broken-tests-darwin.patch 15 ]; 16 17 postPatch = '' 18 sed -i 's#/usr/bin/env python#${python.interpreter}#' test.py 19 sed -i 's#/bin/sleep#${coreutils.outPath}/bin/sleep#' test.py 20 ''; 21 22 checkInputs = [ coverage lsof glibcLocales ]; 23 24 # A test needs the HOME directory to be different from $TMPDIR. 25 preCheck = '' 26 export LC_ALL="en_US.UTF-8" 27 HOME=$(mktemp -d) 28 ''; 29 30 meta = with lib; { 31 description = "Python subprocess interface"; 32 homepage = "https://pypi.python.org/pypi/sh/"; 33 license = licenses.mit; 34 maintainers = with maintainers; [ siriobalmelli ]; 35 }; 36}