nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 writableTmpDirAsHomeHook,
6
7 # build-system
8 setuptools,
9 versioneer,
10
11 # dependencies
12 arviz,
13 cachetools,
14 cloudpickle,
15 numpy,
16 pandas,
17 pytensor,
18 rich,
19 scipy,
20 threadpoolctl,
21 typing-extensions,
22}:
23
24buildPythonPackage (finalAttrs: {
25 pname = "pymc";
26 version = "5.27.1";
27 pyproject = true;
28
29 src = fetchFromGitHub {
30 owner = "pymc-devs";
31 repo = "pymc";
32 tag = "v${finalAttrs.version}";
33 hash = "sha256-9SPRt1R36pvsGOS0UUH3Ts/3D7W46nPnLbRc2XnU0xE=";
34 };
35
36 build-system = [
37 setuptools
38 versioneer
39 ];
40
41 dependencies = [
42 arviz
43 cachetools
44 cloudpickle
45 numpy
46 pandas
47 pytensor
48 rich
49 scipy
50 threadpoolctl
51 typing-extensions
52 ];
53
54 nativeBuildInputs = [
55 # Arviz (imported by pymc) wants to write a stamp file to the homedir at import time.
56 # Without $HOME being writable, `pythonImportsCheck` fails.
57 # https://github.com/arviz-devs/arviz/commit/4db612908f588d89bb5bfb6b83a08ada3d54fd02
58 writableTmpDirAsHomeHook
59 ];
60
61 # The test suite is computationally intensive and test failures are not
62 # indicative for package usability hence tests are disabled by default.
63 doCheck = false;
64
65 pythonImportsCheck = [ "pymc" ];
66
67 meta = {
68 description = "Bayesian estimation, particularly using Markov chain Monte Carlo (MCMC)";
69 homepage = "https://github.com/pymc-devs/pymc";
70 changelog = "https://github.com/pymc-devs/pymc/releases/tag/${finalAttrs.src.tag}";
71 license = lib.licenses.asl20;
72 maintainers = with lib.maintainers; [
73 nidabdella
74 ];
75 };
76})