git.iko.soy/typeable/nixpkgs
on master help sign in
Merge branch 'master' into staging
commitf77801d88d04fe289778f0f5bce926b51356055b authorVladimír Čunát <vcunat@gmail.com> dateSun 6 Nov 2016, 11:26 (10 years ago) parent5ad7cf3329bf83
128 files changed+2221−1587
lib/modules.nix+21−11 lib/options.nix+1−1 lib/types.nix+115−27 nixos/doc/manual/configuration/customizing-packages.xml+14−13 nixos/doc/manual/development/option-declarations.xml+88 nixos/doc/manual/development/option-types.xml+84−32 nixos/doc/manual/release-notes/rl-1703.xml+4−1 nixos/modules/config/debug-info.nix+2−4 nixos/modules/config/shells-environment.nix+1−1 nixos/modules/config/system-environment.nix+1−1 nixos/modules/installer/tools/nixos-option.sh+1−1 nixos/modules/misc/ids.nix+2 nixos/modules/module-list.nix+1 nixos/modules/services/editors/emacs.xml+3−3 nixos/modules/services/games/ghost-one.nix+1−2 nixos/modules/services/logging/logcheck.nix+2−2 nixos/modules/services/misc/leaps.nix+62 nixos/modules/services/misc/taskserver/default.nix+2−2 nixos/modules/services/networking/bitlbee.nix+1−6 nixos/modules/services/networking/dnscrypt-proxy.nix+95−27 nixos/modules/services/networking/i2pd.nix+211−19 nixos/modules/services/networking/tinc.nix+1−1 nixos/modules/services/web-servers/fcgiwrap.nix+1−1 nixos/modules/system/boot/loader/grub/grub.nix+1−2 nixos/modules/tasks/network-interfaces.nix+1−1 nixos/release.nix+1 nixos/tests/dnscrypt-proxy.nix−2 nixos/tests/leaps.nix+29 pkgs/applications/audio/audacity/default.nix+2−2 pkgs/applications/audio/ladspa-plugins/default.nix+20−13 pkgs/applications/audio/ladspa-plugins/git.nix−28 pkgs/applications/audio/snd/default.nix+2−2 pkgs/applications/editors/emacs-modes/stratego/builder.sh−4 pkgs/applications/editors/emacs-modes/stratego/default.nix−10 pkgs/applications/networking/esniper/default.nix+3−3 pkgs/applications/networking/instant-messengers/discord/default.nix+2−2 pkgs/applications/networking/siproxd/cheaders.patch+3−2 pkgs/applications/networking/siproxd/default.nix+3−3 pkgs/applications/science/biology/pal2nal/default.nix−31 pkgs/applications/science/biology/paml/default.nix+5−5 pkgs/applications/virtualization/remotebox/default.nix+2−2 pkgs/data/fonts/unifont/default.nix+5−5 pkgs/desktops/kde-5/plasma/kmenuedit.nix+6−3 pkgs/desktops/kde-5/plasma/ksysguard.nix+7−3 pkgs/desktops/kde-5/plasma/libksysguard/default.nix+10−9 pkgs/desktops/kde-5/plasma/oxygen.nix+8−8 pkgs/desktops/kde-5/plasma/plasma-desktop/default.nix+11−11 pkgs/desktops/xfce/panel-plugins/xfce4-whiskermenu-plugin.nix+2−2 pkgs/development/compilers/abc/builder-binjar.sh−4 pkgs/development/compilers/abc/builder.sh−40 pkgs/development/compilers/abc/default.nix−79 pkgs/development/compilers/abc/jasmin/builder.sh−24 pkgs/development/compilers/abc/jasmin/default.nix−14 pkgs/development/compilers/abc/polyglot/builder.sh−11 pkgs/development/compilers/abc/polyglot/default.nix−13 pkgs/development/compilers/abc/soot/builder.sh−19 pkgs/development/compilers/abc/soot/default.nix−14 pkgs/development/compilers/dmd/2.067.1.nix+74 pkgs/development/compilers/dmd/default.nix+11−6 pkgs/development/eclipse/jdt-sdk/builder.sh−7 pkgs/development/eclipse/jdt-sdk/default.nix−15 pkgs/development/haskell-modules/configuration-common.nix+4−3 pkgs/development/haskell-modules/patches/hdbus-semicolons.patch+34 pkgs/development/interpreters/octave/default.nix+4−4 pkgs/development/libraries/clanlib/default.nix−19 pkgs/development/libraries/dxflib/default.nix+2−2 pkgs/development/libraries/fltk/default.nix+2 pkgs/development/libraries/fltk/nsosv.patch+20 pkgs/development/libraries/gsoap/default.nix+3−3 pkgs/development/libraries/iksemel/default.nix−24 pkgs/development/libraries/jasper/default.nix+2−16 pkgs/development/libraries/jasper/jasper-CVE-2014-8137-noabort.diff−16 pkgs/development/libraries/jasper/jasper-CVE-2014-8137-variant2.diff−45 pkgs/development/libraries/jasper/jasper-CVE-2014-8138.diff−16 pkgs/development/libraries/jasper/jasper-CVE-2014-8157.diff−12 pkgs/development/libraries/jasper/jasper-CVE-2014-8158.diff−329 pkgs/development/libraries/jasper/jasper-CVE-2014-9029.diff−31 pkgs/development/libraries/jasper/jasper-CVE-2016-1867.diff−11 pkgs/development/libraries/java/jetty-gwt/default.nix−13 pkgs/development/libraries/java/jetty-util/default.nix−13 pkgs/development/libraries/java/saxon/default.nix+8−3 pkgs/development/libraries/java/saxon/unzip-builder.sh+3 pkgs/development/libraries/kde-frameworks/kimageformats.nix+6−3 pkgs/development/libraries/libgeotiff/default.nix+11−6 pkgs/development/libraries/liblastfmSF/default.nix+3−3 pkgs/development/libraries/minmay/default.nix−19 pkgs/development/libraries/nvidia-texture-tools/default.nix+23−25 pkgs/development/libraries/openjpeg/2.0.nix−8 pkgs/development/libraries/qjson/default.nix+8−5 pkgs/development/libraries/qt-5/5.6/default.nix+1−1 pkgs/development/libraries/qt-5/5.6/qtwebengine/chromium-clang-update-py.patch+874 pkgs/development/libraries/qt-5/5.6/qtwebengine.nix → pkgs/development/libraries/qt-5/5.6/qtwebengine/default.nix+3 pkgs/development/libraries/science/math/openblas/default.nix+1−1 pkgs/development/libraries/v8/3.16.14.nix+3−2 pkgs/development/ocaml-modules/astring/default.nix+43 pkgs/development/tools/build-managers/dub/default.nix+2−2 pkgs/development/tools/build-managers/remake/default.nix+5−3 pkgs/development/tools/leaps/default.nix+9−9 pkgs/development/tools/leaps/deps.nix+87−4 pkgs/development/tools/misc/xc3sprog/default.nix+2−2 pkgs/development/tools/selenium/remote-control/default.nix−49 pkgs/games/0ad/data.nix+1 pkgs/games/steam/chrootenv.nix+1 pkgs/games/tintin/default.nix+2−2 pkgs/os-specific/linux/cryopid/default.nix−39 pkgs/os-specific/linux/light/default.nix+6−3 pkgs/os-specific/linux/mcelog/default.nix+2−2 pkgs/os-specific/linux/ttysnoop/default.nix−38 pkgs/os-specific/linux/ttysnoop/default.upstream−3 pkgs/servers/felix/remoteshell.nix+6−5 pkgs/tools/compression/zstd/default.nix+2−2 pkgs/tools/filesystems/fuse-zip/default.nix−23 pkgs/tools/filesystems/fuse-zip/libzip.patch−24 pkgs/tools/misc/cowsay/default.nix+6−5 pkgs/tools/misc/g500-control/default.nix−34 pkgs/tools/misc/graylog/default.nix+2−2 pkgs/tools/misc/mcrl/default.nix−14 pkgs/tools/misc/youtube-dl/default.nix+2−2 pkgs/tools/networking/i2pd/default.nix+2−2 pkgs/tools/text/xml/jing-trang/default.nix+41 pkgs/tools/text/xml/jing/default.nix−22 pkgs/tools/text/xml/jing/unzip-builder.sh−14 pkgs/tools/text/xml/trang/builder.sh−15 pkgs/tools/text/xml/trang/default.nix−24 pkgs/top-level/aliases.nix−1 pkgs/top-level/all-packages.nix+18−52 pkgs/top-level/ocaml-packages.nix+2 pkgs/top-level/python-packages.nix+43−3
lib/modules.nix+21−11
@@ -231,12 +231,20 @@ rec {
231231 correspond to the definition of 'loc' in 'opt.file'. */
232232 mergeOptionDecls = loc: opts:
233233 foldl' (res: opt:
234− if opt.options ? default && res ? default ||
235− opt.options ? example && res ? example ||
236− opt.options ? description && res ? description ||
237− opt.options ? apply && res ? apply ||
238− # Accept to merge options which have identical types.
239− opt.options ? type && res ? type && opt.options.type.name != res.type.name
234+ let t = res.type;
235+ t' = opt.options.type;
236+ mergedType = t.typeMerge t'.functor;
237+ typesMergeable = mergedType != null;
238+ typeSet = if (bothHave "type") && typesMergeable
239+ then { type = mergedType; }
240+ else {};
241+ bothHave = k: opt.options ? ${k} && res ? ${k};
242+ in
243+ if bothHave "default" ||
244+ bothHave "example" ||
245+ bothHave "description" ||
246+ bothHave "apply" ||
247+ (bothHave "type" && (! typesMergeable))
240248 then
241249 throw "The option `${showOption loc}' in `${opt.file}' is already declared in ${showFiles res.declarations}."
242250 else
@@ -258,7 +266,7 @@ rec {
258266 in opt.options // res //
259267 { declarations = res.declarations ++ [opt.file];
260268 options = submodules;
261− }
269+ } // typeSet
262270 ) { inherit loc; declarations = []; options = []; } opts;
263271
264272 /* Merge all the definitions of an option to produce the final
@@ -422,12 +430,14 @@ rec {
422430 options = opt.options or
423431 (throw "Option `${showOption loc'}' has type optionSet but has no option attribute, in ${showFiles opt.declarations}.");
424432 f = tp:
433+ let optionSetIn = type: (tp.name == type) && (tp.functor.wrapped.name == "optionSet");
434+ in
425435 if tp.name == "option set" || tp.name == "submodule" then
426436 throw "The option ${showOption loc} uses submodules without a wrapping type, in ${showFiles opt.declarations}."
427− else if tp.name == "attribute set of option sets" then types.attrsOf (types.submodule options)
428− else if tp.name == "list or attribute set of option sets" then types.loaOf (types.submodule options)
429− else if tp.name == "list of option sets" then types.listOf (types.submodule options)
430− else if tp.name == "null or option set" then types.nullOr (types.submodule options)
437+ else if optionSetIn "attrsOf" then types.attrsOf (types.submodule options)
438+ else if optionSetIn "loaOf" then types.loaOf (types.submodule options)
439+ else if optionSetIn "listOf" then types.listOf (types.submodule options)
440+ else if optionSetIn "nullOr" then types.nullOr (types.submodule options)
431441 else tp;
432442 in
433443 if opt.type.getSubModules or null == null
lib/options.nix+1−1
@@ -92,7 +92,7 @@ rec {
9292 internal = opt.internal or false;
9393 visible = opt.visible or true;
9494 readOnly = opt.readOnly or false;
95− type = opt.type.name or null;
95+ type = opt.type.description or null;
9696 }
9797 // (if opt ? example then { example = scrubOptionValue opt.example; } else {})
9898 // (if opt ? default then { default = scrubOptionValue opt.default; } else {})
lib/types.nix+115−27
@@ -17,10 +17,43 @@ rec {
1717 };
1818
1919
20+ # Default type merging function
21+ # takes two type functors and return the merged type
22+ defaultTypeMerge = f: f':
23+ let wrapped = f.wrapped.typeMerge f'.wrapped.functor;
24+ payload = f.binOp f.payload f'.payload;
25+ in
26+ # cannot merge different types
27+ if f.name != f'.name
28+ then null
29+ # simple types
30+ else if (f.wrapped == null && f'.wrapped == null)
31+ && (f.payload == null && f'.payload == null)
32+ then f.type
33+ # composed types
34+ else if (f.wrapped != null && f'.wrapped != null) && (wrapped != null)
35+ then f.type wrapped
36+ # value types
37+ else if (f.payload != null && f'.payload != null) && (payload != null)
38+ then f.type payload
39+ else null;
40+
41+ # Default type functor
42+ defaultFunctor = name: {
43+ inherit name;
44+ type = types."${name}" or null;
45+ wrapped = null;
46+ payload = null;
47+ binOp = a: b: null;
48+ };
49+
2050 isOptionType = isType "option-type";
2151 mkOptionType =
22− { # Human-readable representation of the type.
52+ { # Human-readable representation of the type, should be equivalent to
53+ # the type function name.
2354 name
55+ , # Description of the type, defined recursively by embedding the the wrapped type if any.
56+ description ? null
2457 , # Function applied to each definition that should return true if
2558 # its type-correct, false otherwise.
2659 check ? (x: true)
@@ -36,12 +69,26 @@ rec {
3669 getSubOptions ? prefix: {}
3770 , # List of modules if any, or null if none.
3871 getSubModules ? null
39− , # Function for building the same option type with a different list of
72+ , # Function for building the same option type with a different list of
4073 # modules.
4174 substSubModules ? m: null
75+ , # Function that merge type declarations.
76+ # internal, takes a functor as argument and returns the merged type.
77+ # returning null means the type is not mergeable
78+ typeMerge ? defaultTypeMerge functor
79+ , # The type functor.
80+ # internal, representation of the type as an attribute set.
81+ # name: name of the type
82+ # type: type function.
83+ # wrapped: the type wrapped in case of compound types.
84+ # payload: values of the type, two payloads of the same type must be
85+ # combinable with the binOp binary operation.
86+ # binOp: binary operation that merge two payloads of the same type.
87+ functor ? defaultFunctor name
4288 }:
4389 { _type = "option-type";
44− inherit name check merge getSubOptions getSubModules substSubModules;
90+ inherit name check merge getSubOptions getSubModules substSubModules typeMerge functor;
91+ description = if description == null then name else description;
4592 };
4693
4794
@@ -52,29 +99,39 @@ rec {
5299 };
53100
54101 bool = mkOptionType {
55− name = "boolean";
102+ name = "bool";
103+ description = "boolean";
56104 check = isBool;
57105 merge = mergeEqualOption;
58106 };
59107
60− int = mkOptionType {
61− name = "integer";
108+ int = mkOptionType rec {
109+ name = "int";
110+ description = "integer";
62111 check = isInt;
63112 merge = mergeOneOption;
64113 };
65114
66115 str = mkOptionType {
67− name = "string";
116+ name = "str";
117+ description = "string";
68118 check = isString;
69119 merge = mergeOneOption;
70120 };
71121
72122 # Merge multiple definitions by concatenating them (with the given
73123 # separator between the values).
74− separatedString = sep: mkOptionType {
75− name = "string";
124+ separatedString = sep: mkOptionType rec {
125+ name = "separatedString";
126+ description = "string";
76127 check = isString;
77128 merge = loc: defs: concatStringsSep sep (getValues defs);
129+ functor = (defaultFunctor name) // {
130+ payload = sep;
131+ binOp = sepLhs: sepRhs:
132+ if sepLhs == sepRhs then sepLhs
133+ else null;
134+ };
78135 };
79136
80137 lines = separatedString "\n";
@@ -86,7 +143,8 @@ rec {
86143 string = separatedString "";
87144
88145 attrs = mkOptionType {
89− name = "attribute set";
146+ name = "attrs";
147+ description = "attribute set";
90148 check = isAttrs;
91149 merge = loc: foldl' (res: def: mergeAttrs res def.value) {};
92150 };
@@ -114,8 +172,9 @@ rec {
114172 # drop this in the future:
115173 list = builtins.trace "`types.list' is deprecated; use `types.listOf' instead" types.listOf;
116174
117− listOf = elemType: mkOptionType {
118− name = "list of ${elemType.name}s";
175+ listOf = elemType: mkOptionType rec {
176+ name = "listOf";
177+ description = "list of ${elemType.description}s";
119178 check = isList;
120179 merge = loc: defs:
121180 map (x: x.value) (filter (x: x ? value) (concatLists (imap (n: def:
@@ -132,10 +191,12 @@ rec {
132191 getSubOptions = prefix: elemType.getSubOptions (prefix ++ ["*"]);
133192 getSubModules = elemType.getSubModules;
134193 substSubModules = m: listOf (elemType.substSubModules m);
194+ functor = (defaultFunctor name) // { wrapped = elemType; };
135195 };
136196
137− attrsOf = elemType: mkOptionType {
138− name = "attribute set of ${elemType.name}s";
197+ attrsOf = elemType: mkOptionType rec {
198+ name = "attrsOf";
199+ description = "attribute set of ${elemType.description}s";
139200 check = isAttrs;
140201 merge = loc: defs:
141202 mapAttrs (n: v: v.value) (filterAttrs (n: v: v ? value) (zipAttrsWith (name: defs:
@@ -147,6 +208,7 @@ rec {
147208 getSubOptions = prefix: elemType.getSubOptions (prefix ++ ["<name>"]);
148209 getSubModules = elemType.getSubModules;
149210 substSubModules = m: attrsOf (elemType.substSubModules m);
211+ functor = (defaultFunctor name) // { wrapped = elemType; };
150212 };
151213
152214 # List or attribute set of ...
@@ -165,18 +227,21 @@ rec {
165227 def;
166228 listOnly = listOf elemType;
167229 attrOnly = attrsOf elemType;
168− in mkOptionType {
169− name = "list or attribute set of ${elemType.name}s";
230+ in mkOptionType rec {
231+ name = "loaOf";
232+ description = "list or attribute set of ${elemType.description}s";
170233 check = x: isList x || isAttrs x;
171234 merge = loc: defs: attrOnly.merge loc (imap convertIfList defs);
172235 getSubOptions = prefix: elemType.getSubOptions (prefix ++ ["<name?>"]);
173236 getSubModules = elemType.getSubModules;
174237 substSubModules = m: loaOf (elemType.substSubModules m);
238+ functor = (defaultFunctor name) // { wrapped = elemType; };
175239 };
176240
177241 # List or element of ...
178− loeOf = elemType: mkOptionType {
179− name = "element or list of ${elemType.name}s";
242+ loeOf = elemType: mkOptionType rec {
243+ name = "loeOf";
244+ description = "element or list of ${elemType.description}s";
180245 check = x: isList x || elemType.check x;
181246 merge = loc: defs:
182247 let
@@ -189,18 +254,22 @@ rec {
189254 else if !isString res then
190255 throw "The option `${showOption loc}' does not have a string value, in ${showFiles (getFiles defs)}."
191256 else res;
257+ functor = (defaultFunctor name) // { wrapped = elemType; };
192258 };
193259
194− uniq = elemType: mkOptionType {
195− inherit (elemType) name check;
260+ uniq = elemType: mkOptionType rec {
261+ name = "uniq";
262+ inherit (elemType) description check;
196263 merge = mergeOneOption;
197264 getSubOptions = elemType.getSubOptions;
198265 getSubModules = elemType.getSubModules;
199266 substSubModules = m: uniq (elemType.substSubModules m);
267+ functor = (defaultFunctor name) // { wrapped = elemType; };
200268 };
201269
202− nullOr = elemType: mkOptionType {
203− name = "null or ${elemType.name}";
270+ nullOr = elemType: mkOptionType rec {
271+ name = "nullOr";
272+ description = "null or ${elemType.description}";
204273 check = x: x == null || elemType.check x;
205274 merge = loc: defs:
206275 let nrNulls = count (def: def.value == null) defs; in
@@ -211,6 +280,7 @@ rec {
211280 getSubOptions = elemType.getSubOptions;
212281 getSubModules = elemType.getSubModules;
213282 substSubModules = m: nullOr (elemType.substSubModules m);
283+ functor = (defaultFunctor name) // { wrapped = elemType; };
214284 };
215285
216286 submodule = opts:
@@ -236,6 +306,12 @@ rec {
236306 args = { name = ""; }; }).options;
237307 getSubModules = opts';
238308 substSubModules = m: submodule m;
309+ functor = (defaultFunctor name) // {
310+ # Merging of submodules is done as part of mergeOptionDecls, as we have to annotate
311+ # each submodule with its location.
312+ payload = [];
313+ binOp = lhs: rhs: [];
314+ };
239315 };
240316
241317 enum = values:
@@ -245,23 +321,35 @@ rec {
245321 else if builtins.isInt v then builtins.toString v
246322 else ''<${builtins.typeOf v}>'';
247323 in
248− mkOptionType {
249− name = "one of ${concatMapStringsSep ", " show values}";
324+ mkOptionType rec {
325+ name = "enum";
326+ description = "one of ${concatMapStringsSep ", " show values}";
250327 check = flip elem values;
251328 merge = mergeOneOption;
329+ functor = (defaultFunctor name) // { payload = values; binOp = a: b: unique (a ++ b); };
252330 };
253331
254− either = t1: t2: mkOptionType {
255− name = "${t1.name} or ${t2.name}";
332+ either = t1: t2: mkOptionType rec {
333+ name = "either";
334+ description = "${t1.description} or ${t2.description}";
256335 check = x: t1.check x || t2.check x;
257336 merge = mergeOneOption;
337+ typeMerge = f':
338+ let mt1 = t1.typeMerge (elemAt f'.wrapped 0).functor;
339+ mt2 = t2.typeMerge (elemAt f'.wrapped 1).functor;
340+ in
341+ if (name == f'.name) && (mt1 != null) && (mt2 != null)
342+ then functor.type mt1 mt2
343+ else null;
344+ functor = (defaultFunctor name) // { wrapped = [ t1 t2 ]; };
258345 };
259346
260347 # Obsolete alternative to configOf. It takes its option
261348 # declarations from the ‘options’ attribute of containing option
262349 # declaration.
263350 optionSet = mkOptionType {
264− name = builtins.trace "types.optionSet is deprecated; use types.submodule instead" "option set";
351+ name = builtins.trace "types.optionSet is deprecated; use types.submodule instead" "optionSet";
352+ description = "option set";
265353 };
266354
267355 # Augment the given type with an additional type check function.
nixos/doc/manual/configuration/customizing-packages.xml+14−13
@@ -42,29 +42,30 @@ construction, so without them,
4242elements.)</para>
4343
4444<para>Even greater customisation is possible using the function
45−<varname>overrideDerivation</varname>. While the
45+<varname>overrideAttrs</varname>. While the
4646<varname>override</varname> mechanism above overrides the arguments of
47−a package function, <varname>overrideDerivation</varname> allows
48−changing the <emphasis>result</emphasis> of the function. This
49−permits changing any aspect of the package, such as the source code.
47+a package function, <varname>overrideAttrs</varname> allows
48+changing the <emphasis>attributes</emphasis> passed to <literal>mkDerivation</literal>.
49+This permits changing any aspect of the package, such as the source code.
5050For instance, if you want to override the source code of Emacs, you
5151can say:
5252
5353<programlisting>
54−environment.systemPackages =
55− [ (pkgs.lib.overrideDerivation pkgs.emacs (attrs: {
56− name = "emacs-25.0-pre";
57− src = /path/to/my/emacs/tree;
58− }))
59− ];
54+environment.systemPackages = [
55+ (pkgs.emacs.overrideAttrs (oldAttrs: {
56+ name = "emacs-25.0-pre";
57+ src = /path/to/my/emacs/tree;
58+ }))
59+];
6060</programlisting>
6161
62−Here, <varname>overrideDerivation</varname> takes the Nix derivation
62+Here, <varname>overrideAttrs</varname> takes the Nix derivation
6363specified by <varname>pkgs.emacs</varname> and produces a new
6464derivation in which the original’s <literal>name</literal> and
6565<literal>src</literal> attribute have been replaced by the given
66−values. The original attributes are accessible via
67−<varname>attrs</varname>.</para>
66+values by re-calling <literal>stdenv.mkDerivation</literal>.
67+The original attributes are accessible via the function argument,
68+which is conventionally named <varname>oldAttrs</varname>.</para>
6869
6970<para>The overrides shown above are not global. They do not affect
7071the original package; other packages in Nixpkgs continue to depend on
nixos/doc/manual/development/option-declarations.xml+88
@@ -65,4 +65,92 @@ options = {
6565
6666</para>
6767
68+<section xml:id="sec-option-declarations-eot"><title>Extensible Option
69+ Types</title>
70+
71+ <para>Extensible option types is a feature that allow to extend certain types
72+ declaration through multiple module files.
73+ This feature only work with a restricted set of types, namely
74+ <literal>enum</literal> and <literal>submodules</literal> and any composed
75+ forms of them.</para>
76+
77+ <para>Extensible option types can be used for <literal>enum</literal> options
78+ that affects multiple modules, or as an alternative to related
79+ <literal>enable</literal> options.</para>
80+
81+ <para>As an example, we will take the case of display managers. There is a
82+ central display manager module for generic display manager options and a
83+ module file per display manager backend (slim, kdm, gdm ...).
84+ </para>
85+
86+ <para>There are two approach to this module structure:
87+
88+ <itemizedlist>
89+ <listitem><para>Managing the display managers independently by adding an
90+ enable option to every display manager module backend. (NixOS)</para>
91+ </listitem>
92+ <listitem><para>Managing the display managers in the central module by
93+ adding an option to select which display manager backend to use.</para>
94+ </listitem>
95+ </itemizedlist>
96+ </para>
97+
98+ <para>Both approachs have problems.</para>
99+
100+ <para>Making backends independent can quickly become hard to manage. For
101+ display managers, there can be only one enabled at a time, but the type
102+ system can not enforce this restriction as there is no relation between
103+ each backend <literal>enable</literal> option. As a result, this restriction
104+ has to be done explicitely by adding assertions in each display manager
105+ backend module.</para>
106+
107+ <para>On the other hand, managing the display managers backends in the
108+ central module will require to change the central module option every time
109+ a new backend is added or removed.</para>
110+
111+ <para>By using extensible option types, it is possible to create a placeholder
112+ option in the central module (<xref linkend='ex-option-declaration-eot-service'
113+ />), and to extend it in each backend module (<xref
114+ linkend='ex-option-declaration-eot-backend-slim' />, <xref
115+ linkend='ex-option-declaration-eot-backend-kdm' />).</para>
116+
117+ <para>As a result, <literal>displayManager.enable</literal> option values can
118+ be added without changing the main service module file and the type system
119+ automatically enforce that there can only be a single display manager
120+ enabled.</para>
121+
122+<example xml:id='ex-option-declaration-eot-service'><title>Extensible type
123+ placeholder in the service module</title>
124+<screen>
125+services.xserver.displayManager.enable = mkOption {
126+ description = "Display manager to use";
127+ type = with types; nullOr (enum [ ]);
128+};</screen></example>
129+
130+<example xml:id='ex-option-declaration-eot-backend-slim'><title>Extending
131+ <literal>services.xserver.displayManager.enable</literal> in the
132+ <literal>slim</literal> module</title>
133+<screen>
134+services.xserver.displayManager.enable = mkOption {
135+ type = with types; nullOr (enum [ "slim" ]);
136+};</screen></example>
137+
138+<example xml:id='ex-option-declaration-eot-backend-kdm'><title>Extending
139+ <literal>services.foo.backend</literal> in the <literal>kdm</literal>
140+ module</title>
141+<screen>
142+services.xserver.displayManager.enable = mkOption {
143+ type = with types; nullOr (enum [ "kdm" ]);
144+};</screen></example>
145+
146+<para>The placeholder declaration is a standard <literal>mkOption</literal>
147+ declaration, but it is important that extensible option declarations only use
148+ the <literal>type</literal> argument.</para>
149+
150+<para>Extensible option types work with any of the composed variants of
151+ <literal>enum</literal> such as
152+ <literal>with types; nullOr (enum [ "foo" "bar" ])</literal>
153+ or <literal>with types; listOf (enum [ "foo" "bar" ])</literal>.</para>
154+
155+</section>
68156</section>
nixos/doc/manual/development/option-types.xml+84−32
@@ -62,23 +62,45 @@
6262 <listitem><para>A string. Multiple definitions are concatenated with a
6363 collon <literal>":"</literal>.</para></listitem>
6464 </varlistentry>
65+</variablelist>
66+
67+ </section>
68+
69+ <section><title>Value Types</title>
70+
71+ <para>Value types are type that take a value parameter. The only value type
72+ in the library is <literal>enum</literal>.</para>
73+
74+<variablelist>
6575 <varlistentry>
66− <term><varname>types.separatedString</varname>
76+ <term><varname>types.enum</varname> <replaceable>l</replaceable></term>
77+ <listitem><para>One element of the list <replaceable>l</replaceable>, e.g.
78+ <literal>types.enum [ "left" "right" ]</literal>. Multiple definitions
79+ cannot be merged.</para></listitem>
80+ </varlistentry>
81+ <varlistentry>
82+ <term><varname>types.separatedString</varname>
6783 <replaceable>sep</replaceable></term>
68− <listitem><para>A string with a custom separator
69− <replaceable>sep</replaceable>, e.g. <literal>types.separatedString
84+ <listitem><para>A string with a custom separator
85+ <replaceable>sep</replaceable>, e.g. <literal>types.separatedString
7086 "|"</literal>.</para></listitem>
7187 </varlistentry>
88+ <varlistentry>
89+ <term><varname>types.submodule</varname> <replaceable>o</replaceable></term>
90+ <listitem><para>A set of sub options <replaceable>o</replaceable>.
91+ <replaceable>o</replaceable> can be an attribute set or a function
92+ returning an attribute set. Submodules are used in composed types to
93+ create modular options. Submodule are detailed in <xref
94+ linkend='section-option-types-submodule' />.</para></listitem>
95+ </varlistentry>
7296</variablelist>
73−
7497 </section>
7598
7699 <section><title>Composed Types</title>
77100
78− <para>Composed types allow to create complex types by taking another type(s)
79− or value(s) as parameter(s).
80− It is possible to compose types multiple times, e.g. <literal>with types;
81− nullOr (enum [ "left" "right" ])</literal>.</para>
101+ <para>Composed types are types that take a type as parameter. <literal>listOf
102+ int</literal> and <literal>either int str</literal> are examples of
103+ composed types.</para>
82104
83105<variablelist>
84106 <varlistentry>
@@ -99,12 +121,6 @@
99121 type. Multiple definitions are merged according to the
100122 value.</para></listitem>
101123 </varlistentry>
102− <varlistentry>
103− <term><varname>types.loeOf</varname> <replaceable>t</replaceable></term>
104− <listitem><para>A list or an element of <replaceable>t</replaceable> type.
105− Multiple definitions are merged according to the
106− values.</para></listitem>
107− </varlistentry>
108124 <varlistentry>
109125 <term><varname>types.nullOr</varname> <replaceable>t</replaceable></term>
110126 <listitem><para><literal>null</literal> or type
@@ -117,12 +133,6 @@
117133 merged. It is used to ensure option definitions are declared only
118134 once.</para></listitem>
119135 </varlistentry>
120− <varlistentry>
121− <term><varname>types.enum</varname> <replaceable>l</replaceable></term>
122− <listitem><para>One element of the list <replaceable>l</replaceable>, e.g.
123− <literal>types.enum [ "left" "right" ]</literal>. Multiple definitions
124− cannot be merged</para></listitem>
125− </varlistentry>
126136 <varlistentry>
127137 <term><varname>types.either</varname> <replaceable>t1</replaceable>
128138 <replaceable>t2</replaceable></term>
@@ -131,14 +141,6 @@
131141 str</literal>. Multiple definitions cannot be
132142 merged.</para></listitem>
133143 </varlistentry>
134− <varlistentry>
135− <term><varname>types.submodule</varname> <replaceable>o</replaceable></term>
136− <listitem><para>A set of sub options <replaceable>o</replaceable>.
137− <replaceable>o</replaceable> can be an attribute set or a function
138− returning an attribute set. Submodules are used in composed types to
139− create modular options. Submodule are detailed in <xref
140− linkend='section-option-types-submodule' />.</para></listitem>
141− </varlistentry>
142144</variablelist>
143145
144146</section>
@@ -197,7 +199,6 @@ options.mod = mkOption {
197199 type = with types; listOf (submodule modOptions);
198200};</screen></example>
199201
200−
201202<section><title>Composed with <literal>listOf</literal></title>
202203
203204 <para>When composed with <literal>listOf</literal>, submodule allows multiple
@@ -323,9 +324,13 @@ code before creating a new type.</para>
323324<variablelist>
324325 <varlistentry>
325326 <term><varname>name</varname></term>
326− <listitem><para>A string representation of the type function name, name
327− usually changes accordingly parameters passed to
328− types.</para></listitem>
327+ <listitem><para>A string representation of the type function
328+ name.</para></listitem>
329+ </varlistentry>
330+ <varlistentry>
331+ <term><varname>definition</varname></term>
332+ <listitem><para>Description of the type used in documentation. Give
333+ information of the type and any of its arguments.</para></listitem>
329334 </varlistentry>
330335 <varlistentry>
331336 <term><varname>check</varname></term>
@@ -388,6 +393,53 @@ code before creating a new type.</para>
388393 type parameter, this function should be defined as <literal>m:
389394 composedType (elemType.substSubModules m)</literal>.</para></listitem>
390395 </varlistentry>
396+ <varlistentry>
397+ <term><varname>typeMerge</varname></term>
398+ <listitem><para>A function to merge multiple type declarations. Takes the
399+ type to merge <literal>functor</literal> as parameter. A
400+ <literal>null</literal> return value means that type cannot be
401+ merged.</para>
402+ <variablelist>
403+ <varlistentry>
404+ <term><replaceable>f</replaceable></term>
405+ <listitem><para>The type to merge
406+ <literal>functor</literal>.</para></listitem>
407+ </varlistentry>
408+ </variablelist>
409+ <para>Note: There is a generic <literal>defaultTypeMerge</literal> that
410+ work with most of value and composed types.</para>
411+ </listitem>
412+ </varlistentry>
413+ <varlistentry>
414+ <term><varname>functor</varname></term>
415+ <listitem><para>An attribute set representing the type. It is used for type
416+ operations and has the following keys:</para>
417+ <variablelist>
418+ <varlistentry>
419+ <term><varname>type</varname></term>
420+ <listitem><para>The type function.</para></listitem>
421+ </varlistentry>
422+ <varlistentry>
423+ <term><varname>wrapped</varname></term>
424+ <listitem><para>Holds the type parameter for composed types.</para>
425+ </listitem>
426+ </varlistentry>
427+ <varlistentry>
428+ <term><varname>payload</varname></term>
429+ <listitem><para>Holds the value parameter for value types.
430+ The types that have a <literal>payload</literal> are the
431+ <literal>enum</literal>, <literal>separatedString</literal> and
432+ <literal>submodule</literal> types.</para></listitem>
433+ </varlistentry>
434+ <varlistentry>
435+ <term><varname>binOp</varname></term>
436+ <listitem><para>A binary operation that can merge the payloads of two
437+ same types. Defined as a function that take two payloads as
438+ parameters and return the payloads merged.</para></listitem>
439+ </varlistentry>
440+ </variablelist>
441+ </listitem>
442+ </varlistentry>
391443</variablelist>
392444
393445</section>
nixos/doc/manual/release-notes/rl-1703.xml+4−1
@@ -75,7 +75,10 @@ following incompatible changes:</para>
7575
7676<itemizedlist>
7777 <listitem>
78− <para></para>
78+ <para>Module type system have a new extensible option types feature that
79+ allow to extend certain types, such as enum, through multiple option
80+ declarations of the same option across multiple modules.
81+ </para>
7982 </listitem>
8083</itemizedlist>
8184
nixos/modules/config/debug-info.nix+2−4
@@ -17,12 +17,10 @@ with lib;
1717 where tools such as <command>gdb</command> can find them.
1818 If you need debug symbols for a package that doesn't
1919 provide them by default, you can enable them as follows:
20− <!-- FIXME: ugly, see #10721 -->
2120 <programlisting>
2221 nixpkgs.config.packageOverrides = pkgs: {
23− hello = pkgs.lib.overrideDerivation pkgs.hello (attrs: {
24− outputs = attrs.outputs or ["out"] ++ ["debug"];
25− buildInputs = attrs.buildInputs ++ [&lt;nixpkgs/pkgs/build-support/setup-hooks/separate-debug-info.sh>];
22+ hello = pkgs.hello.overrideAttrs (oldAttrs: {
23+ separateDebugInfo = true;
2624 });
2725 };
2826 </programlisting>
nixos/modules/config/shells-environment.nix+1−1
@@ -41,7 +41,7 @@ in
4141 strings. The latter is concatenated, interspersed with colon
4242 characters.
4343 '';
44− type = types.attrsOf (types.loeOf types.str);
44+ type = with types; attrsOf (either str (listOf str));
4545 apply = mapAttrs (n: v: if isList v then concatStringsSep ":" v else v);
4646 };
4747
nixos/modules/config/system-environment.nix+1−1
@@ -23,7 +23,7 @@ in
2323 strings. The latter is concatenated, interspersed with colon
2424 characters.
2525 '';
26− type = types.attrsOf (types.loeOf types.str);
26+ type = with types; attrsOf (either str (listOf str));
2727 apply = mapAttrs (n: v: if isList v then concatStringsSep ":" v else v);
2828 };
2929
nixos/modules/installer/tools/nixos-option.sh+1−1
@@ -256,7 +256,7 @@ if isOption opt then
256256 // optionalAttrs (opt ? default) { inherit (opt) default; }
257257 // optionalAttrs (opt ? example) { inherit (opt) example; }
258258 // optionalAttrs (opt ? description) { inherit (opt) description; }
259− // optionalAttrs (opt ? type) { typename = opt.type.name; }
259+ // optionalAttrs (opt ? type) { typename = opt.type.description; }
260260 // optionalAttrs (opt ? options) { inherit (opt) options; }
261261 // {
262262 # to disambiguate the xml output.
nixos/modules/misc/ids.nix+2
@@ -277,6 +277,7 @@
277277 gitlab-runner = 257;
278278 postgrey = 258;
279279 hound = 259;
280+ leaps = 260;
280281
281282 # When adding a uid, make sure it doesn't match an existing gid. And don't use uids above 399!
282283
@@ -524,6 +525,7 @@
524525 gitlab-runner = 257;
525526 postgrey = 258;
526527 hound = 259;
528+ leaps = 260;
527529
528530 # When adding a gid, make sure it doesn't match an existing
529531 # uid. Users and groups with the same name should have equal
nixos/modules/module-list.nix+1
@@ -251,6 +251,7 @@
251251 ./services/misc/gitolite.nix
252252 ./services/misc/gpsd.nix
253253 ./services/misc/ihaskell.nix
254+ ./services/misc/leaps.nix
254255 ./services/misc/mantisbt.nix
255256 ./services/misc/mathics.nix
256257 ./services/misc/matrix-synapse.nix
nixos/modules/services/editors/emacs.xml+3−3
@@ -356,14 +356,14 @@ https://nixos.org/nixpkgs/manual/#sec-modify-via-packageOverrides
356356 <programlisting><![CDATA[
357357{ pkgs ? import <nixpkgs> {} }:
358358let
359− myEmacs = pkgs.lib.overrideDerivation (pkgs.emacs.override {
359+ myEmacs = (pkgs.emacs.override {
360360 # Use gtk3 instead of the default gtk2
361361 withGTK3 = true;
362362 withGTK2 = false;
363− }) (attrs: {
363+ }).overrideAttrs (attrs: {
364364 # I don't want emacs.desktop file because I only use
365365 # emacsclient.
366− postInstall = attrs.postInstall + ''
366+ postInstall = (attrs.postInstall or "") + ''
367367 rm $out/share/applications/emacs.desktop
368368 '';
369369 });
nixos/modules/services/games/ghost-one.nix+1−2
@@ -21,8 +21,7 @@ in
2121
2222 language = mkOption {
2323 default = "English";
24− type = types.addCheck types.str
25− (lang: elem lang [ "English" "Spanish" "Russian" "Serbian" "Turkish" ]);
24+ type = types.enum [ "English" "Spanish" "Russian" "Serbian" "Turkish" ];
2625 description = "The language of bot messages: English, Spanish, Russian, Serbian or Turkish.";
2726 };
2827
nixos/modules/services/logging/logcheck.nix+2−2
@@ -55,9 +55,9 @@ let
5555
5656 levelOption = mkOption {
5757 default = "server";
58− type = types.str;
58+ type = types.enum [ "workstation" "server" "paranoid" ];
5959 description = ''
60− Set the logcheck level. Either "workstation", "server", or "paranoid".
60+ Set the logcheck level.
6161 '';
6262 };
6363
nixos/modules/services/misc/leaps.nixnew file+62
@@ -0,0 +1,62 @@
1+{ config, pkgs, lib, ... } @ args:
2+
3+with lib;
4+
5+let
6+ cfg = config.services.leaps;
7+ stateDir = "/var/lib/leaps/";
8+in
9+{
10+ options = {
11+ services.leaps = {
12+ enable = mkEnableOption "leaps";
13+ port = mkOption {
14+ type = types.int;
15+ default = 8080;
16+ description = "A port where leaps listens for incoming http requests";
17+ };
18+ address = mkOption {
19+ default = "";
20+ type = types.str;
21+ example = "127.0.0.1";
22+ description = "Hostname or IP-address to listen to. By default it will listen on all interfaces.";
23+ };
24+ path = mkOption {
25+ default = "/";
26+ type = types.path;
27+ description = "Subdirectory used for reverse proxy setups";
28+ };
29+ };
30+ };
31+
32+ config = mkIf cfg.enable {
33+ users = {
34+ users.leaps = {
35+ uid = config.ids.uids.leaps;
36+ description = "Leaps server user";
37+ group = "leaps";
38+ home = stateDir;
39+ createHome = true;
40+ };
41+
42+ groups.leaps = {
43+ gid = config.ids.gids.leaps;
44+ };
45+ };
46+
47+ systemd.services.leaps = {
48+ description = "leaps service";
49+ wantedBy = [ "multi-user.target" ];
50+ after = [ "network.target" ];
51+
52+ serviceConfig = {
53+ User = "leaps";
54+ Group = "leaps";
55+ Restart = "on-failure";
56+ WorkingDirectory = stateDir;
57+ PrivateTmp = true;
58+ ExecStart = "${pkgs.leaps.bin}/bin/leaps -path ${toString cfg.path} -address ${cfg.address}:${toString cfg.port}";
59+ };
60+ };
61+ };
62+}
nixos/modules/services/misc/taskserver/default.nix+2−2
@@ -292,7 +292,7 @@ in {
292292 };
293293
294294 allowedClientIDs = mkOption {
295− type = with types; loeOf (either (enum ["all" "none"]) str);
295+ type = with types; either str (listOf str);
296296 default = [];
297297 example = [ "[Tt]ask [2-9]+" ];
298298 description = ''
@@ -306,7 +306,7 @@ in {
306306 };
307307
308308 disallowedClientIDs = mkOption {
309− type = with types; loeOf (either (enum ["all" "none"]) str);
309+ type = with types; either str (listOf str);
310310 default = [];
311311 example = [ "[Tt]ask [2-9]+" ];
312312 description = ''
nixos/modules/services/networking/bitlbee.nix+1−6
@@ -7,11 +7,6 @@ let
77 cfg = config.services.bitlbee;
88 bitlbeeUid = config.ids.uids.bitlbee;
99
10− authModeCheck = v:
11− v == "Open" ||
12− v == "Closed" ||
13− v == "Registered";
14−
1510 bitlbeeConfig = pkgs.writeText "bitlbee.conf"
1611 ''
1712 [settings]
@@ -67,7 +62,7 @@ in
6762
6863 authMode = mkOption {
6964 default = "Open";
70− type = types.addCheck types.str authModeCheck;
65+ type = types.enum [ "Open" "Closed" "Registered" ];
7166 description = ''
7267 The following authentication modes are available:
7368 Open -- Accept connections from anyone, use NickServ for user authentication.
nixos/modules/services/networking/dnscrypt-proxy.nix+95−27
@@ -5,15 +5,25 @@ let
55 apparmorEnabled = config.security.apparmor.enable;
66 dnscrypt-proxy = pkgs.dnscrypt-proxy;
77 cfg = config.services.dnscrypt-proxy;
8+ stateDirectory = "/var/lib/dnscrypt-proxy";
89
910 localAddress = "${cfg.localAddress}:${toString cfg.localPort}";
1011
11− daemonArgs =
12− [ "--local-address=${localAddress}"
13− (optionalString cfg.tcpOnly "--tcp-only")
14− (optionalString cfg.ephemeralKeys "-E")
15− ]
16− ++ resolverArgs;
12+ # The minisign public key used to sign the upstream resolver list.
13+ # This is somewhat more flexible than preloading the key as an
14+ # embedded string.
15+ upstreamResolverListPubKey = pkgs.fetchurl {
16+ url = https://raw.githubusercontent.com/jedisct1/dnscrypt-proxy/master/minisign.pub;
17+ sha256 = "18lnp8qr6ghfc2sd46nn1rhcpr324fqlvgsp4zaigw396cd7vnnh";
18+ };
19+
20+ # Internal flag indicating whether the upstream resolver list is used
21+ useUpstreamResolverList = cfg.resolverList == null && cfg.customResolver == null;
22+
23+ resolverList =
24+ if (cfg.resolverList != null)
25+ then cfg.resolverList
26+ else "${stateDirectory}/dnscrypt-resolvers.csv";
1727
1828 resolverArgs = if (cfg.customResolver != null)
1929 then
@@ -22,9 +32,16 @@ let
2232 "--provider-key=${cfg.customResolver.key}"
2333 ]
2434 else
25− [ "--resolvers-list=${cfg.resolverList}"
26− "--resolver-name=${toString cfg.resolverName}"
35+ [ "--resolvers-list=${resolverList}"
36+ "--resolver-name=${cfg.resolverName}"
2737 ];
38+
39+ # The final command line arguments passed to the daemon
40+ daemonArgs =
41+ [ "--local-address=${localAddress}" ]
42+ ++ optional cfg.tcpOnly "--tcp-only"
43+ ++ optional cfg.ephemeralKeys "-E"
44+ ++ resolverArgs;
2845in
2946
3047{
@@ -66,24 +83,20 @@ in
6683 default = "dnscrypt.eu-nl";
6784 type = types.nullOr types.str;
6885 description = ''
69− The name of the upstream DNSCrypt resolver to use, taken from the
70− list named in the <literal>resolverList</literal> option.
71− The default resolver is located in Holland, supports DNS security
72− extensions, and claims to not keep logs.
86+ The name of the upstream DNSCrypt resolver to use, taken from
87+ <filename>${resolverList}</filename>. The default resolver is
88+ located in Holland, supports DNS security extensions, and
89+ <emphasis>claims</emphasis> to not keep logs.
7390 '';
7491 };
7592
7693 resolverList = mkOption {
94+ default = null;
95+ type = types.nullOr types.path;
7796 description = ''
78− The list of upstream DNSCrypt resolvers. By default, we use the most
79− recent list published by upstream.
97+ List of DNSCrypt resolvers. The default is to use the list of
98+ public resolvers provided by upstream.
8099 '';
81− example = literalExample "${pkgs.dnscrypt-proxy}/share/dnscrypt-proxy/dnscrypt-resolvers.csv";
82− default = pkgs.fetchurl {
83− url = https://raw.githubusercontent.com/jedisct1/dnscrypt-proxy/master/dnscrypt-resolvers.csv;
84− sha256 = "1i9wzw4zl052h5nyp28bwl8d66cgj0awvjhw5wgwz0warkjl1g8g";
85− };
86− defaultText = "pkgs.fetchurl { url = ...; sha256 = ...; }";
87100 };
88101
89102 customResolver = mkOption {
@@ -150,7 +163,7 @@ in
150163 }
151164 ];
152165
153− security.apparmor.profiles = mkIf apparmorEnabled (singleton (pkgs.writeText "apparmor-dnscrypt-proxy" ''
166+ security.apparmor.profiles = optional apparmorEnabled (pkgs.writeText "apparmor-dnscrypt-proxy" ''
154167 ${dnscrypt-proxy}/bin/dnscrypt-proxy {
155168 /dev/null rw,
156169 /dev/urandom r,
@@ -177,9 +190,9 @@ in
177190 ${getLib pkgs.lz4}/lib/liblz4.so.* mr,
178191 ${getLib pkgs.attr}/lib/libattr.so.* mr,
179192
180− ${cfg.resolverList} r,
193+ ${resolverList} r,
181194 }
182− ''));
195+ '');
183196
184197 users.users.dnscrypt-proxy = {
185198 description = "dnscrypt-proxy daemon user";
@@ -188,11 +201,61 @@ in
188201 };
189202 users.groups.dnscrypt-proxy = {};
190203
204+ systemd.services.init-dnscrypt-proxy-statedir = optionalAttrs useUpstreamResolverList {
205+ description = "Initialize dnscrypt-proxy state directory";
206+ script = ''
207+ mkdir -pv ${stateDirectory}
208+ chown -c dnscrypt-proxy:dnscrypt-proxy ${stateDirectory}
209+ cp --preserve=timestamps -uv \
210+ ${pkgs.dnscrypt-proxy}/share/dnscrypt-proxy/dnscrypt-resolvers.csv \
211+ ${stateDirectory}
212+ '';
213+ serviceConfig = {
214+ Type = "oneshot";
215+ RemainAfterExit = true;
216+ };
217+ };
218+
219+ systemd.services.update-dnscrypt-resolvers = optionalAttrs useUpstreamResolverList {
220+ description = "Update list of DNSCrypt resolvers";
221+
222+ requires = [ "init-dnscrypt-proxy-statedir.service" ];
223+ after = [ "init-dnscrypt-proxy-statedir.service" ];
224+
225+ path = with pkgs; [ curl minisign ];
226+ script = ''
227+ cd ${stateDirectory}
228+ curl -fSsL -o dnscrypt-resolvers.csv.tmp \
229+ https://download.dnscrypt.org/dnscrypt-proxy/dnscrypt-resolvers.csv
230+ curl -fSsL -o dnscrypt-resolvers.csv.minisig.tmp \
231+ https://download.dnscrypt.org/dnscrypt-proxy/dnscrypt-resolvers.csv.minisig
232+ mv dnscrypt-resolvers.csv.minisig{.tmp,}
233+ minisign -q -V -p ${upstreamResolverListPubKey} \
234+ -m dnscrypt-resolvers.csv.tmp -x dnscrypt-resolvers.csv.minisig
235+ mv dnscrypt-resolvers.csv{.tmp,}
236+ '';
237+
238+ serviceConfig = {
239+ PrivateTmp = true;
240+ PrivateDevices = true;
241+ ProtectHome = true;
242+ ProtectSystem = true;
243+ };
244+ };
245+
246+ systemd.timers.update-dnscrypt-resolvers = optionalAttrs useUpstreamResolverList {
247+ timerConfig = {
248+ OnBootSec = "5min";
249+ OnUnitActiveSec = "6h";
250+ };
251+ wantedBy = [ "timers.target" ];
252+ };
253+
191254 systemd.sockets.dnscrypt-proxy = {
192255 description = "dnscrypt-proxy listening socket";
193256 socketConfig = {
194− ListenStream = "${localAddress}";
195− ListenDatagram = "${localAddress}";
257+ ListenStream = localAddress;
258+ ListenDatagram = localAddress;
196259 };
197260 wantedBy = [ "sockets.target" ];
198261 };
@@ -200,8 +263,13 @@ in
200263 systemd.services.dnscrypt-proxy = {
201264 description = "dnscrypt-proxy daemon";
202265
203− after = [ "network.target" ] ++ optional apparmorEnabled "apparmor.service";
204− requires = [ "dnscrypt-proxy.socket "] ++ optional apparmorEnabled "apparmor.service";
266+ after = [ "network.target" ]
267+ ++ optional apparmorEnabled "apparmor.service"
268+ ++ optional useUpstreamResolverList "init-dnscrypt-proxy-statedir.service";
269+
270+ requires = [ "dnscrypt-proxy.socket "]
271+ ++ optional apparmorEnabled "apparmor.service"
272+ ++ optional useUpstreamResolverList "init-dnscrypt-proxy-statedir.service";
205273
206274 serviceConfig = {
207275 Type = "simple";
nixos/modules/services/networking/i2pd.nix+211−19
@@ -10,7 +10,7 @@ let
1010
1111 extip = "EXTIP=\$(${pkgs.curl.bin}/bin/curl -sf \"http://jsonip.com\" | ${pkgs.gawk}/bin/awk -F'\"' '{print $4}')";
1212
13− toYesNo = b: if b then "yes" else "no";
13+ toYesNo = b: if b then "true" else "false";
1414
1515 mkEndpointOpt = name: addr: port: {
1616 enable = mkEnableOption name;
@@ -31,6 +31,17 @@ let
3131 };
3232 };
3333
34+ mkKeyedEndpointOpt = name: addr: port: keyFile:
35+ (mkEndpointOpt name addr port) // {
36+ keys = mkOption {
37+ type = types.str;
38+ default = "";
39+ description = ''
40+ File to persist ${lib.toUpper name} keys.
41+ '';
42+ };
43+ };
44+
3445 commonTunOpts = let
3546 i2cpOpts = {
3647 length = mkOption {
@@ -63,19 +74,49 @@ let
6374 };
6475 } // mkEndpointOpt name "127.0.0.1" 0;
6576
66− i2pdConf = pkgs.writeText "i2pd.conf" ''
67− ipv6 = ${toYesNo cfg.enableIPv6}
68− notransit = ${toYesNo cfg.notransit}
69− floodfill = ${toYesNo cfg.floodfill}
70− ${if isNull cfg.port then "" else "port = ${toString cfg.port}"}
71− ${flip concatMapStrings
72− (collect (proto: proto ? port && proto ? address && proto ? name) cfg.proto)
73− (proto: let portStr = toString proto.port; in ''
74− [${proto.name}]
75− address = ${proto.address}
76− port = ${toString proto.port}
77− enabled = ${toYesNo proto.enable}
78− '')
77+ i2pdConf = pkgs.writeText "i2pd.conf"
78+ ''
79+ ipv4 = ${toYesNo cfg.enableIPv4}
80+ ipv6 = ${toYesNo cfg.enableIPv6}
81+ notransit = ${toYesNo cfg.notransit}
82+ floodfill = ${toYesNo cfg.floodfill}
83+ netid = ${toString cfg.netid}
84+ ${if isNull cfg.bandwidth then "" else "bandwidth = ${toString cfg.bandwidth}" }
85+ ${if isNull cfg.port then "" else "port = ${toString cfg.port}"}
86+
87+ [limits]
88+ transittunnels = ${toString cfg.limits.transittunnels}
89+
90+ [upnp]
91+ enabled = ${toYesNo cfg.upnp.enable}
92+ name = ${cfg.upnp.name}
93+
94+ [precomputation]
95+ elgamal = ${toYesNo cfg.precomputation.elgamal}
96+
97+ [reseed]
98+ verify = ${toYesNo cfg.reseed.verify}
99+ file = ${cfg.reseed.file}
100+ urls = ${builtins.concatStringsSep "," cfg.reseed.urls}
101+
102+ [addressbook]
103+ defaulturl = ${cfg.addressbook.defaulturl}
104+ subscriptions = ${builtins.concatStringsSep "," cfg.addressbook.subscriptions}
105+ ${flip concatMapStrings
106+ (collect (proto: proto ? port && proto ? address && proto ? name) cfg.proto)
107+ (proto: let portStr = toString proto.port; in
108+ ''
109+ [${proto.name}]
110+ enabled = ${toYesNo proto.enable}
111+ address = ${proto.address}
112+ port = ${toString proto.port}
113+ ${if proto ? keys then "keys = ${proto.keys}" else ""}
114+ ${if proto ? auth then "auth = ${toYesNo proto.auth}" else ""}
115+ ${if proto ? user then "user = ${proto.user}" else ""}
116+ ${if proto ? pass then "pass = ${proto.pass}" else ""}
117+ ${if proto ? outproxy then "outproxy = ${proto.outproxy}" else ""}
118+ ${if proto ? outproxyPort then "outproxyport = ${toString proto.outproxyPort}" else ""}
119+ '')
79120 }
80121 '';
81122
@@ -114,7 +155,7 @@ let
114155 i2pdSh = pkgs.writeScriptBin "i2pd" ''
115156 #!/bin/sh
116157 ${if isNull cfg.extIp then extip else ""}
117− ${pkgs.i2pd}/bin/i2pd --log=1 \
158+ ${pkgs.i2pd}/bin/i2pd \
118159 --host=${if isNull cfg.extIp then "$EXTIP" else cfg.extIp} \
119160 --conf=${i2pdConf} \
120161 --tunconf=${i2pdTunnelConf}
@@ -135,6 +176,8 @@ in
135176 default = false;
136177 description = ''
137178 Enables I2Pd as a running service upon activation.
179+ Please read http://i2pd.readthedocs.io/en/latest/ for further
180+ configuration help.
138181 '';
139182 };
140183
@@ -162,6 +205,22 @@ in
162205 '';
163206 };
164207
208+ netid = mkOption {
209+ type = types.int;
210+ default = 2;
211+ description = ''
212+ I2P overlay netid.
213+ '';
214+ };
215+
216+ bandwidth = mkOption {
217+ type = with types; nullOr int;
218+ default = null;
219+ description = ''
220+ Set a router bandwidth limit integer in kbps or letters: L (32), O (256), P (2048), X (>9000)
221+ '';
222+ };
223+
165224 port = mkOption {
166225 type = with types; nullOr int;
167226 default = null;
@@ -170,6 +229,14 @@ in
170229 '';
171230 };
172231
232+ enableIPv4 = mkOption {
233+ type = types.bool;
234+ default = true;
235+ description = ''
236+ Enables IPv4 connectivity. Enabled by default.
237+ '';
238+ };
239+
173240 enableIPv6 = mkOption {
174241 type = types.bool;
175242 default = false;
@@ -178,16 +245,141 @@ in
178245 '';
179246 };
180247
181− proto.http = mkEndpointOpt "http" "127.0.0.1" 7070;
248+ upnp = {
249+ enable = mkOption {
250+ type = types.bool;
251+ default = false;
252+ description = ''
253+ Enables UPnP.
254+ '';
255+ };
256+
257+ name = mkOption {
258+ type = types.str;
259+ default = "I2Pd";
260+ description = ''
261+ Name i2pd appears in UPnP forwardings list.
262+ '';
263+ };
264+ };
265+
266+ precomputation.elgamal = mkOption {
267+ type = types.bool;
268+ default = false;
269+ description = ''
270+ Use ElGamal precomputated tables.
271+ '';
272+ };
273+
274+ reseed = {
275+ verify = mkOption {
276+ type = types.bool;
277+ default = false;
278+ description = ''
279+ Request SU3 signature verification
280+ '';
281+ };
282+
283+ file = mkOption {
284+ type = types.str;
285+ default = "";
286+ description = ''
287+ Full path to SU3 file to reseed from
288+ '';
289+ };
290+
291+ urls = mkOption {
292+ type = with types; listOf str;
293+ default = [
294+ "https://reseed.i2p-project.de/"
295+ "https://i2p.mooo.com/netDb/"
296+ "https://netdb.i2p2.no/"
297+ "https://us.reseed.i2p2.no:444/"
298+ "https://uk.reseed.i2p2.no:444/"
299+ "https://i2p.manas.ca:8443/"
300+ ];
301+ description = ''
302+ Reseed URLs
303+ '';
304+ };
305+ };
306+
307+ addressbook = {
308+ defaulturl = mkOption {
309+ type = types.str;
310+ default = "http://joajgazyztfssty4w2on5oaqksz6tqoxbduy553y34mf4byv6gpq.b32.i2p/export/alive-hosts.txt";
311+ description = ''
312+ AddressBook subscription URL for initial setup
313+ '';
314+ };
315+ subscriptions = mkOption {
316+ type = with types; listOf str;
317+ default = [
318+ "http://inr.i2p/export/alive-hosts.txt"
319+ "http://i2p-projekt.i2p/hosts.txt"
320+ "http://stats.i2p/cgi-bin/newhosts.txt"
321+ ];
322+ description = ''
323+ AddressBook subscription URLs
324+ '';
325+ };
326+ };
327+
328+ limits.transittunnels = mkOption {
329+ type = types.int;
330+ default = 2500;
331+ description = ''
332+ Maximum number of active transit sessions
333+ '';
334+ };
335+
336+ proto.http = (mkEndpointOpt "http" "127.0.0.1" 7070) // {
337+ auth = mkOption {
338+ type = types.bool;
339+ default = false;
340+ description = ''
341+ Enable authentication for webconsole.
342+ '';
343+ };
344+ user = mkOption {
345+ type = types.str;
346+ default = "i2pd";
347+ description = ''
348+ Username for webconsole access
349+ '';
350+ };
351+ pass = mkOption {
352+ type = types.str;
353+ default = "i2pd";
354+ description = ''
355+ Password for webconsole access.
356+ '';
357+ };
358+ };
359+
360+ proto.httpProxy = mkKeyedEndpointOpt "httpproxy" "127.0.0.1" 4446 "";
361+ proto.socksProxy = (mkKeyedEndpointOpt "socksproxy" "127.0.0.1" 4447 "")
362+ // {
363+ outproxy = mkOption {
364+ type = types.str;
365+ default = "127.0.0.1";
366+ description = "Upstream outproxy bind address.";
367+ };
368+ outproxyPort = mkOption {
369+ type = types.int;
370+ default = 4444;
371+ description = "Upstream outproxy bind port.";
372+ };
373+ };
374+
182375 proto.sam = mkEndpointOpt "sam" "127.0.0.1" 7656;
183376 proto.bob = mkEndpointOpt "bob" "127.0.0.1" 2827;
377+ proto.i2cp = mkEndpointOpt "i2cp" "127.0.0.1" 7654;
184378 proto.i2pControl = mkEndpointOpt "i2pcontrol" "127.0.0.1" 7650;
185− proto.httpProxy = mkEndpointOpt "httpproxy" "127.0.0.1" 4446;
186− proto.socksProxy = mkEndpointOpt "socksproxy" "127.0.0.1" 4447;
187379
188380 outTunnels = mkOption {
189381 default = {};
190− type = with types; loaOf (submodule (
382+ type = with types; loaOf (submodule (
191383 { name, config, ... }: {
192384 options = commonTunOpts name;
193385 config = {
nixos/modules/services/networking/tinc.nix+1−1
@@ -68,7 +68,7 @@ in
6868
6969 interfaceType = mkOption {
7070 default = "tun";
71− type = types.addCheck types.str (n: n == "tun" || n == "tap");
71+ type = types.enum [ "tun" "tap" ];
7272 description = ''
7373 The type of virtual interface used for the network connection
7474 '';
nixos/modules/services/web-servers/fcgiwrap.nix+1−1
@@ -21,7 +21,7 @@ in {
2121 };
2222
2323 socketType = mkOption {
24− type = types.addCheck types.str (t: t == "unix" || t == "tcp" || t == "tcp6");
24+ type = types.enum [ "unix" "tcp" "tcp6" ];
2525 default = "unix";
2626 description = "Socket type: 'unix', 'tcp' or 'tcp6'.";
2727 };
nixos/modules/system/boot/loader/grub/grub.nix+1−2
@@ -324,8 +324,7 @@ in
324324
325325 fsIdentifier = mkOption {
326326 default = "uuid";
327− type = types.addCheck types.str
328− (type: type == "uuid" || type == "label" || type == "provided");
327+ type = types.enum [ "uuid" "label" "provided" ];
329328 description = ''
330329 Determines how GRUB will identify devices when generating the
331330 configuration file. A value of uuid / label signifies that grub
nixos/modules/tasks/network-interfaces.nix+1−1
@@ -245,7 +245,7 @@ let
245245
246246 virtualType = mkOption {
247247 default = null;
248− type = types.nullOr (types.addCheck types.str (v: v == "tun" || v == "tap"));
248+ type = with types; nullOr (enum [ "tun" "tap" ]);
249249 description = ''
250250 The explicit type of interface to create. Accepts tun or tap strings.
251251 Also accepts null to implicitly detect the type of device.
nixos/release.nix+1
@@ -275,6 +275,7 @@ in rec {
275275 tests.networkingProxy = callTest tests/networking-proxy.nix {};
276276 tests.nfs3 = callTest tests/nfs.nix { version = 3; };
277277 tests.nfs4 = callTest tests/nfs.nix { version = 4; };
278+ tests.leaps = callTest tests/leaps.nix { };
278279 tests.nsd = callTest tests/nsd.nix {};
279280 tests.openssh = callTest tests/openssh.nix {};
280281 #tests.panamax = hydraJob (import tests/panamax.nix { system = "x86_64-linux"; });
nixos/tests/dnscrypt-proxy.nix−2
@@ -22,8 +22,6 @@ import ./make-test.nix ({ pkgs, ... }: {
2222 };
2323
2424 testScript = ''
25− $client->start;
26− $client->waitForUnit("sockets.target");
2725 $client->waitForUnit("dnsmasq");
2826
2927 # The daemon is socket activated; sending a single ping should activate it.
nixos/tests/leaps.nixnew file+29
@@ -0,0 +1,29 @@
1+import ./make-test.nix ({ pkgs, ... }:
2+
3+{
4+ name = "leaps";
5+ meta = with pkgs.stdenv.lib.maintainers; {
6+ maintainers = [ qknight ];
7+ };
8+
9+ nodes =
10+ {
11+ client = { };
12+
13+ server =
14+ { services.leaps = {
15+ enable = true;
16+ port = 6666;
17+ path = "/leaps/";
18+ };
19+ networking.firewall.enable = false;
20+ };
21+ };
22+
23+ testScript =
24+ ''
25+ startAll;
26+ $server->waitForOpenPort(6666);
27+ $client->succeed("curl http://server:6666/leaps/ | grep -i 'leaps'");
28+ '';
29+})
pkgs/applications/audio/audacity/default.nix+2−2
@@ -1,5 +1,5 @@
11{ stdenv, fetchurl, wxGTK30, pkgconfig, gettext, gtk2, glib, zlib, perl, intltool,
2− libogg, libvorbis, libmad, alsaLib, libsndfile, soxr, flac, lame, fetchpatch,
2+ libogg, libvorbis, libmad, libjack2, lv2, lilv, serd, sord, sratom, suil, alsaLib, libsndfile, soxr, flac, lame, fetchpatch,
33 expat, libid3tag, ffmpeg, soundtouch /*, portaudio - given up fighting their portaudio.patch */
44 }:
55
@@ -29,7 +29,7 @@ stdenv.mkDerivation rec {
2929
3030 buildInputs = [
3131 pkgconfig gettext wxGTK30 expat alsaLib
32− libsndfile soxr libid3tag gtk2
32+ libsndfile soxr libid3tag libjack2 lv2 lilv serd sord sratom suil gtk2
3333 ffmpeg libmad lame libvorbis flac soundtouch
3434 ]; #ToDo: detach sbsms
3535
pkgs/applications/audio/ladspa-plugins/default.nix+20−13
@@ -1,22 +1,29 @@
1−{ stdenv, fetchurl, fftw, ladspaH, pkgconfig }:
1+{ stdenv, fetchurl, autoreconfHook, automake, fftw, ladspaH, libxml2, pkgconfig
2+, perlPackages }:
3+
4+stdenv.mkDerivation rec {
5+ name = "swh-plugins-${version}";
6+ version = "0.4.17";
27
3−stdenv.mkDerivation {
4− name = "swh-plugins-0.4.15";
58
69 src = fetchurl {
7− url = http://plugin.org.uk/releases/0.4.15/swh-plugins-0.4.15.tar.gz;
8− sha256 = "0h462s4mmqg4iw7zdsihnrmz2vjg0fd49qxw2a284bnryjjfhpnh";
10+ url = "https://github.com/swh/ladspa/archive/v${version}.tar.gz";
11+ sha256 = "1rqwh8xrw6hnp69dg4gy336bfbfpmbx4fjrk0nb8ypjcxkz91c6i";
912 };
10−
11− buildInputs = [fftw ladspaH pkgconfig];
1213
13− postInstall =
14− ''
15− mkdir -p $out/share/ladspa/
16− ln -sv $out/lib/ladspa $out/share/ladspa/lib
17− '';
14+ buildInputs = [ autoreconfHook fftw ladspaH libxml2 pkgconfig perlPackages.perl perlPackages.XMLParser ];
15+
16+ patchPhase = ''
17+ patchShebangs .
18+ patchShebangs ./metadata/
19+ cp ${automake}/share/automake-*/mkinstalldirs .
20+ '';
1821
19− meta = {
22+ meta = with stdenv.lib; {
23+ homepage = http://plugin.org.uk/;
2024 description = "LADSPA format audio plugins";
25+ license = licenses.gpl2;
26+ maintainers = [ maintainers.magnetophon ];
27+ platforms = platforms.linux;
2128 };
2229}
pkgs/applications/audio/ladspa-plugins/git.nixdeleted−28
@@ -1,28 +0,0 @@
1−{ stdenv, fetchgit, autoreconfHook, automake, fftw, ladspaH, libxml2, pkgconfig
2−, perl, perlPackages }:
3−
4−stdenv.mkDerivation {
5− name = "swh-plugins-git-2015-03-04";
6−
7− src = fetchgit {
8− url = https://github.com/swh/ladspa.git;
9− rev = "4b8437e8037cace3d5bf8ce6d1d1da0182aba686";
10− sha256 = "1rmqm4780dhp0pj2scl3k7m8hpp1x6w6ln4wwg954zb9570rqaxx";
11− };
12−
13− buildInputs = [ autoreconfHook fftw ladspaH libxml2 pkgconfig perl perlPackages.XMLParser ];
14−
15− patchPhase = ''
16− patchShebangs .
17− patchShebangs ./metadata/
18− cp ${automake}/share/automake-*/mkinstalldirs .
19− '';
20−
21− meta = with stdenv.lib; {
22− homepage = http://plugin.org.uk/;
23− description = "LADSPA format audio plugins";
24− license = licenses.gpl2;
25− maintainers = [ maintainers.magnetophon ];
26− platforms = platforms.linux;
27− };
28−}
pkgs/applications/audio/snd/default.nix+2−2
@@ -4,11 +4,11 @@
44}:
55
66stdenv.mkDerivation rec {
7− name = "snd-15.9";
7+ name = "snd-16.9";
88
99 src = fetchurl {
1010 url = "mirror://sourceforge/snd/${name}.tar.gz";
11− sha256 = "0hs9ailgaphgyi3smnrpwksvdww85aa7szqgi6l6d2jwfx9g4bhd";
11+ sha256 = "1rw9wrj1f0g413ya32s9mwhvv3c6iasjza22irzf6xlv49b9s5dp";
1212 };
1313
1414 nativeBuildInputs = [ pkgconfig ];
pkgs/applications/editors/emacs-modes/stratego/builder.shdeleted−4
@@ -1,4 +0,0 @@
1−source $stdenv/setup
2−
3−mkdir -p $out/share/emacs/site-lisp
4−cp $src $out/share/emacs/site-lisp/stratego.el
pkgs/applications/editors/emacs-modes/stratego/default.nixdeleted−10
@@ -1,10 +0,0 @@
1−{stdenv, fetchsvn}:
2−stdenv.mkDerivation {
3− name = "stratego-mode";
4− builder = ./builder.sh;
5− src = fetchsvn {
6− url = https://svn.strategoxt.org/repos/StrategoXT/stratego-editors/trunk/emacs/stratego.el;
7− rev = 12678;
8− sha256 = "4ab4ec587550233f29ca08b82fa0a9f7e5b33fc178348037e3ab1816bd60f538";
9− };
10−}
pkgs/applications/networking/esniper/default.nix+3−3
@@ -1,11 +1,11 @@
11{ stdenv, fetchurl, openssl, curl, coreutils, gawk, bash, which }:
22
33stdenv.mkDerivation {
4− name = "esniper-2.31.0";
4+ name = "esniper-2.32.0";
55
66 src = fetchurl {
7− url = "mirror://sourceforge/esniper/esniper-2-31-0.tgz";
8− sha256 = "0xn6gdyr0c18khwcsi2brp49wkancrsrxxca7hvbawhbf263glih";
7+ url = "mirror://sourceforge/esniper/esniper-2-32-0.tgz";
8+ sha256 = "04lka4d0mnrwc369yzvq28n8qi1qbm8810ykx6d0a4kaghiybqsy";
99 };
1010
1111 buildInputs = [ openssl curl ];
pkgs/applications/networking/instant-messengers/discord/default.nix+2−2
@@ -4,7 +4,7 @@
44, libXext, libXfixes, libXi, libXrandr, libXrender, libXtst, nspr, nss, pango
55, systemd, libXScrnSaver }:
66
7−let version = "0.0.9"; in
7+let version = "0.0.10"; in
88
99stdenv.mkDerivation {
1010
@@ -12,7 +12,7 @@ stdenv.mkDerivation {
1212
1313 src = fetchurl {
1414 url = "https://cdn-canary.discordapp.com/apps/linux/${version}/discord-canary-${version}.tar.gz";
15− sha256 = "72f692cea62b836220f40d81d110846f9cde9a0fba7a8d47226d89e0980255b9";
15+ sha256 = "1wkbbnbqbwgixdbm69dlirhgjnn8llqyzil01nqwpknh1qwd06pr";
1616 };
1717
1818 libPath = stdenv.lib.makeLibraryPath [
pkgs/applications/networking/siproxd/cheaders.patch+3−2
@@ -3,11 +3,12 @@ index 1904ab3..cb3624d 100644
33--- a/src/dejitter.c
44+++ b/src/dejitter.c
55@@ -22,6 +22,8 @@
6−
6+
77 #include <errno.h>
8−
8+
99+#include <string.h>
1010+#include <sys/time.h>
11+ #include <unistd.h>
1112 #include <sys/types.h>
1213 #include <sys/socket.h>
1314 #include <netinet/in.h>
pkgs/applications/networking/siproxd/default.nix+3−3
@@ -1,11 +1,11 @@
11{ stdenv, fetchurl, libosip }:
22
33stdenv.mkDerivation rec {
4− name = "siproxd-0.8.1";
5−
4+ name = "siproxd-0.8.2";
5+
66 src = fetchurl {
77 url = "mirror://sourceforge/siproxd/${name}.tar.gz";
8− sha256 = "1bcxl0h5nc28m8lcdhpbl5yc93w98xm53mfzrf04knsvmx7z0bfz";
8+ sha256 = "1l6cyxxhra825jiiw9npa7jrbfgbyfpk4966cqkrw66cn28y8v2j";
99 };
1010
1111 patches = [ ./cheaders.patch ];
pkgs/applications/science/biology/pal2nal/default.nixdeleted−31
@@ -1,31 +0,0 @@
1−{stdenv, fetchurl, perl, paml}:
2−
3−stdenv.mkDerivation {
4− name = "pal2nal-12";
5− src = fetchurl {
6− url = http://coot.embl.de/pal2nal/distribution/pal2nal.v12.tar.gz;
7− sha256 = "1qj9sq5skpa7vyccl9gxc5ls85jwiq8j6mr8wvacz4yhyg0afy04";
8− };
9−
10− installPhase = ''
11− mkdir -p $out/bin
12−
13− cp -v pal2nal.pl $out/bin
14−
15− mkdir -p $out/doc
16−
17− cp -v README $out/doc
18− '';
19−
20− meta = {
21− description = "Program for aligning nucleotide sequences based on an aminoacid alignment";
22− longDescription = ''
23− PAL2NAL is a program that converts a multiple sequence alignment of proteins and the corresponding DNA (or mRNA) sequences into a codon alignment. The program automatically assigns the corresponding codon sequence even if the input DNA sequence has mismatches with the input protein sequence, or contains UTRs, polyA tails. It can also deal with frame shifts in the input alignment, which is suitable for the analysis of pseudogenes. The resulting codon alignment can further be subjected to the calculation of synonymous (KS) and non-synonymous (KA) substitution rates.
24−
25−If the input is a pair of sequences, PAL2NAL automatically calculates KS and KA by the codeml program in PAML.
26−'';
27− license = "non-commercial";
28− homepage = http://coot.embl.de/pal2nal/;
29− pkgMaintainer = "Pjotr Prins";
30− };
31−}
pkgs/applications/science/biology/paml/default.nix+5−5
@@ -1,11 +1,11 @@
11{stdenv, fetchurl}:
22
33stdenv.mkDerivation rec {
4− version = "4.2a";
4+ version = "4.9c";
55 name = "paml-${version}";
66 src = fetchurl {
7− url = "http://abacus.gene.ucl.ac.uk/software/paml${version}.tar.gz";
8− sha256 = "0yywyrjgxrpavp50n00l01pl90b7pykgb2k53yrlykz9dnf583pb";
7+ url = "http://abacus.gene.ucl.ac.uk/software/paml${version}.tgz";
8+ sha256 = "18a1l47223l7jyjavm8a8la84q9k9kbxwmj7kz4z3pdx70qrl04j";
99 };
1010
1111 preBuild = ''
@@ -13,7 +13,7 @@ stdenv.mkDerivation rec {
1313 '';
1414 installPhase = ''
1515 mkdir -pv $out/bin
16− cp -v codeml $out/bin
16+ cp -v codeml $out/bin
1717 cp -v baseml $out/bin
1818 cp -v basemlg $out/bin
1919 cp -v chi2 $out/bin
@@ -28,6 +28,6 @@ stdenv.mkDerivation rec {
2828 description = "Phylogenetic Analysis by Maximum Likelihood (PAML)";
2929 longDescription = ''PAML is a package of programs for phylogenetic analyses of DNA or protein sequences using maximum likelihood. It is maintained and distributed for academic use free of charge by Ziheng Yang. ANSI C source codes are distributed for UNIX/Linux/Mac OSX, and executables are provided for MS Windows. PAML is not good for tree making. It may be used to estimate parameters and test hypotheses to study the evolutionary process, when you have reconstructed trees using other programs such as PAUP*, PHYLIP, MOLPHY, PhyML, RaxML, etc.'';
3030 license = "non-commercial";
31− homepage = http://abacus.gene.ucl.ac.uk/software/paml.html;
31+ homepage = http://abacus.gene.ucl.ac.uk/software/paml.html;
3232 };
3333}
pkgs/applications/virtualization/remotebox/default.nix+2−2
@@ -2,11 +2,11 @@
22
33stdenv.mkDerivation rec {
44 name = "remotebox-${version}";
5− version = "2.0";
5+ version = "2.1";
66
77 src = fetchurl {
88 url = "http://remotebox.knobgoblin.org.uk/downloads/RemoteBox-${version}.tar.bz2";
9− sha256 = "0c73i53wdjd2m2sdgq3r3xp30irxh5z5rak2rk79yb686s6bv759";
9+ sha256 = "0pyi433pwbpyh58p08q8acav7mk90gchgjghvl9f8wqafx7bp404";
1010 };
1111
1212 buildInputs = with perlPackages; [ perl Glib Gtk2 Pango SOAPLite ];
pkgs/data/fonts/unifont/default.nix+5−5
@@ -2,16 +2,16 @@
22
33stdenv.mkDerivation rec {
44 name = "unifont-${version}";
5− version = "9.0.03";
5+ version = "9.0.04";
66
77 ttf = fetchurl {
8− url = "http://fossies.org/linux/unifont/font/precompiled/${name}.ttf";
9− sha256 = "00j97r658xl33zgi66glgbx2s7j9q52cj4iq7z1rrf3p38xzgbff";
8+ url = "mirror://gnu/unifont/${name}/${name}.ttf";
9+ sha256 = "052waajjdry67jjl7vy984padyzdrkhf5gylgbnvj90q6d52j02z";
1010 };
1111
1212 pcf = fetchurl {
13− url = "http://fossies.org/linux/unifont/font/precompiled/${name}.pcf.gz";
14− sha256 = "1w3gaz8afc3q7svgm4hmgjhvi9pxkmgsib8sscgi52c7ff0mhq9f";
13+ url = "mirror://gnu/unifont/${name}/${name}.pcf.gz";
14+ sha256 = "0736qmlzsf4xlipj4vzihafkigc3xjisxnwcqhl9dzkhxfjq9612";
1515 };
1616
1717 buildInputs = [ mkfontscale mkfontdir ];
pkgs/desktops/kde-5/plasma/kmenuedit.nix+6−3
@@ -1,11 +1,14 @@
1−{ plasmaPackage, ecm, kdoctools, ki18n, kxmlgui
2−, kdbusaddons, kiconthemes, kio, sonnet, kdelibs4support
1+{
2+ plasmaPackage,
3+ ecm, kdoctools,
4+ kdbusaddons, kdelibs4support, khotkeys, ki18n, kiconthemes, kio, kxmlgui,
5+ sonnet
36}:
47
58plasmaPackage {
69 name = "kmenuedit";
710 nativeBuildInputs = [ ecm kdoctools ];
811 propagatedBuildInputs = [
9− kdelibs4support ki18n kio sonnet kxmlgui kdbusaddons kiconthemes
12+ kdbusaddons kdelibs4support khotkeys ki18n kiconthemes kio kxmlgui sonnet
1013 ];
1114}
pkgs/desktops/kde-5/plasma/ksysguard.nix+7−3
@@ -1,11 +1,15 @@
1−{ plasmaPackage, ecm, kdoctools, kconfig
2−, kcoreaddons, kdelibs4support, ki18n, kitemviews, knewstuff
3−, kiconthemes, libksysguard, qtwebkit
1+{
2+ plasmaPackage,
3+ ecm, kdoctools,
4+ lm_sensors,
5+ kconfig, kcoreaddons, kdelibs4support, ki18n, kiconthemes, kitemviews,
6+ knewstuff, libksysguard, qtwebkit
47}:
58
69plasmaPackage {
710 name = "ksysguard";
811 nativeBuildInputs = [ ecm kdoctools ];
12+ buildInputs = [ lm_sensors ];
913 propagatedBuildInputs = [
1014 kconfig kcoreaddons kitemviews knewstuff kiconthemes libksysguard
1115 kdelibs4support ki18n qtwebkit
pkgs/desktops/kde-5/plasma/libksysguard/default.nix+10−9
@@ -1,7 +1,9 @@
1−{ fetchpatch, plasmaPackage, ecm, kauth, kcompletion
2−, kconfigwidgets, kcoreaddons, kservice, kwidgetsaddons
3−, kwindowsystem, plasma-framework, qtscript, qtx11extras
4−, kconfig, ki18n, kiconthemes
1+{
2+ plasmaPackage,
3+ ecm,
4+ kauth, kcompletion, kconfig, kconfigwidgets, kcoreaddons, ki18n, kiconthemes,
5+ kservice, kwidgetsaddons, kwindowsystem, plasma-framework, qtscript, qtwebkit,
6+ qtx11extras
57}:
68
79plasmaPackage {
@@ -9,11 +11,10 @@ plasmaPackage {
911 patches = [
1012 ./0001-qdiriterator-follow-symlinks.patch
1113 ];
12− nativeBuildInputs = [
13− ecm
14− ];
14+ nativeBuildInputs = [ ecm ];
1515 propagatedBuildInputs = [
16− kauth kconfig ki18n kiconthemes kwindowsystem plasma-framework qtx11extras
17− kcompletion kconfigwidgets kcoreaddons kservice kwidgetsaddons qtscript
16+ kauth kconfig ki18n kiconthemes kwindowsystem kcompletion kconfigwidgets
17+ kcoreaddons kservice kwidgetsaddons plasma-framework qtscript qtx11extras
18+ qtwebkit
1819 ];
1920}
pkgs/desktops/kde-5/plasma/oxygen.nix+8−8
@@ -1,16 +1,16 @@
1−{ plasmaPackage, ecm, ki18n, kcmutils, kconfig
2−, kdecoration, kguiaddons, kwidgetsaddons, kservice, kcompletion
3−, frameworkintegration, kwindowsystem, makeQtWrapper, qtx11extras
1+{
2+ plasmaPackage,
3+ ecm, makeQtWrapper,
4+ frameworkintegration, kcmutils, kcompletion, kconfig, kdecoration, kguiaddons,
5+ ki18n, kwidgetsaddons, kservice, kwayland, kwindowsystem, qtx11extras
46}:
57
68plasmaPackage {
79 name = "oxygen";
8− nativeBuildInputs = [
9− ecm makeQtWrapper
10− ];
10+ nativeBuildInputs = [ ecm makeQtWrapper ];
1111 propagatedBuildInputs = [
12− kcmutils kconfig kdecoration kguiaddons kwidgetsaddons kservice kcompletion
13− frameworkintegration ki18n kwindowsystem qtx11extras
12+ frameworkintegration kcmutils kcompletion kconfig kdecoration kguiaddons
13+ ki18n kservice kwayland kwidgetsaddons kwindowsystem qtx11extras
1414 ];
1515 postInstall = ''
1616 wrapQtProgram "$out/bin/oxygen-demo5"
pkgs/desktops/kde-5/plasma/plasma-desktop/default.nix+11−11
@@ -1,20 +1,20 @@
1−{ plasmaPackage, substituteAll, ecm, kdoctools
2−, attica, baloo, boost, fontconfig, kactivities, kactivities-stats
3−, kauth, kcmutils, kdbusaddons, kdeclarative, kded, kdelibs4support, kemoticons
4−, kglobalaccel, ki18n, kitemmodels, knewstuff, knotifications
5−, knotifyconfig, kpeople, krunner, kwallet, kwin, phonon
6−, plasma-framework, plasma-workspace, qtdeclarative, qtx11extras
7−, qtsvg, libXcursor, libXft, libxkbfile, xf86inputevdev
8−, xf86inputsynaptics, xinput, xkeyboard_config, xorgserver
9−, libcanberra_kde, libpulseaudio, utillinux
10−, qtquickcontrols, ksysguard
1+{
2+ plasmaPackage, substituteAll,
3+ ecm, kdoctools,
4+ attica, baloo, boost, fontconfig, ibus, kactivities, kactivities-stats, kauth,
5+ kcmutils, kdbusaddons, kdeclarative, kded, kdelibs4support, kemoticons,
6+ kglobalaccel, ki18n, kitemmodels, knewstuff, knotifications, knotifyconfig,
7+ kpeople, krunner, ksysguard, kwallet, kwin, libXcursor, libXft,
8+ libcanberra_kde, libpulseaudio, libxkbfile, phonon, plasma-framework,
9+ plasma-workspace, qtdeclarative, qtquickcontrols, qtsvg, qtx11extras, xf86inputevdev,
10+ xf86inputsynaptics, xinput, xkeyboard_config, xorgserver, utillinux
1111}:
1212
1313plasmaPackage rec {
1414 name = "plasma-desktop";
1515 nativeBuildInputs = [ ecm kdoctools ];
1616 buildInputs = [
17− attica boost fontconfig kcmutils kdbusaddons kded kitemmodels knewstuff
17+ attica boost fontconfig ibus kcmutils kdbusaddons kded kitemmodels knewstuff
1818 knotifications knotifyconfig kwallet libcanberra_kde libXcursor
1919 libpulseaudio libXft libxkbfile phonon qtsvg xf86inputevdev
2020 xf86inputsynaptics xkeyboard_config xinput baloo kactivities
pkgs/desktops/xfce/panel-plugins/xfce4-whiskermenu-plugin.nix+2−2
@@ -4,7 +4,7 @@
44with stdenv.lib;
55stdenv.mkDerivation rec {
66 p_name = "xfce4-whiskermenu-plugin";
7− version = "1.5.3";
7+ version = "1.6.1";
88
99 name = "${p_name}-${version}";
1010
@@ -12,7 +12,7 @@ stdenv.mkDerivation rec {
1212 owner = "gottcode";
1313 repo = "xfce4-whiskermenu-plugin";
1414 rev = "v${version}";
15− sha256 = "07gmf9x3pw6xajklj0idahbnv0psnkhiqhb88bmkp344jirsx6ba";
15+ sha256 = "19hldrrgy7qmrncv5rfsclybycjp9rjfnslhm996h62d2p675qpc";
1616 };
1717
1818 nativeBuildInputs = [ cmake pkgconfig intltool ];
pkgs/development/compilers/abc/builder-binjar.shdeleted−4
@@ -1,4 +0,0 @@
1−source $stdenv/setup
2−
3−mkdir -p $out/jars
4−cp $src $out/jars/$jarname.jar
pkgs/development/compilers/abc/builder.shdeleted−40
@@ -1,40 +0,0 @@
1−source $stdenv/setup
2−
3−tar zxvf $src
4−
5−cd abc-*
6−
7−for p in $patches; do
8− echo "applying patch $p"
9− patch -p1 < $p
10−done
11−
12−cat > ant.settings <<EOF
13−polyglot.loc=$polyglot/jars/polyglot.jar
14−polyglot.cupclasses.loc=$polyglot/jars/java_cup.jar
15−jflex.loc=
16−soot.loc=$soot/jars/soot.jar
17−jasmin.loc=$jasmin/jars/jasmin.jar
18−xact.loc=$xact/jars/xact.jar
19−paddle.loc=$paddle/jars/paddle.jar
20−jedd.runtime.jar=$jedd/jars/jedd.runtime.jar
21−javabdd.jar=$javabdd/jars/javabdd.jar
22−EOF
23−
24−$apacheAnt/bin/ant jars
25−
26−mkdir -p $out/jars
27−
28−cp lib/abc.jar $out/jars
29−cp lib/abc-runtime.jar $out/jars
30−cp lib/abc-testing.jar $out/jars
31−cp lib/abc-complete.jar $out/jars
32−
33−# Create the executable abc script
34−mkdir -p $out/bin
35−cat > $out/bin/abc <<EOF
36−#! $SHELL -e
37−
38−exec $jre/bin/java -classpath $out/jars/abc-complete.jar -Xmx256M -Dabc.home=$out/jars abc.main.Main \$@
39−EOF
40−chmod +x $out/bin/abc
pkgs/development/compilers/abc/default.nixdeleted−79
@@ -1,79 +0,0 @@
1−{stdenv, fetchurl, javaCup, jre, apacheAnt}:
2−
3−let
4− soot =
5− import ./soot {
6− inherit stdenv fetchurl apacheAnt polyglot jasmin;
7− };
8−
9− jasmin =
10− import ./jasmin {
11− inherit stdenv fetchurl apacheAnt javaCup;
12− };
13−
14− polyglot =
15− import ./polyglot {
16− inherit stdenv fetchurl apacheAnt;
17− };
18−
19− jedd =
20− stdenv.mkDerivation {
21− name = "jedd-runtime-snapshot";
22− jarname = "jedd.runtime";
23− builder = ./builder-binjar.sh;
24− src = fetchurl {
25− url = http://abc.comlab.ox.ac.uk/dists/1.2.0/files/lib/jedd-runtime-snapshot.jar;
26− md5 = "595c5ac2f6384f4c34f1854891b5e422";
27− };
28− };
29−
30− javabdd =
31− stdenv.mkDerivation {
32− name = "javabdd-0.6";
33− jarname = "javabdd";
34− builder = ./builder-binjar.sh;
35− src = fetchurl {
36− url = http://abc.comlab.ox.ac.uk/dists/1.2.0/files/lib/javabdd_0.6.jar;
37− md5 = "6e0246e891b7431f4e7265b5b1471307";
38− };
39− };
40−
41− paddle =
42− stdenv.mkDerivation {
43− name = "paddle-snapshot";
44− jarname = "paddle";
45− builder = ./builder-binjar.sh;
46− src = fetchurl {
47− url = http://abc.comlab.ox.ac.uk/dists/1.2.0/files/lib/paddle-snapshot.jar;
48− md5 = "a8e032310137945124a2850cd8cfc277";
49− };
50− };
51−
52− xact =
53− stdenv.mkDerivation {
54− name = "xact-complete-1.0-1";
55− jarname = "xact";
56− builder = ./builder-binjar.sh;
57− src = fetchurl {
58− url = http://abc.comlab.ox.ac.uk/dists/1.2.0/files/lib/xact-complete-1.0-1.jar;
59− md5 = "9810ad8762101ea691a895f0a6b7a5c3";
60− };
61− };
62−in
63−
64−stdenv.mkDerivation {
65− name = "abc-1.2.0";
66− builder = ./builder.sh;
67−
68− src = fetchurl {
69− url = http://abc.comlab.ox.ac.uk/dists/1.2.0/files/abc-1.2.0-src.tar.gz;
70− md5 = "aef9e8eac860f904f2a841e18770dc47";
71− };
72−
73− inherit apacheAnt polyglot soot javaCup xact jasmin jre javabdd paddle jedd;
74− patches = [];
75−
76− meta = {
77− description = "The AspectBench Compiler for AspectJ";
78− };
79−}
pkgs/development/compilers/abc/jasmin/builder.shdeleted−24
@@ -1,24 +0,0 @@
1−source $stdenv/setup
2−
3−tar zxvf $src
4−cd jasmin-*
5−
6−sed -e 's/<javac/<javac source="1.4"/' build.xml > build-tmp.xml
7−mv build-tmp.xml build.xml
8−
9−cat > ant.settings <<EOF
10−java_cup.jar=$javaCup
11−
12−# Location in which to generate Jasmin release tarballs
13−release.loc=lib
14−
15−# Version of Jasmin for tagging tarballs
16−jasmin.version=foo
17−
18−build.compiler=javac1.4
19−EOF
20−
21−ant jasmin-jar
22−
23−mkdir -p $out/jars/
24−mv lib/jasminclasses-foo.jar $out/jars/jasmin.jar
pkgs/development/compilers/abc/jasmin/default.nixdeleted−14
@@ -1,14 +0,0 @@
1−{stdenv, fetchurl, apacheAnt, javaCup}:
2−
3−stdenv.mkDerivation {
4− name = "jasmin-dev-20060422015512";
5− builder = ./builder.sh;
6−
7− src = fetchurl {
8− url = http://abc.comlab.ox.ac.uk/dists/1.2.0/files/jasmin-dev-20060422015512.tar.gz;
9− md5 = "0e49e532b4658c959582c5d5b5e28bf1";
10− };
11−
12− inherit javaCup;
13− buildInputs = [apacheAnt];
14−}
pkgs/development/compilers/abc/polyglot/builder.shdeleted−11
@@ -1,11 +0,0 @@
1−source $stdenv/setup
2−
3−tar zxvf $src
4−cd polyglot-*
5−
6−ant polyglot-jar
7−ant cup
8−
9−mkdir -p $out/jars/
10−mv lib/java_cup.jar $out/jars/
11−mv lib/polyglot*.jar $out/jars/
pkgs/development/compilers/abc/polyglot/default.nixdeleted−13
@@ -1,13 +0,0 @@
1−{stdenv, fetchurl, apacheAnt}:
2−
3−stdenv.mkDerivation {
4− name = "polyglot-dev-20060422015512";
5− builder = ./builder.sh;
6−
7− src = fetchurl {
8− url = http://abc.comlab.ox.ac.uk/dists/1.2.0/files/polyglot-dev-20060422015512.tar.gz;
9− md5 = "6972fe537b4edd41872ed1cf24d24b50";
10− };
11−
12− buildInputs = [apacheAnt];
13−}
pkgs/development/compilers/abc/soot/builder.shdeleted−19
@@ -1,19 +0,0 @@
1−source $stdenv/setup
2−
3−tar zxvf $src
4−cd soot-*
5−
6−export NIX_ANT_OPTS="$ANT_OPTS -Xmx200m"
7−
8−cat > ant.settings <<EOF
9−polyglot.jar=$polyglot/jars/polyglot.jar
10−jasmin.jar=$jasmin/jars/jasmin.jar
11−soot.version=foo
12−release.loc=lib
13−javaapi.url=http://java.sun.com/j2se/1.4.2/docs/api/
14−EOF
15−
16−ant classesjar
17−
18−mkdir -p $out/jars/
19−mv lib/sootclasses-foo.jar $out/jars/soot.jar
pkgs/development/compilers/abc/soot/default.nixdeleted−14
@@ -1,14 +0,0 @@
1−{stdenv, fetchurl, apacheAnt, polyglot, jasmin}:
2−
3−stdenv.mkDerivation {
4− name = "soot-dev-20060422015512";
5− builder = ./builder.sh;
6−
7− src = fetchurl {
8− url = http://abc.comlab.ox.ac.uk/dists/1.2.0/files/soot-dev-20060422015512.tar.gz;
9− md5 = "20dae3e31215b7ec88e3ff32a107d713";
10− };
11−
12− inherit polyglot jasmin;
13− buildInputs = [apacheAnt];
14−}
pkgs/development/compilers/dmd/2.067.1.nixnew file+74
@@ -0,0 +1,74 @@
1+{ stdenv, fetchurl, unzip, makeWrapper }:
2+
3+stdenv.mkDerivation {
4+ name = "dmd-2.067.1";
5+
6+ src = fetchurl {
7+ url = http://downloads.dlang.org/releases/2015/dmd.2.067.1.zip;
8+ sha256 = "0ny99vfllvvgcl79pwisxcdnb3732i827k9zg8c0j4s0n79k5z94";
9+ };
10+
11+ nativeBuildInputs = [ unzip makeWrapper ];
12+
13+ postPatch = stdenv.lib.optionalString stdenv.isDarwin ''
14+ # Allow to use "clang++", commented in Makefile
15+ substituteInPlace src/dmd/posix.mak \
16+ --replace g++ clang++ \
17+ --replace MACOSX_DEPLOYMENT_TARGET MACOSX_DEPLOYMENT_TARGET_
18+
19+ # Was not able to compile on darwin due to "__inline_isnanl"
20+ # being undefined.
21+ substituteInPlace src/dmd/root/port.c --replace __inline_isnanl __inline_isnan
22+ '';
23+
24+ # Buid and install are based on http://wiki.dlang.org/Building_DMD
25+ buildPhase = ''
26+ cd src/dmd
27+ make -f posix.mak INSTALL_DIR=$out
28+ export DMD=$PWD/dmd
29+ cd ../druntime
30+ make -f posix.mak INSTALL_DIR=$out DMD=$DMD
31+ cd ../phobos
32+ make -f posix.mak INSTALL_DIR=$out DMD=$DMD
33+ cd ../..
34+ '';
35+
36+ installPhase = ''
37+ cd src/dmd
38+ mkdir $out
39+ mkdir $out/bin
40+ cp dmd $out/bin
41+
42+ cd ../druntime
43+ mkdir $out/include
44+ mkdir $out/include/d2
45+ cp -r import/* $out/include/d2
46+
47+ cd ../phobos
48+ mkdir $out/lib
49+ ${let bits = if stdenv.is64bit then "64" else "32";
50+ osname = if stdenv.isDarwin then "osx" else "linux"; in
51+ "cp generated/${osname}/release/${bits}/libphobos2.a $out/lib"
52+ }
53+
54+ cp -r std $out/include/d2
55+ cp -r etc $out/include/d2
56+
57+ wrapProgram $out/bin/dmd \
58+ --prefix PATH ":" "${stdenv.cc}/bin" \
59+ --set CC "$""{CC:-$CC""}"
60+
61+ cd $out/bin
62+ tee dmd.conf << EOF
63+ [Environment]
64+ DFLAGS=-I$out/include/d2 -L-L$out/lib ${stdenv.lib.optionalString (!stdenv.cc.isClang) "-L--no-warn-search-mismatch -L--export-dynamic"}
65+ EOF
66+ '';
67+
68+ meta = with stdenv.lib; {
69+ description = "D language compiler";
70+ homepage = http://dlang.org/;
71+ license = licenses.free; # parts under different licenses
72+ platforms = platforms.unix;
73+ };
74+}
pkgs/development/compilers/dmd/default.nix+11−6
@@ -1,14 +1,19 @@
1−{ stdenv, fetchurl, unzip, curl, makeWrapper }:
1+{ stdenv, fetchurl
2+, makeWrapper, unzip, which
23
3−stdenv.mkDerivation {
4− name = "dmd-2.067.1";
4+# Versions 2.070.2 and up require a working dmd compiler to build:
5+, bootstrapDmd }:
6+
7+stdenv.mkDerivation rec {
8+ name = "dmd-${version}";
9+ version = "2.070.2";
510
611 src = fetchurl {
7− url = http://downloads.dlang.org/releases/2015/dmd.2.067.1.zip;
8− sha256 = "0ny99vfllvvgcl79pwisxcdnb3732i827k9zg8c0j4s0n79k5z94";
12+ url = "http://downloads.dlang.org/releases/2.x/${version}/dmd.${version}.zip";
13+ sha256 = "1pbhxxf41v816j0aky3q2pcd8a6phy3363l7vr5r5pg8ps3gl701";
914 };
1015
11− buildInputs = [ unzip curl makeWrapper ];
16+ nativeBuildInputs = [ bootstrapDmd makeWrapper unzip which ];
1217
1318 postPatch = stdenv.lib.optionalString stdenv.isDarwin ''
1419 # Allow to use "clang++", commented in Makefile
pkgs/development/eclipse/jdt-sdk/builder.shdeleted−7
@@ -1,7 +0,0 @@
1−set -e
2−
3−source $stdenv/setup
4−
5−unzip $src
6−mkdir $out
7−mv eclipse $out/
pkgs/development/eclipse/jdt-sdk/default.nixdeleted−15
@@ -1,15 +0,0 @@
1−{stdenv, fetchurl, unzip}:
2−
3−stdenv.mkDerivation ( rec {
4− pname = "eclipse-JDT-SDK";
5− version = "3.3.2";
6− name = "${pname}-${version}";
7−
8− builder = ./builder.sh;
9− src = fetchurl {
10− url = http://sunsite.informatik.rwth-aachen.de/eclipse/downloads/drops/R-3.3.2-200802211800/eclipse-JDT-SDK-3.3.2.zip;
11− md5 = "f9e513b7e3b609feef28651c07807b17";
12− };
13−
14− buildInputs = [unzip];
15−})
pkgs/development/haskell-modules/configuration-common.nix+4−3
@@ -291,7 +291,6 @@ self: super: {
291291 bitcoin-api-extra = dontCheck super.bitcoin-api-extra;
292292 bitx-bitcoin = dontCheck super.bitx-bitcoin; # http://hydra.cryp.to/build/926187/log/raw
293293 concurrent-dns-cache = dontCheck super.concurrent-dns-cache;
294− dbus = dontCheck super.dbus; # http://hydra.cryp.to/build/498404/log/raw
295294 digitalocean-kzs = dontCheck super.digitalocean-kzs; # https://github.com/KazumaSATO/digitalocean-kzs/issues/1
296295 github-types = dontCheck super.github-types; # http://hydra.cryp.to/build/1114046/nixlog/1/raw
297296 hadoop-rpc = dontCheck super.hadoop-rpc; # http://hydra.cryp.to/build/527461/nixlog/2/raw
@@ -1059,12 +1058,14 @@ self: super: {
10591058 dataenc = doJailbreak super.dataenc;
10601059
10611060 libsystemd-journal = overrideCabal super.libsystemd-journal (old: {
1062− # https://github.com/ocharles/libsystemd-journal/pull/17
1063− jailbreak = true;
10641061 librarySystemDepends = old.librarySystemDepends or [] ++ [ pkgs.systemd ];
10651062 });
10661063
10671064 # horribly outdated (X11 interface changed a lot)
10681065 sindre = markBroken super.sindre;
10691066
1067+ # https://github.com/jmillikin/haskell-dbus/pull/7
1068+ # http://hydra.cryp.to/build/498404/log/raw
1069+ dbus = dontCheck (appendPatch super.dbus ./patches/hdbus-semicolons.patch);
1070+
10701071}
pkgs/development/haskell-modules/patches/hdbus-semicolons.patchnew file+34
@@ -0,0 +1,34 @@
1+From 8fd84b4d6ba257ac93a61bce3378777840e8bf80 Mon Sep 17 00:00:00 2001
2+From: Nikolay Amiantov <ab@fmap.me>
3+Date: Sat, 5 Nov 2016 14:27:04 +0300
4+Subject: [PATCH] getSessionAddress: take first bus address from
5+ semicolon-separated variable
6+
7+---
8+ lib/DBus/Address.hs | 3 ++-
9+ 1 file changed, 2 insertions(+), 1 deletion(-)
10+
11+diff --git a/lib/DBus/Address.hs b/lib/DBus/Address.hs
12+index 72ac99d..596b18c 100644
13+--- a/lib/DBus/Address.hs
14++++ b/lib/DBus/Address.hs
15+@@ -18,6 +18,7 @@ module DBus.Address where
16+ import qualified Control.Exception
17+ import Data.Char (digitToInt, ord, chr)
18+ import Data.List (intercalate)
19++import Data.Maybe (listToMaybe)
20+ import qualified Data.Map
21+ import Data.Map (Map)
22+ import qualified System.Environment
23+@@ -152,7 +153,7 @@ getSystemAddress = do
24+ getSessionAddress :: IO (Maybe Address)
25+ getSessionAddress = do
26+ env <- getenv "DBUS_SESSION_BUS_ADDRESS"
27+- return (env >>= parseAddress)
28++ return $ maybe Nothing listToMaybe (env >>= parseAddresses)
29+
30+ -- | Returns the address in the environment variable
31+ -- @DBUS_STARTER_ADDRESS@, which must be set.
32+--
33+2.10.1
34+
pkgs/development/interpreters/octave/default.nix+4−4
@@ -25,9 +25,9 @@ stdenv.mkDerivation rec {
2525 sha256 = "11y2w6jgngj4rxiy136mkcs02l52rxk60kapyfc4rgrxz5hli3ym";
2626 };
2727
28− buildInputs = [ gfortran readline ncurses perl flex texinfo qhull libX11
29− graphicsmagick pcre pkgconfig mesa fltk zlib curl openblas libsndfile
30− fftw fftwSinglePrec qrupdate arpack libwebp ]
28+ buildInputs = [ gfortran readline ncurses perl flex texinfo qhull
29+ graphicsmagick pcre pkgconfig fltk zlib curl openblas libsndfile fftw
30+ fftwSinglePrec qrupdate arpack libwebp ]
3131 ++ (stdenv.lib.optional (qt != null) qt)
3232 ++ (stdenv.lib.optional (qscintilla != null) qscintilla)
3333 ++ (stdenv.lib.optional (ghostscript != null) ghostscript)
@@ -38,7 +38,7 @@ stdenv.mkDerivation rec {
3838 ++ (stdenv.lib.optional (jdk != null) jdk)
3939 ++ (stdenv.lib.optional (gnuplot != null) gnuplot)
4040 ++ (stdenv.lib.optional (python != null) python)
41− ++ (stdenv.lib.optionals (!stdenv.isDarwin) [mesa libX11])
41+ ++ (stdenv.lib.optionals (!stdenv.isDarwin) [ mesa libX11 ])
4242 ;
4343
4444 doCheck = !stdenv.isDarwin;
pkgs/development/libraries/clanlib/default.nixdeleted−19
@@ -1,19 +0,0 @@
1−{
2−stdenv, fetchurl, zlib,
3−libpng, libjpeg, libvorbis, libogg,
4−libX11, xf86vidmodeproto, libXxf86vm, libXmu, mesa
5−}:
6−
7−stdenv.mkDerivation {
8− name = "clanlib-0.8.0";
9− src = fetchurl {
10− url = http://www.clanlib.org/download/releases-0.8/ClanLib-0.8.0.tgz;
11− sha256 = "1rjr601h3hisrhvpkrj00wirx5hyfbppv9rla400wx7a42xvvyfy";
12− };
13−
14− buildInputs = [zlib libpng libjpeg
15− libvorbis libogg libX11
16− xf86vidmodeproto libXmu
17− mesa libXxf86vm
18− ];
19−}
pkgs/development/libraries/dxflib/default.nix+2−2
@@ -1,7 +1,7 @@
1−{stdenv, fetchurl}:
1+{stdenv, fetchurl}:
22
33stdenv.mkDerivation rec {
4− version = "2.5.0.0-1";
4+ version = "3.12.2";
55 name = "dxflib-${version}";
66 src = fetchurl {
77 url = "http://www.qcad.org/archives/dxflib/${name}.src.tar.gz";
pkgs/development/libraries/fltk/default.nix+2
@@ -21,6 +21,8 @@ composableDerivation.composableDerivation {} {
2121 --replace 'class Fl_XFont_On_Demand' 'class FL_EXPORT Fl_XFont_On_Demand'
2222 '';
2323
24+ patches = stdenv.lib.optionals stdenv.isDarwin [ ./nsosv.patch ];
25+
2426 nativeBuildInputs = [ pkgconfig ];
2527 propagatedBuildInputs = [ inputproto ]
2628 ++ (if stdenv.isDarwin
pkgs/development/libraries/fltk/nsosv.patchnew file+20
@@ -0,0 +1,20 @@
1+diff --git a/src/Fl_cocoa.mm b/src/Fl_cocoa.mm
2+index 6f5b8b1..2c7763d 100644
3+--- a/src/Fl_cocoa.mm
4++++ b/src/Fl_cocoa.mm
5+@@ -4074,15 +4074,6 @@ Window fl_xid(const Fl_Window* w)
6+ static int calc_mac_os_version() {
7+ int M, m, b = 0;
8+ NSAutoreleasePool *localPool = [[NSAutoreleasePool alloc] init];
9+-#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_10
10+- if ([NSProcessInfo instancesRespondToSelector:@selector(operatingSystemVersion)]) {
11+- NSOperatingSystemVersion version = [[NSProcessInfo processInfo] operatingSystemVersion];
12+- M = version.majorVersion;
13+- m = version.minorVersion;
14+- b = version.patchVersion;
15+- }
16+- else
17+-#endif
18+ {
19+ NSDictionary * sv = [NSDictionary dictionaryWithContentsOfFile:@"/System/Library/CoreServices/SystemVersion.plist"];
20+ const char *s = [[sv objectForKey:@"ProductVersion"] UTF8String];
pkgs/development/libraries/gsoap/default.nix+3−3
@@ -2,11 +2,11 @@
22
33stdenv.mkDerivation rec {
44 name = "gsoap-${version}";
5− version = "2.8.16";
5+ version = "2.8.37";
66
77 src = fetchurl {
8− url = "mirror://sourceforge/project/gsoap2/gSOAP/gsoap_${version}.zip";
9− sha256 = "00lhhysa9f9ychkvn1ij0ngr54l1dl9ww801yrliwq5c05gql7a6";
8+ url = "mirror://sourceforge/project/gsoap2/gsoap-2.8/gsoap_${version}.zip";
9+ sha256 = "1nvf5hgwff1agqdzbn3qc5569jzm14qkwqws0673z6hv2l3lijx3";
1010 };
1111
1212 buildInputs = [ unzip m4 bison flex openssl zlib ];
pkgs/development/libraries/iksemel/default.nixdeleted−24
@@ -1,24 +0,0 @@
1−{ stdenv, fetchurl, pkgconfig, gnutls, zlib }:
2−
3−stdenv.mkDerivation rec {
4− name = "iksemel-${version}";
5− version = "1.4";
6−
7− src = fetchurl {
8− url = "https://iksemel.googlecode.com/files/${name}.tar.gz";
9− sha1 = "722910b99ce794fd3f6f0e5f33fa804732cf46db";
10− };
11−
12− preConfigure = ''
13− sed -i -e '/if.*gnutls_check_version/,/return 1;/c return 0;' configure
14− export LIBGNUTLS_CONFIG="${pkgconfig}/bin/pkg-config gnutls"
15− '';
16−
17− buildInputs = [ pkgconfig gnutls zlib ];
18−
19− meta = {
20− homepage = "https://code.google.com/p/iksemel/";
21− license = stdenv.lib.licenses.lgpl21Plus;
22− description = "Fast and portable XML parser and Jabber protocol library";
23− };
24−}
pkgs/development/libraries/jasper/default.nix+2−16
@@ -1,27 +1,13 @@
11{ stdenv, fetchurl, fetchpatch, libjpeg, autoreconfHook }:
22
33stdenv.mkDerivation rec {
4− name = "jasper-1.900.2";
4+ name = "jasper-1.900.21";
55
66 src = fetchurl {
77 url = "http://www.ece.uvic.ca/~mdadams/jasper/software/${name}.tar.gz";
8− sha256 = "0bkibjhq3js2ldxa2f9pss84lcx4f5d3v0qis3ifi11ciy7a6c9a";
8+ sha256 = "1cypmlzq5vmbacsn8n3ls9p7g64scv3fzx88qf8c270dz10s5j79";
99 };
1010
11− patches = [
12− ./jasper-CVE-2014-8137-variant2.diff
13− ./jasper-CVE-2014-8137-noabort.diff
14−
15− (fetchpatch { # CVE-2016-2089
16− url = "https://github.com/mdadams/jasper/commit/aa6d9c2bbae9155f8e1466295373a68fa97291c3.patch";
17− sha256 = "1pxnm86zmbq6brfwsm5wx3iv7s92n4xilc52lzp61q266jmlggrf";
18− })
19− (fetchpatch { # CVE-2015-5203
20− url = "https://github.com/mdadams/jasper/commit/e73bb58f99fec0bf9c5d8866e010fcf736a53b9a.patch";
21− sha256 = "1r6hxbnhpnb7q6p2kbdxc1cpph3ic851x2hy477yv5c3qmrbx9bk";
22− })
23− ];
24−
2511 # newer reconf to recognize a multiout flag
2612 nativeBuildInputs = [ autoreconfHook ];
2713 propagatedBuildInputs = [ libjpeg ];
pkgs/development/libraries/jasper/jasper-CVE-2014-8137-noabort.diffdeleted−16
@@ -1,16 +0,0 @@
1−From RedHat: https://bugzilla.redhat.com/attachment.cgi?id=967284&action=diff
2−
3−--- jasper-1.900.1.orig/src/libjasper/jp2/jp2_dec.c 2014-12-11 14:30:54.193209780 +0100
4−+++ jasper-1.900.1/src/libjasper/jp2/jp2_dec.c 2014-12-11 14:36:46.313217814 +0100
5−@@ -291,7 +291,10 @@ jas_image_t *jp2_decode(jas_stream_t *in
6− case JP2_COLR_ICC:
7− iccprof = jas_iccprof_createfrombuf(dec->colr->data.colr.iccp,
8− dec->colr->data.colr.iccplen);
9−- assert(iccprof);
10−+ if (!iccprof) {
11−+ jas_eprintf("error: failed to parse ICC profile\n");
12−+ goto error;
13−+ }
14− jas_iccprof_gethdr(iccprof, &icchdr);
15− jas_eprintf("ICC Profile CS %08x\n", icchdr.colorspc);
16− jas_image_setclrspc(dec->image, fromiccpcs(icchdr.colorspc));
pkgs/development/libraries/jasper/jasper-CVE-2014-8137-variant2.diffdeleted−45
@@ -1,45 +0,0 @@
1−From RedHat: https://bugzilla.redhat.com/attachment.cgi?id=967283&action=diff
2−
3−--- jasper-1.900.1.orig/src/libjasper/base/jas_icc.c 2014-12-11 14:06:44.000000000 +0100
4−+++ jasper-1.900.1/src/libjasper/base/jas_icc.c 2014-12-11 15:16:37.971272386 +0100
5−@@ -1009,7 +1009,6 @@ static int jas_icccurv_input(jas_iccattr
6− return 0;
7−
8− error:
9−- jas_icccurv_destroy(attrval);
10− return -1;
11− }
12−
13−@@ -1127,7 +1126,6 @@ static int jas_icctxtdesc_input(jas_icca
14− #endif
15− return 0;
16− error:
17−- jas_icctxtdesc_destroy(attrval);
18− return -1;
19− }
20−
21−@@ -1206,8 +1204,6 @@ static int jas_icctxt_input(jas_iccattrv
22− goto error;
23− return 0;
24− error:
25−- if (txt->string)
26−- jas_free(txt->string);
27− return -1;
28− }
29−
30−@@ -1328,7 +1324,6 @@ static int jas_icclut8_input(jas_iccattr
31− goto error;
32− return 0;
33− error:
34−- jas_icclut8_destroy(attrval);
35− return -1;
36− }
37−
38−@@ -1497,7 +1492,6 @@ static int jas_icclut16_input(jas_iccatt
39− goto error;
40− return 0;
41− error:
42−- jas_icclut16_destroy(attrval);
43− return -1;
44− }
45−
pkgs/development/libraries/jasper/jasper-CVE-2014-8138.diffdeleted−16
@@ -1,16 +0,0 @@
1−From RedHat: https://bugzilla.redhat.com/attachment.cgi?id=967280&action=diff
2−
3−--- jasper-1.900.1.orig/src/libjasper/jp2/jp2_dec.c 2014-12-11 14:06:44.000000000 +0100
4−+++ jasper-1.900.1/src/libjasper/jp2/jp2_dec.c 2014-12-11 14:06:26.000000000 +0100
5−@@ -386,6 +386,11 @@ jas_image_t *jp2_decode(jas_stream_t *in
6− /* Determine the type of each component. */
7− if (dec->cdef) {
8− for (i = 0; i < dec->numchans; ++i) {
9−+ /* Is the channel number reasonable? */
10−+ if (dec->cdef->data.cdef.ents[i].channo >= dec->numchans) {
11−+ jas_eprintf("error: invalid channel number in CDEF box\n");
12−+ goto error;
13−+ }
14− jas_image_setcmpttype(dec->image,
15− dec->chantocmptlut[dec->cdef->data.cdef.ents[i].channo],
16− jp2_getct(jas_image_clrspc(dec->image),
pkgs/development/libraries/jasper/jasper-CVE-2014-8157.diffdeleted−12
@@ -1,12 +0,0 @@
1−diff -up jasper-1.900.1/src/libjasper/jpc/jpc_dec.c.CVE-2014-8157 jasper-1.900.1/src/libjasper/jpc/jpc_dec.c
2−--- jasper-1.900.1/src/libjasper/jpc/jpc_dec.c.CVE-2014-8157 2015-01-19 16:59:36.000000000 +0100
3−+++ jasper-1.900.1/src/libjasper/jpc/jpc_dec.c 2015-01-19 17:07:41.609863268 +0100
4−@@ -489,7 +489,7 @@ static int jpc_dec_process_sot(jpc_dec_t
5− dec->curtileendoff = 0;
6− }
7−
8−- if (JAS_CAST(int, sot->tileno) > dec->numtiles) {
9−+ if (JAS_CAST(int, sot->tileno) >= dec->numtiles) {
10− jas_eprintf("invalid tile number in SOT marker segment\n");
11− return -1;
12− }
pkgs/development/libraries/jasper/jasper-CVE-2014-8158.diffdeleted−329
@@ -1,329 +0,0 @@
1−diff -up jasper-1.900.1/src/libjasper/jpc/jpc_qmfb.c.CVE-2014-8158 jasper-1.900.1/src/libjasper/jpc/jpc_qmfb.c
2−--- jasper-1.900.1/src/libjasper/jpc/jpc_qmfb.c.CVE-2014-8158 2015-01-19 17:25:28.730195502 +0100
3−+++ jasper-1.900.1/src/libjasper/jpc/jpc_qmfb.c 2015-01-19 17:27:20.214663127 +0100
4−@@ -306,11 +306,7 @@ void jpc_qmfb_split_row(jpc_fix_t *a, in
5− {
6−
7− int bufsize = JPC_CEILDIVPOW2(numcols, 1);
8−-#if !defined(HAVE_VLA)
9− jpc_fix_t splitbuf[QMFB_SPLITBUFSIZE];
10−-#else
11−- jpc_fix_t splitbuf[bufsize];
12−-#endif
13− jpc_fix_t *buf = splitbuf;
14− register jpc_fix_t *srcptr;
15− register jpc_fix_t *dstptr;
16−@@ -318,7 +314,6 @@ void jpc_qmfb_split_row(jpc_fix_t *a, in
17− register int m;
18− int hstartcol;
19−
20−-#if !defined(HAVE_VLA)
21− /* Get a buffer. */
22− if (bufsize > QMFB_SPLITBUFSIZE) {
23− if (!(buf = jas_alloc2(bufsize, sizeof(jpc_fix_t)))) {
24−@@ -326,7 +321,6 @@ void jpc_qmfb_split_row(jpc_fix_t *a, in
25− abort();
26− }
27− }
28−-#endif
29−
30− if (numcols >= 2) {
31− hstartcol = (numcols + 1 - parity) >> 1;
32−@@ -360,12 +354,10 @@ void jpc_qmfb_split_row(jpc_fix_t *a, in
33− }
34− }
35−
36−-#if !defined(HAVE_VLA)
37− /* If the split buffer was allocated on the heap, free this memory. */
38− if (buf != splitbuf) {
39− jas_free(buf);
40− }
41−-#endif
42−
43− }
44−
45−@@ -374,11 +366,7 @@ void jpc_qmfb_split_col(jpc_fix_t *a, in
46− {
47−
48− int bufsize = JPC_CEILDIVPOW2(numrows, 1);
49−-#if !defined(HAVE_VLA)
50− jpc_fix_t splitbuf[QMFB_SPLITBUFSIZE];
51−-#else
52−- jpc_fix_t splitbuf[bufsize];
53−-#endif
54− jpc_fix_t *buf = splitbuf;
55− register jpc_fix_t *srcptr;
56− register jpc_fix_t *dstptr;
57−@@ -386,7 +374,6 @@ void jpc_qmfb_split_col(jpc_fix_t *a, in
58− register int m;
59− int hstartcol;
60−
61−-#if !defined(HAVE_VLA)
62− /* Get a buffer. */
63− if (bufsize > QMFB_SPLITBUFSIZE) {
64− if (!(buf = jas_alloc2(bufsize, sizeof(jpc_fix_t)))) {
65−@@ -394,7 +381,6 @@ void jpc_qmfb_split_col(jpc_fix_t *a, in
66− abort();
67− }
68− }
69−-#endif
70−
71− if (numrows >= 2) {
72− hstartcol = (numrows + 1 - parity) >> 1;
73−@@ -428,12 +414,10 @@ void jpc_qmfb_split_col(jpc_fix_t *a, in
74− }
75− }
76−
77−-#if !defined(HAVE_VLA)
78− /* If the split buffer was allocated on the heap, free this memory. */
79− if (buf != splitbuf) {
80− jas_free(buf);
81− }
82−-#endif
83−
84− }
85−
86−@@ -442,11 +426,7 @@ void jpc_qmfb_split_colgrp(jpc_fix_t *a,
87− {
88−
89− int bufsize = JPC_CEILDIVPOW2(numrows, 1);
90−-#if !defined(HAVE_VLA)
91− jpc_fix_t splitbuf[QMFB_SPLITBUFSIZE * JPC_QMFB_COLGRPSIZE];
92−-#else
93−- jpc_fix_t splitbuf[bufsize * JPC_QMFB_COLGRPSIZE];
94−-#endif
95− jpc_fix_t *buf = splitbuf;
96− jpc_fix_t *srcptr;
97− jpc_fix_t *dstptr;
98−@@ -457,7 +437,6 @@ void jpc_qmfb_split_colgrp(jpc_fix_t *a,
99− int m;
100− int hstartcol;
101−
102−-#if !defined(HAVE_VLA)
103− /* Get a buffer. */
104− if (bufsize > QMFB_SPLITBUFSIZE) {
105− if (!(buf = jas_alloc2(bufsize, sizeof(jpc_fix_t)))) {
106−@@ -465,7 +444,6 @@ void jpc_qmfb_split_colgrp(jpc_fix_t *a,
107− abort();
108− }
109− }
110−-#endif
111−
112− if (numrows >= 2) {
113− hstartcol = (numrows + 1 - parity) >> 1;
114−@@ -517,12 +495,10 @@ void jpc_qmfb_split_colgrp(jpc_fix_t *a,
115− }
116− }
117−
118−-#if !defined(HAVE_VLA)
119− /* If the split buffer was allocated on the heap, free this memory. */
120− if (buf != splitbuf) {
121− jas_free(buf);
122− }
123−-#endif
124−
125− }
126−
127−@@ -531,11 +507,7 @@ void jpc_qmfb_split_colres(jpc_fix_t *a,
128− {
129−
130− int bufsize = JPC_CEILDIVPOW2(numrows, 1);
131−-#if !defined(HAVE_VLA)
132− jpc_fix_t splitbuf[QMFB_SPLITBUFSIZE * JPC_QMFB_COLGRPSIZE];
133−-#else
134−- jpc_fix_t splitbuf[bufsize * numcols];
135−-#endif
136− jpc_fix_t *buf = splitbuf;
137− jpc_fix_t *srcptr;
138− jpc_fix_t *dstptr;
139−@@ -546,7 +518,6 @@ void jpc_qmfb_split_colres(jpc_fix_t *a,
140− int m;
141− int hstartcol;
142−
143−-#if !defined(HAVE_VLA)
144− /* Get a buffer. */
145− if (bufsize > QMFB_SPLITBUFSIZE) {
146− if (!(buf = jas_alloc2(bufsize, sizeof(jpc_fix_t)))) {
147−@@ -554,7 +525,6 @@ void jpc_qmfb_split_colres(jpc_fix_t *a,
148− abort();
149− }
150− }
151−-#endif
152−
153− if (numrows >= 2) {
154− hstartcol = (numrows + 1 - parity) >> 1;
155−@@ -606,12 +576,10 @@ void jpc_qmfb_split_colres(jpc_fix_t *a,
156− }
157− }
158−
159−-#if !defined(HAVE_VLA)
160− /* If the split buffer was allocated on the heap, free this memory. */
161− if (buf != splitbuf) {
162− jas_free(buf);
163− }
164−-#endif
165−
166− }
167−
168−@@ -619,18 +587,13 @@ void jpc_qmfb_join_row(jpc_fix_t *a, int
169− {
170−
171− int bufsize = JPC_CEILDIVPOW2(numcols, 1);
172−-#if !defined(HAVE_VLA)
173− jpc_fix_t joinbuf[QMFB_JOINBUFSIZE];
174−-#else
175−- jpc_fix_t joinbuf[bufsize];
176−-#endif
177− jpc_fix_t *buf = joinbuf;
178− register jpc_fix_t *srcptr;
179− register jpc_fix_t *dstptr;
180− register int n;
181− int hstartcol;
182−
183−-#if !defined(HAVE_VLA)
184− /* Allocate memory for the join buffer from the heap. */
185− if (bufsize > QMFB_JOINBUFSIZE) {
186− if (!(buf = jas_alloc2(bufsize, sizeof(jpc_fix_t)))) {
187−@@ -638,7 +601,6 @@ void jpc_qmfb_join_row(jpc_fix_t *a, int
188− abort();
189− }
190− }
191−-#endif
192−
193− hstartcol = (numcols + 1 - parity) >> 1;
194−
195−@@ -670,12 +632,10 @@ void jpc_qmfb_join_row(jpc_fix_t *a, int
196− ++srcptr;
197− }
198−
199−-#if !defined(HAVE_VLA)
200− /* If the join buffer was allocated on the heap, free this memory. */
201− if (buf != joinbuf) {
202− jas_free(buf);
203− }
204−-#endif
205−
206− }
207−
208−@@ -684,18 +644,13 @@ void jpc_qmfb_join_col(jpc_fix_t *a, int
209− {
210−
211− int bufsize = JPC_CEILDIVPOW2(numrows, 1);
212−-#if !defined(HAVE_VLA)
213− jpc_fix_t joinbuf[QMFB_JOINBUFSIZE];
214−-#else
215−- jpc_fix_t joinbuf[bufsize];
216−-#endif
217− jpc_fix_t *buf = joinbuf;
218− register jpc_fix_t *srcptr;
219− register jpc_fix_t *dstptr;
220− register int n;
221− int hstartcol;
222−
223−-#if !defined(HAVE_VLA)
224− /* Allocate memory for the join buffer from the heap. */
225− if (bufsize > QMFB_JOINBUFSIZE) {
226− if (!(buf = jas_alloc2(bufsize, sizeof(jpc_fix_t)))) {
227−@@ -703,7 +658,6 @@ void jpc_qmfb_join_col(jpc_fix_t *a, int
228− abort();
229− }
230− }
231−-#endif
232−
233− hstartcol = (numrows + 1 - parity) >> 1;
234−
235−@@ -735,12 +689,10 @@ void jpc_qmfb_join_col(jpc_fix_t *a, int
236− ++srcptr;
237− }
238−
239−-#if !defined(HAVE_VLA)
240− /* If the join buffer was allocated on the heap, free this memory. */
241− if (buf != joinbuf) {
242− jas_free(buf);
243− }
244−-#endif
245−
246− }
247−
248−@@ -749,11 +701,7 @@ void jpc_qmfb_join_colgrp(jpc_fix_t *a,
249− {
250−
251− int bufsize = JPC_CEILDIVPOW2(numrows, 1);
252−-#if !defined(HAVE_VLA)
253− jpc_fix_t joinbuf[QMFB_JOINBUFSIZE * JPC_QMFB_COLGRPSIZE];
254−-#else
255−- jpc_fix_t joinbuf[bufsize * JPC_QMFB_COLGRPSIZE];
256−-#endif
257− jpc_fix_t *buf = joinbuf;
258− jpc_fix_t *srcptr;
259− jpc_fix_t *dstptr;
260−@@ -763,7 +711,6 @@ void jpc_qmfb_join_colgrp(jpc_fix_t *a,
261− register int i;
262− int hstartcol;
263−
264−-#if !defined(HAVE_VLA)
265− /* Allocate memory for the join buffer from the heap. */
266− if (bufsize > QMFB_JOINBUFSIZE) {
267− if (!(buf = jas_alloc2(bufsize, JPC_QMFB_COLGRPSIZE * sizeof(jpc_fix_t)))) {
268−@@ -771,7 +718,6 @@ void jpc_qmfb_join_colgrp(jpc_fix_t *a,
269− abort();
270− }
271− }
272−-#endif
273−
274− hstartcol = (numrows + 1 - parity) >> 1;
275−
276−@@ -821,12 +767,10 @@ void jpc_qmfb_join_colgrp(jpc_fix_t *a,
277− srcptr += JPC_QMFB_COLGRPSIZE;
278− }
279−
280−-#if !defined(HAVE_VLA)
281− /* If the join buffer was allocated on the heap, free this memory. */
282− if (buf != joinbuf) {
283− jas_free(buf);
284− }
285−-#endif
286−
287− }
288−
289−@@ -835,11 +779,7 @@ void jpc_qmfb_join_colres(jpc_fix_t *a,
290− {
291−
292− int bufsize = JPC_CEILDIVPOW2(numrows, 1);
293−-#if !defined(HAVE_VLA)
294− jpc_fix_t joinbuf[QMFB_JOINBUFSIZE * JPC_QMFB_COLGRPSIZE];
295−-#else
296−- jpc_fix_t joinbuf[bufsize * numcols];
297−-#endif
298− jpc_fix_t *buf = joinbuf;
299− jpc_fix_t *srcptr;
300− jpc_fix_t *dstptr;
301−@@ -849,7 +789,6 @@ void jpc_qmfb_join_colres(jpc_fix_t *a,
302− register int i;
303− int hstartcol;
304−
305−-#if !defined(HAVE_VLA)
306− /* Allocate memory for the join buffer from the heap. */
307− if (bufsize > QMFB_JOINBUFSIZE) {
308− if (!(buf = jas_alloc3(bufsize, numcols, sizeof(jpc_fix_t)))) {
309−@@ -857,7 +796,6 @@ void jpc_qmfb_join_colres(jpc_fix_t *a,
310− abort();
311− }
312− }
313−-#endif
314−
315− hstartcol = (numrows + 1 - parity) >> 1;
316−
317−@@ -907,12 +845,10 @@ void jpc_qmfb_join_colres(jpc_fix_t *a,
318− srcptr += numcols;
319− }
320−
321−-#if !defined(HAVE_VLA)
322− /* If the join buffer was allocated on the heap, free this memory. */
323− if (buf != joinbuf) {
324− jas_free(buf);
325− }
326−-#endif
327−
328− }
329−
pkgs/development/libraries/jasper/jasper-CVE-2014-9029.diffdeleted−31
@@ -1,31 +0,0 @@
1−From RedHat: https://bugzilla.redhat.com/attachment.cgi?id=961994&action=diff
2−
3−--- jasper-1.900.1.orig/src/libjasper/jpc/jpc_dec.c 2014-11-27 12:45:44.000000000 +0100
4−+++ jasper-1.900.1/src/libjasper/jpc/jpc_dec.c 2014-11-27 12:44:58.000000000 +0100
5−@@ -1281,7 +1281,7 @@ static int jpc_dec_process_coc(jpc_dec_t
6− jpc_coc_t *coc = &ms->parms.coc;
7− jpc_dec_tile_t *tile;
8−
9−- if (JAS_CAST(int, coc->compno) > dec->numcomps) {
10−+ if (JAS_CAST(int, coc->compno) >= dec->numcomps) {
11− jas_eprintf("invalid component number in COC marker segment\n");
12− return -1;
13− }
14−@@ -1307,7 +1307,7 @@ static int jpc_dec_process_rgn(jpc_dec_t
15− jpc_rgn_t *rgn = &ms->parms.rgn;
16− jpc_dec_tile_t *tile;
17−
18−- if (JAS_CAST(int, rgn->compno) > dec->numcomps) {
19−+ if (JAS_CAST(int, rgn->compno) >= dec->numcomps) {
20− jas_eprintf("invalid component number in RGN marker segment\n");
21− return -1;
22− }
23−@@ -1356,7 +1356,7 @@ static int jpc_dec_process_qcc(jpc_dec_t
24− jpc_qcc_t *qcc = &ms->parms.qcc;
25− jpc_dec_tile_t *tile;
26−
27−- if (JAS_CAST(int, qcc->compno) > dec->numcomps) {
28−+ if (JAS_CAST(int, qcc->compno) >= dec->numcomps) {
29− jas_eprintf("invalid component number in QCC marker segment\n");
30− return -1;
31− }
pkgs/development/libraries/jasper/jasper-CVE-2016-1867.diffdeleted−11
@@ -1,11 +0,0 @@
1−--- jasper-1.900.1/src/libjasper/jpc/jpc_t2cod.c 2007-01-19 22:43:07.000000000 +0100
2−+++ jasper-1.900.1/src/libjasper/jpc/jpc_t2cod.c 2016-01-14 14:22:24.569056412 +0100
3−@@ -429,7 +429,7 @@
4− }
5−
6− for (pi->compno = pchg->compnostart, pi->picomp =
7−- &pi->picomps[pi->compno]; pi->compno < JAS_CAST(int, pchg->compnoend); ++pi->compno,
8−+ &pi->picomps[pi->compno]; pi->compno < JAS_CAST(int, pchg->compnoend) && pi->compno < pi->numcomps; ++pi->compno,
9− ++pi->picomp) {
10− pirlvl = pi->picomp->pirlvls;
11− pi->xstep = pi->picomp->hsamp * (1 << (pirlvl->prcwidthexpn +
pkgs/development/libraries/java/jetty-gwt/default.nixdeleted−13
@@ -1,13 +0,0 @@
1−{stdenv, fetchurl}:
2−
3−stdenv.mkDerivation {
4− name = "jetty-gwt-6.1.14";
5− src = fetchurl {
6− url = http://repository.codehaus.org/org/mortbay/jetty/jetty-gwt/6.1.14/jetty-gwt-6.1.14.jar;
7− sha256 = "17x8ss75rx9xjn93rq861mdn9d6gw87rbrf24blawa6ahhb56ppf";
8− };
9− buildCommand = ''
10− mkdir -p $out/share/java
11− cp $src $out/share/java/$name.jar
12− '';
13−}
pkgs/development/libraries/java/jetty-util/default.nixdeleted−13
@@ -1,13 +0,0 @@
1−{stdenv, fetchurl}:
2−
3−stdenv.mkDerivation {
4− name = "jetty-util-6.1.16";
5− src = fetchurl {
6− url = http://repository.codehaus.org/org/mortbay/jetty/jetty-util/6.1.16/jetty-util-6.1.16.jar;
7− sha256 = "1ld94lb5dk7y6sjg1rq8zdk97wiy56ik5vbgy7yjj4f6rz5pxbyq";
8− };
9− buildCommand = ''
10− mkdir -p $out/share/java
11− cp $src $out/share/java/$name.jar
12− '';
13−}
pkgs/development/libraries/java/saxon/default.nix+8−3
@@ -1,4 +1,4 @@
1−{stdenv, fetchurl, unzip}:
1+{ stdenv, fetchurl, unzip }:
22
33stdenv.mkDerivation {
44 name = "saxon-6.5.3";
@@ -8,8 +8,13 @@ stdenv.mkDerivation {
88 md5 = "7b8c7c187473c04d2abdb40d8ddab5c6";
99 };
1010
11− inherit unzip;
12− buildInputs = [unzip];
11+ nativeBuildInputs = [ unzip ];
12+
13+ # still leaving in root as well, in case someone is relying on that
14+ preFixup = ''
15+ mkdir -p "$out/share/java"
16+ cp -s "$out"/*.jar "$out/share/java/"
17+ '';
1318
1419 meta = {
1520 platforms = stdenv.lib.platforms.unix;
pkgs/development/libraries/java/saxon/unzip-builder.sh+3
@@ -1,3 +1,6 @@
11source $stdenv/setup
22
33unzip $src -d $out
4+
5+fixupPhase
6+
pkgs/development/libraries/kde-frameworks/kimageformats.nix+6−3
@@ -1,11 +1,14 @@
1−{ kdeFramework, lib
2−, ecm
3−, ilmbase
1+{
2+ kdeFramework, lib,
3+ ecm,
4+ ilmbase, karchive
45}:
56
67kdeFramework {
78 name = "kimageformats";
89 meta = { maintainers = [ lib.maintainers.ttuegel ]; };
910 nativeBuildInputs = [ ecm ];
11+ buildInputs = [ ilmbase ];
12+ propagatedBuildInputs = [ karchive ];
1013 NIX_CFLAGS_COMPILE = "-I${ilmbase.dev}/include/OpenEXR";
1114}
pkgs/development/libraries/libgeotiff/default.nix+11−6
@@ -1,14 +1,19 @@
1−{ stdenv, fetchurl, libtiff }:
1+{ stdenv, fetchurl, libtiff, libjpeg, proj, zlib}:
22
3−stdenv.mkDerivation {
4− name = "libgeotiff-1.2.5";
3+stdenv.mkDerivation rec {
4+ version = "1.4.2";
5+ name = "libgeotiff-${version}";
56
67 src = fetchurl {
7− url = http://download.osgeo.org/geotiff/libgeotiff/libgeotiff-1.2.5.tar.gz;
8− sha256 = "0z2yx77pm0zs81hc0b4lwzdd5s0rxcbylnscgq80b649src1fyzj";
8+ url = "http://download.osgeo.org/geotiff/libgeotiff/${name}.tar.gz";
9+ sha256 = "0vjy3bwfhljjx66p9w999i4mdhsf7vjshx29yc3pn5livf5091xd";
910 };
1011
11− buildInputs = [ libtiff ];
12+ configureFlags = [
13+ "--with-jpeg=${libjpeg.dev}"
14+ "--with-zlib=${zlib.dev}"
15+ ];
16+ buildInputs = [ libtiff proj ];
1217
1318 hardeningDisable = [ "format" ];
1419
pkgs/development/libraries/liblastfmSF/default.nix+3−3
@@ -1,15 +1,15 @@
11{ stdenv, fetchurl, pkgconfig, curl, openssl }:
22
33stdenv.mkDerivation rec {
4− name = "liblastfm-SF-0.3.2";
4+ name = "liblastfm-SF-0.5";
55
66 buildInputs = [ pkgconfig ];
77
88 propagatedBuildInputs = [ curl openssl ];
99
1010 src = fetchurl {
11− url = "mirror://sourceforge/liblastfm/liblastfm-0.3.2.tar.gz";
12− sha256 = "1hk62giysi96h6cyjyph69nlv1v4vw45w3sx7i2m89i9aysd6qp7";
11+ url = "mirror://sourceforge/liblastfm/libclastfm-0.5.tar.gz";
12+ sha256 = "0hpfflvfx6r4vvsbvdc564gkby8kr07p8ma7hgpxiy2pnlbpian9";
1313 };
1414
1515 meta = {
pkgs/development/libraries/minmay/default.nixdeleted−19
@@ -1,19 +0,0 @@
1−{ stdenv, fetchurl, cmake, openssl }:
2−
3−stdenv.mkDerivation rec {
4− name = "minmay-${version}";
5− version = "1.0.0";
6−
7− src = fetchurl {
8− url = "https://github.com/mazhe/minmay/archive/1.0.0.tar.gz";
9− sha256 = "1amycxvhbd0lv6j5zsvxiwrx29jvndcy856j3b3bisys24h95zw2";
10− };
11−
12− buildInputs = [ cmake openssl ];
13−
14− meta = {
15− homepage = "https://github.com/mazhe/minmay";
16− license = stdenv.lib.licenses.lgpl21Plus;
17− description = "An XMPP library (forked from the iksemel project)";
18− };
19−}
pkgs/development/libraries/nvidia-texture-tools/default.nix+23−25
@@ -1,43 +1,41 @@
1−{ stdenv, fetchsvn, cmake, libpng, ilmbase, libtiff, zlib, libjpeg
2−, mesa, libX11
3−}:
1+{ stdenv, fetchFromGitHub, cmake }:
42
53stdenv.mkDerivation rec {
6− # No support yet for cg, cuda, glew, glut, openexr.
7−
8− name = "nvidia-texture-tools-1388";
9−
10− src = fetchsvn {
11− url = "http://nvidia-texture-tools.googlecode.com/svn/trunk";
12− rev = "1388";
13− sha256 = "0pwxqx5l16nqidzm6mwd3rd4gbbknkz6q8cxnvf7sggjpbcvm2d6";
4+ name = "nvidia-texture-tools-${version}";
5+ version = "2.1.0";
6+
7+ src = fetchFromGitHub {
8+ owner = "castano";
9+ repo = "nvidia-texture-tools";
10+ rev = version;
11+ sha256 = "0p8ja0k323nkgm07z0qlslg6743vimy9rf3wad2968az0vwzjjyx";
1412 };
1513
16− buildInputs = [ cmake libpng ilmbase libtiff zlib libjpeg mesa libX11 ];
14+ nativeBuildInputs = [ cmake ];
1715
18− hardeningDisable = [ "format" ];
19−
20− patchPhase = ''
21− # Fix build due to missing dependnecies.
22− echo 'target_link_libraries(bc7 nvmath)' >> src/nvtt/bc7/CMakeLists.txt
23− echo 'target_link_libraries(bc6h nvmath)' >> src/nvtt/bc6h/CMakeLists.txt
16+ outputs = [ "out" "dev" "lib" ];
2417
18+ postPatch = ''
2519 # Make a recently added pure virtual function just virtual,
2620 # to keep compatibility.
2721 sed -i 's/virtual void endImage() = 0;/virtual void endImage() {}/' src/nvtt/nvtt.h
28−
29− # Fix building shared libraries.
30− sed -i 's/SET(NVIMAGE_SHARED TRUE)/SET(NVIMAGE_SHARED TRUE)\nSET(NVTHREAD_SHARED TRUE)/' CMakeLists.txt
3122 '';
3223
3324 cmakeFlags = [
3425 "-DNVTT_SHARED=TRUE"
3526 ];
3627
37− meta = {
28+ postInstall = ''
29+ moveToOutput include "$dev"
30+ moveToOutput lib "$lib"
31+ '';
32+
33+ enableParallelBuilding = true;
34+
35+ meta = with stdenv.lib; {
3836 description = "A set of cuda-enabled texture tools and compressors";
39− homepage = "http://developer.nvidia.com/object/texture_tools.html";
40− license = stdenv.lib.licenses.mit;
41− platforms = stdenv.lib.platforms.linux;
37+ homepage = "https://github.com/castano/nvidia-texture-tools";
38+ license = licenses.mit;
39+ platforms = platforms.linux;
4240 };
4341}
pkgs/development/libraries/openjpeg/2.0.nixdeleted−8
@@ -1,8 +0,0 @@
1−{ callPackage, ... } @ args:
2−
3−callPackage ./generic.nix (args // rec {
4− version = "2.0.1";
5− branch = "2";
6− revision = "version.2.0.1";
7− sha256 = "03d0r8x66cxri9i20nr9gm1jnkp85yyd8mkrbmawv5nvybd0r7wv";
8−})
pkgs/development/libraries/qjson/default.nix+8−5
@@ -1,11 +1,14 @@
1−{ stdenv, fetchurl, cmake, qt4 }:
1+{ stdenv, fetchFromGitHub, cmake, qt4 }:
22
33stdenv.mkDerivation rec {
4− name = "qjson-0.8.1";
4+ version = "0.8.1";
5+ name = "qjson-${version}";
56
6− src = fetchurl {
7− url = "mirror://sourceforge/qjson/${name}.tar.bz2";
8− sha256 = "1n8lr2ph08yhcgimf4q1pnkd4z15v895bsf3m68ljz14aswvakfd";
7+ src = fetchFromGitHub {
8+ owner = "flavio";
9+ repo = "qjson";
10+ rev = "${version}";
11+ sha256 = "1rb3ydrhyd4bczqzfv0kqpi2mx4hlpq1k8jvnwpcmvyaypqpqg59";
912 };
1013
1114 buildInputs = [ cmake qt4 ];
pkgs/development/libraries/qt-5/5.6/default.nix+1−1
@@ -94,7 +94,7 @@ let
9494 qttranslations = callPackage ./qttranslations.nix {};
9595 qtwayland = callPackage ./qtwayland.nix {};
9696 qtwebchannel = callPackage ./qtwebchannel.nix {};
97− qtwebengine = callPackage ./qtwebengine.nix {};
97+ qtwebengine = callPackage ./qtwebengine {};
9898 qtwebkit = callPackage ./qtwebkit {};
9999 qtwebsockets = callPackage ./qtwebsockets.nix {};
100100 /* qtwinextras = not packaged */
pkgs/development/libraries/qt-5/5.6/qtwebengine/chromium-clang-update-py.patchnew file+874
@@ -0,0 +1,874 @@
1+--- a/src/3rdparty/chromium/tools/clang/scripts/update.py 2016-05-26 04:58:54.000000000 -0800
2++++ b/src/3rdparty/chromium/tools/clang/scripts/update.py 2016-11-04 08:35:34.956154012 -0800
3+@@ -3,12 +3,12 @@
4+ # Use of this source code is governed by a BSD-style license that can be
5+ # found in the LICENSE file.
6+
7+-"""Windows can't run .sh files, so this is a Python implementation of
8+-update.sh. This script should replace update.sh on all platforms eventually."""
9++"""This script is used to download prebuilt clang binaries.
10++
11++It is also used by package.py to build the prebuilt clang binaries."""
12+
13+ import argparse
14+-import contextlib
15+-import cStringIO
16++import distutils.spawn
17+ import glob
18+ import os
19+ import pipes
20+@@ -18,6 +18,7 @@
21+ import stat
22+ import sys
23+ import tarfile
24++import tempfile
25+ import time
26+ import urllib2
27+ import zipfile
28+@@ -25,19 +26,16 @@
29+ # Do NOT CHANGE this if you don't know what you're doing -- see
30+ # https://code.google.com/p/chromium/wiki/UpdatingClang
31+ # Reverting problematic clang rolls is safe, though.
32+-# Note: this revision is only used for Windows. Other platforms use update.sh.
33+-# TODO(thakis): Use the same revision on Windows and non-Windows.
34+-# TODO(thakis): Remove update.sh, use update.py everywhere.
35+-LLVM_WIN_REVISION = '239674'
36++CLANG_REVISION = '239674'
37+
38+ use_head_revision = 'LLVM_FORCE_HEAD_REVISION' in os.environ
39+ if use_head_revision:
40+- LLVM_WIN_REVISION = 'HEAD'
41++ CLANG_REVISION = 'HEAD'
42+
43+ # This is incremented when pushing a new build of Clang at the same revision.
44+ CLANG_SUB_REVISION=1
45+
46+-PACKAGE_VERSION = "%s-%s" % (LLVM_WIN_REVISION, CLANG_SUB_REVISION)
47++PACKAGE_VERSION = "%s-%s" % (CLANG_REVISION, CLANG_SUB_REVISION)
48+
49+ # Path constants. (All of these should be absolute paths.)
50+ THIS_DIR = os.path.abspath(os.path.dirname(__file__))
51+@@ -50,17 +48,26 @@
52+ CHROME_TOOLS_SHIM_DIR = os.path.join(LLVM_DIR, 'tools', 'chrometools')
53+ LLVM_BUILD_DIR = os.path.join(CHROMIUM_DIR, 'third_party', 'llvm-build',
54+ 'Release+Asserts')
55+-COMPILER_RT_BUILD_DIR = os.path.join(LLVM_BUILD_DIR, '32bit-compiler-rt')
56++COMPILER_RT_BUILD_DIR = os.path.join(LLVM_BUILD_DIR, 'compiler-rt')
57+ CLANG_DIR = os.path.join(LLVM_DIR, 'tools', 'clang')
58+ LLD_DIR = os.path.join(LLVM_DIR, 'tools', 'lld')
59+-COMPILER_RT_DIR = os.path.join(LLVM_DIR, 'projects', 'compiler-rt')
60++# compiler-rt is built as part of the regular LLVM build on Windows to get
61++# the 64-bit runtime, and out-of-tree elsewhere.
62++# TODO(thakis): Try to unify this.
63++if sys.platform == 'win32':
64++ COMPILER_RT_DIR = os.path.join(LLVM_DIR, 'projects', 'compiler-rt')
65++else:
66++ COMPILER_RT_DIR = os.path.join(LLVM_DIR, 'compiler-rt')
67+ LIBCXX_DIR = os.path.join(LLVM_DIR, 'projects', 'libcxx')
68+ LIBCXXABI_DIR = os.path.join(LLVM_DIR, 'projects', 'libcxxabi')
69+ LLVM_BUILD_TOOLS_DIR = os.path.abspath(
70+ os.path.join(LLVM_DIR, '..', 'llvm-build-tools'))
71+-STAMP_FILE = os.path.join(LLVM_DIR, '..', 'llvm-build', 'cr_build_revision')
72++STAMP_FILE = os.path.normpath(
73++ os.path.join(LLVM_DIR, '..', 'llvm-build', 'cr_build_revision'))
74+ BINUTILS_DIR = os.path.join(THIRD_PARTY_DIR, 'binutils')
75+-VERSION = '3.7.0'
76++VERSION = '3.8.0'
77++ANDROID_NDK_DIR = os.path.join(
78++ CHROMIUM_DIR, 'third_party', 'android_tools', 'ndk')
79+
80+ # URL for pre-built binaries.
81+ CDS_URL = 'https://commondatastorage.googleapis.com/chromium-browser-clang'
82+@@ -74,40 +81,75 @@
83+ """Download url into output_file."""
84+ CHUNK_SIZE = 4096
85+ TOTAL_DOTS = 10
86+- sys.stdout.write('Downloading %s ' % url)
87+- sys.stdout.flush()
88+- response = urllib2.urlopen(url)
89+- total_size = int(response.info().getheader('Content-Length').strip())
90+- bytes_done = 0
91+- dots_printed = 0
92++ num_retries = 3
93++ retry_wait_s = 5 # Doubled at each retry.
94++
95+ while True:
96+- chunk = response.read(CHUNK_SIZE)
97+- if not chunk:
98+- break
99+- output_file.write(chunk)
100+- bytes_done += len(chunk)
101+- num_dots = TOTAL_DOTS * bytes_done / total_size
102+- sys.stdout.write('.' * (num_dots - dots_printed))
103+- sys.stdout.flush()
104+- dots_printed = num_dots
105+- print ' Done.'
106++ try:
107++ sys.stdout.write('Downloading %s ' % url)
108++ sys.stdout.flush()
109++ response = urllib2.urlopen(url)
110++ total_size = int(response.info().getheader('Content-Length').strip())
111++ bytes_done = 0
112++ dots_printed = 0
113++ while True:
114++ chunk = response.read(CHUNK_SIZE)
115++ if not chunk:
116++ break
117++ output_file.write(chunk)
118++ bytes_done += len(chunk)
119++ num_dots = TOTAL_DOTS * bytes_done / total_size
120++ sys.stdout.write('.' * (num_dots - dots_printed))
121++ sys.stdout.flush()
122++ dots_printed = num_dots
123++ if bytes_done != total_size:
124++ raise urllib2.URLError("only got %d of %d bytes" %
125++ (bytes_done, total_size))
126++ print ' Done.'
127++ return
128++ except urllib2.URLError as e:
129++ sys.stdout.write('\n')
130++ print e
131++ if num_retries == 0 or isinstance(e, urllib2.HTTPError) and e.code == 404:
132++ raise e
133++ num_retries -= 1
134++ print 'Retrying in %d s ...' % retry_wait_s
135++ time.sleep(retry_wait_s)
136++ retry_wait_s *= 2
137++
138++
139++def EnsureDirExists(path):
140++ if not os.path.exists(path):
141++ print "Creating directory %s" % path
142++ os.makedirs(path)
143++
144++
145++def DownloadAndUnpack(url, output_dir):
146++ with tempfile.TemporaryFile() as f:
147++ DownloadUrl(url, f)
148++ f.seek(0)
149++ EnsureDirExists(output_dir)
150++ if url.endswith('.zip'):
151++ zipfile.ZipFile(f).extractall(path=output_dir)
152++ else:
153++ tarfile.open(mode='r:gz', fileobj=f).extractall(path=output_dir)
154+
155+
156+ def ReadStampFile():
157+ """Return the contents of the stamp file, or '' if it doesn't exist."""
158+ try:
159+ with open(STAMP_FILE, 'r') as f:
160+- return f.read()
161++ return f.read().rstrip()
162+ except IOError:
163+ return ''
164+
165+
166+ def WriteStampFile(s):
167+ """Write s to the stamp file."""
168+- if not os.path.exists(os.path.dirname(STAMP_FILE)):
169+- os.makedirs(os.path.dirname(STAMP_FILE))
170++ EnsureDirExists(os.path.dirname(STAMP_FILE))
171+ with open(STAMP_FILE, 'w') as f:
172+ f.write(s)
173++ f.write('\n')
174+
175+
176+ def GetSvnRevision(svn_repo):
177+@@ -129,6 +171,13 @@
178+ shutil.rmtree(dir, onerror=ChmodAndRetry)
179+
180+
181++def RmCmakeCache(dir):
182++ """Delete CMakeCache.txt files under dir recursively."""
183++ for dirpath, _, files in os.walk(dir):
184++ if 'CMakeCache.txt' in files:
185++ os.remove(os.path.join(dirpath, 'CMakeCache.txt'))
186++
187++
188+ def RunCommand(command, msvc_arch=None, env=None, fail_hard=True):
189+ """Run command and return success (True) or failure; or if fail_hard is
190+ True, exit on failure. If msvc_arch is set, runs the command in a
191+@@ -170,8 +219,8 @@
192+ def CopyDirectoryContents(src, dst, filename_filter=None):
193+ """Copy the files from directory src to dst
194+ with an optional filename filter."""
195+- if not os.path.exists(dst):
196+- os.makedirs(dst)
197++ dst = os.path.realpath(dst) # realpath() in case dst ends in /..
198++ EnsureDirExists(dst)
199+ for root, _, files in os.walk(src):
200+ for f in files:
201+ if filename_filter and not re.match(filename_filter, f):
202+@@ -181,9 +230,9 @@
203+
204+ def Checkout(name, url, dir):
205+ """Checkout the SVN module at url into dir. Use name for the log message."""
206+- print "Checking out %s r%s into '%s'" % (name, LLVM_WIN_REVISION, dir)
207++ print "Checking out %s r%s into '%s'" % (name, CLANG_REVISION, dir)
208+
209+- command = ['svn', 'checkout', '--force', url + '@' + LLVM_WIN_REVISION, dir]
210++ command = ['svn', 'checkout', '--force', url + '@' + CLANG_REVISION, dir]
211+ if RunCommand(command, fail_hard=False):
212+ return
213+
214+@@ -195,120 +244,9 @@
215+ RunCommand(command)
216+
217+
218+-def RevertPreviouslyPatchedFiles():
219+- print 'Reverting previously patched files'
220+- files = [
221+- '%(clang)s/test/Index/crash-recovery-modules.m',
222+- '%(clang)s/unittests/libclang/LibclangTest.cpp',
223+- '%(compiler_rt)s/lib/asan/asan_rtl.cc',
224+- '%(compiler_rt)s/test/asan/TestCases/Linux/new_array_cookie_test.cc',
225+- '%(llvm)s/test/DebugInfo/gmlt.ll',
226+- '%(llvm)s/lib/CodeGen/SpillPlacement.cpp',
227+- '%(llvm)s/lib/CodeGen/SpillPlacement.h',
228+- '%(llvm)s/lib/Transforms/Instrumentation/MemorySanitizer.cpp',
229+- '%(clang)s/test/Driver/env.c',
230+- '%(clang)s/lib/Frontend/InitPreprocessor.cpp',
231+- '%(clang)s/test/Frontend/exceptions.c',
232+- '%(clang)s/test/Preprocessor/predefined-exceptions.m',
233+- '%(llvm)s/test/Bindings/Go/go.test',
234+- '%(clang)s/lib/Parse/ParseExpr.cpp',
235+- '%(clang)s/lib/Parse/ParseTemplate.cpp',
236+- '%(clang)s/lib/Sema/SemaDeclCXX.cpp',
237+- '%(clang)s/lib/Sema/SemaExprCXX.cpp',
238+- '%(clang)s/test/SemaCXX/default2.cpp',
239+- '%(clang)s/test/SemaCXX/typo-correction-delayed.cpp',
240+- '%(compiler_rt)s/lib/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc',
241+- '%(compiler_rt)s/test/tsan/signal_segv_handler.cc',
242+- '%(compiler_rt)s/lib/sanitizer_common/sanitizer_coverage_libcdep.cc',
243+- '%(compiler_rt)s/cmake/config-ix.cmake',
244+- '%(compiler_rt)s/CMakeLists.txt',
245+- '%(compiler_rt)s/lib/ubsan/ubsan_platform.h',
246+- ]
247+- for f in files:
248+- f = f % {
249+- 'clang': CLANG_DIR,
250+- 'compiler_rt': COMPILER_RT_DIR,
251+- 'llvm': LLVM_DIR,
252+- }
253+- if os.path.exists(f):
254+- os.remove(f) # For unversioned files.
255+- RunCommand(['svn', 'revert', f])
256+-
257+-
258+-def ApplyLocalPatches():
259+- # There's no patch program on Windows by default. We don't need patches on
260+- # Windows yet, and maybe this not working on Windows will motivate us to
261+- # remove patches over time.
262+- assert sys.platform != 'win32'
263+-
264+- # Apply patch for tests failing with --disable-pthreads (llvm.org/PR11974)
265+- clang_patches = [ r"""\
266+---- test/Index/crash-recovery-modules.m (revision 202554)
267+-+++ test/Index/crash-recovery-modules.m (working copy)
268+-@@ -12,6 +12,8 @@
269+-
270+- // REQUIRES: crash-recovery
271+- // REQUIRES: shell
272+-+// XFAIL: *
273+-+// (PR11974)
274+-
275+- @import Crash;
276+-""", r"""\
277+---- unittests/libclang/LibclangTest.cpp (revision 215949)
278+-+++ unittests/libclang/LibclangTest.cpp (working copy)
279+-@@ -431,7 +431,7 @@
280+- EXPECT_EQ(0U, clang_getNumDiagnostics(ClangTU));
281+- }
282+-
283+--TEST_F(LibclangReparseTest, ReparseWithModule) {
284+-+TEST_F(LibclangReparseTest, DISABLED_ReparseWithModule) {
285+- const char *HeaderTop = "#ifndef H\n#define H\nstruct Foo { int bar;";
286+- const char *HeaderBottom = "\n};\n#endif\n";
287+- const char *MFile = "#include \"HeaderFile.h\"\nint main() {"
288+-"""
289+- ]
290+-
291+- # This Go bindings test doesn't work after bootstrap on Linux, PR21552.
292+- llvm_patches = [ r"""\
293+---- test/Bindings/Go/go.test (revision 223109)
294+-+++ test/Bindings/Go/go.test (working copy)
295+-@@ -1,3 +1,3 @@
296+--; RUN: llvm-go test llvm.org/llvm/bindings/go/llvm
297+-+; RUN: true
298+-
299+- ; REQUIRES: shell
300+-"""
301+- ]
302+-
303+- # The UBSan run-time, which is now bundled with the ASan run-time, doesn't
304+- # work on Mac OS X 10.8 (PR23539).
305+- compiler_rt_patches = [ r"""\
306+---- CMakeLists.txt (revision 241602)
307+-+++ CMakeLists.txt (working copy)
308+-@@ -305,6 +305,7 @@
309+- list(APPEND SANITIZER_COMMON_SUPPORTED_OS iossim)
310+- endif()
311+- endif()
312+-+ set(SANITIZER_MIN_OSX_VERSION "10.7")
313+- if(SANITIZER_MIN_OSX_VERSION VERSION_LESS "10.7")
314+- message(FATAL_ERROR "Too old OS X version: ${SANITIZER_MIN_OSX_VERSION}")
315+- endif()
316+-"""
317+- ]
318+-
319+- for path, patches in [(LLVM_DIR, llvm_patches),
320+- (CLANG_DIR, clang_patches),
321+- (COMPILER_RT_DIR, compiler_rt_patches)]:
322+- print 'Applying patches in', path
323+- for patch in patches:
324+- print patch
325+- p = subprocess.Popen( ['patch', '-p0', '-d', path], stdin=subprocess.PIPE)
326+- (stdout, stderr) = p.communicate(input=patch)
327+- if p.returncode != 0:
328+- raise RuntimeError('stdout %s, stderr %s' % (stdout, stderr))
329+-
330+-
331+ def DeleteChromeToolsShim():
332++ OLD_SHIM_DIR = os.path.join(LLVM_DIR, 'tools', 'zzz-chrometools')
333++ shutil.rmtree(OLD_SHIM_DIR, ignore_errors=True)
334+ shutil.rmtree(CHROME_TOOLS_SHIM_DIR, ignore_errors=True)
335+
336+
337+@@ -337,6 +275,25 @@
338+ f.write('endif (CHROMIUM_TOOLS_SRC)\n')
339+
340+
341++def MaybeDownloadHostGcc(args):
342++ """Downloads gcc 4.8.2 if needed and makes sure args.gcc_toolchain is set."""
343++ if not sys.platform.startswith('linux') or args.gcc_toolchain:
344++ return
345++
346++ if subprocess.check_output(['gcc', '-dumpversion']).rstrip() < '4.7.0':
347++ # We need a newer gcc version.
348++ gcc_dir = os.path.join(LLVM_BUILD_TOOLS_DIR, 'gcc482precise')
349++ if not os.path.exists(gcc_dir):
350++ print 'Downloading pre-built GCC 4.8.2...'
351++ DownloadAndUnpack(
352++ CDS_URL + '/tools/gcc482precise.tgz', LLVM_BUILD_TOOLS_DIR)
353++ args.gcc_toolchain = gcc_dir
354++ else:
355++ # Always set gcc_toolchain; llvm-symbolizer needs the bundled libstdc++.
356++ args.gcc_toolchain = \
357++ os.path.dirname(os.path.dirname(distutils.spawn.find_executable('gcc')))
358++
359++
360+ def AddCMakeToPath():
361+ """Download CMake and add it to PATH."""
362+ if sys.platform == 'win32':
363+@@ -345,20 +302,10 @@
364+ 'cmake-3.2.2-win32-x86', 'bin')
365+ else:
366+ suffix = 'Darwin' if sys.platform == 'darwin' else 'Linux'
367+- zip_name = 'cmake310_%s.tgz' % suffix
368+- cmake_dir = os.path.join(LLVM_BUILD_TOOLS_DIR, 'cmake310', 'bin')
369++ zip_name = 'cmake322_%s.tgz' % suffix
370++ cmake_dir = os.path.join(LLVM_BUILD_TOOLS_DIR, 'cmake322', 'bin')
371+ if not os.path.exists(cmake_dir):
372+- if not os.path.exists(LLVM_BUILD_TOOLS_DIR):
373+- os.makedirs(LLVM_BUILD_TOOLS_DIR)
374+- # The cmake archive is smaller than 20 MB, small enough to keep in memory:
375+- with contextlib.closing(cStringIO.StringIO()) as f:
376+- DownloadUrl(CDS_URL + '/tools/' + zip_name, f)
377+- f.seek(0)
378+- if zip_name.endswith('.zip'):
379+- zipfile.ZipFile(f).extractall(path=LLVM_BUILD_TOOLS_DIR)
380+- else:
381+- tarfile.open(mode='r:gz', fileobj=f).extractall(path=
382+- LLVM_BUILD_TOOLS_DIR)
383++ DownloadAndUnpack(CDS_URL + '/tools/' + zip_name, LLVM_BUILD_TOOLS_DIR)
384+ os.environ['PATH'] = cmake_dir + os.pathsep + os.environ.get('PATH', '')
385+
386+ vs_version = None
387+@@ -383,37 +330,61 @@
388+
389+ def UpdateClang(args):
390+ print 'Updating Clang to %s...' % PACKAGE_VERSION
391+- if ReadStampFile() == PACKAGE_VERSION:
392+- print 'Already up to date.'
393+- return 0
394++
395++ need_gold_plugin = 'LLVM_DOWNLOAD_GOLD_PLUGIN' in os.environ or (
396++ sys.platform.startswith('linux') and
397++ 'buildtype=Official' in os.environ.get('GYP_DEFINES', '') and
398++ 'branding=Chrome' in os.environ.get('GYP_DEFINES', ''))
399++
400++ if ReadStampFile() == PACKAGE_VERSION and not args.force_local_build:
401++ print 'Clang is already up to date.'
402++ if not need_gold_plugin or os.path.exists(
403++ os.path.join(LLVM_BUILD_DIR, "lib/LLVMgold.so")):
404++ return 0
405+
406+ # Reset the stamp file in case the build is unsuccessful.
407+ WriteStampFile('')
408+
409+ if not args.force_local_build:
410+ cds_file = "clang-%s.tgz" % PACKAGE_VERSION
411+- cds_full_url = CDS_URL + '/Win/' + cds_file
412++ if sys.platform == 'win32':
413++ cds_full_url = CDS_URL + '/Win/' + cds_file
414++ elif sys.platform == 'darwin':
415++ cds_full_url = CDS_URL + '/Mac/' + cds_file
416++ else:
417++ assert sys.platform.startswith('linux')
418++ cds_full_url = CDS_URL + '/Linux_x64/' + cds_file
419+
420+- # Check if there's a prebuilt binary and if so just fetch that. That's
421+- # faster, and goma relies on having matching binary hashes on client and
422+- # server too.
423+- print 'Trying to download prebuilt clang'
424+-
425+- # clang packages are smaller than 50 MB, small enough to keep in memory.
426+- with contextlib.closing(cStringIO.StringIO()) as f:
427+- try:
428+- DownloadUrl(cds_full_url, f)
429+- f.seek(0)
430+- tarfile.open(mode='r:gz', fileobj=f).extractall(path=LLVM_BUILD_DIR)
431+- print 'clang %s unpacked' % PACKAGE_VERSION
432+- WriteStampFile(PACKAGE_VERSION)
433+- return 0
434+- except urllib2.HTTPError:
435+- print 'Did not find prebuilt clang %s, building locally' % cds_file
436++ print 'Downloading prebuilt clang'
437++ if os.path.exists(LLVM_BUILD_DIR):
438++ RmTree(LLVM_BUILD_DIR)
439++ try:
440++ DownloadAndUnpack(cds_full_url, LLVM_BUILD_DIR)
441++ print 'clang %s unpacked' % PACKAGE_VERSION
442++ # Download the gold plugin if requested to by an environment variable.
443++ # This is used by the CFI ClusterFuzz bot, and it's required for official
444++ # builds on linux.
445++ if need_gold_plugin:
446++ RunCommand(['python', CHROMIUM_DIR+'/build/download_gold_plugin.py'])
447++ WriteStampFile(PACKAGE_VERSION)
448++ return 0
449++ except urllib2.URLError:
450++ print 'Failed to download prebuilt clang %s' % cds_file
451++ print 'Use --force-local-build if you want to build locally.'
452++ print 'Exiting.'
453++ return 1
454++
455++ if args.with_android and not os.path.exists(ANDROID_NDK_DIR):
456++ print 'Android NDK not found at ' + ANDROID_NDK_DIR
457++ print 'The Android NDK is needed to build a Clang whose -fsanitize=address'
458++ print 'works on Android. See '
459++ print 'http://code.google.com/p/chromium/wiki/AndroidBuildInstructions'
460++ print 'for how to install the NDK, or pass --without-android.'
461++ return 1
462+
463++ MaybeDownloadHostGcc(args)
464+ AddCMakeToPath()
465+
466+- RevertPreviouslyPatchedFiles()
467+ DeleteChromeToolsShim()
468+
469+ Checkout('LLVM', LLVM_REPO_URL + '/llvm/trunk', LLVM_DIR)
470+@@ -429,10 +400,24 @@
471+ # into it too (since OS X 10.6 doesn't have libc++abi.dylib either).
472+ Checkout('libcxxabi', LLVM_REPO_URL + '/libcxxabi/trunk', LIBCXXABI_DIR)
473+
474+- if args.with_patches and sys.platform != 'win32':
475+- ApplyLocalPatches()
476+-
477+ cc, cxx = None, None
478++ libstdcpp = None
479++ if args.gcc_toolchain: # This option is only used on Linux.
480++ # Use the specified gcc installation for building.
481++ cc = os.path.join(args.gcc_toolchain, 'bin', 'gcc')
482++ cxx = os.path.join(args.gcc_toolchain, 'bin', 'g++')
483++
484++ if not os.access(cc, os.X_OK):
485++ print 'Invalid --gcc-toolchain: "%s"' % args.gcc_toolchain
486++ print '"%s" does not appear to be valid.' % cc
487++ return 1
488++
489++ # Set LD_LIBRARY_PATH to make auxiliary targets (tablegen, bootstrap
490++ # compiler, etc.) find the .so.
491++ libstdcpp = subprocess.check_output(
492++ [cxx, '-print-file-name=libstdc++.so.6']).rstrip()
493++ os.environ['LD_LIBRARY_PATH'] = os.path.dirname(libstdcpp)
494++
495+ cflags = cxxflags = ldflags = []
496+
497+ # LLVM uses C++11 starting in llvm 3.5. On Linux, this means libstdc++4.7+ is
498+@@ -462,8 +447,7 @@
499+
500+ if args.bootstrap:
501+ print 'Building bootstrap compiler'
502+- if not os.path.exists(LLVM_BOOTSTRAP_DIR):
503+- os.makedirs(LLVM_BOOTSTRAP_DIR)
504++ EnsureDirExists(LLVM_BOOTSTRAP_DIR)
505+ os.chdir(LLVM_BOOTSTRAP_DIR)
506+ bootstrap_args = base_cmake_args + [
507+ '-DLLVM_TARGETS_TO_BUILD=host',
508+@@ -473,11 +457,16 @@
509+ ]
510+ if cc is not None: bootstrap_args.append('-DCMAKE_C_COMPILER=' + cc)
511+ if cxx is not None: bootstrap_args.append('-DCMAKE_CXX_COMPILER=' + cxx)
512++ RmCmakeCache('.')
513+ RunCommand(['cmake'] + bootstrap_args + [LLVM_DIR], msvc_arch='x64')
514+ RunCommand(['ninja'], msvc_arch='x64')
515+ if args.run_tests:
516+ RunCommand(['ninja', 'check-all'], msvc_arch='x64')
517+ RunCommand(['ninja', 'install'], msvc_arch='x64')
518++ if args.gcc_toolchain:
519++ # Copy that gcc's stdlibc++.so.6 to the build dir, so the bootstrap
520++ # compiler can start.
521++ CopyFile(libstdcpp, os.path.join(LLVM_BOOTSTRAP_INSTALL_DIR, 'lib'))
522+
523+ if sys.platform == 'win32':
524+ cc = os.path.join(LLVM_BOOTSTRAP_INSTALL_DIR, 'bin', 'clang-cl.exe')
525+@@ -489,6 +478,12 @@
526+ else:
527+ cc = os.path.join(LLVM_BOOTSTRAP_INSTALL_DIR, 'bin', 'clang')
528+ cxx = os.path.join(LLVM_BOOTSTRAP_INSTALL_DIR, 'bin', 'clang++')
529++
530++ if args.gcc_toolchain:
531++ # Tell the bootstrap compiler to use a specific gcc prefix to search
532++ # for standard library headers and shared object files.
533++ cflags = ['--gcc-toolchain=' + args.gcc_toolchain]
534++ cxxflags = ['--gcc-toolchain=' + args.gcc_toolchain]
535+ print 'Building final compiler'
536+
537+ if sys.platform == 'darwin':
538+@@ -543,7 +538,7 @@
539+ binutils_incdir = os.path.join(BINUTILS_DIR, 'Linux_x64/Release/include')
540+
541+ # If building at head, define a macro that plugins can use for #ifdefing
542+- # out code that builds at head, but not at LLVM_WIN_REVISION or vice versa.
543++ # out code that builds at head, but not at CLANG_REVISION or vice versa.
544+ if use_head_revision:
545+ cflags += ['-DLLVM_FORCE_HEAD_REVISION']
546+ cxxflags += ['-DLLVM_FORCE_HEAD_REVISION']
547+@@ -555,8 +550,15 @@
548+ deployment_env = os.environ.copy()
549+ deployment_env['MACOSX_DEPLOYMENT_TARGET'] = deployment_target
550+
551+- cmake_args = base_cmake_args + [
552++ cmake_args = []
553++ # TODO(thakis): Unconditionally append this to base_cmake_args instead once
554++ # compiler-rt can build with clang-cl on Windows (http://llvm.org/PR23698)
555++ cc_args = base_cmake_args if sys.platform != 'win32' else cmake_args
556++ if cc is not None: cc_args.append('-DCMAKE_C_COMPILER=' + cc)
557++ if cxx is not None: cc_args.append('-DCMAKE_CXX_COMPILER=' + cxx)
558++ cmake_args += base_cmake_args + [
559+ '-DLLVM_BINUTILS_INCDIR=' + binutils_incdir,
560++ '-DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD=WebAssembly',
561+ '-DCMAKE_C_FLAGS=' + ' '.join(cflags),
562+ '-DCMAKE_CXX_FLAGS=' + ' '.join(cxxflags),
563+ '-DCMAKE_EXE_LINKER_FLAGS=' + ' '.join(ldflags),
564+@@ -565,35 +567,44 @@
565+ '-DCMAKE_INSTALL_PREFIX=' + LLVM_BUILD_DIR,
566+ '-DCHROMIUM_TOOLS_SRC=%s' % os.path.join(CHROMIUM_DIR, 'tools', 'clang'),
567+ '-DCHROMIUM_TOOLS=%s' % ';'.join(args.tools)]
568+- # TODO(thakis): Unconditionally append this to base_cmake_args instead once
569+- # compiler-rt can build with clang-cl on Windows (http://llvm.org/PR23698)
570+- cc_args = base_cmake_args if sys.platform != 'win32' else cmake_args
571+- if cc is not None: cc_args.append('-DCMAKE_C_COMPILER=' + cc)
572+- if cxx is not None: cc_args.append('-DCMAKE_CXX_COMPILER=' + cxx)
573+
574+- if not os.path.exists(LLVM_BUILD_DIR):
575+- os.makedirs(LLVM_BUILD_DIR)
576++ EnsureDirExists(LLVM_BUILD_DIR)
577+ os.chdir(LLVM_BUILD_DIR)
578++ RmCmakeCache('.')
579+ RunCommand(['cmake'] + cmake_args + [LLVM_DIR],
580+ msvc_arch='x64', env=deployment_env)
581+- RunCommand(['ninja'], msvc_arch='x64')
582++
583++ if args.gcc_toolchain:
584++ # Copy in the right stdlibc++.so.6 so clang can start.
585++ if not os.path.exists(os.path.join(LLVM_BUILD_DIR, 'lib')):
586++ os.mkdir(os.path.join(LLVM_BUILD_DIR, 'lib'))
587++ libstdcpp = subprocess.check_output(
588++ [cxx] + cxxflags + ['-print-file-name=libstdc++.so.6']).rstrip()
589++ CopyFile(libstdcpp, os.path.join(LLVM_BUILD_DIR, 'lib'))
590++
591++ # TODO(thakis): Remove "-d explain" once http://crbug.com/569337 is fixed.
592++ RunCommand(['ninja', '-d', 'explain'], msvc_arch='x64')
593+
594+ if args.tools:
595+ # If any Chromium tools were built, install those now.
596+ RunCommand(['ninja', 'cr-install'], msvc_arch='x64')
597+
598+ if sys.platform == 'darwin':
599+- CopyFile(os.path.join(LLVM_BUILD_DIR, 'libc++.1.dylib'),
600++ CopyFile(os.path.join(libcxxbuild, 'libc++.1.dylib'),
601+ os.path.join(LLVM_BUILD_DIR, 'bin'))
602+ # See http://crbug.com/256342
603+ RunCommand(['strip', '-x', os.path.join(LLVM_BUILD_DIR, 'bin', 'clang')])
604+ elif sys.platform.startswith('linux'):
605+ RunCommand(['strip', os.path.join(LLVM_BUILD_DIR, 'bin', 'clang')])
606+
607+- # Do an x86 build of compiler-rt to get the 32-bit ASan run-time.
608++ # Do an out-of-tree build of compiler-rt.
609++ # On Windows, this is used to get the 32-bit ASan run-time.
610+ # TODO(hans): Remove once the regular build above produces this.
611+- if not os.path.exists(COMPILER_RT_BUILD_DIR):
612+- os.makedirs(COMPILER_RT_BUILD_DIR)
613++ # On Mac and Linux, this is used to get the regular 64-bit run-time.
614++ # Do a clobbered build due to cmake changes.
615++ if os.path.isdir(COMPILER_RT_BUILD_DIR):
616++ RmTree(COMPILER_RT_BUILD_DIR)
617++ os.makedirs(COMPILER_RT_BUILD_DIR)
618+ os.chdir(COMPILER_RT_BUILD_DIR)
619+ # TODO(thakis): Add this once compiler-rt can build with clang-cl (see
620+ # above).
621+@@ -606,11 +617,17 @@
622+ '-DCMAKE_CXX_FLAGS=' + ' '.join(cxxflags)]
623+ if sys.platform != 'win32':
624+ compiler_rt_args += ['-DLLVM_CONFIG_PATH=' +
625+- os.path.join(LLVM_BUILD_DIR, 'bin', 'llvm-config')]
626+- RunCommand(['cmake'] + compiler_rt_args + [LLVM_DIR],
627+- msvc_arch='x86', env=deployment_env)
628++ os.path.join(LLVM_BUILD_DIR, 'bin', 'llvm-config'),
629++ '-DSANITIZER_MIN_OSX_VERSION="10.7"']
630++ # compiler-rt is part of the llvm checkout on Windows but a stand-alone
631++ # directory elsewhere, see the TODO above COMPILER_RT_DIR.
632++ RmCmakeCache('.')
633++ RunCommand(['cmake'] + compiler_rt_args +
634++ [LLVM_DIR if sys.platform == 'win32' else COMPILER_RT_DIR],
635++ msvc_arch='x86', env=deployment_env)
636+ RunCommand(['ninja', 'compiler-rt'], msvc_arch='x86')
637+
638++ # Copy select output to the main tree.
639+ # TODO(hans): Make this (and the .gypi and .isolate files) version number
640+ # independent.
641+ if sys.platform == 'win32':
642+@@ -620,17 +637,35 @@
643+ else:
644+ assert sys.platform.startswith('linux')
645+ platform = 'linux'
646+- asan_rt_lib_src_dir = os.path.join(COMPILER_RT_BUILD_DIR, 'lib', 'clang',
647+- VERSION, 'lib', platform)
648++ asan_rt_lib_src_dir = os.path.join(COMPILER_RT_BUILD_DIR, 'lib', platform)
649++ if sys.platform == 'win32':
650++ # TODO(thakis): This too is due to compiler-rt being part of the checkout
651++ # on Windows, see TODO above COMPILER_RT_DIR.
652++ asan_rt_lib_src_dir = os.path.join(COMPILER_RT_BUILD_DIR, 'lib', 'clang',
653++ VERSION, 'lib', platform)
654+ asan_rt_lib_dst_dir = os.path.join(LLVM_BUILD_DIR, 'lib', 'clang',
655+ VERSION, 'lib', platform)
656+- CopyDirectoryContents(asan_rt_lib_src_dir, asan_rt_lib_dst_dir,
657+- r'^.*-i386\.lib$')
658+- CopyDirectoryContents(asan_rt_lib_src_dir, asan_rt_lib_dst_dir,
659+- r'^.*-i386\.dll$')
660++ # Blacklists:
661++ CopyDirectoryContents(os.path.join(asan_rt_lib_src_dir, '..', '..'),
662++ os.path.join(asan_rt_lib_dst_dir, '..', '..'),
663++ r'^.*blacklist\.txt$')
664++ # Headers:
665++ if sys.platform != 'win32':
666++ CopyDirectoryContents(
667++ os.path.join(COMPILER_RT_BUILD_DIR, 'include/sanitizer'),
668++ os.path.join(LLVM_BUILD_DIR, 'lib/clang', VERSION, 'include/sanitizer'))
669++ # Static and dynamic libraries:
670++ CopyDirectoryContents(asan_rt_lib_src_dir, asan_rt_lib_dst_dir)
671++ if sys.platform == 'darwin':
672++ for dylib in glob.glob(os.path.join(asan_rt_lib_dst_dir, '*.dylib')):
673++ # Fix LC_ID_DYLIB for the ASan dynamic libraries to be relative to
674++ # @executable_path.
675++ # TODO(glider): this is transitional. We'll need to fix the dylib
676++ # name either in our build system, or in Clang. See also
677++ # http://crbug.com/344836.
678++ subprocess.call(['install_name_tool', '-id',
679++ '@executable_path/' + os.path.basename(dylib), dylib])
680+
681+- CopyFile(os.path.join(asan_rt_lib_src_dir, '..', '..', 'asan_blacklist.txt'),
682+- os.path.join(asan_rt_lib_dst_dir, '..', '..'))
683+
684+ if sys.platform == 'win32':
685+ # Make an extra copy of the sanitizer headers, to be put on the include path
686+@@ -640,22 +675,67 @@
687+ aux_sanitizer_include_dir = os.path.join(LLVM_BUILD_DIR, 'lib', 'clang',
688+ VERSION, 'include_sanitizer',
689+ 'sanitizer')
690+- if not os.path.exists(aux_sanitizer_include_dir):
691+- os.makedirs(aux_sanitizer_include_dir)
692++ EnsureDirExists(aux_sanitizer_include_dir)
693+ for _, _, files in os.walk(sanitizer_include_dir):
694+ for f in files:
695+ CopyFile(os.path.join(sanitizer_include_dir, f),
696+ aux_sanitizer_include_dir)
697+
698++ if args.with_android:
699++ make_toolchain = os.path.join(
700++ ANDROID_NDK_DIR, 'build', 'tools', 'make-standalone-toolchain.sh')
701++ for target_arch in ['aarch64', 'arm', 'i686']:
702++ # Make standalone Android toolchain for target_arch.
703++ toolchain_dir = os.path.join(
704++ LLVM_BUILD_DIR, 'android-toolchain-' + target_arch)
705++ RunCommand([
706++ make_toolchain,
707++ '--platform=android-' + ('21' if target_arch == 'aarch64' else '19'),
708++ '--install-dir="%s"' % toolchain_dir,
709++ '--system=linux-x86_64',
710++ '--stl=stlport',
711++ '--toolchain=' + {
712++ 'aarch64': 'aarch64-linux-android-4.9',
713++ 'arm': 'arm-linux-androideabi-4.9',
714++ 'i686': 'x86-4.9',
715++ }[target_arch]])
716++ # Android NDK r9d copies a broken unwind.h into the toolchain, see
717++ # http://crbug.com/357890
718++ for f in glob.glob(os.path.join(toolchain_dir, 'include/c++/*/unwind.h')):
719++ os.remove(f)
720++
721++ # Build ASan runtime for Android in a separate build tree.
722++ build_dir = os.path.join(LLVM_BUILD_DIR, 'android-' + target_arch)
723++ if not os.path.exists(build_dir):
724++ os.mkdir(os.path.join(build_dir))
725++ os.chdir(build_dir)
726++ cflags = ['--target=%s-linux-androideabi' % target_arch,
727++ '--sysroot=%s/sysroot' % toolchain_dir,
728++ '-B%s' % toolchain_dir]
729++ android_args = base_cmake_args + [
730++ '-DCMAKE_C_COMPILER=' + os.path.join(LLVM_BUILD_DIR, 'bin/clang'),
731++ '-DCMAKE_CXX_COMPILER=' + os.path.join(LLVM_BUILD_DIR, 'bin/clang++'),
732++ '-DLLVM_CONFIG_PATH=' + os.path.join(LLVM_BUILD_DIR, 'bin/llvm-config'),
733++ '-DCMAKE_C_FLAGS=' + ' '.join(cflags),
734++ '-DCMAKE_CXX_FLAGS=' + ' '.join(cflags),
735++ '-DANDROID=1']
736++ RmCmakeCache('.')
737++ RunCommand(['cmake'] + android_args + [COMPILER_RT_DIR])
738++ RunCommand(['ninja', 'libclang_rt.asan-%s-android.so' % target_arch])
739++
740++ # And copy it into the main build tree.
741++ runtime = 'libclang_rt.asan-%s-android.so' % target_arch
742++ for root, _, files in os.walk(build_dir):
743++ if runtime in files:
744++ shutil.copy(os.path.join(root, runtime), asan_rt_lib_dst_dir)
745++
746+ # Run tests.
747+ if args.run_tests or use_head_revision:
748+ os.chdir(LLVM_BUILD_DIR)
749+- RunCommand(GetVSVersion().SetupScript('x64') +
750+- ['&&', 'ninja', 'cr-check-all'])
751++ RunCommand(['ninja', 'cr-check-all'], msvc_arch='x64')
752+ if args.run_tests:
753+ os.chdir(LLVM_BUILD_DIR)
754+- RunCommand(GetVSVersion().SetupScript('x64') +
755+- ['&&', 'ninja', 'check-all'])
756++ RunCommand(['ninja', 'check-all'], msvc_arch='x64')
757+
758+ WriteStampFile(PACKAGE_VERSION)
759+ print 'Clang update was successful.'
760+@@ -663,31 +743,6 @@
761+
762+
763+ def main():
764+- if not sys.platform in ['win32', 'cygwin']:
765+- # For non-Windows, fall back to update.sh.
766+- # TODO(hans): Make update.py replace update.sh completely.
767+-
768+- # This script is called by gclient. gclient opens its hooks subprocesses
769+- # with (stdout=subprocess.PIPE, stderr=subprocess.STDOUT) and then does
770+- # custom output processing that breaks printing '\r' characters for
771+- # single-line updating status messages as printed by curl and wget.
772+- # Work around this by setting stderr of the update.sh process to stdin (!):
773+- # gclient doesn't redirect stdin, and while stdin itself is read-only, a
774+- # dup()ed sys.stdin is writable, try
775+- # fd2 = os.dup(sys.stdin.fileno()); os.write(fd2, 'hi')
776+- # TODO: Fix gclient instead, http://crbug.com/95350
777+- if '--no-stdin-hack' in sys.argv:
778+- sys.argv.remove('--no-stdin-hack')
779+- stderr = None
780+- else:
781+- try:
782+- stderr = os.fdopen(os.dup(sys.stdin.fileno()))
783+- except:
784+- stderr = sys.stderr
785+- return subprocess.call(
786+- [os.path.join(os.path.dirname(__file__), 'update.sh')] + sys.argv[1:],
787+- stderr=stderr)
788+-
789+ parser = argparse.ArgumentParser(description='Build Clang.')
790+ parser.add_argument('--bootstrap', action='store_true',
791+ help='first build clang with CC, then with itself.')
792+@@ -695,26 +750,24 @@
793+ help="run only if the script thinks clang is needed")
794+ parser.add_argument('--force-local-build', action='store_true',
795+ help="don't try to download prebuild binaries")
796++ parser.add_argument('--gcc-toolchain', help='set the version for which gcc '
797++ 'version be used for building; --gcc-toolchain=/opt/foo '
798++ 'picks /opt/foo/bin/gcc')
799+ parser.add_argument('--print-revision', action='store_true',
800+ help='print current clang revision and exit.')
801++ parser.add_argument('--print-clang-version', action='store_true',
802++ help='print current clang version (e.g. x.y.z) and exit.')
803+ parser.add_argument('--run-tests', action='store_true',
804+ help='run tests after building; only for local builds')
805+ parser.add_argument('--tools', nargs='*',
806+ help='select which chrome tools to build',
807+ default=['plugins', 'blink_gc_plugin'])
808+- parser.add_argument('--without-patches', action='store_false',
809+- help="don't apply patches (default)", dest='with_patches',
810+- default=True)
811+-
812+- # For now, these flags are only used for the non-Windows flow, but argparser
813+- # gets mad if it sees a flag it doesn't recognize.
814+- parser.add_argument('--no-stdin-hack', action='store_true')
815+-
816++ parser.add_argument('--without-android', action='store_false',
817++ help='don\'t build Android ASan runtime (linux only)',
818++ dest='with_android',
819++ default=sys.platform.startswith('linux'))
820+ args = parser.parse_args()
821+
822+- if re.search(r'\b(make_clang_dir)=', os.environ.get('GYP_DEFINES', '')):
823+- print 'Skipping Clang update (make_clang_dir= was set in GYP_DEFINES).'
824+- return 0
825+ if args.if_needed:
826+ is_clang_required = False
827+ # clang is always used on Mac and Linux.
828+@@ -730,8 +783,16 @@
829+ is_clang_required = True
830+ if not is_clang_required:
831+ return 0
832++ if re.search(r'\b(make_clang_dir)=', os.environ.get('GYP_DEFINES', '')):
833++ print 'Skipping Clang update (make_clang_dir= was set in GYP_DEFINES).'
834++ return 0
835++
836++ if use_head_revision:
837++ # TODO(hans): Remove after the next roll.
838++ global VERSION
839++ VERSION = '3.9.0'
840+
841+- global LLVM_WIN_REVISION, PACKAGE_VERSION
842++ global CLANG_REVISION, PACKAGE_VERSION
843+ if args.print_revision:
844+ if use_head_revision:
845+ print GetSvnRevision(LLVM_DIR)
846+@@ -739,6 +800,10 @@
847+ print PACKAGE_VERSION
848+ return 0
849+
850++ if args.print_clang_version:
851++ sys.stdout.write(VERSION)
852++ return 0
853++
854+ # Don't buffer stdout, so that print statements are immediately flushed.
855+ # Do this only after --print-revision has been handled, else we'll get
856+ # an error message when this script is run from gn for some reason.
857+@@ -747,12 +812,13 @@
858+ if use_head_revision:
859+ # Use a real revision number rather than HEAD to make sure that the stamp
860+ # file logic works.
861+- LLVM_WIN_REVISION = GetSvnRevision(LLVM_REPO_URL)
862+- PACKAGE_VERSION = LLVM_WIN_REVISION + '-0'
863++ CLANG_REVISION = GetSvnRevision(LLVM_REPO_URL)
864++ PACKAGE_VERSION = CLANG_REVISION + '-0'
865+
866+ args.force_local_build = True
867+- # Skip local patches when using HEAD: they probably don't apply anymore.
868+- args.with_patches = False
869++ if 'OS=android' not in os.environ.get('GYP_DEFINES', ''):
870++ # Only build the Android ASan rt on ToT bots when targetting Android.
871++ args.with_android = False
872+
873+ return UpdateClang(args)
874+
pkgs/development/libraries/qt-5/5.6/qtwebengine.nix → pkgs/development/libraries/qt-5/5.6/qtwebengine/default.nixrenamed+3
@@ -53,6 +53,9 @@ qtSubmodule {
5353 libcap
5454 pciutils
5555 ];
56+ patches = [
57+ ./chromium-clang-update-py.patch
58+ ];
5659 postInstall = ''
5760 cat > $out/libexec/qt.conf <<EOF
5861 [Paths]
pkgs/development/libraries/science/math/openblas/default.nix+1−1
@@ -54,7 +54,7 @@ stdenv.mkDerivation {
5454 makeFlags =
5555 (if local then localFlags else genericFlags)
5656 ++
57− optionals stdenv.isDarwin ["MACOSX_DEPLOYMENT_TARGET=10.9"]
57+ optionals stdenv.isDarwin ["MACOSX_DEPLOYMENT_TARGET=10.7"]
5858 ++
5959 [
6060 "FC=gfortran"
pkgs/development/libraries/v8/3.16.14.nix+3−2
@@ -25,6 +25,7 @@ stdenv.mkDerivation rec {
2525
2626 configurePhase = stdenv.lib.optionalString stdenv.isDarwin ''
2727 ln -s /usr/bin/xcodebuild $TMPDIR
28+ ln -s /usr/bin/libtool $TMPDIR
2829 export PATH=$TMPDIR:$PATH
2930 '' + ''
3031 PYTHONPATH="tools/generate_shim_headers:$PYTHONPATH" \
@@ -57,8 +58,8 @@ stdenv.mkDerivation rec {
5758
5859 installPhase = ''
5960 install -vD out/Release/d8 "$out/bin/d8"
60− ${if stdenv.system == "x86_64-darwin" then ''
61− install -vD out/Release/lib.target/libv8.dylib "$out/lib/libv8.dylib"
61+ ${if stdenv.isDarwin then ''
62+ install -vD out/Release/libv8.dylib "$out/lib/libv8.dylib"
6263 '' else ''
6364 install -vD out/Release/lib.target/libv8.so "$out/lib/libv8.so"
6465 ''}
pkgs/development/ocaml-modules/astring/default.nixnew file+43
@@ -0,0 +1,43 @@
1+{stdenv, fetchurl, buildOcaml, ocaml, findlib, ocamlbuild, topkg, opam}:
2+
3+buildOcaml rec {
4+ version = "0.8.3";
5+ name = "astring";
6+
7+ src = fetchurl {
8+ url = "http://erratique.ch/software/astring/releases/astring-${version}.tbz";
9+ sha256 = "0ixjwc3plrljvj24za3l9gy0w30lsbggp8yh02lwrzw61ls4cri0";
10+ };
11+
12+ unpackCmd = "tar -xf $curSrc";
13+
14+ buildInputs = [ ocaml findlib ocamlbuild topkg opam ];
15+
16+ buildPhase = ''
17+ ocaml -I ${findlib}/lib/ocaml/${ocaml.version}/site-lib/ pkg/pkg.ml build
18+ '';
19+
20+ installPhase = ''
21+ opam-installer --script --prefix=$out astring.install | sh
22+ ln -s $out/lib/astring $out/lib/ocaml/${ocaml.version}/site-lib/
23+ '';
24+
25+ meta = {
26+ homepage = http://erratique.ch/software/astring;
27+ description = "Alternative String module for OCaml";
28+ longDescription = ''
29+ Astring exposes an alternative String module for OCaml. This module tries
30+ to balance minimality and expressiveness for basic, index-free, string
31+ processing and provides types and functions for substrings, string sets
32+ and string maps.
33+
34+ Remaining compatible with the OCaml String module is a non-goal.
35+ The String module exposed by Astring has exception safe functions, removes
36+ deprecated and rarely used functions, alters some signatures and names,
37+ adds a few missing functions and fully exploits OCaml's newfound string
38+ immutability.
39+ '';
40+ license = stdenv.lib.licenses.isc;
41+ maintainers = with stdenv.lib.maintainers; [ sternenseemann ];
42+ };
43+}
pkgs/development/tools/build-managers/dub/default.nix+2−2
@@ -2,10 +2,10 @@
22
33stdenv.mkDerivation rec {
44 name = "dub-${version}";
5− version = "1.0.0";
5+ version = "1.1.0";
66
77 src = fetchFromGitHub {
8− sha256 = "07s52hmh9jc3i4jfx4j4a91m44qrr933pwfwczzijhybj2wmpjhh";
8+ sha256 = "1smzlfs5gjmrlghccdgn04qzy5b8l0xm8y2virayb2adrwqviscm";
99 rev = "v${version}";
1010 repo = "dub";
1111 owner = "D-Programming-Language";
pkgs/development/tools/build-managers/remake/default.nix+5−3
@@ -2,11 +2,13 @@
22
33stdenv.mkDerivation rec {
44 name = "remake-${version}";
5− version = "3.82+dbg-0.6";
5+ remakeVersion = "4.1";
6+ dbgVersion = "1.1";
7+ version = "${remakeVersion}+dbg-${dbgVersion}";
68
79 src = fetchurl {
8− url = "mirror://sourceforge/project/bashdb/remake/${version}/${name}.tar.bz2";
9− sha256 = "0i2g6vi9zya78d9zpigfnmzg2qcl93myjfibh3kfmjk7b9lajfyz";
10+ url = "mirror://sourceforge/project/bashdb/remake/${version}/remake-${remakeVersion}+dbg${dbgVersion}.tar.bz2";
11+ sha256 = "1zi16pl7sqn1aa8b7zqm9qnd9vjqyfywqm8s6iap4clf86l7kss2";
1012 };
1113
1214 buildInputs = [ readline ];
pkgs/development/tools/leaps/default.nix+9−9
@@ -1,26 +1,26 @@
1−{ stdenv, buildGoPackage, fetchgit, fetchhg, fetchbzr, fetchsvn }:
1+{ stdenv, buildGoPackage, fetchFromGitHub, fetchhg, fetchbzr, fetchsvn }:
22
33buildGoPackage rec {
44 name = "leaps-${version}";
5− version = "20160626-${stdenv.lib.strings.substring 0 7 rev}";
6− rev = "5cf7328a8c498041d2a887e89f22f138498f4621";
5+ version = "0.5.1";
76
87 goPackagePath = "github.com/jeffail/leaps";
98
10− src = fetchgit {
11− inherit rev;
12− url = "https://github.com/jeffail/leaps";
13− sha256 = "1qbgz48x9yi0w9yz39zsnnhx5nx2xmrns9v8hx28jah2bvag6sq7";
14− fetchSubmodules = false;
9+ src = fetchFromGitHub {
10+ owner = "jeffail";
11+ repo = "leaps";
12+ sha256 = "0w63y777h5qc8fwnkrbawn3an9px0l1zz3649x0n8lhk125fvchj";
13+ rev = "v${version}";
1514 };
1615
1716 goDeps = ./deps.nix;
17+
1818 meta = {
1919 description = "A pair programming tool and library written in Golang";
2020 homepage = "https://github.com/jeffail/leaps/";
2121 license = "MIT";
2222 maintainers = with stdenv.lib.maintainers; [ qknight ];
2323 meta.platforms = stdenv.lib.platforms.linux;
24− broken = true;
2524 };
2625}
26+
pkgs/development/tools/leaps/deps.nix+87−4
@@ -1,11 +1,94 @@
11[
22 {
3− goPackagePath = "golang.org/x/net";
3+ goPackagePath = "github.com/amir/raidman";
44 fetch = {
55 type = "git";
6− url = "https://go.googlesource.com/net";
7− rev = "07b51741c1d6423d4a6abab1c49940ec09cb1aaf";
8− sha256 = "12lvdj0k2gww4hw5f79qb9yswqpy4i3bgv1likmf3mllgdxfm20w";
6+ url = "https://github.com/amir/raidman";
7+ rev = "91c20f3f475cab75bb40ad7951d9bbdde357ade7";
8+ sha256 = "0pkqy5hzjkk04wj1ljq8jsyla358ilxi4lkmvkk73b3dh2wcqvpp";
9+ };
10+ }
11+ {
12+ goPackagePath = "github.com/elazarl/go-bindata-assetfs";
13+ fetch = {
14+ type = "git";
15+ url = "https://github.com/elazarl/go-bindata-assetfs";
16+ rev = "57eb5e1fc594ad4b0b1dbea7b286d299e0cb43c2";
17+ sha256 = "1za29pa15y2xsa1lza97jlkax9qj93ks4a2j58xzmay6rczfkb9i";
18+ };
19+ }
20+ {
21+ goPackagePath = "github.com/garyburd/redigo";
22+ fetch = {
23+ type = "git";
24+ url = "https://github.com/garyburd/redigo";
25+ rev = "8873b2f1995f59d4bcdd2b0dc9858e2cb9bf0c13";
26+ sha256 = "1lzhb99pcwwf5ddcs0bw00fwf9m1d0k7b92fqz2a01jlij4pm5l2";
27+ };
28+ }
29+ {
30+ goPackagePath = "github.com/go-sql-driver/mysql";
31+ fetch = {
32+ type = "git";
33+ url = "https://github.com/go-sql-driver/mysql";
34+ rev = "7ebe0a500653eeb1859664bed5e48dec1e164e73";
35+ sha256 = "1gyan3lyn2j00di9haq7zm3zcwckn922iigx3fvml6s2bsp6ljas";
36+ };
37+ }
38+ {
39+ goPackagePath = "github.com/golang/protobuf";
40+ fetch = {
41+ type = "git";
42+ url = "https://github.com/golang/protobuf";
43+ rev = "bf531ff1a004f24ee53329dfd5ce0b41bfdc17df";
44+ sha256 = "10lnvmq28jp2wk1xc32mdk4745lal2bmdvbjirckb9wlv07zzzf0";
45+ };
46+ }
47+ {
48+ goPackagePath = "github.com/jeffail/gabs";
49+ fetch = {
50+ type = "git";
51+ url = "https://github.com/jeffail/gabs";
52+ rev = "ee1575a53249b51d636e62464ca43a13030afdb5";
53+ sha256 = "0svv57193n8m86r7v7n0y9lny0p6nzr7xvz98va87h00mg146351";
54+ };
55+ }
56+ {
57+ goPackagePath = "github.com/jeffail/util";
58+ fetch = {
59+ type = "git";
60+ url = "https://github.com/jeffail/util";
61+ rev = "48ada8ff9fcae546b5986f066720daa9033ad523";
62+ sha256 = "0k8zz7gdv4hb691fdyb5mhlixppcq8x4ny84fanflypnv258a3i0";
63+ };
64+ }
65+ {
66+ goPackagePath = "github.com/lib/pq";
67+ fetch = {
68+ type = "git";
69+ url = "https://github.com/lib/pq";
70+ rev = "3cd0097429be7d611bb644ef85b42bfb102ceea4";
71+ sha256 = "1q7qfzyfgjk6rvid548r43fi4jhvsh4dhfvfjbp2pz4xqsvpsm7a";
72+ };
73+ }
74+ {
75+ goPackagePath = "github.com/satori/go.uuid";
76+ fetch = {
77+ type = "git";
78+ url = "https://github.com/satori/go.uuid";
79+ rev = "f9ab0dce87d815821e221626b772e3475a0d2749";
80+ sha256 = "0z18j6zxq9kw4lgcpmhh3k7jrb9gy1lx252xz5qhs4ywi9w77xwi";
81+ };
82+ }
83+
84+ {
85+ goPackagePath = "golang.org/x/net";
86+ fetch = {
87+ type = "git";
88+ url = "https://go.googlesource.com/net";
89+ rev = "07b51741c1d6423d4a6abab1c49940ec09cb1aaf";
90+ sha256 = "12lvdj0k2gww4hw5f79qb9yswqpy4i3bgv1likmf3mllgdxfm20w";
991 };
1092 }
1193]
94+
pkgs/development/tools/misc/xc3sprog/default.nix+2−2
@@ -4,12 +4,12 @@
44# prebuilt binary subversion snapshots on sourceforge.
55
66stdenv.mkDerivation rec {
7− version = "748"; # latest @ 2013-10-26
7+ version = "787";
88 name = "xc3sprog-${version}";
99
1010 src = fetchsvn rec {
1111 url = "https://svn.code.sf.net/p/xc3sprog/code/trunk";
12− sha256 = "0wkz6094kkqz91qpa24pzlbhndc47sjmqhwk3p7ccabv0041rzk0";
12+ sha256 = "1rfhms3i7375kdlg0sdg5k52ix3xv5llj2dr30vamyg7pk74y8rx";
1313 rev = "${version}";
1414 };
1515
pkgs/development/tools/selenium/remote-control/default.nixdeleted−49
@@ -1,49 +0,0 @@
1−{ stdenv, fetchurl, jre }:
2−
3−# let version = "1.0-beta-2";
4−let version = "1.0-SNAPSHOT-standalone";
5−
6−in stdenv.mkDerivation {
7− /*
8−
9− Use this if there is another release..
10−
11− name = "selenium-remote-control-${version}-dist";
12− src = fetchurl {
13− url = "http://release.seleniumhq.org/selenium-remote-control/${version}/selenium-remote-control-${version}-dist.zip";
14− sha256 = "0ciyfqvnv0117l2rhw9dclv85mcf3czpimvybj38v3syl7m7yk41";
15− };
16− buildInputs = [unzip];
17− phases = "unpackPhase buildPhase";
18− buildPhase = ''
19− mkdir -p $out/{bin,lib}
20− mv * $out/lib
21− bin="$out/bin/selenium-remote-control"
22− cat >> "$bin" << EOF
23− #!/bin/sh
24− exec ${jre}/bin/java -jar $out/lib/selenium-server-${version}/selenium-server.jar "\$@"
25− EOF
26− chmod +x "$bin"
27− '';
28− */
29−
30− # this snapshot version starts a firefox from a script file. It only issues a warning about it
31− # you still have to pass -DfirefoxDefaultPath=/home/marc/.nix-profile/bin/firefox or such..
32− name = "selenium-remote-control-${version}-dist";
33− # this dist file has been created using mvn package -Dmaven.test.skip=true based on svn rev 2450
34− src = fetchurl {
35− url = "http://mawercer.de/~nix/selenium-server-1.0-SNAPSHOT-standalone.jar";
36− sha256 = "1lqr72a3lmmww1psl19pzp91c9q1dm0314b7y7mz1gnfpwc49y38";
37− };
38− phases = "buildPhase";
39− buildPhase = ''
40− mkdir -p $out/{bin,lib}
41− cp $src $out/lib/
42− bin="$out/bin/selenium-remote-control"
43− cat >> "$bin" << EOF
44− #!/bin/sh
45− exec ${jre}/bin/java -jar "$out/lib/$(basename $src)" "\$@"
46− EOF
47− chmod +x "$bin"
48− '';
49−}
pkgs/games/0ad/data.nix+1
@@ -20,5 +20,6 @@ stdenv.mkDerivation rec {
2020 homepage = "http://wildfiregames.com/0ad/";
2121 license = licenses.cc-by-sa-30;
2222 platforms = platforms.linux;
23+ hydraPlatforms = [];
2324 };
2425}
pkgs/games/steam/chrootenv.nix+1
@@ -52,6 +52,7 @@ in buildFHSUserEnv rec {
5252 gst_all_1.gst-plugins-ugly
5353 libdrm
5454 mono
55+ xorg.xkeyboardconfig
5556
5657 (steamPackages.steam-runtime-wrapped.override {
5758 inherit nativeOnly runtimeOnly newStdcpp;
pkgs/games/tintin/default.nix+2−2
@@ -1,11 +1,11 @@
11{ stdenv, fetchurl, zlib, pcre }:
22
33stdenv.mkDerivation rec {
4− name = "tintin-2.00.9";
4+ name = "tintin-2.01.1";
55
66 src = fetchurl {
77 url = "mirror://sourceforge/tintin/${name}.tar.gz";
8− sha256 = "0x8jakxx7hh7b0z6vjcxyrda0afbz2s2yy7mvrbxjffyc2dyxzna";
8+ sha256 = "195wrfcys8yy953gdrl1gxryhjnx9lg1vqgxm3dyzm8bi18aa2yc";
99 };
1010
1111 buildInputs = [ zlib pcre ];
pkgs/os-specific/linux/cryopid/default.nixdeleted−39
@@ -1,39 +0,0 @@
1−{stdenv, fetchurl, zlibStatic}:
2−
3−let
4−
5− pname = "cryopid";
6− version = "20090908";
7− revision = "7da69201d50e";
8−
9−in
10−
11−stdenv.mkDerivation rec {
12− name = "${pname}-${version}";
13−
14− src = fetchurl {
15− url = "https://sharesource.org/hg/cryopid/archive/${revision}.tar.bz2";
16− sha256 = "908a4b1cb26322ee25afe13ff59e0d86f669538cb4583766b15ca79fda6c69ca";
17− };
18−
19− buildInputs = [ zlibStatic ];
20−
21− preBuild = "cd src";
22−
23− installPhase = "mkdir -p $out/bin; cp cryopid $out/bin";
24−
25− meta = {
26− description = "A process freezer for Linux";
27− longDescription = ''
28− CryoPID allows you to capture the state of a running process in Linux
29− and save it to a file. This file can then be used to resume the process
30− later on, either after a reboot or even on another machines.
31− '';
32− homepage = http://sharesource.org/project/cryopid;
33− license = ''
34− Modified BSD license (without advertising clause). CryoPID ships with
35− and links against the dietlibc library, which is distributed under the
36− GNU General Public Licence, version 2.
37− '';
38− };
39−}
pkgs/os-specific/linux/light/default.nix+6−3
@@ -1,15 +1,18 @@
1−{ stdenv, fetchurl }:
1+{ stdenv, fetchurl, help2man }:
22
33stdenv.mkDerivation rec {
4− version = "0.9";
4+ version = "1.0";
55 name = "light-${version}";
66 src = fetchurl {
77 url = "https://github.com/haikarainen/light/archive/v${version}.tar.gz";
8− sha256 = "1dnzkkg307izvw76gvzsl2vpxd2a1grxg5h82ix505rb9nnmn0d6";
8+ sha256 = "974608ee42ffe85cfd23184306d56d86ec4e6f4b0518bafcb7b3330998b1af64";
99 };
10+ buildInputs = [ help2man ];
1011
1112 installPhase = "mkdir -p $out/bin; cp light $out/bin/";
1213
14+ preFixup = "make man; mkdir -p $out/man/man1; mv light.1.gz $out/man/man1";
15+
1316 meta = {
1417 description = "GNU/Linux application to control backlights";
1518 homepage = https://haikarainen.github.io/light/;
pkgs/os-specific/linux/mcelog/default.nix+2−2
@@ -2,10 +2,10 @@
22
33stdenv.mkDerivation rec {
44 name = "mcelog-${version}";
5− version = "138";
5+ version = "142";
66
77 src = fetchFromGitHub {
8− sha256 = "039ycn5m3gx4n0kppxl35wcrkyva6lv64qhlqhh7034qkbqbhqiy";
8+ sha256 = "1cqx7w75d570vxqi2gk9bkqqclakkhp4kjanv5j3nhqwg3p38zyv";
99 rev = "v${version}";
1010 repo = "mcelog";
1111 owner = "andikleen";
pkgs/os-specific/linux/ttysnoop/default.nixdeleted−38
@@ -1,38 +0,0 @@
1−{stdenv, fetchurl}:
2−let
3− s = # Generated upstream information
4− rec {
5− baseName="ttysnoop";
6− version="0.12d.k26";
7− name="${baseName}-${version}";
8− hash="0jb2zchaiqmmickj0la7wjw3sf9vy65qfhhs11yrzx4mmwkp0395";
9− url="http://sysd.org/stas/files/active/0/ttysnoop-0.12d.k26.tar.gz";
10− sha256="0jb2zchaiqmmickj0la7wjw3sf9vy65qfhhs11yrzx4mmwkp0395";
11− };
12− buildInputs = [
13− ];
14−in
15−stdenv.mkDerivation {
16− inherit (s) name version;
17− inherit buildInputs;
18− src = fetchurl {
19− inherit (s) url sha256;
20− };
21− preBuild = ''
22− sed -e "s@/sbin@$out/sbin@g" -i Makefile
23− sed -e "s@/usr/man@$out/share/man@g" -i Makefile
24− mkdir -p "$out/share/man/man8"
25− mkdir -p "$out/sbin"
26− '';
27− postInstall = ''
28− mkdir -p "$out/etc"
29− cp snooptab.dist "$out/etc/snooptab"
30− '';
31− meta = {
32− inherit (s) version;
33− description = "A tool to clone input and output of another tty/pty to the current one";
34− license = stdenv.lib.licenses.gpl2 ;
35− maintainers = [stdenv.lib.maintainers.raskin];
36− platforms = stdenv.lib.platforms.linux;
37− };
38−}
pkgs/os-specific/linux/ttysnoop/default.upstreamdeleted−3
@@ -1,3 +0,0 @@
1−url http://sysd.org/stas/node/35
2−ensure_choice
3−version '.*-([0-9a-z.]+)[.]tar[.].*' '\1'
pkgs/servers/felix/remoteshell.nix+6−5
@@ -1,14 +1,15 @@
11{stdenv, fetchurl}:
22
33stdenv.mkDerivation rec {
4− name = "apache-felix-remoteshell-bundle-1.0.4";
4+ version = "1.1.2";
5+ name = "apache-felix-remoteshell-bundle-${version}";
56 src = fetchurl {
6− url = http://apache.proserve.nl/felix/org.apache.felix.shell.remote-1.0.4.jar;
7− sha256 = "1bgahzs9nnnvfr0yyh9s0r6h1zp2ls6533377rp8r1qk2a4s1gzb";
7+ url = "http://apache.proserve.nl/felix/org.apache.felix.shell.remote-${version}.jar";
8+ sha256 = "147zw5ppn98wfl3pr32isyb267xm3gwsvdfdvjr33m9g2v1z69aq";
89 };
9− buildCommand =
10+ buildCommand =
1011 ''
1112 mkdir -p $out/bundle
12− cp ${src} $out/bundle/org.apache.felix.shell.remote-1.0.4.jar
13+ cp ${src} $out/bundle/org.apache.felix.shell.remote-${version}.jar
1314 '';
1415}
pkgs/tools/compression/zstd/default.nix+2−2
@@ -3,10 +3,10 @@
33
44stdenv.mkDerivation rec {
55 name = "zstd-${version}";
6− version = "1.0.0";
6+ version = "1.1.1";
77
88 src = fetchFromGitHub {
9− sha256 = "0h8r8vlk8v28cxxgdp7h7dcygbpn8g95wffsvhzybxhfvkrlw6f2";
9+ sha256 = "18snd1jiz0j6r1yk4vkgqmil2gbzwxgmcv2chvpnc5i93pp18hri";
1010 rev = "v${version}";
1111 repo = "zstd";
1212 owner = "facebook";
pkgs/tools/filesystems/fuse-zip/default.nixdeleted−23
@@ -1,23 +0,0 @@
1−{ stdenv, fetchurl, pkgconfig, fuse, libzip, zlib }:
2−
3−stdenv.mkDerivation rec {
4− name = "fuse-zip-0.2.13";
5−
6− src = fetchurl {
7− url = "http://fuse-zip.googlecode.com/files/${name}.tar.gz";
8− sha1 = "9cfa00e38a59d4e06fd47bfaca75ad5e299ecc6b";
9− };
10−
11− patches = [ ./libzip.patch ]; # problems with new libzip; from Gentoo
12−
13− buildInputs = [ pkgconfig fuse libzip zlib ];
14−
15− makeFlags = "INSTALLPREFIX=$(out)";
16−
17− meta = {
18− homepage = http://code.google.com/p/fuse-zip/;
19− description = "A FUSE-based filesystem that allows read and write access to ZIP files";
20− platforms = stdenv.lib.platforms.linux;
21− license = stdenv.lib.licenses.gpl3Plus;
22− };
23−}
pkgs/tools/filesystems/fuse-zip/libzip.patchdeleted−24
@@ -1,24 +0,0 @@
1−diff -ru fuse-zip-0.2.13/lib/bigBuffer.cpp fuse-zip-0.2.13.new//lib/bigBuffer.cpp
2−--- fuse-zip-0.2.13/lib/bigBuffer.cpp 2010-12-06 12:34:32.000000000 -0500
3−+++ fuse-zip-0.2.13.new//lib/bigBuffer.cpp 2011-09-28 21:40:01.294946957 -0400
4−@@ -236,7 +236,7 @@
5− len = offset;
6− }
7−
8−-ssize_t BigBuffer::zipUserFunctionCallback(void *state, void *data, size_t len, enum zip_source_cmd cmd) {
9−+zip_int64_t BigBuffer::zipUserFunctionCallback(void *state, void *data, zip_uint64_t len, enum zip_source_cmd cmd) {
10− CallBackStruct *b = (CallBackStruct*)state;
11− switch (cmd) {
12− case ZIP_SOURCE_OPEN: {
13−diff -ru fuse-zip-0.2.13/lib/bigBuffer.h fuse-zip-0.2.13.new//lib/bigBuffer.h
14−--- fuse-zip-0.2.13/lib/bigBuffer.h 2010-12-06 12:34:32.000000000 -0500
15−+++ fuse-zip-0.2.13.new//lib/bigBuffer.h 2011-09-28 21:40:23.203719133 -0400
16−@@ -52,7 +52,7 @@
17− * never called because read() always successfull.
18− * See zip_source_function(3) for details.
19− */
20−- static ssize_t zipUserFunctionCallback(void *state, void *data, size_t len, enum zip_source_cmd cmd);
21−+ static zip_int64_t zipUserFunctionCallback(void *state, void *data, zip_uint64_t len, enum zip_source_cmd cmd);
22−
23− /**
24− * Return number of chunks needed to keep 'offset' bytes.
pkgs/tools/misc/cowsay/default.nix+6−5
@@ -1,11 +1,12 @@
1−{ stdenv, fetchurl, perl }:
1+{ stdenv, fetchgit, perl }:
22
33stdenv.mkDerivation {
4− name = "cowsay-3.03";
4+ name = "cowsay-3.03+dfsg1-16";
55
6− src = fetchurl {
7− url = http://www.nog.net/~tony/warez/cowsay-3.03.tar.gz;
8− sha256 = "1s3c0g5vmsadicc4lrlkmkm8znm4y6wnxd8kyv9xgm676hban1il";
6+ src = fetchgit {
7+ url = https://anonscm.debian.org/git/collab-maint/cowsay.git;
8+ rev = "acb946c166fa3b9526b9c471ef1330f9f89f9c8b";
9+ sha256 = "1ji66nrdcc8sh79hwils3nbaj897s352r5wp7kzjwiym8bm2azk6";
910 };
1011
1112 buildInputs = [ perl ];
pkgs/tools/misc/g500-control/default.nixdeleted−34
@@ -1,34 +0,0 @@
1−{ stdenv, fetchurl }:
2−
3−stdenv.mkDerivation {
4− name = "g500-control-0.0.1";
5−
6− src = fetchurl {
7− url = "http://g500-control.googlecode.com/files/g500_control_0.0.1.tar.gz";
8− sha256 = "1xlg9lpxnk3228k81y1i6jjh4df1p4jh64g54w969g6a6v6dazvb";
9− };
10−
11− unpackPhase = ''
12− mkdir -p g500-control
13− tar -C g500-control/ -xf $src
14− '';
15−
16− buildPhase = ''
17− cd g500-control
18− gcc -o g500-control *.c
19− '';
20−
21− installPhase = ''
22− mkdir -p $out/bin/
23− cp g500-control $out/bin/
24− '';
25−
26− meta = {
27− homepage = http://code.google.com/p/g500-control/;
28− description = "Configure Logitech G500's internal profile under Linux";
29− license = stdenv.lib.licenses.gpl2;
30− platforms = stdenv.lib.platforms.linux;
31− maintainers = with stdenv.lib.maintainers; [ the-kenny ];
32− };
33−}
34−
pkgs/tools/misc/graylog/default.nix+2−2
@@ -1,12 +1,12 @@
11{ stdenv, fetchurl }:
22
33stdenv.mkDerivation rec {
4− version = "2.1.1";
4+ version = "2.1.2";
55 name = "graylog-${version}";
66
77 src = fetchurl {
88 url = "https://packages.graylog2.org/releases/graylog/graylog-${version}.tgz";
9− sha256 = "0p7vx6b4k6lzxi0v9x44wbrvplw93288lpixpwckc0xx0r7js07z";
9+ sha256 = "0jwm1l3s00rh22gqvkg730h8xm4h1y1dr60m4s5xbz8qzdkk8rax";
1010 };
1111
1212 dontBuild = true;
pkgs/tools/misc/mcrl/default.nixdeleted−14
@@ -1,14 +0,0 @@
1−{stdenv, fetchurl, coreutils}:
2−
3−stdenv.mkDerivation {
4− name = "mcrl-2.18.4";
5− src = fetchurl {
6− url = http://homepages.cwi.nl/~mcrl/mcrl-2.18.4.tar.gz ;
7− sha256 = "0gld7x3cv3y0vwjr1snz24xzr818sj1l2dfn8qhirfyhc7dnnqfw";
8− };
9−
10− RMPROG = "${coreutils}/bin/rm -f";
11−}
12−
13−
14−
pkgs/tools/misc/youtube-dl/default.nix+2−2
@@ -14,11 +14,11 @@ with stdenv.lib;
1414buildPythonApplication rec {
1515
1616 name = "youtube-dl-${version}";
17− version = "2016.11.02";
17+ version = "2016.11.04";
1818
1919 src = fetchurl {
2020 url = "https://yt-dl.org/downloads/${version}/${name}.tar.gz";
21− sha256 = "97777924c3df763d3f2259c9a7f227a01e787ccd452be198191a4a848a7632d7";
21+ sha256 = "9622b29b81587278a00e39e4206e7c52555d240cbbb44242f237660169e8d531";
2222 };
2323
2424 buildInputs = [ makeWrapper zip ] ++ optional generateManPage pandoc;
pkgs/tools/networking/i2pd/default.nix+2−2
@@ -4,13 +4,13 @@ stdenv.mkDerivation rec {
44
55 name = pname + "-" + version;
66 pname = "i2pd";
7− version = "2.9.0";
7+ version = "2.10.0";
88
99 src = fetchFromGitHub {
1010 owner = "PurpleI2P";
1111 repo = pname;
1212 rev = version;
13− sha256 = "1xwcq7lklma0daamp9z76l9mgr3glpvicjgsr645rjhdv8a0mqwp";
13+ sha256 = "0lw0vcibp3v5xz855h4x2rs3ff7yx86znzjfnfri348wg413js5c";
1414 };
1515
1616 buildInputs = [ boost zlib openssl ];
pkgs/tools/text/xml/jing-trang/default.nixnew file+41
@@ -0,0 +1,41 @@
1+{ stdenv, fetchFromGitHub, jre, jdk, ant, saxon }:
2+
3+stdenv.mkDerivation rec {
4+ name = "jing-trang-${version}";
5+ version = "20150603";
6+
7+ src = fetchFromGitHub {
8+ owner = "relaxng";
9+ repo = "jing-trang";
10+ rev = "54b9b1f4e67cd79c7987750d8c9dcfc014af98c3"; # needed to compile with jdk8
11+ sha256 = "0wa569xjb7ihhcaazz32y2b0dv092lisjz77isz1gfb1wvf53di5";
12+ };
13+
14+ buildInputs = [ jdk ant saxon ];
15+
16+ preBuild = "ant";
17+
18+ installPhase = ''
19+ mkdir -p "$out"/{share/java,bin}
20+ cp ./build/*.jar "$out/share/java/"
21+
22+ for tool in jing trang; do
23+ cat > "$out/bin/$tool" <<EOF
24+ #! $SHELL
25+ export JAVA_HOME='${jre}'
26+ exec '${jre}/bin/java' -jar '$out/share/java/$tool.jar' "\$@"
27+ EOF
28+ done
29+
30+ chmod +x "$out"/bin/*
31+ '';
32+
33+ meta = with stdenv.lib; {
34+ description = "A RELAX NG validator in Java";
35+ # The homepage is www.thaiopensource.com, but it links to googlecode.com
36+ # for downloads and call it the "project site".
37+ homepage = http://www.thaiopensource.com/relaxng/jing.html;
38+ platforms = platforms.linux;
39+ maintainers = [ maintainers.bjornfor ];
40+ };
41+}
pkgs/tools/text/xml/jing/default.nixdeleted−22
@@ -1,22 +0,0 @@
1−{ stdenv, fetchurl, unzip, jre }:
2−
3−stdenv.mkDerivation {
4− name = "jing-20091111";
5− builder = ./unzip-builder.sh;
6−
7− src = fetchurl {
8− url = https://jing-trang.googlecode.com/files/jing-20091111.zip;
9− sha256 = "134h2r22r64v5yk4v8mhl6r893dlw5vzx9daf2sj2mbbma004sap";
10− };
11−
12− inherit unzip jre;
13−
14− meta = with stdenv.lib; {
15− description = "A RELAX NG validator in Java";
16− # The homepage is www.thaiopensource.com, but it links to googlecode.com
17− # for downloads and call it the "project site".
18− homepage = http://www.thaiopensource.com/relaxng/jing.html;
19− platforms = platforms.linux;
20− maintainers = [ maintainers.bjornfor ];
21− };
22−}
pkgs/tools/text/xml/jing/unzip-builder.shdeleted−14
@@ -1,14 +0,0 @@
1−set -e
2−source $stdenv/setup
3−
4−$unzip/bin/unzip $src
5−mkdir -p $out
6−mv $name/* $out
7−
8−cat > "$out/bin/jing" <<EOF
9−#! $SHELL
10−export JAVA_HOME="$jre"
11−exec "$jre/bin/java" -jar "$out/bin/jing.jar" "\$@"
12−EOF
13−
14−chmod a+x "$out/bin/jing"
pkgs/tools/text/xml/trang/builder.shdeleted−15
@@ -1,15 +0,0 @@
1−source $stdenv/setup
2−
3−mkdir -p $out/jars
4−unzip -j $src '*/trang.jar'
5−cp -p *.jar $out/jars
6−
7−mkdir -p $out/bin
8−
9−cat >> $out/bin/trang <<EOF
10−#! $SHELL
11−export JAVA_HOME=$jre
12−exec $jre/bin/java -jar $out/jars/trang.jar "\$@"
13−EOF
14−
15−chmod a+x $out/bin/trang
pkgs/tools/text/xml/trang/default.nixdeleted−24
@@ -1,24 +0,0 @@
1−{ stdenv, fetchurl, unzip, jre }:
2−
3−stdenv.mkDerivation {
4− name = "trang-20091111";
5− builder = ./builder.sh;
6−
7− src = fetchurl {
8− url = https://jing-trang.googlecode.com/files/trang-20091111.zip;
9− sha256 = "16551j63n2y3w9lc7krjazddsab7xvdymbss4rdvx3liz4sg18yq";
10− };
11−
12− inherit jre;
13−
14− buildInputs = [ unzip ];
15−
16− meta = with stdenv.lib; {
17− description = "Multi-format schema converter based on RELAX NG";
18− # The homepage is www.thaiopensource.com, but it links to googlecode.com
19− # for downloads and call it the "project site".
20− homepage = http://www.thaiopensource.com/relaxng/trang.html;
21− platforms = platforms.linux;
22− maintainers = [ maintainers.bjornfor ];
23− };
24−}
pkgs/top-level/aliases.nix−1
@@ -47,7 +47,6 @@ doNotDisplayTwice rec {
4747 firefoxWrapper = firefox; # 2015-09
4848 foomatic_filters = foomatic-filters; # 2016-08
4949 fuse_exfat = exfat; # 2015-09-11
50− fuse_zip = fuse-zip; # added 2016-04-27
5150 gettextWithExpat = gettext; # 2016-02-19
5251 git-hub = gitAndTools.git-hub; # added 2016-04-29
5352 googleAuthenticator = google-authenticator; # added 2016-10-16
pkgs/top-level/all-packages.nix+18−52
@@ -741,6 +741,8 @@ in
741741
742742 corosync = callPackage ../servers/corosync { };
743743
744+ cowsay = callPackage ../tools/misc/cowsay { };
745+
744746 cherrytree = callPackage ../applications/misc/cherrytree { };
745747
746748 chntpw = callPackage ../tools/security/chntpw { };
@@ -884,8 +886,6 @@ in
884886
885887 mathics = pythonPackages.mathics;
886888
887− mcrl = callPackage ../tools/misc/mcrl { };
888−
889889 meson = callPackage ../development/tools/build-managers/meson { };
890890
891891 mp3fs = callPackage ../tools/filesystems/mp3fs { };
@@ -1134,8 +1134,6 @@ in
11341134
11351135 colormake = callPackage ../development/tools/build-managers/colormake { };
11361136
1137− cowsay = callPackage ../tools/misc/cowsay { };
1138−
11391137 cpuminer = callPackage ../tools/misc/cpuminer { };
11401138
11411139 cpuminer-multi = callPackage ../tools/misc/cpuminer-multi { };
@@ -1399,7 +1397,10 @@ in
13991397
14001398 disper = callPackage ../tools/misc/disper { };
14011399
1402− dmd = callPackage ../development/compilers/dmd { };
1400+ dmd_2_067_1 = callPackage ../development/compilers/dmd/2.067.1.nix { };
1401+ dmd = callPackage ../development/compilers/dmd {
1402+ bootstrapDmd = dmd_2_067_1;
1403+ };
14031404
14041405 dmg2img = callPackage ../tools/misc/dmg2img { };
14051406
@@ -1724,16 +1725,12 @@ in
17241725
17251726 fuse-7z-ng = callPackage ../tools/filesystems/fuse-7z-ng { };
17261727
1727− fuse-zip = callPackage ../tools/filesystems/fuse-zip { };
1728−
17291728 exfat = callPackage ../tools/filesystems/exfat { };
17301729
17311730 dos2unix = callPackage ../tools/text/dos2unix { };
17321731
17331732 uni2ascii = callPackage ../tools/text/uni2ascii { };
17341733
1735− g500-control = callPackage ../tools/misc/g500-control { };
1736−
17371734 galculator = callPackage ../applications/misc/galculator {
17381735 gtk = gtk3;
17391736 };
@@ -2242,7 +2239,8 @@ in
22422239
22432240 jhead = callPackage ../tools/graphics/jhead { };
22442241
2245− jing = callPackage ../tools/text/xml/jing { };
2242+ jing = self.jing-trang;
2243+ jing-trang = callPackage ../tools/text/xml/jing-trang { };
22462244
22472245 jmespath = callPackage ../development/tools/jmespath { };
22482246
@@ -2450,13 +2448,13 @@ in
24502448 enableNpm = false;
24512449 };
24522450
2453− nodejs-7_x = callPackage ../development/web/nodejs/v7.nix {
2454− libtool = darwin.cctools;
2455− };
2456−
2457− nodejs-slim-7_x = callPackage ../development/web/nodejs/v7.nix {
2458− libtool = darwin.cctools;
2459− enableNpm = false;
2451+ nodejs-7_x = callPackage ../development/web/nodejs/v7.nix {
2452+ libtool = darwin.cctools;
2453+ };
2454+
2455+ nodejs-slim-7_x = callPackage ../development/web/nodejs/v7.nix {
2456+ libtool = darwin.cctools;
2457+ enableNpm = false;
24602458 };
24612459
24622460 nodePackages_6_x = callPackage ../development/node-packages/default-v6.nix {
@@ -3420,7 +3418,7 @@ in
34203418 rtmpdump_gnutls = rtmpdump.override { gnutlsSupport = true; opensslSupport = false; };
34213419
34223420 reaverwps = callPackage ../tools/networking/reaver-wps {};
3423−
3421+
34243422 reaverwps-t6x = callPackage ../tools/networking/reaver-wps-t6x {};
34253423
34263424 recordmydesktop = callPackage ../applications/video/recordmydesktop { };
@@ -3928,8 +3926,6 @@ in
39283926
39293927 ttyrec = callPackage ../tools/misc/ttyrec { };
39303928
3931− ttysnoop = callPackage ../os-specific/linux/ttysnoop {};
3932−
39333929 ttylog = callPackage ../tools/misc/ttylog { };
39343930
39353931 twitterBootstrap = callPackage ../development/web/twitter-bootstrap {};
@@ -4111,7 +4107,7 @@ in
41114107
41124108 tradcpp = callPackage ../development/tools/tradcpp { };
41134109
4114− trang = callPackage ../tools/text/xml/trang { };
4110+ trang = self.jing-trang;
41154111
41164112 tre = callPackage ../development/libraries/tre { };
41174113
@@ -4449,8 +4445,6 @@ in
44494445
44504446 ### DEVELOPMENT / COMPILERS
44514447
4452− abc = callPackage ../development/compilers/abc/default.nix { };
4453−
44544448 aldor = callPackage ../development/compilers/aldor { };
44554449
44564450 aliceml = callPackage ../development/compilers/aliceml { };
@@ -5492,7 +5486,7 @@ in
54925486 glpk = null;
54935487 suitesparse = null;
54945488 jdk = null;
5495− openblas = openblas;
5489+ openblas = if stdenv.isDarwin then openblasCompat else openblas;
54965490 };
54975491 octaveFull = (lowPrio (callPackage ../development/interpreters/octave {
54985492 qt = qt4;
@@ -5694,8 +5688,6 @@ in
56945688
56955689 ecj = callPackage ../development/eclipse/ecj { };
56965690
5697− jdtsdk = callPackage ../development/eclipse/jdt-sdk { };
5698−
56995691 jruby = callPackage ../development/interpreters/jruby { };
57005692
57015693 jython = callPackage ../development/interpreters/jython {};
@@ -6343,11 +6335,6 @@ in
63436335
63446336 sauce-connect = callPackage ../development/tools/sauce-connect { };
63456337
6346− # couldn't find the source yet
6347− seleniumRCBin = callPackage ../development/tools/selenium/remote-control {
6348− jre = jdk;
6349− };
6350−
63516338 selenium-server-standalone = callPackage ../development/tools/selenium/server { };
63526339
63536340 selendroid = callPackage ../development/tools/selenium/selendroid { };
@@ -6659,8 +6646,6 @@ in
66596646
66606647 cl = callPackage ../development/libraries/cl { };
66616648
6662− clanlib = callPackage ../development/libraries/clanlib { };
6663−
66646649 classads = callPackage ../development/libraries/classads { };
66656650
66666651 classpath = callPackage ../development/libraries/java/classpath {
@@ -7370,8 +7355,6 @@ in
73707355
73717356 id3lib = callPackage ../development/libraries/id3lib { };
73727357
7373− iksemel = callPackage ../development/libraries/iksemel { };
7374−
73757358 ilbc = callPackage ../development/libraries/ilbc { };
73767359
73777360 ilixi = callPackage ../development/libraries/ilixi { };
@@ -7430,10 +7413,6 @@ in
74307413
74317414 jemalloc = callPackage ../development/libraries/jemalloc { };
74327415
7433− jetty_gwt = callPackage ../development/libraries/java/jetty-gwt { };
7434−
7435− jetty_util = callPackage ../development/libraries/java/jetty-util { };
7436−
74377416 jshon = callPackage ../development/tools/parsing/jshon { };
74387417
74397418 json_glib = callPackage ../development/libraries/json-glib { };
@@ -8492,8 +8471,6 @@ in
84928471
84938472 minizip = callPackage ../development/libraries/minizip { };
84948473
8495− minmay = callPackage ../development/libraries/minmay { };
8496−
84978474 miro = callPackage ../applications/video/miro {
84988475 avahi = avahi.override {
84998476 withLibdnssdCompat = true;
@@ -8682,7 +8659,6 @@ in
86828659 openh264 = callPackage ../development/libraries/openh264 { };
86838660
86848661 openjpeg_1 = callPackage ../development/libraries/openjpeg/1.x.nix { };
8685− openjpeg_2_0 = callPackage ../development/libraries/openjpeg/2.0.nix { };
86868662 openjpeg_2_1 = callPackage ../development/libraries/openjpeg/2.1.nix { };
86878663 openjpeg = openjpeg_2_1;
86888664
@@ -10574,8 +10550,6 @@ in
1057410550
1057510551 cpufrequtils = callPackage ../os-specific/linux/cpufrequtils { };
1057610552
10577− cryopid = callPackage ../os-specific/linux/cryopid { };
10578−
1057910553 criu = callPackage ../os-specific/linux/criu { };
1058010554
1058110555 cryptsetup = callPackage ../os-specific/linux/cryptsetup { };
@@ -12684,8 +12658,6 @@ in
1268412658 scalaMode1 = callPackage ../applications/editors/emacs-modes/scala-mode/v1.nix { };
1268512659 scalaMode2 = callPackage ../applications/editors/emacs-modes/scala-mode/v2.nix { };
1268612660
12687− stratego = callPackage ../applications/editors/emacs-modes/stratego { };
12688−
1268912661 structuredHaskellMode = haskellPackages.structured-haskell-mode;
1269012662
1269112663 sunriseCommander = callPackage ../applications/editors/emacs-modes/sunrise-commander { };
@@ -13490,10 +13462,6 @@ in
1349013462 fftw = fftwSinglePrec;
1349113463 };
1349213464
13493− ladspaPlugins-git = callPackage ../applications/audio/ladspa-plugins/git.nix {
13494− fftw = fftwSinglePrec;
13495− };
13496−
1349713465 ladspa-sdk = callPackage ../applications/audio/ladspa-sdk { };
1349813466
1349913467 caps = callPackage ../applications/audio/caps { };
@@ -16350,8 +16318,6 @@ in
1635016318
1635116319 paml = callPackage ../applications/science/biology/paml { };
1635216320
16353− pal2nal = callPackage ../applications/science/biology/pal2nal { };
16354−
1635516321 plink = callPackage ../applications/science/biology/plink/default.nix { };
1635616322
1635716323 samtools = callPackage ../applications/science/biology/samtools/default.nix { };
pkgs/top-level/ocaml-packages.nix+2
@@ -22,6 +22,8 @@ let
2222
2323 asn1-combinators = callPackage ../development/ocaml-modules/asn1-combinators { };
2424
25+ astring = callPackage ../development/ocaml-modules/astring { };
26+
2527 async_extra_p4 = callPackage ../development/ocaml-modules/async_extra { };
2628
2729 async_find = callPackage ../development/ocaml-modules/async_find { };
pkgs/top-level/python-packages.nix+43−3
@@ -5394,21 +5394,57 @@ in {
53945394 };
53955395 };
53965396
5397+ heapdict = buildPythonPackage rec {
5398+ name = "HeapDict-${version}";
5399+ version = "1.0.0";
5400+
5401+ src = pkgs.fetchurl {
5402+ url = "mirror://pypi/H/HeapDict/${name}.tar.gz";
5403+ sha256 = "0nhvxyjq6fp6zd7jzmk5x4fg6xhakqx9lhkp5yadzkqn0rlf7ja0";
5404+ };
5405+ doCheck = !isPy3k;
5406+ meta = {
5407+ description = "a heap with decrease-key and increase-key operations.";
5408+ homepage = http://stutzbachenterprises.com;
5409+ license = licenses.bsd3;
5410+ maintainers = with maintainers; [ teh ];
5411+ };
5412+ };
5413+
5414+ zict = buildPythonPackage rec {
5415+
5416+ name = "zict-${version}";
5417+ version = "0.0.3";
5418+
5419+ src = pkgs.fetchurl {
5420+ url = "mirror://pypi/z/zict/${name}.tar.gz";
5421+ sha256 = "1xsrlzrih0qmxvxqhk2c5vhzxirf509fppzdfyardl50jpsllni6";
5422+ };
5423+
5424+ propagatedBuildInputs = with self; [ heapdict ];
5425+
5426+ meta = {
5427+ description = "Mutable mapping tools.";
5428+ homepage = https://github.com/dask/zict;
5429+ license = licenses.bsd3;
5430+ maintainers = with maintainers; [ teh ];
5431+ };
5432+ };
53975433
53985434 distributed = buildPythonPackage rec {
53995435
54005436 name = "distributed-${version}";
5401− version = "1.10.0";
5437+ version = "1.13.3";
54025438
54035439 src = pkgs.fetchurl {
54045440 url = "mirror://pypi/d/distributed/${name}.tar.gz";
5405− sha256 = "11bp2rs52fhcqlgyrlh3cf31ck07mys38mrkf98vjl380lyjj357";
5441+ sha256 = "0nka6hqz986j1fhvfmxffgvmnxh66giq9a3ml58jsaf0riq9mjrc";
54065442 };
54075443
54085444 buildInputs = with self; [ pytest docutils ];
54095445 propagatedBuildInputs = with self; [
54105446 dask six boto3 s3fs tblib locket msgpack click cloudpickle tornado
5411− psutil botocore
5447+ psutil botocore zict lz4
54125448 ] ++ (if !isPy3k then [ singledispatch ] else []);
54135449
54145450 # py.test not picking up local config file, even when running
@@ -13650,6 +13686,8 @@ in {
1365013686
1365113687 buildInputs = with self; [ pkgs.libxml2 pkgs.libxslt ];
1365213688
13689+ hardeningDisable = stdenv.lib.optional stdenv.isDarwin "format";
13690+
1365313691 meta = {
1365413692 description = "Pythonic binding for the libxml2 and libxslt libraries";
1365513693 homepage = http://lxml.de;
@@ -13668,6 +13706,8 @@ in {
1366813706
1366913707 buildInputs = with self; [ pkgs.libxml2 pkgs.libxslt ];
1367013708
13709+ hardeningDisable = stdenv.lib.optional stdenv.isDarwin "format";
13710+
1367113711 meta = {
1367213712 description = "Pythonic binding for the libxml2 and libxslt libraries";
1367313713 homepage = http://lxml.de;