@@ -15,7 +15,6 @@
1515, noto-fonts-emoji
1616
1717# Extensions, common
18−, unzip
1918, zip
2019
2120# HTTPS Everywhere
@@ -36,139 +35,9 @@ let
3635 sha256 = "0j37mqldj33fnzghxifvy6v8vdwkcz0i4z81prww64md5s8qcsa9";
3736 };
3837
39− # Each extension drv produces an output comprising an unpacked .xpi
40− # named after the extension uuid, as it would appear under
41− # `firefox/extensions'.
42− firefoxExtensions = {
43− https-everywhere = stdenv.mkDerivation rec {
44− name = "https-everywhere-${version}";
45− version = "5.2.21";
46−
47− extid = "https-everywhere-eff@eff.org";
48−
49− src = fetchgit {
50− url = "https://git.torproject.org/https-everywhere.git";
51− rev = "refs/tags/${version}";
52− sha256 = "0z9madihh4b4z4blvfmh6w1hsv8afyi0x7b243nciq9r4w55xgfa";
53− };
54−
55− nativeBuildInputs = [
56− git
57− libxml2 # xmllint
58− python27
59− python27Packages.lxml
60− rsync
61− unzip
62− zip
63− ];
64−
65− unpackPhase = ''
66− cp -dR --no-preserve=mode "$src" src
67− cd src
68− '';
69−
70− # Beware: the build expects translations/ to be non-empty (which it
71− # will be with submodules initialized).
72− buildPhase = ''
73− $shell ./makexpi.sh ${version} --no-recurse
74− '';
75−
76− installPhase = ''
77− mkdir $out
78− unzip -d "$out/$extid" "pkg/https-everywhere-$version-eff.xpi"
79− '';
80−
81− meta = {
82− homepage = https://gitweb.torproject.org/https-everywhere.git/;
83− };
84− };
85−
86− noscript = stdenv.mkDerivation rec {
87− name = "noscript-${version}";
88− version = "5.0.10";
89−
90− extid = "{73a6fe31-595d-460b-a920-fcc0f8843232}";
91−
92− src = fetchurl {
93− url = "https://secure.informaction.com/download/releases/noscript-${version}.xpi";
94− sha256 = "18k5karbaj5mhd9cyjbqgik6044bw88rjalkh6anjanxbn503j6g";
95− };
96−
97− nativeBuildInputs = [ unzip ];
98−
99− unpackPhase = ":";
100−
101− installPhase = ''
102− mkdir $out
103− unzip -d "$out/$extid" "$src"
104− '';
105− };
106−
107− torbutton = stdenv.mkDerivation rec {
108− name = "torbutton-${version}";
109− version = "1.9.8.1";
110−
111− extid = "torbutton@torproject.org";
112−
113− src = fetchgit {
114− url = "https://git.torproject.org/torbutton.git";
115− rev = "refs/tags/${version}";
116− sha256 = "1amp0c9ky0a7fsa0bcbi6n6ginw7s2g3an4rj7kvc1lxmrcsm65l";
117− };
118−
119− nativeBuildInputs = [ unzip zip ];
120−
121− unpackPhase = ''
122− cp -dR --no-preserve=mode "$src" src
123− cd src
124− '';
125−
126− buildPhase = ''
127− $shell ./makexpi.sh
128− '';
129−
130− installPhase = ''
131− mkdir $out
132− unzip -d "$out/$extid" "pkg/torbutton-$version.xpi"
133− '';
134−
135− meta = {
136− homepage = https://gitweb.torproject.org/torbutton.git/;
137− };
138− };
139−
140− tor-launcher = stdenv.mkDerivation rec {
141− name = "tor-launcher-${version}";
142− version = "0.2.12.3";
143−
144− extid = "tor-launcher@torproject.org";
145−
146− src = fetchgit {
147− url = "https://git.torproject.org/tor-launcher.git";
148− rev = "refs/tags/${version}";
149− sha256 = "0126x48pjiy2zm4l8jzhk70w24hviaz560ffp4lb9x0ar615bc9q";
150− };
151−
152− nativeBuildInputs = [ unzip zip ];
153−
154− unpackPhase = ''
155− cp -dR --no-preserve=mode "$src" src
156− cd src
157− '';
158−
159− buildPhase = ''
160− make package
161− '';
162−
163− installPhase = ''
164− mkdir $out
165− unzip -d "$out/$extid" "pkg/tor-launcher-$version.xpi"
166− '';
167−
168− meta = {
169− homepage = https://gitweb.torproject.org/tor-launcher.git/;
170− };
171− };
38+ firefoxExtensions = import ./extensions.nix {
39+ inherit stdenv fetchurl fetchgit zip
40+ git libxml2 python27 python27Packages rsync;
17241 };
17342
17443 extensionsEnv = symlinkJoin {