Merge remote-tracking branch 'origin/master' into staging

Conflicts:
	pkgs/development/libraries/libav/default.nix
	pkgs/shells/bash/bash-4.2-patches.nix
	pkgs/stdenv/generic/default.nix
This commit is contained in:
Eelco Dolstra 2014-10-07 00:09:37 +02:00
commit a85dcf4a00
1001 changed files with 20043 additions and 5648 deletions

3
.travis.yml Normal file
View file

@ -0,0 +1,3 @@
language: python
python: "3.4"
script: ./maintainers/scripts/travis-nox-review-pr.sh

View file

@ -330,6 +330,90 @@ Runtime) instead of the OpenJRE.</para>
</section> </section>
<section xml:id="ssec-language-lua"><title>Lua</title>
<para>
Lua packages are built by the <varname>buildLuaPackage</varname> function. This function is
implemented
in <link xlink:href="https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/lua-modules/generic/default.nix">
<filename>pkgs/development/lua-modules/generic/default.nix</filename></link>
and works similarly to <varname>buildPerlPackage</varname>. (See
<xref linkend="ssec-language-perl"/> for details.)
</para>
<para>
Lua packages are defined
in <link xlink:href="https://github.com/NixOS/nixpkgs/blob/master/pkgs/top-level/lua-packages.nix"><filename>pkgs/top-level/lua-packages.nix</filename></link>.
Most of them are simple. For example:
<programlisting>
fileSystem = buildLuaPackage {
name = "filesystem-1.6.2";
src = fetchurl {
url = "https://github.com/keplerproject/luafilesystem/archive/v1_6_2.tar.gz";
sha256 = "1n8qdwa20ypbrny99vhkmx8q04zd2jjycdb5196xdhgvqzk10abz";
};
meta = {
homepage = "https://github.com/keplerproject/luafilesystem";
hydraPlatforms = stdenv.lib.platforms.linux;
maintainers = with maintainers; [ flosse ];
};
};
</programlisting>
</para>
<para>
Though, more complicated package should be placed in a seperate file in
<link
xlink:href="https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/lua-modules"><filename>pkgs/development/lua-modules</filename></link>.
</para>
<para>
Lua packages accept additional parameter <varname>disabled</varname>, which defines
the condition of disabling package from luaPackages. For example, if package has
<varname>disabled</varname> assigned to <literal>lua.luaversion != "5.1"</literal>,
it will not be included in any luaPackages except lua51Packages, making it
only be built for lua 5.1.
</para>
</section>
<section xml:id="ssec-language-coq"><title>Coq</title>
<para>
Coq libraries should be installed in
<literal>$(out)/lib/coq/${coq.coq-version}/user-contrib/</literal>.
Such directories are automatically added to the
<literal>$COQPATH</literal> environment variable by the hook defined
in the Coq derivation.
</para>
<para>
Some libraries require OCaml and sometimes also Camlp5. The exact
versions that were used to build Coq are saved in the
<literal>coq.ocaml</literal> and <literal>coq.camlp5</literal>
attributes.
</para>
<para>
Here is a simple package example. It is a pure Coq library, thus it
only depends on Coq. Its <literal>makefile</literal> has been
generated using <literal>coq_makefile</literal> so we only have to
set the <literal>$COQLIB</literal> variable at install time.
</para>
<programlisting>
{stdenv, fetchurl, coq}:
stdenv.mkDerivation {
src = fetchurl {
url = http://coq.inria.fr/pylons/contribs/files/Karatsuba/v8.4/Karatsuba.tar.gz;
sha256 = "0ymfpv4v49k4fm63nq6gcl1hbnnxrvjjp7yzc4973n49b853c5b1";
};
name = "coq-karatsuba";
buildInputs = [ coq ];
installFlags = "COQLIB=$(out)/lib/coq/${coq.coq-version}/";
}
</programlisting>
</section>
<!-- <!--
<section><title>Haskell</title> <section><title>Haskell</title>

View file

