summaryrefslogtreecommitdiff
path: root/Omni/Bild/Deps/kerykeion.nix
diff options
context:
space:
mode:
authorBen Sima <ben@bsima.me>2025-06-17 14:29:58 -0400
committerBen Sima <ben@bsima.me>2025-07-28 10:16:44 -0400
commit840c2c3f573a0a761b4ac9eeb13ed036cd55db32 (patch)
tree0345247b299b93c242fb8dff856ea9f8fe2862f6 /Omni/Bild/Deps/kerykeion.nix
parent10067c9a906bf95698053e01177d3408f6be5ff6 (diff)
Package kerykeion and swiss ephemerisHEADlive
This took quite a bit of work to package, and it's not a perfect package, but I think it will do to get Biz/Astrologer.py working.
Diffstat (limited to 'Omni/Bild/Deps/kerykeion.nix')
-rw-r--r--Omni/Bild/Deps/kerykeion.nix72
1 files changed, 72 insertions, 0 deletions
diff --git a/Omni/Bild/Deps/kerykeion.nix b/Omni/Bild/Deps/kerykeion.nix
new file mode 100644
index 0000000..d887231
--- /dev/null
+++ b/Omni/Bild/Deps/kerykeion.nix
@@ -0,0 +1,72 @@
+{
+ buildPythonPackage,
+ lib,
+ poetry-core,
+ pytestCheckHook,
+ pytz,
+ pyswisseph,
+ pydantic,
+ requests,
+ requests-cache,
+ scour,
+ simple-ascii-tables,
+ typing-extensions,
+ sources,
+ setuptools,
+}:
+buildPythonPackage rec {
+ pname = "kerykeion";
+ version = sources.kerykeion.version;
+ pyproject = true;
+
+ src = sources.kerykeion;
+
+ nativeBuildInputs = [poetry-core];
+
+ propagatedBuildInputs = [
+ pyswisseph
+ pydantic
+ scour
+ requests-cache
+ requests
+ simple-ascii-tables
+ pytz
+ typing-extensions
+ setuptools
+ ];
+
+ preBuild = ''
+ cat <<EOF >> pyproject.toml
+ [project]
+ name = "kerykeion"
+ version = "${sources.kerykeion.version}"
+
+ [tool.setuptools.packages.find]
+ where = ["."]
+ include = ["kerykeion*", "tests"]
+ namespaces = false
+
+ [build-system]
+ build-backend = "setuptools.build_meta"
+ requires = ["setuptools"]
+ EOF
+ '';
+
+ nativeCheckInputs = [pytestCheckHook];
+
+ pythonImportsCheck = ["kerykeion"];
+
+ # almost all tests perform network requests to api.geonames.org
+ enabledTests = [
+ "test_ephemeris_data"
+ "test_settings"
+ ];
+
+ meta = with lib; {
+ homepage = "https://www.kerykeion.net/";
+ description = "A python library for astrology";
+ changelog = "https://github.com/g-battaglia/kerykeion/releases/tag/v${version}";
+ license = licenses.agpl3Only;
+ maintainers = with maintainers; [bsima];
+ };
+}