forked from MarceColl/zen-browser-flake
-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathflake.nix
53 lines (49 loc) · 1.55 KB
/
flake.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
{
description = "Flake that provides Zen Browser binaries wrapped and patched for NixOS.";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
};
outputs =
{
nixpkgs,
...
}:
let
supportedSystems = [
"x86_64-linux"
"aarch64-linux"
];
forAllSystems = nixpkgs.lib.genAttrs supportedSystems;
in
{
packages = forAllSystems (
system:
let
pkgs = import nixpkgs { inherit system; };
sources = builtins.fromJSON (builtins.readFile ./sources.json);
in
rec {
zen-browser-unwrapped = pkgs.callPackage ./zen-browser-unwrapped.nix {
inherit (sources.${system}) hash url;
inherit (sources) version;
};
zen-browser = pkgs.callPackage ./zen-browser.nix { inherit zen-browser-unwrapped; };
zen-browser-generic = builtins.trace "WARNING: Zen upstream no longer differentiates between specific and generic builds, this package is kept for flake backwards-compatibility only. Please use the default `zen-browser` package instead." zen-browser;
default = zen-browser;
}
);
apps = forAllSystems (
system:
let
pkgs = import nixpkgs { inherit system; };
in
{
update = {
type = "app";
program = "${pkgs.callPackage ./update-scripts { }}/bin/commit-update.nu";
};
}
);
formatter = forAllSystems (system: nixpkgs.legacyPackages.${system}.nixfmt-rfc-style);
};
}