;;; SPDX-License-Identifier: GPL-3.0-or-later
;;; Copyright © 2022 Hilton Chain <hako@ultrarare.space>

(define-module (rosenthal packages ssh)
  ;; Utilities
  #:use-module (guix gexp)
  #:use-module (guix packages)
  #:use-module (guix utils)
  ;; Guix packages
  #:use-module (gnu packages compression)
  #:use-module (gnu packages multiprecision)
  #:use-module (gnu packages ssh))

(define-public dropbear/static
  (let ((base dropbear))
    (package
      (inherit dropbear)
      (name "dropbear-static")
      (arguments
       (substitute-keyword-arguments arguments
         ((#:configure-flags flags)
          #~(append #$flags (list "--enable-static")))))
      (inputs
       (modify-inputs inputs
         (append `(,zlib "static"))
         (replace "libtomcrypt" `(,libtomcrypt "static"))
         (replace "libtommath" `(,libtommath "static"))))
      (properties
       `(,@(package-properties base)
         (disable-updater? . #t))))))
