1{
2 lib,
3 python3Packages,
4 fetchFromGitHub,
5 nixosTests,
6 wrapGAppsNoGuiHook,
7 gobject-introspection,
8 glib,
9}:
10
11python3Packages.buildPythonApplication rec {
12 pname = "targetcli-fb";
13 version = "3.0.1";
14 pyproject = true;
15
16 src = fetchFromGitHub {
17 owner = "open-iscsi";
18 repo = "targetcli-fb";
19 tag = "v${version}";
20 hash = "sha256-jRujBgUdeJY8ekVBDscitajDhYohlx/BS4wn+jFkZSg=";
21 };
22
23 build-system = with python3Packages; [
24 hatch-vcs
25 hatchling
26 ];
27
28 nativeBuildInputs = [
29 wrapGAppsNoGuiHook
30 gobject-introspection
31 ];
32 buildInputs = [ glib ];
33
34 dependencies = with python3Packages; [
35 configshell-fb
36 rtslib-fb
37 pygobject3
38 ];
39
40 postInstall = ''
41 install -D targetcli.8 -t $out/share/man/man8/
42 install -D targetclid.8 -t $out/share/man/man8/
43 '';
44
45 passthru.tests = {
46 inherit (nixosTests) iscsi-root;
47 };
48
49 meta = {
50 description = "Command shell for managing the Linux LIO kernel target";
51 homepage = "https://github.com/open-iscsi/targetcli-fb";
52 changelog = "https://github.com/open-iscsi/targetcli-fb/releases/tag/v${version}";
53 license = lib.licenses.asl20;
54 maintainers = [ ];
55 platforms = lib.platforms.linux;
56 mainProgram = "targetcli";
57 };
58}