-
Notifications
You must be signed in to change notification settings - Fork 0
/
flake.nix
103 lines (91 loc) · 3.12 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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
{
description = "Nix flake for Firefox nightly.";
nixConfig = {
flake-registry = https://github.com/calbrecht/f4s-registry/raw/main/flake-registry.json;
};
inputs = {
gecko-dev = {
url = github:mozilla/gecko-dev/04a47c08504e6357a3164163dd19a47754521204;
flake = false;
};
nss-dev = {
url = flake:f4s-nss;
inputs.nixpkgs.follows = "nixpkgs";
};
nspr-dev = {
url = flake:f4s-nspr;
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = { self, nixpkgs, gecko-dev, nss-dev, nspr-dev }:
let
ffversion = "132.0a1-20240908211800";
system = "x86_64-linux";
pkgs = nixpkgs.legacyPackages."${system}";
overrides = {
nss = nss-dev.legacyPackages."${system}".nss-dev;
nspr = nspr-dev.legacyPackages."${system}".nspr-dev;
rust-cbindgen = pkgs.rust-cbindgen.overrideAttrs (old: rec {
name = "rust-cbindgen-${version}";
version = "0.19.0";
src = pkgs.fetchFromGitHub {
owner = "eqrion";
repo = "cbindgen";
rev = "v${version}";
sha256 = "sha256-AGTwjwwHFmQOoCFg7bIu2fcxEYSzeGhmbaHSkulsoxw=";
};
nativeBuildInputs = old.nativeBuildInputs ++ [ pkgs.pythonPackages.cython ];
cargoDeps = old.cargoDeps.overrideAttrs (pkgs.lib.const {
name = "${name}-vendor.tar.gz";
inherit src;
outputHash = "sha256-qOaJVBmeEFdNbgYTW9rtHfwzua+6tSHmDCMeG3EE3GM=";
});
checkFlags = [
# https://github.com/NixOS/nixpkgs/pull/65303
"--skip test_bitfield"
"--skip test_expand"
"--skip test_expand"
"--skip test_expand_default_features"
"--skip test_expand_dep"
"--skip test_expand_dep_v2"
"--skip test_expand_features"
"--skip test_expand_no_default_features"
"--skip lib_default_uses_debug_build"
"--skip lib_explicit_debug_build"
"--skip lib_explicit_release_build"
"--skip bin_explicit_release_build"
];
});
};
in
{
legacyPackages."${system}" = self.overlay self.legacyPackages."${system}" pkgs;
overlay = final: prev: {
firefox-nightly = prev.wrapFirefox final.firefox-nightly-unwrapped {
version = ffversion;
};
firefox-wayland-nightly = prev.wrapFirefox final.firefox-nightly-unwrapped {
version = ffversion;
forceWayland = true;
};
firefox-nightly-unwrapped =
(prev.firefox-unwrapped.override overrides).overrideAttrs (old: rec {
inherit ffversion;
version = ffversion;
name = "firefox-nightly-unwrapped-${ffversion}";
src = gecko-dev;
patches = [
./include-prenv-before-system-dir.patch
]
++ (pkgs.lib.take 1 old.patches)
++ [
./no-buildconfig-ffx90.patch
];
debugBuild = true;
meta = old.meta // {
mainProgram = "firefox";
};
});
};
};
}