From 05fb6b5dee0cae322c46d4b4fc52b5d328025085 Mon Sep 17 00:00:00 2001 From: Chris Ostrouchov Date: Wed, 17 Oct 2018 00:36:07 -0400 Subject: pythonPackages.monotonic: refactor move to python-modules --- .../python-modules/monotonic/default.nix | 28 ++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 pkgs/development/python-modules/monotonic/default.nix (limited to 'pkgs/development/python-modules/monotonic') diff --git a/pkgs/development/python-modules/monotonic/default.nix b/pkgs/development/python-modules/monotonic/default.nix new file mode 100644 index 000000000000..b736301e5efb --- /dev/null +++ b/pkgs/development/python-modules/monotonic/default.nix @@ -0,0 +1,28 @@ +{ stdenv +, buildPythonPackage +, fetchPypi +}: + +buildPythonPackage rec { + pname = "monotonic"; + version = "1.3"; + + src = fetchPypi { + inherit pname version; + sha256 = "06vw7jwq96106plhlc5vz1v1xvjismdgw9wjyzvzf0ylglnrwiib"; + }; + + __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; + }; + +} -- cgit 1.4.1