nixos-config/fix-firefox.nix

37 lines
886 B
Nix
Raw Normal View History

{ config, pkgs, ... }:
# unreserve ctrl+w shortcuts
{
nixpkgs.config.packageOverrides = pkgs: with pkgs; {
firefox-unwrapped = stdenv.mkDerivation {
inherit (firefox-unwrapped) name version;
2020-08-31 14:45:04 +00:00
nativeBuildInputs = [ unzip zip ];
buildCommand = ''
mkdir -p $out
cp -ra ${firefox-unwrapped}/. $out/.
chmod +w -R $out
2020-08-31 08:58:55 +00:00
sed -i "s|${firefox-unwrapped}|$out|g" $out/bin/firefox
j=$out/lib/firefox/browser/omni.ja
f=localization/en-US/browser/browserSets.ftl
2020-08-31 14:45:04 +00:00
mkdir browser
cd browser
unzip $j
patch $f <${./fix-firefox.patch}
2020-08-31 14:45:04 +00:00
rm $j
zip -0DXqr $j *
'';
inherit (firefox-unwrapped) meta;
passthru = {
inherit (firefox-unwrapped.passthru) version isFirefox3Like gtk
nspr gssSupport browserName ffmpegSupport gtk3;
};
};
};
}