nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at 22.05 66 lines 1.3 kB view raw
1{ lib 2, buildPythonPackage 3, fetchFromGitHub 4, requests 5, requests-toolbelt 6, requests-oauthlib 7, pytestCheckHook 8, responses 9, pythonOlder 10}: 11 12buildPythonPackage rec { 13 pname = "flickrapi"; 14 version = "2.4"; 15 format = "setuptools"; 16 17 disabled = pythonOlder "3.7"; 18 19 src = fetchFromGitHub { 20 owner = "sybrenstuvel"; 21 repo = pname; 22 rev = "version-${version}"; 23 hash = "sha256-vRZrlXKI0UDdmDevh3XUngH4X8G3VlOCSP0z/rxhIgw="; 24 }; 25 26 propagatedBuildInputs = [ 27 requests 28 requests-toolbelt 29 requests-oauthlib 30 ]; 31 32 checkInputs = [ 33 pytestCheckHook 34 responses 35 ]; 36 37 preCheck = '' 38 export HOME=$(mktemp -d); 39 ''; 40 41 disabledTests = [ 42 # Tests require network access 43 "test_default_format" 44 "test_etree_default_format" 45 "test_etree_format_error" 46 "test_etree_format_happy" 47 "test_explicit_format" 48 "test_json_callback_format" 49 "test_json_format" 50 "test_parsed_json_format" 51 "test_walk" 52 "test_xmlnode_format" 53 "test_xmlnode_format_error" 54 ]; 55 56 pythonImportsCheck = [ 57 "flickrapi" 58 ]; 59 60 meta = with lib; { 61 description = "A Python interface to the Flickr API"; 62 homepage = "https://stuvel.eu/flickrapi"; 63 license = licenses.psfl; 64 maintainers = with maintainers; [ obadz ]; 65 }; 66}