2014-11-18 18:12:59 +03:00
|
|
|
{ stdenv, fetchurl, jre, makeWrapper, pcsclite }:
|
|
|
|
|
2015-07-30 19:00:14 +03:00
|
|
|
let
|
2014-11-18 18:12:59 +03:00
|
|
|
# TODO: find out what the version components actually mean, if anything:
|
2015-07-31 05:47:59 +03:00
|
|
|
major = "4.1.4-v4.1.4";
|
|
|
|
minor = "tcm406-270732";
|
|
|
|
version = "${major}-${minor}";
|
2015-07-30 19:00:14 +03:00
|
|
|
in stdenv.mkDerivation rec {
|
2015-07-31 05:47:59 +03:00
|
|
|
name = "eid-viewer-${version}";
|
2014-11-18 18:12:59 +03:00
|
|
|
|
|
|
|
src = fetchurl {
|
2015-07-31 05:47:59 +03:00
|
|
|
url = "http://eid.belgium.be/en/binaries/eid-viewer-${major}.src.tar_${minor}.gz";
|
|
|
|
sha256 = "06kda45y7c3wvvqby153zcasgz4jibjypv8gvfwvrwvn4ag2z934";
|
2014-11-18 18:12:59 +03:00
|
|
|
};
|
|
|
|
|
2015-06-17 20:36:06 +03:00
|
|
|
buildInputs = [ jre pcsclite ];
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
2014-11-18 18:12:59 +03:00
|
|
|
|
|
|
|
unpackPhase = "tar -xzf ${src} --strip-components=1";
|
|
|
|
|
|
|
|
preConfigure = ''
|
|
|
|
substituteInPlace eid-viewer.sh.in --replace "exec java" "exec ${jre}/bin/java"
|
|
|
|
'';
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
wrapProgram $out/bin/eid-viewer --suffix LD_LIBRARY_PATH : ${pcsclite}/lib
|
2015-01-13 23:10:49 +03:00
|
|
|
cat >> $out/share/applications/eid-viewer.desktop << EOF
|
|
|
|
# eid-viewer creates XML without a header, making it "plain text":
|
|
|
|
MimeType=application/xml;text/xml;text/plain
|
|
|
|
EOF
|
2014-11-18 18:12:59 +03:00
|
|
|
'';
|
|
|
|
|
2015-01-20 09:26:48 +03:00
|
|
|
doCheck = true;
|
|
|
|
|
2014-11-18 18:12:59 +03:00
|
|
|
meta = with stdenv.lib; {
|
2015-07-31 05:47:59 +03:00
|
|
|
inherit version;
|
2014-11-18 18:12:59 +03:00
|
|
|
description = "Belgian electronic identity card (eID) viewer";
|
|
|
|
homepage = http://eid.belgium.be/en/using_your_eid/installing_the_eid_software/linux/;
|
2015-05-28 20:20:29 +03:00
|
|
|
license = licenses.lgpl3;
|
2014-11-18 18:12:59 +03:00
|
|
|
longDescription = ''
|
|
|
|
A simple, graphical Java application to view, print and save data from
|
|
|
|
Belgian electronic identity cards. Independent of the eid-mw package,
|
|
|
|
which is required to actually use your eID for authentication or signing.
|
|
|
|
'';
|
|
|
|
maintainers = with maintainers; [ nckx ];
|
|
|
|
platforms = with platforms; linux;
|
|
|
|
};
|
|
|
|
}
|