check50: init at 3.3.11 (#410911)

This commit is contained in:
Gaétan Lepage 2025-05-29 22:19:47 +02:00 committed by GitHub
commit 17726ac94f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 116 additions and 0 deletions

View file

@ -0,0 +1,54 @@
{
lib,
python3Packages,
fetchFromGitHub,
versionCheckHook,
}:
python3Packages.buildPythonApplication rec {
pname = "check50";
version = "3.3.11";
pyproject = true;
src = fetchFromGitHub {
owner = "cs50";
repo = "check50";
tag = "v${version}";
hash = "sha256-+qyEMzAJG/fyIqj+0mk0HTxTlQk6sHZhvmfd9Hgj/aw=";
};
build-system = [
python3Packages.setuptools
];
dependencies = with python3Packages; [
attrs
beautifulsoup4
jinja2
lib50
packaging
pexpect
pyyaml
requests
setuptools # required for import pkg_resources
termcolor
];
pythonImportsCheck = [ "check50" ];
nativeCheckInputs = [ versionCheckHook ];
versionCheckProgramArg = "--version";
# no python tests
meta = {
description = "Testing tool for checking student CS50 code";
homepage = "https://cs50.readthedocs.io/projects/check50/en/latest/";
downloadPage = "https://github.com/cs50/check50";
changelog = "https://github.com/cs50/check50/releases/tag/v${version}";
license = lib.licenses.gpl3Only;
platforms = lib.platforms.unix;
maintainers = with lib.maintainers; [ ethancedwards8 ];
mainProgram = "check50";
};
}

View file

@ -0,0 +1,60 @@
{
lib,
buildPythonPackage,
fetchPypi,
setuptools,
attrs,
pexpect,
pyyaml,
requests,
termcolor,
jellyfish,
cryptography,
pytestCheckHook,
}:
buildPythonPackage rec {
pname = "lib50";
version = "3.0.12";
pyproject = true;
# latest GitHub release is several years old. Pypi is up to date.
src = fetchPypi {
pname = "lib50";
inherit version;
hash = "sha256-Fc4Hb1AbSeetK3gH1/dRCUfHGDlMzfzgF1cnK3Se01U=";
};
build-system = [ setuptools ];
dependencies = [
attrs
pexpect
pyyaml
requests
termcolor
jellyfish
cryptography
];
pythonRelaxDeps = [
"attrs"
"pyyaml"
"termcolor"
"jellyfish"
];
pythonImportsCheck = [ "lib50" ];
# latest GitHub release is several years old and doesn't include
# tests and neither does pypi version include tests
doCheck = false;
meta = {
description = "CS50's own internal library used in many of its tools";
homepage = "https://github.com/cs50/lib50";
license = lib.licenses.gpl3Only;
platforms = lib.platforms.unix;
maintainers = with lib.maintainers; [ ethancedwards8 ];
};
}

View file

@ -7811,6 +7811,8 @@ self: super: with self; {
lib4vex = callPackage ../development/python-modules/lib4vex { };
lib50 = callPackage ../development/python-modules/lib50 { };
libagent = callPackage ../development/python-modules/libagent { };
libais = callPackage ../development/python-modules/libais { };