1{ lib
2, stdenv
3, fetchFromGitHub
4, autoconf
5, automake
6, glib
7, libkrb5
8, libnl
9, libtool
10, pkg-config
11, withKerberos ? false
12}:
13
14stdenv.mkDerivation rec {
15 pname = "ksmbd-tools";
16 version = "3.4.8";
17
18 src = fetchFromGitHub {
19 owner = "cifsd-team";
20 repo = pname;
21 rev = version;
22 sha256 = "sha256-R/OWZekAGtDxE71MrzjWsdpaWGBu0c+VP0VkPro6GEo=";
23 };
24
25 buildInputs = [ glib libnl ] ++ lib.optional withKerberos libkrb5;
26
27 nativeBuildInputs = [ autoconf automake libtool pkg-config ];
28
29 preConfigure = "./autogen.sh";
30
31 configureFlags = lib.optional withKerberos "--enable-krb5";
32
33 meta = with lib; {
34 description = "Userspace utilities for the ksmbd kernel SMB server";
35 homepage = "https://www.kernel.org/doc/html/latest/filesystems/cifs/ksmbd.html";
36 license = licenses.gpl2;
37 platforms = platforms.linux;
38 maintainers = with maintainers; [ elohmeier ];
39 };
40}