@ -20,8 +20,8 @@ rec {
let attr = head attrPath; let attr = head attrPath;
in in
if attrPath == [] then e if attrPath == [] then e
else if hasAttr attr e else if e ? ${attr}
then attrByPath (tail attrPath) default (getAttr attr e) then attrByPath (tail attrPath) default e.${attr}
else default; else default;
@ -44,8 +44,7 @@ rec {
attrVals ["a" "b" "c"] as attrVals ["a" "b" "c"] as
=> [as.a as.b as.c] => [as.a as.b as.c]
*/ */
attrVals = nameList: set: attrVals = nameList: set: map (x: set.${x}) nameList;
map (x: getAttr x set) nameList;
/* Return the values of all attributes in the given set, sorted by /* Return the values of all attributes in the given set, sorted by
@ -55,7 +54,7 @@ rec {
attrValues {c = 3; a = 1; b = 2;} attrValues {c = 3; a = 1; b = 2;}
=> [1 2 3] => [1 2 3]
*/ */
attrValues = attrs: attrVals (attrNames attrs) attrs; attrValues = builtins.attrValues or (attrs: attrVals (attrNames attrs) attrs);
/* Collect each attribute named `attr' from a list of attribute /* Collect each attribute named `attr' from a list of attribute
@ -65,7 +64,8 @@ rec {
catAttrs "a" [{a = 1;} {b = 0;} {a = 2;}] catAttrs "a" [{a = 1;} {b = 0;} {a = 2;}]
=> [1 2] => [1 2]
*/ */
catAttrs = attr: l: concatLists (map (s: if hasAttr attr s then [(getAttr attr s)] else []) l); catAttrs = builtins.catAttrs or
(attr: l: concatLists (map (s: if s ? ${attr} then [s.${attr}] else []) l));
/* Filter an attribute set by removing all attributes for which the /* Filter an attribute set by removing all attributes for which the
@ -76,7 +76,7 @@ rec {
=> { foo = 1; } => { foo = 1; }
*/ */
filterAttrs = pred: set: filterAttrs = pred: set:
listToAttrs (fold (n: ys: let v = getAttr n set; in if pred n v then [(nameValuePair n v)] ++ ys else ys) [] (attrNames set)); listToAttrs (fold (n: ys: let v = set.${n}; in if pred n v then [(nameValuePair n v)] ++ ys else ys) [] (attrNames set));
/* foldAttrs: apply fold functions to values grouped by key. Eg accumulate values as list: /* foldAttrs: apply fold functions to values grouped by key. Eg accumulate values as list:
@ -86,7 +86,7 @@ rec {
foldAttrs = op: nul: list_of_attrs: foldAttrs = op: nul: list_of_attrs:
fold (n: a: fold (n: a:
fold (name: o: fold (name: o:
o // (listToAttrs [{inherit name; value = op (getAttr name n) (maybeAttr name nul a); }]) o // (listToAttrs [{inherit name; value = op n.${name} (maybeAttr name nul a); }])
) a (attrNames n) ) a (attrNames n)
) {} list_of_attrs; ) {} list_of_attrs;
@ -132,7 +132,7 @@ rec {
=> { x = "x-foo"; y = "y-bar"; } => { x = "x-foo"; y = "y-bar"; }
*/ */
mapAttrs = f: set: mapAttrs = f: set:
listToAttrs (map (attr: { name = attr; value = f attr (getAttr attr set); }) (attrNames set)); listToAttrs (map (attr: { name = attr; value = f attr set.${attr}; }) (attrNames set));
/* Like `mapAttrs', but allows the name of each attribute to be /* Like `mapAttrs', but allows the name of each attribute to be
@ -145,7 +145,7 @@ rec {
=> { foo_x = "bar-a"; foo_y = "bar-b"; } => { foo_x = "bar-a"; foo_y = "bar-b"; }
*/ */
mapAttrs' = f: set: mapAttrs' = f: set:
listToAttrs (map (attr: f attr (getAttr attr set)) (attrNames set)); listToAttrs (map (attr: f attr set.${attr}) (attrNames set));
/* Call a function for each attribute in the given set and return /* Call a function for each attribute in the given set and return
@ -157,7 +157,7 @@ rec {
=> [ "xa" "yb" ] => [ "xa" "yb" ]
*/ */
mapAttrsToList = f: attrs: mapAttrsToList = f: attrs:
map (name: f name (getAttr name attrs)) (attrNames attrs); map (name: f name attrs.${name}) (attrNames attrs);
/* Like `mapAttrs', except that it recursively applies itself to /* Like `mapAttrs', except that it recursively applies itself to
@ -322,7 +322,7 @@ rec {
# override only the attributes that are already present in the old set # override only the attributes that are already present in the old set
# useful for deep-overriding # useful for deep-overriding
overrideExisting = old: new: overrideExisting = old: new:
old // listToAttrs (map (attr: nameValuePair attr (attrByPath [attr] (getAttr attr old) new)) (attrNames old)); old // listToAttrs (map (attr: nameValuePair attr (attrByPath [attr] old.${attr} new)) (attrNames old));
deepSeqAttrs = x: y: deepSeqList (attrValues x) y; deepSeqAttrs = x: y: deepSeqList (attrValues x) y;
} }

View file

@ -1,6 +1,6 @@
let lib = import ./default.nix; let
inherit (builtins) getAttr attrNames isFunction; lib = import ./default.nix;
inherit (builtins) attrNames isFunction;
in in
rec { rec {
@ -107,10 +107,10 @@ rec {
outputToAttrListElement = outputName: outputToAttrListElement = outputName:
{ name = outputName; { name = outputName;
value = commonAttrs // { value = commonAttrs // {
inherit (builtins.getAttr outputName drv) outPath drvPath type outputName; inherit (drv.${outputName}) outPath drvPath type outputName;
}; };
}; };
outputsList = map outputToAttrListElement outputs; outputsList = map outputToAttrListElement outputs;
in builtins.getAttr drv.outputName commonAttrs; in commonAttrs.${drv.outputName};
} }

View file

@ -9,23 +9,15 @@ in
rec { rec {
inherit (builtins) addErrorContext;
# Wrapper aroung the primop `addErrorContext', which shouldn't used addErrorContextToAttrs = lib.mapAttrs (a: v: lib.addErrorContext "while evaluating ${a}" v);
# directly. It evaluates and returns `val', but if an evaluation
# error occurs, the text in `msg' is added to the error context
# (stack trace) printed by Nix.
addErrorContext =
if builtins ? addErrorContext
then builtins.addErrorContext
else msg: val: val;
addErrorContextToAttrs = lib.mapAttrs (a : v : lib.addErrorContext "while evaluating ${a}" v);
traceVal = x: builtins.trace x x;
traceVal = if builtins ? trace then x: (builtins.trace x x) else x: x; traceXMLVal = x: builtins.trace (builtins.toXML x) x;
traceXMLVal = if builtins ? trace then x: (builtins.trace (builtins.toXML x) x) else x: x; traceXMLValMarked = str: x: builtins.trace (str + builtins.toXML x) x;
traceXMLValMarked = str: if builtins ? trace then x: (builtins.trace ( str + builtins.toXML x) x) else x: x;
# this can help debug your code as well - designed to not produce thousands of lines # this can help debug your code as well - designed to not produce thousands of lines
traceShowVal = x : trace (showVal x) x; traceShowVal = x : trace (showVal x) x;
traceShowValMarked = str: x: trace (str + showVal x) x; traceShowValMarked = str: x: trace (str + showVal x) x;
@ -44,7 +36,7 @@ rec {
else if isString x then "x is a string `${substring 0 50 x}...'" else if isString x then "x is a string `${substring 0 50 x}...'"
else "x is probably a path `${substring 0 50 (toString x)}...'"; else "x is probably a path `${substring 0 50 (toString x)}...'";
# trace the arguments passed to function and its result # trace the arguments passed to function and its result
# maybe rewrite these functions in a traceCallXml like style. Then one function is enough # maybe rewrite these functions in a traceCallXml like style. Then one function is enough
traceCall = n : f : a : let t = n2 : x : traceShowValMarked "${n} ${n2}:" x; in t "result" (f (t "arg 1" a)); traceCall = n : f : a : let t = n2 : x : traceShowValMarked "${n} ${n2}:" x; in t "result" (f (t "arg 1" a));
traceCall2 = n : f : a : b : let t = n2 : x : traceShowValMarked "${n} ${n2}:" x; in t "result" (f (t "arg 1" a) (t "arg 2" b)); traceCall2 = n : f : a : b : let t = n2 : x : traceShowValMarked "${n} ${n2}:" x; in t "result" (f (t "arg 1" a) (t "arg 2" b));
@ -70,7 +62,7 @@ rec {
then [ { inherit name; expected = test.expected; result = test.expr; } ] then [ { inherit name; expected = test.expected; result = test.expr; } ]
else [] ) tests)); else [] ) tests));
# create a test assuming that list elements are true # create a test assuming that list elements are true
# usage: { testX = allTrue [ true ]; } # usage: { testX = allTrue [ true ]; }
testAllTrue = expr : { inherit expr; expected = map (x: true) expr; }; testAllTrue = expr : { inherit expr; expected = map (x: true) expr; };
@ -109,10 +101,10 @@ rec {
let nr = a; let nr = a;
in (str: expr: in (str: expr:
if isFunction expr then if isFunction expr then
(arg: (arg:
traceCallXml (builtins.add 1 nr) "${str}\n arg ${builtins.toString nr} is \n ${builtins.toXML (strict arg)}" (expr arg) traceCallXml (builtins.add 1 nr) "${str}\n arg ${builtins.toString nr} is \n ${builtins.toXML (strict arg)}" (expr arg)
) )
else else
let r = strict expr; let r = strict expr;
in builtins.trace "${str}\n result:\n${builtins.toXML r}" r in builtins.trace "${str}\n result:\n${builtins.toXML r}" r
); );

View file

@ -25,7 +25,7 @@ rec {
shortName = "amd"; shortName = "amd";
fullName = "AMD License Agreement"; fullName = "AMD License Agreement";
url = http://developer.amd.com/amd-license-agreement/; url = http://developer.amd.com/amd-license-agreement/;
};# };
apsl20 = spdx { apsl20 = spdx {
shortName = "APSL-2.0"; shortName = "APSL-2.0";
@ -82,6 +82,11 @@ rec {
fullName = "Common Development and Distribution License 1.0"; fullName = "Common Development and Distribution License 1.0";
}; };
cecill-b = spdx {
shortName = "CECILL-B";
fullName = "CeCILL-B Free Software License Agreement";
};
cecill-c = spdx { cecill-c = spdx {
shortName = "CECILL-C"; shortName = "CECILL-C";
fullName = "CeCILL-C Free Software License Agreement"; fullName = "CeCILL-C Free Software License Agreement";
@ -182,6 +187,11 @@ rec {
fullName = "GNU Lesser General Public License v3.0 or later"; fullName = "GNU Lesser General Public License v3.0 or later";
}; };
libpng = spdx {
shortName = "Libpng";
fullName = "libpng License";
};
libtiff = { libtiff = {
shortName = "libtiff"; shortName = "libtiff";
fullName = "libtiff license"; fullName = "libtiff license";
@ -292,4 +302,3 @@ rec {
}; };
} }

View file

@ -2,13 +2,7 @@
with import ./trivial.nix; with import ./trivial.nix;
let rec {
inc = builtins.add 1;
dec = n: builtins.sub n 1;
in rec {
inherit (builtins) head tail length isList elemAt concatLists filter elem; inherit (builtins) head tail length isList elemAt concatLists filter elem;
@ -29,7 +23,7 @@ in rec {
fold' = n: fold' = n:
if n == len if n == len
then nul then nul
else op (elemAt list n) (fold' (inc n)); else op (elemAt list n) (fold' (n + 1));
in fold' 0; in fold' 0;
# Left fold: `fold op nul [x_1 x_2 ... x_n] == op (... (op (op nul # Left fold: `fold op nul [x_1 x_2 ... x_n] == op (... (op (op nul
@ -38,12 +32,10 @@ in rec {
let let
len = length list; len = length list;
foldl' = n: foldl' = n:
if n == minus1 if n == -1
then nul then nul
else op (foldl' (dec n)) (elemAt list n); else op (foldl' (n - 1)) (elemAt list n);
in foldl' (dec (length list)); in foldl' (length list - 1);
minus1 = dec 0;
# map with index: `imap (i: v: "${v}-${toString i}") ["a" "b"] == # map with index: `imap (i: v: "${v}-${toString i}") ["a" "b"] ==
@ -54,7 +46,7 @@ in rec {
imap' = n: imap' = n:
if n == len if n == len
then [] then []
else [ (f (inc n) (elemAt list n)) ] ++ imap' (inc n); else [ (f (n + 1) (elemAt list n)) ] ++ imap' (n + 1);
in imap' 0; in imap' 0;
@ -104,7 +96,7 @@ in rec {
# Count how many times function `pred' returns true for the elements # Count how many times function `pred' returns true for the elements
# of `list'. # of `list'.
count = pred: fold (x: c: if pred x then inc c else c) 0; count = pred: fold (x: c: if pred x then c + 1 else c) 0;
# Return a singleton list or an empty list, depending on a boolean # Return a singleton list or an empty list, depending on a boolean
@ -125,9 +117,9 @@ in rec {
# Return a list of integers from `first' up to and including `last'. # Return a list of integers from `first' up to and including `last'.
range = first: last: range = first: last:
if lessThan last first if last < first
then [] then []
else [first] ++ range (add first 1) last; else [first] ++ range (first + 1) last;
# Partition the elements of a list in two lists, `right' and # Partition the elements of a list in two lists, `right' and
@ -144,11 +136,11 @@ in rec {
let let
len1 = length fst; len1 = length fst;
len2 = length snd; len2 = length snd;
len = if lessThan len1 len2 then len1 else len2; len = if len1 < len2 then len1 else len2;
zipListsWith' = n: zipListsWith' = n:
if n != len then if n != len then
[ (f (elemAt fst n) (elemAt snd n)) ] [ (f (elemAt fst n) (elemAt snd n)) ]
++ zipListsWith' (inc n) ++ zipListsWith' (n + 1)
else []; else [];
in zipListsWith' 0; in zipListsWith' 0;
@ -167,7 +159,7 @@ in rec {
let let
len = length list; len = length list;
first = head list; first = head list;
pivot' = n: acc@{ left, right }: let el = elemAt list n; next = pivot' (inc n); in pivot' = n: acc@{ left, right }: let el = elemAt list n; next = pivot' (n + 1); in
if n == len if n == len
then acc then acc
else if strictLess first el else if strictLess first el
@ -176,7 +168,7 @@ in rec {
next { left = [ el ] ++ left; inherit right; }; next { left = [ el ] ++ left; inherit right; };
pivot = pivot' 1 { left = []; right = []; }; pivot = pivot' 1 { left = []; right = []; };
in in
if lessThan len 2 then list if len < 2 then list
else (sort strictLess pivot.left) ++ [ first ] ++ (sort strictLess pivot.right); else (sort strictLess pivot.left) ++ [ first ] ++ (sort strictLess pivot.right);
@ -188,7 +180,7 @@ in rec {
if n == len || n == count if n == len || n == count
then [] then []
else else
[ (elemAt list n) ] ++ take' (inc n); [ (elemAt list n) ] ++ take' (n + 1);
in take' 0; in take' 0;
@ -197,16 +189,16 @@ in rec {
let let
len = length list; len = length list;
drop' = n: drop' = n:
if n == minus1 || lessThan n count if n == -1 || n < count
then [] then []
else else
drop' (dec n) ++ [ (elemAt list n) ]; drop' (n - 1) ++ [ (elemAt list n) ];
in drop' (dec len); in drop' (len - 1);
# Return the last element of a list. # Return the last element of a list.
last = list: last = list:
assert list != []; elemAt list (dec (length list)); assert list != []; elemAt list (length list - 1);
# Return all elements but the last # Return all elements but the last
@ -218,11 +210,11 @@ in rec {
let let
len1 = length xs; len1 = length xs;
len2 = length ys; len2 = length ys;
len = if lessThan len1 len2 then len1 else len2; len = if len1 < len2 then len1 else len2;
zipTwoLists' = n: zipTwoLists' = n:
if n != len then if n != len then
[ { first = elemAt xs n; second = elemAt ys n; } ] [ { first = elemAt xs n; second = elemAt ys n; } ]
++ zipTwoLists' (inc n) ++ zipTwoLists' (n + 1)
else []; else [];
in zipTwoLists' 0; in zipTwoLists' 0;

View file

@ -10,6 +10,7 @@
akc = "Anders Claesson <akc@akc.is>"; akc = "Anders Claesson <akc@akc.is>";
algorith = "Dries Van Daele <dries_van_daele@telenet.be>"; algorith = "Dries Van Daele <dries_van_daele@telenet.be>";
all = "Nix Committers <nix-commits@lists.science.uu.nl>"; all = "Nix Committers <nix-commits@lists.science.uu.nl>";
abbradar = "Nikolay Amiantov <ab@fmap.me>";
amiddelk = "Arie Middelkoop <amiddelk@gmail.com>"; amiddelk = "Arie Middelkoop <amiddelk@gmail.com>";
amorsillo = "Andrew Morsillo <andrew.morsillo@gmail.com>"; amorsillo = "Andrew Morsillo <andrew.morsillo@gmail.com>";
AndersonTorres = "Anderson Torres <torres.anderson.85@gmail.com>"; AndersonTorres = "Anderson Torres <torres.anderson.85@gmail.com>";
@ -33,6 +34,7 @@
bosu = "Boris Sukholitko <boriss@gmail.com>"; bosu = "Boris Sukholitko <boriss@gmail.com>";
calrama = "Moritz Maxeiner <moritz@ucworks.org>"; calrama = "Moritz Maxeiner <moritz@ucworks.org>";
campadrenalin = "Philip Horger <campadrenalin@gmail.com>"; campadrenalin = "Philip Horger <campadrenalin@gmail.com>";
cdepillabout = "Dennis Gosnell <cdep.illabout@gmail.com>";
cfouche = "Chaddaï Fouché <chaddai.fouche@gmail.com>"; cfouche = "Chaddaï Fouché <chaddai.fouche@gmail.com>";
chaoflow = "Florian Friesdorf <flo@chaoflow.net>"; chaoflow = "Florian Friesdorf <flo@chaoflow.net>";
coconnor = "Corey O'Connor <coreyoconnor@gmail.com>"; coconnor = "Corey O'Connor <coreyoconnor@gmail.com>";
@ -42,10 +44,12 @@
DamienCassou = "Damien Cassou <damien.cassou@gmail.com>"; DamienCassou = "Damien Cassou <damien.cassou@gmail.com>";
DerGuteMoritz = "Moritz Heidkamp <moritz@twoticketsplease.de>"; DerGuteMoritz = "Moritz Heidkamp <moritz@twoticketsplease.de>";
dbohdan = "Danyil Bohdan <danyil.bohdan@gmail.com>"; dbohdan = "Danyil Bohdan <danyil.bohdan@gmail.com>";
dmalikov = "Dmitry Malikov <malikov.d.y@gmail.com>";
doublec = "Chris Double <chris.double@double.co.nz>"; doublec = "Chris Double <chris.double@double.co.nz>";
ederoyd46 = "Matthew Brown <matt@ederoyd.co.uk>"; ederoyd46 = "Matthew Brown <matt@ederoyd.co.uk>";
edwtjo = "Edward Tjörnhammar <ed@cflags.cc>"; edwtjo = "Edward Tjörnhammar <ed@cflags.cc>";
eelco = "Eelco Dolstra <eelco.dolstra@logicblox.com>"; eelco = "Eelco Dolstra <eelco.dolstra@logicblox.com>";
ellis = "Ellis Whitehead <nixos@ellisw.net>";
emery = "Emery Hemingway <emery@vfemail.net>"; emery = "Emery Hemingway <emery@vfemail.net>";
ertes = "Ertugrul Söylemez <ertesx@gmx.de>"; ertes = "Ertugrul Söylemez <ertesx@gmx.de>";
falsifian = "James Cook <james.cook@utoronto.ca>"; falsifian = "James Cook <james.cook@utoronto.ca>";
@ -80,12 +84,14 @@
marcweber = "Marc Weber <marco-oweber@gmx.de>"; marcweber = "Marc Weber <marco-oweber@gmx.de>";
matejc = "Matej Cotman <cotman.matej@gmail.com>"; matejc = "Matej Cotman <cotman.matej@gmail.com>";
meisternu = "Matt Miemiec <meister@krutt.org>"; meisternu = "Matt Miemiec <meister@krutt.org>";
michelk = "Michel Kuhlmann <michel@kuhlmanns.info>";
modulistic = "Pablo Costa <modulistic@gmail.com>"; modulistic = "Pablo Costa <modulistic@gmail.com>";
mornfall = "Petr Ročkai <me@mornfall.net>"; mornfall = "Petr Ročkai <me@mornfall.net>";
MP2E = "Cray Elliott <MP2E@archlinux.us>"; MP2E = "Cray Elliott <MP2E@archlinux.us>";
msackman = "Matthew Sackman <matthew@wellquite.org>"; msackman = "Matthew Sackman <matthew@wellquite.org>";
nathan-gs = "Nathan Bijnens <nathan@nathan.gs>"; nathan-gs = "Nathan Bijnens <nathan@nathan.gs>";
notthemessiah = "Brian Cohen <brian.cohen.88@gmail.com>"; notthemessiah = "Brian Cohen <brian.cohen.88@gmail.com>";
nslqqq = "Nikita Mikhailov <nslqqq@gmail.com>";
ocharles = "Oliver Charles <ollie@ocharles.org.uk>"; ocharles = "Oliver Charles <ollie@ocharles.org.uk>";
offline = "Jaka Hudoklin <jakahudoklin@gmail.com>"; offline = "Jaka Hudoklin <jakahudoklin@gmail.com>";
orbitz = "Malcolm Matalka <mmatalka@gmail.com>"; orbitz = "Malcolm Matalka <mmatalka@gmail.com>";
@ -110,6 +116,7 @@
rszibele = "Richard Szibele <richard_szibele@hotmail.com>"; rszibele = "Richard Szibele <richard_szibele@hotmail.com>";
rycee = "Robert Helgesson <robert@rycee.net>"; rycee = "Robert Helgesson <robert@rycee.net>";
sander = "Sander van der Burg <s.vanderburg@tudelft.nl>"; sander = "Sander van der Burg <s.vanderburg@tudelft.nl>";
sepi = "Raffael Mancini <raffael@mancini.lu>";
shlevy = "Shea Levy <shea@shealevy.com>"; shlevy = "Shea Levy <shea@shealevy.com>";
simons = "Peter Simons <simons@cryp.to>"; simons = "Peter Simons <simons@cryp.to>";
skeidel = "Sven Keidel <svenkeidel@gmail.com>"; skeidel = "Sven Keidel <svenkeidel@gmail.com>";
@ -125,6 +132,7 @@
tv = "Tomislav Viljetić <tv@shackspace.de>"; tv = "Tomislav Viljetić <tv@shackspace.de>";
urkud = "Yury G. Kudryashov <urkud+nix@ya.ru>"; urkud = "Yury G. Kudryashov <urkud+nix@ya.ru>";
vandenoever = "Jos van den Oever <jos@vandenoever.info>"; vandenoever = "Jos van den Oever <jos@vandenoever.info>";
vbgl = "Vincent Laporte <Vincent.Laporte@gmail.com>";
vbmithr = "Vincent Bernardoff <vb@luminar.eu.org>"; vbmithr = "Vincent Bernardoff <vb@luminar.eu.org>";
vcunat = "Vladimír Čunát <vcunat@gmail.com>"; vcunat = "Vladimír Čunát <vcunat@gmail.com>";
viric = "Lluís Batlle i Rossell <viric@viric.name>"; viric = "Lluís Batlle i Rossell <viric@viric.name>";
@ -135,6 +143,8 @@
wjlroe = "William Roe <willroe@gmail.com>"; wjlroe = "William Roe <willroe@gmail.com>";
wkennington = "William A. Kennington III <william@wkennington.com>"; wkennington = "William A. Kennington III <william@wkennington.com>";
wmertens = "Wout Mertens <Wout.Mertens@gmail.com>"; wmertens = "Wout Mertens <Wout.Mertens@gmail.com>";
wyvie = "Elijah Rum <elijahrum@gmail.com>";
yarr = "Dmitry V. <savraz@gmail.com>";
z77z = "Marco Maggesi <maggesi@math.unifi.it>"; z77z = "Marco Maggesi <maggesi@math.unifi.it>";
zef = "Zef Hemel <zef@zef.me>"; zef = "Zef Hemel <zef@zef.me>";
zimbatm = "zimbatm <zimbatm@zimbatm.com>"; zimbatm = "zimbatm <zimbatm@zimbatm.com>";

View file

@ -1,5 +1,5 @@
let lib = import ./default.nix; let lib = import ./default.nix;
inherit (builtins) isFunction hasAttr getAttr head tail isList isAttrs isInt attrNames; inherit (builtins) isFunction head tail isList isAttrs isInt attrNames;
in in
@ -61,7 +61,7 @@ rec {
fun = n : x : fun = n : x :
let newArgs = fixed : let newArgs = fixed :
let args = takeFixed fixed; let args = takeFixed fixed;
mergeFun = getAttr n args; mergeFun = args.${n};
in if isAttrs x then (mergeFun args x) in if isAttrs x then (mergeFun args x)
else assert isFunction x; else assert isFunction x;
mergeFun args (x ( args // { inherit fixed; })); mergeFun args (x ( args // { inherit fixed; }));
@ -102,15 +102,12 @@ rec {
# } # }
composedArgsAndFun = f: foldArgs defaultMerge f {}; composedArgsAndFun = f: foldArgs defaultMerge f {};
# shortcut for attrByPath ["name"] default attrs
maybeAttrNullable = name: default: attrs:
if attrs == null then default else
if __hasAttr name attrs then (__getAttr name attrs) else default;
# shortcut for attrByPath ["name"] default attrs # shortcut for attrByPath ["name"] default attrs
maybeAttr = name: default: attrs: maybeAttrNullable = maybeAttr;
if __hasAttr name attrs then (__getAttr name attrs) else default;
# shortcut for attrByPath ["name"] default attrs
maybeAttr = name: default: attrs: attrs.${name} or default;
# Return the second argument if the first one is true or the empty version # Return the second argument if the first one is true or the empty version
@ -233,7 +230,7 @@ rec {
closePropagation = list: (uniqList {inputList = (innerClosePropagation [] list);}); closePropagation = list: (uniqList {inputList = (innerClosePropagation [] list);});
# calls a function (f attr value ) for each record item. returns a list # calls a function (f attr value ) for each record item. returns a list
mapAttrsFlatten = f : r : map (attr: f attr (builtins.getAttr attr r) ) (attrNames r); mapAttrsFlatten = f : r : map (attr: f attr r.${attr}) (attrNames r);
# attribute set containing one attribute # attribute set containing one attribute
nvs = name : value : listToAttrs [ (nameValuePair name value) ]; nvs = name : value : listToAttrs [ (nameValuePair name value) ];
@ -250,10 +247,10 @@ rec {
# merge attributes with custom function handling the case that the attribute # merge attributes with custom function handling the case that the attribute
# exists in both sets # exists in both sets
mergeAttrsWithFunc = f : set1 : set2 : mergeAttrsWithFunc = f : set1 : set2 :
fold (n: set : if (__hasAttr n set) fold (n: set : if set ? ${n}
then setAttr set n (f (__getAttr n set) (__getAttr n set2)) then setAttr set n (f set.${n} set2.${n})
else set ) else set )
(set2 // set1) (__attrNames set2); (set2 // set1) (attrNames set2);
# merging two attribute set concatenating the values of same attribute names # merging two attribute set concatenating the values of same attribute names
# eg { a = 7; } { a = [ 2 3 ]; } becomes { a = [ 7 2 3 ]; } # eg { a = 7; } { a = [ 2 3 ]; } becomes { a = [ 7 2 3 ]; }
@ -270,15 +267,15 @@ rec {
overrideSnd ? [ "buildPhase" ] overrideSnd ? [ "buildPhase" ]
} : attrs1 : attrs2 : } : attrs1 : attrs2 :
fold (n: set : fold (n: set :
setAttr set n ( if (__hasAttr n set) setAttr set n ( if set ? ${n}
then # merge then # merge
if elem n mergeLists # attribute contains list, merge them by concatenating if elem n mergeLists # attribute contains list, merge them by concatenating
then (__getAttr n attrs2) ++ (__getAttr n attrs1) then attrs2.${n} ++ attrs1.${n}
else if elem n overrideSnd else if elem n overrideSnd
then __getAttr n attrs1 then attrs1.${n}
else throw "error mergeAttrsNoOverride, attribute ${n} given in both attributes - no merge func defined" else throw "error mergeAttrsNoOverride, attribute ${n} given in both attributes - no merge func defined"
else __getAttr n attrs2 # add attribute not existing in attr1 else attrs2.${n} # add attribute not existing in attr1
)) attrs1 (__attrNames attrs2); )) attrs1 (attrNames attrs2);
# example usage: # example usage:
@ -300,14 +297,14 @@ rec {
fold lib.mergeAttrs {} [ fold lib.mergeAttrs {} [
x y x y
(mapAttrs ( a : v : # merge special names using given functions (mapAttrs ( a : v : # merge special names using given functions
if (hasAttr a x) if x ? ${a}
then if (hasAttr a y) then if y ? ${a}
then v (getAttr a x) (getAttr a y) # both have attr, use merge func then v x.${a} y.${a} # both have attr, use merge func
else (getAttr a x) # only x has attr else x.${a} # only x has attr
else (getAttr a y) # only y has attr) else y.${a} # only y has attr)
) (removeAttrs mergeAttrBy2 ) (removeAttrs mergeAttrBy2
# don't merge attrs which are neither in x nor y # don't merge attrs which are neither in x nor y
(filter (a : (! hasAttr a x) && (! hasAttr a y) ) (filter (a: ! x ? ${a} && ! y ? ${a})
(attrNames mergeAttrBy2)) (attrNames mergeAttrBy2))
) )
) )
@ -403,7 +400,7 @@ rec {
// args2.cfg; // args2.cfg;
opts = attrValues (mapAttrs (a : v : opts = attrValues (mapAttrs (a : v :
let v2 = if v ? set || v ? unset then v else { set = v; }; let v2 = if v ? set || v ? unset then v else { set = v; };
n = if (getAttr (flagName a) cfgWithDefaults) then "set" else "unset"; n = if cfgWithDefaults.${flagName a} then "set" else "unset";
attr = maybeAttr n {} v2; in attr = maybeAttr n {} v2; in
if (maybeAttr "assertion" true attr) if (maybeAttr "assertion" true attr)
then attr then attr

View file

@ -30,7 +30,7 @@ rec {
if check && set ? _definedNames then if check && set ? _definedNames then
fold (m: res: fold (m: res:
fold (name: res: fold (name: res:
if hasAttr name set then res else throw "The option `${showOption (prefix ++ [name])}' defined in `${m.file}' does not exist.") if set ? ${name} then res else throw "The option `${showOption (prefix ++ [name])}' defined in `${m.file}' does not exist.")
res m.names) res m.names)
res set._definedNames res set._definedNames
else else
@ -94,22 +94,22 @@ rec {
loc = prefix ++ [name]; loc = prefix ++ [name];
# Get all submodules that declare name. # Get all submodules that declare name.
decls = concatLists (map (m: decls = concatLists (map (m:
if hasAttr name m.options if m.options ? ${name}
then [ { inherit (m) file; options = getAttr name m.options; } ] then [ { inherit (m) file; options = m.options.${name}; } ]
else [] else []
) options); ) options);
# Get all submodules that define name. # Get all submodules that define name.
defns = concatLists (map (m: defns = concatLists (map (m:
if hasAttr name m.config if m.config ? ${name}
then map (config: { inherit (m) file; inherit config; }) then map (config: { inherit (m) file; inherit config; })
(pushDownProperties (getAttr name m.config)) (pushDownProperties m.config.${name})
else [] else []
) configs); ) configs);
nrOptions = count (m: isOption m.options) decls; nrOptions = count (m: isOption m.options) decls;
# Process mkMerge and mkIf properties. # Process mkMerge and mkIf properties.
defns' = concatMap (m: defns' = concatMap (m:
if hasAttr name m.config if m.config ? ${name}
then map (m': { inherit (m) file; value = m'; }) (dischargeProperties (getAttr name m.config)) then map (m': { inherit (m) file; value = m'; }) (dischargeProperties m.config.${name})
else [] else []
) configs; ) configs;
in in
@ -278,7 +278,7 @@ rec {
let let
defaultPrio = 100; defaultPrio = 100;
getPrio = def: if def.value._type or "" == "override" then def.value.priority else defaultPrio; getPrio = def: if def.value._type or "" == "override" then def.value.priority else defaultPrio;
min = x: y: if builtins.lessThan x y then x else y; min = x: y: if x < y then x else y;
highestPrio = fold (def: prio: min (getPrio def) prio) 9999 defs; highestPrio = fold (def: prio: min (getPrio def) prio) 9999 defs;
strip = def: if def.value._type or "" == "override" then def // { value = def.value.content; } else def; strip = def: if def.value._type or "" == "override" then def // { value = def.value.content; } else def;
in concatMap (def: if getPrio def == highestPrio then [(strip def)] else []) defs; in concatMap (def: if getPrio def == highestPrio then [(strip def)] else []) defs;

View file

@ -80,9 +80,9 @@ rec {
internal = opt.internal or false; internal = opt.internal or false;
visible = opt.visible or true; visible = opt.visible or true;
} }
// optionalAttrs (opt ? example) { example = scrubOptionValue opt.example; } // (if opt ? example then { example = scrubOptionValue opt.example; } else {})
// optionalAttrs (opt ? default) { default = scrubOptionValue opt.default; } // (if opt ? default then { default = scrubOptionValue opt.default; } else {})
// optionalAttrs (opt ? defaultText) { default = opt.defaultText; }; // (if opt ? defaultText then { default = opt.defaultText; } else {});
subOptions = subOptions =
let ss = opt.type.getSubOptions opt.loc; let ss = opt.type.getSubOptions opt.loc;

View file

@ -2,7 +2,7 @@ let lists = import ./lists.nix; in
rec { rec {
gnu = linux; /* ++ hurd ++ kfreebsd ++ ... */ gnu = linux; /* ++ hurd ++ kfreebsd ++ ... */
linux = ["i686-linux" "x86_64-linux" "armv5tel-linux" "armv7l-linux" "mips64el-linux"]; linux = ["i686-linux" "x86_64-linux" "armv5tel-linux" "armv6l-linux" "armv7l-linux" "mips64el-linux"];
darwin = ["x86_64-darwin"]; darwin = ["x86_64-darwin"];
freebsd = ["i686-freebsd" "x86_64-freebsd"]; freebsd = ["i686-freebsd" "x86_64-freebsd"];
openbsd = ["i686-openbsd" "x86_64-openbsd"]; openbsd = ["i686-openbsd" "x86_64-openbsd"];

View file

@ -62,8 +62,8 @@ rec {
in { result = x.result ++ [entry.text] ++ y.result; in { result = x.result ++ [entry.text] ++ y.result;
done = y.done; done = y.done;
} }
else if hasAttr entry done then f done (tail todo) else if done ? ${entry} then f done (tail todo)
else f (done // listToAttrs [{name = entry; value = 1;}]) ([(builtins.getAttr entry predefined)] ++ tail todo); else f (done // listToAttrs [{name = entry; value = 1;}]) ([predefined.${entry}] ++ tail todo);
in (f {} arg).result; in (f {} arg).result;
textClosureMap = f: predefined: names: textClosureMap = f: predefined: names:

View file

@ -2,7 +2,7 @@
let lib = import ./default.nix; let lib = import ./default.nix;
inherit (builtins) add sub lessThan length; inherit (builtins) length;
in in
@ -79,7 +79,7 @@ rec {
stringToCharacters = s: let l = stringLength s; in stringToCharacters = s: let l = stringLength s; in
if l == 0 if l == 0
then [] then []
else map (p: substring p 1 s) (lib.range 0 (sub l 1)); else map (p: substring p 1 s) (lib.range 0 (l - 1));
# Manipulate a string charcater by character and replace them by strings # Manipulate a string charcater by character and replace them by strings
@ -123,7 +123,7 @@ rec {
toUpper = replaceChars lowerChars upperChars; toUpper = replaceChars lowerChars upperChars;
# Appends string context from another string # Appends string context from another string
addContextFrom = a: b: (substring 0 0 a)+b; addContextFrom = a: b: substring 0 0 a + b;
# Compares strings not requiring context equality # Compares strings not requiring context equality
# Obviously, a workaround but works on all Nix versions # Obviously, a workaround but works on all Nix versions
@ -139,18 +139,18 @@ rec {
s = addContextFrom _sep _s; s = addContextFrom _sep _s;
sepLen = stringLength sep; sepLen = stringLength sep;
sLen = stringLength s; sLen = stringLength s;
lastSearch = sub sLen sepLen; lastSearch = sLen - sepLen;
startWithSep = startAt: startWithSep = startAt:
substring startAt sepLen s == sep; substring startAt sepLen s == sep;
recurse = index: startAt: recurse = index: startAt:
let cutUntil = i: [(substring startAt (sub i startAt) s)]; in let cutUntil = i: [(substring startAt (i - startAt) s)]; in
if lessThan index lastSearch then if index < lastSearch then
if startWithSep index then if startWithSep index then
let restartAt = add index sepLen; in let restartAt = index + sepLen; in
cutUntil index ++ recurse restartAt restartAt cutUntil index ++ recurse restartAt restartAt
else else
recurse (add index 1) startAt recurse (index + 1) startAt
else else
cutUntil sLen; cutUntil sLen;
in in

View file

@ -24,7 +24,7 @@ rec {
isCpuType = x: isType "cpu-type" x isCpuType = x: isType "cpu-type" x
&& elem x.bits [8 16 32 64 128] && elem x.bits [8 16 32 64 128]
&& (builtins.lessThan 8 x.bits -> isSignificantByte x.significantByte); && (8 < x.bits -> isSignificantByte x.significantByte);
cpuTypes = with significantBytes; cpuTypes = with significantBytes;
setTypes "cpu-type" { setTypes "cpu-type" {

View file

@ -0,0 +1,29 @@
#! /usr/bin/env bash
set -e
# Install Nix
bash <(curl https://nixos.org/nix/install)
source $HOME/.nix-profile/etc/profile.d/nix.sh
# Make sure we can use hydra's binary cache
sudo mkdir /etc/nix
sudo tee /etc/nix/nix.conf <<EOF
binary-caches = http://cache.nixos.org http://hydra.nixos.org
trusted-binary-caches = http://hydra.nixos.org
build-max-jobs = 4
EOF
if [ "${TRAVIS_PULL_REQUEST}" = "false" ]; then
echo "Not a pull request, checking evaluation"
nix-build pkgs/top-level/release.nix -A tarball
exit 0
fi
echo "Installing nox"
git clone https://github.com/madjar/nox
pip --quiet install -e nox
echo "Reviewing PR"
# The current HEAD is the PR merged into origin/master, so we compare
# against origin/master
nox-review wip --against origin/master

View file

@ -0,0 +1,3 @@
viric viriketo@gmail.com
Pjotr Prins pjotr.public01@thebird.nl
Pjotr Prins pjotr.public05@thebird.nl

65
maintainers/scripts/vanity.sh Executable file
View file

@ -0,0 +1,65 @@
#! /bin/sh
export LANG=C LC_ALL=C LC_COLLATE=C
# Load git log
git_data="$(git log | grep 'Author:' |
sed -e 's/^ *Author://; s/\\//g; s/^ *//; s/ *$//;
s/ @ .*//; s/ *[<]/\t/; s/[>]//')"
# Name - nick - email correspondence from log and from maintainer list
# Also there are a few manual entries
maintainers="$(cat "$(dirname "$0")/../../lib/maintainers.nix" |
grep '=' | sed -re 's/\\"/''/g;
s/ *([^ =]*) *= *" *(.*[^ ]) *[<](.*)[>] *".*/\1\t\2\t\3/')"
git_lines="$( ( echo "$git_data";
cat vanity-manual-equalities.txt) | sort |uniq)"
# For RDF
normalize_name () {
sed -e 's/ /_/g; s/'\''/*/g; s/"/**/g;'
}
denormalize_name () {
sed -e 's/_/ /g; s/[*][*]/"/g; s/[*]/'\''/g;'
}
n3="$(mktemp --suffix .n3)"
# «The same person» relation and a sorting hint
# Full name is something with a space
(
echo "$git_lines" | sed -re 's@(.*)\t(.*)@<my://name/\1> <my://can-be> <my://name/\2>.@'
echo "$git_lines" | sed -re 's@(.*)\t(.*)@<my://name/\2> <my://can-be> <my://name/\1>.@'
echo "$maintainers" | sed -re 's@(.*)\t(.*)\t(.*)@<my://name/\1> <my://can-be> <my://name/\2>.@'
echo "$maintainers" | sed -re 's@(.*)\t(.*)\t(.*)@<my://name/\2> <my://can-be> <my://name/\3>.@'
echo "$maintainers" | sed -re 's@(.*)\t(.*)\t(.*)@<my://name/\3> <my://can-be> <my://name/\1>.@'
echo "$git_lines" | grep ' ' | cut -f 1 | sed -e 's@.*@<my://name/&> <my://is-name> <my://0>.@'
echo "$git_lines" | grep -v ' ' | cut -f 1 | sed -e 's@.*@<my://name/&> <my://is-name> <my://1>.@'
echo "$maintainers" | cut -f 2 | sed -e 's@.*@<my://name/&> <my://is-name> <my://0>.@'
) | normalize_name | grep -E '<my://[-a-z]+>' | sort | uniq > "$n3"
# Get transitive closure
sparql="$(nix-build '<nixpkgs>' -Q -A apache-jena --no-out-link)/bin/sparql"
name_list="$(
"$sparql" --results=TSV --data="$n3" "
select ?x ?y ?g where {
?x <my://can-be>+ ?y.
?x <my://is-name> ?g.
}
" | tail -n +2 |
sed -re 's@<my://name/@@g; s@<my://@@g; s@>@@g;' |
sort -k 2,3 -t ' '
)"
# Take first spelling option for every person
name_list_canonical="$(echo "$name_list" | cut -f 1,2 | uniq -f1)"
cleaner_script="$(echo "$name_list_canonical" | denormalize_name |
sed -re 's/(.*)\t(.*)/s#^\2$#\1#g/g')"
echo "$name_list" | denormalize_name
echo
echo "$git_data" | cut -f 1 | sed -re "$cleaner_script" | sort | uniq -c | sort -k1n

View file

@ -73,6 +73,25 @@ hardware.opengl.driSupport32Bit = true;
</simplesect> </simplesect>
<simplesect><title>AMD Graphics Cards</title>
<para>AMD provides a proprietary driver for its graphics cards that
has better 3D performance than the X.org drivers. It is not enabled
by default because its not free software. You can enable it as follows:
<programlisting>
services.xserver.videoDrivers = [ "ati_unfree" ];
</programlisting>
You will need to reboot after enabling this driver to prevent a clash
with other kernel modules.</para>
<para>On 64-bit systems, if you want full acceleration for 32-bit
programs such as Wine, you should also set the following:
<programlisting>
hardware.opengl.driSupport32Bit = true;
</programlisting>
</para>
</simplesect>
<simplesect><title>Touchpads</title> <simplesect><title>Touchpads</title>

View file

@ -482,7 +482,7 @@ sub screenshot {
my $name = basename($filename); my $name = basename($filename);
$self->nest("making screenshot $name", sub { $self->nest("making screenshot $name", sub {
$self->sendMonitorCommand("screendump $tmp"); $self->sendMonitorCommand("screendump $tmp");
system("convert $tmp ${filename}") == 0 system("pnmtopng $tmp > ${filename}") == 0
or die "cannot convert screenshot"; or die "cannot convert screenshot";
unlink $tmp; unlink $tmp;
}, { image => $name } ); }, { image => $name } );

View file

@ -27,7 +27,7 @@ rec {
cp ${./test-driver/Logger.pm} $libDir/Logger.pm cp ${./test-driver/Logger.pm} $libDir/Logger.pm
wrapProgram $out/bin/nixos-test-driver \ wrapProgram $out/bin/nixos-test-driver \
--prefix PATH : "${pkgs.qemu_kvm}/bin:${pkgs.vde2}/bin:${imagemagick}/bin:${coreutils}/bin" \ --prefix PATH : "${qemu_kvm}/bin:${vde2}/bin:${netpbm}/bin:${coreutils}/bin" \
--prefix PERL5LIB : "${lib.makePerlPath [ perlPackages.TermReadLineGnu perlPackages.XMLWriter perlPackages.IOTty ]}:$out/lib/perl5/site_perl" --prefix PERL5LIB : "${lib.makePerlPath [ perlPackages.TermReadLineGnu perlPackages.XMLWriter perlPackages.IOTty ]}:$out/lib/perl5/site_perl"
''; '';
}; };
@ -41,7 +41,7 @@ rec {
requiredSystemFeatures = [ "kvm" "nixos-test" ]; requiredSystemFeatures = [ "kvm" "nixos-test" ];
buildInputs = [ pkgs.libxslt ]; buildInputs = [ libxslt ];
buildCommand = buildCommand =
'' ''
@ -153,7 +153,7 @@ rec {
startAll; startAll;
$client->waitForUnit("multi-user.target"); $client->waitForUnit("multi-user.target");
${preBuild} ${preBuild}
$client->succeed("env -i ${pkgs.bash}/bin/bash ${buildrunner} /tmp/xchg/saved-env >&2"); $client->succeed("env -i ${bash}/bin/bash ${buildrunner} /tmp/xchg/saved-env >&2");
${postBuild} ${postBuild}
$client->succeed("sync"); # flush all data before pulling the plug $client->succeed("sync"); # flush all data before pulling the plug
''; '';

View file

@ -47,11 +47,6 @@ with lib;
</fontconfig> </fontconfig>
''; '';
# FIXME: This variable is no longer needed, but we'll keep it
# around for a while for applications linked against old
# fontconfig builds.
environment.variables.FONTCONFIG_FILE = "/etc/fonts/fonts.conf";
environment.systemPackages = [ pkgs.fontconfig ]; environment.systemPackages = [ pkgs.fontconfig ];
}; };

View file

@ -1,4 +1,4 @@
{ config, lib, pkgs, ... }: { config, lib, pkgs, pkgs_i686, ... }:
with pkgs; with pkgs;
with lib; with lib;
@ -10,6 +10,10 @@ let
systemWide = cfg.enable && cfg.systemWide; systemWide = cfg.enable && cfg.systemWide;
nonSystemWide = cfg.enable && !cfg.systemWide; nonSystemWide = cfg.enable && !cfg.systemWide;
# Forces 32bit pulseaudio and alsaPlugins to be built/supported for apps
# using 32bit alsa on 64bit linux.
enable32BitAlsaPlugins = stdenv.isx86_64 && (pkgs_i686.alsaLib != null);
ids = config.ids; ids = config.ids;
uid = ids.uids.pulseaudio; uid = ids.uids.pulseaudio;
@ -28,21 +32,25 @@ let
# Write an /etc/asound.conf that causes all ALSA applications to # Write an /etc/asound.conf that causes all ALSA applications to
# be re-routed to the PulseAudio server through ALSA's Pulse # be re-routed to the PulseAudio server through ALSA's Pulse
# plugin. # plugin.
alsaConf = writeText "asound.conf" '' alsaConf = writeText "asound.conf" (''
pcm_type.pulse { pcm_type.pulse {
lib ${alsaPlugins}/lib/alsa-lib/libasound_module_pcm_pulse.so libs.native = ${pkgs.alsaPlugins}/lib/alsa-lib/libasound_module_pcm_pulse.so ;
${lib.optionalString enable32BitAlsaPlugins
"libs.32Bit = ${pkgs_i686.alsaPlugins}/lib/alsa-lib/libasound_module_pcm_pulse.so ;"}
} }
pcm.!default { pcm.!default {
type pulse type pulse
hint.description "Default Audio Device (via PulseAudio)" hint.description "Default Audio Device (via PulseAudio)"
} }
ctl_type.pulse { ctl_type.pulse {
lib ${alsaPlugins}/lib/alsa-lib/libasound_module_ctl_pulse.so libs.native = ${alsaPlugins}/lib/alsa-lib/libasound_module_ctl_pulse.so ;
${lib.optionalString enable32BitAlsaPlugins
"libs.32Bit = ${pkgs_i686.alsaPlugins}/lib/alsa-lib/libasound_module_ctl_pulse.so ;"}
} }
ctl.!default { ctl.!default {
type pulse type pulse
} }
''; '');
in { in {
@ -116,7 +124,10 @@ in {
} }
(mkIf cfg.enable { (mkIf cfg.enable {
environment.systemPackages = [ cfg.package ]; environment.systemPackages = [
cfg.package
(lib.optional enable32BitAlsaPlugins pkgs_i686.pulseaudio)
];
environment.etc = singleton { environment.etc = singleton {
target = "asound.conf"; target = "asound.conf";

View file

@ -310,9 +310,9 @@ let
}) cfg.extraUsers; }) cfg.extraUsers;
groups = mapAttrsToList (n: g: groups = mapAttrsToList (n: g:
{ inherit (g) name gid; { inherit (g) name gid;
members = mapAttrsToList (n: u: u.name) ( members = g.members ++ (mapAttrsToList (n: u: u.name) (
filterAttrs (n: u: elem g.name u.extraGroups) cfg.extraUsers filterAttrs (n: u: elem g.name u.extraGroups) cfg.extraUsers
); ));
}) cfg.extraGroups; }) cfg.extraGroups;
}); });

View file

@ -46,7 +46,8 @@ in
description = '' description = ''
On 64-bit systems, whether to support Direct Rendering for On 64-bit systems, whether to support Direct Rendering for
32-bit applications (such as Wine). This is currently only 32-bit applications (such as Wine). This is currently only
supported for the <literal>nvidia</literal> driver and for supported for the <literal>nvidia</literal> and
<literal>ati_unfree</literal> drivers, as well as
<literal>Mesa</literal>. <literal>Mesa</literal>.
''; '';
}; };
@ -104,22 +105,9 @@ in
environment.sessionVariables.LD_LIBRARY_PATH = environment.sessionVariables.LD_LIBRARY_PATH =
[ "/run/opengl-driver/lib" "/run/opengl-driver-32/lib" ]; [ "/run/opengl-driver/lib" "/run/opengl-driver-32/lib" ];
# FIXME: move this into card-specific modules. hardware.opengl.package = mkDefault (makePackage pkgs);
hardware.opengl.package = mkDefault
(if elem "ati_unfree" videoDrivers then
kernelPackages.ati_drivers_x11
else
makePackage pkgs);
hardware.opengl.package32 = mkDefault (makePackage pkgs_i686); hardware.opengl.package32 = mkDefault (makePackage pkgs_i686);
boot.extraModulePackages = boot.extraModulePackages = optional (elem "virtualbox" videoDrivers) kernelPackages.virtualboxGuestAdditions;
optional (elem "virtualbox" videoDrivers) kernelPackages.virtualboxGuestAdditions ++
optional (elem "ati_unfree" videoDrivers) kernelPackages.ati_drivers_x11;
environment.etc =
optionalAttrs (elem "ati_unfree" videoDrivers) {
"ati".source = "${kernelPackages.ati_drivers_x11}/etc/ati";
};
}; };
} }

