Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at 19.03 724 B view raw
1{ stdenv 2, buildPythonPackage 3, fetchPypi 4}: 5 6buildPythonPackage rec { 7 pname = "monotonic"; 8 version = "1.5"; 9 10 src = fetchPypi { 11 inherit pname version; 12 sha256 = "23953d55076df038541e648a53676fb24980f7a1be290cdda21300b3bc21dfb0"; 13 }; 14 15 __propagatedImpureHostDeps = stdenv.lib.optional stdenv.isDarwin "/usr/lib/libc.dylib"; 16 17 patchPhase = stdenv.lib.optionalString stdenv.isLinux '' 18 substituteInPlace monotonic.py --replace \ 19 "ctypes.util.find_library('c')" "'${stdenv.glibc.out}/lib/libc.so.6'" 20 ''; 21 22 meta = with stdenv.lib; { 23 description = "An implementation of time.monotonic() for Python 2 & < 3.3"; 24 homepage = https://github.com/atdt/monotonic; 25 license = licenses.asl20; 26 }; 27 28}