diff --git a/doc/release-notes/rl-2511.section.md b/doc/release-notes/rl-2511.section.md index 145185bdf26e..bc2d0b0449b8 100644 --- a/doc/release-notes/rl-2511.section.md +++ b/doc/release-notes/rl-2511.section.md @@ -115,6 +115,9 @@ - `fetchgit`: Add `rootDir` argument to limit the resulting source to one subdirectory of the whole Git repository. Corresponding `--root-dir` option added to `nix-prefetch-git`. +- `sftpman` has been updated to version 2, a rewrite in Rust which is mostly backward compatible but does include some changes to the CLI. + For more information, [check the project's README](https://github.com/spantaleev/sftpman-rs#is-sftpman-v2-compatible-with-sftpman-v1). + - The `clickhouse` package now track the stable upstream version per [upstream's recommendation](https://clickhouse.com/docs/faq/operations/production). Users can continue to use the `clickhouse-lts` package if desired. diff --git a/pkgs/by-name/sf/sftpman/package.nix b/pkgs/by-name/sf/sftpman/package.nix index db9b5143c296..be66f44fe6c4 100644 --- a/pkgs/by-name/sf/sftpman/package.nix +++ b/pkgs/by-name/sf/sftpman/package.nix @@ -1,35 +1,34 @@ { lib, - python3Packages, fetchFromGitHub, + rustPlatform, + nix-update-script, }: -python3Packages.buildPythonApplication rec { +rustPlatform.buildRustPackage (finalAttrs: { pname = "sftpman"; - version = "1.2.2"; - pyproject = true; + version = "2.1.0"; + + passthru.updateScript = nix-update-script { }; src = fetchFromGitHub { owner = "spantaleev"; - repo = "sftpman"; - rev = version; - hash = "sha256-YxqN4+u0nYUWehbyRhjddIo2sythH3E0fiPSyrUlWhM="; + repo = "sftpman-rs"; + tag = "v${finalAttrs.version}"; + hash = "sha256-6IhMBnp951mKfG054svFTezf3fpOEMJusRj45qVThmA="; }; - build-system = with python3Packages; [ setuptools ]; - - checkPhase = '' - $out/bin/sftpman help - ''; - - pythonImportsCheck = [ "sftpman" ]; + cargoHash = "sha256-TltizTFKrMvHNQcSoow9fuNLy6appYq9Y4LicEQrfRE="; meta = with lib; { - homepage = "https://github.com/spantaleev/sftpman"; + homepage = "https://github.com/spantaleev/sftpman-rs"; description = "Application that handles sshfs/sftp file systems mounting"; - license = licenses.gpl3; - platforms = platforms.unix; - maintainers = with maintainers; [ contrun ]; + license = licenses.agpl3Only; + platforms = platforms.linux; + maintainers = with maintainers; [ + contrun + fugi + ]; mainProgram = "sftpman"; }; -} +})