summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/leidenalg/default.nix
blob: 85f25ad082f2ec83e898fff85a9987541b650518 (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
42
43
44
45
46
47
48
{
  lib,
  buildPythonPackage,
  ddt,
  fetchFromGitHub,
  igraph,
  igraph-c,
  libleidenalg,
  setuptools-scm,
  unittestCheckHook,
}:

buildPythonPackage rec {
  pname = "leidenalg";
  version = "0.11.0";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "vtraag";
    repo = "leidenalg";
    tag = version;
    hash = "sha256-u4xW1gsWDpbsFVLlOIiPZtpw9t4iFBC7fzwn04flev8=";
  };

  build-system = [ setuptools-scm ];

  buildInputs = [
    igraph-c
    libleidenalg
  ];

  propagatedBuildInputs = [ igraph ];

  nativeCheckInputs = [
    ddt
    unittestCheckHook
  ];

  pythonImportsCheck = [ "leidenalg" ];

  meta = {
    changelog = "https://github.com/vtraag/leidenalg/blob/${src.tag}/CHANGELOG";
    description = "Implementation of the Leiden algorithm for various quality functions to be used with igraph in Python";
    homepage = "https://github.com/vtraag/leidenalg";
    license = lib.licenses.gpl3Plus;
    maintainers = with lib.maintainers; [ jboy ];
  };
}