nixpkgs/pkgs/tools/security/chrome-token-signing/default.nix

39 lines
1.2 KiB
Nix
Raw Normal View History

{ lib, mkDerivation, fetchFromGitHub, qmake, pcsclite, pkg-config, opensc }:
2018-11-08 15:37:18 +00:00
mkDerivation rec {
pname = "chrome-token-signing";
2021-08-09 15:40:37 +00:00
version = "1.1.5";
2018-11-08 15:37:18 +00:00
src = fetchFromGitHub {
owner = "open-eid";
repo = "chrome-token-signing";
rev = "v${version}";
2021-08-09 15:40:37 +00:00
sha256 = "sha256-wKy/RVR7jx5AkMJgHXsuV+jlzyfH5nDRggcIUgh2ML4=";
2018-11-08 15:37:18 +00:00
};
2021-01-17 03:51:22 +00:00
buildInputs = [ qmake pcsclite pkg-config ];
2018-11-08 15:37:18 +00:00
dontUseQmakeConfigure = true;
patchPhase = ''
substituteInPlace host-linux/ee.ria.esteid.json --replace /usr $out
# TODO: macos
substituteInPlace host-shared/PKCS11Path.cpp \
--replace opensc-pkcs11.so ${opensc}/lib/pkcs11/opensc-pkcs11.so
2018-11-08 15:37:18 +00:00
'';
installPhase = ''
install -D -t $out/bin host-linux/chrome-token-signing
# TODO: wire these up
install -D -t $out/etc/chromium/native-messaging-hosts host-linux/ee.ria.esteid.json
install -D -t $out/lib/mozilla/native-messaging-hosts host-linux/ff/ee.ria.esteid.json
'';
2020-01-29 09:33:58 +00:00
meta = with lib; {
2020-01-29 09:33:58 +00:00
description = "Chrome and Firefox extension for signing with your eID on the web";
homepage = "https://github.com/open-eid/chrome-token-signing/wiki";
license = licenses.lgpl21;
maintainers = [ maintainers.mmahut ];
platforms = platforms.linux;
};
2018-11-08 15:37:18 +00:00
}