{ stdenv, fetchzip, firefox-bin, revision, system, throwSystem, }: let download = (import ./browser-downloads.nix { name = "firefox"; inherit revision; }).${system} or throwSystem; firefox-linux = stdenv.mkDerivation { name = "playwright-firefox"; src = fetchzip { inherit (download) url stripRoot; hash = { x86_64-linux = "sha256-kfXBssU8pJbBqEUQkgpUFXaskx95OyQEYXDhe6cteR8="; aarch64-linux = "sha256-OMPpE0VUgZ65cPOZ7f3sfQMaI++lp6B/RBmhH0E7Y9k="; } .${system} or throwSystem; }; inherit (firefox-bin.unwrapped) nativeBuildInputs buildInputs runtimeDependencies appendRunpaths patchelfFlags ; buildPhase = '' mkdir -p $out/firefox cp -R . $out/firefox ''; }; firefox-darwin = fetchzip { inherit (download) url stripRoot; hash = { x86_64-darwin = "sha256-OfNmamn82tJ8+eY6DC8a3AynmhObZ8E0GTegF8l7km4="; aarch64-darwin = "sha256-WEYhmqGhGvO47i/OICJgXyqj64Wt52juJDEe7nD7HXU="; } .${system} or throwSystem; }; in { x86_64-linux = firefox-linux; aarch64-linux = firefox-linux; x86_64-darwin = firefox-darwin; aarch64-darwin = firefox-darwin; } .${system} or throwSystem