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 checkInputs = [ 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 pythonImportsCheck = [ 33 "ephemeral_port_reserve" 34 ]; 35 36 meta = with lib; { 37 description = "Find an unused port, reliably"; 38 homepage = "https://github.com/Yelp/ephemeral-port-reserve/"; 39 license = licenses.mit; 40 maintainers = with maintainers; [ hexa ]; 41 }; 42}