gnu: pam-mount: Use G-expressions.

* gnu/packages/admin.scm (pam-mount)[arguments]:
Rewrite as G-expressions.
This commit is contained in:
Tobias Geerinckx-Rice 2022-10-30 02:00:01 +01:00
parent 7174391cac
commit 63d2348aaa
No known key found for this signature in database
GPG key ID: 0DB0FF884F556D79

View file

@ -4634,34 +4634,35 @@ (define-public pam-mount
(base32 "0832nh2qf9pisgwnbgx6hkylx5d7i416l19y3ly4ifv7k1p7mxqa"))))
(build-system gnu-build-system)
(arguments
`(#:configure-flags
(list (string-append "--with-slibdir=" %output "/lib")
(string-append "--with-ssbindir=" %output "/sbin"))
#:phases
(modify-phases %standard-phases
(add-after 'unpack 'patch-file-names
(lambda* (#:key inputs outputs #:allow-other-keys)
(let ((out (assoc-ref outputs "out")))
(substitute* "src/mtcrypt.c"
(("\"(mount|umount)\";" _ command)
(format #f "\"~a\";"
(search-input-file inputs
(string-append "bin/" command))))
(("\"(fsck)\"," _ command)
(format #f "\"~a\","
(search-input-file inputs
(string-append "sbin/" command)))))
(substitute* "src/rdconf1.c"
(("\"(mount|umount)\", \"" _ command)
(format #f "\"~a\", \""
(search-input-file inputs
(string-append "bin/" command))))
(("\"(fsck)\", \"" _ command)
(format #f "\"~a\", \""
(search-input-file inputs
(string-append "sbin/" command))))
(("\"pmvarrun\", \"")
(format #f "\"~a/sbin/pmvarrun\", \"" out)))))))))
(list
#:configure-flags
#~(list (string-append "--with-slibdir=" #$output "/lib")
(string-append "--with-ssbindir=" #$output "/sbin"))
#:phases
#~(modify-phases %standard-phases
(add-after 'unpack 'patch-file-names
(lambda* (#:key inputs outputs #:allow-other-keys)
(let ((out (assoc-ref outputs "out")))
(substitute* "src/mtcrypt.c"
(("\"(mount|umount)\";" _ command)
(format #f "\"~a\";"
(search-input-file inputs
(string-append "bin/" command))))
(("\"(fsck)\"," _ command)
(format #f "\"~a\","
(search-input-file inputs
(string-append "sbin/" command)))))
(substitute* "src/rdconf1.c"
(("\"(mount|umount)\", \"" _ command)
(format #f "\"~a\", \""
(search-input-file inputs
(string-append "bin/" command))))
(("\"(fsck)\", \"" _ command)
(format #f "\"~a\", \""
(search-input-file inputs
(string-append "sbin/" command))))
(("\"pmvarrun\", \"")
(format #f "\"~a/sbin/pmvarrun\", \"" out)))))))))
(native-inputs
(list perl pkg-config))
(inputs