View file

@ -0,0 +1,37 @@
# This module provides the proprietary ATI X11 / OpenGL drivers.
{ config, lib, pkgs, pkgs_i686, ... }:
with lib;
let
drivers = config.services.xserver.videoDrivers;
enabled = elem "ati_unfree" drivers;
ati_x11 = config.boot.kernelPackages.ati_drivers_x11;
in
{
config = mkIf enabled {
services.xserver.drivers = singleton
{ name = "fglrx"; modules = [ ati_x11 ]; libPath = [ "${ati_x11}/lib" ]; };
hardware.opengl.package = ati_x11;
hardware.opengl.package32 = pkgs_i686.linuxPackages.ati_drivers_x11.override { libsOnly = true; kernel = null; };
environment.systemPackages = [ ati_x11 ];
boot.extraModulePackages = [ ati_x11 ];
boot.blacklistedKernelModules = [ "radeon" ];
environment.etc."ati".source = "${ati_x11}/etc/ati";
};
}

View file

@ -82,7 +82,7 @@
statsd = 69; statsd = 69;
transmission = 70; transmission = 70;
postgres = 71; postgres = 71;
smbguest = 74; smbguest = 74; # unused
varnish = 75; varnish = 75;
datadog = 76; datadog = 76;
lighttpd = 77; lighttpd = 77;
@ -150,8 +150,10 @@
zookeeper = 140; zookeeper = 140;
dnsmasq = 141; dnsmasq = 141;
uhub = 142; uhub = 142;
yandexdisk=143; yandexdisk = 143;
collectd=144; collectd = 144;
consul = 145;
mailpile = 146;
# When adding a uid, make sure it doesn't match an existing gid. And don't use uids above 399! # When adding a uid, make sure it doesn't match an existing gid. And don't use uids above 399!
@ -220,7 +222,7 @@
postgres = 71; postgres = 71;
vboxusers = 72; vboxusers = 72;
vboxsf = 73; vboxsf = 73;
smbguest = 74; smbguest = 74; # unused
varnish = 75; varnish = 75;
datadog = 76; datadog = 76;
lighttpd = 77; lighttpd = 77;
@ -272,6 +274,7 @@
riemann = 137; riemann = 137;
riemanndash = 138; riemanndash = 138;
uhub = 142; uhub = 142;
mailpile = 146;
# When adding a gid, make sure it doesn't match an existing uid. And don't use gids above 399! # When adding a gid, make sure it doesn't match an existing uid. And don't use gids above 399!

View file

@ -38,6 +38,7 @@
./hardware/pcmcia.nix ./hardware/pcmcia.nix
./hardware/video/bumblebee.nix ./hardware/video/bumblebee.nix
./hardware/video/nvidia.nix ./hardware/video/nvidia.nix
./hardware/video/ati.nix
./installer/tools/nixos-checkout.nix ./installer/tools/nixos-checkout.nix
./installer/tools/tools.nix ./installer/tools/tools.nix
./misc/assertions.nix ./misc/assertions.nix
@ -142,6 +143,7 @@
./services/hardware/udev.nix ./services/hardware/udev.nix
./services/hardware/udisks2.nix ./services/hardware/udisks2.nix
./services/hardware/upower.nix ./services/hardware/upower.nix
./services/hardware/thermald.nix
./services/logging/klogd.nix ./services/logging/klogd.nix
./services/logging/logcheck.nix ./services/logging/logcheck.nix
./services/logging/logrotate.nix ./services/logging/logrotate.nix
@ -157,6 +159,7 @@
./services/mail/postfix.nix ./services/mail/postfix.nix
./services/mail/spamassassin.nix ./services/mail/spamassassin.nix
#./services/misc/autofs.nix #./services/misc/autofs.nix
./services/misc/cpuminer-cryptonight.nix
./services/misc/cgminer.nix ./services/misc/cgminer.nix
./services/misc/dictd.nix ./services/misc/dictd.nix
./services/misc/disnix.nix ./services/misc/disnix.nix
@ -211,6 +214,7 @@
./services/networking/cjdns.nix ./services/networking/cjdns.nix
./services/networking/cntlm.nix ./services/networking/cntlm.nix
./services/networking/connman.nix ./services/networking/connman.nix
./services/networking/consul.nix
./services/networking/ddclient.nix ./services/networking/ddclient.nix
./services/networking/dhcpcd.nix ./services/networking/dhcpcd.nix
./services/networking/dhcpd.nix ./services/networking/dhcpd.nix
@ -229,6 +233,7 @@
./services/networking/iodined.nix ./services/networking/iodined.nix
./services/networking/ircd-hybrid/default.nix ./services/networking/ircd-hybrid/default.nix
./services/networking/kippo.nix ./services/networking/kippo.nix
./services/networking/mailpile.nix
./services/networking/minidlna.nix ./services/networking/minidlna.nix
./services/networking/murmur.nix ./services/networking/murmur.nix
./services/networking/nat.nix ./services/networking/nat.nix

View file

@ -45,7 +45,6 @@ in
PKG_CONFIG_PATH = [ "/lib/pkgconfig" ]; PKG_CONFIG_PATH = [ "/lib/pkgconfig" ];
TERMINFO_DIRS = [ "/share/terminfo" ]; TERMINFO_DIRS = [ "/share/terminfo" ];
PERL5LIB = [ "/lib/perl5/site_perl" ]; PERL5LIB = [ "/lib/perl5/site_perl" ];
ALSA_PLUGIN_DIRS = [ "/lib/alsa-lib" ];
KDEDIRS = [ "" ]; KDEDIRS = [ "" ];
STRIGI_PLUGIN_PATH = [ "/lib/strigi/" ]; STRIGI_PLUGIN_PATH = [ "/lib/strigi/" ];
QT_PLUGIN_PATH = [ "/lib/qt4/plugins" "/lib/kde4/plugins" ]; QT_PLUGIN_PATH = [ "/lib/qt4/plugins" "/lib/kde4/plugins" ];

View file

@ -1,6 +1,6 @@
{ config, pkgs, ... }: { config, pkgs, lib, ... }:
with pkgs.lib; with lib;
let let
cfg = config.uim; cfg = config.uim;

View file

@ -129,5 +129,6 @@ in zipModules ([]
++ obsolete' [ "boot" "loader" "grub" "bootDevice" ] ++ obsolete' [ "boot" "loader" "grub" "bootDevice" ]
++ obsolete' [ "boot" "initrd" "luks" "enable" ] ++ obsolete' [ "boot" "initrd" "luks" "enable" ]
++ obsolete' [ "programs" "bash" "enable" ] ++ obsolete' [ "programs" "bash" "enable" ]
++ obsolete' [ "services" "samba" "defaultShare" ]
) )

View file

