-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathoverlay.nix
102 lines (83 loc) · 2.8 KB
/
overlay.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
self: super:
let
sources = builtins.fromJSON (builtins.readFile ./sources.json);
firefoxPackage = edition:
super.stdenv.mkDerivation rec {
inherit (sources."${edition}") version;
pname = "Firefox";
buildInputs = [ super.pkgs.undmg ];
sourceRoot = ".";
phases = [ "unpackPhase" "installPhase" ];
installPhase = ''
runHook preInstall
mkdir -p $out/Applications
cp -r Firefox*.app "$out/Applications/"
runHook postInstall
'';
src = super.fetchurl {
name = "Firefox-${version}.dmg";
inherit (sources."${edition}") url sha256;
};
meta = {
description = "Mozilla Firefox, free web browser (binary package)";
homepage = "http://www.mozilla.com/en-US/firefox/";
};
};
floorpPackage = edition:
super.stdenv.mkDerivation rec {
inherit (sources."${edition}") version;
pname = "Floorp";
buildInputs = [ super.pkgs._7zz ];
sourceRoot = ".";
phases = [ "unpackPhase" "installPhase" ];
unpackPhase = ''
runHook preUnpack
7zz x "$src" -o"$sourceRoot"
runHook postUnpack
'';
installPhase = ''
runHook preInstall
mkdir -p $out/Applications
cp -r Floorp.app "$out/Applications/"
runHook postInstall
'';
src = super.fetchurl {
name = "Floorp-${version}.dmg";
inherit (sources."${edition}") url sha256;
};
meta = {
description = "Floorp is a new Firefox based browser from Japan with excellent privacy & flexibility.";
homepage = "https://floorp.app/en";
};
};
librewolfPackage = edition:
super.stdenv.mkDerivation rec {
inherit (sources."${edition}") version;
pname = "Librewolf";
buildInputs = [ super.pkgs.undmg ];
sourceRoot = ".";
phases = [ "unpackPhase" "installPhase" ];
installPhase = ''
runHook preInstall
mkdir -p $out/Applications
cp -r LibreWolf.app "$out/Applications/"
runHook postInstall
'';
src = super.fetchurl {
name = "Librewolf-${version}.dmg";
inherit (sources."${edition}") url sha256;
};
meta = {
description = "Mozilla Firefox, free web browser (binary package)";
homepage = "http://www.mozilla.com/en-US/firefox/";
};
};
in {
firefox-bin = firefoxPackage "firefox";
firefox-beta-bin = firefoxPackage "firefox-beta";
firefox-devedition-bin = firefoxPackage "firefox-devedition";
firefox-esr-bin = firefoxPackage "firefox-esr";
firefox-nightly-bin = firefoxPackage "firefox-nightly";
librewolf = if super.pkgs.system == "x86_64-darwin" then librewolfPackage "librewolf-x86_64" else librewolfPackage "librewolf-arm64";
floorp-bin = floorpPackage "floorp-x86_64";
}