1{ lib 2, stdenv 3, buildPythonPackage 4, fetchFromGitHub 5, pytestCheckHook 6}: 7 8let 9 pname = "ephemeral-port-reserve"; 10 version = "1.1.4"; 11in 12buildPythonPackage { 13 inherit pname version; 14 format = "setuptools"; 15 16 src = fetchFromGitHub { 17 owner = "Yelp"; 18 repo = "ephemeral-port-reserve"; 19 rev = "v${version}"; 20 hash = "sha256-R6NRpfaT05PO/cTWgCakiGfCuCyucjVOXbAezn5x1cU="; 21 }; 22 23 nativeCheckInputs = [ 24 pytestCheckHook 25 ]; 26 27 disabledTests = lib.optionals stdenv.isDarwin [ 28 # can't find hostname in our darwin build environment 29 "test_fqdn" 30 ]; 31 32 __darwinAllowLocalNetworking = true; 33 34 pythonImportsCheck = [ 35 "ephemeral_port_reserve" 36 ]; 37 38 meta = with lib; { 39 description = "Find an unused port, reliably"; 40 homepage = "https://github.com/Yelp/ephemeral-port-reserve/"; 41 license = licenses.mit; 42 maintainers = with maintainers; [ hexa ]; 43 }; 44}