summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/pyrad/default.nix
blob: a17339abd7cd5c28cd701f4b83b1d60634c942d3 (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
{
  buildPythonPackage,
  fetchFromGitHub,
  lib,
  nix-update-script,
  unittestCheckHook,
  poetry-core,
}:

buildPythonPackage {
  pname = "pyrad";
  version = "2.4-unstable-2025-12-02";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "pyradius";
    repo = "pyrad";
    rev = "56649fc522faeb4bc105ac6d0f95b080e97c89aa";
    hash = "sha256-F+6ejSvIJDcLLb1o3m6r1es/PObB8H6eeSkAETJaftc=";
  };

  postPatch = ''
    substituteInPlace pyproject.toml \
      --replace-fail 'repository =' 'Repository ='
  '';

  nativeBuildInputs = [ poetry-core ];

  nativeCheckInputs = [ unittestCheckHook ];

  pythonImportsCheck = [ "pyrad" ];

  passthru.updateScript = nix-update-script {
    extraArgs = [ "--version=branch" ];
  };

  meta = {
    description = "Python RADIUS Implementation";
    homepage = "https://github.com/pyradius/pyrad";
    license = lib.licenses.bsd3;
    maintainers = with lib.maintainers; [ drawbu ];
  };
}