summaryrefslogtreecommitdiff
path: root/gnu/packages/ssh.scm
diff options
context:
space:
mode:
authorAshish SHUKLA <ashish.is@lostca.se>2025-10-23 17:34:38 +0000
committerLudovic Courtès <ludo@gnu.org>2025-11-01 12:33:04 +0100
commit66399fea0e2a61792a475f7d9bdbcab22a12f370 (patch)
treef7b0c512f641717c4ddc3cfc8aee1e75304b8d76 /gnu/packages/ssh.scm
parent9864e2d983346396dbbb396cae86e7ebe1120d54 (diff)
gnu: Add hpn-ssh.
* gnu/packages/ssh.scm: New variables. Change-Id: Ia3481d8415665d08a91898c202bf694a4a773182 Signed-off-by: Ludovic Courtès <ludo@gnu.org>
Diffstat (limited to 'gnu/packages/ssh.scm')
-rw-r--r--gnu/packages/ssh.scm88
1 files changed, 87 insertions, 1 deletions
diff --git a/gnu/packages/ssh.scm b/gnu/packages/ssh.scm
index b7fdb3c7c41..9daefc2e25e 100644
--- a/gnu/packages/ssh.scm
+++ b/gnu/packages/ssh.scm
@@ -19,7 +19,7 @@
19;;; Copyright © 2021 Brice Waegeneire <brice@waegenei.re> 19;;; Copyright © 2021 Brice Waegeneire <brice@waegenei.re>
20;;; Copyright © 2023 Simon Streit <simon@netpanic.org> 20;;; Copyright © 2023 Simon Streit <simon@netpanic.org>
21;;; Copyright © 2024 Zheng Junjie <873216071@qq.com> 21;;; Copyright © 2024 Zheng Junjie <873216071@qq.com>
22;;; Copyright © 2024 Ashish SHUKLA <ashish.is@lostca.se> 22;;; Copyright © 2024, 2025 Ashish SHUKLA <ashish.is@lostca.se>
23;;; Copyright © 2024, 2025 Sharlatan Hellseher <sharlatanus@gmail.com> 23;;; Copyright © 2024, 2025 Sharlatan Hellseher <sharlatanus@gmail.com>
24;;; Copyright © 2025 Ghislain Vaillant <ghislain.vaillant@inria.fr> 24;;; Copyright © 2025 Ghislain Vaillant <ghislain.vaillant@inria.fr>
25;;; 25;;;
@@ -345,6 +345,92 @@ Additionally, various channel-specific options can be negotiated.")
345 (delete "xauth"))) 345 (delete "xauth")))
346 (synopsis "OpenSSH client and server without X11 support"))) 346 (synopsis "OpenSSH client and server without X11 support")))
347 347
348(define-public hpn-ssh
349 (package
350 (inherit openssh)
351 (name "hpn-ssh")
352 (version "18.8.0")
353 (source
354 (origin
355 (inherit (package-source openssh))
356 (method git-fetch)
357 (uri
358 (git-reference
359 (url "https://github.com/rapier1/hpn-ssh")
360 (commit (string-append "hpn-" version))))
361 (file-name (git-file-name name version))
362 (sha256 (base32 "13g7b652rf9lqlp492fiyi8ypf04v65ar3z174gjmkskl77m4b7k"))))
363 (arguments
364 (substitute-keyword-arguments (package-arguments openssh)
365 ((#:configure-flags flags #~(list))
366 #~(cons* "--with-privsep-user=sshd"
367 "--with-pam-service=sshd"
368 #$flags))
369 ((#:modules mods %default-gnu-modules)
370 (cons '(ice-9 string-fun) mods))
371 ((#:imported-modules mods %default-gnu-imported-modules)
372 (cons '(ice-9 string-fun) mods))
373 ((#:phases phases #~(list))
374 #~(modify-phases #$phases
375 (add-after 'unpack 'patch-ssh-stuff
376 (lambda _
377 (substitute* "Makefile.in"
378 (("^sysconfdir=.*$")
379 "sysconfdir=/etc/ssh\n")
380 ((".*MKDIR_P.*PRIVSEP_PATH.*")
381 ""))
382 (substitute* "ssh.h"
383 (("#define HPNSSH_DEFAULT_PORT.*$")
384 "#define HPNSSH_DEFAULT_PORT 22\n"))))
385 (replace 'install
386 (lambda* (#:key (make-flags '()) #:allow-other-keys)
387 (let ((bindir (string-append #$output "/bin"))
388 (sbindir (string-append #$output "/sbin"))
389 (mandir (string-append #$output "/share/man")))
390 ;; Install without host keys and system configuration files. This
391 ;; will install /var/empty to the store, which is needed by the
392 ;; system openssh-service-type.
393 (apply invoke "make" "install-nosysconf" make-flags)
394 ;; rename files so it can act as replacement for openssh
395 (with-directory-excursion "contrib"
396 (chmod "hpnssh-copy-id" #o555)
397 (install-file "hpnssh-copy-id" bindir)
398 (install-file "hpnssh-copy-id.1"
399 (string-append mandir "/man1/")))
400 (for-each
401 (lambda (file)
402 (when (string-prefix? (string-append bindir "/hpn") file)
403 (symlink (basename file)
404 (string-replace-substring file "/bin/hpn" "/bin/"))))
405 (find-files bindir))
406 (for-each
407 (lambda (file)
408 (when (string-prefix? (string-append sbindir "/hpn") file)
409 (symlink (basename file)
410 (string-replace-substring file "/sbin/hpn" "/sbin/"))))
411 (find-files sbindir))
412 (for-each
413 (lambda (file)
414 (when (string-prefix? "hpn" (basename file))
415 (symlink (basename file)
416 (string-replace-substring file "/hpn" "/"))))
417 (find-files mandir)))))))))
418 (native-inputs
419 (modify-inputs (package-native-inputs openssh)
420 (append autoconf automake)))
421 (synopsis "High performance SSH/SCP client, and server")
422 (description "HPN-SSH is a series of modifications to OpenSSH, the predominant implementation
423of the ssh protocol. It was originally developed to address performance issues when using ssh on high speed long distance networks.")
424 (home-page "https://hpnssh.org/")))
425
426(define-public hpn-ssh-sans-x
427 (package
428 (inherit hpn-ssh)
429 (inputs
430 (modify-inputs (package-inputs hpn-ssh)
431 (delete "xauth")))
432 (synopsis "High performance SSH/SCP client, and server without X11 support")))
433
348(define-public guile-ssh 434(define-public guile-ssh
349 (package 435 (package
350 (name "guile-ssh") 436 (name "guile-ssh")