1{ stdenv, fetchFromGitHub, autoreconfHook, pkgconfig, zlib, readline, openssl
2, libiconv, pcsclite, libassuan, libXt
3, docbook_xsl, libxslt, docbook_xml_dtd_412
4}:
5
6stdenv.mkDerivation rec {
7 name = "opensc-${version}";
8 version = "0.15.0";
9
10 src = fetchFromGitHub {
11 owner = "OpenSC";
12 repo = "OpenSC";
13 rev = version;
14 sha256 = "16y3ryx606nry2li05hm88bllrragdj3sfl3yh7pf71777n4lsk4";
15 };
16
17 postPatch = ''
18 sed -i 's,$(DESTDIR),$(out),g' etc/Makefile.am
19 '';
20
21 buildInputs = [
22 autoreconfHook pkgconfig zlib readline openssl pcsclite libassuan
23 libXt libxslt libiconv docbook_xml_dtd_412
24 ];
25
26 configureFlags = [
27 "--enable-zlib"
28 "--enable-readline"
29 "--enable-openssl"
30 "--enable-pcsc"
31 "--enable-sm"
32 "--enable-man"
33 "--enable-doc"
34 "--localstatedir=/var"
35 "--sysconfdir=/etc"
36 "--with-xsl-stylesheetsdir=${docbook_xsl}/xml/xsl/docbook"
37 "--with-pcsc-provider=${pcsclite}/lib/libpcsclite.so"
38 ];
39
40 installFlags = [
41 "sysconfdir=\${out}/etc"
42 ];
43
44 meta = with stdenv.lib; {
45 description = "Set of libraries and utilities to access smart cards";
46 homepage = https://github.com/OpenSC/OpenSC/wiki;
47 license = licenses.lgpl21Plus;
48 maintainers = with maintainers; [ viric wkennington ];
49 platforms = platforms.all;
50 };
51}