2021-01-11 08:54:33 +01:00
|
|
|
{ lib, stdenv, fetchFromGitHub, makeWrapper, curl, bash, jq, youtube-dl, gnome3 }:
|
2018-12-05 00:27:26 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "kodi-cli";
|
|
|
|
version = "1.1.1";
|
2021-01-15 10:19:50 +01:00
|
|
|
|
2018-12-05 00:27:26 +01:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "nawar";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
|
|
|
sha256 = "0f9wdq2fg8hlpk3qbjfkb3imprxkvdrhxfkcvr3dwfma0j2yfwam";
|
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/bin
|
|
|
|
cp -a kodi-cli $out/bin
|
2021-01-15 10:19:50 +01:00
|
|
|
wrapProgram $out/bin/kodi-cli --prefix PATH : ${lib.makeBinPath [ curl bash ]}
|
2018-12-05 00:27:26 +01:00
|
|
|
cp -a playlist_to_kodi $out/bin
|
2021-01-15 10:19:50 +01:00
|
|
|
wrapProgram $out/bin/playlist_to_kodi --prefix PATH : ${lib.makeBinPath [ curl bash gnome3.zenity jq youtube-dl ]}
|
2018-12-05 00:27:26 +01:00
|
|
|
'';
|
2021-01-15 10:19:50 +01:00
|
|
|
|
2021-01-11 08:54:33 +01:00
|
|
|
meta = with lib; {
|
2020-04-01 03:11:51 +02:00
|
|
|
homepage = "https://github.com/nawar/kodi-cli";
|
2018-12-05 00:27:26 +01:00
|
|
|
description = "Kodi/XBMC bash script to send Kodi commands using JSON RPC. It also allows sending YouTube videos to Kodi";
|
|
|
|
license = licenses.gpl2;
|
|
|
|
platforms = platforms.unix;
|
|
|
|
maintainers = [ maintainers.pstn ];
|
|
|
|
};
|
|
|
|
}
|