e0464e4788
In preparation for the deprecation of `stdenv.isX`. These shorthands are not conducive to cross-compilation because they hide the platforms. Darwin might get cross-compilation for which the continued usage of `stdenv.isDarwin` will get in the way One example of why this is bad and especially affects compiler packages https://www.github.com/NixOS/nixpkgs/pull/343059 There are too many files to go through manually but a treewide should get users thinking when they see a `hostPlatform.isX` in a place where it doesn't make sense. ``` fd --type f "\.nix" | xargs sd --fixed-strings "stdenv.is" "stdenv.hostPlatform.is" fd --type f "\.nix" | xargs sd --fixed-strings "stdenv'.is" "stdenv'.hostPlatform.is" fd --type f "\.nix" | xargs sd --fixed-strings "clangStdenv.is" "clangStdenv.hostPlatform.is" fd --type f "\.nix" | xargs sd --fixed-strings "gccStdenv.is" "gccStdenv.hostPlatform.is" fd --type f "\.nix" | xargs sd --fixed-strings "stdenvNoCC.is" "stdenvNoCC.hostPlatform.is" fd --type f "\.nix" | xargs sd --fixed-strings "inherit (stdenv) is" "inherit (stdenv.hostPlatform) is" fd --type f "\.nix" | xargs sd --fixed-strings "buildStdenv.is" "buildStdenv.hostPlatform.is" fd --type f "\.nix" | xargs sd --fixed-strings "effectiveStdenv.is" "effectiveStdenv.hostPlatform.is" fd --type f "\.nix" | xargs sd --fixed-strings "originalStdenv.is" "originalStdenv.hostPlatform.is" ```
67 lines
1.3 KiB
Nix
67 lines
1.3 KiB
Nix
{
|
|
lib,
|
|
brotli,
|
|
buildPythonPackage,
|
|
certifi,
|
|
dpkt,
|
|
fetchFromGitHub,
|
|
gevent,
|
|
pytestCheckHook,
|
|
pythonOlder,
|
|
setuptools,
|
|
stdenv,
|
|
urllib3,
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "geventhttpclient";
|
|
version = "2.3.1";
|
|
pyproject = true;
|
|
|
|
disabled = pythonOlder "3.6";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "geventhttpclient";
|
|
repo = "geventhttpclient";
|
|
rev = "refs/tags/${version}";
|
|
# TODO: unvendor llhttp
|
|
fetchSubmodules = true;
|
|
hash = "sha256-uOGnwPbvTam14SFTUT0UrwxHfP4a5cn3a7EhLoGBUrA=";
|
|
};
|
|
|
|
build-system = [ setuptools ];
|
|
|
|
dependencies = [
|
|
brotli
|
|
certifi
|
|
gevent
|
|
urllib3
|
|
];
|
|
|
|
nativeCheckInputs = [
|
|
dpkt
|
|
pytestCheckHook
|
|
];
|
|
|
|
# lots of: [Errno 48] Address already in use: ('127.0.0.1', 54323)
|
|
doCheck = !stdenv.hostPlatform.isDarwin;
|
|
|
|
__darwinAllowLocalNetworking = true;
|
|
|
|
preCheck = ''
|
|
rm -rf geventhttpclient
|
|
'';
|
|
|
|
pytestFlagsArray = [ "-m 'not network'" ];
|
|
|
|
pythonImportsCheck = [ "geventhttpclient" ];
|
|
|
|
meta = with lib; {
|
|
homepage = "https://github.com/geventhttpclient/geventhttpclient";
|
|
description = "High performance, concurrent HTTP client library using gevent";
|
|
changelog = "https://github.com/geventhttpclient/geventhttpclient/releases/tag/${version}";
|
|
license = licenses.mit;
|
|
maintainers = with maintainers; [ koral ];
|
|
};
|
|
}
|