firefox: support for PKCS#11 modules in wrapper

This commit is contained in:
Charlotte Van Petegem 2020-07-04 10:04:30 +02:00
parent d800d1e884
commit 49dba9c90b

View file

@ -27,6 +27,7 @@ let
, nameSuffix ? ""
, icon ? browserName
, extraNativeMessagingHosts ? []
, pkcs11Modules ? []
, forceWayland ? false
, useGlvnd ? true
, cfg ? config.${browserName} or {}
@ -74,7 +75,8 @@ let
++ lib.optionals (cfg.enableQuakeLive or false)
(with xorg; [ stdenv.cc libX11 libXxf86dga libXxf86vm libXext libXt alsaLib zlib ])
++ lib.optional (enableAdobeFlash && (cfg.enableAdobeFlashDRM or false)) hal-flash
++ lib.optional (config.pulseaudio or true) libpulseaudio;
++ lib.optional (config.pulseaudio or true) libpulseaudio
++ pkcs11Modules;
gtk_modules = [ libcanberra-gtk2 ];
in stdenv.mkDerivation {
@ -154,6 +156,11 @@ let
ln -sLt $out/lib/mozilla/native-messaging-hosts $ext/lib/mozilla/native-messaging-hosts/*
done
mkdir -p $out/lib/mozilla/pkcs11-modules
for ext in ${toString pkcs11Modules}; do
ln -sLt $out/lib/mozilla/pkcs11-modules $ext/lib/mozilla/pkcs11-modules/*
done
# For manpages, in case the program supplies them
mkdir -p $out/nix-support
echo ${browser} > $out/nix-support/propagated-user-env-packages