From 3fe4571e27afcecd5cfb72059ece22969fd6f72a Mon Sep 17 00:00:00 2001 From: Arun Isaac Date: Thu, 2 Aug 2018 05:24:37 +0530 Subject: [PATCH 1/2] gnu: pcsc-lite: Link to USB drivers from ccid. * gnu/packages/security-token.scm (pcsc-lite-bootstrap): New variable. (ccid)[inputs]: Remove pcsc-lite. [native-inputs]: Add pcsc-lite-bootstrap. (pcsc-lite)[inputs]: Add ccid. [arguments]: Set --enable-usbdropdir configure flag, linking to USB drivers from ccid. --- gnu/packages/security-token.scm | 27 +++++++++++++++++++++------ 1 file changed, 21 insertions(+), 6 deletions(-) diff --git a/gnu/packages/security-token.scm b/gnu/packages/security-token.scm index 7fdcaaf1e..424f4626e 100644 --- a/gnu/packages/security-token.scm +++ b/gnu/packages/security-token.scm @@ -7,6 +7,7 @@ ;;; Copyright © 2017, 2018 Tobias Geerinckx-Rice ;;; Copyright © 2017 Ricardo Wurmus ;;; Copyright © 2018 Chris Marusich +;;; Copyright © 2018 Arun Isaac ;;; ;;; This file is part of GNU Guix. ;;; @@ -29,6 +30,7 @@ #:use-module (guix packages) #:use-module (guix download) #:use-module (guix git-download) + #:use-module (guix utils) #:use-module (guix build-system gnu) #:use-module (guix build-system glib-or-gtk) #:use-module (gnu packages autotools) @@ -75,11 +77,11 @@ (("/bin/echo") (which "echo"))) #t))))) (native-inputs - `(("perl" ,perl) + `(("pcsc-lite-bootstrap" ,pcsc-lite-bootstrap) ; only required for headers + ("perl" ,perl) ("pkg-config" ,pkg-config))) (inputs - `(("libusb" ,libusb) - ("pcsc-lite" ,pcsc-lite))) + `(("libusb" ,libusb))) (home-page "https://ccid.apdu.fr/") (synopsis "PC/SC driver for USB smart card devices") (description @@ -169,13 +171,16 @@ the low-level development kit for the Yubico YubiKey authentication device.") "1jc9ws5ra6v3plwraqixin0w0wfxj64drahrbkyrrwzghqjjc9ss")))) (build-system gnu-build-system) (arguments - `(#:configure-flags '("--enable-usbdropdir=/var/lib/pcsc/drivers" - "--disable-libsystemd"))) + `(#:configure-flags + (list (string-append "--enable-usbdropdir=" + (assoc-ref %build-inputs "ccid") "/pcsc/drivers") + "--disable-libsystemd"))) (native-inputs `(("perl" ,perl) ; for pod2man ("pkg-config" ,pkg-config))) (inputs - `(("libudev" ,eudev))) + `(("ccid" ,ccid) + ("libudev" ,eudev))) (home-page "https://pcsclite.apdu.fr/") (synopsis "Middleware to access a smart card using PC/SC") (description @@ -186,6 +191,16 @@ from a client application and provide access to the desired reader.") license:isc ; src/strlcat.c src/strlcpy.c license:gpl3+)))) ; src/spy/* +(define pcsc-lite-bootstrap + (package + (inherit pcsc-lite) + (name "pcsc-lite-bootstrap") + (inputs + `(("libudev" ,eudev))) + (arguments + (substitute-keyword-arguments (package-arguments pcsc-lite) + ((#:configure-flags _) '(list "--disable-libsystemd")))))) + (define-public ykclient (package (name "ykclient") -- 2.18.0