guix-glicid/glicid/packages/ssh.scm

105 lines
4.3 KiB
Scheme
Raw Permalink Normal View History

2021-11-02 21:06:24 +01:00
(define-module (glicid packages ssh)
2023-01-02 11:18:12 +01:00
#:use-module (guix packages)
#:use-module (guix download)
#:use-module (guix git-download)
#:use-module (guix build-system gnu)
#:use-module (guix build-system cmake)
#:use-module ((guix licenses)
#:prefix license:)
#:use-module (gnu packages ssh)
#:use-module (gnu packages hurd)
#:use-module (gnu packages tls)
#:use-module (gnu packages compression)
#:use-module (gnu packages pkg-config)
#:use-module (gnu packages linux)
#:use-module (gnu packages security-token))
(define-public libcbor-0.8.0
2023-01-02 11:18:12 +01:00
(package
(name "libcbor")
(version "0.8.0")
(source (origin
(method url-fetch)
(uri (string-append
"http://github.com/PJK/libcbor/archive/refs/tags/v"
version ".tar.gz"))
(sha256
(base32
"12vw46ahhsc3ydnivkv5lvk1cn4sjjmcr639cjcl99d4dqb9g031"))))
(build-system cmake-build-system)
(arguments
`(#:configure-flags (list "-DCMAKE_CXX_FLAGS=-fPIE"
"-DCMAKE_C_FLAGS=-fPIE")))
(synopsis "libfido2")
(description "Todo")
(home-page "toto")
(license license:gpl2+)))
2021-11-02 21:06:24 +01:00
(define-public libcbor-0.9.0
2023-01-02 11:18:12 +01:00
(package
(inherit libcbor-0.8.0)
(version "0.9.0")
(source (origin
(method url-fetch)
(uri (string-append
"http://github.com/PJK/libcbor/archive/refs/tags/v"
version ".tar.gz"))
(sha256
(base32
"1l8m7h84zwlx088gkz6gvg2fq11g0p3q6lblwba8c01y6gwy90fs"))))))
2021-11-02 21:06:24 +01:00
2023-01-02 11:18:12 +01:00
(define-public libcbor-latest
libcbor-0.9.0)
2021-11-02 21:06:24 +01:00
2023-01-02 11:18:12 +01:00
(define-public openssh-with-fido2
;this is has to be worked again
(package
(inherit openssh)
(name "openssh-with-fido2")
(arguments
`(#:test-target "tests"
#:make-flags '("REGRESSTMP=\"$${BUILDDIR}/regress\"")
#:configure-flags `("--sysconfdir=/etc/ssh"
"--with-default-path=/run/current-system/profile/bin"
,(string-append "--with-kerberos5="
(assoc-ref %build-inputs "mit-krb5")
"/bin")
"--with-libedit"
"--with-security-key-builtin"
,,@(if (hurd-target?)
'()
'("--with-pam"))
,,@(if (%current-target-system)
'("--disable-strip")
'()))
#:phases (modify-phases %standard-phases
(add-after 'configure 'reset-/var/empty
(lambda* (#:key outputs #:allow-other-keys)
(let ((out (assoc-ref outputs "out")))
(substitute* "Makefile"
(("PRIVSEP_PATH=/var/empty")
(string-append "PRIVSEP_PATH=" out "/var/empty")))
#t)))
(add-before 'check 'patch-tests
(lambda _
(substitute* "regress/test-exec.sh"
(("/bin/sh")
(which "sh")))
(substitute* (list "Makefile" "regress/Makefile")
(("^(tests:.*) t-exec(.*)" all pre post)
(string-append pre post))) #t))
(replace 'install
(lambda* (#:key outputs
(make-flags '()) #:allow-other-keys)
(apply invoke "make" "install-nosysconf" make-flags)
(install-file "contrib/ssh-copy-id"
(string-append (assoc-ref outputs "out")
"/bin/"))
(chmod (string-append (assoc-ref outputs "out")
"/bin/ssh-copy-id") #o555)
(install-file "contrib/ssh-copy-id.1"
(string-append (assoc-ref outputs "out")
"/share/man/man1/")) #t)))))
(inputs `(("libfido2" ,libfido2)
("libcbor" ,libcbor)
,@(package-inputs openssh)))))