nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at r-updates 70 lines 1.5 kB view raw
1{ 2 lib, 3 fetchFromGitHub, 4 buildPythonPackage, 5 hatchling, 6 hatch-vcs, 7 installShellFiles, 8 pytestCheckHook, 9 requests-mock, 10 requests, 11 pydantic, 12 click, 13 appdirs, 14 stdenv, 15 nix-update-script, 16}: 17 18buildPythonPackage rec { 19 pname = "philipstv"; 20 version = "3.0.2"; 21 pyproject = true; 22 23 src = fetchFromGitHub { 24 owner = "bcyran"; 25 repo = "philipstv"; 26 tag = version; 27 hash = "sha256-UJYxQ3R1bEoNkhm5FiFqQC4PbeEqsBKZYdqv5i5H7rg="; 28 }; 29 30 build-system = [ 31 hatchling 32 hatch-vcs 33 ]; 34 35 nativeBuildInputs = [ 36 installShellFiles 37 ]; 38 39 dependencies = [ 40 requests 41 pydantic 42 click 43 appdirs 44 ]; 45 46 nativeCheckInputs = [ 47 pytestCheckHook 48 requests-mock 49 ]; 50 51 postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) '' 52 installShellCompletion --cmd philipstv \ 53 --bash <(_PHILIPSTV_COMPLETE=bash_source $out/bin/philipstv) \ 54 --zsh <(_PHILIPSTV_COMPLETE=zsh_source $out/bin/philipstv) \ 55 --fish <(_PHILIPSTV_COMPLETE=fish_source $out/bin/philipstv) 56 ''; 57 58 pythonImportsCheck = [ "philipstv" ]; 59 60 passthru.updateScript = nix-update-script { }; 61 62 meta = { 63 description = "CLI and library to control Philips Android-powered TVs"; 64 homepage = "https://github.com/bcyran/philipstv"; 65 changelog = "https://github.com/bcyran/philipstv/releases/tag/${src.tag}"; 66 license = lib.licenses.mit; 67 mainProgram = "philipstv"; 68 maintainers = with lib.maintainers; [ bcyran ]; 69 }; 70}