blob: 36c805ea75b0f11d1a4a02635baafca81a13097f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
{
buildPythonPackage,
lib,
setuptools,
wheel,
sources,
sweph-data,
}:
buildPythonPackage rec {
pname = "pyswisseph";
version = sources.pyswisseph.version;
format = "setuptools";
src = sources.pyswisseph;
nativeBuildInputs = [
setuptools
wheel
];
# Disable system library detection to use bundled versions
preBuild = ''
substituteInPlace setup.py \
--replace-fail "swe_detection = True" "swe_detection = False" \
--replace-fail "sqlite3_detection = True" "sqlite3_detection = False"
'';
# Set ephemeris path to use sweph-data
postInstall = ''
export SE_EPHE_PATH=${sweph-data}/share/sweph/ephe
'';
pythonImportsCheck = ["swisseph"];
meta = with lib; {
homepage = "https://astrorigin.com/pyswisseph";
description = "Python extension to the Swiss Ephemeris";
license = licenses.agpl3Only;
maintainers = with maintainers; [bsima];
};
}
|