From 3e07992f322c6e37ed5f3df7913a4eafcb2bb189 Mon Sep 17 00:00:00 2001 From: Seong Yong-ju Date: Tue, 25 Jan 2022 23:23:38 +0900 Subject: [PATCH] online-judge-template-generator: init at 4.8.1 --- .../default.nix | 51 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + 2 files changed, 53 insertions(+) create mode 100644 pkgs/tools/misc/online-judge-template-generator/default.nix diff --git a/pkgs/tools/misc/online-judge-template-generator/default.nix b/pkgs/tools/misc/online-judge-template-generator/default.nix new file mode 100644 index 000000000000..cf1ab7b70788 --- /dev/null +++ b/pkgs/tools/misc/online-judge-template-generator/default.nix @@ -0,0 +1,51 @@ +{ lib +, buildPythonApplication +, appdirs +, beautifulsoup4 +, colorlog +, fetchFromGitHub +, Mako +, online-judge-api-client +, online-judge-tools +, ply +, pyyaml +, requests +, setuptools +, toml +}: + +buildPythonApplication rec { + pname = "online-judge-template-generator"; + version = "4.8.1"; + + src = fetchFromGitHub { + owner = "online-judge-tools"; + repo = "template-generator"; + rev = "v${version}"; + sha256 = "sha256-cS1ED1a92fEFqy6ht8UFjxocWIm35IA/VuaPSLsdlqg="; + }; + + propagatedBuildInputs = [ + appdirs + beautifulsoup4 + colorlog + Mako + online-judge-api-client + online-judge-tools + ply + pyyaml + requests + setuptools + toml + ]; + + # Needs internet to run tests + doCheck = false; + + meta = with lib; { + description = "Analyze problems of competitive programming and automatically generate boilerplate"; + homepage = "https://github.com/online-judge-tools/template-generator"; + license = licenses.mit; + maintainers = with maintainers; [ sei40kr ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 4580a6e9040d..6edeb80bb80f 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -3629,6 +3629,8 @@ with pkgs; orjail = callPackage ../tools/security/orjail { }; + online-judge-template-generator = python3Packages.callPackage ../tools/misc/online-judge-template-generator { }; + online-judge-tools = with python3.pkgs; toPythonApplication online-judge-tools; xkbd = callPackage ../applications/misc/xkbd { };