summaryrefslogtreecommitdiff
path: root/siguix/packages/x11-ssh-askpass.scm
blob: 28df92782a89f3e64a98d722e5a22ce8002c1191 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2022 Simon Streit <simon@netpanic.org>
;;;
;;; This file is NOT part of GNU Guix.
;;;
;;; GNU Guix is free software; you can redistribute it and/or modify it
;;; under the terms of the GNU General Public License as published by
;;; the Free Software Foundation; either version 3 of the License, or (at
;;; your option) any later version.
;;;
;;; GNU Guix is distributed in the hope that it will be useful, but
;;; WITHOUT ANY WARRANTY; without even the implied warranty of
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
;;; GNU General Public License for more details.
;;;
;;; You should have received a copy of the GNU General Public License
;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.

(define-module (siguix packages x11-ssh-askpass)
  #:use-module ((guix licenses) #:prefix license:)
  #:use-module (guix download)
  #:use-module (guix git-download)
  #:use-module (guix build-system gnu)
  #:use-module (guix packages)
  #:use-module (guix gexp)
  #:use-module (guix utils)
  #:use-module (gnu packages)
  #:use-module (gnu packages xorg)
  #:use-module (gnu packages man))

(define-public x11-ssh-askpass
  (package
    (name "x11-ssh-askpass")
    (version "1.2.4.1")
    (source
     (origin
       (method url-fetch)
       ;; The project home page seams to be offline.
       (uri (string-append "https://pkgs.fedoraproject.org/repo/pkgs/openssh/"
                           name "-" version ".tar.gz"
                           "/8f2e41f3f7eaa8543a2440454637f3c3/"
                           name "-" version ".tar.gz"))
       (sha256
        (base32 "124c1frwvdmg4nv8xqv435ibjhj2y8xc1bmfr6i8a8g75b1y63b2"))))
    (build-system gnu-build-system)
    (native-inputs (list imake))
    (inputs (list libxt))
    (arguments
     `(#:make-flags
       (let ((out (assoc-ref %outputs "out")))
         (list (string-append "BINDIR=" out "/libexec")
               (string-append "MANDIR=" out "/share/man")))
       #:tests? #f
       #:configure-flags (list (string-append "--mandir="
                                              "/usr/share/man/test")
                               (string-append "--libexecdir="
                                              "/usr/lib/ssh/test")
                               (string-append "--with-app-defaults-dir="
                                              "/usr/share/X11/app-defaults/test"))
      #:phases
      (modify-phases %standard-phases
        (add-after 'configure 'xmkmf
          (lambda* (#:key inputs outputs #:allow-other-keys)
            (let ((imake (assoc-ref inputs "imake"))
                  (out (assoc-ref outputs "out")))
              (invoke "xmkmf")
              (substitute* "Makefile"
                ;; These imake variables somehow remain undefined
                (("DefaultGcc2[[:graph:]]*Opt") "-O2")
                ;; Reset a few variable defaults that are set in imake templates
                ((imake) out)
                (("(MANPATH = )[[:graph:]]*" _ front)
                 (string-append front out "/share/man"))))))
        (add-after 'xmkmf 'make-includes
          (lambda _
            (invoke "make" "includes")))
        (add-after 'install 'install/doc
          (lambda* (#:key outputs #:allow-other-keys)
            (let ((out (assoc-ref outputs "out")))
              (lambda _
                (invoke "make"
                        (string-append "MANDIR=" out "/share/man")
                        "install.man"))))))))
    (home-page "http://www.jmknoble.net/software/x11-ssh-askpass/")
    (synopsis "Lightweight passphrase dialog for SSH")
    (description "An X11-based pass-phrase dialog for use with OpenSSH.")
    (license license:gpl2+)))