commit 215d3b79572e35c741e31d5f7f0812a9e9b8739c
parent 93a042f201548878418f966ae1f13a3d5c9fd8d8
Author: Leah (ctucx) <leah@ctu.cx>
Date: Sat, 7 May 2022 13:32:37 +0200
parent 93a042f201548878418f966ae1f13a3d5c9fd8d8
Author: Leah (ctucx) <leah@ctu.cx>
Date: Sat, 7 May 2022 13:32:37 +0200
pkgs/macApps/Firefox: start with MOZ_LEGACY_PROFILES=1
1 file changed, 21 insertions(+), 3 deletions(-)
diff --git a/pkgs/macApps/Firefox.nix b/pkgs/macApps/Firefox.nix @@ -1,6 +1,11 @@ -{ stdenv, fetchurl, undmg, ... }: +{ stdenv, fetchurl, undmg, runCommand, ... }: let + codesign = runCommand "codesign-build-symlinks" {} '' + mkdir -p $out/bin + ln -s /usr/bin/codesign $out/bin + ''; + FirefoxIcon = fetchurl { name = "Firefox.icns"; url = "https://media.macosicons.com/parse/files/macOSicons/3e2e434eb31e1d096e4fe6d87857ad0b_Firefox.icns"; @@ -10,14 +15,27 @@ let in stdenv.mkDerivation rec { pname = "Firefox"; version = "98.0.2"; + buildInputs = [ undmg ]; + nativeBuildInputs = [ codesign ]; - buildInputs = [ undmg ]; sourceRoot = "."; - phases = [ "unpackPhase" "installPhase" ]; + phases = [ "unpackPhase" "patchPhase" "installPhase" ]; + + patchPhase = '' + substituteInPlace ./Firefox.app/Contents/Info.plist --replace " <key>SYSTEM_VERSION_COMPAT</key> + <string>0</string>" " <key>SYSTEM_VERSION_COMPAT</key> + <string>0</string> + <key>MOZ_LEGACY_PROFILES</key> + <string>1</string>" + ''; + installPhase = '' mkdir -p "$out/Applications" cp -r Firefox.app "$out/Applications/Firefox.app" cp -r ${FirefoxIcon} "$out/Applications/Firefox.app/Contents/Resources/firefox.icns" + + + codesign --remove-signature "$out/Applications/Firefox.app" ''; src = fetchurl {