mirror of
https://github.com/CHN-beta/nixpkgs.git
synced 2026-01-12 02:40:31 +08:00
lichess-bot: init at 2025.12.23.1 (#475008)
This commit is contained in:
@@ -17901,6 +17901,11 @@
|
|||||||
githubId = 30654959;
|
githubId = 30654959;
|
||||||
name = "Michele Sciabarra";
|
name = "Michele Sciabarra";
|
||||||
};
|
};
|
||||||
|
mse63 = {
|
||||||
|
name = "Mahmoud Elsharawy";
|
||||||
|
github = "mse63";
|
||||||
|
githubId = 81396550;
|
||||||
|
};
|
||||||
msgilligan = {
|
msgilligan = {
|
||||||
email = "sean@msgilligan.com";
|
email = "sean@msgilligan.com";
|
||||||
github = "msgilligan";
|
github = "msgilligan";
|
||||||
|
|||||||
55
pkgs/by-name/li/lichess-bot/package.nix
Normal file
55
pkgs/by-name/li/lichess-bot/package.nix
Normal file
@@ -0,0 +1,55 @@
|
|||||||
|
{
|
||||||
|
lib,
|
||||||
|
python3Packages,
|
||||||
|
fetchFromGitHub,
|
||||||
|
}:
|
||||||
|
|
||||||
|
python3Packages.buildPythonApplication {
|
||||||
|
pname = "lichess-bot";
|
||||||
|
version = "2025.12.23.1";
|
||||||
|
format = "other";
|
||||||
|
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "lichess-bot-devs";
|
||||||
|
repo = "lichess-bot";
|
||||||
|
rev = "6ea42dfaffa65efea0da09d94b058853d724a989";
|
||||||
|
hash = "sha256-G8DiW96mRnvmmmRALRcYDnjLilQIRqH5m6+aTluhohI=";
|
||||||
|
};
|
||||||
|
|
||||||
|
propagatedBuildInputs = with python3Packages; [
|
||||||
|
chess
|
||||||
|
pyyaml
|
||||||
|
requests
|
||||||
|
backoff
|
||||||
|
rich
|
||||||
|
];
|
||||||
|
|
||||||
|
installPhase = ''
|
||||||
|
runHook preInstall
|
||||||
|
|
||||||
|
substituteInPlace "lib/lichess_bot.py" \
|
||||||
|
--replace 'open("lib/versioning.yml")' \
|
||||||
|
'open("'$out'/share/lichess-bot/lib/versioning.yml")'
|
||||||
|
|
||||||
|
|
||||||
|
mkdir -p "$out"/{bin,share/lichess-bot}
|
||||||
|
cp -R . $out/share/lichess-bot
|
||||||
|
|
||||||
|
makeWrapper ${python3Packages.python.interpreter} $out/bin/lichess-bot \
|
||||||
|
--set PYTHONPATH "$PYTHONPATH:$out/share/lichess-bot" \
|
||||||
|
--add-flags "$out/share/lichess-bot/lichess-bot.py"
|
||||||
|
echo $out > $out/my_dir.txt
|
||||||
|
|
||||||
|
runHook postInstall
|
||||||
|
'';
|
||||||
|
|
||||||
|
meta = {
|
||||||
|
description = "Bridge between lichess.org and bots";
|
||||||
|
homepage = "https://github.com/lichess-bot-devs/lichess-bot";
|
||||||
|
license = lib.licenses.gpl3;
|
||||||
|
maintainers = with lib.maintainers; [ mse63 ];
|
||||||
|
platforms = lib.platforms.unix;
|
||||||
|
mainProgram = "lichess-bot";
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user