From b3e113d2e1351ea1d48170a3433c2228ac2ae137 Mon Sep 17 00:00:00 2001 From: Ben Sima Date: Mon, 2 Dec 2024 07:36:15 -0500 Subject: Package ludic This required upgrading to python 3.12 because of some f-string format thing that ludic uses. It's kind of annoying but the upgrade was easy enough, so I just did it. --- Omni/Bild/Deps/Python.nix | 2 +- Omni/Bild/Deps/ludic.nix | 36 ++++++++++++++++++++++++++++++++++++ 2 files changed, 37 insertions(+), 1 deletion(-) create mode 100644 Omni/Bild/Deps/ludic.nix (limited to 'Omni/Bild/Deps') diff --git a/Omni/Bild/Deps/Python.nix b/Omni/Bild/Deps/Python.nix index ba7a858..e36896a 100644 --- a/Omni/Bild/Deps/Python.nix +++ b/Omni/Bild/Deps/Python.nix @@ -1 +1 @@ -[ "cryptography" "llm" "mypy" "nltk" "slixmpp" "flask" "openai" ] +[ "cryptography" "llm" "mypy" "nltk" "slixmpp" "flask" "openai" "ludic" ] diff --git a/Omni/Bild/Deps/ludic.nix b/Omni/Bild/Deps/ludic.nix new file mode 100644 index 0000000..dfac06c --- /dev/null +++ b/Omni/Bild/Deps/ludic.nix @@ -0,0 +1,36 @@ +{ buildPythonPackage, fetchFromGitHub, lib, setuptools, pytestCheckHook +, python-multipart, starlette, typeguard, pygments, pytest, pytest-cov, httpx +, hatchling, hatch-vcs }: + +buildPythonPackage rec { + pname = "ludic"; + version = "0.5.2"; + pyproject = true; + + src = fetchFromGitHub { + owner = "getludic"; + repo = pname; + rev = "refs/tags/${version}"; + hash = "sha256-Zcob2ljyeiCqnCobkDP4ihRTxvs5OtQ4y5+Itsgs/0o="; + }; + + nativeBuildInputs = [ setuptools hatchling hatch-vcs ]; + + propagatedBuildInputs = [ python-multipart starlette typeguard pygments ]; + + disabledTestPaths = [ "tests/contrib/test_django.py" ]; + + nativeCheckInputs = [ pytestCheckHook ]; + + checkInputs = [ pytest pytest-cov httpx ]; + + pythonImportsCheck = [ "ludic" ]; + + meta = with lib; { + homepage = "https://github.com/getludic/ludic"; + description = "Web Development in Pure Python with Type-Guided Components."; + changelog = "https://github.com/getludic/ludic/releases/tag/${version}"; + license = licenses.mit; + maintainers = with maintainers; [ bsima ]; + }; +} -- cgit v1.2.3