From e87b6b93b644f0ae0cad2594c2dad18cc9128bee Mon Sep 17 00:00:00 2001 From: Gabriel Ebner Date: Mon, 31 Aug 2020 10:43:13 +0200 Subject: [PATCH] Patch reserved shortcuts out of firefox. --- common-sw.nix | 4 ++++ fix-firefox.nix | 26 ++++++++++++++++++++++++++ 2 files changed, 30 insertions(+) create mode 100644 fix-firefox.nix diff --git a/common-sw.nix b/common-sw.nix index 4eb473b..e2bd541 100644 --- a/common-sw.nix +++ b/common-sw.nix @@ -1,6 +1,10 @@ { config, pkgs, ... }: { + imports = [ + ./fix-firefox.nix + ]; + environment.systemPackages = with pkgs.haskellPackages; with pkgs; [ gmpc m4 diff --git a/fix-firefox.nix b/fix-firefox.nix new file mode 100644 index 0000000..eb32593 --- /dev/null +++ b/fix-firefox.nix @@ -0,0 +1,26 @@ +{ config, pkgs, ... }: + +# unreserve ctrl+w shortcuts + +{ + nixpkgs.config.packageOverrides = pkgs: with pkgs; { + firefox-unwrapped = stdenv.mkDerivation { + inherit (firefox-unwrapped) name version; + + buildCommand = '' + mkdir -p $out + cp -ra ${firefox-unwrapped}/. $out/. + chmod +w -R $out + sed -i "s|${firefox-unwrapped}|$out|" $out/bin/firefox + sed -i 's/reserved="true"/ /g' $out/lib/firefox/browser/omni.ja + ''; + + inherit (firefox-unwrapped) meta; + passthru = { + inherit (firefox-unwrapped.passthru) version isFirefox3Like gtk + nspr gssSupport browserName ffmpegSupport gtk3; + }; + }; + }; +} +