blob: b26845012c37303d798e03fa31b9e351a40c36dc (
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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
|
(define-module (dnie)
#:use-module (guix packages)
#:use-module (guix gexp)
#:use-module (guix download)
#:use-module (gnu packages elf)
#:use-module (gnu packages gcc)
#:use-module (gnu packages pth)
#:use-module (gnu packages gnupg)
#:use-module (gnu packages security-token)
#:use-module (guix build-system copy)
#:use-module (guix build-system gnu)
#:use-module ((guix licenses) #:prefix license:))
(define-public dnie-cert
(package
(name "dnie-cert")
(version "1.6.8")
(source
(origin
(method url-fetch)
(uri
(string-append
"https://www.dnielectronico.es/descargas/distribuciones_linux/"
"libpkcs11-dnie_" version "_amd64.deb"))
(sha256
(base32
"028v4vv5c2lf5f9iv25838lymh3rsaxv4s9f94g61jn0n8w787c5"))))
(build-system copy-build-system)
(arguments
(list
#:phases
#~(modify-phases %standard-phases
(add-before 'install 'unpack
(lambda _
(invoke "ar" "-x"
(string-append "libpkcs11-dnie_" #$version "_amd64.deb"))
(invoke "tar" "-xvf" "data.tar.xz"))))
#:install-plan
''(("usr/share/libpkcs11-dnie/AC RAIZ DNIE 2.crt"
"/share/libpkcs11-dnie/AC_RAIZ_DNIE_2.crt"))))
(home-page "https://www.dnielectronico.es/PortalDNIe/")
(synopsis "Certs for Spanish DNIe")
(description "Certificate only")
(license
(license:non-copyleft
"https://www.dnielectronico.es/PortalDNIe/"
"Copyright (C) 2010 Dirección General de Policía y de la Guardia Civil
All rights reserved."))))
(define-public libassuan0
(package
(name "libassuan")
(version "2.5.5")
(source
(origin
(method url-fetch)
(uri (string-append "mirror://gnupg/libassuan/libassuan-"
version ".tar.bz2"))
(sha256
(base32
"1r1lvcp67gn5lfrj1g388sd77ca6qwnmxndirdysd71gk362z34f"))))
(build-system gnu-build-system)
(arguments (if (%current-target-system)
(list #:configure-flags
#~(list (string-append
"--with-libgpg-error-prefix="
#$(this-package-input "libgpg-error"))))
'()))
(propagated-inputs
(list libgpg-error pth))
(home-page "https://gnupg.org")
(synopsis
"IPC library used by GnuPG and related software")
(description
"Libassuan is a small library implementing the so-called Assuan
protocol. This protocol is used for IPC between most newer
GnuPG components. Both, server and client side functions are
provided.")
(license license:lgpl2.0+)))
(define-public libpkcs-dnie
(package
(name "libpkcs-dnie")
(version "1.6.8")
(source
(origin
(method url-fetch)
(uri
(string-append
"https://www.dnielectronico.es/descargas/distribuciones_linux/"
"libpkcs11-dnie_" version "_amd64.deb"))
(sha256
(base32
"028v4vv5c2lf5f9iv25838lymh3rsaxv4s9f94g61jn0n8w787c5"))))
(supported-systems (list "x86_64-linux"))
(build-system copy-build-system)
(inputs (list libassuan0 libgpg-error patchelf pcsc-lite (list gcc "lib")))
(arguments
(list
#:phases
#~(modify-phases %standard-phases
(add-before 'install 'unpack
(lambda _
(invoke "ar" "-x"
(string-append "libpkcs11-dnie_" #$version "_amd64.deb"))
(invoke "tar" "-xvf" "data.tar.xz")))
(add-before 'install 'patchelf
(lambda _
(invoke "patchelf" "usr/lib/libpkcs11-dnie-cryptopp.so"
"--set-rpath" (string-append #$gcc:lib "/lib"))
(invoke "patchelf" "usr/lib/libpkcs11-dnie.so"
"--set-rpath" (string-join
(list
#$gcc:lib
#$libassuan0
#$libgpg-error
#$pcsc-lite
#$output)
"/lib:"
'suffix)))))
#:install-plan
''(("usr/lib" "/lib")
("usr/share/doc" "/share/doc")
("usr/share/libpkcs11-dnie/AC RAIZ DNIE 2.crt"
"/share/libpkcs11-dnie/AC_RAIZ_DNIE_2.crt"))))
(home-page "https://www.dnielectronico.es/PortalDNIe/")
(synopsis "Libraries and certs for Spanish DNIe")
(description "After installation you'll need to:
@itemize
@item Install the PKCS#11 module in your browser:
`guix build dnie`/lib/libpkcs11-dnie.so
@item Install the DNIe certificate in your browser
`guix build dnie`/share/libpkcs11-dnie/AC_RAIZ_DNIE_2.crt
@end itemize
NOTE: maybe you just want to use OpenSC instead.")
(license
(license:non-copyleft
"https://www.dnielectronico.es/PortalDNIe/"
"Copyright (C) 2010 Dirección General de Policía y de la Guardia Civil
All rights reserved."))))
|