@ -16,52 +16,76 @@ let
sticker_file "${cfg.dataDir}/sticker.sql" sticker_file "${cfg.dataDir}/sticker.sql"
log_file "syslog" log_file "syslog"
user "mpd" user "mpd"
${if cfg.network.host != "any" then
"bind_to_address ${cfg.network.host}" else ""}
${if cfg.network.port != 6600 then
"port ${toString cfg.network.port}" else ""}
${cfg.extraConfig} ${cfg.extraConfig}
''; '';
in { in {
###### interface ###### interface
options = { options = {
services.mpd = { services.mpd = {
enable = mkOption { enable = mkOption {
default = false; default = false;
description = '' description = ''
Whether to enable MPD, the music player daemon. Whether to enable MPD, the music player daemon.
''; '';
}; };
musicDirectory = mkOption { musicDirectory = mkOption {
default = "${cfg.dataDir}/music"; default = "${cfg.dataDir}/music";
description = '' description = ''
Extra configuration added to the end of MPD's Extra configuration added to the end of MPD's
configuration file, mpd.conf. configuration file, mpd.conf.
''; '';
}; };
extraConfig = mkOption { extraConfig = mkOption {
default = ""; default = "";
description = '' description = ''
Extra directives added to to the end of MPD's configuration file, Extra directives added to to the end of MPD's configuration file,
mpd.conf. Basic configuration like file location and uid/gid mpd.conf. Basic configuration like file location and uid/gid
is added automatically to the beginning of the file. is added automatically to the beginning of the file.
''; '';
}; };
dataDir = mkOption { dataDir = mkOption {
default = "/var/lib/mpd"; default = "/var/lib/mpd";
description = '' description = ''
The directory where MPD stores its state, tag cache, The directory where MPD stores its state, tag cache,
playlists etc. playlists etc.
''; '';
}; };
}; network = {
}; host = mkOption {
default = "any";
description = ''
This setting sets the address for the daemon to listen on. Careful attention
should be paid if this is assigned to anything other then the default, any.
This setting can deny access to control of the daemon.
'';
};
port = mkOption {
default = 6600;
description = ''
This setting is the TCP port that is desired for the daemon to get assigned
to.
'';
};
};
};
};
###### implementation ###### implementation

View file

@ -225,14 +225,14 @@ in
# Wait for PostgreSQL to be ready to accept connections. # Wait for PostgreSQL to be ready to accept connections.
postStart = postStart =
'' ''
while ! psql postgres -c "" 2> /dev/null; do while ! psql --port=${toString cfg.port} postgres -c "" 2> /dev/null; do
if ! kill -0 "$MAINPID"; then exit 1; fi if ! kill -0 "$MAINPID"; then exit 1; fi
sleep 0.1 sleep 0.1
done done
if test -e "${cfg.dataDir}/.first_startup"; then if test -e "${cfg.dataDir}/.first_startup"; then
${optionalString (cfg.initialScript != null) '' ${optionalString (cfg.initialScript != null) ''
cat "${cfg.initialScript}" | psql postgres cat "${cfg.initialScript}" | psql --port=${toString cfg.port} postgres
''} ''}
rm -f "${cfg.dataDir}/.first_startup" rm -f "${cfg.dataDir}/.first_startup"
fi fi

View file

@ -0,0 +1,66 @@
{ config, lib, pkgs, ... }:
with lib;
let
cfg = config.services.cpuminer-cryptonight;
json = builtins.toJSON (
cfg // {
enable = null;
threads =
if cfg.threads == 0 then null else toString cfg.threads;
}
);
confFile = builtins.toFile "cpuminer.json" json;
in
{
options = {
services.cpuminer-cryptonight = {
enable = mkOption {
type = types.bool;
default = false;
description = ''
Whether to enable the cpuminer cryptonight miner.
'';
};
url = mkOption {
type = types.string;
description = "URL of mining server";
};
user = mkOption {
type = types.string;
description = "Username for mining server";
};
pass = mkOption {
type = types.string;
default = "x";
description = "Password for mining server";
};
threads = mkOption {
type = types.int;
default = 0;
description = "Number of miner threads, defaults to available processors";
};
};
};
config = mkIf config.services.cpuminer-cryptonight.enable {
systemd.services.cpuminer-cryptonight = {
description = "Cryptonight cpuminer";
wantedBy = [ "multi-user.target" ];
after = [ "network.target" ];
serviceConfig = {
ExecStart = "${pkgs.cpuminer-multi}/bin/minerd --syslog --config=${confFile}";
User = "nobody";
};
};
};
}

View file

@ -5,6 +5,7 @@ with lib;
let let
cfg = config.services.gitolite; cfg = config.services.gitolite;
pubkeyFile = pkgs.writeText "gitolite-admin.pub" cfg.adminPubkey; pubkeyFile = pkgs.writeText "gitolite-admin.pub" cfg.adminPubkey;
hooks = lib.concatMapStrings (hook: "${hook} ") cfg.commonHooks;
in in
{ {
options = { options = {
@ -30,6 +31,14 @@ in
once, upon the first initialization of the Gitolite user. once, upon the first initialization of the Gitolite user.
''; '';
}; };
commonHooks = mkOption {
type = types.listOf types.path;
default = [];
description = ''
A list of custom git hooks that get copied to <literal>~/.gitolite/hooks/common</literal>.
'';
};
}; };
}; };
@ -57,6 +66,10 @@ in
if [ ! -d repositories ]; then if [ ! -d repositories ]; then
gitolite setup -pk ${pubkeyFile} gitolite setup -pk ${pubkeyFile}
fi fi
if [ -n "${hooks}" ]; then
cp ${hooks} .gitolite/hooks/common/
chmod +x .gitolite/hooks/common/*
fi
gitolite setup # Upgrade if needed gitolite setup # Upgrade if needed
''; '';
}; };

View file

@ -6,9 +6,6 @@ let
cfg = config.services.samba; cfg = config.services.samba;
user = "smbguest";
group = "smbguest";
logDir = "/var/log/samba"; logDir = "/var/log/samba";
privateDir = "/var/samba/private"; privateDir = "/var/samba/private";
@ -16,12 +13,6 @@ let
setupScript = setupScript =
'' ''
if ! test -d /home/smbd ; then
mkdir -p /home/smbd
chown ${user} /home/smbd
chmod a+rwx /home/smbd
fi
if ! test -d /var/samba ; then if ! test -d /var/samba ; then
mkdir -p /var/samba/locks /var/samba/cores/nmbd /var/samba/cores/smbd /var/samba/cores/winbindd mkdir -p /var/samba/locks /var/samba/cores/nmbd /var/samba/cores/smbd /var/samba/cores/winbindd
fi fi
@ -37,21 +28,15 @@ let
''; '';
configFile = pkgs.writeText "smb.conf" configFile = pkgs.writeText "smb.conf"
(if cfg.configText != null then cfg.configText else
'' ''
[ global ] [ global ]
log file = ${logDir}/log.%m log file = ${logDir}/log.%m
private dir = ${privateDir} private dir = ${privateDir}
${optionalString cfg.syncPasswordsByPam "pam password change = true"} ${optionalString cfg.syncPasswordsByPam "pam password change = true"}
${if cfg.defaultShare.enable then ''
[default]
path = /home/smbd
read only = ${if cfg.defaultShare.writeable then "no" else "yes"}
guest ok = ${if cfg.defaultShare.guest then "yes" else "no"}
''else ""}
${cfg.extraConfig} ${cfg.extraConfig}
''; '');
# This may include nss_ldap, needed for samba if it has to use ldap. # This may include nss_ldap, needed for samba if it has to use ldap.
nssModulesPath = config.system.nssModules.path; nssModulesPath = config.system.nssModules.path;
@ -149,19 +134,13 @@ in
"; ";
}; };
defaultShare = { configText = mkOption {
enable = mkOption { type = types.nullOr types.lines;
description = "Whether to share /home/smbd as 'default'."; default = null;
default = false; description = "
}; Verbatim contents of smb.conf. If null (default), use the
writeable = mkOption { autogenerated file from NixOS instead.
description = "Whether to allow write access to default share."; ";
default = false;
};
guest = mkOption {
description = "Whether to allow guest access to default share.";
default = true;
};
}; };
securityType = mkOption { securityType = mkOption {
@ -199,14 +178,6 @@ in
(mkIf config.services.samba.enable { (mkIf config.services.samba.enable {
users.extraUsers.smbguest = {
description = "Samba service user";
group = group;
uid = config.ids.uids.smbguest;
};
users.extraGroups.smbguest.gid = config.ids.uids.smbguest;
system.nssModules = optional cfg.nsswins samba; system.nssModules = optional cfg.nsswins samba;
systemd = { systemd = {
@ -224,7 +195,7 @@ in
"samba-setup" = { "samba-setup" = {
description = "Samba Setup Task"; description = "Samba Setup Task";
script = setupScript; script = setupScript;
unitConfig.RequiresMountsFor = "/home/smbd /var/samba /var/log/samba"; unitConfig.RequiresMountsFor = "/var/samba /var/log/samba";
}; };
}; };
}; };

View file

@ -1,6 +1,6 @@
{ config, pkgs, ... }: { config, pkgs, lib, ... }:
with pkgs.lib; with lib;
let let

View file

@ -1,8 +1,8 @@
# NixOS module for atftpd TFTP server # NixOS module for atftpd TFTP server
{ config, pkgs, ... }: { config, pkgs, lib, ... }:
with pkgs.lib; with lib;
let let

View file

@ -57,7 +57,7 @@ let
'' ''
{ {
"device_name": "${cfg.deviceName}", "device_name": "${cfg.deviceName}",
"storage_path": "/var/lib/btsync", "storage_path": "/var/lib/btsync/",
"listening_port": ${toString cfg.listeningPort}, "listening_port": ${toString cfg.listeningPort},
"use_gui": false, "use_gui": false,

View file

@ -190,7 +190,7 @@ in
echo '${cjdrouteConf}' | sed \ echo '${cjdrouteConf}' | sed \
-e "s/@CJDNS_ADMIN_PASSWORD@/$CJDNS_ADMIN_PASSWORD/g" \ -e "s/@CJDNS_ADMIN_PASSWORD@/$CJDNS_ADMIN_PASSWORD/g" \
-e "s/@CJDNS_PRIVATE_KEY@/$CJDNS_PRIVATE_KEY/g" \ -e "s/@CJDNS_PRIVATE_KEY@/$CJDNS_PRIVATE_KEY/g" \
| ${pkgs.cjdns}/sbin/cjdroute | ${pkgs.cjdns}/bin/cjdroute
''; '';
serviceConfig = { serviceConfig = {
@ -201,7 +201,7 @@ in
system.activationScripts.cjdns = '' system.activationScripts.cjdns = ''
grep -q "CJDNS_PRIVATE_KEY=" /etc/cjdns.keys || \ grep -q "CJDNS_PRIVATE_KEY=" /etc/cjdns.keys || \
echo "CJDNS_PRIVATE_KEY=$(${pkgs.cjdns}/sbin/makekey)" \ echo "CJDNS_PRIVATE_KEY=$(${pkgs.cjdns}/bin/makekey)" \
>> /etc/cjdns.keys >> /etc/cjdns.keys
grep -q "CJDNS_ADMIN_PASSWORD=" /etc/cjdns.keys || \ grep -q "CJDNS_ADMIN_PASSWORD=" /etc/cjdns.keys || \

View file

@ -0,0 +1,166 @@
{ config, lib, pkgs, utils, ... }:
with lib;
let
dataDir = "/var/lib/consul";
cfg = config.services.consul;
configOptions = {
data_dir = dataDir;
rejoin_after_leave = true;
}
// (if cfg.webUi then { ui_dir = "${pkgs.consul.ui}"; } else { })
// cfg.extraConfig;
configFiles = [ "/etc/consul.json" "/etc/consul-addrs.json" ]
++ cfg.extraConfigFiles;
devices = attrValues (filterAttrs (_: i: i != null) cfg.interface);
systemdDevices = flip map devices
(i: "sys-subsystem-net-devices-${utils.escapeSystemdPath i}.device");
in
{
options = {
services.consul = {
enable = mkOption {
type = types.bool;
default = false;
description = ''
Enables the consul daemon.
'';
};
webUi = mkOption {
type = types.bool;
default = false;
description = ''
Enables the web interface on the consul http port.
'';
};
interface = {
advertise = mkOption {
type = types.nullOr types.str;
default = null;
description = ''
The name of the interface to pull the advertise_addr from.
'';
};
bind = mkOption {
type = types.nullOr types.str;
default = null;
description = ''
The name of the interface to pull the bind_addr from.
'';
};
};
forceIpv4 = mkOption {
type = types.bool;
default = false;
description = ''
Whether we should force the interfaces to only pull ipv4 addresses.
'';
};
dropPrivileges = mkOption {
type = types.bool;
default = true;
description = ''
Whether the consul agent should be run as a non-root consul user.
'';
};
extraConfig = mkOption {
default = { };
description = ''
Extra configuration options which are serialized to json and added
to the config.json file.
'';
};
extraConfigFiles = mkOption {
default = [ ];
type = types.listOf types.str;
description = ''
Additional configuration files to pass to consul
NOTE: These will not trigger the service to be restarted when altered.
'';
};
};
};
config = mkIf cfg.enable {
users.extraUsers."consul" = {
description = "Consul agent daemon user";
uid = config.ids.uids.consul;
};
environment = {
etc."consul.json".text = builtins.toJSON configOptions;
systemPackages = with pkgs; [ consul ];
};
systemd.services.consul = {
wantedBy = [ "multi-user.target" ];
after = [ "network.target" ] ++ systemdDevices;
bindsTo = systemdDevices;
restartTriggers = [ config.environment.etc."consul.json".source ];
serviceConfig = {
ExecStart = "@${pkgs.consul}/bin/consul consul agent"
+ concatMapStrings (n: " -config-file ${n}") configFiles;
ExecStop = "${pkgs.consul}/bin/consul leave";
ExecReload = "${pkgs.consul}/bin/consul reload";
PermissionsStartOnly = true;
User = if cfg.dropPrivileges then "consul" else null;
};
path = with pkgs; [ iproute gnugrep gawk ];
preStart = ''
mkdir -m 0700 -p ${dataDir}
chown -R consul ${dataDir}
# Determine interface addresses
getAddrOnce () {
ip addr show dev "$1" \
| grep 'inet${optionalString (cfg.forceIpv4) " "}.*scope global' \
| awk -F '[ /\t]*' '{print $3}' | head -n 1
}
getAddr () {
ADDR="$(getAddrOnce $1)"
LEFT=60 # Die after 1 minute
while [ -z "$ADDR" ]; do
sleep 1
LEFT=$(expr $LEFT - 1)
if [ "$LEFT" -eq "0" ]; then
echo "Address lookup timed out"
exit 1
fi
ADDR="$(getAddrOnce $1)"
done
echo "$ADDR"
}
echo "{" > /etc/consul-addrs.json
''
+ concatStrings (flip mapAttrsToList cfg.interface (name: i:
optionalString (i != null) ''
echo " \"${name}_addr\": \"$(getAddr "${i}")\"," >> /etc/consul-addrs.json
''))
+ ''
echo " \"\": \"\"" >> /etc/consul-addrs.json
echo "}" >> /etc/consul-addrs.json
'';
};
};
}

View file

@ -0,0 +1,76 @@
{ config, lib, pkgs, ... }:
with lib;
let
cfg = config.services.mailpile;
hostname = cfg.hostname;
port = cfg.port;
in
{
###### interface
options = {
services.mailpile = {
enable = mkOption {
default = false;
description = "
Whether to enable Mailpile the mail client.
";
};
hostname = mkOption {
default = "localhost";
description = "Listen to this hostname or ip.";
};
port = mkOption {
default = "33411";
description = "Listen on this port.";
};
};
};
###### implementation
config = mkIf config.services.mailpile.enable {
users.extraUsers.mailpile =
{ uid = config.ids.uids.mailpile;
description = "Mailpile user";
createHome = true;
home = "/var/lib/mailpile";
};
users.extraGroups.mailpile =
{ gid = config.ids.gids.mailpile;
};
systemd.services.mailpile =
{
description = "Mailpile server.";
after = [ "network.target" ];
wantedBy = [ "multi-user.target" ];
serviceConfig = {
User = "mailpile";
ExecStart = "${pkgs.mailpile}/bin/mailpile --www ${hostname}:${port} --wait";
# mixed - first send SIGINT to main process,
# then after 2min send SIGKILL to whole group if neccessary
KillMode = "mixed";
KillSignal = "SIGINT"; # like Ctrl+C - safe mailpile shutdown
TimeoutSec = 120; # wait 2min untill SIGKILL
};
environment.MAILPILE_HOME = "/var/lib/mailpile/.local/share/Mailpile";
};
environment.systemPackages = [ pkgs.mailpile ];
};
}

View file

@ -13,38 +13,49 @@ let
dest = if cfg.externalIP == null then "-j MASQUERADE" else "-j SNAT --to-source ${cfg.externalIP}"; dest = if cfg.externalIP == null then "-j MASQUERADE" else "-j SNAT --to-source ${cfg.externalIP}";
flushNat = '' flushNat = ''
iptables -w -t nat -F PREROUTING iptables -w -t nat -D PREROUTING -j nixos-nat-pre 2>/dev/null|| true
iptables -w -t nat -F POSTROUTING iptables -w -t nat -F nixos-nat-pre 2>/dev/null || true
iptables -w -t nat -X iptables -w -t nat -X nixos-nat-pre 2>/dev/null || true
iptables -w -t nat -D POSTROUTING -j nixos-nat-post 2>/dev/null || true
iptables -w -t nat -F nixos-nat-post 2>/dev/null || true
iptables -w -t nat -X nixos-nat-post 2>/dev/null || true
''; '';
setupNat = '' setupNat = ''
# Create subchain where we store rules
iptables -w -t nat -N nixos-nat-pre
iptables -w -t nat -N nixos-nat-post
# We can't match on incoming interface in POSTROUTING, so # We can't match on incoming interface in POSTROUTING, so
# mark packets coming from the external interfaces. # mark packets coming from the external interfaces.
${concatMapStrings (iface: '' ${concatMapStrings (iface: ''
iptables -w -t nat -A PREROUTING \ iptables -w -t nat -A nixos-nat-pre \
-i '${iface}' -j MARK --set-mark 1 -i '${iface}' -j MARK --set-mark 1
'') cfg.internalInterfaces} '') cfg.internalInterfaces}
# NAT the marked packets. # NAT the marked packets.
${optionalString (cfg.internalInterfaces != []) '' ${optionalString (cfg.internalInterfaces != []) ''
iptables -w -t nat -A POSTROUTING -m mark --mark 1 \ iptables -w -t nat -A nixos-nat-post -m mark --mark 1 \
-o ${cfg.externalInterface} ${dest} -o ${cfg.externalInterface} ${dest}
''} ''}
# NAT packets coming from the internal IPs. # NAT packets coming from the internal IPs.
${concatMapStrings (range: '' ${concatMapStrings (range: ''
iptables -w -t nat -A POSTROUTING \ iptables -w -t nat -A nixos-nat-post \
-s '${range}' -o ${cfg.externalInterface} ${dest} -s '${range}' -o ${cfg.externalInterface} ${dest}
'') cfg.internalIPs} '') cfg.internalIPs}
# NAT from external ports to internal ports. # NAT from external ports to internal ports.
${concatMapStrings (fwd: '' ${concatMapStrings (fwd: ''
iptables -w -t nat -A PREROUTING \ iptables -w -t nat -A nixos-nat-pre \
-i ${cfg.externalInterface} -p tcp \ -i ${cfg.externalInterface} -p tcp \
--dport ${builtins.toString fwd.sourcePort} \ --dport ${builtins.toString fwd.sourcePort} \
-j DNAT --to-destination ${fwd.destination} -j DNAT --to-destination ${fwd.destination}
'') cfg.forwardPorts} '') cfg.forwardPorts}
# Append our chains to the nat tables
iptables -w -t nat -A PREROUTING -j nixos-nat-pre
iptables -w -t nat -A POSTROUTING -j nixos-nat-post
''; '';
in in
@ -157,7 +168,7 @@ in
extraStopCommands = flushNat; extraStopCommands = flushNat;
}; };
systemd.services = mkIf (!config.networking.firewall.enable) { nat = { systemd.services = mkIf (!config.networking.firewall.enable) { nat = {
description = "Network Address Translation"; description = "Network Address Translation";
wantedBy = [ "network.target" ]; wantedBy = [ "network.target" ];
after = [ "network-interfaces.target" "systemd-modules-load.service" ]; after = [ "network-interfaces.target" "systemd-modules-load.service" ];

View file

@ -44,6 +44,9 @@ in
# make the cgitrc manpage available # make the cgitrc manpage available
environment.systemPackages = [ pkgs.cgit ]; environment.systemPackages = [ pkgs.cgit ];
# declare module dependencies
services.lighttpd.enableModules = [ "mod_cgi" "mod_alias" "mod_setenv" ];
services.lighttpd.extraConfig = '' services.lighttpd.extraConfig = ''
$HTTP["url"] =~ "^/cgit" { $HTTP["url"] =~ "^/cgit" {
cgi.assign = ( cgi.assign = (

View file

@ -8,12 +8,54 @@ let
cfg = config.services.lighttpd; cfg = config.services.lighttpd;
needModRedirect = cfg.gitweb.enable; # List of known lighttpd modules, ordered by how the lighttpd documentation
needModAlias = cfg.cgit.enable || cfg.gitweb.enable; # recommends them being imported:
needModSetenv = cfg.cgit.enable || cfg.gitweb.enable; # http://redmine.lighttpd.net/projects/1/wiki/Server_modulesDetails
needModCgi = cfg.cgit.enable || cfg.gitweb.enable; #
needModStatus = cfg.mod_status; # Some modules are always imported and should not appear in the config:
needModUserdir = cfg.mod_userdir; # disallowedModules = [ "mod_indexfile" "mod_dirlisting" "mod_staticfile" ];
#
# Get full module list: "ls -1 $lighttpd/lib/*.so"
allKnownModules = [
"mod_rewrite"
"mod_redirect"
"mod_alias"
"mod_access"
"mod_auth"
"mod_status"
"mod_simple_vhost"
"mod_evhost"
"mod_userdir"
"mod_secdownload"
"mod_fastcgi"
"mod_proxy"
"mod_cgi"
"mod_ssi"
"mod_compress"
"mod_usertrack"
"mod_expire"
"mod_rrdtool"
"mod_accesslog"
# Remaining list of modules, order assumed to be unimportant.
"mod_cml"
"mod_dirlisting"
"mod_evasive"
"mod_extforward"
"mod_flv_streaming"
"mod_magnet"
"mod_mysql_vhost"
"mod_rewrite"
"mod_scgi"
"mod_setenv"
"mod_trigger_b4_dl"
"mod_webdav"
];
maybeModuleString = moduleName:
if elem moduleName cfg.enableModules then ''"${moduleName}"'' else "";
modulesIncludeString = concatStringsSep ",\n"
(filter (x: x != "") (map maybeModuleString allKnownModules));
configFile = if cfg.configText != "" then configFile = if cfg.configText != "" then
pkgs.writeText "lighttpd.conf" '' pkgs.writeText "lighttpd.conf" ''
@ -38,13 +80,7 @@ let
# been loaded already. So if two services were to put the same module in # been loaded already. So if two services were to put the same module in
# server.modules += (), that would break the lighttpd configuration. # server.modules += (), that would break the lighttpd configuration.
server.modules = ( server.modules = (
${optionalString needModRedirect ''"mod_redirect",''} ${modulesIncludeString}
${optionalString needModAlias ''"mod_alias",''}
${optionalString needModSetenv ''"mod_setenv",''}
${optionalString needModCgi ''"mod_cgi",''}
${optionalString needModStatus ''"mod_status",''}
${optionalString needModUserdir ''"mod_userdir",''}
"mod_accesslog"
) )
# Logging (logs end up in systemd journal) # Logging (logs end up in systemd journal)
@ -117,6 +153,19 @@ in
''; '';
}; };
enableModules = mkOption {
type = types.listOf types.str;
default = [ ];
example = [ "mod_cgi" "mod_status" ];
description = ''
List of lighttpd modules to enable. Sub-services take care of
enabling modules as needed, so this option is mainly for when you
want to add custom stuff to
<option>services.lighttpd.extraConfig</option> that depends on a
certain module.
'';
};
mod_status = mkOption { mod_status = mkOption {
default = false; default = false;
type = types.uniq types.bool; type = types.uniq types.bool;
@ -152,6 +201,26 @@ in
config = mkIf cfg.enable { config = mkIf cfg.enable {
assertions = [
{ assertion = all (x: elem x allKnownModules) cfg.enableModules;
message = ''
One (or more) modules in services.lighttpd.enableModules are
unrecognized.
Known modules: ${toString allKnownModules}
services.lighttpd.enableModules: ${toString cfg.enableModules}
'';
}
];
services.lighttpd.enableModules = mkMerge
[ (mkIf cfg.mod_status [ "mod_status" ])
(mkIf cfg.mod_userdir [ "mod_userdir" ])
# always load mod_accesslog so that we can log to the journal
[ "mod_accesslog" ]
];
systemd.services.lighttpd = { systemd.services.lighttpd = {
description = "Lighttpd Web Server"; description = "Lighttpd Web Server";
after = [ "network.target" ]; after = [ "network.target" ];

View file

@ -44,6 +44,9 @@ in
config = mkIf cfg.enable { config = mkIf cfg.enable {
# declare module dependencies
services.lighttpd.enableModules = [ "mod_cgi" "mod_redirect" "mod_alias" "mod_setenv" ];
services.lighttpd.extraConfig = '' services.lighttpd.extraConfig = ''
$HTTP["url"] =~ "^/gitweb" { $HTTP["url"] =~ "^/gitweb" {
cgi.assign = ( cgi.assign = (

View file

@ -18,7 +18,7 @@ in
# determines the default: later modules (if enabled) are preferred. # determines the default: later modules (if enabled) are preferred.
# E.g., if KDE is enabled, it supersedes xterm. # E.g., if KDE is enabled, it supersedes xterm.
imports = [ imports = [
./none.nix ./xterm.nix ./xfce.nix ./kde4.nix ./none.nix ./xterm.nix ./xfce.nix ./kde4.nix ./kde4_next.nix
./e17.nix ./e18.nix ./e19.nix ./gnome3.nix ./xbmc.nix ./e17.nix ./e18.nix ./e19.nix ./gnome3.nix ./xbmc.nix
]; ];

View file

@ -0,0 +1,163 @@
{ config, lib, pkgs, ... }:
with lib;
let
xcfg = config.services.xserver;
cfg = xcfg.desktopManager.kde4_next;
xorg = pkgs.xorg;
kde = pkgs.kde4_next;
# Disable Nepomuk and Strigi by default. As of KDE 4.7, they don't
# really work very well (e.g. searching files often fails to find
# files), segfault sometimes and consume significant resources.
# They can be re-enabled in the KDE System Settings under "Desktop
# Search".
nepomukConfig = pkgs.writeTextFile
{ name = "nepomuk-config";
destination = "/share/config/nepomukserverrc";
text =
''
[Basic Settings]
Start Nepomuk=false
[Service-nepomukstrigiservice]
autostart=false
'';
};
phononBackends = {
gstreamer = [
pkgs.phonon_backend_gstreamer
pkgs.gst_all.gstPluginsBase
pkgs.gst_all.gstPluginsGood
pkgs.gst_all.gstPluginsUgly
pkgs.gst_all.gstPluginsBad
pkgs.gst_all.gstFfmpeg # for mp3 playback
pkgs.gst_all.gstreamer # needed?
];
vlc = [pkgs.phonon_backend_vlc];
};
phononBackendPackages = flip concatMap cfg.phononBackends
(name: attrByPath [name] (throw "unknown phonon backend `${name}'") phononBackends);
in
{
options = {
services.xserver.desktopManager.kde4_next = {
enable = mkOption {
type = types.bool;
default = false;
description = "Enable the KDE 4 desktop environment.";
};
phononBackends = mkOption {
type = types.listOf types.str;
default = ["gstreamer"];
example = ["gstreamer" "vlc"];
description = "Which phonon multimedia backend kde should use";
};
};
};
config = mkIf (xcfg.enable && cfg.enable) {
# If KDE 4 is enabled, make it the default desktop manager (unless
# overridden by the user's configuration).
# !!! doesn't work yet ("Multiple definitions. Only one is allowed
# for this option.")
# services.xserver.desktopManager.default = mkOverride 900 "kde4";
services.xserver.desktopManager.session = singleton
{ name = "kde4_next";
bgSupport = true;
start =
''
# The KDE icon cache is supposed to update itself
# automatically, but it uses the timestamp on the icon
# theme directory as a trigger. Since in Nix the
# timestamp is always the same, this doesn't work. So as
# a workaround, nuke the icon cache on login. This isn't
# perfect, since it may require logging out after
# installing new applications to update the cache.
# See http://lists-archives.org/kde-devel/26175-what-when-will-icon-cache-refresh.html
rm -fv $HOME/.kde/cache-*/icon-cache.kcache
# Qt writes a weird libraryPath line to
# ~/.config/Trolltech.conf that causes the KDE plugin
# paths of previous KDE invocations to be searched.
# Obviously using mismatching KDE libraries is potentially
# disastrous, so here we nuke references to the Nix store
# in Trolltech.conf. A better solution would be to stop
# Qt from doing this wackiness in the first place.
if [ -e $HOME/.config/Trolltech.conf ]; then
sed -e '/nix\\store\|nix\/store/ d' -i $HOME/.config/Trolltech.conf
fi
# Start KDE.
exec ${kde.kdebase_workspace}/bin/startkde
'';
};
security.setuidOwners = singleton
{ program = "kcheckpass";
source = "${kde.kdebase_workspace}/lib/kde4/libexec/kcheckpass";
owner = "root";
group = "root";
setuid = true;
};
environment.systemPackages =
[ kde.kdelibs
kde.kde_baseapps # Splitted kdebase
kde.kde_workspace
kde.kde_runtime
kde.konsole
kde.kate
kde.kde_wallpapers # contains kdm's default background
kde.oxygen_icons
pkgs.virtuoso # to enable Nepomuk to find Virtuoso
# Starts KDE's Polkit authentication agent.
kde.polkit_kde_agent
# Miscellaneous runtime dependencies.
kde.qt4 # needed for qdbus
pkgs.shared_mime_info
xorg.xmessage # so that startkde can show error messages
xorg.xset # used by startkde, non-essential
xorg.xauth # used by kdesu
pkgs.shared_desktop_ontologies # used by nepomuk
pkgs.strigi # used by nepomuk
pkgs.mysql # used by akonadi
]
++ lib.optional config.hardware.pulseaudio.enable kde.kmix # Perhaps this should always be enabled
++ lib.optional config.hardware.bluetooth.enable kde.bluedevil
++ lib.optional config.networking.networkmanager.enable kde.networkmanagement
++ [ nepomukConfig ] ++ phononBackendPackages;
environment.pathsToLink = [ "/share" ];
environment.etc = singleton
{ source = "${pkgs.xkeyboard_config}/etc/X11/xkb";
target = "X11/xkb";
};
# Enable helpful DBus services.
services.udisks2.enable = true;
services.upower.enable = config.powerManagement.enable;
security.pam.services.kde = { allowNullPassword = true; };
};
}

