depot/third_party/nixpkgs/pkgs/development/python-modules/monotonic/default.nix
Default email 8ac5e011d6 Project import generated by Copybara.
GitOrigin-RevId: 2c3273caa153ee8eb5786bc8141b85b859e7efd7
2020-04-24 19:36:52 -04:00

28 lines
726 B
Nix

{ stdenv
, buildPythonPackage
, fetchPypi
}:
buildPythonPackage rec {
pname = "monotonic";
version = "1.5";
src = fetchPypi {
inherit pname version;
sha256 = "23953d55076df038541e648a53676fb24980f7a1be290cdda21300b3bc21dfb0";
};
__propagatedImpureHostDeps = stdenv.lib.optional stdenv.isDarwin "/usr/lib/libc.dylib";
patchPhase = stdenv.lib.optionalString stdenv.isLinux ''
substituteInPlace monotonic.py --replace \
"ctypes.util.find_library('c')" "'${stdenv.glibc.out}/lib/libc.so.6'"
'';
meta = with stdenv.lib; {
description = "An implementation of time.monotonic() for Python 2 & < 3.3";
homepage = "https://github.com/atdt/monotonic";
license = licenses.asl20;
};
}