Closes https://github.com/0xc000022070/zen-browser-flake/issues/123. This makes the flake output more compatible with other icon packs which provide icons under "zen-browser" instead of "zen-${variant}".
24 lines
667 B
Nix
24 lines
667 B
Nix
{
|
|
pkgs ? import <nixpkgs> {},
|
|
system ? pkgs.stdenv.hostPlatform.system,
|
|
}: let
|
|
mkZen = name: entry: let
|
|
variant = (builtins.fromJSON (builtins.readFile ./sources.json)).${entry}.${system};
|
|
in
|
|
pkgs.callPackage ./package.nix {
|
|
inherit name variant;
|
|
};
|
|
in rec {
|
|
beta-unwrapped = mkZen "beta" "beta";
|
|
twilight-unwrapped = mkZen "twilight" "twilight";
|
|
twilight-official-unwrapped = mkZen "twilight" "twilight-official";
|
|
|
|
beta = pkgs.wrapFirefox beta-unwrapped {
|
|
icon = "zen-browser";
|
|
};
|
|
twilight = pkgs.wrapFirefox twilight-unwrapped {};
|
|
twilight-official = pkgs.wrapFirefox twilight-official-unwrapped {};
|
|
|
|
default = beta;
|
|
}
|