1{
2 lib,
3 pkgs,
4 fetchFromGitHub,
5 rustPlatform,
6 pythonImportsCheckHook,
7 buildPythonPackage,
8
9 cargo,
10 rustc,
11 pkg-config,
12 sccache,
13 setuptools,
14 setuptools-rust,
15 setuptools-scm,
16}:
17
18buildPythonPackage rec {
19 pname = "python-kadmin-rs";
20 version = "0.5.3";
21 pyproject = true;
22
23 src = fetchFromGitHub {
24 owner = "authentik-community";
25 repo = "kadmin-rs";
26 rev = "kadmin/version/${version}";
27 hash = "sha256-JK1BwPtIdfp6fleEPyRxMBCFP2njtQebr/Wt+Dc9CYs=";
28 };
29
30 cargoDeps = rustPlatform.fetchCargoVendor {
31 inherit src;
32 hash = "sha256-9LCtsX3fuRXCHu5Gd+7OB5JQZ0h6KjSOSan83KUivLQ=";
33 };
34
35 buildInputs = [
36 pkgs.krb5
37 ];
38
39 nativeBuildInputs = [
40 sccache
41 pkg-config
42 pythonImportsCheckHook
43 rustPlatform.bindgenHook
44 rustPlatform.cargoSetupHook
45 cargo
46 rustc
47 ];
48
49 build-system = [
50 setuptools
51 setuptools-rust
52 setuptools-scm
53 ];
54
55 pythonImportsCheck = [
56 "kadmin"
57 "kadmin_local"
58 ];
59
60 meta = {
61 description = "Rust and Python interfaces to the Kerberos administration interface (kadm5)";
62 homepage = "https://github.com/authentik-community/kadmin-rs";
63 changelog = "https://github.com/authentik-community/kadmin-rs/releases/tag/kadmin%2Fversion%2F${version}";
64 license = lib.licenses.mit;
65 maintainers = with lib.maintainers; [ jvanbruegge ];
66 };
67}