88abffb7d2
GitOrigin-RevId: bc9b956714ed6eac5f8888322aac5bc41389defa
28 lines
710 B
Nix
28 lines
710 B
Nix
{ lib, stdenv
|
|
, buildPythonPackage
|
|
, fetchPypi
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "monotonic";
|
|
version = "1.6";
|
|
|
|
src = fetchPypi {
|
|
inherit pname version;
|
|
sha256 = "3a55207bcfed53ddd5c5bae174524062935efed17792e9de2ad0205ce9ad63f7";
|
|
};
|
|
|
|
__propagatedImpureHostDeps = lib.optional stdenv.isDarwin "/usr/lib/libc.dylib";
|
|
|
|
patchPhase = lib.optionalString stdenv.isLinux ''
|
|
substituteInPlace monotonic.py --replace \
|
|
"ctypes.util.find_library('c')" "'${stdenv.glibc.out}/lib/libc.so.6'"
|
|
'';
|
|
|
|
meta = with lib; {
|
|
description = "An implementation of time.monotonic() for Python 2 & < 3.3";
|
|
homepage = "https://github.com/atdt/monotonic";
|
|
license = licenses.asl20;
|
|
};
|
|
|
|
}
|