Files
nixpkgs/pkgs/development/python-modules/monotonic/default.nix
T
Ihar Hrachyshka 567e8dfd8e treewide: clean up 'meta = with' pattern
This commit was created by a combination of scripts and tools:
- an ast-grep script to prefix things in meta with `lib.`,
- a modified nixf-diagnose / nixf combination to remove unused `with
lib;`, and
- regular nixfmt.

Co-authored-by: Wolfgang Walther <walther@technowledgy.de>
2025-12-10 18:09:49 +01:00

31 lines
754 B
Nix

{
lib,
stdenv,
buildPythonPackage,
fetchPypi,
}:
buildPythonPackage rec {
pname = "monotonic";
version = "1.6";
format = "setuptools";
src = fetchPypi {
inherit pname version;
sha256 = "3a55207bcfed53ddd5c5bae174524062935efed17792e9de2ad0205ce9ad63f7";
};
__propagatedImpureHostDeps = lib.optional stdenv.hostPlatform.isDarwin "/usr/lib/libc.dylib";
patchPhase = lib.optionalString stdenv.hostPlatform.isLinux ''
substituteInPlace monotonic.py --replace \
"ctypes.util.find_library('c')" "'${stdenv.cc.libc}/lib/libc.so'"
'';
meta = {
description = "Implementation of time.monotonic() for Python 2 & < 3.3";
homepage = "https://github.com/atdt/monotonic";
license = lib.licenses.asl20;
};
}