View file

@ -28,11 +28,10 @@ let
buildCommand = '' buildCommand = ''
mkdir -p $out/gtk-3.0/ mkdir -p $out/gtk-3.0/
# This wrapper ensures that we actually get fonts # This wrapper ensures that we actually get ?? (fonts should be OK now)
makeWrapper ${pkgs.lightdm_gtk_greeter}/sbin/lightdm-gtk-greeter \ makeWrapper ${pkgs.lightdm_gtk_greeter}/sbin/lightdm-gtk-greeter \
$out/greeter \ $out/greeter \
--set XDG_DATA_DIRS ${pkgs.gnome2.gnome_icon_theme}/share \ --set XDG_DATA_DIRS ${pkgs.gnome2.gnome_icon_theme}/share \
--set FONTCONFIG_FILE /etc/fonts/fonts.conf \
--set XDG_CONFIG_HOME $out/ --set XDG_CONFIG_HOME $out/
# We need this to ensure that it actually tries to find icons from gnome-icon-theme # We need this to ensure that it actually tries to find icons from gnome-icon-theme

View file

@ -0,0 +1,28 @@
{ config, lib, pkgs, ... }:
with lib;
let
cfg = config.services.xserver.windowManager.afterstep;
in
{
###### interface
options = {
services.xserver.windowManager.afterstep.enable = mkOption {
default = false;
description = "Enable the Afterstep window manager.";
};
};
###### implementation
config = mkIf cfg.enable {
services.xserver.windowManager.session = singleton {
name = "afterstep";
start = ''
${pkgs.afterstep}/bin/afterstep &
waitPID=$!
'';
};
environment.systemPackages = [ pkgs.afterstep ];
};
}

View file

@ -0,0 +1,28 @@
{ config, lib, pkgs, ... }:
with lib;
let
cfg = config.services.xserver.windowManager.ratpoison;
in
{
###### interface
options = {
services.xserver.windowManager.ratpoison.enable = mkOption {
default = false;
description = "Enable the Ratpoison window manager.";
};
};
###### implementation
config = mkIf cfg.enable {
services.xserver.windowManager.session = singleton {
name = "ratpoison";
start = ''
${pkgs.ratpoison}/bin/ratpoison &
waitPID=$!
'';
};
environment.systemPackages = [ pkgs.ratpoison ];
};
}

View file

@ -0,0 +1,28 @@
{ config, lib, pkgs, ... }:
with lib;
let
cfg = config.services.xserver.windowManager.windowmaker;
in
{
###### interface
options = {
services.xserver.windowManager.windowmaker.enable = mkOption {
default = false;
description = "Enable the Windowmaker window manager.";
};
};
###### implementation
config = mkIf cfg.enable {
services.xserver.windowManager.session = singleton {
name = "windowmaker";
start = ''
${pkgs.windowmaker}/bin/wmaker &
waitPID=$!
'';
};
environment.systemPackages = [ pkgs.windowmaker ];
};
}

View file

@ -13,7 +13,6 @@ let
# Map video driver names to driver packages. FIXME: move into card-specific modules. # Map video driver names to driver packages. FIXME: move into card-specific modules.
knownVideoDrivers = { knownVideoDrivers = {
ati_unfree = { modules = [ kernelPackages.ati_drivers_x11 ]; driverName = "fglrx"; };
nouveau = { modules = [ pkgs.xf86_video_nouveau ]; }; nouveau = { modules = [ pkgs.xf86_video_nouveau ]; };
unichrome = { modules = [ pkgs.xorgVideoUnichrome ]; }; unichrome = { modules = [ pkgs.xorgVideoUnichrome ]; };
virtualbox = { modules = [ kernelPackages.virtualboxGuestAdditions ]; driverName = "vboxvideo"; }; virtualbox = { modules = [ kernelPackages.virtualboxGuestAdditions ]; driverName = "vboxvideo"; };
@ -400,8 +399,8 @@ in
services.xserver.drivers = flip concatMap cfg.videoDrivers (name: services.xserver.drivers = flip concatMap cfg.videoDrivers (name:
let driver = let driver =
attrByPath [name] attrByPath [name]
(if (hasAttr ("xf86video" + name) xorg) (if xorg ? ${"xf86video" + name}
then { modules = [(getAttr ("xf86video" + name) xorg) ]; } then { modules = [xorg.${"xf86video" + name}]; }
else null) else null)
knownVideoDrivers; knownVideoDrivers;
in optional (driver != null) ({ inherit name; driverName = name; } // driver)); in optional (driver != null) ({ inherit name; driverName = name; } // driver));
@ -444,8 +443,7 @@ in
pkgs.xterm pkgs.xterm
pkgs.xdg_utils pkgs.xdg_utils
] ]
++ optional (elem "virtualbox" cfg.videoDrivers) xorg.xrefresh ++ optional (elem "virtualbox" cfg.videoDrivers) xorg.xrefresh;
++ optional (elem "ati_unfree" cfg.videoDrivers) kernelPackages.ati_drivers_x11;
environment.pathsToLink = environment.pathsToLink =
[ "/etc/xdg" "/share/xdg" "/share/applications" "/share/icons" "/share/pixmaps" ]; [ "/etc/xdg" "/share/xdg" "/share/applications" "/share/icons" "/share/pixmaps" ];
@ -460,13 +458,11 @@ in
restartIfChanged = false; restartIfChanged = false;
environment = environment =
{ FONTCONFIG_FILE = "/etc/fonts/fonts.conf"; # !!! cleanup {
XKB_BINDIR = "${xorg.xkbcomp}/bin"; # Needed for the Xkb extension. XKB_BINDIR = "${xorg.xkbcomp}/bin"; # Needed for the Xkb extension.
XORG_DRI_DRIVER_PATH = "/run/opengl-driver/lib/dri"; # !!! Depends on the driver selected at runtime. XORG_DRI_DRIVER_PATH = "/run/opengl-driver/lib/dri"; # !!! Depends on the driver selected at runtime.
LD_LIBRARY_PATH = concatStringsSep ":" ( LD_LIBRARY_PATH = concatStringsSep ":" (
[ "${xorg.libX11}/lib" "${xorg.libXext}/lib" ] [ "${xorg.libX11}/lib" "${xorg.libXext}/lib" ]
++ optionals (elem "ati_unfree" cfg.videoDrivers)
[ "${kernelPackages.ati_drivers_x11}/lib" "${kernelPackages.ati_drivers_x11}/X11R6/lib64/modules/linux" ]
++ concatLists (catAttrs "libPath" cfg.drivers)); ++ concatLists (catAttrs "libPath" cfg.drivers));
} // cfg.displayManager.job.environment; } // cfg.displayManager.job.environment;

View file

@ -234,6 +234,15 @@ in
''; '';
}; };
enableCryptodisk = mkOption {
default = false;
type = types.bool;
description = ''
Enable support for encrypted partitions. Grub should automatically
unlock the correct encrypted partition and look for filesystems.
'';
};
}; };
}; };
@ -261,6 +270,7 @@ in
throw "You must set the option boot.loader.grub.device to make the system bootable." throw "You must set the option boot.loader.grub.device to make the system bootable."
else else
"PERL5LIB=${makePerlPath (with pkgs.perlPackages; [ FileSlurp XMLLibXML XMLSAX ])} " + "PERL5LIB=${makePerlPath (with pkgs.perlPackages; [ FileSlurp XMLLibXML XMLSAX ])} " +
(if cfg.enableCryptodisk then "GRUB_ENABLE_CRYPTODISK=y " else "") +
"${pkgs.perl}/bin/perl ${./install-grub.pl} ${grubConfig}"; "${pkgs.perl}/bin/perl ${./install-grub.pl} ${grubConfig}";
system.build.grub = grub; system.build.grub = grub;

View file

@ -199,7 +199,10 @@ sub GrubFs {
return Grub->new(path => $path, search => $search); return Grub->new(path => $path, search => $search);
} }
my $grubBoot = GrubFs("/boot"); my $grubBoot = GrubFs("/boot");
my $grubStore = GrubFs("/nix/store"); my $grubStore;
if ($copyKernels == 0) {
$grubStore = GrubFs("/nix/store");
}
# Generate the header. # Generate the header.
my $conf .= "# Automatically generated. DO NOT EDIT THIS FILE!\n"; my $conf .= "# Automatically generated. DO NOT EDIT THIS FILE!\n";

View file

@ -168,9 +168,24 @@ if test -e /sys/power/tuxonice/resume; then
fi fi
fi fi
if test -n "@resumeDevice@" -a -e /sys/power/resume -a -e /sys/power/disk; then if test -e /sys/power/resume -a -e /sys/power/disk; then
echo "@resumeDevice@" > /sys/power/resume 2> /dev/null || echo "failed to resume..." if test -n "@resumeDevice@"; then
echo shutdown > /sys/power/disk resumeDev="@resumeDevice@"
else
for sd in @resumeDevices@; do
# Try to detect resume device. According to Ubuntu bug:
# https://bugs.launchpad.net/ubuntu/+source/pm-utils/+bug/923326/comments/1
# When there are multiple swap devices, we can't know where will hibernate
# image reside. We can check all of them for swsuspend blkid.
if [ "$(udevadm info -q property "$sd" | sed -n 's/^ID_FS_TYPE=//p')" = "swsuspend" ]; then
resumeDev="$sd"
break
fi
done
fi
if test -n "$resumeDev"; then
echo "$resumeDev" > /sys/power/resume 2> /dev/null || echo "failed to resume..."
fi
fi fi

View file

@ -181,6 +181,9 @@ let
inherit (config.boot.initrd) checkJournalingFS inherit (config.boot.initrd) checkJournalingFS
preLVMCommands postDeviceCommands postMountCommands kernelModules; preLVMCommands postDeviceCommands postMountCommands kernelModules;
resumeDevices = map (sd: if sd ? device then sd.device else "/dev/disk/by-label/${sd.label}")
(filter (sd: sd ? label || hasPrefix "/dev/" sd.device) config.swapDevices);
fsInfo = fsInfo =
let f = fs: [ fs.mountPoint (if fs.device != null then fs.device else "/dev/disk/by-label/${fs.label}") fs.fsType fs.options ]; let f = fs: [ fs.mountPoint (if fs.device != null then fs.device else "/dev/disk/by-label/${fs.label}") fs.fsType fs.options ];
in pkgs.writeText "initrd-fsinfo" (concatStringsSep "\n" (concatMap f fileSystems)); in pkgs.writeText "initrd-fsinfo" (concatStringsSep "\n" (concatMap f fileSystems));
@ -220,13 +223,14 @@ in
options = { options = {
boot.resumeDevice = mkOption { boot.resumeDevice = mkOption {
type = types.nullOr types.str; type = types.str;
default = null; default = "";
example = "8:2"; example = "/dev/sda3";
description = '' description = ''
Device for manual resume attempt during boot, specified using Device for manual resume attempt during boot. This should be used primarily
the device's major and minor number as if you want to resume from file. Specify here the device where the file
<literal><replaceable>major</replaceable>:<replaceable>minor</replaceable></literal>. resides. You should also use <varname>boot.kernelParams</varname> to specify
<literal><replaceable>resume_offset</replaceable></literal>.
''; '';
}; };

View file

@ -6,8 +6,8 @@ let
checkService = v: checkService = v:
let assertValueOneOf = name: values: attr: let assertValueOneOf = name: values: attr:
let val = getAttr name attr; let val = attr.${name};
in optional ( hasAttr name attr && !elem val values) "Systemd service field `${name}' cannot have value `${val}'."; in optional (attr ? ${name} && !elem val values) "Systemd service field `${name}' cannot have value `${val}'.";
checkType = assertValueOneOf "Type" ["simple" "forking" "oneshot" "dbus" "notify" "idle"]; checkType = assertValueOneOf "Type" ["simple" "forking" "oneshot" "dbus" "notify" "idle"];
checkRestart = assertValueOneOf "Restart" ["no" "on-success" "on-failure" "on-abort" "always"]; checkRestart = assertValueOneOf "Restart" ["no" "on-success" "on-failure" "on-abort" "always"];
errors = concatMap (c: c v) [checkType checkRestart]; errors = concatMap (c: c v) [checkType checkRestart];

View file

@ -322,7 +322,7 @@ let
[Service] [Service]
${let env = cfg.globalEnvironment // def.environment; ${let env = cfg.globalEnvironment // def.environment;
in concatMapStrings (n: in concatMapStrings (n:
let s = "Environment=\"${n}=${getAttr n env}\"\n"; let s = "Environment=\"${n}=${env.${n}}\"\n";
in if stringLength s >= 2048 then throw "The value of the environment variable ${n} in systemd service ${name}.service is too long." else s) (attrNames env)} in if stringLength s >= 2048 then throw "The value of the environment variable ${n} in systemd service ${name}.service is too long." else s) (attrNames env)}
${if def.reloadIfChanged then '' ${if def.reloadIfChanged then ''
X-ReloadIfChanged=true X-ReloadIfChanged=true

View file

@ -345,10 +345,20 @@ in
interfaces = mkOption { interfaces = mkOption {
example = [ "enp4s0f0" "enp4s0f1" "wlan0" ]; example = [ "enp4s0f0" "enp4s0f1" "wlan0" ];
type = types.listOf types.string; type = types.listOf types.str;
description = "The interfaces to bond together"; description = "The interfaces to bond together";
}; };
lacp_rate = mkOption {
default = null;
example = "fast";
type = types.nullOr types.str;
description = ''
Option specifying the rate in which we'll ask our link partner
to transmit LACPDU packets in 802.3ad mode.
'';
};
miimon = mkOption { miimon = mkOption {
default = null; default = null;
example = 100; example = 100;
@ -364,7 +374,7 @@ in
mode = mkOption { mode = mkOption {
default = null; default = null;
example = "active-backup"; example = "active-backup";
type = types.nullOr types.string; type = types.nullOr types.str;
description = '' description = ''
The mode which the bond will be running. The default mode for The mode which the bond will be running. The default mode for
the bonding driver is balance-rr, optimizing for throughput. the bonding driver is balance-rr, optimizing for throughput.
@ -373,6 +383,16 @@ in
''; '';
}; };
xmit_hash_policy = mkOption {
default = null;
example = "layer2+3";
type = types.nullOr types.str;
description = ''
Selects the transmit hash policy to use for slave selection in
balance-xor, 802.3ad, and tlb modes.
'';
};
}; };
}; };
@ -758,9 +778,11 @@ in
path = [ pkgs.ifenslave pkgs.iproute ]; path = [ pkgs.ifenslave pkgs.iproute ];
script = '' script = ''
# Remove Dead Interfaces # Remove Dead Interfaces
ip link show "${n}" >/dev/null 2>&1 && ip link delete "${n}" ip link set "${n}" down >/dev/null 2>&1 || true
ifenslave -d "${n}" >/dev/null 2>&1 || true
ip link del "${n}" >/dev/null 2>&1 || true
ip link add "${n}" type bond ip link add name "${n}" type bond
# !!! There must be a better way to wait for the interface # !!! There must be a better way to wait for the interface
while [ ! -d /sys/class/net/${n} ]; do sleep 0.1; done; while [ ! -d /sys/class/net/${n} ]; do sleep 0.1; done;
@ -770,17 +792,21 @@ in
"echo ${toString v.miimon} > /sys/class/net/${n}/bonding/miimon"} "echo ${toString v.miimon} > /sys/class/net/${n}/bonding/miimon"}
${optionalString (v.mode != null) ${optionalString (v.mode != null)
"echo \"${v.mode}\" > /sys/class/net/${n}/bonding/mode"} "echo \"${v.mode}\" > /sys/class/net/${n}/bonding/mode"}
${optionalString (v.lacp_rate != null)
"echo \"${v.lacp_rate}\" > /sys/class/net/${n}/bonding/lacp_rate"}
${optionalString (v.xmit_hash_policy != null)
"echo \"${v.xmit_hash_policy}\" > /sys/class/net/${n}/bonding/xmit_hash_policy"}
# Bring up the bridge and enslave the specified interfaces # Bring up the bond and enslave the specified interfaces
ip link set "${n}" up ip link set "${n}" up
${flip concatMapStrings v.interfaces (i: '' ${flip concatMapStrings v.interfaces (i: ''
ifenslave "${n}" "${i}" ifenslave "${n}" "${i}"
'')} '')}
''; '';
postStop = '' postStop = ''
ip link set "${n}" down ip link set "${n}" down >dev/null 2>&1 || true
ifenslave -d "${n}" ifenslave -d "${n}" >/dev/null 2>&1 || true
ip link delete "${n}" ip link del "${n}" >/dev/null 2>&1 || true
''; '';
}); });
@ -798,7 +824,7 @@ in
script = '' script = ''
# Remove Dead Interfaces # Remove Dead Interfaces
ip link show "${n}" >/dev/null 2>&1 && ip link delete "${n}" ip link show "${n}" >/dev/null 2>&1 && ip link delete "${n}"
ip link add "${n}" type sit \ ip link add name "${n}" type sit \
${optionalString (v.remote != null) "remote \"${v.remote}\""} \ ${optionalString (v.remote != null) "remote \"${v.remote}\""} \
${optionalString (v.local != null) "local \"${v.local}\""} \ ${optionalString (v.local != null) "local \"${v.local}\""} \
${optionalString (v.ttl != null) "ttl ${toString v.ttl}"} \ ${optionalString (v.ttl != null) "ttl ${toString v.ttl}"} \
@ -824,7 +850,7 @@ in
script = '' script = ''
# Remove Dead Interfaces # Remove Dead Interfaces
ip link show "${n}" >/dev/null 2>&1 && ip link delete "${n}" ip link show "${n}" >/dev/null 2>&1 && ip link delete "${n}"
ip link add link "${v.interface}" "${n}" type vlan id "${toString v.id}" ip link add link "${v.interface}" name "${n}" type vlan id "${toString v.id}"
ip link set "${n}" up ip link set "${n}" up
''; '';
postStop = '' postStop = ''

