@@ -1,20 +1,30 @@
11{ stdenv, fetchFromGitHub
22, autoreconfHook, pkgconfig
3−, gtk3, nssTools, pcsclite }:
3+, gtk3, nssTools, pcsclite
4+, libxml2, libproxy
5+, openssl, curl
6+, makeWrapper }:
47
58stdenv.mkDerivation rec {
69 name = "eid-mw-${version}";
7− version = "4.1.19";
10+ version = "4.4.1";
811
912 src = fetchFromGitHub {
10− sha256 = "191c74kxfrfb894v8y4vi2iygyffjy9jjq5fj7cnnddgwai5n3c5";
13+ sha256 = "0an7xgj5rzl75kq6qfrmm886v639hhlh7c9yfs8iihc47wghpma8";
1114 rev = "v${version}";
1215 repo = "eid-mw";
1316 owner = "Fedict";
1417 };
1518
16− nativeBuildInputs = [ autoreconfHook pkgconfig ];
17− buildInputs = [ gtk3 pcsclite ];
19+ nativeBuildInputs = [ autoreconfHook pkgconfig makeWrapper ];
20+ buildInputs = [ gtk3 pcsclite libxml2 libproxy curl openssl ];
21+ preConfigure = ''
22+ mkdir openssl
23+ ln -s ${openssl.out}/lib openssl
24+ ln -s ${openssl.bin}/bin openssl
25+ ln -s ${openssl.dev}/include openssl
26+ export SSL_PREFIX=$(realpath openssl)
27+ '';
1828
1929 postPatch = ''
2030 sed 's@m4_esyscmd_s(.*,@[${version}],@' -i configure.ac
@@ -22,41 +32,48 @@ stdenv.mkDerivation rec {
2232
2333 configureFlags = [ "--enable-dialogs=yes" ];
2434
25− enableParallelBuilding = true;
26−
27− doCheck = true;
28−
2935 postInstall = ''
3036 install -D ${./eid-nssdb.in} $out/bin/eid-nssdb
3137 substituteInPlace $out/bin/eid-nssdb \
3238 --replace "modutil" "${nssTools}/bin/modutil"
3339
34− # Only provides a useless "about-eid-mw.desktop" that segfaults anyway:
35− rm -r $out/share/applications $out/bin/about-eid-mw
40+ rm $out/bin/about-eid-mw
41+ wrapProgram $out/bin/eid-viewer --prefix XDG_DATA_DIRS : "$out/share/gsettings-schemas/$name"
3642 '';
3743
44+ enableParallelBuilding = true;
45+
46+ doCheck = true;
47+
3848 meta = with stdenv.lib; {
3949 description = "Belgian electronic identity card (eID) middleware";
4050 homepage = http://eid.belgium.be/en/using_your_eid/installing_the_eid_software/linux/;
4151 license = licenses.lgpl3;
4252 longDescription = ''
4353 Allows user authentication and digital signatures with Belgian ID cards.
44− Also requires a running pcscd service and compatible card reader.
54+ Also requires a running pcscd service and compatible card reader.
55+
56+ eid-viewer is also installed.
4557
58+ **TO FIX:**
59+ The procedure below did not work for me, I had to install the .so directly in firefox as instructed at
60+ https://eid.belgium.be/en/log-eid#7507
61+ and specify
62+ /run/current-system/sw/lib/libbeidpkcs11.so
63+ as the path to the module.
64+
65+ This package only installs the libraries. To use eIDs in Firefox or
66+ Chromium, the eID Belgium add-on must be installed.
4667 This package only installs the libraries. To use eIDs in NSS-compatible
4768 browsers like Chrom{e,ium} or Firefox, each user must first execute:
48−
4969 ~$ eid-nssdb add
50−
5170 (Running the script once as root with the --system option enables eID
5271 support for all users, but will *not* work when using Chrom{e,ium}!)
53−
5472 Before uninstalling this package, it is a very good idea to run
55−
5673 ~$ eid-nssdb [--system] remove
57−
5874 and remove all ~/.pki and/or /etc/pki directories no longer needed.
5975 '';
6076 platforms = platforms.linux;
77+ maintainers = with maintainers; [ bfortz ];
6178 };
6279}