mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-25 08:23:09 +00:00
pythonPackages.monotonic: refactor move to python-modules
This commit is contained in:
parent
8afd718c0a
commit
05fb6b5dee
28
pkgs/development/python-modules/monotonic/default.nix
Normal file
28
pkgs/development/python-modules/monotonic/default.nix
Normal file
@ -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;
|
||||
};
|
||||
|
||||
}
|
@ -2891,23 +2891,7 @@ in {
|
||||
|
||||
monosat = disabledIf (!isPy3k) (pkgs.monosat.python { inherit buildPythonPackage; inherit (self) cython; });
|
||||
|
||||
monotonic = buildPythonPackage rec {
|
||||
pname = "monotonic";
|
||||
version = "1.3";
|
||||
name = "${pname}-${version}";
|
||||
|
||||
__propagatedImpureHostDeps = stdenv.lib.optional stdenv.isDarwin "/usr/lib/libc.dylib";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "06vw7jwq96106plhlc5vz1v1xvjismdgw9wjyzvzf0ylglnrwiib";
|
||||
};
|
||||
|
||||
patchPhase = optionalString stdenv.isLinux ''
|
||||
substituteInPlace monotonic.py --replace \
|
||||
"ctypes.util.find_library('c')" "'${stdenv.glibc.out}/lib/libc.so.6'"
|
||||
'';
|
||||
};
|
||||
monotonic = callPackage ../development/python-modules/monotonic { };
|
||||
|
||||
MySQL_python = buildPythonPackage rec {
|
||||
name = "MySQL-python-1.2.5";
|
||||
|
Loading…
Reference in New Issue
Block a user