View file

@ -1,3 +1,7 @@
# This jobset defines the main NixOS channels (such as nixos-unstable
# and nixos-14.04). The channel is updated every time the tested job
# succeeds, and all other jobs have finished (they may fail).
{ nixpkgs ? { outPath = ./..; revCount = 56789; shortRev = "gfedcba"; } { nixpkgs ? { outPath = ./..; revCount = 56789; shortRev = "gfedcba"; }
, stableBranch ? false , stableBranch ? false
, supportedSystems ? [ "x86_64-linux" "i686-linux" ] , supportedSystems ? [ "x86_64-linux" "i686-linux" ]
@ -18,7 +22,7 @@ let
in rec { in rec {
nixos = removeMaintainers (import ./release.nix { nixos = removeMaintainers (import ./release.nix {
inherit stableBranch; inherit stableBranch supportedSystems;
nixpkgs = nixpkgsSrc; nixpkgs = nixpkgsSrc;
}); });
@ -30,12 +34,13 @@ in rec {
tested = pkgs.releaseTools.aggregate { tested = pkgs.releaseTools.aggregate {
name = "nixos-${nixos.channel.version}"; name = "nixos-${nixos.channel.version}";
meta = { meta = {
description = "Release-critical builds for the NixOS unstable channel"; description = "Release-critical builds for the NixOS channel";
maintainers = [ pkgs.lib.maintainers.eelco pkgs.lib.maintainers.shlevy ]; maintainers = [ pkgs.lib.maintainers.eelco ];
}; };
constituents = constituents =
let all = x: map (p: x.${p}) supportedSystems; in let all = x: map (system: x.${system}) supportedSystems; in
[ nixos.channel [ nixos.channel
(all nixos.dummy)
(all nixos.manual) (all nixos.manual)
(all nixos.iso_minimal) (all nixos.iso_minimal)
@ -61,7 +66,8 @@ in rec {
(all nixos.tests.kde4) (all nixos.tests.kde4)
(all nixos.tests.login) (all nixos.tests.login)
(all nixos.tests.misc) (all nixos.tests.misc)
(all nixos.tests.nat) (all nixos.tests.nat.firewall)
(all nixos.tests.nat.standalone)
(all nixos.tests.nfs3) (all nixos.tests.nfs3)
(all nixos.tests.openssh) (all nixos.tests.openssh)
(all nixos.tests.printing) (all nixos.tests.printing)

View file

@ -11,7 +11,7 @@ let
forAllSystems = pkgs.lib.genAttrs supportedSystems; forAllSystems = pkgs.lib.genAttrs supportedSystems;
scrubDrv = drv: let res = { inherit (drv) drvPath outPath type name; outputName = "out"; out = res; }; in res; scrubDrv = drv: let res = { inherit (drv) drvPath outPath type name system meta; outputName = "out"; out = res; }; in res;
callTest = fn: args: forAllSystems (system: scrubDrv (import fn ({ inherit system; } // args))); callTest = fn: args: forAllSystems (system: scrubDrv (import fn ({ inherit system; } // args)));
@ -186,6 +186,16 @@ in rec {
); );
# Ensure that all packages used by the minimal NixOS config end up in the channel.
dummy = forAllSystems (system: pkgs.runCommand "dummy"
{ propagatedBuildInputs = (import lib/eval-config.nix {
inherit system;
modules = lib.singleton ({ config, pkgs, ... }: { });
}).config.environment.systemPackages;
}
"mkdir $out; fixupPhase");
# Provide a tarball that can be unpacked into an SD card, and easily # Provide a tarball that can be unpacked into an SD card, and easily
# boot that system from uboot (like for the sheevaplug). # boot that system from uboot (like for the sheevaplug).
# The pc variant helps preparing the expression for the system tarball # The pc variant helps preparing the expression for the system tarball
@ -244,7 +254,8 @@ in rec {
tests.munin = callTest tests/munin.nix {}; tests.munin = callTest tests/munin.nix {};
tests.mysql = callTest tests/mysql.nix {}; tests.mysql = callTest tests/mysql.nix {};
tests.mysqlReplication = callTest tests/mysql-replication.nix {}; tests.mysqlReplication = callTest tests/mysql-replication.nix {};
tests.nat = callTest tests/nat.nix {}; tests.nat.firewall = callTest tests/nat.nix { withFirewall = true; };
tests.nat.standalone = callTest tests/nat.nix { withFirewall = false; };
tests.nfs3 = callTest tests/nfs.nix { version = 3; }; tests.nfs3 = callTest tests/nfs.nix { version = 3; };
tests.nsd = callTest tests/nsd.nix {}; tests.nsd = callTest tests/nsd.nix {};
tests.openssh = callTest tests/openssh.nix {}; tests.openssh = callTest tests/openssh.nix {};

View file

@ -6,13 +6,13 @@ with pkgs.lib;
let let
# Build the ISO. This is the regular installation CD but with test # Build the ISO. This is the regular minimal installation CD but
# instrumentation. # with test instrumentation.
iso = iso =
(import ../lib/eval-config.nix { (import ../lib/eval-config.nix {
inherit system; inherit system;
modules = modules =
[ ../modules/installer/cd-dvd/installation-cd-graphical.nix [ ../modules/installer/cd-dvd/installation-cd-minimal.nix
../modules/testing/test-instrumentation.nix ../modules/testing/test-instrumentation.nix
{ key = "serial"; { key = "serial";
boot.loader.grub.timeout = mkOverride 0 0; boot.loader.grub.timeout = mkOverride 0 0;
@ -43,6 +43,7 @@ let
{ imports = { imports =
[ ./hardware-configuration.nix [ ./hardware-configuration.nix
<nixpkgs/nixos/modules/testing/test-instrumentation.nix> <nixpkgs/nixos/modules/testing/test-instrumentation.nix>
<nixpkgs/nixos/modules/profiles/minimal.nix>
]; ];
${if useEFI then '' ${if useEFI then ''

View file

@ -17,7 +17,7 @@ import ./make-test.nix {
users.extraUsers.jenkins.extraGroups = [ "users" ]; users.extraUsers.jenkins.extraGroups = [ "users" ];
systemd.services.jenkins.unitConfig.TimeoutSec = 240; systemd.services.jenkins.serviceConfig.TimeoutStartSec = "3min";
}; };
slave = slave =

View file

@ -32,7 +32,7 @@ import ./make-test.nix ({ pkgs, ... }: {
pkgs.kde4.kdegraphics pkgs.kde4.kdegraphics
pkgs.kde4.kdeutils pkgs.kde4.kdeutils
pkgs.kde4.kdegames pkgs.kde4.kdegames
pkgs.kde4.kdeedu #pkgs.kde4.kdeedu
pkgs.kde4.kdeaccessibility pkgs.kde4.kdeaccessibility
pkgs.kde4.kdeadmin pkgs.kde4.kdeadmin
pkgs.kde4.kdenetwork pkgs.kde4.kdenetwork

View file

@ -18,7 +18,7 @@ import ./make-test.nix {
''; '';
}; };
}; };
systemd.services.munin-node.unitConfig.TimeoutSec = 240; systemd.services.munin-node.serviceConfig.TimeoutStartSec = "3min";
}; };
}; };

View file

@ -3,77 +3,81 @@
# client on the inside network, a server on the outside network, and a # client on the inside network, a server on the outside network, and a
# router connected to both that performs Network Address Translation # router connected to both that performs Network Address Translation
# for the client. # for the client.
import ./make-test.nix ({ withFirewall, ... }:
let
unit = if withFirewall then "firewall" else "nat";
in
{
name = "nat${if withFirewall then "WithFirewall" else "Standalone"}";
import ./make-test.nix { nodes =
name = "nat"; { client =
{ config, pkgs, nodes, ... }:
{ virtualisation.vlans = [ 1 ];
networking.firewall.allowPing = true;
networking.defaultGateway =
(pkgs.lib.head nodes.router.config.networking.interfaces.eth2.ip4).address;
};
nodes = router =
{ client = { config, pkgs, ... }:
{ config, pkgs, nodes, ... }: { virtualisation.vlans = [ 2 1 ];
{ virtualisation.vlans = [ 1 ]; networking.firewall.enable = withFirewall;
networking.firewall.allowPing = true; networking.firewall.allowPing = true;
networking.defaultGateway = networking.nat.enable = true;
(pkgs.lib.head nodes.router.config.networking.interfaces.eth2.ip4).address; networking.nat.internalIPs = [ "192.168.1.0/24" ];
}; networking.nat.externalInterface = "eth1";
};
router = server =
{ config, pkgs, ... }: { config, pkgs, ... }:
{ virtualisation.vlans = [ 2 1 ]; { virtualisation.vlans = [ 2 ];
networking.firewall.allowPing = true; networking.firewall.enable = false;
networking.nat.enable = true; services.httpd.enable = true;
networking.nat.internalIPs = [ "192.168.1.0/24" ]; services.httpd.adminAddr = "foo@example.org";
networking.nat.externalInterface = "eth1"; services.vsftpd.enable = true;
}; services.vsftpd.anonymousUser = true;
};
};
server = testScript =
{ config, pkgs, ... }: { nodes, ... }:
{ virtualisation.vlans = [ 2 ]; ''
networking.firewall.enable = false; startAll;
services.httpd.enable = true;
services.httpd.adminAddr = "foo@example.org";
services.vsftpd.enable = true;
services.vsftpd.anonymousUser = true;
};
};
testScript = # The router should have access to the server.
{ nodes, ... }: $server->waitForUnit("network.target");
'' $server->waitForUnit("httpd");
startAll; $router->waitForUnit("network.target");
$router->succeed("curl --fail http://server/ >&2");
# The router should have access to the server. # The client should be also able to connect via the NAT router.
$server->waitForUnit("network.target"); $router->waitForUnit("${unit}");
$server->waitForUnit("httpd"); $client->waitForUnit("network.target");
$router->waitForUnit("network.target"); $client->succeed("curl --fail http://server/ >&2");
$router->succeed("curl --fail http://server/ >&2"); $client->succeed("ping -c 1 server >&2");
# The client should be also able to connect via the NAT router. # Test whether passive FTP works.
$router->waitForUnit("nat"); $server->waitForUnit("vsftpd");
$client->waitForUnit("network.target"); $server->succeed("echo Hello World > /home/ftp/foo.txt");
$client->succeed("curl --fail http://server/ >&2"); $client->succeed("curl -v ftp://server/foo.txt >&2");
$client->succeed("ping -c 1 server >&2");
# Test whether passive FTP works. # Test whether active FTP works.
$server->waitForUnit("vsftpd"); $client->succeed("curl -v -P - ftp://server/foo.txt >&2");
$server->succeed("echo Hello World > /home/ftp/foo.txt");
$client->succeed("curl -v ftp://server/foo.txt >&2");
# Test whether active FTP works. # Test ICMP.
$client->succeed("curl -v -P - ftp://server/foo.txt >&2"); $client->succeed("ping -c 1 router >&2");
$router->succeed("ping -c 1 client >&2");
# Test ICMP. # If we turn off NAT, the client shouldn't be able to reach the server.
$client->succeed("ping -c 1 router >&2"); $router->succeed("iptables -t nat -D PREROUTING -j nixos-nat-pre");
$router->succeed("ping -c 1 client >&2"); $router->succeed("iptables -t nat -D POSTROUTING -j nixos-nat-post");
$client->fail("curl --fail --connect-timeout 5 http://server/ >&2");
$client->fail("ping -c 1 server >&2");
# If we turn off NAT, the client shouldn't be able to reach the server. # And make sure that reloading the NAT job works.
$router->stopJob("nat"); $router->succeed("systemctl restart ${unit}");
$client->fail("curl --fail --connect-timeout 5 http://server/ >&2"); $client->succeed("curl --fail http://server/ >&2");
$client->fail("ping -c 1 server >&2"); $client->succeed("ping -c 1 server >&2");
'';
# And make sure that restarting the NAT job works. })
$router->succeed("systemctl start nat");
$client->succeed("curl --fail http://server/ >&2");
$client->succeed("ping -c 1 server >&2");
'';
}

View file

@ -39,7 +39,7 @@ assert withOnlineServices -> withTaglib;
assert withReplaygain -> withTaglib; assert withReplaygain -> withTaglib;
let let
version = "1.4.1"; version = "1.4.2";
pname = "cantata"; pname = "cantata";
fstat = x: fn: "-DENABLE_" + fn + "=" + (if x then "ON" else "OFF"); fstat = x: fn: "-DENABLE_" + fn + "=" + (if x then "ON" else "OFF");
fstats = x: map (fstat x); fstats = x: map (fstat x);
@ -50,8 +50,8 @@ stdenv.mkDerivation rec {
src = fetchurl { src = fetchurl {
inherit name; inherit name;
url = "https://drive.google.com/uc?export=download&id=0Bzghs6gQWi60eXhuZ1Z3bGM2bjQ"; url = "https://drive.google.com/uc?export=download&id=0Bzghs6gQWi60UDFOeU1qSkIzaVE";
sha256 = "b0d5a1798efd275d72dffb87bc0f016fc865dbd1384b7c9af039cebdffe0cca3"; sha256 = "0ycwx75f1jlsaca170bz82av06bnlknl3q0df001rhmhb7wh4j6c";
}; };
buildInputs = buildInputs =

View file

@ -0,0 +1,98 @@
{ stdenv, fetchurl, intltool, pkgconfig
# deadbeef can use either gtk2 or gtk3
, gtk2Support ? true, gtk2 ? null
, gtk3Support ? false, gtk3 ? null, gsettings_desktop_schemas ? null, makeWrapper ? null
# input plugins
, vorbisSupport ? true, libvorbis ? null
, mp123Support ? true, libmad ? null
, flacSupport ? true, flac ? null
, wavSupport ? true, libsndfile ? null
, cdaSupport ? true, libcdio ? null, libcddb ? null
, aacSupport ? true, faad2 ? null
, wavpackSupport ? false, wavpack ? null
, ffmpegSupport ? false, ffmpeg ? null
# misc plugins
, zipSupport ? true, libzip ? null
, artworkSupport ? true, imlib2 ? null
, hotkeysSupport ? true, libX11 ? null
, osdSupport ? true, dbus ? null
# output plugins
, alsaSupport ? true, alsaLib ? null
, pulseSupport ? true, pulseaudio ? null
# effect plugins
, resamplerSupport ? true, libsamplerate ? null
, overloadSupport ? true, zlib ? null
# transports
, remoteSupport ? true, curl ? null
}:
assert gtk2Support || gtk3Support;
assert gtk2Support -> gtk2 != null;
assert gtk3Support -> gtk3 != null && gsettings_desktop_schemas != null && makeWrapper != null;
assert vorbisSupport -> libvorbis != null;
assert mp123Support -> libmad != null;
assert flacSupport -> flac != null;
assert wavSupport -> libsndfile != null;
assert cdaSupport -> (libcdio != null && libcddb != null);
assert aacSupport -> faad2 != null;
assert zipSupport -> libzip != null;
assert ffmpegSupport -> ffmpeg != null;
assert artworkSupport -> imlib2 != null;
assert hotkeysSupport -> libX11 != null;
assert osdSupport -> dbus != null;
assert alsaSupport -> alsaLib != null;
assert pulseSupport -> pulseaudio != null;
assert resamplerSupport -> libsamplerate != null;
assert overloadSupport -> zlib != null;
assert wavpackSupport -> wavpack != null;
assert remoteSupport -> curl != null;
stdenv.mkDerivation rec {
name = "deadbeef-0.6.2";
src = fetchurl {
url = "http://garr.dl.sourceforge.net/project/deadbeef/${name}.tar.bz2";
sha256 = "06jfsqyakpvq0xhah7dlyvdzh5ym3hhb4yfczczw11ijd1kbjcrl";
};
buildInputs = with stdenv.lib;
optional gtk2Support gtk2
++ optionals gtk3Support [gtk3 gsettings_desktop_schemas]
++ optional vorbisSupport libvorbis
++ optional mp123Support libmad
++ optional flacSupport flac
++ optional wavSupport libsndfile
++ optionals cdaSupport [libcdio libcddb]
++ optional aacSupport faad2
++ optional zipSupport libzip
++ optional ffmpegSupport ffmpeg
++ optional artworkSupport imlib2
++ optional hotkeysSupport libX11
++ optional osdSupport dbus
++ optional alsaSupport alsaLib
++ optional pulseSupport pulseaudio
++ optional resamplerSupport libsamplerate
++ optional overloadSupport zlib
++ optional wavpackSupport wavpack
++ optional remoteSupport curl
;
nativeBuildInputs = with stdenv.lib; [ intltool pkgconfig ]
++ optional gtk3Support makeWrapper;
enableParallelBuilding = true;
postInstall = if !gtk3Support then "" else ''
wrapProgram "$out/bin/deadbeef" \
--prefix XDG_DATA_DIRS : "$GSETTINGS_SCHEMAS_PATH"
'';
meta = with stdenv.lib; {
description = "Ultimate Music Player for GNU/Linux";
homepage = http://deadbeef.sourceforge.net/;
license = licenses.gpl2;
platforms = platforms.linux;
maintainers = [ maintainers.abbradar ];
repositories.git = https://github.com/Alexey-Yakovenko/deadbeef;
};
}

View file

@ -2,11 +2,11 @@
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "drumkv1-${version}"; name = "drumkv1-${version}";
version = "0.5.0"; version = "0.5.1";
src = fetchurl { src = fetchurl {
url = "mirror://sourceforge/drumkv1/${name}.tar.gz"; url = "mirror://sourceforge/drumkv1/${name}.tar.gz";
sha256 = "16bjkp22hfpmzj5di98dddzslavgvhw5z7pgjzmjqz9dxvbqwq1k"; sha256 = "1cih4f22922ndk8yrcf955fvzkd8mh7qz1xcdyn3xybs7ackgarq";
}; };
buildInputs = [ jack2 libsndfile lv2 qt4 ]; buildInputs = [ jack2 libsndfile lv2 qt4 ];

View file

@ -1,14 +1,14 @@
{ stdenv, fetchurl, pkgconfig, intltool, gtk, glib, libid3tag, id3lib, taglib { stdenv, fetchurl, pkgconfig, intltool, gtk, glib, libid3tag, id3lib, taglib
, libvorbis, libogg, flac , libvorbis, libogg, flac, itstool, libxml2
}: }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "easytag-${version}"; name = "easytag-${version}";
version = "2.1.8"; version = "2.2.4";
src = fetchurl { src = fetchurl {
url = "mirror://gnome/sources/easytag/2.1/${name}.tar.xz"; url = "mirror://gnome/sources/easytag/2.2/${name}.tar.xz";
sha256 = "1ab5iv0a83cdf07qzi81ydfk5apay06nxags9m07msqalz4pabqs"; sha256 = "14f0s0l28fwxnc37aw1imal2xcg9ykq35mx2j9gaqzz02ymjk0s5";
}; };
preConfigure = '' preConfigure = ''
@ -22,11 +22,13 @@ stdenv.mkDerivation rec {
buildInputs = [ buildInputs = [
pkgconfig intltool gtk glib libid3tag id3lib taglib libvorbis libogg flac pkgconfig intltool gtk glib libid3tag id3lib taglib libvorbis libogg flac
itstool libxml2
]; ];
meta = { meta = {
description = "View and edit tags for various audio files"; description = "View and edit tags for various audio files";
homepage = "http://projects.gnome.org/easytag/"; homepage = "http://projects.gnome.org/easytag/";
license = stdenv.lib.licenses.gpl2Plus; license = stdenv.lib.licenses.gpl2Plus;
maintainers = with stdenv.lib.maintainers; [ fuuzetsu ];
}; };
} }

View file

@ -0,0 +1,40 @@
--- code-r100/configure.ac 2014-09-25 23:44:41.059174904 +0200
+++ code-r100.new/configure.ac 2014-09-26 01:37:18.507017390 +0200
@@ -44,6 +44,8 @@
[AC_MSG_ERROR(CONFIG: You need libxml2-dev installed.
http://www.xmlsoft.org/)])
+PKG_CHECK_MODULES([libxml], [libxml-2.0])
+
AC_CHECK_LIB([m], [sqrt], , [AC_MSG_ERROR(CORE: You need libm installed)])
AC_CHECK_LIB([pthread], [pthread_self], , [AC_MSG_ERROR(CORE: You need libpthread installed)])
@@ -79,12 +81,12 @@
echo "--- Enabling USB LCD display --";
fi
-#SDL_VERSION=1.2.4
-#AM_PATH_SDL($SDL_VERSION,
-# :,
-# AC_MSG_ERROR([VIDEO: *** SDL version $SDL_VERSION not found!
-# http://www.libsdl.org/])
-#)
+SDL_VERSION=1.2.4
+AM_PATH_SDL($SDL_VERSION,
+ :,
+ AC_MSG_ERROR([VIDEO: *** SDL version $SDL_VERSION not found!
+ http://www.libsdl.org/])
+)
AC_CHECK_LIB([vorbis], [main], ,
[AC_MSG_ERROR(AUDIO: You need libvorbis-dev installed.
@@ -95,6 +97,9 @@
AC_CHECK_LIB([vorbisenc], [main], ,
[AC_MSG_ERROR(AUDIO: You need libvorbis-dev installed.
http://www.xiph.org/ogg/vorbis/)])
+AC_CHECK_LIB([ogg], [main], ,
+ [AC_MSG_ERROR(AUDIO: You need libogg-dev installed.
+ http://www.xiph.org/ogg/)])
AC_CHECK_LIB([sndfile], [main], ,
[AC_MSG_ERROR(AUDIO: you need libsndfile installed.

View file

@ -0,0 +1,44 @@
{ stdenv, fetchsvn, pkgconfig, autoconf, automake, gnutls, freetype
, SDL, SDL_gfx, SDL_ttf, liblo, libxml2, alsaLib, jack2, libvorbis
, libsndfile, libogg
}:
stdenv.mkDerivation {
name = "freewheeling-100";
src = fetchsvn {
url = svn://svn.code.sf.net/p/freewheeling/code;
rev = 100;
sha256 = "1m6z7p93xyha25qma9bazpzbp04pqdv5h3yrv6851775xsyvzksv";
};
buildInputs = [
pkgconfig autoconf automake gnutls freetype SDL SDL_gfx SDL_ttf
liblo libxml2 jack2 alsaLib libvorbis libsndfile libogg
];
preConfigure = "autoreconf -vfi";
patches = [ ./am_path_sdl.patch ./xml.patch ];
meta = {
description = "A live looping instrument with JACK and MIDI support";
longDescription = ''
Freewheeling allows us to build repetitive grooves
by sampling and directing loops from within spirited improvisation.
It works because, down to the core, it's built around
improv. We leave mice and menus, and dive into our own process
of making sound.
Freewheeling runs under Mac OS X and Linux, and is open source
software, released under the GNU GPL license.
'' ;
version = "r100";
homepage = "http://freewheeling.sourceforge.net";
license = stdenv.lib.licenses.gpl2;
maintainers = [ stdenv.lib.maintainers.sepi ];
platforms = stdenv.lib.platforms.linux;
};
}

View file

@ -0,0 +1,13 @@
--- code-r100/src/Makefile.am 2014-09-25 23:44:41.043174832 +0200
+++ code-r100.new/src/Makefile.am 2014-09-26 01:21:03.750015888 +0200
@@ -24,7 +24,8 @@
fweelindir = $(datadir)/fweelin
-FWEELIN_CFLAGS = -I. -g -Wall -Wno-write-strings -Wno-non-virtual-dtor -D_REENTRANT -DPTHREADS -DNDEBUG -DVERSION=\"$(VERSION)\" -DFWEELIN_DATADIR=\"$(fweelindir)\" -DADDON_DIR=\"/usr/local/lib/jack\" -I/usr/include/freetype2 -I/usr/include/libxml2 -funroll-loops -finline-functions -fomit-frame-pointer -ffast-math -fexpensive-optimizations -fstrict-aliasing -falign-loops=2 -falign-jumps=2 -falign-functions=2 -O9
+XML_CFLAGS = `xml2-config --cflags`
+FWEELIN_CFLAGS = -I. -g -Wall -Wno-write-strings -Wno-non-virtual-dtor -D_REENTRANT -DPTHREADS -DNDEBUG -DVERSION=\"$(VERSION)\" -DFWEELIN_DATADIR=\"$(fweelindir)\" -DADDON_DIR=\"/usr/local/lib/jack\" -I/usr/include/freetype2 $(XML_CFLAGS) -funroll-loops -finline-functions -fomit-frame-pointer -ffast-math -fexpensive-optimizations -fstrict-aliasing -falign-loops=2 -falign-jumps=2 -falign-functions=2 -O9
AM_CFLAGS = $(CFLAGS) $(FWEELIN_CFLAGS)
-AM_CXXFLAGS = $(CFLAGS) $(CXXFLAGS) $(FWEELIN_CFLAGS)
+AM_CXXFLAGS = $(CFLAGS) $(CXXFLAGS) $(FWEELIN_CFLAGS) ${libxml2_CFLAGS}

View file

@ -4,8 +4,8 @@
assert stdenv.system == "x86_64-linux" || stdenv.system == "1686-linux"; assert stdenv.system == "x86_64-linux" || stdenv.system == "1686-linux";
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
debversion = "beta_1.0.84.1107-r0"; debversion = "beta_1.0.55.7425-r0";
version = "1.0.84.1107-beta-r0"; # friendly to nix-env version sorting algo version = "beta_1.0.55.7425-r0"; # friendly to nix-env version sorting algo
product = "google-musicmanager"; product = "google-musicmanager";
name = "${product}-${version}"; name = "${product}-${version}";
@ -16,12 +16,12 @@ stdenv.mkDerivation rec {
src = if stdenv.system == "x86_64-linux" src = if stdenv.system == "x86_64-linux"
then fetchurl { then fetchurl {
url = "http://dl.google.com/linux/musicmanager/deb/pool/main/g/${product}-beta/${product}-${debversion}_amd64.deb"; url = "http://dl.google.com/linux/musicmanager/deb/pool/main/g/google-musicmanager-beta/google-musicmanager-${version}_amd64.deb";
sha256 = "0irlrspw508b1s9i5d1mddpp2x9w1ny3svf27gxf8pmwbiyd1cyi"; sha256 = "0efdce3970e2cf83eb7d8f6021f987a1517a41823784ada8e51f1649f8a49342";
} }
else fetchurl { else fetchurl {
url = "http://dl.google.com/linux/musicmanager/deb/pool/main/g/${product}-beta/${product}-${debversion}_i386.deb"; url = "http://dl.google.com/linux/musicmanager/deb/pool/main/g/google-musicmanager-beta/google-musicmanager-${version}_i386.deb";
sha256 = "13pfsjvaygap6axrlbfhyk1h8377xmwi47x4af6j57qq6z7329rg"; sha256 = "4cc8822ab90af97195c2edfa74cc8b4a736e763cc3382f741aa1de0f72ac211e";
}; };
unpackPhase = '' unpackPhase = ''

View file

@ -12,8 +12,8 @@ stdenv.mkDerivation rec {
}; };
buildInputs = [ buildInputs = [
avahi boost eigen fftw gettext glib glibmm gtk gtkmm intltool jack2 avahi boost boost.lib eigen fftw gettext glib glibmm gtk gtkmm intltool
ladspaH librdf libsndfile lilv lv2 pkgconfig python serd sord sratom jack2 ladspaH librdf libsndfile lilv lv2 pkgconfig python serd sord sratom
]; ];
configurePhase = "python waf configure --prefix=$out"; configurePhase = "python waf configure --prefix=$out";

View file

@ -4,16 +4,16 @@
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "ingen-svn-${rev}"; name = "ingen-svn-${rev}";
rev = "5317"; rev = "5464";
src = fetchsvn { src = fetchsvn {
url = "http://svn.drobilla.net/lad/trunk/ingen"; url = "http://svn.drobilla.net/lad/trunk/ingen";
rev = rev; rev = rev;
sha256 = "0zm3wbv9qsingjyr95nwin3khmnf3wq3fz2xa6p420dpcy6qnl4x"; sha256 = "1p5rsxwanpj3kj5yai7zqbharj2ldvn78x3p739vkgpr3dinp506";
}; };
buildInputs = [ buildInputs = [
boost ganv glibmm gtk gtkmm jack2 lilv lv2 pkgconfig python boost boost.lib ganv glibmm gtk gtkmm jack2 lilv lv2 pkgconfig python
raul serd sord sratom suil raul serd sord sratom suil
]; ];

View file

@ -0,0 +1,74 @@
{ stdenv, fetchurl
, pkgconfig, cmake, perl, ffmpeg
, docbook_xml_dtd_45, docbook_xsl, libxslt
, phonon, automoc4, chromaprint, id3lib
, taglib, mp4v2, flac, libogg, libvorbis
, qt, zlib, readline
, makeWrapper
}:
stdenv.mkDerivation rec {
name = "kid3-${version}";
version = "3.1.1";
src = fetchurl {
url = "http://downloads.sourceforge.net/project/kid3/kid3/${version}/${name}.tar.gz";
sha256 = "0mr617k712zpd99rgsy313jrb6jcjn1malj4lirzqhp7307wsf34";
};
buildInputs = with stdenv.lib;
[ pkgconfig cmake perl ffmpeg docbook_xml_dtd_45 docbook_xsl libxslt
phonon automoc4 chromaprint id3lib taglib mp4v2 flac libogg libvorbis
qt zlib readline makeWrapper ];
cmakeFlags = [ "-DCMAKE_BUILD_TYPE=Release" "-DWITH_APPS=Qt;CLI" ];
NIX_LDFLAGS = "-lm -lpthread";
preConfigure = ''
export DOCBOOKDIR="${docbook_xsl}/xml/xsl/docbook/"
'';
postInstall = ''
wrapProgram $out/bin/kid3-qt --prefix QT_PLUGIN_PATH : $out/lib/qt4/plugins
'';
meta = with stdenv.lib; {
description = "A simple and powerful audio tag editor";
longDescription = ''
If you want to easily tag multiple MP3, Ogg/Vorbis, FLAC, MPC,
MP4/AAC, MP2, Opus, Speex, TrueAudio, WavPack, WMA, WAV and AIFF
files (e.g. full albums) without typing the same information
again and again and have control over both ID3v1 and ID3v2 tags,
then Kid3 is the program you are looking for.
With Kid3 you can:
- Edit ID3v1.1 tags;
- Edit all ID3v2.3 and ID3v2.4 frames;
- Convert between ID3v1.1, ID3v2.3 and ID3v2.4 tags
- Edit tags in MP3, Ogg/Vorbis, FLAC, MPC, MP4/AAC, MP2, Opus,
Speex, TrueAudio, WavPack, WMA, WAV, AIFF files and tracker
modules (MOD, S3M, IT, XM);
- Edit tags of multiple files, e.g. the artist, album, year and
genre of all files of an album typically have the same values
and can be set together;
- Generate tags from filenames;
- Generate tags from the contents of tag fields;
- Generate filenames from tags;
- Rename and create directories from tags;
- Generate playlist files;
- Automatically convert upper and lower case and replace strings;
- Import from gnudb.org, TrackType.org, MusicBrainz, Discogs,
Amazon and other sources of album data;
- Export tags as CSV, HTML, playlists, Kover XML and in other
formats;
- Edit synchronized lyrics and event timing codes, import and
export LRC files
'';
homepage = http://kid3.sourceforge.net/;
license = licenses.lgpl2Plus;
maintainers = [ maintainers.AndersonTorres ];
};
}
# TODO: Qt5 support

View file

@ -1,12 +1,12 @@
{ stdenv, fetchurl, pkgconfig, glib, ncurses, mpd_clientlib, libintlOrEmpty }: { stdenv, fetchurl, pkgconfig, glib, ncurses, mpd_clientlib, libintlOrEmpty }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
version = "0.23"; version = "0.24";
name = "ncmpc-${version}"; name = "ncmpc-${version}";
src = fetchurl { src = fetchurl {
url = "http://www.musicpd.org/download/ncmpc/0/ncmpc-${version}.tar.xz"; url = "http://www.musicpd.org/download/ncmpc/0/ncmpc-${version}.tar.xz";
sha256 = "d7b30cefaf5c74a5d8ab18ab8275e0102ae12e8ee6d6f8144f8e4cc9a97b5de4"; sha256 = "1sf3nirs3mcx0r5i7acm9bsvzqzlh730m0yjg6jcyj8ln6r7cvqf";
}; };
buildInputs = [ pkgconfig glib ncurses mpd_clientlib ] buildInputs = [ pkgconfig glib ncurses mpd_clientlib ]
@ -14,6 +14,11 @@ stdenv.mkDerivation rec {
NIX_LDFLAGS = stdenv.lib.optionalString stdenv.isDarwin "-lintl"; NIX_LDFLAGS = stdenv.lib.optionalString stdenv.isDarwin "-lintl";
configureFlags = [
"--enable-colors"
"--enable-lyrics-screen"
];
meta = with stdenv.lib; { meta = with stdenv.lib; {
description = "Curses-based interface for MPD (music player daemon)"; description = "Curses-based interface for MPD (music player daemon)";
homepage = http://www.musicpd.org/clients/ncmpc/; homepage = http://www.musicpd.org/clients/ncmpc/;

View file

@ -1,10 +1,10 @@
{stdenv, fetchurl, libogg, libao, pkgconfig, libopus, flac}: {stdenv, fetchurl, libogg, libao, pkgconfig, libopus, flac}:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "opus-tools-0.1.8"; name = "opus-tools-0.1.9";
src = fetchurl { src = fetchurl {
url = "http://downloads.xiph.org/releases/opus/${name}.tar.gz"; url = "http://downloads.xiph.org/releases/opus/${name}.tar.gz";
sha256 = "1xm2lhdz92n9zmk496lyagisyzja46kx8q340vay9i51krbqiqg4"; sha256 = "0fk4nknvl111k89j5yckmyrh6b2wvgyhrqfncp7rig3zikbkv1xi";
}; };
buildInputs = [ libogg libao pkgconfig libopus flac ]; buildInputs = [ libogg libao pkgconfig libopus flac ];
@ -12,6 +12,7 @@ stdenv.mkDerivation rec {
meta = { meta = {
description = "Tools to work with opus encoded audio streams"; description = "Tools to work with opus encoded audio streams";
homepage = http://www.opus-codec.org/; homepage = http://www.opus-codec.org/;
license = "BSD"; license = stdenv.lib.licenses.bsd2;
maintainers = with stdenv.lib.maintainers; [ fuuzetsu ];
}; };
} }

View file

@ -1,10 +1,10 @@
{stdenv, fetchurl, pkgconfig, openssl, libogg, libopus}: {stdenv, fetchurl, pkgconfig, openssl, libogg, libopus}:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "opusfile-0.4"; name = "opusfile-0.6";
src = fetchurl { src = fetchurl {
url = "http://downloads.xiph.org/releases/opus/${name}.tar.gz"; url = "http://downloads.xiph.org/releases/opus/${name}.tar.gz";
sha256 = "0h4iwyqgid0cibqwzckz3r94qfp09099nk1cx5nz6i3cf08yldlq"; sha256 = "19iys2kld75k0210b807i4illrdmj3cmmnrgxlc9y4vf6mxp2a14";
}; };
buildInputs = [ pkgconfig openssl libogg libopus ]; buildInputs = [ pkgconfig openssl libogg libopus ];
@ -12,6 +12,7 @@ stdenv.mkDerivation rec {
meta = { meta = {
description = "High-level API for decoding and seeking in .opus files"; description = "High-level API for decoding and seeking in .opus files";
homepage = http://www.opus-codec.org/; homepage = http://www.opus-codec.org/;
license = "BSD"; license = stdenv.lib.licenses.bsd3;
maintainers = with stdenv.lib.maintainers; [ fuuzetsu ];
}; };
} }

View file

@ -14,7 +14,7 @@ stdenv.mkDerivation rec {
sha256 = "03r0sbfj85wp6yxa87pjg69ivmk0mxxa2nykr8gf2c607igmb034"; sha256 = "03r0sbfj85wp6yxa87pjg69ivmk0mxxa2nykr8gf2c607igmb034";
}; };
buildInputs = [ pulseaudio boost ]; buildInputs = [ pulseaudio boost boost.lib ];
installPhase = '' installPhase = ''
mkdir -p $out/bin mkdir -p $out/bin

View file

@ -0,0 +1,33 @@
{ fetchurl, stdenv, pkgconfig, pulseaudio, gtkmm, libglademm
, dbus_glib, gconfmm, intltool }:
stdenv.mkDerivation rec {
name = "paprefs-0.9.10";
src = fetchurl {
url = "http://freedesktop.org/software/pulseaudio/paprefs/${name}.tar.xz";
sha256 = "1c5b3sb881szavly220q31g7rvpn94wr7ywlk00hqb9zaikml716";
};
buildInputs = [ pulseaudio gtkmm libglademm dbus_glib gconfmm ];
nativeBuildInputs = [ pkgconfig intltool ];
configureFlags = [ "--disable-lynx" ];
meta = with stdenv.lib; {
description = "PulseAudio Preferences";
longDescription = ''
PulseAudio Preferences (paprefs) is a simple GTK based configuration
dialog for the PulseAudio sound server.
'';
homepage = http://freedesktop.org/software/pulseaudio/paprefs/ ;
license = licenses.gpl2Plus;
maintainers = [ maintainers.abbradar ];
platforms = platforms.linux;
};
}

View file

@ -1,5 +1,5 @@
{ fetchurl, stdenv, pkgconfig, pulseaudio, gtkmm3 { fetchurl, stdenv, pkgconfig, intltool, pulseaudio, gtkmm3
, libcanberra_gtk3, intltool, gettext }: , libcanberra_gtk3 }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "pavucontrol-2.0"; name = "pavucontrol-2.0";
@ -9,12 +9,13 @@ stdenv.mkDerivation rec {
sha256 = "02s775m1531sshwlbvfddk3pz8zjmwkv1sgzggn386ja3gc9vwi2"; sha256 = "02s775m1531sshwlbvfddk3pz8zjmwkv1sgzggn386ja3gc9vwi2";
}; };
buildInputs = [ pkgconfig pulseaudio gtkmm3 libcanberra_gtk3 buildInputs = [ pulseaudio gtkmm3 libcanberra_gtk3 ];
intltool gettext ];
configureFlags = "--disable-lynx"; nativeBuildInputs = [ pkgconfig intltool ];
meta = { configureFlags = [ "--disable-lynx" ];
meta = with stdenv.lib; {
description = "PulseAudio Volume Control"; description = "PulseAudio Volume Control";
longDescription = '' longDescription = ''
@ -27,7 +28,7 @@ stdenv.mkDerivation rec {
license = stdenv.lib.licenses.gpl2Plus; license = stdenv.lib.licenses.gpl2Plus;
maintainers = [ ]; maintainers = [ maintainers.abbradar ];
platforms = stdenv.lib.platforms.gnu; # arbitrary choice platforms = platforms.linux;
}; };
} }

View file

@ -3,12 +3,12 @@
, libtool, libvorbis, pkgconfig, qt4, rubberband, stdenv }: , libtool, libvorbis, pkgconfig, qt4, rubberband, stdenv }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
version = "0.6.2"; version = "0.6.3";
name = "qtractor-${version}"; name = "qtractor-${version}";
src = fetchurl { src = fetchurl {
url = "mirror://sourceforge/qtractor/${name}.tar.gz"; url = "mirror://sourceforge/qtractor/${name}.tar.gz";
sha256 = "08cr4lgm8bkkmsvfljszcqij3i52n989s7ncrbrn17n61rmgf8yw"; sha256 = "1lsmd83vhgfzb3bf02hi6xp5ryh08lz4h21agy7wm3acjqc6gsc2";
}; };
buildInputs = buildInputs =

View file

@ -2,11 +2,11 @@
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "samplv1-${version}"; name = "samplv1-${version}";
version = "0.5.0"; version = "0.5.1";
src = fetchurl { src = fetchurl {
url = "mirror://sourceforge/samplv1/${name}.tar.gz"; url = "mirror://sourceforge/samplv1/${name}.tar.gz";
sha256 = "02mm5y1yzklvs5bpxl86y3dqcg7migfybmin8llk91pws6rl9b41"; sha256 = "155qq7gxyqn7sh8bbyhjk40lxl157lb2h539j4gqgv5jphz8g6wy";
}; };
buildInputs = [ jack2 libsndfile lv2 qt4 ]; buildInputs = [ jack2 libsndfile lv2 qt4 ];

View file

@ -4,17 +4,11 @@
}: }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "snd-14.3"; name = "snd-15.0";
meta = {
description = "Sound editor";
homepage = http://ccrma.stanford.edu/software/snd;
platforms = stdenv.lib.platforms.linux;
};
src = fetchurl { src = fetchurl {
url = "mirror://sourceforge/snd/${name}.tar.gz"; url = "mirror://sourceforge/snd/${name}.tar.gz";
sha256 = "04shk34pza507kvm40dc6sdz5jz533z4q2h7m9hgqvw1r3f57ms6"; sha256 = "1s1mswgxhvi0wjw0qscwh2jajihvgz86xffgbwl7qjkymqbh8gyj";
}; };
nativeBuildInputs = [ pkgconfig ]; nativeBuildInputs = [ pkgconfig ];
@ -23,4 +17,14 @@ stdenv.mkDerivation rec {
gtk2 alsaLib gtk2 alsaLib
fftw gsl fftw gsl
]; ];
meta = {
description = "Sound editor";
homepage = http://ccrma.stanford.edu/software/snd;
platforms = stdenv.lib.platforms.linux;
license = stdenv.lib.licenses.free;
maintainers = with stdenv.lib.maintainers; [ fuuzetsu ];
};
} }

View file

@ -2,11 +2,11 @@
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "synthv1-${version}"; name = "synthv1-${version}";
version = "0.5.0"; version = "0.5.1";
src = fetchurl { src = fetchurl {
url = "mirror://sourceforge/synthv1/${name}.tar.gz"; url = "mirror://sourceforge/synthv1/${name}.tar.gz";
sha256 = "011kjccrdwb62rpck5gb8h4kvvm8rk6n77lj78ykxz4pxip5hf14"; sha256 = "16wcxrcjwp0qp2xgahhzvcs2k31sr6c9jsxyhivj4famj7a39pfw";
}; };
buildInputs = [ qt4 jack2 lv2 ]; buildInputs = [ qt4 jack2 lv2 ];

View file

@ -1,5 +1,5 @@
{ stdenv, fetchurl, alsaLib, boost, cairo, cmake, fftwSinglePrec, fltk { stdenv, fetchurl, alsaLib, boost, cairo, cmake, fftwSinglePrec, fltk
, jack2, libsndfile, mesa, minixml, pkgconfig, zlib , jack2, libsndfile, mesa, minixml, pkgconfig, zlib, xorg
}: }:
assert stdenv ? glibc; assert stdenv ? glibc;
@ -14,8 +14,8 @@ stdenv.mkDerivation rec {
}; };
buildInputs = [ buildInputs = [
alsaLib boost cairo fftwSinglePrec fltk jack2 libsndfile mesa alsaLib boost boost.lib cairo fftwSinglePrec fltk jack2 libsndfile mesa
minixml zlib minixml zlib xorg.libpthreadstubs
]; ];
nativeBuildInputs = [ cmake pkgconfig ]; nativeBuildInputs = [ cmake pkgconfig ];

View file

@ -0,0 +1,183 @@
{ stdenv, fetchurl, slim }:
# Inspired on aspell buildDict expression
let
buildTheme =
{fullName, src, version ? "testing"}:
stdenv. mkDerivation rec {
name = "${fullName}-${version}";
inherit src;
buildInputs = [ slim ];
dontBuild = true;
installPhase = ''
install -dm755 $out/share/slim/themes/${name}
install -m644 * $out/share/slim/themes/${name}
'';
meta = {
description = "Slim theme for ${fullName}";
platforms = stdenv.lib.platforms.linux;
};
};
in {
archlinuxSimple = buildTheme {
fullName = "archlinux-simple";
src = fetchurl {
url = "mirror://sourceforge/slim.berlios/slim-archlinux-simple.tar.gz";
sha256 = "7d60d6782fa86302646fe67253467c04692d247f89bdbe87178f690f32b270db";
};
};
capernoited = buildTheme {
fullName = "capernoited";
src = fetchurl {
url = "mirror://sourceforge/slim.berlios/slim-capernoited.tar.gz";
sha256 = "fb9163c6a2656d60f088dc4f2173aa7556a6794495122acfa7d3be7182f16b41";
};
};
debianMoreblue = buildTheme {
fullName = "debian-moreblue";
src = fetchurl {
url = "mirror://sourceforge/slim.berlios/slim-debian-moreblue.tar.bz2";
sha256 = "5b76929827d4a4d604ddca4f42668cca3309b6f7bd659901021c6f49d6d2c481";
};
};
fingerprint = buildTheme {
fullName = "fingerprint";
src = fetchurl {
url = "mirror://sourceforge/slim.berlios/slim-fingerprint.tar.gz";
sha256 = "48b703f84ce7b814cda0824f65cafebf695cd71a14166b481bb44616097d3144";
};
};
flat = buildTheme {
fullName = "flat";
src = fetchurl {
url = "mirror://sourceforge/slim.berlios/slim-flat.tar.gz";
sha256 = "0092d531540f9da8ef07ad173e527c4ef9c088d04962d142be3c11f0c5c0c5e9";
};
};
flower2 = buildTheme {
fullName = "flower2";
src = fetchurl {
url = "mirror://sourceforge/slim.berlios/slim-flower2.tar.gz";
sha256 = "840faf6459ffd6c2c363160c85cb98000717f9a425102976336f5d8f68ed95ee";
};
};
gentooSimple = buildTheme {
fullName = "gentoo-simple";
src = fetchurl {
url = "mirror://sourceforge/slim.berlios/slim-gentoo-simple.tar.bz2";
sha256 = "27c8614cc930ca200acf81f1192febc102501744939d5cbe997141e37c96d8c2";
};
};
lake = buildTheme {
fullName = "lake";
src = fetchurl {
url = "mirror://sourceforge/slim.berlios/slim-lake.tar.gz";
sha256 = "f7d662e37068a6c64cbf910adf3c192f1b50724baa427a8c9487cb9f7ed95851";
};
};
lunar = buildTheme {
fullName = "lunar-0.4";
version = "";
src = fetchurl {
url = "mirror://sourceforge/slim.berlios/slim-lunar-0.4.tar.bz2";
sha256 = "1543eb45e4d664377e0dd4f7f954aba005823034ba9692624398b3d58be87d76";
};
};
mindlock = buildTheme {
fullName = "mindlock";
src = fetchurl {
url = "mirror://sourceforge/slim.berlios/slim-mindlock.tar.gz";
sha256 = "99a6e6acd55bf55ece18a3f644299517b71c1adc49efd87ce2d7e654fb67033c";
};
};
parallelDimensions = buildTheme {
fullName = "parallel-dimensions";
src = fetchurl {
url = "mirror://sourceforge/slim.berlios/slim-parallel-dimensions.tar.gz";
sha256 = "2b17c3e6d3967a6a0744e20e6e05c9d3938f4ef04c62d49ddbd416bc4743046f";
};
};
previous = buildTheme {
fullName = "previous";
src = fetchurl {
url = "mirror://sourceforge/slim.berlios/slim-previous.tar.gz";
sha256 = "1f2a69f8fc0dc8ed8eb86a4c1d1087ba7be486973fb81efab52a63c661d726f8";
};
};
rainbow = buildTheme {
fullName = "rainbow";
src = fetchurl {
url = "mirror://sourceforge/slim.berlios/slim-rainbow.tar.gz";
sha256 = "d83e3afdb05be50cff7da037bb31208b2c152539d1a009740b13857f5f910072";
};
};
rear-window = buildTheme {
fullName = "rear-window";
src = fetchurl {
url = "mirror://sourceforge/slim.berlios/slim-rear-window.tar.gz";
sha256 = "0b123706ccb67e94f626c183530ec5732b209bab155bc661d6a3f5cd5ee39511";
};
};
scotlandRoad = buildTheme {
fullName = "scotland-road";
src = fetchurl {
url = "mirror://sourceforge/slim.berlios/slim-scotland-road.tar.gz";
sha256 = "fd60a434496ed39b968ffa1e5457b36cd12f64a4e2ecedffc675f97ca3f3bba1";
};
};
subway = buildTheme {
fullName = "subway";
src = fetchurl {
url = "mirror://sourceforge/slim.berlios/slim-subway.tar.gz";
sha256 = "0205568e3e157973b113a83b26d8829ce9962a85ef7eb8a33d3ae2f3f9292253";
};
};
wave = buildTheme {
fullName = "wave";
src = fetchurl {
url = "mirror://sourceforge/slim.berlios/slim-wave.tar.gz";
sha256 = "be75676da5bf8670daa48379bb9cc1be0b9a5faa09adbea967dfd7125320b959";
};
};
zenwalk = buildTheme {
fullName = "zenwalk";
src = fetchurl {
url = "mirror://sourceforge/slim.berlios/slim-zenwalk.tar.gz";
sha256 = "f0f41d17ea505b0aa96a036e978fabaf673a51d3f81a919cb0d43364d4bc7a57";
};
};
nixosSlim = buildTheme {
fullName = "nixos-slim";
src = fetchurl {
url = "https://github.com/jagajaga/nixos-slim-theme/archive/1.1.tar.gz";
sha256 = "0cawq38l8rcgd35vpdx3i1wbs3wrkcrng1c9qch0l4qncw505hv6";
};
};
}

View file

@ -1,6 +1,6 @@
{ stdenv, fetchurl, buildEnv, makeDesktopItem, makeWrapper, zlib, glib, alsaLib { stdenv, fetchurl, buildEnv, makeDesktopItem, makeWrapper, zlib, glib, alsaLib
, dbus, gtk, atk, pango, freetype, fontconfig, libgnome_keyring3, gdk_pixbuf , dbus, gtk, atk, pango, freetype, fontconfig, libgnome_keyring3, gdk_pixbuf
, cairo, cups, expat, libgpgerror, nspr, gconf, nss, xlibs , cairo, cups, expat, libgpgerror, nspr, gconf, nss, xlibs, libcap
}: }:
let let
@ -10,52 +10,35 @@ let
stdenv.gcc.gcc zlib glib dbus gtk atk pango freetype libgnome_keyring3 stdenv.gcc.gcc zlib glib dbus gtk atk pango freetype libgnome_keyring3
fontconfig gdk_pixbuf cairo cups expat libgpgerror alsaLib nspr gconf nss fontconfig gdk_pixbuf cairo cups expat libgpgerror alsaLib nspr gconf nss
xlibs.libXrender xlibs.libX11 xlibs.libXext xlibs.libXdamage xlibs.libXtst xlibs.libXrender xlibs.libX11 xlibs.libXext xlibs.libXdamage xlibs.libXtst
xlibs.libXcomposite xlibs.libXi xlibs.libXfixes xlibs.libXcomposite xlibs.libXi xlibs.libXfixes xlibs.libXrandr
xlibs.libXcursor libcap
]; ];
}; };
in stdenv.mkDerivation rec { in stdenv.mkDerivation rec {
name = "atom-${version}"; name = "atom-${version}";
version = "0.99.0"; version = "0.135.0";
src = fetchurl { src = fetchurl {
url = https://github.com/hotice/webupd8/raw/master/atom-linux64-0.99.0~git20140525.tar.xz; url = "https://github.com/atom/atom/releases/download/v${version}/atom-amd64.deb";
sha256 = "55c2415c96e1182ae1517751cbea1db64e9962683b384cfe5e182aec10aebecd"; sha256 = "0dh8vjhr31y2ibnf4s7adskbx115w8ns9xgrb0md9xc9gm92h405";
name = "${name}.tar.xz"; name = "${name}.deb";
};
iconsrc = fetchurl {
url = https://raw.githubusercontent.com/atom/atom/master/resources/atom.png;
sha256 = "66dc0b432eed7bcd738b7c1b194e539178a83d427c78f103041981f2b840e030";
};
desktopItem = makeDesktopItem {
name = "atom";
exec = "atom";
icon = iconsrc;
comment = "A hackable text editor for the 21st Century";
desktopName = "Atom";
genericName = "Text editor";
categories = "Development;TextEditor";
}; };
buildInputs = [ atomEnv makeWrapper ]; buildInputs = [ atomEnv makeWrapper ];
phases = [ "installPhase" ]; phases = [ "installPhase" "fixupPhase" ];
installPhase = '' installPhase = ''
mkdir -p $out/share/atom mkdir -p $out
mkdir -p $out/bin ar p $src data.tar.gz | tar -C $out -xz ./usr
tar -C $out/share/atom -xvf $src mv $out/usr/* $out/
rm -r $out/usr/
patchelf --set-interpreter "$(cat $NIX_GCC/nix-support/dynamic-linker)" \ patchelf --set-interpreter "$(cat $NIX_GCC/nix-support/dynamic-linker)" \
$out/share/atom/atom $out/share/atom/atom
patchelf --set-interpreter "$(cat $NIX_GCC/nix-support/dynamic-linker)" \ patchelf --set-interpreter "$(cat $NIX_GCC/nix-support/dynamic-linker)" \
$out/share/atom/resources/app/apm/node_modules/atom-package-manager/bin/node $out/share/atom/resources/app/apm/node_modules/atom-package-manager/bin/node
makeWrapper $out/share/atom/atom $out/bin/atom \ wrapProgram $out/bin/atom \
--prefix "LD_LIBRARY_PATH" : "${atomEnv}/lib:${atomEnv}/lib64" --prefix "LD_LIBRARY_PATH" : "${atomEnv}/lib:${atomEnv}/lib64"
# Create a desktop item.
mkdir -p "$out/share/applications"
cp "${desktopItem}"/share/applications/* "$out/share/applications/"
''; '';
meta = with stdenv.lib; { meta = with stdenv.lib; {

View file

@ -0,0 +1,47 @@
{ stdenv, fetchgit, emacs, python }:
stdenv.mkDerivation rec {
name = "cask-0.7.2";
src = fetchgit {
url = "https://github.com/cask/cask.git";
rev = "8d667e1ce3f3aa817a7b996f02058b2441f83958";
sha256 = "08brrdyz7zsw134zwf4dyj6bj2glflszssfq8vya3mh01s38mfri";
};
buildInputs = [ emacs python ];
# byte-compiling emacs files automatically triggers cask's bootstrap
# mechanism, what we don't want.
dontBuild = true;
installPhase = ''
install -d "$out/share/emacs/site-lisp"
install cask*.el* "$out/share/emacs/site-lisp"
install -d "$out/bin"
install bin/cask "$out/bin"
# In order to work with cask's hard coded file paths (during bootstrap),
# we have to create these links.
ln -s "$out/share/emacs/site-lisp/"* "$out"
# This file disables cask's self-updating function.
touch "$out/.no-upgrade"
'';
meta = with stdenv.lib; {
description = "Project management tool for Emacs";
longDescription =
''
Cask is a project management tool for Emacs that helps automate the
package development cycle; development, dependencies, testing,
building, packaging and more. Cask can also be used to manage
dependencies for your local Emacs configuration.
'';
homepage = "https://github.com/cask/cask";
license = licenses.gpl3Plus;
platforms = platforms.all;
maintainers = [ maintainers.jgeerds ];
};
}

View file

@ -2,11 +2,11 @@
, texLiveAggregationFun }: , texLiveAggregationFun }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "org-8.2.7c"; name = "org-8.2.8";
src = fetchurl { src = fetchurl {
url = "http://orgmode.org/${name}.tar.gz"; url = "http://orgmode.org/${name}.tar.gz";
sha256 = "0qqf58xqw1kkgjxm9z40s6h7xd209rx3933klla22lryv3yclc1k"; sha256 = "0f63w6d1yjiv46ac7d9rqn2wks6sxmldrqmijd9j25qvsc8dcsd8";
}; };
buildInputs = [ emacs ]; buildInputs = [ emacs ];

View file

@ -1,4 +1,4 @@
{ stdenv, fetchurl, emacs, texinfo, texLive, perl, which, automake }: { stdenv, fetchurl, emacs, texinfo, texLive, perl, which, automake, enableDoc ? false }:
stdenv.mkDerivation (rec { stdenv.mkDerivation (rec {
name = "ProofGeneral-4.3pre131011"; name = "ProofGeneral-4.3pre131011";
@ -10,7 +10,7 @@ stdenv.mkDerivation (rec {
sourceRoot = name; sourceRoot = name;
buildInputs = [ emacs texinfo texLive perl which ]; buildInputs = [ emacs texinfo perl which ] ++ stdenv.lib.optional enableDoc texLive;
prePatch = prePatch =
'' sed -i "Makefile" \ '' sed -i "Makefile" \
@ -25,15 +25,20 @@ stdenv.mkDerivation (rec {
sed -i '96d' doc/ProofGeneral.texi sed -i '96d' doc/ProofGeneral.texi
''; '';
patches = [ ./pg.patch ];
preBuild = '' preBuild = ''
make clean; make clean;
''; '';
installPhase = installPhase =
if enableDoc
then
# Copy `texinfo.tex' in the right place so that `texi2pdf' works. # Copy `texinfo.tex' in the right place so that `texi2pdf' works.
'' cp -v "${automake}/share/"automake-*/texinfo.tex doc '' cp -v "${automake}/share/"automake-*/texinfo.tex doc
make install install-doc make install install-doc
''; ''
else "make install";
meta = { meta = {
description = "Proof General, an Emacs front-end for proof assistants"; description = "Proof General, an Emacs front-end for proof assistants";

View file

@ -0,0 +1,16 @@
diff -r c7d8bfff4c0a bin/proofgeneral
--- a/bin/proofgeneral Sat Sep 27 02:25:15 2014 +0100
+++ b/bin/proofgeneral Sat Sep 27 02:28:16 2014 +0100
@@ -73,11 +73,7 @@
# Try to find Proof General directory
if [ -z "$PGHOME" ] || [ ! -d "$PGHOME" ]; then
- # default relative to this script, otherwise PGHOMEDEFAULT
- MYDIR="`readlink --canonicalize "$0" | sed -ne 's,/bin/proofgeneral$,,p'`"
- if [ -d "$MYDIR" ]; then
- PGHOME="$MYDIR"
- elif [ -d "$PGHOMEDEFAULT" ]; then
+ if [ -d "$PGHOMEDEFAULT" ]; then
PGHOME="$PGHOMEDEFAULT"
else
echo "Cannot find the Proof General lisp files: Set PGHOME or use --pghome."

View file

@ -1,13 +1,13 @@
{stdenv, fetchurl, emacs}: {stdenv, fetchurl, emacs}:
let version = "1.3.8"; let version = "1.3.12";
in stdenv.mkDerivation { in stdenv.mkDerivation {
name = "emacs-rainbow-delimiters-${version}"; name = "emacs-rainbow-delimiters-${version}";
src = fetchurl { src = fetchurl {
url = "https://github.com/jlr/rainbow-delimiters/archive/${version}.tar.gz"; url = "https://github.com/jlr/rainbow-delimiters/archive/${version}.tar.gz";
sha256 = "1xavygdnd9q80wqavxliks0w662mvn8v79qmg0kr494yfqc5hw6h"; sha256 = "0l65rqmnrc02q1b406kxc29w5cfpmrmq0glv493pjzhzc5m3r63z";
}; };
buildInputs = [ emacs ]; buildInputs = [ emacs ];

View file

@ -2,8 +2,8 @@
cabal.mkDerivation (self: { cabal.mkDerivation (self: {
pname = "structured-haskell-mode"; pname = "structured-haskell-mode";
version = "1.0.3"; version = "1.0.4";
sha256 = "0axmw8bj51q8v0wd4jp6giw9dnv0mp7kp8yd16s4nm4hcqgrh5h2"; sha256 = "1402wx27py7292ad7whsb13ywv71k36501jpfrn2p0v7knzknj8z";
isLibrary = false; isLibrary = false;
isExecutable = true; isExecutable = true;
buildDepends = [ haskellSrcExts haskellMode ]; buildDepends = [ haskellSrcExts haskellMode ];

View file

@ -3,13 +3,13 @@
# this package installs the emacs-mode which # this package installs the emacs-mode which
# resides in the ocaml compiler sources. # resides in the ocaml compiler sources.
let version = "2.0.6"; let version = "2.0.8";
in stdenv.mkDerivation { in stdenv.mkDerivation {
name = "tuareg-mode-${version}"; name = "tuareg-mode-${version}";
src = fetchurl { src = fetchurl {
url = https://forge.ocamlcore.org/frs/download.php/882/tuareg-2.0.6.tar.gz; url = https://forge.ocamlcore.org/frs/download.php/882/tuareg-2.0.8.tar.bz2;
sha256 = "ea79ac24623b82ab8047345f8504abca557a537e639d16ce1ac3e5b27f5b1189"; sha256 = "128ibdzv5rf33b71d7b3gr9plmfamc28aprl8y0ap0ivc8jaqyga";
}; };
buildInputs = [ emacs ]; buildInputs = [ emacs ];

View file

@ -1,11 +1,11 @@
{stdenv, fetchurl, fltk13, ghostscript}: {stdenv, fetchurl, fltk13, ghostscript}:
stdenv.mkDerivation { stdenv.mkDerivation {
name = "flpsed-0.7.1"; name = "flpsed-0.7.2";
src = fetchurl { src = fetchurl {
url = "http://www.ecademix.com/JohannesHofmann/flpsed-0.7.1.tar.gz"; url = "http://www.ecademix.com/JohannesHofmann/flpsed-0.7.2.tar.gz";
sha256 = "16i3mjc1cdx2wiwfhnv3z2ywmjma9785vwl3l31izx9l51w7ngj3"; sha256 = "1132nlganr6x4f4lzcp9l0xihg2ky1l7xk8vq7r2l2qxs97vbif8";
}; };
buildInputs = [ fltk13 ghostscript ]; buildInputs = [ fltk13 ghostscript ];
@ -15,5 +15,6 @@ stdenv.mkDerivation {
homepage = "http://http://flpsed.org/flpsed.html"; homepage = "http://http://flpsed.org/flpsed.html";
license = stdenv.lib.licenses.gpl3; license = stdenv.lib.licenses.gpl3;
platforms = stdenv.lib.platforms.mesaPlatforms; platforms = stdenv.lib.platforms.mesaPlatforms;
maintainers = with stdenv.lib.maintainers; [ fuuzetsu ];
}; };
} }

View file

@ -1,7 +1,7 @@
{ stdenv, fetchurl, gtk2, which, pkgconfig, intltool }: { stdenv, fetchurl, gtk2, which, pkgconfig, intltool, file }:
let let
version = "1.23.1"; version = "1.24.1";
in in
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
@ -9,15 +9,17 @@ stdenv.mkDerivation rec {
src = fetchurl { src = fetchurl {
url = "http://download.geany.org/${name}.tar.bz2"; url = "http://download.geany.org/${name}.tar.bz2";
sha256 = "1bcgjxywggsljs9kq22kr9xpzrq5xr7pb9d1b71rwryqb5pb25c8"; sha256 = "0cwci8876dpgcn60dfvjlciqr8x68iv86psjj148grhzn3chbdbz";
}; };
buildInputs = [ gtk2 which pkgconfig intltool ]; buildInputs = [ gtk2 which pkgconfig intltool file ];
doCheck = true; doCheck = true;
enableParallelBuilding = true; enableParallelBuilding = true;
patchPhase = "patchShebangs .";
# This file should normally require a gtk-update-icon-cache -q /usr/share/icons/hicolor command # This file should normally require a gtk-update-icon-cache -q /usr/share/icons/hicolor command
# It have no reasons to exist in a redistribuable package # It have no reasons to exist in a redistribuable package
postInstall = "rm $out/share/icons/hicolor/icon-theme.cache"; postInstall = "rm $out/share/icons/hicolor/icon-theme.cache";

Some files were not shown because too many files have changed in this diff Show more