Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at devShellTools-shell 71 lines 1.5 kB view raw
1{ 2 lib, 3 fetchPypi, 4 fetchpatch, 5 python3, 6}: 7 8let 9 python = python3.override { 10 self = python; 11 packageOverrides = self: super: { 12 pychromecast = super.pychromecast.overridePythonAttrs (_: rec { 13 version = "13.1.0"; 14 15 src = fetchPypi { 16 pname = "PyChromecast"; 17 inherit version; 18 hash = "sha256-COYai1S9IRnTyasewBNtPYVjqpfgo7V4QViLm+YMJnY="; 19 }; 20 21 postPatch = ""; 22 }); 23 }; 24 }; 25in 26 27python.pkgs.buildPythonApplication rec { 28 pname = "catt"; 29 version = "0.12.11"; 30 format = "pyproject"; 31 32 src = fetchPypi { 33 inherit pname version; 34 hash = "sha256-0bqYYfWwF7yYoAbjZPhi/f4CLcL89imWGYaMi5Bwhtc="; 35 }; 36 37 patches = [ 38 (fetchpatch { 39 # set explicit build-system 40 url = "https://github.com/skorokithakis/catt/commit/08e7870a239e85badd30982556adc2aa8a8e4fc1.patch"; 41 hash = "sha256-QH5uN3zQNVPP6Th2LHdDBF53WxwMhoyhhQUAZOeHh4k="; 42 }) 43 ]; 44 45 nativeBuildInputs = with python.pkgs; [ 46 poetry-core 47 ]; 48 49 propagatedBuildInputs = with python.pkgs; [ 50 click 51 ifaddr 52 pychromecast 53 protobuf 54 requests 55 yt-dlp 56 ]; 57 58 doCheck = false; # attempts to access various URLs 59 60 pythonImportsCheck = [ 61 "catt" 62 ]; 63 64 meta = with lib; { 65 description = "Tool to send media from online sources to Chromecast devices"; 66 homepage = "https://github.com/skorokithakis/catt"; 67 license = licenses.bsd2; 68 maintainers = [ ]; 69 mainProgram = "catt"; 70 }; 71}