btrbk: add mainProgram
[NixPkgs.git] / pkgs / by-name / ta / targetcli / package.nix
bloba0a2aad949fd7f6b07865c7bb7fae434427dfa33
1 { lib, python3, fetchFromGitHub, nixosTests, wrapGAppsNoGuiHook, gobject-introspection, glib }:
3 python3.pkgs.buildPythonApplication rec {
4   pname = "targetcli";
5   version = "2.1.58";
7   src = fetchFromGitHub {
8     owner = "open-iscsi";
9     repo = "${pname}-fb";
10     rev = "v${version}";
11     hash = "sha256-9QYo7jGk9iWr26j0qPQCqYsJ+vLXAsO4Xs7+7VT9/yc=";
12   };
14   nativeBuildInputs = [ wrapGAppsNoGuiHook gobject-introspection ];
15   buildInputs = [ glib ];
17   propagatedBuildInputs = with python3.pkgs; [ configshell rtslib pygobject3 ];
19   postInstall = ''
20     install -D targetcli.8 -t $out/share/man/man8/
21     install -D targetclid.8 -t $out/share/man/man8/
22   '';
24   passthru.tests = {
25     inherit (nixosTests) iscsi-root;
26   };
28   meta = with lib; {
29     description = "Command shell for managing the Linux LIO kernel target";
30     homepage = "https://github.com/open-iscsi/targetcli-fb";
31     license = licenses.asl20;
32     maintainers = [ ];
33     platforms = platforms.linux;
34   };