mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-25 16:33:15 +00:00
Merge remote-tracking branch 'origin/staging' into darwin-clang-stdenv
Conflicts: pkgs/tools/security/gnupg/default.nix
This commit is contained in:
commit
811de3bfaa
3
.travis.yml
Normal file
3
.travis.yml
Normal file
@ -0,0 +1,3 @@
|
||||
language: python
|
||||
python: "3.4"
|
||||
script: ./maintainers/scripts/travis-nox-review-pr.sh
|
@ -330,6 +330,90 @@ Runtime) instead of the OpenJRE.</para>
|
||||
</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>
|
||||
|
||||
|
@ -20,8 +20,8 @@ rec {
|
||||
let attr = head attrPath;
|
||||
in
|
||||
if attrPath == [] then e
|
||||
else if hasAttr attr e
|
||||
then attrByPath (tail attrPath) default (getAttr attr e)
|
||||
else if e ? ${attr}
|
||||
then attrByPath (tail attrPath) default e.${attr}
|
||||
else default;
|
||||
|
||||
|
||||
@ -44,8 +44,7 @@ rec {
|
||||
attrVals ["a" "b" "c"] as
|
||||
=> [as.a as.b as.c]
|
||||
*/
|
||||
attrVals = nameList: set:
|
||||
map (x: getAttr x set) nameList;
|
||||
attrVals = nameList: set: map (x: set.${x}) nameList;
|
||||
|
||||
|
||||
/* Return the values of all attributes in the given set, sorted by
|
||||
@ -55,7 +54,7 @@ rec {
|
||||
attrValues {c = 3; a = 1; b = 2;}
|
||||
=> [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
|
||||
@ -65,7 +64,8 @@ rec {
|
||||
catAttrs "a" [{a = 1;} {b = 0;} {a = 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
|
||||
@ -76,7 +76,7 @@ rec {
|
||||
=> { foo = 1; }
|
||||
*/
|
||||
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:
|
||||
@ -86,7 +86,7 @@ rec {
|
||||
foldAttrs = op: nul: list_of_attrs:
|
||||
fold (n: a:
|
||||
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)
|
||||
) {} list_of_attrs;
|
||||
|
||||
@ -132,7 +132,7 @@ rec {
|
||||
=> { x = "x-foo"; y = "y-bar"; }
|
||||
*/
|
||||
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
|
||||
@ -145,7 +145,7 @@ rec {
|
||||
=> { foo_x = "bar-a"; foo_y = "bar-b"; }
|
||||
*/
|
||||
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
|
||||
@ -157,7 +157,7 @@ rec {
|
||||
=> [ "xa" "yb" ]
|
||||
*/
|
||||
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
|
||||
@ -322,7 +322,7 @@ rec {
|
||||
# override only the attributes that are already present in the old set
|
||||
# useful for deep-overriding
|
||||
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;
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
let lib = import ./default.nix;
|
||||
inherit (builtins) getAttr attrNames isFunction;
|
||||
|
||||
let
|
||||
lib = import ./default.nix;
|
||||
inherit (builtins) attrNames isFunction;
|
||||
in
|
||||
|
||||
rec {
|
||||
@ -107,10 +107,10 @@ rec {
|
||||
outputToAttrListElement = outputName:
|
||||
{ name = outputName;
|
||||
value = commonAttrs // {
|
||||
inherit (builtins.getAttr outputName drv) outPath drvPath type outputName;
|
||||
inherit (drv.${outputName}) outPath drvPath type outputName;
|
||||
};
|
||||
};
|
||||
|
||||
outputsList = map outputToAttrListElement outputs;
|
||||
in builtins.getAttr drv.outputName commonAttrs;
|
||||
in commonAttrs.${drv.outputName};
|
||||
}
|
||||
|
@ -9,23 +9,15 @@ in
|
||||
|
||||
rec {
|
||||
|
||||
inherit (builtins) addErrorContext;
|
||||
|
||||
# Wrapper aroung the primop `addErrorContext', which shouldn't used
|
||||
# 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);
|
||||
|
||||
addErrorContextToAttrs = lib.mapAttrs (a : v : lib.addErrorContext "while evaluating ${a}" v);
|
||||
|
||||
|
||||
traceVal = if builtins ? trace then x: (builtins.trace x x) else x: x;
|
||||
traceXMLVal = if builtins ? trace then x: (builtins.trace (builtins.toXML x) x) else x: x;
|
||||
traceXMLValMarked = str: if builtins ? trace then x: (builtins.trace ( str + builtins.toXML x) x) else x: x;
|
||||
|
||||
traceVal = x: builtins.trace x x;
|
||||
traceXMLVal = x: builtins.trace (builtins.toXML x) x;
|
||||
traceXMLValMarked = str: x: builtins.trace (str + builtins.toXML x) x;
|
||||
|
||||
# this can help debug your code as well - designed to not produce thousands of lines
|
||||
traceShowVal = x : trace (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 "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
|
||||
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));
|
||||
@ -70,7 +62,7 @@ rec {
|
||||
|
||||
then [ { inherit name; expected = test.expected; result = test.expr; } ]
|
||||
else [] ) tests));
|
||||
|
||||
|
||||
# create a test assuming that list elements are true
|
||||
# usage: { testX = allTrue [ true ]; }
|
||||
testAllTrue = expr : { inherit expr; expected = map (x: true) expr; };
|
||||
@ -109,10 +101,10 @@ rec {
|
||||
let nr = a;
|
||||
in (str: expr:
|
||||
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)
|
||||
)
|
||||
else
|
||||
else
|
||||
let r = strict expr;
|
||||
in builtins.trace "${str}\n result:\n${builtins.toXML r}" r
|
||||
);
|
||||
|
@ -25,7 +25,7 @@ rec {
|
||||
shortName = "amd";
|
||||
fullName = "AMD License Agreement";
|
||||
url = http://developer.amd.com/amd-license-agreement/;
|
||||
};#
|
||||
};
|
||||
|
||||
apsl20 = spdx {
|
||||
shortName = "APSL-2.0";
|
||||
@ -82,6 +82,11 @@ rec {
|
||||
fullName = "Common Development and Distribution License 1.0";
|
||||
};
|
||||
|
||||
cecill-b = spdx {
|
||||
shortName = "CECILL-B";
|
||||
fullName = "CeCILL-B Free Software License Agreement";
|
||||
};
|
||||
|
||||
cecill-c = spdx {
|
||||
shortName = "CECILL-C";
|
||||
fullName = "CeCILL-C Free Software License Agreement";
|
||||
@ -182,6 +187,11 @@ rec {
|
||||
fullName = "GNU Lesser General Public License v3.0 or later";
|
||||
};
|
||||
|
||||
libpng = spdx {
|
||||
shortName = "Libpng";
|
||||
fullName = "libpng License";
|
||||
};
|
||||
|
||||
libtiff = {
|
||||
shortName = "libtiff";
|
||||
fullName = "libtiff license";
|
||||
@ -292,4 +302,3 @@ rec {
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
|
@ -2,13 +2,7 @@
|
||||
|
||||
with import ./trivial.nix;
|
||||
|
||||
let
|
||||
|
||||
inc = builtins.add 1;
|
||||
|
||||
dec = n: builtins.sub n 1;
|
||||
|
||||
in rec {
|
||||
rec {
|
||||
|
||||
inherit (builtins) head tail length isList elemAt concatLists filter elem;
|
||||
|
||||
@ -29,7 +23,7 @@ in rec {
|
||||
fold' = n:
|
||||
if n == len
|
||||
then nul
|
||||
else op (elemAt list n) (fold' (inc n));
|
||||
else op (elemAt list n) (fold' (n + 1));
|
||||
in fold' 0;
|
||||
|
||||
# Left fold: `fold op nul [x_1 x_2 ... x_n] == op (... (op (op nul
|
||||
@ -38,12 +32,10 @@ in rec {
|
||||
let
|
||||
len = length list;
|
||||
foldl' = n:
|
||||
if n == minus1
|
||||
if n == -1
|
||||
then nul
|
||||
else op (foldl' (dec n)) (elemAt list n);
|
||||
in foldl' (dec (length list));
|
||||
|
||||
minus1 = dec 0;
|
||||
else op (foldl' (n - 1)) (elemAt list n);
|
||||
in foldl' (length list - 1);
|
||||
|
||||
|
||||
# map with index: `imap (i: v: "${v}-${toString i}") ["a" "b"] ==
|
||||
@ -54,7 +46,7 @@ in rec {
|
||||
imap' = n:
|
||||
if n == len
|
||||
then []
|
||||
else [ (f (inc n) (elemAt list n)) ] ++ imap' (inc n);
|
||||
else [ (f (n + 1) (elemAt list n)) ] ++ imap' (n + 1);
|
||||
in imap' 0;
|
||||
|
||||
|
||||
@ -104,7 +96,7 @@ in rec {
|
||||
|
||||
# Count how many times function `pred' returns true for the elements
|
||||
# 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
|
||||
@ -125,9 +117,9 @@ in rec {
|
||||
|
||||
# Return a list of integers from `first' up to and including `last'.
|
||||
range = first: last:
|
||||
if lessThan last first
|
||||
if last < first
|
||||
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
|
||||
@ -144,11 +136,11 @@ in rec {
|
||||
let
|
||||
len1 = length fst;
|
||||
len2 = length snd;
|
||||
len = if lessThan len1 len2 then len1 else len2;
|
||||
len = if len1 < len2 then len1 else len2;
|
||||
zipListsWith' = n:
|
||||
if n != len then
|
||||
[ (f (elemAt fst n) (elemAt snd n)) ]
|
||||
++ zipListsWith' (inc n)
|
||||
++ zipListsWith' (n + 1)
|
||||
else [];
|
||||
in zipListsWith' 0;
|
||||
|
||||
@ -167,7 +159,7 @@ in rec {
|
||||
let
|
||||
len = length 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
|
||||
then acc
|
||||
else if strictLess first el
|
||||
@ -176,7 +168,7 @@ in rec {
|
||||
next { left = [ el ] ++ left; inherit right; };
|
||||
pivot = pivot' 1 { left = []; right = []; };
|
||||
in
|
||||
if lessThan len 2 then list
|
||||
if len < 2 then list
|
||||
else (sort strictLess pivot.left) ++ [ first ] ++ (sort strictLess pivot.right);
|
||||
|
||||
|
||||
@ -188,7 +180,7 @@ in rec {
|
||||
if n == len || n == count
|
||||
then []
|
||||
else
|
||||
[ (elemAt list n) ] ++ take' (inc n);
|
||||
[ (elemAt list n) ] ++ take' (n + 1);
|
||||
in take' 0;
|
||||
|
||||
|
||||
@ -197,16 +189,16 @@ in rec {
|
||||
let
|
||||
len = length list;
|
||||
drop' = n:
|
||||
if n == minus1 || lessThan n count
|
||||
if n == -1 || n < count
|
||||
then []
|
||||
else
|
||||
drop' (dec n) ++ [ (elemAt list n) ];
|
||||
in drop' (dec len);
|
||||
drop' (n - 1) ++ [ (elemAt list n) ];
|
||||
in drop' (len - 1);
|
||||
|
||||
|
||||
# Return the last element of a list.
|
||||
last = list:
|
||||
assert list != []; elemAt list (dec (length list));
|
||||
assert list != []; elemAt list (length list - 1);
|
||||
|
||||
|
||||
# Return all elements but the last
|
||||
@ -218,11 +210,11 @@ in rec {
|
||||
let
|
||||
len1 = length xs;
|
||||
len2 = length ys;
|
||||
len = if lessThan len1 len2 then len1 else len2;
|
||||
len = if len1 < len2 then len1 else len2;
|
||||
zipTwoLists' = n:
|
||||
if n != len then
|
||||
[ { first = elemAt xs n; second = elemAt ys n; } ]
|
||||
++ zipTwoLists' (inc n)
|
||||
++ zipTwoLists' (n + 1)
|
||||
else [];
|
||||
in zipTwoLists' 0;
|
||||
|
||||
|
@ -10,6 +10,7 @@
|
||||
akc = "Anders Claesson <akc@akc.is>";
|
||||
algorith = "Dries Van Daele <dries_van_daele@telenet.be>";
|
||||
all = "Nix Committers <nix-commits@lists.science.uu.nl>";
|
||||
abbradar = "Nikolay Amiantov <ab@fmap.me>";
|
||||
amiddelk = "Arie Middelkoop <amiddelk@gmail.com>";
|
||||
amorsillo = "Andrew Morsillo <andrew.morsillo@gmail.com>";
|
||||
AndersonTorres = "Anderson Torres <torres.anderson.85@gmail.com>";
|
||||
@ -33,6 +34,7 @@
|
||||
bosu = "Boris Sukholitko <boriss@gmail.com>";
|
||||
calrama = "Moritz Maxeiner <moritz@ucworks.org>";
|
||||
campadrenalin = "Philip Horger <campadrenalin@gmail.com>";
|
||||
cdepillabout = "Dennis Gosnell <cdep.illabout@gmail.com>";
|
||||
cfouche = "Chaddaï Fouché <chaddai.fouche@gmail.com>";
|
||||
chaoflow = "Florian Friesdorf <flo@chaoflow.net>";
|
||||
coconnor = "Corey O'Connor <coreyoconnor@gmail.com>";
|
||||
@ -42,10 +44,12 @@
|
||||
DamienCassou = "Damien Cassou <damien.cassou@gmail.com>";
|
||||
DerGuteMoritz = "Moritz Heidkamp <moritz@twoticketsplease.de>";
|
||||
dbohdan = "Danyil Bohdan <danyil.bohdan@gmail.com>";
|
||||
dmalikov = "Dmitry Malikov <malikov.d.y@gmail.com>";
|
||||
doublec = "Chris Double <chris.double@double.co.nz>";
|
||||
ederoyd46 = "Matthew Brown <matt@ederoyd.co.uk>";
|
||||
edwtjo = "Edward Tjörnhammar <ed@cflags.cc>";
|
||||
eelco = "Eelco Dolstra <eelco.dolstra@logicblox.com>";
|
||||
ellis = "Ellis Whitehead <nixos@ellisw.net>";
|
||||
emery = "Emery Hemingway <emery@vfemail.net>";
|
||||
ertes = "Ertugrul Söylemez <ertesx@gmx.de>";
|
||||
falsifian = "James Cook <james.cook@utoronto.ca>";
|
||||
@ -80,12 +84,14 @@
|
||||
marcweber = "Marc Weber <marco-oweber@gmx.de>";
|
||||
matejc = "Matej Cotman <cotman.matej@gmail.com>";
|
||||
meisternu = "Matt Miemiec <meister@krutt.org>";
|
||||
michelk = "Michel Kuhlmann <michel@kuhlmanns.info>";
|
||||
modulistic = "Pablo Costa <modulistic@gmail.com>";
|
||||
mornfall = "Petr Ročkai <me@mornfall.net>";
|
||||
MP2E = "Cray Elliott <MP2E@archlinux.us>";
|
||||
msackman = "Matthew Sackman <matthew@wellquite.org>";
|
||||
nathan-gs = "Nathan Bijnens <nathan@nathan.gs>";
|
||||
notthemessiah = "Brian Cohen <brian.cohen.88@gmail.com>";
|
||||
nslqqq = "Nikita Mikhailov <nslqqq@gmail.com>";
|
||||
ocharles = "Oliver Charles <ollie@ocharles.org.uk>";
|
||||
offline = "Jaka Hudoklin <jakahudoklin@gmail.com>";
|
||||
orbitz = "Malcolm Matalka <mmatalka@gmail.com>";
|
||||
@ -110,6 +116,7 @@
|
||||
rszibele = "Richard Szibele <richard_szibele@hotmail.com>";
|
||||
rycee = "Robert Helgesson <robert@rycee.net>";
|
||||
sander = "Sander van der Burg <s.vanderburg@tudelft.nl>";
|
||||
sepi = "Raffael Mancini <raffael@mancini.lu>";
|
||||
shlevy = "Shea Levy <shea@shealevy.com>";
|
||||
simons = "Peter Simons <simons@cryp.to>";
|
||||
skeidel = "Sven Keidel <svenkeidel@gmail.com>";
|
||||
@ -125,6 +132,7 @@
|
||||
tv = "Tomislav Viljetić <tv@shackspace.de>";
|
||||
urkud = "Yury G. Kudryashov <urkud+nix@ya.ru>";
|
||||
vandenoever = "Jos van den Oever <jos@vandenoever.info>";
|
||||
vbgl = "Vincent Laporte <Vincent.Laporte@gmail.com>";
|
||||
vbmithr = "Vincent Bernardoff <vb@luminar.eu.org>";
|
||||
vcunat = "Vladimír Čunát <vcunat@gmail.com>";
|
||||
viric = "Lluís Batlle i Rossell <viric@viric.name>";
|
||||
@ -135,6 +143,8 @@
|
||||
wjlroe = "William Roe <willroe@gmail.com>";
|
||||
wkennington = "William A. Kennington III <william@wkennington.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>";
|
||||
zef = "Zef Hemel <zef@zef.me>";
|
||||
zimbatm = "zimbatm <zimbatm@zimbatm.com>";
|
||||
|
47
lib/misc.nix
47
lib/misc.nix
@ -1,5 +1,5 @@
|
||||
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
|
||||
|
||||
@ -61,7 +61,7 @@ rec {
|
||||
fun = n : x :
|
||||
let newArgs = fixed :
|
||||
let args = takeFixed fixed;
|
||||
mergeFun = getAttr n args;
|
||||
mergeFun = args.${n};
|
||||
in if isAttrs x then (mergeFun args x)
|
||||
else assert isFunction x;
|
||||
mergeFun args (x ( args // { inherit fixed; }));
|
||||
@ -102,15 +102,12 @@ rec {
|
||||
# }
|
||||
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
|
||||
maybeAttr = name: default: attrs:
|
||||
if __hasAttr name attrs then (__getAttr name attrs) else default;
|
||||
maybeAttrNullable = maybeAttr;
|
||||
|
||||
# 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
|
||||
@ -233,7 +230,7 @@ rec {
|
||||
closePropagation = list: (uniqList {inputList = (innerClosePropagation [] 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
|
||||
nvs = name : value : listToAttrs [ (nameValuePair name value) ];
|
||||
@ -250,10 +247,10 @@ rec {
|
||||
# merge attributes with custom function handling the case that the attribute
|
||||
# exists in both sets
|
||||
mergeAttrsWithFunc = f : set1 : set2 :
|
||||
fold (n: set : if (__hasAttr n set)
|
||||
then setAttr set n (f (__getAttr n set) (__getAttr n set2))
|
||||
fold (n: set : if set ? ${n}
|
||||
then setAttr set n (f set.${n} set2.${n})
|
||||
else set )
|
||||
(set2 // set1) (__attrNames set2);
|
||||
(set2 // set1) (attrNames set2);
|
||||
|
||||
# merging two attribute set concatenating the values of same attribute names
|
||||
# eg { a = 7; } { a = [ 2 3 ]; } becomes { a = [ 7 2 3 ]; }
|
||||
@ -270,15 +267,15 @@ rec {
|
||||
overrideSnd ? [ "buildPhase" ]
|
||||
} : attrs1 : attrs2 :
|
||||
fold (n: set :
|
||||
setAttr set n ( if (__hasAttr n set)
|
||||
setAttr set n ( if set ? ${n}
|
||||
then # merge
|
||||
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
|
||||
then __getAttr n attrs1
|
||||
then attrs1.${n}
|
||||
else throw "error mergeAttrsNoOverride, attribute ${n} given in both attributes - no merge func defined"
|
||||
else __getAttr n attrs2 # add attribute not existing in attr1
|
||||
)) attrs1 (__attrNames attrs2);
|
||||
else attrs2.${n} # add attribute not existing in attr1
|
||||
)) attrs1 (attrNames attrs2);
|
||||
|
||||
|
||||
# example usage:
|
||||
@ -300,14 +297,14 @@ rec {
|
||||
fold lib.mergeAttrs {} [
|
||||
x y
|
||||
(mapAttrs ( a : v : # merge special names using given functions
|
||||
if (hasAttr a x)
|
||||
then if (hasAttr a y)
|
||||
then v (getAttr a x) (getAttr a y) # both have attr, use merge func
|
||||
else (getAttr a x) # only x has attr
|
||||
else (getAttr a y) # only y has attr)
|
||||
if x ? ${a}
|
||||
then if y ? ${a}
|
||||
then v x.${a} y.${a} # both have attr, use merge func
|
||||
else x.${a} # only x has attr
|
||||
else y.${a} # only y has attr)
|
||||
) (removeAttrs mergeAttrBy2
|
||||
# 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))
|
||||
)
|
||||
)
|
||||
@ -403,7 +400,7 @@ rec {
|
||||
// args2.cfg;
|
||||
opts = attrValues (mapAttrs (a : 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
|
||||
if (maybeAttr "assertion" true attr)
|
||||
then attr
|
||||
|
@ -30,7 +30,7 @@ rec {
|
||||
if check && set ? _definedNames then
|
||||
fold (m: 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 set._definedNames
|
||||
else
|
||||
@ -94,22 +94,22 @@ rec {
|
||||
loc = prefix ++ [name];
|
||||
# Get all submodules that declare ‘name’.
|
||||
decls = concatLists (map (m:
|
||||
if hasAttr name m.options
|
||||
then [ { inherit (m) file; options = getAttr name m.options; } ]
|
||||
if m.options ? ${name}
|
||||
then [ { inherit (m) file; options = m.options.${name}; } ]
|
||||
else []
|
||||
) options);
|
||||
# Get all submodules that define ‘name’.
|
||||
defns = concatLists (map (m:
|
||||
if hasAttr name m.config
|
||||
if m.config ? ${name}
|
||||
then map (config: { inherit (m) file; inherit config; })
|
||||
(pushDownProperties (getAttr name m.config))
|
||||
(pushDownProperties m.config.${name})
|
||||
else []
|
||||
) configs);
|
||||
nrOptions = count (m: isOption m.options) decls;
|
||||
# Process mkMerge and mkIf properties.
|
||||
defns' = concatMap (m:
|
||||
if hasAttr name m.config
|
||||
then map (m': { inherit (m) file; value = m'; }) (dischargeProperties (getAttr name m.config))
|
||||
if m.config ? ${name}
|
||||
then map (m': { inherit (m) file; value = m'; }) (dischargeProperties m.config.${name})
|
||||
else []
|
||||
) configs;
|
||||
in
|
||||
@ -278,7 +278,7 @@ rec {
|
||||
let
|
||||
defaultPrio = 100;
|
||||
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;
|
||||
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;
|
||||
|
@ -80,9 +80,9 @@ rec {
|
||||
internal = opt.internal or false;
|
||||
visible = opt.visible or true;
|
||||
}
|
||||
// optionalAttrs (opt ? example) { example = scrubOptionValue opt.example; }
|
||||
// optionalAttrs (opt ? default) { default = scrubOptionValue opt.default; }
|
||||
// optionalAttrs (opt ? defaultText) { default = opt.defaultText; };
|
||||
// (if opt ? example then { example = scrubOptionValue opt.example; } else {})
|
||||
// (if opt ? default then { default = scrubOptionValue opt.default; } else {})
|
||||
// (if opt ? defaultText then { default = opt.defaultText; } else {});
|
||||
|
||||
subOptions =
|
||||
let ss = opt.type.getSubOptions opt.loc;
|
||||
|
@ -2,7 +2,7 @@ let lists = import ./lists.nix; in
|
||||
|
||||
rec {
|
||||
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"];
|
||||
freebsd = ["i686-freebsd" "x86_64-freebsd"];
|
||||
openbsd = ["i686-openbsd" "x86_64-openbsd"];
|
||||
|
@ -62,8 +62,8 @@ rec {
|
||||
in { result = x.result ++ [entry.text] ++ y.result;
|
||||
done = y.done;
|
||||
}
|
||||
else if hasAttr entry done then f done (tail todo)
|
||||
else f (done // listToAttrs [{name = entry; value = 1;}]) ([(builtins.getAttr entry predefined)] ++ tail todo);
|
||||
else if done ? ${entry} then f done (tail todo)
|
||||
else f (done // listToAttrs [{name = entry; value = 1;}]) ([predefined.${entry}] ++ tail todo);
|
||||
in (f {} arg).result;
|
||||
|
||||
textClosureMap = f: predefined: names:
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
let lib = import ./default.nix;
|
||||
|
||||
inherit (builtins) add sub lessThan length;
|
||||
inherit (builtins) length;
|
||||
|
||||
in
|
||||
|
||||
@ -79,7 +79,7 @@ rec {
|
||||
stringToCharacters = s: let l = stringLength s; in
|
||||
if l == 0
|
||||
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
|
||||
@ -123,7 +123,7 @@ rec {
|
||||
toUpper = replaceChars lowerChars upperChars;
|
||||
|
||||
# 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
|
||||
# Obviously, a workaround but works on all Nix versions
|
||||
@ -139,18 +139,18 @@ rec {
|
||||
s = addContextFrom _sep _s;
|
||||
sepLen = stringLength sep;
|
||||
sLen = stringLength s;
|
||||
lastSearch = sub sLen sepLen;
|
||||
lastSearch = sLen - sepLen;
|
||||
startWithSep = startAt:
|
||||
substring startAt sepLen s == sep;
|
||||
|
||||
recurse = index: startAt:
|
||||
let cutUntil = i: [(substring startAt (sub i startAt) s)]; in
|
||||
if lessThan index lastSearch then
|
||||
let cutUntil = i: [(substring startAt (i - startAt) s)]; in
|
||||
if index < lastSearch then
|
||||
if startWithSep index then
|
||||
let restartAt = add index sepLen; in
|
||||
let restartAt = index + sepLen; in
|
||||
cutUntil index ++ recurse restartAt restartAt
|
||||
else
|
||||
recurse (add index 1) startAt
|
||||
recurse (index + 1) startAt
|
||||
else
|
||||
cutUntil sLen;
|
||||
in
|
||||
|
@ -24,7 +24,7 @@ rec {
|
||||
|
||||
isCpuType = x: isType "cpu-type" x
|
||||
&& 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;
|
||||
setTypes "cpu-type" {
|
||||
|
29
maintainers/scripts/travis-nox-review-pr.sh
Executable file
29
maintainers/scripts/travis-nox-review-pr.sh
Executable 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
|
3
maintainers/scripts/vanity-manual-equalities.txt
Normal file
3
maintainers/scripts/vanity-manual-equalities.txt
Normal 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
65
maintainers/scripts/vanity.sh
Executable 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
|
@ -73,6 +73,25 @@ hardware.opengl.driSupport32Bit = true;
|
||||
|
||||
</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 it’s 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>
|
||||
|
||||
|
@ -482,7 +482,7 @@ sub screenshot {
|
||||
my $name = basename($filename);
|
||||
$self->nest("making screenshot ‘$name’", sub {
|
||||
$self->sendMonitorCommand("screendump $tmp");
|
||||
system("convert $tmp ${filename}") == 0
|
||||
system("pnmtopng $tmp > ${filename}") == 0
|
||||
or die "cannot convert screenshot";
|
||||
unlink $tmp;
|
||||
}, { image => $name } );
|
||||
|
@ -27,7 +27,7 @@ rec {
|
||||
cp ${./test-driver/Logger.pm} $libDir/Logger.pm
|
||||
|
||||
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"
|
||||
'';
|
||||
};
|
||||
@ -41,7 +41,7 @@ rec {
|
||||
|
||||
requiredSystemFeatures = [ "kvm" "nixos-test" ];
|
||||
|
||||
buildInputs = [ pkgs.libxslt ];
|
||||
buildInputs = [ libxslt ];
|
||||
|
||||
buildCommand =
|
||||
''
|
||||
@ -153,7 +153,7 @@ rec {
|
||||
startAll;
|
||||
$client->waitForUnit("multi-user.target");
|
||||
${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}
|
||||
$client->succeed("sync"); # flush all data before pulling the plug
|
||||
'';
|
||||
|
@ -47,11 +47,6 @@ with lib;
|
||||
</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 ];
|
||||
|
||||
};
|
||||
|
@ -1,4 +1,4 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
{ config, lib, pkgs, pkgs_i686, ... }:
|
||||
|
||||
with pkgs;
|
||||
with lib;
|
||||
@ -10,6 +10,10 @@ let
|
||||
systemWide = 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;
|
||||
|
||||
uid = ids.uids.pulseaudio;
|
||||
@ -28,21 +32,25 @@ let
|
||||
# Write an /etc/asound.conf that causes all ALSA applications to
|
||||
# be re-routed to the PulseAudio server through ALSA's Pulse
|
||||
# plugin.
|
||||
alsaConf = writeText "asound.conf" ''
|
||||
alsaConf = writeText "asound.conf" (''
|
||||
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 {
|
||||
type pulse
|
||||
hint.description "Default Audio Device (via PulseAudio)"
|
||||
}
|
||||
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 {
|
||||
type pulse
|
||||
}
|
||||
'';
|
||||
'');
|
||||
|
||||
in {
|
||||
|
||||
@ -116,7 +124,10 @@ in {
|
||||
}
|
||||
|
||||
(mkIf cfg.enable {
|
||||
environment.systemPackages = [ cfg.package ];
|
||||
environment.systemPackages = [
|
||||
cfg.package
|
||||
(lib.optional enable32BitAlsaPlugins pkgs_i686.pulseaudio)
|
||||
];
|
||||
|
||||
environment.etc = singleton {
|
||||
target = "asound.conf";
|
||||
|
@ -310,9 +310,9 @@ let
|
||||
}) cfg.extraUsers;
|
||||
groups = mapAttrsToList (n: g:
|
||||
{ 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
|
||||
);
|
||||
));
|
||||
}) cfg.extraGroups;
|
||||
});
|
||||
|
||||
|
@ -46,7 +46,8 @@ in
|
||||
description = ''
|
||||
On 64-bit systems, whether to support Direct Rendering for
|
||||
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>.
|
||||
'';
|
||||
};
|
||||
@ -104,22 +105,9 @@ in
|
||||
environment.sessionVariables.LD_LIBRARY_PATH =
|
||||
[ "/run/opengl-driver/lib" "/run/opengl-driver-32/lib" ];
|
||||
|
||||
# FIXME: move this into card-specific modules.
|
||||
hardware.opengl.package = mkDefault
|
||||
(if elem "ati_unfree" videoDrivers then
|
||||
kernelPackages.ati_drivers_x11
|
||||
else
|
||||
makePackage pkgs);
|
||||
|
||||
hardware.opengl.package = mkDefault (makePackage pkgs);
|
||||
hardware.opengl.package32 = mkDefault (makePackage pkgs_i686);
|
||||
|
||||
boot.extraModulePackages =
|
||||
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";
|
||||
};
|
||||
boot.extraModulePackages = optional (elem "virtualbox" videoDrivers) kernelPackages.virtualboxGuestAdditions;
|
||||
};
|
||||
}
|
||||
|
37
nixos/modules/hardware/video/ati.nix
Normal file
37
nixos/modules/hardware/video/ati.nix
Normal 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";
|
||||
|
||||
};
|
||||
|
||||
}
|
@ -82,7 +82,7 @@
|
||||
statsd = 69;
|
||||
transmission = 70;
|
||||
postgres = 71;
|
||||
smbguest = 74;
|
||||
smbguest = 74; # unused
|
||||
varnish = 75;
|
||||
datadog = 76;
|
||||
lighttpd = 77;
|
||||
@ -150,8 +150,10 @@
|
||||
zookeeper = 140;
|
||||
dnsmasq = 141;
|
||||
uhub = 142;
|
||||
yandexdisk=143;
|
||||
collectd=144;
|
||||
yandexdisk = 143;
|
||||
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!
|
||||
|
||||
@ -220,7 +222,7 @@
|
||||
postgres = 71;
|
||||
vboxusers = 72;
|
||||
vboxsf = 73;
|
||||
smbguest = 74;
|
||||
smbguest = 74; # unused
|
||||
varnish = 75;
|
||||
datadog = 76;
|
||||
lighttpd = 77;
|
||||
@ -272,6 +274,7 @@
|
||||
riemann = 137;
|
||||
riemanndash = 138;
|
||||
uhub = 142;
|
||||
mailpile = 146;
|
||||
|
||||
# When adding a gid, make sure it doesn't match an existing uid. And don't use gids above 399!
|
||||
|
||||
|
@ -38,6 +38,7 @@
|
||||
./hardware/pcmcia.nix
|
||||
./hardware/video/bumblebee.nix
|
||||
./hardware/video/nvidia.nix
|
||||
./hardware/video/ati.nix
|
||||
./installer/tools/nixos-checkout.nix
|
||||
./installer/tools/tools.nix
|
||||
./misc/assertions.nix
|
||||
@ -142,6 +143,7 @@
|
||||
./services/hardware/udev.nix
|
||||
./services/hardware/udisks2.nix
|
||||
./services/hardware/upower.nix
|
||||
./services/hardware/thermald.nix
|
||||
./services/logging/klogd.nix
|
||||
./services/logging/logcheck.nix
|
||||
./services/logging/logrotate.nix
|
||||
@ -157,6 +159,7 @@
|
||||
./services/mail/postfix.nix
|
||||
./services/mail/spamassassin.nix
|
||||
#./services/misc/autofs.nix
|
||||
./services/misc/cpuminer-cryptonight.nix
|
||||
./services/misc/cgminer.nix
|
||||
./services/misc/dictd.nix
|
||||
./services/misc/disnix.nix
|
||||
@ -211,6 +214,7 @@
|
||||
./services/networking/cjdns.nix
|
||||
./services/networking/cntlm.nix
|
||||
./services/networking/connman.nix
|
||||
./services/networking/consul.nix
|
||||
./services/networking/ddclient.nix
|
||||
./services/networking/dhcpcd.nix
|
||||
./services/networking/dhcpd.nix
|
||||
@ -229,6 +233,7 @@
|
||||
./services/networking/iodined.nix
|
||||
./services/networking/ircd-hybrid/default.nix
|
||||
./services/networking/kippo.nix
|
||||
./services/networking/mailpile.nix
|
||||
./services/networking/minidlna.nix
|
||||
./services/networking/murmur.nix
|
||||
./services/networking/nat.nix
|
||||
|
@ -45,7 +45,6 @@ in
|
||||
PKG_CONFIG_PATH = [ "/lib/pkgconfig" ];
|
||||
TERMINFO_DIRS = [ "/share/terminfo" ];
|
||||
PERL5LIB = [ "/lib/perl5/site_perl" ];
|
||||
ALSA_PLUGIN_DIRS = [ "/lib/alsa-lib" ];
|
||||
KDEDIRS = [ "" ];
|
||||
STRIGI_PLUGIN_PATH = [ "/lib/strigi/" ];
|
||||
QT_PLUGIN_PATH = [ "/lib/qt4/plugins" "/lib/kde4/plugins" ];
|
||||
|
@ -1,6 +1,6 @@
|
||||
{ config, pkgs, ... }:
|
||||
{ config, pkgs, lib, ... }:
|
||||
|
||||
with pkgs.lib;
|
||||
with lib;
|
||||
|
||||
let
|
||||
cfg = config.uim;
|
||||
|
@ -129,5 +129,6 @@ in zipModules ([]
|
||||
++ obsolete' [ "boot" "loader" "grub" "bootDevice" ]
|
||||
++ obsolete' [ "boot" "initrd" "luks" "enable" ]
|
||||
++ obsolete' [ "programs" "bash" "enable" ]
|
||||
++ obsolete' [ "services" "samba" "defaultShare" ]
|
||||
|
||||
)
|
||||
|
@ -16,52 +16,76 @@ let
|
||||
sticker_file "${cfg.dataDir}/sticker.sql"
|
||||
log_file "syslog"
|
||||
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}
|
||||
'';
|
||||
'';
|
||||
|
||||
in {
|
||||
|
||||
###### interface
|
||||
|
||||
options = {
|
||||
options = {
|
||||
|
||||
services.mpd = {
|
||||
services.mpd = {
|
||||
|
||||
enable = mkOption {
|
||||
default = false;
|
||||
description = ''
|
||||
Whether to enable MPD, the music player daemon.
|
||||
'';
|
||||
};
|
||||
'';
|
||||
};
|
||||
|
||||
musicDirectory = mkOption {
|
||||
default = "${cfg.dataDir}/music";
|
||||
description = ''
|
||||
Extra configuration added to the end of MPD's
|
||||
configuration file, mpd.conf.
|
||||
'';
|
||||
};
|
||||
'';
|
||||
};
|
||||
|
||||
extraConfig = mkOption {
|
||||
default = "";
|
||||
default = "";
|
||||
description = ''
|
||||
Extra directives added to to the end of MPD's configuration file,
|
||||
mpd.conf. Basic configuration like file location and uid/gid
|
||||
is added automatically to the beginning of the file.
|
||||
'';
|
||||
};
|
||||
'';
|
||||
};
|
||||
|
||||
dataDir = mkOption {
|
||||
default = "/var/lib/mpd";
|
||||
description = ''
|
||||
The directory where MPD stores its state, tag cache,
|
||||
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
|
||||
|
@ -225,14 +225,14 @@ in
|
||||
# Wait for PostgreSQL to be ready to accept connections.
|
||||
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
|
||||
sleep 0.1
|
||||
done
|
||||
|
||||
if test -e "${cfg.dataDir}/.first_startup"; then
|
||||
${optionalString (cfg.initialScript != null) ''
|
||||
cat "${cfg.initialScript}" | psql postgres
|
||||
cat "${cfg.initialScript}" | psql --port=${toString cfg.port} postgres
|
||||
''}
|
||||
rm -f "${cfg.dataDir}/.first_startup"
|
||||
fi
|
||||
|
66
nixos/modules/services/misc/cpuminer-cryptonight.nix
Normal file
66
nixos/modules/services/misc/cpuminer-cryptonight.nix
Normal 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";
|
||||
};
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
}
|
@ -5,6 +5,7 @@ with lib;
|
||||
let
|
||||
cfg = config.services.gitolite;
|
||||
pubkeyFile = pkgs.writeText "gitolite-admin.pub" cfg.adminPubkey;
|
||||
hooks = lib.concatMapStrings (hook: "${hook} ") cfg.commonHooks;
|
||||
in
|
||||
{
|
||||
options = {
|
||||
@ -30,6 +31,14 @@ in
|
||||
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
|
||||
gitolite setup -pk ${pubkeyFile}
|
||||
fi
|
||||
if [ -n "${hooks}" ]; then
|
||||
cp ${hooks} .gitolite/hooks/common/
|
||||
chmod +x .gitolite/hooks/common/*
|
||||
fi
|
||||
gitolite setup # Upgrade if needed
|
||||
'';
|
||||
};
|
||||
|
@ -6,9 +6,6 @@ let
|
||||
|
||||
cfg = config.services.samba;
|
||||
|
||||
user = "smbguest";
|
||||
group = "smbguest";
|
||||
|
||||
logDir = "/var/log/samba";
|
||||
privateDir = "/var/samba/private";
|
||||
|
||||
@ -16,12 +13,6 @@ let
|
||||
|
||||
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
|
||||
mkdir -p /var/samba/locks /var/samba/cores/nmbd /var/samba/cores/smbd /var/samba/cores/winbindd
|
||||
fi
|
||||
@ -37,21 +28,15 @@ let
|
||||
'';
|
||||
|
||||
configFile = pkgs.writeText "smb.conf"
|
||||
(if cfg.configText != null then cfg.configText else
|
||||
''
|
||||
[ global ]
|
||||
log file = ${logDir}/log.%m
|
||||
private dir = ${privateDir}
|
||||
${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}
|
||||
'';
|
||||
'');
|
||||
|
||||
# This may include nss_ldap, needed for samba if it has to use ldap.
|
||||
nssModulesPath = config.system.nssModules.path;
|
||||
@ -149,19 +134,13 @@ in
|
||||
";
|
||||
};
|
||||
|
||||
defaultShare = {
|
||||
enable = mkOption {
|
||||
description = "Whether to share /home/smbd as 'default'.";
|
||||
default = false;
|
||||
};
|
||||
writeable = mkOption {
|
||||
description = "Whether to allow write access to default share.";
|
||||
default = false;
|
||||
};
|
||||
guest = mkOption {
|
||||
description = "Whether to allow guest access to default share.";
|
||||
default = true;
|
||||
};
|
||||
configText = mkOption {
|
||||
type = types.nullOr types.lines;
|
||||
default = null;
|
||||
description = "
|
||||
Verbatim contents of smb.conf. If null (default), use the
|
||||
autogenerated file from NixOS instead.
|
||||
";
|
||||
};
|
||||
|
||||
securityType = mkOption {
|
||||
@ -199,14 +178,6 @@ in
|
||||
|
||||
(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;
|
||||
|
||||
systemd = {
|
||||
@ -224,7 +195,7 @@ in
|
||||
"samba-setup" = {
|
||||
description = "Samba Setup Task";
|
||||
script = setupScript;
|
||||
unitConfig.RequiresMountsFor = "/home/smbd /var/samba /var/log/samba";
|
||||
unitConfig.RequiresMountsFor = "/var/samba /var/log/samba";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
@ -1,6 +1,6 @@
|
||||
{ config, pkgs, ... }:
|
||||
{ config, pkgs, lib, ... }:
|
||||
|
||||
with pkgs.lib;
|
||||
with lib;
|
||||
|
||||
let
|
||||
|
||||
|
@ -1,8 +1,8 @@
|
||||
# NixOS module for atftpd TFTP server
|
||||
|
||||
{ config, pkgs, ... }:
|
||||
{ config, pkgs, lib, ... }:
|
||||
|
||||
with pkgs.lib;
|
||||
with lib;
|
||||
|
||||
let
|
||||
|
||||
|
@ -57,7 +57,7 @@ let
|
||||
''
|
||||
{
|
||||
"device_name": "${cfg.deviceName}",
|
||||
"storage_path": "/var/lib/btsync",
|
||||
"storage_path": "/var/lib/btsync/",
|
||||
"listening_port": ${toString cfg.listeningPort},
|
||||
"use_gui": false,
|
||||
|
||||
|
@ -190,7 +190,7 @@ in
|
||||
echo '${cjdrouteConf}' | sed \
|
||||
-e "s/@CJDNS_ADMIN_PASSWORD@/$CJDNS_ADMIN_PASSWORD/g" \
|
||||
-e "s/@CJDNS_PRIVATE_KEY@/$CJDNS_PRIVATE_KEY/g" \
|
||||
| ${pkgs.cjdns}/sbin/cjdroute
|
||||
| ${pkgs.cjdns}/bin/cjdroute
|
||||
'';
|
||||
|
||||
serviceConfig = {
|
||||
@ -201,7 +201,7 @@ in
|
||||
|
||||
system.activationScripts.cjdns = ''
|
||||
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
|
||||
|
||||
grep -q "CJDNS_ADMIN_PASSWORD=" /etc/cjdns.keys || \
|
||||
|
166
nixos/modules/services/networking/consul.nix
Normal file
166
nixos/modules/services/networking/consul.nix
Normal 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
|
||||
'';
|
||||
};
|
||||
|
||||
};
|
||||
}
|
76
nixos/modules/services/networking/mailpile.nix
Normal file
76
nixos/modules/services/networking/mailpile.nix
Normal 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 ];
|
||||
|
||||
};
|
||||
|
||||
}
|
@ -13,38 +13,49 @@ let
|
||||
dest = if cfg.externalIP == null then "-j MASQUERADE" else "-j SNAT --to-source ${cfg.externalIP}";
|
||||
|
||||
flushNat = ''
|
||||
iptables -w -t nat -F PREROUTING
|
||||
iptables -w -t nat -F POSTROUTING
|
||||
iptables -w -t nat -X
|
||||
iptables -w -t nat -D PREROUTING -j nixos-nat-pre 2>/dev/null|| true
|
||||
iptables -w -t nat -F nixos-nat-pre 2>/dev/null || true
|
||||
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 = ''
|
||||
# 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
|
||||
# mark packets coming from the external interfaces.
|
||||
${concatMapStrings (iface: ''
|
||||
iptables -w -t nat -A PREROUTING \
|
||||
iptables -w -t nat -A nixos-nat-pre \
|
||||
-i '${iface}' -j MARK --set-mark 1
|
||||
'') cfg.internalInterfaces}
|
||||
|
||||
# NAT the marked packets.
|
||||
${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}
|
||||
''}
|
||||
|
||||
# NAT packets coming from the internal IPs.
|
||||
${concatMapStrings (range: ''
|
||||
iptables -w -t nat -A POSTROUTING \
|
||||
iptables -w -t nat -A nixos-nat-post \
|
||||
-s '${range}' -o ${cfg.externalInterface} ${dest}
|
||||
'') cfg.internalIPs}
|
||||
|
||||
# NAT from external ports to internal ports.
|
||||
${concatMapStrings (fwd: ''
|
||||
iptables -w -t nat -A PREROUTING \
|
||||
iptables -w -t nat -A nixos-nat-pre \
|
||||
-i ${cfg.externalInterface} -p tcp \
|
||||
--dport ${builtins.toString fwd.sourcePort} \
|
||||
-j DNAT --to-destination ${fwd.destination}
|
||||
'') 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
|
||||
@ -157,7 +168,7 @@ in
|
||||
extraStopCommands = flushNat;
|
||||
};
|
||||
|
||||
systemd.services = mkIf (!config.networking.firewall.enable) { nat = {
|
||||
systemd.services = mkIf (!config.networking.firewall.enable) { nat = {
|
||||
description = "Network Address Translation";
|
||||
wantedBy = [ "network.target" ];
|
||||
after = [ "network-interfaces.target" "systemd-modules-load.service" ];
|
||||
|
@ -44,6 +44,9 @@ in
|
||||
# make the cgitrc manpage available
|
||||
environment.systemPackages = [ pkgs.cgit ];
|
||||
|
||||
# declare module dependencies
|
||||
services.lighttpd.enableModules = [ "mod_cgi" "mod_alias" "mod_setenv" ];
|
||||
|
||||
services.lighttpd.extraConfig = ''
|
||||
$HTTP["url"] =~ "^/cgit" {
|
||||
cgi.assign = (
|
||||
|
@ -8,12 +8,54 @@ let
|
||||
|
||||
cfg = config.services.lighttpd;
|
||||
|
||||
needModRedirect = cfg.gitweb.enable;
|
||||
needModAlias = cfg.cgit.enable || cfg.gitweb.enable;
|
||||
needModSetenv = cfg.cgit.enable || cfg.gitweb.enable;
|
||||
needModCgi = cfg.cgit.enable || cfg.gitweb.enable;
|
||||
needModStatus = cfg.mod_status;
|
||||
needModUserdir = cfg.mod_userdir;
|
||||
# List of known lighttpd modules, ordered by how the lighttpd documentation
|
||||
# recommends them being imported:
|
||||
# http://redmine.lighttpd.net/projects/1/wiki/Server_modulesDetails
|
||||
#
|
||||
# Some modules are always imported and should not appear in the config:
|
||||
# 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
|
||||
pkgs.writeText "lighttpd.conf" ''
|
||||
@ -38,13 +80,7 @@ let
|
||||
# been loaded already. So if two services were to put the same module in
|
||||
# server.modules += (), that would break the lighttpd configuration.
|
||||
server.modules = (
|
||||
${optionalString needModRedirect ''"mod_redirect",''}
|
||||
${optionalString needModAlias ''"mod_alias",''}
|
||||
${optionalString needModSetenv ''"mod_setenv",''}
|
||||
${optionalString needModCgi ''"mod_cgi",''}
|
||||
${optionalString needModStatus ''"mod_status",''}
|
||||
${optionalString needModUserdir ''"mod_userdir",''}
|
||||
"mod_accesslog"
|
||||
${modulesIncludeString}
|
||||
)
|
||||
|
||||
# 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 {
|
||||
default = false;
|
||||
type = types.uniq types.bool;
|
||||
@ -152,6 +201,26 @@ in
|
||||
|
||||
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 = {
|
||||
description = "Lighttpd Web Server";
|
||||
after = [ "network.target" ];
|
||||
|
@ -44,6 +44,9 @@ in
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
|
||||
# declare module dependencies
|
||||
services.lighttpd.enableModules = [ "mod_cgi" "mod_redirect" "mod_alias" "mod_setenv" ];
|
||||
|
||||
services.lighttpd.extraConfig = ''
|
||||
$HTTP["url"] =~ "^/gitweb" {
|
||||
cgi.assign = (
|
||||
|
@ -18,7 +18,7 @@ in
|
||||
# determines the default: later modules (if enabled) are preferred.
|
||||
# E.g., if KDE is enabled, it supersedes xterm.
|
||||
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
|
||||
];
|
||||
|
||||
|
163
nixos/modules/services/x11/desktop-managers/kde4_next.nix
Normal file
163
nixos/modules/services/x11/desktop-managers/kde4_next.nix
Normal 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; };
|
||||
|
||||
};
|
||||
|
||||
}
|
@ -28,11 +28,10 @@ let
|
||||
buildCommand = ''
|
||||
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 \
|
||||
$out/greeter \
|
||||
--set XDG_DATA_DIRS ${pkgs.gnome2.gnome_icon_theme}/share \
|
||||
--set FONTCONFIG_FILE /etc/fonts/fonts.conf \
|
||||
--set XDG_CONFIG_HOME $out/
|
||||
|
||||
# We need this to ensure that it actually tries to find icons from gnome-icon-theme
|
||||
|
28
nixos/modules/services/x11/window-managers/afterstep.nix
Normal file
28
nixos/modules/services/x11/window-managers/afterstep.nix
Normal 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 ];
|
||||
};
|
||||
}
|
28
nixos/modules/services/x11/window-managers/ratpoison.nix
Normal file
28
nixos/modules/services/x11/window-managers/ratpoison.nix
Normal 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 ];
|
||||
};
|
||||
}
|
28
nixos/modules/services/x11/window-managers/windowmaker.nix
Normal file
28
nixos/modules/services/x11/window-managers/windowmaker.nix
Normal 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 ];
|
||||
};
|
||||
}
|
@ -13,7 +13,6 @@ let
|
||||
|
||||
# Map video driver names to driver packages. FIXME: move into card-specific modules.
|
||||
knownVideoDrivers = {
|
||||
ati_unfree = { modules = [ kernelPackages.ati_drivers_x11 ]; driverName = "fglrx"; };
|
||||
nouveau = { modules = [ pkgs.xf86_video_nouveau ]; };
|
||||
unichrome = { modules = [ pkgs.xorgVideoUnichrome ]; };
|
||||
virtualbox = { modules = [ kernelPackages.virtualboxGuestAdditions ]; driverName = "vboxvideo"; };
|
||||
@ -400,8 +399,8 @@ in
|
||||
services.xserver.drivers = flip concatMap cfg.videoDrivers (name:
|
||||
let driver =
|
||||
attrByPath [name]
|
||||
(if (hasAttr ("xf86video" + name) xorg)
|
||||
then { modules = [(getAttr ("xf86video" + name) xorg) ]; }
|
||||
(if xorg ? ${"xf86video" + name}
|
||||
then { modules = [xorg.${"xf86video" + name}]; }
|
||||
else null)
|
||||
knownVideoDrivers;
|
||||
in optional (driver != null) ({ inherit name; driverName = name; } // driver));
|
||||
@ -444,8 +443,7 @@ in
|
||||
pkgs.xterm
|
||||
pkgs.xdg_utils
|
||||
]
|
||||
++ optional (elem "virtualbox" cfg.videoDrivers) xorg.xrefresh
|
||||
++ optional (elem "ati_unfree" cfg.videoDrivers) kernelPackages.ati_drivers_x11;
|
||||
++ optional (elem "virtualbox" cfg.videoDrivers) xorg.xrefresh;
|
||||
|
||||
environment.pathsToLink =
|
||||
[ "/etc/xdg" "/share/xdg" "/share/applications" "/share/icons" "/share/pixmaps" ];
|
||||
@ -460,13 +458,11 @@ in
|
||||
restartIfChanged = false;
|
||||
|
||||
environment =
|
||||
{ FONTCONFIG_FILE = "/etc/fonts/fonts.conf"; # !!! cleanup
|
||||
{
|
||||
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.
|
||||
LD_LIBRARY_PATH = concatStringsSep ":" (
|
||||
[ "${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));
|
||||
} // cfg.displayManager.job.environment;
|
||||
|
||||
|
@ -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."
|
||||
else
|
||||
"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}";
|
||||
|
||||
system.build.grub = grub;
|
||||
|
@ -199,7 +199,10 @@ sub GrubFs {
|
||||
return Grub->new(path => $path, search => $search);
|
||||
}
|
||||
my $grubBoot = GrubFs("/boot");
|
||||
my $grubStore = GrubFs("/nix/store");
|
||||
my $grubStore;
|
||||
if ($copyKernels == 0) {
|
||||
$grubStore = GrubFs("/nix/store");
|
||||
}
|
||||
|
||||
# Generate the header.
|
||||
my $conf .= "# Automatically generated. DO NOT EDIT THIS FILE!\n";
|
||||
|
@ -168,9 +168,24 @@ if test -e /sys/power/tuxonice/resume; then
|
||||
fi
|
||||
fi
|
||||
|
||||
if test -n "@resumeDevice@" -a -e /sys/power/resume -a -e /sys/power/disk; then
|
||||
echo "@resumeDevice@" > /sys/power/resume 2> /dev/null || echo "failed to resume..."
|
||||
echo shutdown > /sys/power/disk
|
||||
if test -e /sys/power/resume -a -e /sys/power/disk; then
|
||||
if test -n "@resumeDevice@"; then
|
||||
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
|
||||
|
||||
|
||||
|
@ -181,6 +181,9 @@ let
|
||||
inherit (config.boot.initrd) checkJournalingFS
|
||||
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 =
|
||||
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));
|
||||
@ -220,13 +223,14 @@ in
|
||||
options = {
|
||||
|
||||
boot.resumeDevice = mkOption {
|
||||
type = types.nullOr types.str;
|
||||
default = null;
|
||||
example = "8:2";
|
||||
type = types.str;
|
||||
default = "";
|
||||
example = "/dev/sda3";
|
||||
description = ''
|
||||
Device for manual resume attempt during boot, specified using
|
||||
the device's major and minor number as
|
||||
<literal><replaceable>major</replaceable>:<replaceable>minor</replaceable></literal>.
|
||||
Device for manual resume attempt during boot. This should be used primarily
|
||||
if you want to resume from file. Specify here the device where the file
|
||||
resides. You should also use <varname>boot.kernelParams</varname> to specify
|
||||
<literal><replaceable>resume_offset</replaceable></literal>.
|
||||
'';
|
||||
};
|
||||
|
||||
|
@ -6,8 +6,8 @@ let
|
||||
|
||||
checkService = v:
|
||||
let assertValueOneOf = name: values: attr:
|
||||
let val = getAttr name attr;
|
||||
in optional ( hasAttr name attr && !elem val values) "Systemd service field `${name}' cannot have value `${val}'.";
|
||||
let val = attr.${name};
|
||||
in optional (attr ? ${name} && !elem val values) "Systemd service field `${name}' cannot have value `${val}'.";
|
||||
checkType = assertValueOneOf "Type" ["simple" "forking" "oneshot" "dbus" "notify" "idle"];
|
||||
checkRestart = assertValueOneOf "Restart" ["no" "on-success" "on-failure" "on-abort" "always"];
|
||||
errors = concatMap (c: c v) [checkType checkRestart];
|
||||
|
@ -322,7 +322,7 @@ let
|
||||
[Service]
|
||||
${let env = cfg.globalEnvironment // def.environment;
|
||||
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)}
|
||||
${if def.reloadIfChanged then ''
|
||||
X-ReloadIfChanged=true
|
||||
|
@ -345,10 +345,20 @@ in
|
||||
|
||||
interfaces = mkOption {
|
||||
example = [ "enp4s0f0" "enp4s0f1" "wlan0" ];
|
||||
type = types.listOf types.string;
|
||||
type = types.listOf types.str;
|
||||
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 {
|
||||
default = null;
|
||||
example = 100;
|
||||
@ -364,7 +374,7 @@ in
|
||||
mode = mkOption {
|
||||
default = null;
|
||||
example = "active-backup";
|
||||
type = types.nullOr types.string;
|
||||
type = types.nullOr types.str;
|
||||
description = ''
|
||||
The mode which the bond will be running. The default mode for
|
||||
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 ];
|
||||
script = ''
|
||||
# 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
|
||||
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"}
|
||||
${optionalString (v.mode != null)
|
||||
"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
|
||||
${flip concatMapStrings v.interfaces (i: ''
|
||||
ifenslave "${n}" "${i}"
|
||||
'')}
|
||||
'';
|
||||
postStop = ''
|
||||
ip link set "${n}" down
|
||||
ifenslave -d "${n}"
|
||||
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
|
||||
'';
|
||||
});
|
||||
|
||||
@ -798,7 +824,7 @@ in
|
||||
script = ''
|
||||
# Remove Dead Interfaces
|
||||
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.local != null) "local \"${v.local}\""} \
|
||||
${optionalString (v.ttl != null) "ttl ${toString v.ttl}"} \
|
||||
@ -824,7 +850,7 @@ in
|
||||
script = ''
|
||||
# Remove Dead Interfaces
|
||||
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
|
||||
'';
|
||||
postStop = ''
|
||||
|
@ -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"; }
|
||||
, stableBranch ? false
|
||||
, supportedSystems ? [ "x86_64-linux" "i686-linux" ]
|
||||
@ -18,7 +22,7 @@ let
|
||||
in rec {
|
||||
|
||||
nixos = removeMaintainers (import ./release.nix {
|
||||
inherit stableBranch;
|
||||
inherit stableBranch supportedSystems;
|
||||
nixpkgs = nixpkgsSrc;
|
||||
});
|
||||
|
||||
@ -30,12 +34,13 @@ in rec {
|
||||
tested = pkgs.releaseTools.aggregate {
|
||||
name = "nixos-${nixos.channel.version}";
|
||||
meta = {
|
||||
description = "Release-critical builds for the NixOS unstable channel";
|
||||
maintainers = [ pkgs.lib.maintainers.eelco pkgs.lib.maintainers.shlevy ];
|
||||
description = "Release-critical builds for the NixOS channel";
|
||||
maintainers = [ pkgs.lib.maintainers.eelco ];
|
||||
};
|
||||
constituents =
|
||||
let all = x: map (p: x.${p}) supportedSystems; in
|
||||
let all = x: map (system: x.${system}) supportedSystems; in
|
||||
[ nixos.channel
|
||||
(all nixos.dummy)
|
||||
(all nixos.manual)
|
||||
|
||||
(all nixos.iso_minimal)
|
||||
@ -61,7 +66,8 @@ in rec {
|
||||
(all nixos.tests.kde4)
|
||||
(all nixos.tests.login)
|
||||
(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.openssh)
|
||||
(all nixos.tests.printing)
|
||||
|
@ -11,7 +11,7 @@ let
|
||||
|
||||
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)));
|
||||
|
||||
@ -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
|
||||
# boot that system from uboot (like for the sheevaplug).
|
||||
# The pc variant helps preparing the expression for the system tarball
|
||||
@ -244,7 +254,8 @@ in rec {
|
||||
tests.munin = callTest tests/munin.nix {};
|
||||
tests.mysql = callTest tests/mysql.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.nsd = callTest tests/nsd.nix {};
|
||||
tests.openssh = callTest tests/openssh.nix {};
|
||||
|
@ -6,13 +6,13 @@ with pkgs.lib;
|
||||
|
||||
let
|
||||
|
||||
# Build the ISO. This is the regular installation CD but with test
|
||||
# instrumentation.
|
||||
# Build the ISO. This is the regular minimal installation CD but
|
||||
# with test instrumentation.
|
||||
iso =
|
||||
(import ../lib/eval-config.nix {
|
||||
inherit system;
|
||||
modules =
|
||||
[ ../modules/installer/cd-dvd/installation-cd-graphical.nix
|
||||
[ ../modules/installer/cd-dvd/installation-cd-minimal.nix
|
||||
../modules/testing/test-instrumentation.nix
|
||||
{ key = "serial";
|
||||
boot.loader.grub.timeout = mkOverride 0 0;
|
||||
@ -43,6 +43,7 @@ let
|
||||
{ imports =
|
||||
[ ./hardware-configuration.nix
|
||||
<nixpkgs/nixos/modules/testing/test-instrumentation.nix>
|
||||
<nixpkgs/nixos/modules/profiles/minimal.nix>
|
||||
];
|
||||
|
||||
${if useEFI then ''
|
||||
|
@ -17,7 +17,7 @@ import ./make-test.nix {
|
||||
|
||||
users.extraUsers.jenkins.extraGroups = [ "users" ];
|
||||
|
||||
systemd.services.jenkins.unitConfig.TimeoutSec = 240;
|
||||
systemd.services.jenkins.serviceConfig.TimeoutStartSec = "3min";
|
||||
};
|
||||
|
||||
slave =
|
||||
|
@ -32,7 +32,7 @@ import ./make-test.nix ({ pkgs, ... }: {
|
||||
pkgs.kde4.kdegraphics
|
||||
pkgs.kde4.kdeutils
|
||||
pkgs.kde4.kdegames
|
||||
pkgs.kde4.kdeedu
|
||||
#pkgs.kde4.kdeedu
|
||||
pkgs.kde4.kdeaccessibility
|
||||
pkgs.kde4.kdeadmin
|
||||
pkgs.kde4.kdenetwork
|
||||
|
@ -18,7 +18,7 @@ import ./make-test.nix {
|
||||
'';
|
||||
};
|
||||
};
|
||||
systemd.services.munin-node.unitConfig.TimeoutSec = 240;
|
||||
systemd.services.munin-node.serviceConfig.TimeoutStartSec = "3min";
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -3,77 +3,81 @@
|
||||
# client on the inside network, a server on the outside network, and a
|
||||
# router connected to both that performs Network Address Translation
|
||||
# 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 {
|
||||
name = "nat";
|
||||
nodes =
|
||||
{ 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 =
|
||||
{ client =
|
||||
{ config, pkgs, nodes, ... }:
|
||||
{ virtualisation.vlans = [ 1 ];
|
||||
networking.firewall.allowPing = true;
|
||||
networking.defaultGateway =
|
||||
(pkgs.lib.head nodes.router.config.networking.interfaces.eth2.ip4).address;
|
||||
};
|
||||
router =
|
||||
{ config, pkgs, ... }:
|
||||
{ virtualisation.vlans = [ 2 1 ];
|
||||
networking.firewall.enable = withFirewall;
|
||||
networking.firewall.allowPing = true;
|
||||
networking.nat.enable = true;
|
||||
networking.nat.internalIPs = [ "192.168.1.0/24" ];
|
||||
networking.nat.externalInterface = "eth1";
|
||||
};
|
||||
|
||||
router =
|
||||
{ config, pkgs, ... }:
|
||||
{ virtualisation.vlans = [ 2 1 ];
|
||||
networking.firewall.allowPing = true;
|
||||
networking.nat.enable = true;
|
||||
networking.nat.internalIPs = [ "192.168.1.0/24" ];
|
||||
networking.nat.externalInterface = "eth1";
|
||||
};
|
||||
server =
|
||||
{ config, pkgs, ... }:
|
||||
{ virtualisation.vlans = [ 2 ];
|
||||
networking.firewall.enable = false;
|
||||
services.httpd.enable = true;
|
||||
services.httpd.adminAddr = "foo@example.org";
|
||||
services.vsftpd.enable = true;
|
||||
services.vsftpd.anonymousUser = true;
|
||||
};
|
||||
};
|
||||
|
||||
server =
|
||||
{ config, pkgs, ... }:
|
||||
{ virtualisation.vlans = [ 2 ];
|
||||
networking.firewall.enable = false;
|
||||
services.httpd.enable = true;
|
||||
services.httpd.adminAddr = "foo@example.org";
|
||||
services.vsftpd.enable = true;
|
||||
services.vsftpd.anonymousUser = true;
|
||||
};
|
||||
};
|
||||
testScript =
|
||||
{ nodes, ... }:
|
||||
''
|
||||
startAll;
|
||||
|
||||
testScript =
|
||||
{ nodes, ... }:
|
||||
''
|
||||
startAll;
|
||||
# The router should have access to the server.
|
||||
$server->waitForUnit("network.target");
|
||||
$server->waitForUnit("httpd");
|
||||
$router->waitForUnit("network.target");
|
||||
$router->succeed("curl --fail http://server/ >&2");
|
||||
|
||||
# The router should have access to the server.
|
||||
$server->waitForUnit("network.target");
|
||||
$server->waitForUnit("httpd");
|
||||
$router->waitForUnit("network.target");
|
||||
$router->succeed("curl --fail http://server/ >&2");
|
||||
# The client should be also able to connect via the NAT router.
|
||||
$router->waitForUnit("${unit}");
|
||||
$client->waitForUnit("network.target");
|
||||
$client->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.
|
||||
$router->waitForUnit("nat");
|
||||
$client->waitForUnit("network.target");
|
||||
$client->succeed("curl --fail http://server/ >&2");
|
||||
$client->succeed("ping -c 1 server >&2");
|
||||
# Test whether passive FTP works.
|
||||
$server->waitForUnit("vsftpd");
|
||||
$server->succeed("echo Hello World > /home/ftp/foo.txt");
|
||||
$client->succeed("curl -v ftp://server/foo.txt >&2");
|
||||
|
||||
# Test whether passive FTP works.
|
||||
$server->waitForUnit("vsftpd");
|
||||
$server->succeed("echo Hello World > /home/ftp/foo.txt");
|
||||
$client->succeed("curl -v ftp://server/foo.txt >&2");
|
||||
# Test whether active FTP works.
|
||||
$client->succeed("curl -v -P - ftp://server/foo.txt >&2");
|
||||
|
||||
# Test whether active FTP works.
|
||||
$client->succeed("curl -v -P - ftp://server/foo.txt >&2");
|
||||
# Test ICMP.
|
||||
$client->succeed("ping -c 1 router >&2");
|
||||
$router->succeed("ping -c 1 client >&2");
|
||||
|
||||
# Test ICMP.
|
||||
$client->succeed("ping -c 1 router >&2");
|
||||
$router->succeed("ping -c 1 client >&2");
|
||||
# If we turn off NAT, the client shouldn't be able to reach the server.
|
||||
$router->succeed("iptables -t nat -D PREROUTING -j nixos-nat-pre");
|
||||
$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.
|
||||
$router->stopJob("nat");
|
||||
$client->fail("curl --fail --connect-timeout 5 http://server/ >&2");
|
||||
$client->fail("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");
|
||||
'';
|
||||
|
||||
}
|
||||
# And make sure that reloading the NAT job works.
|
||||
$router->succeed("systemctl restart ${unit}");
|
||||
$client->succeed("curl --fail http://server/ >&2");
|
||||
$client->succeed("ping -c 1 server >&2");
|
||||
'';
|
||||
})
|
||||
|
@ -39,7 +39,7 @@ assert withOnlineServices -> withTaglib;
|
||||
assert withReplaygain -> withTaglib;
|
||||
|
||||
let
|
||||
version = "1.4.1";
|
||||
version = "1.4.2";
|
||||
pname = "cantata";
|
||||
fstat = x: fn: "-DENABLE_" + fn + "=" + (if x then "ON" else "OFF");
|
||||
fstats = x: map (fstat x);
|
||||
@ -50,8 +50,8 @@ stdenv.mkDerivation rec {
|
||||
|
||||
src = fetchurl {
|
||||
inherit name;
|
||||
url = "https://drive.google.com/uc?export=download&id=0Bzghs6gQWi60eXhuZ1Z3bGM2bjQ";
|
||||
sha256 = "b0d5a1798efd275d72dffb87bc0f016fc865dbd1384b7c9af039cebdffe0cca3";
|
||||
url = "https://drive.google.com/uc?export=download&id=0Bzghs6gQWi60UDFOeU1qSkIzaVE";
|
||||
sha256 = "0ycwx75f1jlsaca170bz82av06bnlknl3q0df001rhmhb7wh4j6c";
|
||||
};
|
||||
|
||||
buildInputs =
|
||||
|
98
pkgs/applications/audio/deadbeef/default.nix
Normal file
98
pkgs/applications/audio/deadbeef/default.nix
Normal 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;
|
||||
};
|
||||
}
|
@ -2,11 +2,11 @@
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "drumkv1-${version}";
|
||||
version = "0.5.0";
|
||||
version = "0.5.1";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://sourceforge/drumkv1/${name}.tar.gz";
|
||||
sha256 = "16bjkp22hfpmzj5di98dddzslavgvhw5z7pgjzmjqz9dxvbqwq1k";
|
||||
sha256 = "1cih4f22922ndk8yrcf955fvzkd8mh7qz1xcdyn3xybs7ackgarq";
|
||||
};
|
||||
|
||||
buildInputs = [ jack2 libsndfile lv2 qt4 ];
|
||||
|
@ -1,14 +1,14 @@
|
||||
{ stdenv, fetchurl, pkgconfig, intltool, gtk, glib, libid3tag, id3lib, taglib
|
||||
, libvorbis, libogg, flac
|
||||
, libvorbis, libogg, flac, itstool, libxml2
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "easytag-${version}";
|
||||
version = "2.1.8";
|
||||
version = "2.2.4";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://gnome/sources/easytag/2.1/${name}.tar.xz";
|
||||
sha256 = "1ab5iv0a83cdf07qzi81ydfk5apay06nxags9m07msqalz4pabqs";
|
||||
url = "mirror://gnome/sources/easytag/2.2/${name}.tar.xz";
|
||||
sha256 = "14f0s0l28fwxnc37aw1imal2xcg9ykq35mx2j9gaqzz02ymjk0s5";
|
||||
};
|
||||
|
||||
preConfigure = ''
|
||||
@ -22,11 +22,13 @@ stdenv.mkDerivation rec {
|
||||
|
||||
buildInputs = [
|
||||
pkgconfig intltool gtk glib libid3tag id3lib taglib libvorbis libogg flac
|
||||
itstool libxml2
|
||||
];
|
||||
|
||||
meta = {
|
||||
description = "View and edit tags for various audio files";
|
||||
homepage = "http://projects.gnome.org/easytag/";
|
||||
license = stdenv.lib.licenses.gpl2Plus;
|
||||
maintainers = with stdenv.lib.maintainers; [ fuuzetsu ];
|
||||
};
|
||||
}
|
||||
|
40
pkgs/applications/audio/freewheeling/am_path_sdl.patch
Normal file
40
pkgs/applications/audio/freewheeling/am_path_sdl.patch
Normal 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.
|
44
pkgs/applications/audio/freewheeling/default.nix
Normal file
44
pkgs/applications/audio/freewheeling/default.nix
Normal 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;
|
||||
};
|
||||
}
|
13
pkgs/applications/audio/freewheeling/xml.patch
Normal file
13
pkgs/applications/audio/freewheeling/xml.patch
Normal 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}
|
@ -4,8 +4,8 @@
|
||||
assert stdenv.system == "x86_64-linux" || stdenv.system == "1686-linux";
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
debversion = "beta_1.0.84.1107-r0";
|
||||
version = "1.0.84.1107-beta-r0"; # friendly to nix-env version sorting algo
|
||||
debversion = "beta_1.0.55.7425-r0";
|
||||
version = "beta_1.0.55.7425-r0"; # friendly to nix-env version sorting algo
|
||||
product = "google-musicmanager";
|
||||
name = "${product}-${version}";
|
||||
|
||||
@ -16,12 +16,12 @@ stdenv.mkDerivation rec {
|
||||
|
||||
src = if stdenv.system == "x86_64-linux"
|
||||
then fetchurl {
|
||||
url = "http://dl.google.com/linux/musicmanager/deb/pool/main/g/${product}-beta/${product}-${debversion}_amd64.deb";
|
||||
sha256 = "0irlrspw508b1s9i5d1mddpp2x9w1ny3svf27gxf8pmwbiyd1cyi";
|
||||
url = "http://dl.google.com/linux/musicmanager/deb/pool/main/g/google-musicmanager-beta/google-musicmanager-${version}_amd64.deb";
|
||||
sha256 = "0efdce3970e2cf83eb7d8f6021f987a1517a41823784ada8e51f1649f8a49342";
|
||||
}
|
||||
else fetchurl {
|
||||
url = "http://dl.google.com/linux/musicmanager/deb/pool/main/g/${product}-beta/${product}-${debversion}_i386.deb";
|
||||
sha256 = "13pfsjvaygap6axrlbfhyk1h8377xmwi47x4af6j57qq6z7329rg";
|
||||
url = "http://dl.google.com/linux/musicmanager/deb/pool/main/g/google-musicmanager-beta/google-musicmanager-${version}_i386.deb";
|
||||
sha256 = "4cc8822ab90af97195c2edfa74cc8b4a736e763cc3382f741aa1de0f72ac211e";
|
||||
};
|
||||
|
||||
unpackPhase = ''
|
||||
|
@ -12,8 +12,8 @@ stdenv.mkDerivation rec {
|
||||
};
|
||||
|
||||
buildInputs = [
|
||||
avahi boost eigen fftw gettext glib glibmm gtk gtkmm intltool jack2
|
||||
ladspaH librdf libsndfile lilv lv2 pkgconfig python serd sord sratom
|
||||
avahi boost boost.lib eigen fftw gettext glib glibmm gtk gtkmm intltool
|
||||
jack2 ladspaH librdf libsndfile lilv lv2 pkgconfig python serd sord sratom
|
||||
];
|
||||
|
||||
configurePhase = "python waf configure --prefix=$out";
|
||||
|
@ -4,16 +4,16 @@
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "ingen-svn-${rev}";
|
||||
rev = "5317";
|
||||
rev = "5464";
|
||||
|
||||
src = fetchsvn {
|
||||
url = "http://svn.drobilla.net/lad/trunk/ingen";
|
||||
rev = rev;
|
||||
sha256 = "0zm3wbv9qsingjyr95nwin3khmnf3wq3fz2xa6p420dpcy6qnl4x";
|
||||
sha256 = "1p5rsxwanpj3kj5yai7zqbharj2ldvn78x3p739vkgpr3dinp506";
|
||||
};
|
||||
|
||||
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
|
||||
];
|
||||
|
||||
|
74
pkgs/applications/audio/kid3/default.nix
Normal file
74
pkgs/applications/audio/kid3/default.nix
Normal 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
|
@ -1,12 +1,12 @@
|
||||
{ stdenv, fetchurl, pkgconfig, glib, ncurses, mpd_clientlib, libintlOrEmpty }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
version = "0.23";
|
||||
version = "0.24";
|
||||
name = "ncmpc-${version}";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://www.musicpd.org/download/ncmpc/0/ncmpc-${version}.tar.xz";
|
||||
sha256 = "d7b30cefaf5c74a5d8ab18ab8275e0102ae12e8ee6d6f8144f8e4cc9a97b5de4";
|
||||
sha256 = "1sf3nirs3mcx0r5i7acm9bsvzqzlh730m0yjg6jcyj8ln6r7cvqf";
|
||||
};
|
||||
|
||||
buildInputs = [ pkgconfig glib ncurses mpd_clientlib ]
|
||||
@ -14,6 +14,11 @@ stdenv.mkDerivation rec {
|
||||
|
||||
NIX_LDFLAGS = stdenv.lib.optionalString stdenv.isDarwin "-lintl";
|
||||
|
||||
configureFlags = [
|
||||
"--enable-colors"
|
||||
"--enable-lyrics-screen"
|
||||
];
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "Curses-based interface for MPD (music player daemon)";
|
||||
homepage = http://www.musicpd.org/clients/ncmpc/;
|
||||
|
@ -1,10 +1,10 @@
|
||||
{stdenv, fetchurl, libogg, libao, pkgconfig, libopus, flac}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "opus-tools-0.1.8";
|
||||
name = "opus-tools-0.1.9";
|
||||
src = fetchurl {
|
||||
url = "http://downloads.xiph.org/releases/opus/${name}.tar.gz";
|
||||
sha256 = "1xm2lhdz92n9zmk496lyagisyzja46kx8q340vay9i51krbqiqg4";
|
||||
sha256 = "0fk4nknvl111k89j5yckmyrh6b2wvgyhrqfncp7rig3zikbkv1xi";
|
||||
};
|
||||
|
||||
buildInputs = [ libogg libao pkgconfig libopus flac ];
|
||||
@ -12,6 +12,7 @@ stdenv.mkDerivation rec {
|
||||
meta = {
|
||||
description = "Tools to work with opus encoded audio streams";
|
||||
homepage = http://www.opus-codec.org/;
|
||||
license = "BSD";
|
||||
license = stdenv.lib.licenses.bsd2;
|
||||
maintainers = with stdenv.lib.maintainers; [ fuuzetsu ];
|
||||
};
|
||||
}
|
||||
|
@ -1,10 +1,10 @@
|
||||
{stdenv, fetchurl, pkgconfig, openssl, libogg, libopus}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "opusfile-0.4";
|
||||
name = "opusfile-0.6";
|
||||
src = fetchurl {
|
||||
url = "http://downloads.xiph.org/releases/opus/${name}.tar.gz";
|
||||
sha256 = "0h4iwyqgid0cibqwzckz3r94qfp09099nk1cx5nz6i3cf08yldlq";
|
||||
sha256 = "19iys2kld75k0210b807i4illrdmj3cmmnrgxlc9y4vf6mxp2a14";
|
||||
};
|
||||
|
||||
buildInputs = [ pkgconfig openssl libogg libopus ];
|
||||
@ -12,6 +12,7 @@ stdenv.mkDerivation rec {
|
||||
meta = {
|
||||
description = "High-level API for decoding and seeking in .opus files";
|
||||
homepage = http://www.opus-codec.org/;
|
||||
license = "BSD";
|
||||
license = stdenv.lib.licenses.bsd3;
|
||||
maintainers = with stdenv.lib.maintainers; [ fuuzetsu ];
|
||||
};
|
||||
}
|
||||
|
@ -14,7 +14,7 @@ stdenv.mkDerivation rec {
|
||||
sha256 = "03r0sbfj85wp6yxa87pjg69ivmk0mxxa2nykr8gf2c607igmb034";
|
||||
};
|
||||
|
||||
buildInputs = [ pulseaudio boost ];
|
||||
buildInputs = [ pulseaudio boost boost.lib ];
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin
|
||||
|
33
pkgs/applications/audio/paprefs/default.nix
Normal file
33
pkgs/applications/audio/paprefs/default.nix
Normal 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;
|
||||
};
|
||||
}
|
@ -1,5 +1,5 @@
|
||||
{ fetchurl, stdenv, pkgconfig, pulseaudio, gtkmm3
|
||||
, libcanberra_gtk3, intltool, gettext }:
|
||||
{ fetchurl, stdenv, pkgconfig, intltool, pulseaudio, gtkmm3
|
||||
, libcanberra_gtk3 }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "pavucontrol-2.0";
|
||||
@ -9,12 +9,13 @@ stdenv.mkDerivation rec {
|
||||
sha256 = "02s775m1531sshwlbvfddk3pz8zjmwkv1sgzggn386ja3gc9vwi2";
|
||||
};
|
||||
|
||||
buildInputs = [ pkgconfig pulseaudio gtkmm3 libcanberra_gtk3
|
||||
intltool gettext ];
|
||||
buildInputs = [ pulseaudio gtkmm3 libcanberra_gtk3 ];
|
||||
|
||||
configureFlags = "--disable-lynx";
|
||||
nativeBuildInputs = [ pkgconfig intltool ];
|
||||
|
||||
meta = {
|
||||
configureFlags = [ "--disable-lynx" ];
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "PulseAudio Volume Control";
|
||||
|
||||
longDescription = ''
|
||||
@ -27,7 +28,7 @@ stdenv.mkDerivation rec {
|
||||
|
||||
license = stdenv.lib.licenses.gpl2Plus;
|
||||
|
||||
maintainers = [ ];
|
||||
platforms = stdenv.lib.platforms.gnu; # arbitrary choice
|
||||
maintainers = [ maintainers.abbradar ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
||||
|
@ -3,12 +3,12 @@
|
||||
, libtool, libvorbis, pkgconfig, qt4, rubberband, stdenv }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
version = "0.6.2";
|
||||
version = "0.6.3";
|
||||
name = "qtractor-${version}";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://sourceforge/qtractor/${name}.tar.gz";
|
||||
sha256 = "08cr4lgm8bkkmsvfljszcqij3i52n989s7ncrbrn17n61rmgf8yw";
|
||||
sha256 = "1lsmd83vhgfzb3bf02hi6xp5ryh08lz4h21agy7wm3acjqc6gsc2";
|
||||
};
|
||||
|
||||
buildInputs =
|
||||
|
@ -2,11 +2,11 @@
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "samplv1-${version}";
|
||||
version = "0.5.0";
|
||||
version = "0.5.1";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://sourceforge/samplv1/${name}.tar.gz";
|
||||
sha256 = "02mm5y1yzklvs5bpxl86y3dqcg7migfybmin8llk91pws6rl9b41";
|
||||
sha256 = "155qq7gxyqn7sh8bbyhjk40lxl157lb2h539j4gqgv5jphz8g6wy";
|
||||
};
|
||||
|
||||
buildInputs = [ jack2 libsndfile lv2 qt4 ];
|
||||
|
@ -4,17 +4,11 @@
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "snd-14.3";
|
||||
|
||||
meta = {
|
||||
description = "Sound editor";
|
||||
homepage = http://ccrma.stanford.edu/software/snd;
|
||||
platforms = stdenv.lib.platforms.linux;
|
||||
};
|
||||
name = "snd-15.0";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://sourceforge/snd/${name}.tar.gz";
|
||||
sha256 = "04shk34pza507kvm40dc6sdz5jz533z4q2h7m9hgqvw1r3f57ms6";
|
||||
sha256 = "1s1mswgxhvi0wjw0qscwh2jajihvgz86xffgbwl7qjkymqbh8gyj";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ pkgconfig ];
|
||||
@ -23,4 +17,14 @@ stdenv.mkDerivation rec {
|
||||
gtk2 alsaLib
|
||||
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 ];
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
|
@ -2,11 +2,11 @@
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "synthv1-${version}";
|
||||
version = "0.5.0";
|
||||
version = "0.5.1";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://sourceforge/synthv1/${name}.tar.gz";
|
||||
sha256 = "011kjccrdwb62rpck5gb8h4kvvm8rk6n77lj78ykxz4pxip5hf14";
|
||||
sha256 = "16wcxrcjwp0qp2xgahhzvcs2k31sr6c9jsxyhivj4famj7a39pfw";
|
||||
};
|
||||
|
||||
buildInputs = [ qt4 jack2 lv2 ];
|
||||
|
@ -1,5 +1,5 @@
|
||||
{ stdenv, fetchurl, alsaLib, boost, cairo, cmake, fftwSinglePrec, fltk
|
||||
, jack2, libsndfile, mesa, minixml, pkgconfig, zlib
|
||||
, jack2, libsndfile, mesa, minixml, pkgconfig, zlib, xorg
|
||||
}:
|
||||
|
||||
assert stdenv ? glibc;
|
||||
@ -14,8 +14,8 @@ stdenv.mkDerivation rec {
|
||||
};
|
||||
|
||||
buildInputs = [
|
||||
alsaLib boost cairo fftwSinglePrec fltk jack2 libsndfile mesa
|
||||
minixml zlib
|
||||
alsaLib boost boost.lib cairo fftwSinglePrec fltk jack2 libsndfile mesa
|
||||
minixml zlib xorg.libpthreadstubs
|
||||
];
|
||||
|
||||
nativeBuildInputs = [ cmake pkgconfig ];
|
||||
|
183
pkgs/applications/display-managers/slim/themes.nix
Normal file
183
pkgs/applications/display-managers/slim/themes.nix
Normal 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";
|
||||
};
|
||||
};
|
||||
}
|
@ -1,6 +1,6 @@
|
||||
{ stdenv, fetchurl, buildEnv, makeDesktopItem, makeWrapper, zlib, glib, alsaLib
|
||||
, 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
|
||||
@ -10,52 +10,35 @@ let
|
||||
stdenv.gcc.gcc zlib glib dbus gtk atk pango freetype libgnome_keyring3
|
||||
fontconfig gdk_pixbuf cairo cups expat libgpgerror alsaLib nspr gconf nss
|
||||
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 {
|
||||
name = "atom-${version}";
|
||||
version = "0.99.0";
|
||||
version = "0.135.0";
|
||||
|
||||
src = fetchurl {
|
||||
url = https://github.com/hotice/webupd8/raw/master/atom-linux64-0.99.0~git20140525.tar.xz;
|
||||
sha256 = "55c2415c96e1182ae1517751cbea1db64e9962683b384cfe5e182aec10aebecd";
|
||||
name = "${name}.tar.xz";
|
||||
};
|
||||
|
||||
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";
|
||||
url = "https://github.com/atom/atom/releases/download/v${version}/atom-amd64.deb";
|
||||
sha256 = "0dh8vjhr31y2ibnf4s7adskbx115w8ns9xgrb0md9xc9gm92h405";
|
||||
name = "${name}.deb";
|
||||
};
|
||||
|
||||
buildInputs = [ atomEnv makeWrapper ];
|
||||
|
||||
phases = [ "installPhase" ];
|
||||
phases = [ "installPhase" "fixupPhase" ];
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/share/atom
|
||||
mkdir -p $out/bin
|
||||
tar -C $out/share/atom -xvf $src
|
||||
mkdir -p $out
|
||||
ar p $src data.tar.gz | tar -C $out -xz ./usr
|
||||
mv $out/usr/* $out/
|
||||
rm -r $out/usr/
|
||||
patchelf --set-interpreter "$(cat $NIX_GCC/nix-support/dynamic-linker)" \
|
||||
$out/share/atom/atom
|
||||
patchelf --set-interpreter "$(cat $NIX_GCC/nix-support/dynamic-linker)" \
|
||||
$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"
|
||||
|
||||
# Create a desktop item.
|
||||
mkdir -p "$out/share/applications"
|
||||
cp "${desktopItem}"/share/applications/* "$out/share/applications/"
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
|
47
pkgs/applications/editors/emacs-modes/cask/default.nix
Normal file
47
pkgs/applications/editors/emacs-modes/cask/default.nix
Normal 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 ];
|
||||
};
|
||||
}
|
@ -2,11 +2,11 @@
|
||||
, texLiveAggregationFun }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "org-8.2.7c";
|
||||
name = "org-8.2.8";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://orgmode.org/${name}.tar.gz";
|
||||
sha256 = "0qqf58xqw1kkgjxm9z40s6h7xd209rx3933klla22lryv3yclc1k";
|
||||
sha256 = "0f63w6d1yjiv46ac7d9rqn2wks6sxmldrqmijd9j25qvsc8dcsd8";
|
||||
};
|
||||
|
||||
buildInputs = [ emacs ];
|
||||
|
@ -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 {
|
||||
name = "ProofGeneral-4.3pre131011";
|
||||
@ -10,7 +10,7 @@ stdenv.mkDerivation (rec {
|
||||
|
||||
sourceRoot = name;
|
||||
|
||||
buildInputs = [ emacs texinfo texLive perl which ];
|
||||
buildInputs = [ emacs texinfo perl which ] ++ stdenv.lib.optional enableDoc texLive;
|
||||
|
||||
prePatch =
|
||||
'' sed -i "Makefile" \
|
||||
@ -25,15 +25,20 @@ stdenv.mkDerivation (rec {
|
||||
sed -i '96d' doc/ProofGeneral.texi
|
||||
'';
|
||||
|
||||
patches = [ ./pg.patch ];
|
||||
|
||||
preBuild = ''
|
||||
make clean;
|
||||
'';
|
||||
|
||||
installPhase =
|
||||
if enableDoc
|
||||
then
|
||||
# Copy `texinfo.tex' in the right place so that `texi2pdf' works.
|
||||
'' cp -v "${automake}/share/"automake-*/texinfo.tex doc
|
||||
make install install-doc
|
||||
'';
|
||||
''
|
||||
else "make install";
|
||||
|
||||
meta = {
|
||||
description = "Proof General, an Emacs front-end for proof assistants";
|
||||
|
16
pkgs/applications/editors/emacs-modes/proofgeneral/pg.patch
Normal file
16
pkgs/applications/editors/emacs-modes/proofgeneral/pg.patch
Normal 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."
|
@ -1,13 +1,13 @@
|
||||
{stdenv, fetchurl, emacs}:
|
||||
|
||||
let version = "1.3.8";
|
||||
let version = "1.3.12";
|
||||
|
||||
in stdenv.mkDerivation {
|
||||
name = "emacs-rainbow-delimiters-${version}";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://github.com/jlr/rainbow-delimiters/archive/${version}.tar.gz";
|
||||
sha256 = "1xavygdnd9q80wqavxliks0w662mvn8v79qmg0kr494yfqc5hw6h";
|
||||
sha256 = "0l65rqmnrc02q1b406kxc29w5cfpmrmq0glv493pjzhzc5m3r63z";
|
||||
};
|
||||
|
||||
buildInputs = [ emacs ];
|
||||
|
@ -2,8 +2,8 @@
|
||||
|
||||
cabal.mkDerivation (self: {
|
||||
pname = "structured-haskell-mode";
|
||||
version = "1.0.3";
|
||||
sha256 = "0axmw8bj51q8v0wd4jp6giw9dnv0mp7kp8yd16s4nm4hcqgrh5h2";
|
||||
version = "1.0.4";
|
||||
sha256 = "1402wx27py7292ad7whsb13ywv71k36501jpfrn2p0v7knzknj8z";
|
||||
isLibrary = false;
|
||||
isExecutable = true;
|
||||
buildDepends = [ haskellSrcExts haskellMode ];
|
||||
|
@ -3,13 +3,13 @@
|
||||
# this package installs the emacs-mode which
|
||||
# resides in the ocaml compiler sources.
|
||||
|
||||
let version = "2.0.6";
|
||||
let version = "2.0.8";
|
||||
|
||||
in stdenv.mkDerivation {
|
||||
name = "tuareg-mode-${version}";
|
||||
src = fetchurl {
|
||||
url = https://forge.ocamlcore.org/frs/download.php/882/tuareg-2.0.6.tar.gz;
|
||||
sha256 = "ea79ac24623b82ab8047345f8504abca557a537e639d16ce1ac3e5b27f5b1189";
|
||||
url = https://forge.ocamlcore.org/frs/download.php/882/tuareg-2.0.8.tar.bz2;
|
||||
sha256 = "128ibdzv5rf33b71d7b3gr9plmfamc28aprl8y0ap0ivc8jaqyga";
|
||||
};
|
||||
|
||||
buildInputs = [ emacs ];
|
||||
|
@ -1,11 +1,11 @@
|
||||
{stdenv, fetchurl, fltk13, ghostscript}:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "flpsed-0.7.1";
|
||||
name = "flpsed-0.7.2";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://www.ecademix.com/JohannesHofmann/flpsed-0.7.1.tar.gz";
|
||||
sha256 = "16i3mjc1cdx2wiwfhnv3z2ywmjma9785vwl3l31izx9l51w7ngj3";
|
||||
url = "http://www.ecademix.com/JohannesHofmann/flpsed-0.7.2.tar.gz";
|
||||
sha256 = "1132nlganr6x4f4lzcp9l0xihg2ky1l7xk8vq7r2l2qxs97vbif8";
|
||||
};
|
||||
|
||||
buildInputs = [ fltk13 ghostscript ];
|
||||
@ -15,5 +15,6 @@ stdenv.mkDerivation {
|
||||
homepage = "http://http://flpsed.org/flpsed.html";
|
||||
license = stdenv.lib.licenses.gpl3;
|
||||
platforms = stdenv.lib.platforms.mesaPlatforms;
|
||||
maintainers = with stdenv.lib.maintainers; [ fuuzetsu ];
|
||||
};
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
{ stdenv, fetchurl, gtk2, which, pkgconfig, intltool }:
|
||||
{ stdenv, fetchurl, gtk2, which, pkgconfig, intltool, file }:
|
||||
|
||||
let
|
||||
version = "1.23.1";
|
||||
version = "1.24.1";
|
||||
in
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
@ -9,15 +9,17 @@ stdenv.mkDerivation rec {
|
||||
|
||||
src = fetchurl {
|
||||
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;
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
patchPhase = "patchShebangs .";
|
||||
|
||||
# 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
|
||||
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
Loading…
Reference in New Issue
Block a user