diff options
Diffstat (limited to '')
4 files changed, 10 insertions, 15 deletions
diff --git a/hm/soispha/conf/firefox/config/extensions/native_messaging_hosts/default.nix b/hm/soispha/conf/firefox/config/extensions/native_messaging_hosts/default.nix index 053b6465..14f4e257 100644 --- a/hm/soispha/conf/firefox/config/extensions/native_messaging_hosts/default.nix +++ b/hm/soispha/conf/firefox/config/extensions/native_messaging_hosts/default.nix @@ -16,10 +16,6 @@ in ++ lib.optional (cfg.enableKeePassXC or false) keepassxc - mkdir -p $out/lib/mozilla/native-messaging-hosts - for ext in ${toString nativeMessagingHosts}; do - ln -sLt $out/lib/mozilla/native-messaging-hosts $ext/lib/mozilla/native-messaging-hosts/* - done */ with pkgs; [ video_pause_ext diff --git a/hm/soispha/conf/firefox/config/extensions/native_messaging_hosts/video-pauser.nix b/hm/soispha/conf/firefox/config/extensions/native_messaging_hosts/video-pauser.nix index a652b596..0c2c5155 100644 --- a/hm/soispha/conf/firefox/config/extensions/native_messaging_hosts/video-pauser.nix +++ b/hm/soispha/conf/firefox/config/extensions/native_messaging_hosts/video-pauser.nix @@ -14,9 +14,9 @@ in */ pkgs.stdenv.mkDerivation { inherit (video-pauser) pname version; - buildInputs = [ - video_pause - ]; + + # FIXME: Don't use the deprecated 'phases' here <2023-10-21> + phases = ["buildPhase"]; buildPhase = '' mkdir -p $out/share/ cat << EOF > $out/share/"${video-pauser.pname}".json @@ -29,18 +29,18 @@ in } EOF - nativeMessagingPaths="$(cat << EOF + nmp="$(mktemp)"; + cat << EOF > "$nmp" lib/mozilla/native-messaging-hosts lib/librewolf/native-messaging-hosts etc/opt/chrome/native-messaging-hosts etc/chromium/native-messaging-hosts etc/vivaldi/native-messaging-hosts EOF - )" - cat "$nativeMessagingPaths" | while read -r path; do + while read -r path; do mkdir -p $out/$path; cp $out/share/"${video-pauser.pname}".json $out/$path/ - done + done < "$nmp" ''; } diff --git a/hm/soispha/conf/firefox/default.nix b/hm/soispha/conf/firefox/default.nix index 7ebcbbb4..15300c0f 100644 --- a/hm/soispha/conf/firefox/default.nix +++ b/hm/soispha/conf/firefox/default.nix @@ -19,7 +19,7 @@ }; engines = (import ./config/search/engines) {inherit pkgs;}; - native_messaging_hosts = (import ./config/extensions/native_messaging_hosts) {inherit pkgs video_pause;}; + native_messaging_hosts = (import ./config/extensions/native_messaging_hosts/default.nix) {inherit pkgs video_pause;}; policies = (import ./config/policies) {inherit config extensions;}; diff --git a/hm/soispha/conf/firefox/package.nix b/hm/soispha/conf/firefox/package.nix index 8f9d09c0..f38c8bbe 100644 --- a/hm/soispha/conf/firefox/package.nix +++ b/hm/soispha/conf/firefox/package.nix @@ -5,11 +5,10 @@ pkgs, # options autoConfig ? "", - extraNativeMassagingHosts ? [], + extraNativeMessagingHosts ? [], wrapperConfig ? {}, extraPolicies ? {}, base_package ? pkgs.firefox, - ... }: let pkg = base_package.override (old: { inherit extraPolicies; @@ -17,7 +16,7 @@ extraNativeMessagingHosts = old.extraNativeMessagingHosts or [] - ++ extraNativeMassagingHosts; + ++ extraNativeMessagingHosts; cfg = let # copy-pasted from the wrapper; TODO: figure out fix applicationName = base_package.binaryName or (lib.getName base_package); |