diff --git a/nixos/modules/services/networking/iscsi/target.nix b/nixos/modules/services/networking/iscsi/target.nix index bfc229376895..3154271b4dd6 100644 --- a/nixos/modules/services/networking/iscsi/target.nix +++ b/nixos/modules/services/networking/iscsi/target.nix @@ -34,7 +34,7 @@ in mode = "0600"; }; - environment.systemPackages = with pkgs; [ targetcli ]; + environment.systemPackages = with pkgs; [ targetcli-fb ]; boot.kernelModules = [ "configfs" @@ -52,8 +52,8 @@ in wantedBy = [ "multi-user.target" ]; serviceConfig = { Type = "oneshot"; - ExecStart = "${pkgs.python3.pkgs.rtslib}/bin/targetctl restore"; - ExecStop = "${pkgs.python3.pkgs.rtslib}/bin/targetctl clear"; + ExecStart = "${lib.getExe pkgs.python3Packages.rtslib-fb} restore"; + ExecStop = "${lib.getExe pkgs.python3Packages.rtslib-fb} clear"; RemainAfterExit = "yes"; }; }; diff --git a/pkgs/by-name/nv/nvmet-cli/package.nix b/pkgs/by-name/nv/nvmet-cli/package.nix index beaeea887c39..00bfcef2829e 100644 --- a/pkgs/by-name/nv/nvmet-cli/package.nix +++ b/pkgs/by-name/nv/nvmet-cli/package.nix @@ -15,7 +15,7 @@ python3Packages.buildPythonApplication rec { buildInputs = with python3Packages; [ nose2 ]; - propagatedBuildInputs = with python3Packages; [ configshell ]; + propagatedBuildInputs = with python3Packages; [ configshell-fb ]; # This package requires the `nvmet` kernel module to be loaded for tests. doCheck = false; diff --git a/pkgs/by-name/sp/spdk/package.nix b/pkgs/by-name/sp/spdk/package.nix index 738779b2325b..7a3e57071253 100644 --- a/pkgs/by-name/sp/spdk/package.nix +++ b/pkgs/by-name/sp/spdk/package.nix @@ -64,7 +64,7 @@ stdenv.mkDerivation rec { ]; propagatedBuildInputs = [ - python3.pkgs.configshell + python3.pkgs.configshell-fb ]; postPatch = '' diff --git a/pkgs/by-name/ta/targetcli/package.nix b/pkgs/by-name/ta/targetcli-fb/package.nix similarity index 52% rename from pkgs/by-name/ta/targetcli/package.nix rename to pkgs/by-name/ta/targetcli-fb/package.nix index 9498717b22d6..a8db141a5e64 100644 --- a/pkgs/by-name/ta/targetcli/package.nix +++ b/pkgs/by-name/ta/targetcli-fb/package.nix @@ -1,6 +1,6 @@ { lib, - python3, + python3Packages, fetchFromGitHub, nixosTests, wrapGAppsNoGuiHook, @@ -8,26 +8,32 @@ glib, }: -python3.pkgs.buildPythonApplication rec { - pname = "targetcli"; - version = "2.1.58"; +python3Packages.buildPythonApplication rec { + pname = "targetcli-fb"; + version = "3.0.1"; + pyproject = true; src = fetchFromGitHub { owner = "open-iscsi"; - repo = "${pname}-fb"; - rev = "v${version}"; - hash = "sha256-9QYo7jGk9iWr26j0qPQCqYsJ+vLXAsO4Xs7+7VT9/yc="; + repo = "targetcli-fb"; + tag = "v${version}"; + hash = "sha256-jRujBgUdeJY8ekVBDscitajDhYohlx/BS4wn+jFkZSg="; }; + build-system = with python3Packages; [ + hatch-vcs + hatchling + ]; + nativeBuildInputs = [ wrapGAppsNoGuiHook gobject-introspection ]; buildInputs = [ glib ]; - propagatedBuildInputs = with python3.pkgs; [ - configshell - rtslib + dependencies = with python3Packages; [ + configshell-fb + rtslib-fb pygobject3 ]; @@ -40,11 +46,13 @@ python3.pkgs.buildPythonApplication rec { inherit (nixosTests) iscsi-root; }; - meta = with lib; { + meta = { description = "Command shell for managing the Linux LIO kernel target"; homepage = "https://github.com/open-iscsi/targetcli-fb"; - license = licenses.asl20; + changelog = "https://github.com/open-iscsi/targetcli-fb/releases/tag/v${version}"; + license = lib.licenses.asl20; maintainers = [ ]; - platforms = platforms.linux; + platforms = lib.platforms.linux; + mainProgram = "targetcli"; }; } diff --git a/pkgs/development/python-modules/configshell/default.nix b/pkgs/development/python-modules/configshell-fb/default.nix similarity index 77% rename from pkgs/development/python-modules/configshell/default.nix rename to pkgs/development/python-modules/configshell-fb/default.nix index df0a5aa19170..6fb61a2831db 100644 --- a/pkgs/development/python-modules/configshell/default.nix +++ b/pkgs/development/python-modules/configshell-fb/default.nix @@ -9,15 +9,13 @@ }: buildPythonPackage rec { - pname = "configshell"; + pname = "configshell-fb"; version = "2.0.0"; pyproject = true; - disabled = pythonOlder "3.9"; - src = fetchFromGitHub { owner = "open-iscsi"; - repo = "${pname}-fb"; + repo = "configshell-fb"; tag = "v${version}"; hash = "sha256-lP3WT9ASEj6WiCrurSU/e9FhIaeoQW/n9hi1XZMnV4Q="; }; @@ -36,10 +34,11 @@ buildPythonPackage rec { pythonImportsCheck = [ "configshell" ]; - meta = with lib; { + meta = { description = "Python library for building configuration shells"; homepage = "https://github.com/open-iscsi/configshell-fb"; - license = licenses.asl20; + changelog = "https://github.com/open-iscsi/configshell-fb/releases/tag/v${version}"; + license = lib.licenses.asl20; maintainers = [ ]; }; } diff --git a/pkgs/development/python-modules/rtslib-fb/default.nix b/pkgs/development/python-modules/rtslib-fb/default.nix new file mode 100644 index 000000000000..ab2f3b9d5553 --- /dev/null +++ b/pkgs/development/python-modules/rtslib-fb/default.nix @@ -0,0 +1,56 @@ +{ + lib, + fetchFromGitHub, + buildPythonPackage, + + # build-system + hatchling, + hatch-vcs, + + # dependencies + pyudev, +}: + +buildPythonPackage rec { + pname = "rtslib-fb"; + version = "2.2.2"; + pyproject = true; + + # TypeError: 'method' object does not support the context manager protocol + postPatch = '' + substituteInPlace rtslib/root.py \ + --replace-fail "Path(restore_file).open" "Path(restore_file).open('r')" + ''; + + src = fetchFromGitHub { + owner = "open-iscsi"; + repo = "rtslib-fb"; + tag = "v${version}"; + hash = "sha256-FuXO/yGZBR+QRvB5s1tE77hjnisSfjjHSCPLvGJOYdM="; + }; + + build-system = [ + hatchling + hatch-vcs + ]; + + dependencies = [ + pyudev + ]; + + postInstall = '' + install -Dm555 scripts/targetctl -t $out/bin + ''; + + # No tests + doCheck = false; + + meta = { + description = "Python object API for managing the Linux LIO kernel target"; + homepage = "https://github.com/open-iscsi/rtslib-fb"; + changelog = "https://github.com/open-iscsi/rtslib-fb/releases/tag/v${version}"; + license = lib.licenses.asl20; + platforms = lib.platforms.linux; + mainProgram = "targetctl"; + }; +} diff --git a/pkgs/development/python-modules/rtslib/default.nix b/pkgs/development/python-modules/rtslib/default.nix deleted file mode 100644 index 814e7515b543..000000000000 --- a/pkgs/development/python-modules/rtslib/default.nix +++ /dev/null @@ -1,42 +0,0 @@ -{ - lib, - fetchFromGitHub, - buildPythonPackage, - hatchling, - hatch-vcs, - six, - pyudev, - pygobject3, -}: - -buildPythonPackage rec { - pname = "rtslib"; - version = "2.2.0"; - pyproject = true; - - src = fetchFromGitHub { - owner = "open-iscsi"; - repo = "${pname}-fb"; - tag = "v${version}"; - hash = "sha256-lBYckQlnvIQ6lSENctYsMhzULi1MJAVUyF06Ul56LzA="; - }; - - build-system = [ - hatchling - hatch-vcs - ]; - - dependencies = [ - six - pyudev - pygobject3 - ]; - - meta = with lib; { - description = "Python object API for managing the Linux LIO kernel target"; - mainProgram = "targetctl"; - homepage = "https://github.com/open-iscsi/rtslib-fb"; - license = licenses.asl20; - platforms = platforms.linux; - }; -} diff --git a/pkgs/top-level/aliases.nix b/pkgs/top-level/aliases.nix index 7feb8bb55bac..dd8e0572983b 100644 --- a/pkgs/top-level/aliases.nix +++ b/pkgs/top-level/aliases.nix @@ -1516,6 +1516,7 @@ mapAliases { taskwarrior = lib.warnOnInstantiate "taskwarrior was replaced by taskwarrior3, which requires manual transition from taskwarrior 2.6, read upstream's docs: https://taskwarrior.org/docs/upgrade-3/" taskwarrior2; taplo-cli = taplo; # Added 2022-07-30 taplo-lsp = taplo; # Added 2022-07-30 + targetcli = targetcli-fb; # Added 2025-03-14 taro = taproot-assets; # Added 2023-07-04 tbb_2021_5 = throw "tbb_2021_5 has been removed from nixpkgs, as it broke with GCC 14"; tcl-fcgi = tclPackages.tcl-fcgi; # Added 2024-10-02 diff --git a/pkgs/top-level/python-aliases.nix b/pkgs/top-level/python-aliases.nix index 9b3bfa0d88b8..3bc5f860f141 100644 --- a/pkgs/top-level/python-aliases.nix +++ b/pkgs/top-level/python-aliases.nix @@ -135,6 +135,7 @@ mapAliases ({ command_runner = command-runner; # added 2024-03-06 CommonMark = commonmark; # added 2023-02-1 ConfigArgParse = configargparse; # added 2021-03-18 + configshell = configshell-fb; # added 2025-03-14 coronavirus = throw "coronavirus was removed, because the source is not providing the data anymore."; # added 2023-05-04 covCore = throw "covCore was renamed to cov-core and subsequently removed since it has ben unmaintained since 2014"; # added 2024-05-20 cov-core = throw "cov-core has been removed, it was archived and unmaintained since 2014"; # added 2024-05-21 @@ -648,6 +649,7 @@ mapAliases ({ ronin = throw "ronin has been removed because it was unmaintained since 2018"; # added 2024-08-21 ROPGadget = ropgadget; # added 2021-07-06 rotate-backups = throw "rotate-backups was removed in favor of the top-level rotate-backups"; # added 2021-07-01 + rtslib = rtslib-fb; # added 2025-03-14 ruamel_base = ruamel-base; # added 2021-11-01 ruamel_yaml = ruamel-yaml; # added 2021-11-01 ruamel_yaml_clib = ruamel-yaml-clib; # added 2021-11-01 diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index b83c4c5cdb0c..9ee769813e4f 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -2660,7 +2660,7 @@ self: super: with self; { configparser = callPackage ../development/python-modules/configparser { }; - configshell = callPackage ../development/python-modules/configshell { }; + configshell-fb = callPackage ../development/python-modules/configshell-fb { }; configupdater = callPackage ../development/python-modules/configupdater { }; @@ -14741,7 +14741,7 @@ self: super: with self; { inherit (pkgs) libspatialindex; }; - rtslib = callPackage ../development/python-modules/rtslib { }; + rtslib-fb = callPackage ../development/python-modules/rtslib-fb { }; rtsp-to-webrtc = callPackage ../development/python-modules/rtsp-to-webrtc { };