depot/third_party/nixpkgs/pkgs/tools/misc/kodi-cli/default.nix
Default email 5c370c0b2a Project import generated by Copybara.
GitOrigin-RevId: 33d1e753c82ffc557b4a585c77de43d4c922ebb5
2024-05-15 17:35:15 +02:00

31 lines
977 B
Nix

{ lib, stdenv, fetchFromGitHub, makeWrapper, curl, bash, jq, youtube-dl, gnome }:
stdenv.mkDerivation rec {
pname = "kodi-cli";
version = "1.1.1";
src = fetchFromGitHub {
owner = "nawar";
repo = pname;
rev = version;
sha256 = "0f9wdq2fg8hlpk3qbjfkb3imprxkvdrhxfkcvr3dwfma0j2yfwam";
};
nativeBuildInputs = [ makeWrapper ];
installPhase = ''
mkdir -p $out/bin
cp -a kodi-cli $out/bin
wrapProgram $out/bin/kodi-cli --prefix PATH : ${lib.makeBinPath [ curl bash ]}
cp -a playlist_to_kodi $out/bin
wrapProgram $out/bin/playlist_to_kodi --prefix PATH : ${lib.makeBinPath [ curl bash gnome.zenity jq youtube-dl ]}
'';
meta = with lib; {
homepage = "https://github.com/nawar/kodi-cli";
description = "Kodi/XBMC bash script to send Kodi commands using JSON RPC. It also allows sending YouTube videos to Kodi";
license = licenses.gpl2Only;
platforms = platforms.unix;
maintainers = [ maintainers.pstn ];
};
}