Merge remote-tracking branch 'upstream/master'

This commit is contained in:
Brian Cohen 2014-08-15 20:59:55 -04:00
commit c6768ca498
1503 changed files with 18882 additions and 6438 deletions

2
.gitignore vendored
View File

@ -9,3 +9,5 @@ result-*
/doc/manual.html /doc/manual.html
/doc/manual.pdf /doc/manual.pdf
.version-suffix .version-suffix
.DS_Store

View File

@ -121,10 +121,11 @@ interpretation:</para>
<varlistentry> <varlistentry>
<term><varname>license</varname></term> <term><varname>license</varname></term>
<listitem><para>The license for the package. One from attribute set defined in <listitem><para>The license for the package. One from attribute set defined in
<link xlink:href="https://github.com/NixOS/nixpkgs/blob/master/pkgs/lib/licenses.nix"> <link xlink:href="https://github.com/NixOS/nixpkgs/blob/master/lib/licenses.nix">
<filename>nixpkgs/lib/licenses.nix</filename></link>. <filename>nixpkgs/lib/licenses.nix</filename></link>.
Example: Example:
<literal>stdenv.lib.licenses.gpl3</literal>.</para></listitem> <literal>stdenv.lib.licenses.gpl3</literal>.</para></listitem>
See details in <xref linkend='sec-meta-license'/>,
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
@ -133,7 +134,7 @@ interpretation:</para>
maintainers of this Nix expression. If maintainers of this Nix expression. If
you would like to be a maintainer of a package, you may want to add you would like to be a maintainer of a package, you may want to add
yourself to <link yourself to <link
xlink:href="https://github.com/NixOS/nixpkgs/blob/master/pkgs/lib/maintainers.nix"><filename>nixpkgs/lib/maintainers.nix</filename></link> xlink:href="https://github.com/NixOS/nixpkgs/blob/master/lib/maintainers.nix"><filename>nixpkgs/lib/maintainers.nix</filename></link>
and write something like <literal>[ stdenv.lib.maintainers.alice and write something like <literal>[ stdenv.lib.maintainers.alice
stdenv.lib.maintainers.bob ]</literal>.</para></listitem> stdenv.lib.maintainers.bob ]</literal>.</para></listitem>
</varlistentry> </varlistentry>
@ -160,7 +161,7 @@ meta.platforms = stdenv.lib.platforms.linux;
</programlisting> </programlisting>
Attribute Set <varname>stdenv.lib.platforms</varname> in Attribute Set <varname>stdenv.lib.platforms</varname> in
<link xlink:href="https://github.com/NixOS/nixpkgs/blob/master/pkgs/lib/platforms.nix"> <link xlink:href="https://github.com/NixOS/nixpkgs/blob/master/lib/platforms.nix">
<filename>nixpkgs/lib/platforms.nix</filename></link> defines various common <filename>nixpkgs/lib/platforms.nix</filename></link> defines various common
lists of platforms types. lists of platforms types.
</para></listitem> </para></listitem>
@ -202,9 +203,15 @@ meta.hydraPlatforms = [];
<section xml:id="sec-meta-license"><title>Licenses</title> <section xml:id="sec-meta-license"><title>Licenses</title>
<para>The <varname>meta.license</varname> attribute could be one of the <para>The <varname>meta.license</varname> attribute should preferrably contain
following: a value from <varname>stdenv.lib.licenses</varname> defined in
<link xlink:href="https://github.com/NixOS/nixpkgs/blob/master/lib/licenses.nix">
<filename>nixpkgs/lib/licenses.nix</filename></link>,
or in-place license description of the same format if the license is
unlikely to be useful in another expression.
A few generic options are available, although it's typically better
to indicate the specific license:
<variablelist> <variablelist>
<varlistentry> <varlistentry>

View File

@ -1,25 +1,24 @@
{ let
/* License identifiers loosely based on: http://fedoraproject.org/wiki/Licensing spdx = lic: lic // {
url = "http://spdx.org/licenses/${lic.shortName}";
};
in
rec {
/* License identifiers from spdx.org where possible.
* If you cannot find your license here, then look for a similar license or * If you cannot find your license here, then look for a similar license or
* add it to this list. The URL mentioned above is a good source for inspiration. * add it to this list. The URL mentioned above is a good source for inspiration.
*/ */
artistic2 = { agpl3 = spdx {
shortName = "Artistic 2.0"; shortName = "AGPL-3.0";
fullName = "Artistic 2.0"; fullName = "GNU Affero General Public License v3.0";
url = "http://opensource.org/licenses/artistic-license-2.0.php";
};
agpl3 = {
shortName = "AGPLv3";
fullName = "GNU Affero General Public License version 3 only";
url = https://www.gnu.org/licenses/agpl.html;
}; };
agpl3Plus = { agpl3Plus = {
shortName = "AGPLv3+"; shortName = "AGPL-3.0+";
fullName = "GNU Affero General Public License version 3 or later"; fullName = "GNU Affero General Public License v3.0 or later";
url = https://www.gnu.org/licenses/agpl.html; inherit (agpl3) url;
}; };
amd = { amd = {
@ -28,126 +27,149 @@
url = http://developer.amd.com/amd-license-agreement/; url = http://developer.amd.com/amd-license-agreement/;
};# };#
apsl20 = { apsl20 = spdx {
shortName = "APSL 2.0"; shortName = "APSL-2.0";
fullName = "Apple Public Source License 2.0"; fullName = "Apple Public Source License 2.0";
url = http://opensource.org/licenses/APSL-2.0;
}; };
asl20 = { artistic2 = spdx {
shortName = "ASL2.0"; shortName = "Artistic-2.0";
fullName = "Apache Software License 2.0"; fullName = "Artistic License 2.0";
url = http://www.apache.org/licenses/LICENSE-2.0;
}; };
boost = { asl20 = spdx {
shortName = "boost"; shortName = "Apache-2.0";
fullName = "Boost Software License"; fullName = "Apache License 2.0";
url = http://www.boost.org/LICENSE_1_0.txt;
}; };
bsd2 = { boost = spdx {
shortName = "BSD-2"; shortName = "BSL-1.0";
fullName = "BSD license (2 clause)"; fullName = "Boost Software License 1.0";
url = http://opensource.org/licenses/BSD-2-Clause;
}; };
bsd3 = { bsd2 = spdx {
shortName = "BSD-3"; shortName = "BSD-2-Clause";
fullName = "BSD license (3 clause)"; fullName = ''BSD 2-clause "Simplified" License'';
url = http://opensource.org/licenses/BSD-3-Clause;
}; };
bsdOriginal = { bsd3 = spdx {
shortName = "BSD-original"; shortName = "BSD-3-Clause";
fullName = "Original BSD license with advertising clause"; fullName = ''BSD 3-clause "New" or "Revised" License'';
url = https://fedoraproject.org/wiki/Licensing/BSD;
}; };
cc-by-30 = { bsdOriginal = spdx {
shortName = "CC BY 3.0"; shortName = "BSD-4-Clause";
fullName = ''BSD 4-clause "Original" or "Old" License'';
};
cc-by-30 = spdx {
shortName = "CC-BY-3.0";
fullName = "Creative Commons Attribution 3.0"; fullName = "Creative Commons Attribution 3.0";
url = http://creativecommons.org/licenses/by/3.0;
}; };
cddl = { cddl = spdx {
shortName = "CDDL"; shortName = "CDDL-1.0";
fullName = "Common Development Distribution License "; fullName = "Common Development and Distribution License 1.0";
url = http://www.opensolaris.org/os/licensing/cddllicense.txt;
}; };
cpl10 = { cecill-c = spdx {
shortName = "CPL 1.0"; shortName = "CECILL-C";
fullName = "Common Public License version 1.0"; fullName = "CeCILL-C Free Software License Agreement";
url = http://www.eclipse.org/legal/cpl-v10.html;
}; };
epl10 = { cpl10 = spdx {
shortName = "EPL 1.0"; shortName = "CPL-1.0";
fullName = "Eclipse Public License version 1.0"; fullName = "Common Public License 1.0";
url = http://www.eclipse.org/legal/epl-v10.html; };
epl10 = spdx {
shortName = "EPL-1.0";
fullName = "Eclipse Public License 1.0";
}; };
free = "free"; free = "free";
gpl2 = { gpl2 = spdx {
shortName = "GPLv2"; shortName = "GPL-2.0";
fullName = "GNU General Public License version 2"; fullName = "GNU General Public License v2.0 only";
url = http://www.gnu.org/licenses/old-licenses/gpl-2.0.html;
}; };
gpl2Oss = { gpl2Oss = {
shortName = "GPLv2+OSS"; shortName = "GPL-2.0-with-OSS";
fullName = "GNU General Public License version 2 only (with OSI approved licenses linking exception)"; fullName = "GNU General Public License version 2 only (with OSI approved licenses linking exception)";
url = http://www.mysql.com/about/legal/licensing/foss-exception; url = http://www.mysql.com/about/legal/licensing/foss-exception;
}; };
gpl2Plus = { gpl2Plus = spdx {
shortName = "GPLv2+"; shortName = "GPL-2.0+";
fullName = "GNU General Public License version 2 or later"; fullName = "GNU General Public License v2.0 or later";
url = http://www.gnu.org/licenses/old-licenses/gpl-2.0.html;
}; };
gpl3 = { gpl3 = spdx {
shortName = "GPLv3"; shortName = "GPL-3.0";
fullName = "GNU General Public License version 3 only"; fullName = "GNU General Public License v3.0 only";
url = http://www.fsf.org/licensing/licenses/gpl.html;
}; };
gpl3Plus = { gpl3Plus = spdx {
shortName = "GPLv3+"; shortName = "GPL-3.0+";
fullName = "GNU General Public License version 3 or later"; fullName = "GNU General Public License v3.0 or later";
url = http://www.fsf.org/licensing/licenses/gpl.html;
}; };
gpl3ClasspathPlus = { gpl3ClasspathPlus = {
shortName = "GPLv3+classpath+"; shortName = "GPL-3.0+-with-classpath-exception";
fullName = "GNU General Public License version 3 or later (with Classpath exception)"; fullName = "GNU General Public License v3.0 or later (with Classpath exception)";
url = https://fedoraproject.org/wiki/Licensing/GPL_Classpath_Exception; url = https://fedoraproject.org/wiki/Licensing/GPL_Classpath_Exception;
}; };
isc = { inria = {
shortName = "INRIA-NCLA";
fullName = "INRIA Non-Commercial License Agreement";
url = "http://compcert.inria.fr/doc/LICENSE";
};
ipa = spdx {
shortName = "IPA";
fullName = "IPA Font License";
};
ipl10 = spdx {
shortName = "IPL-1.0";
fullName = "IBM Public License v1.0";
};
isc = spdx {
shortName = "ISC"; shortName = "ISC";
fullName = "Internet Systems Consortium License"; fullName = "ISC License";
url = http://www.opensource.org/licenses/ISC;
}; };
ipa = { lgpl2 = spdx {
shortName = "IPA 1.0"; shortName = "LGPL-2.0";
fullName = "IPA Font License v1.0"; fullName = "GNU Library General Public License v2 only";
url = http://ipafont.ipa.go.jp/ipafont/;
}; };
ipl10 = { lgpl2Plus = spdx {
shortName = "IPL 1.0"; shortName = "LGPL-2.0+";
fullName = "IBM Public License Version 1.0"; fullName = "GNU Library General Public License v2 or later";
url = http://www.ibm.com/developerworks/opensource/library/os-i18n2/os-ipl.html;
}; };
ijg = { lgpl21 = spdx {
shortName = "IJG"; shortName = "LGPL-2.1";
fullName = "Independent JPEG Group License"; fullName = "GNU Library General Public License v2.1 only";
url = https://fedoraproject.org/wiki/Licensing/IJG; };
lgpl21Plus = spdx {
shortName = "LGPL-2.1+";
fullName = "GNU Library General Public License v2.1 or later";
};
lgpl3 = spdx {
shortName = "LGPL-3.0";
fullName = "GNU Lesser General Public License v3.0 only";
};
lgpl3Plus = spdx {
shortName = "LGPL-3.0+";
fullName = "GNU Lesser General Public License v3.0 or later";
}; };
libtiff = { libtiff = {
@ -156,76 +178,52 @@
url = https://fedoraproject.org/wiki/Licensing/libtiff; url = https://fedoraproject.org/wiki/Licensing/libtiff;
}; };
lgpl2 = {
shortName = "LGPLv2";
fullName = "GNU Library General Public License version 2";
url = http://www.gnu.org/licenses/old-licenses/lgpl-2.0.html;
};
lgpl2Plus = {
shortName = "LGPLv2+";
fullName = "GNU Library General Public License version 2 or later";
url = http://www.gnu.org/licenses/old-licenses/lgpl-2.0.html;
};
lgpl21 = {
shortName = "LGPLv2.1";
fullName = "GNU Lesser General Public License version 2.1";
url = http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html;
};
lgpl21Plus = {
shortName = "LGPLv2.1+";
fullName = "GNU Lesser General Public License version 2.1 or later";
url = http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html;
};
llgpl21 = { llgpl21 = {
shortName = "LLGPLv2.1"; shortName = "LLGPL-2.1";
fullName = "Lisp LGPL; GNU Lesser General Public License version 2.1 with Franz Inc. preamble for clarification of LGPL terms in context of Lisp"; fullName = "Lisp LGPL; GNU Lesser General Public License version 2.1 with Franz Inc. preamble for clarification of LGPL terms in context of Lisp";
url = http://opensource.franz.com/preamble.html; url = http://opensource.franz.com/preamble.html;
}; };
lgpl3 = { lpl-102 = spdx {
shortName = "LGPLv3"; shortName = "LPL-1.02";
fullName = "GNU Lesser General Public License version 3 only"; fullName = "Lucent Public License v1.02";
url = http://www.fsf.org/licensing/licenses/lgpl.html;
}; };
lgpl3Plus = { mit = spdx {
shortName = "LGPLv3+";
fullName = "GNU Lesser General Public License version 3 or later";
url = http://www.fsf.org/licensing/licenses/lgpl.html;
};
mit = {
shortName = "MIT"; shortName = "MIT";
fullName = "MIT/X11 license"; fullName = "MIT License";
url = http://www.opensource.org/licenses/mit-license.php;
}; };
mpl11 = { mpl11 = spdx {
shortName = "MPL1.1"; shortName = "MPL-1.1";
fullName = "Mozilla Public License version 1.1"; fullName = "Mozilla Public License 1.1";
url = http://www.mozilla.org/MPL/MPL-1.1.html;
}; };
mpl20 = { mpl20 = spdx {
shortName = "MPL2.0"; shortName = "MPL-2.0";
fullName = "Mozilla Public License version 2.0"; fullName = "Mozilla Public License 2.0";
url = https://www.mozilla.org/MPL/2.0;
}; };
ofl = { msrla = {
shortName = "OFL"; shortName = "MSR-LA";
fullName = "SIL Open Font License"; fullName = "Microsoft Research License Agreement";
url = "http://scripts.sil.org/cms/scripts/page.php?site_id=nrsi&id=OFL_web"; url = "http://research.microsoft.com/en-us/projects/pex/msr-la.txt";
}; };
openssl = { ofl = spdx {
shortName = "openssl"; shortName = "OFL-1.1";
fullName = "OpenSSL license"; fullName = "SIL Open Font License 1.1";
url = http://www.openssl.org/source/license.html; };
openssl = spdx {
shortName = "OpenSSL";
fullName = "OpenSSL License";
};
psfl = spdx {
shortName = "Python-2.0";
fullName = "Python Software Foundation License version 2";
#url = http://docs.python.org/license.html;
}; };
publicDomain = { publicDomain = {
@ -233,10 +231,9 @@
fullname = "Public Domain"; fullname = "Public Domain";
}; };
psfl = { sleepycat = spdx {
shortName = "PSFL"; shortName = "Sleepycat";
fullName = "Python Software Foundation License"; fullName = "Sleepycat License";
url = http://docs.python.org/license.html;
}; };
tcltk = { tcltk = {
@ -257,45 +254,20 @@
url = https://fedoraproject.org/wiki/Licensing:Wadalab?rd=Licensing/Wadalab; url = https://fedoraproject.org/wiki/Licensing:Wadalab?rd=Licensing/Wadalab;
}; };
zlib = { zlib = spdx {
shortName = "zlib"; shortName = "Zlib";
fullName = "zlib license"; fullName = "zlib License";
url = http://www.gzip.org/zlib/zlib_license.html;
}; };
zpt20 = { zpt20 = spdx { # FIXME: why zpt* instead of zpl*
shortName = "ZPT2.0"; shortName = "ZPL-2.0";
fullName = "Zope Public License 2.0"; fullName = "Zope Public License 2.0";
url = "http://old.zope.org/Resources/License/ZPL-2.0";
}; };
zpt21 = { zpt21 = spdx {
shortName = "ZPT2.1"; shortName = "ZPL-2.1";
fullName = "Zope Public License 2.1"; fullName = "Zope Public License 2.1";
url = "http://old.zope.org/Resources/License/ZPL-2.1";
}; };
sleepycat = {
shortName = "Sleepycat";
fullName = "Sleepycat Public License";
url = "https://en.wikipedia.org/wiki/Sleepycat_License";
};
cecill-c = {
shortName = "CeCILL-C";
fullName = "CEA CNRS INRIA Logiciel Libre";
url = "http://www.cecill.info/licences.en.html";
};
msrla = {
shortName = "MSR-LA";
fullName = "Microsoft Research License Agreement";
url = "http://research.microsoft.com/en-us/projects/pex/msr-la.txt";
};
inria = {
shortName = "INRIA-NCLA";
fullName = "INRIA Non-Commercial License Agreement";
url = "http://compcert.inria.fr/doc/LICENSE";
};
} }

View File

@ -33,6 +33,7 @@
coconnor = "Corey O'Connor <coreyoconnor@gmail.com>"; coconnor = "Corey O'Connor <coreyoconnor@gmail.com>";
coroa = "Jonas Hörsch <jonas@chaoflow.net>"; coroa = "Jonas Hörsch <jonas@chaoflow.net>";
cstrahan = "Charles Strahan <charles.c.strahan@gmail.com>"; cstrahan = "Charles Strahan <charles.c.strahan@gmail.com>";
DamienCassou = "Damien Cassou <damien.cassou@gmail.com>";
ederoyd46 = "Matthew Brown <matt@ederoyd.co.uk>"; ederoyd46 = "Matthew Brown <matt@ederoyd.co.uk>";
edwtjo = "Edward Tjörnhammar <ed@cflags.cc>"; edwtjo = "Edward Tjörnhammar <ed@cflags.cc>";
eelco = "Eelco Dolstra <eelco.dolstra@logicblox.com>"; eelco = "Eelco Dolstra <eelco.dolstra@logicblox.com>";
@ -45,6 +46,7 @@
goibhniu = "Cillian de Róiste <cillian.deroiste@gmail.com>"; goibhniu = "Cillian de Róiste <cillian.deroiste@gmail.com>";
guibert = "David Guibert <david.guibert@gmail.com>"; guibert = "David Guibert <david.guibert@gmail.com>";
hinton = "Tom Hinton <t@larkery.com>"; hinton = "Tom Hinton <t@larkery.com>";
hrdinka = "Christoph Hrdinka <c.nix@hrdinka.at>";
ianwookim = "Ian-Woo Kim <ianwookim@gmail.com>"; ianwookim = "Ian-Woo Kim <ianwookim@gmail.com>";
iElectric = "Domen Kozar <domen@dev.si>"; iElectric = "Domen Kozar <domen@dev.si>";
iyzsong = "Song Wenwu <iyzsong@gmail.com>"; iyzsong = "Song Wenwu <iyzsong@gmail.com>";
@ -62,6 +64,7 @@
madjar = "Georges Dubus <georges.dubus@compiletoi.net>"; madjar = "Georges Dubus <georges.dubus@compiletoi.net>";
marcweber = "Marc Weber <marco-oweber@gmx.de>"; marcweber = "Marc Weber <marco-oweber@gmx.de>";
matejc = "Matej Cotman <cotman.matej@gmail.com>"; matejc = "Matej Cotman <cotman.matej@gmail.com>";
meisternu = "Matt Miemiec <meister@krutt.org>";
modulistic = "Pablo Costa <modulistic@gmail.com>"; modulistic = "Pablo Costa <modulistic@gmail.com>";
mornfall = "Petr Ročkai <me@mornfall.net>"; mornfall = "Petr Ročkai <me@mornfall.net>";
msackman = "Matthew Sackman <matthew@wellquite.org>"; msackman = "Matthew Sackman <matthew@wellquite.org>";
@ -109,6 +112,7 @@
winden = "Antonio Vargas Gonzalez <windenntw@gmail.com>"; winden = "Antonio Vargas Gonzalez <windenntw@gmail.com>";
wizeman = "Ricardo M. Correia <rcorreia@wizy.org>"; wizeman = "Ricardo M. Correia <rcorreia@wizy.org>";
wjlroe = "William Roe <willroe@gmail.com>"; wjlroe = "William Roe <willroe@gmail.com>";
wkennington = "William A. Kennington III <william@wkennington.com>";
wmertens = "Wout Mertens <Wout.Mertens@gmail.com>"; wmertens = "Wout Mertens <Wout.Mertens@gmail.com>";
z77z = "Marco Maggesi <maggesi@math.unifi.it>"; z77z = "Marco Maggesi <maggesi@math.unifi.it>";
zef = "Zef Hemel <zef@zef.me>"; zef = "Zef Hemel <zef@zef.me>";

View File

@ -11,6 +11,6 @@ rec {
unix = linux ++ darwin ++ freebsd ++ openbsd; unix = linux ++ darwin ++ freebsd ++ openbsd;
all = linux ++ darwin ++ cygwin ++ freebsd ++ openbsd; all = linux ++ darwin ++ cygwin ++ freebsd ++ openbsd;
none = []; none = [];
allBut = platform: lists.filter (x: platform != x) all; allBut = platforms: lists.filter (x: !(builtins.elem x platforms)) all;
mesaPlatforms = ["i686-linux" "x86_64-linux" "x86_64-darwin" "armv5tel-linux" "armv6l-linux"]; mesaPlatforms = ["i686-linux" "x86_64-linux" "x86_64-darwin" "armv5tel-linux" "armv6l-linux"];
} }

View File

@ -1,5 +1,6 @@
{ pkgs, options, version, revision }: { pkgs, options, version, revision }:
with pkgs;
with pkgs.lib; with pkgs.lib;
let let
@ -22,7 +23,7 @@ let
optionsXML = builtins.toFile "options.xml" (builtins.unsafeDiscardStringContext (builtins.toXML options'')); optionsXML = builtins.toFile "options.xml" (builtins.unsafeDiscardStringContext (builtins.toXML options''));
optionsDocBook = pkgs.runCommand "options-db.xml" {} '' optionsDocBook = runCommand "options-db.xml" {} ''
if grep /nixpkgs/nixos/modules ${optionsXML}; then if grep /nixpkgs/nixos/modules ${optionsXML}; then
echo "The manual appears to depend on the location of Nixpkgs, which is bad" echo "The manual appears to depend on the location of Nixpkgs, which is bad"
echo "since this prevents sharing via the NixOS channel. This is typically" echo "since this prevents sharing via the NixOS channel. This is typically"
@ -30,7 +31,7 @@ let
echo "for hints about the offending path)." echo "for hints about the offending path)."
exit 1 exit 1
fi fi
${pkgs.libxslt}/bin/xsltproc \ ${libxslt}/bin/xsltproc \
--stringparam revision '${revision}' \ --stringparam revision '${revision}' \
-o $out ${./options-to-docbook.xsl} ${optionsXML} -o $out ${./options-to-docbook.xsl} ${optionsXML}
''; '';
@ -38,12 +39,12 @@ let
in rec { in rec {
# Generate the NixOS manual. # Generate the NixOS manual.
manual = pkgs.stdenv.mkDerivation { manual = stdenv.mkDerivation {
name = "nixos-manual"; name = "nixos-manual";
sources = sourceFilesBySuffices ./. [".xml"]; sources = sourceFilesBySuffices ./. [".xml"];
buildInputs = [ pkgs.libxml2 pkgs.libxslt ]; buildInputs = [ libxml2 libxslt ];
xsltFlags = '' xsltFlags = ''
--param section.autolabel 1 --param section.autolabel 1
@ -62,19 +63,19 @@ in rec {
# Check the validity of the manual sources. # Check the validity of the manual sources.
xmllint --noout --nonet --xinclude --noxincludenode \ xmllint --noout --nonet --xinclude --noxincludenode \
--relaxng ${pkgs.docbook5}/xml/rng/docbook/docbook.rng \ --relaxng ${docbook5}/xml/rng/docbook/docbook.rng \
manual.xml manual.xml
# Generate the HTML manual. # Generate the HTML manual.
dst=$out/share/doc/nixos dst=$out/share/doc/nixos
ensureDir $dst mkdir -p $dst
xsltproc $xsltFlags --nonet --xinclude \ xsltproc $xsltFlags --nonet --xinclude \
--output $dst/manual.html \ --output $dst/manual.html \
${pkgs.docbook5_xsl}/xml/xsl/docbook/xhtml/docbook.xsl \ ${docbook5_xsl}/xml/xsl/docbook/xhtml/docbook.xsl \
./manual.xml ./manual.xml
mkdir -p $dst/images/callouts mkdir -p $dst/images/callouts
cp ${pkgs.docbook5_xsl}/xml/xsl/docbook/images/callouts/*.gif $dst/images/callouts/ cp ${docbook5_xsl}/xml/xsl/docbook/images/callouts/*.gif $dst/images/callouts/
cp ${./style.css} $dst/style.css cp ${./style.css} $dst/style.css
@ -86,13 +87,39 @@ in rec {
meta.description = "The NixOS manual in HTML format"; meta.description = "The NixOS manual in HTML format";
}; };
manualPDF = stdenv.mkDerivation {
name = "nixos-manual-pdf";
sources = sourceFilesBySuffices ./. [".xml"];
buildInputs = [ libxml2 libxslt dblatex tetex ];
buildCommand = ''
# TeX needs a writable font cache.
export VARTEXFONTS=$TMPDIR/texfonts
ln -s $sources/*.xml . # */
ln -s ${optionsDocBook} options-db.xml
echo "${version}" > version
dst=$out/share/doc/nixos
mkdir -p $dst
xmllint --xinclude manual.xml | dblatex -o $dst/manual.pdf - \
-P doc.collab.show=0 \
-P latex.output.revhistory=0
mkdir -p $out/nix-support
echo "doc-pdf manual $dst/manual.pdf" >> $out/nix-support/hydra-build-products
''; # */
};
# Generate the NixOS manpages. # Generate the NixOS manpages.
manpages = pkgs.stdenv.mkDerivation { manpages = stdenv.mkDerivation {
name = "nixos-manpages"; name = "nixos-manpages";
sources = sourceFilesBySuffices ./. [".xml"]; sources = sourceFilesBySuffices ./. [".xml"];
buildInputs = [ pkgs.libxml2 pkgs.libxslt ]; buildInputs = [ libxml2 libxslt ];
buildCommand = '' buildCommand = ''
ln -s $sources/*.xml . # */ ln -s $sources/*.xml . # */
@ -100,7 +127,7 @@ in rec {
# Check the validity of the manual sources. # Check the validity of the manual sources.
xmllint --noout --nonet --xinclude --noxincludenode \ xmllint --noout --nonet --xinclude --noxincludenode \
--relaxng ${pkgs.docbook5}/xml/rng/docbook/docbook.rng \ --relaxng ${docbook5}/xml/rng/docbook/docbook.rng \
./man-pages.xml ./man-pages.xml
# Generate manpages. # Generate manpages.
@ -109,7 +136,7 @@ in rec {
--param man.output.in.separate.dir 1 \ --param man.output.in.separate.dir 1 \
--param man.output.base.dir "'$out/share/man/'" \ --param man.output.base.dir "'$out/share/man/'" \
--param man.endnotes.are.numbered 0 \ --param man.endnotes.are.numbered 0 \
${pkgs.docbook5_xsl}/xml/xsl/docbook/manpages/docbook.xsl \ ${docbook5_xsl}/xml/xsl/docbook/manpages/docbook.xsl \
./man-pages.xml ./man-pages.xml
''; '';
}; };

View File

@ -7,25 +7,6 @@
<title>NixOS Manual</title> <title>NixOS Manual</title>
<subtitle>Version <xi:include href="version" parse="text" /></subtitle> <subtitle>Version <xi:include href="version" parse="text" /></subtitle>
<author>
<personname>
<firstname>Eelco</firstname>
<surname>Dolstra</surname>
</personname>
</author>
<author>
<personname>
<firstname>Nicolas</firstname>
<surname>Pierron</surname>
</personname>
</author>
<copyright>
<year>2007-2013</year>
<holder>Eelco Dolstra</holder>
</copyright>
</info> </info>

View File

@ -202,4 +202,10 @@
</simplelist> </simplelist>
</xsl:template> </xsl:template>
<xsl:template match="function">
<xsl:text>λ</xsl:text>
</xsl:template>
</xsl:stylesheet> </xsl:stylesheet>

View File

@ -78,7 +78,7 @@ done
cat pathlist | sed -e 's/=\(.*\)=\(.*\)=/\\=\1=\2\\=/' | tee pathlist.safer cat pathlist | sed -e 's/=\(.*\)=\(.*\)=/\\=\1=\2\\=/' | tee pathlist.safer
ensureDir $out/iso mkdir -p $out/iso
genCommand="genisoimage -iso-level 4 -r -J $bootFlags -hide-rr-moved -graft-points -path-list pathlist.safer ${volumeID:+-V $volumeID}" genCommand="genisoimage -iso-level 4 -r -J $bootFlags -hide-rr-moved -graft-points -path-list pathlist.safer ${volumeID:+-V $volumeID}"
if test -z "$compressImage"; then if test -z "$compressImage"; then
$genCommand -o $out/iso/$isoName $genCommand -o $out/iso/$isoName
@ -87,5 +87,5 @@ else
fi fi
ensureDir $out/nix-support mkdir -p $out/nix-support
echo $system > $out/nix-support/system echo $system > $out/nix-support/system

View File

@ -48,11 +48,11 @@ for ((n = 0; n < ${#objects[*]}; n++)); do
fi fi
done done
ensureDir $out/tarball mkdir -p $out/tarball
tar cvJf $out/tarball/$fileName.tar.xz * tar cvJf $out/tarball/$fileName.tar.xz *
ensureDir $out/nix-support mkdir -p $out/nix-support
echo $system > $out/nix-support/system echo $system > $out/nix-support/system
echo "file system-tarball $out/tarball/$fileName.tar.xz" > $out/nix-support/hydra-build-products echo "file system-tarball $out/tarball/$fileName.tar.xz" > $out/nix-support/hydra-build-products

View File

@ -217,9 +217,7 @@ in
systemd.services = mkIf cfg.daemon.enable { systemd.services = mkIf cfg.daemon.enable {
nslcd = { nslcd = {
wantedBy = [ "nss-user-lookup.target" ]; wantedBy = [ "multi-user.target" ];
before = [ "nss-user-lookup.target" ];
after = [ "network.target" ];
preStart = '' preStart = ''
mkdir -p /run/nslcd mkdir -p /run/nslcd

View File

@ -80,12 +80,12 @@ in {
package = mkOption { package = mkOption {
type = types.package; type = types.package;
default = pulseaudio; default = pulseaudioFull;
example = literalExample "pulseaudio.override { jackaudioSupport = true; }"; example = literalExample "pulseaudioFull";
description = '' description = ''
The PulseAudio derivation to use. This can be used to enable The PulseAudio derivation to use. This can be used to disable
features (such as JACK support) that are not enabled in the features (such as JACK support, Bluetooth) that are enabled in the
default PulseAudio in Nixpkgs. pulseaudioFull package in Nixpkgs.
''; '';
}; };

View File

@ -225,7 +225,10 @@ fi
# If we're not just building, then make the new configuration the boot # If we're not just building, then make the new configuration the boot
# default and/or activate it now. # default and/or activate it now.
if [ "$action" = switch -o "$action" = boot -o "$action" = test ]; then if [ "$action" = switch -o "$action" = boot -o "$action" = test ]; then
$pathToConfig/bin/switch-to-configuration "$action" if ! $pathToConfig/bin/switch-to-configuration "$action"; then
echo "warning: there were error switching to the new configuration" >&2
exit 1
fi
fi fi

View File

@ -138,6 +138,9 @@
znc = 128; znc = 128;
polipo = 129; polipo = 129;
mopidy = 130; mopidy = 130;
unifi = 131;
gdm = 132;
dhcpd = 133;
# When adding a uid, make sure it doesn't match an existing gid. And don't use uids above 399! # When adding a uid, make sure it doesn't match an existing gid. And don't use uids above 399!
@ -251,6 +254,8 @@
polipo = 129; polipo = 129;
mopidy = 130; mopidy = 130;
docker = 131; docker = 131;
gdm = 132;
tss = 133;
# When adding a gid, make sure it doesn't match an existing uid. And don't use gids above 399! # When adding a gid, make sure it doesn't match an existing uid. And don't use gids above 399!

View File

@ -50,8 +50,10 @@
./programs/bash/bash.nix ./programs/bash/bash.nix
./programs/bash/command-not-found.nix ./programs/bash/command-not-found.nix
./programs/blcr.nix ./programs/blcr.nix
./programs/dconf.nix
./programs/environment.nix ./programs/environment.nix
./programs/info.nix ./programs/info.nix
./programs/nano.nix
./programs/screen.nix ./programs/screen.nix
./programs/shadow.nix ./programs/shadow.nix
./programs/shell.nix ./programs/shell.nix
@ -125,6 +127,7 @@
./services/hardware/pcscd.nix ./services/hardware/pcscd.nix
./services/hardware/pommed.nix ./services/hardware/pommed.nix
./services/hardware/sane.nix ./services/hardware/sane.nix
./services/hardware/tcsd.nix
./services/hardware/thinkfan.nix ./services/hardware/thinkfan.nix
./services/hardware/udev.nix ./services/hardware/udev.nix
./services/hardware/udisks2.nix ./services/hardware/udisks2.nix
@ -135,6 +138,7 @@
./services/logging/logstash.nix ./services/logging/logstash.nix
./services/logging/rsyslogd.nix ./services/logging/rsyslogd.nix
./services/logging/syslogd.nix ./services/logging/syslogd.nix
./services/logging/syslog-ng.nix
./services/mail/dovecot.nix ./services/mail/dovecot.nix
./services/mail/freepops.nix ./services/mail/freepops.nix
./services/mail/mail.nix ./services/mail/mail.nix
@ -233,6 +237,7 @@
./services/networking/teamspeak3.nix ./services/networking/teamspeak3.nix
./services/networking/tftpd.nix ./services/networking/tftpd.nix
./services/networking/unbound.nix ./services/networking/unbound.nix
./services/networking/unifi.nix
./services/networking/vsftpd.nix ./services/networking/vsftpd.nix
./services/networking/wakeonlan.nix ./services/networking/wakeonlan.nix
./services/networking/websockify.nix ./services/networking/websockify.nix
@ -277,6 +282,7 @@
./services/x11/desktop-managers/default.nix ./services/x11/desktop-managers/default.nix
./services/x11/display-managers/auto.nix ./services/x11/display-managers/auto.nix
./services/x11/display-managers/default.nix ./services/x11/display-managers/default.nix
./services/x11/display-managers/gdm.nix
./services/x11/display-managers/kdm.nix ./services/x11/display-managers/kdm.nix
./services/x11/display-managers/lightdm.nix ./services/x11/display-managers/lightdm.nix
./services/x11/display-managers/slim.nix ./services/x11/display-managers/slim.nix
@ -288,6 +294,7 @@
#./services/x11/window-managers/compiz.nix #./services/x11/window-managers/compiz.nix
./services/x11/window-managers/default.nix ./services/x11/window-managers/default.nix
./services/x11/window-managers/icewm.nix ./services/x11/window-managers/icewm.nix
./services/x11/window-managers/bspwm.nix
./services/x11/window-managers/metacity.nix ./services/x11/window-managers/metacity.nix
./services/x11/window-managers/none.nix ./services/x11/window-managers/none.nix
./services/x11/window-managers/twm.nix ./services/x11/window-managers/twm.nix

View File

@ -0,0 +1,34 @@
{ config, lib, ... }:
let
inherit (lib) mkOption mkIf types mapAttrsToList;
cfg = config.programs.dconf;
mkDconfProfile = name: path:
{ source = path; target = "dconf/profile/${name}"; };
in
{
###### interface
options = {
programs.dconf = {
profiles = mkOption {
type = types.attrsOf types.path;
default = {};
description = "Set of dconf profile files.";
internal = true;
};
};
};
###### implementation
config = mkIf (cfg.profiles != {}) {
environment.etc =
(mapAttrsToList mkDconfProfile cfg.profiles);
};
}

View File

@ -0,0 +1,35 @@
{ config, lib, ... }:
let
cfg = config.programs.nano;
in
{
###### interface
options = {
programs.nano = {
nanorc = lib.mkOption {
type = lib.types.lines;
default = "";
description = ''
The system-wide nano configuration.
See <citerefentry><refentrytitle>nanorc</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
'';
example = ''
set nowrap
set tabstospaces
set tabsize 4
'';
};
};
};
###### implementation
config = lib.mkIf (cfg.nanorc != "") {
environment.etc."nanorc".text = cfg.nanorc;
};
}

View File

@ -30,7 +30,8 @@ with lib;
description = "Hardware RNG Entropy Gatherer Daemon"; description = "Hardware RNG Entropy Gatherer Daemon";
serviceConfig.ExecStart = "${pkgs.rng_tools}/sbin/rngd -f"; serviceConfig.ExecStart = "${pkgs.rng_tools}/sbin/rngd -f -v" +
(if config.services.tcsd.enable then " --no-tpm=1" else "");
restartTriggers = [ pkgs.rng_tools ]; restartTriggers = [ pkgs.rng_tools ];
}; };

View File

@ -97,8 +97,7 @@ in
}: }:
'' ''
source=${if source != "" then source else "$(PATH=$SETUID_PATH type -tP ${program})"} if ! source=${if source != "" then source else "$(PATH=$SETUID_PATH type -tP ${program})"}; then
if test -z "$source"; then
# If we can't find the program, fall back to the # If we can't find the program, fall back to the
# system profile. # system profile.
source=/nix/var/nix/profiles/default/bin/${program} source=/nix/var/nix/profiles/default/bin/${program}

View File

@ -12,7 +12,7 @@ let
phases = [ "installPhase" ]; phases = [ "installPhase" ];
buildInputs = [ jdk ]; buildInputs = [ jdk ];
installPhase = '' installPhase = ''
ensureDir $out/lib mkdir -p $out/lib
source ${activemq}/lib/classpath.env source ${activemq}/lib/classpath.env
export CLASSPATH export CLASSPATH
ln -s "${./ActiveMQBroker.java}" ActiveMQBroker.java ln -s "${./ActiveMQBroker.java}" ActiveMQBroker.java

View File

@ -92,6 +92,17 @@ in {
}; };
}; };
systemd.services.mopidy-scan = {
description = "mopidy local files scanner";
preStart = "mkdir -p ${cfg.dataDir} && chown -R mopidy:mopidy ${cfg.dataDir}";
serviceConfig = {
ExecStart = "${mopidyLauncher}/bin/mopidy --config ${concatStringsSep ":" ([mopidyConf] ++ cfg.extraConfigFiles)} local scan";
User = "mopidy";
PermissionsStartOnly = true;
Type = "oneshot";
};
};
users.extraUsers.mopidy = { users.extraUsers.mopidy = {
inherit uid; inherit uid;
group = "mopidy"; group = "mopidy";

View File

@ -4,9 +4,6 @@
with lib; with lib;
let
gnome3 = config.environment.gnome3.packageSet;
in
{ {
###### interface ###### interface
@ -33,9 +30,9 @@ in
config = mkIf config.services.gnome3.at-spi2-core.enable { config = mkIf config.services.gnome3.at-spi2-core.enable {
environment.systemPackages = [ gnome3.at_spi2_core ]; environment.systemPackages = [ pkgs.at_spi2_core ];
services.dbus.packages = [ gnome3.at_spi2_core ]; services.dbus.packages = [ pkgs.at_spi2_core ];
}; };

View File

@ -6,7 +6,7 @@ let
acpiConfDir = pkgs.runCommand "acpi-events" {} acpiConfDir = pkgs.runCommand "acpi-events" {}
'' ''
ensureDir $out mkdir -p $out
${ ${
# Generate a configuration file for each event. (You can't have # Generate a configuration file for each event. (You can't have
# multiple events in one config file...) # multiple events in one config file...)

View File

@ -0,0 +1,139 @@
# tcsd daemon.
{ config, pkgs, ... }:
with pkgs.lib;
let
cfg = config.services.tcsd;
tcsdConf = pkgs.writeText "tcsd.conf" ''
port = 30003
num_threads = 10
system_ps_file = ${cfg.stateDir}/system.data
# This is the log of each individual measurement done by the system.
# By re-calculating the PCR registers based on this information, even
# finer details about the measured environment can be inferred than
# what is available directly from the PCR registers.
firmware_log_file = /sys/kernel/security/tpm0/binary_bios_measurements
kernel_log_file = /sys/kernel/security/ima/binary_runtime_measurements
#firmware_pcrs = 0,1,2,3,4,5,6,7
#kernel_pcrs = 10,11
platform_cred = ${cfg.platformCred}
conformance_cred = ${cfg.conformanceCred}
endorsement_cred = ${cfg.endorsementCred}
#remote_ops = create_key,random
#host_platform_class = server_12
#all_platform_classes = pc_11,pc_12,mobile_12
'';
in
{
###### interface
options = {
services.tcsd = {
enable = mkOption {
default = false;
type = types.bool;
description = ''
Whether to enable tcsd, a Trusted Computing management service
that provides TCG Software Stack (TSS). The tcsd daemon is
the only portal to the Trusted Platform Module (TPM), a hardware
chip on the motherboard.
'';
};
user = mkOption {
default = "tss";
type = types.string;
description = "User account under which tcsd runs.";
};
group = mkOption {
default = "tss";
type = types.string;
description = "Group account under which tcsd runs.";
};
stateDir = mkOption {
default = "/var/lib/tpm";
type = types.path;
description = ''
The location of the system persistent storage file.
The system persistent storage file holds keys and data across
restarts of the TCSD and system reboots.
'';
};
platformCred = mkOption {
default = "${cfg.stateDir}/platform.cert";
type = types.path;
description = ''
Path to the platform credential for your TPM. Your TPM
manufacturer may have provided you with a set of credentials
(certificates) that should be used when creating identities
using your TPM. When a user of your TPM makes an identity,
this credential will be encrypted as part of that process.
See the 1.1b TPM Main specification section 9.3 for information
on this process. '';
};
conformanceCred = mkOption {
default = "${cfg.stateDir}/conformance.cert";
type = types.path;
description = ''
Path to the conformance credential for your TPM.
See also the platformCred option'';
};
endorsementCred = mkOption {
default = "${cfg.stateDir}/endorsement.cert";
type = types.path;
description = ''
Path to the endorsement credential for your TPM.
See also the platformCred option'';
};
};
};
###### implementation
config = mkIf cfg.enable {
environment.systemPackages = [ pkgs.trousers ];
# system.activationScripts.tcsd =
# ''
# chown ${cfg.user}:${cfg.group} ${tcsdConf}
# '';
systemd.services.tcsd = {
description = "TCSD";
after = [ "systemd-udev-settle.service" ];
wantedBy = [ "multi-user.target" ];
path = [ pkgs.trousers ];
preStart =
''
mkdir -m 0700 -p ${cfg.stateDir}
chown -R ${cfg.user}:${cfg.group} ${cfg.stateDir}
'';
serviceConfig.ExecStart = "${pkgs.trousers}/sbin/tcsd -f -c ${tcsdConf}";
};
users.extraUsers = optionalAttrs (cfg.user == "tss") (singleton
{ name = "tss";
group = "tss";
uid = config.ids.uids.nginx;
});
users.extraGroups = optionalAttrs (cfg.group == "tss") (singleton
{ name = "tss";
gid = config.ids.gids.nginx;
});
};
}

View File

@ -8,10 +8,6 @@ let
configFile = pkgs.writeText "logrotate.conf" configFile = pkgs.writeText "logrotate.conf"
cfg.config; cfg.config;
cronJob = ''
5 * * * * root ${pkgs.logrotate}/sbin/logrotate ${configFile}
'';
in in
{ {
options = { options = {
@ -33,6 +29,16 @@ in
}; };
config = mkIf cfg.enable { config = mkIf cfg.enable {
services.cron.systemCronJobs = [ cronJob ]; systemd.services.logrotate = {
description = "Logrotate Service";
wantedBy = [ "multi-user.target" ];
startAt = "*-*-* *:05:00";
serviceConfig.Restart = "no";
serviceConfig.User = "root";
script = ''
exec ${pkgs.logrotate}/sbin/logrotate ${configFile}
'';
};
}; };
} }

View File

@ -0,0 +1,83 @@
{ config, pkgs, lib, ... }:
with lib;
let
cfg = config.services.syslog-ng;
syslogngConfig = pkgs.writeText "syslog-ng.conf" ''
@version: 3.5
@include "scl.conf"
${cfg.extraConfig}
'';
ctrlSocket = "/run/syslog-ng/syslog-ng.ctl";
pidFile = "/run/syslog-ng/syslog-ng.pid";
persistFile = "/var/syslog-ng/syslog-ng.persist";
syslogngOptions = [
"--foreground"
"--module-path=${concatStringsSep ":" (["${pkgs.syslogng}/lib/syslog-ng"] ++ cfg.extraModulePaths)}"
"--cfgfile=${syslogngConfig}"
"--control=${ctrlSocket}"
"--persist-file=${persistFile}"
"--pidfile=${pidFile}"
];
in {
options = {
services.syslog-ng = {
enable = mkOption {
type = types.bool;
default = false;
description = ''
Whether to enable the syslog-ng daemon.
'';
};
serviceName = mkOption {
type = types.str;
default = "syslog-ng";
description = ''
The name of the systemd service that runs syslog-ng. Set this to
<literal>syslog</literal> if you want journald to automatically
forward all logs to syslog-ng.
'';
};
extraModulePaths = mkOption {
type = types.listOf types.str;
default = [];
example = [ "${pkgs.syslogng_incubator}/lib/syslog-ng" ];
description = ''
A list of paths that should be included in syslog-ng's
<literal>--module-path</literal> option. They should usually
end in <literal>/lib/syslog-ng</literal>
'';
};
extraConfig = mkOption {
type = types.lines;
default = "";
description = ''
Configuration added to the end of <literal>syslog-ng.conf</literal>.
'';
};
};
};
config = mkIf cfg.enable {
systemd.services."${cfg.serviceName}" = {
wantedBy = [ "multi-user.target" ];
preStart = "mkdir -p /{var,run}/syslog-ng";
serviceConfig = {
Type = "notify";
Sockets = "syslog.socket";
StandardOutput = "null";
Restart = "on-failure";
ExecStart = "${pkgs.syslogng}/sbin/syslog-ng ${concatStringsSep " " syslogngOptions}";
};
};
};
}

View File

@ -12,7 +12,7 @@ let
nagiosObjectDefs = cfg.objectDefs; nagiosObjectDefs = cfg.objectDefs;
nagiosObjectDefsDir = pkgs.runCommand "nagios-objects" {inherit nagiosObjectDefs;} nagiosObjectDefsDir = pkgs.runCommand "nagios-objects" {inherit nagiosObjectDefs;}
"ensureDir $out; ln -s $nagiosObjectDefs $out/"; "mkdir -p $out; ln -s $nagiosObjectDefs $out/";
nagiosCfgFile = pkgs.writeText "nagios.cfg" nagiosCfgFile = pkgs.writeText "nagios.cfg"
'' ''

View File

@ -13,7 +13,7 @@ let
}; };
buildInputs = [ python ]; buildInputs = [ python ];
installPhase = '' installPhase = ''
ensureDir $out/bin mkdir -p $out/bin
# Make it work for kernels 3.x, not so different than 2.6 # Make it work for kernels 3.x, not so different than 2.6
sed -i 's/2\.6/4.0/' system_health.py sed -i 's/2\.6/4.0/' system_health.py
cp system_health.py $out/bin cp system_health.py $out/bin

View File

@ -11,7 +11,7 @@ let
}; };
afsConfig = pkgs.runCommand "afsconfig" {} '' afsConfig = pkgs.runCommand "afsconfig" {} ''
ensureDir $out mkdir -p $out
echo ${cfg.cellName} > $out/ThisCell echo ${cfg.cellName} > $out/ThisCell
cp ${cellServDB} $out/CellServDB cp ${cellServDB} $out/CellServDB
echo "/afs:${cfg.cacheDirectory}:${cfg.cacheSize}" > $out/cacheinfo echo "/afs:${cfg.cacheDirectory}:${cfg.cacheSize}" > $out/cacheinfo

View File

@ -13,7 +13,7 @@ let
default-lease-time 600; default-lease-time 600;
max-lease-time 7200; max-lease-time 7200;
authoritative; authoritative;
ddns-update-style ad-hoc; ddns-update-style interim;
log-facility local1; # see dhcpd.nix log-facility local1; # see dhcpd.nix
${cfg.extraConfig} ${cfg.extraConfig}
@ -108,22 +108,41 @@ in
config = mkIf config.services.dhcpd.enable { config = mkIf config.services.dhcpd.enable {
jobs.dhcpd = users = {
extraUsers.dhcpd = {
uid = config.ids.uids.dhcpd;
description = "DHCP daemon user";
};
};
systemd.services.dhcpd =
{ description = "DHCP server"; { description = "DHCP server";
startOn = "started network-interfaces"; wantedBy = [ "multi-user.target" ];
stopOn = "stopping network-interfaces";
script = after = [ "network.target" ];
path = [ pkgs.dhcp ];
preStart =
'' ''
mkdir -m 755 -p ${stateDir} mkdir -m 755 -p ${stateDir}
touch ${stateDir}/dhcpd.leases touch ${stateDir}/dhcpd.leases
exec ${pkgs.dhcp}/sbin/dhcpd -f -cf ${configFile} \ mkdir -m 755 -p /run/dhcpd
-lf ${stateDir}/dhcpd.leases \ chown dhcpd /run/dhcpd
${toString cfg.interfaces}
''; '';
serviceConfig =
{ ExecStart = "@${pkgs.dhcp}/sbin/dhcpd dhcpd"
+ " -pf /run/dhcpd/dhcpd.pid -cf ${configFile}"
+ " -lf ${stateDir}/dhcpd.leases -user dhcpd -group nogroup"
+ " ${toString cfg.interfaces}";
Restart = "always";
Type = "forking";
PIDFile = "/run/dhcpd/dhcpd.pid";
};
}; };
}; };

View File

@ -3,7 +3,7 @@ source $stdenv/setup
doSub() { doSub() {
local src=$1 local src=$1
local dst=$2 local dst=$2
ensureDir $(dirname $dst) mkdir -p $(dirname $dst)
substituteAll $src $dst substituteAll $src $dst
} }
@ -28,4 +28,4 @@ for i in $substFiles; do
fi fi
done done
ensureDir $out/bin mkdir -p $out/bin

View File

@ -99,7 +99,6 @@ in
}; };
subsystems = mkOption { subsystems = mkOption {
default = [ ["sftp" "${pkgs.lsh}/sbin/sftp-server"] ];
description = '' description = ''
List of subsystem-path pairs, where the head of the pair List of subsystem-path pairs, where the head of the pair
denotes the subsystem name, and the tail denotes the path to denotes the subsystem name, and the tail denotes the path to
@ -116,6 +115,8 @@ in
config = mkIf cfg.enable { config = mkIf cfg.enable {
services.lshd.subsystems = [ ["sftp" "${pkgs.lsh}/sbin/sftp-server"] ];
jobs.lshd = jobs.lshd =
{ description = "GNU lshd SSH2 daemon"; { description = "GNU lshd SSH2 daemon";

View File

@ -0,0 +1,88 @@
{ config, lib, pkgs, ... }:
with lib;
let
cfg = config.services.unifi;
stateDir = "/var/lib/unifi";
cmd = "@${pkgs.icedtea7_jre}/bin/java java -jar ${stateDir}/lib/ace.jar";
in
{
options = {
services.unifi.enable = mkOption {
type = types.uniq types.bool;
default = false;
description = ''
Whether or not to enable the unifi controller service.
'';
};
};
config = mkIf cfg.enable {
users.extraUsers.unifi = {
uid = config.ids.uids.unifi;
description = "UniFi controller daemon user";
home = "${stateDir}";
};
# We must create the binary directories as bind mounts instead of symlinks
# This is because the controller resolves all symlinks to absolute paths
# to be used as the working directory.
systemd.mounts = map ({ what, where }: {
bindsTo = [ "unifi.service" ];
requiredBy = [ "unifi.service" ];
before = [ "unifi.service" ];
options = "bind";
what = what;
where = where;
}) [
{
what = "${pkgs.unifi}/dl";
where = "${stateDir}/dl";
}
{
what = "${pkgs.unifi}/lib";
where = "${stateDir}/lib";
}
{
what = "${pkgs.mongodb}/bin";
where = "${stateDir}/bin";
}
];
systemd.services.unifi = {
description = "UniFi controller daemon";
wantedBy = [ "multi-user.target" ];
after = [ "network.target" ];
preStart = ''
# Ensure privacy of state
chown unifi "${stateDir}"
chmod 0700 "${stateDir}"
# Create the volatile webapps
mkdir -p "${stateDir}/webapps"
chown unifi "${stateDir}/webapps"
ln -s "${pkgs.unifi}/webapps/ROOT.war" "${stateDir}/webapps/ROOT.war"
'';
postStop = ''
rm "${stateDir}/webapps/ROOT.war"
'';
serviceConfig = {
Type = "simple";
ExecStart = "${cmd} start";
ExecStop = "${cmd} stop";
User = "unifi";
PermissionsStartOnly = true;
UMask = "0077";
WorkingDirectory = "${stateDir}";
};
};
};
}

View File

@ -20,10 +20,15 @@ let
</Pass> </Pass>
"; ";
modules = pkgs.buildEnv {
name = "znc-modules";
paths = cfg.modulePackages;
};
confOptions = { ... }: { confOptions = { ... }: {
options = { options = {
modules = mkOption { modules = mkOption {
type = types.listOf types.str; type = types.listOf types.string;
default = [ "partyline" "webadmin" "adminlog" "log" ]; default = [ "partyline" "webadmin" "adminlog" "log" ];
example = [ "partyline" "webadmin" "adminlog" "log" ]; example = [ "partyline" "webadmin" "adminlog" "log" ];
description = '' description = ''
@ -31,10 +36,19 @@ let
''; '';
}; };
userModules = mkOption {
type = types.listOf types.string;
default = [ ];
example = [ "fish" "push" ];
description = ''
A list of user modules to include in the `znc.conf` file.
'';
};
userName = mkOption { userName = mkOption {
default = defaultUserName; default = defaultUserName;
example = "johntron"; example = "johntron";
type = types.str; type = types.string;
description = '' description = ''
The user name to use when generating the `znc.conf` file. The user name to use when generating the `znc.conf` file.
This is the user name used by the user logging into the ZNC web admin. This is the user name used by the user logging into the ZNC web admin.
@ -44,7 +58,7 @@ let
nick = mkOption { nick = mkOption {
default = "znc-user"; default = "znc-user";
example = "john"; example = "john";
type = types.str; type = types.string;
description = '' description = ''
The IRC nick to use when generating the `znc.conf` file. The IRC nick to use when generating the `znc.conf` file.
''; '';
@ -53,7 +67,7 @@ let
passBlock = mkOption { passBlock = mkOption {
default = defaultPassBlock; default = defaultPassBlock;
example = "Must be the block generated by the `znc --makepass` command."; example = "Must be the block generated by the `znc --makepass` command.";
type = types.str; type = types.string;
description = '' description = ''
The pass block to use when generating the `znc.conf` file. The pass block to use when generating the `znc.conf` file.
This is the password used by the user logging into the ZNC web admin. This is the password used by the user logging into the ZNC web admin.
@ -80,6 +94,13 @@ let
''; '';
}; };
extraZncConf = mkOption {
default = "";
type = types.lines;
description = ''
Extra config to `znc.conf` file
'';
};
}; };
}; };
@ -128,9 +149,11 @@ let
QuitMsg = Quit QuitMsg = Quit
RealName = ${confOpts.nick} RealName = ${confOpts.nick}
TimestampFormat = [%H:%M:%S] TimestampFormat = [%H:%M:%S]
${concatMapStrings (n: "LoadModule = ${n}\n") confOpts.userModules}
${confOpts.passBlock} ${confOpts.passBlock}
</User> </User>
${confOpts.extraZncConf}
''; '';
zncConfFile = pkgs.writeTextFile { zncConfFile = pkgs.writeTextFile {
@ -160,7 +183,7 @@ in
user = mkOption { user = mkOption {
default = "znc"; default = "znc";
example = "john"; example = "john";
type = types.str; type = types.string;
description = '' description = ''
The name of an existing user account to use to own the ZNC server process. The name of an existing user account to use to own the ZNC server process.
If not specified, a default user will be created to own the process. If not specified, a default user will be created to own the process.
@ -168,8 +191,8 @@ in
}; };
dataDir = mkOption { dataDir = mkOption {
default = "/home/${cfg.user}/.znc"; default = "/var/lib/znc/";
example = "/home/john/.znc"; example = "/home/john/.znc/";
type = types.path; type = types.path;
description = '' description = ''
The data directory. Used for configuration files and modules. The data directory. Used for configuration files and modules.
@ -202,6 +225,15 @@ in
options = confOptions; options = confOptions;
}; };
modulePackages = mkOption {
type = types.listOf types.package;
default = [ ];
example = [ pkgs.zncModules.fish pkgs.zncModules.push ];
description = ''
A list of global znc module packages to add to znc.
'';
};
mutable = mkOption { mutable = mkOption {
default = false; default = false;
example = true; example = true;
@ -233,25 +265,22 @@ in
config = mkIf cfg.enable { config = mkIf cfg.enable {
systemd.services."znc-${cfg.user}" = { systemd.services.znc = {
description = "ZNC Server of ${cfg.user}."; description = "ZNC Server";
wantedBy = [ "multi-user.target" ]; wantedBy = [ "multi-user.target" ];
after = [ "network.service" ]; after = [ "network.service" ];
path = [ pkgs.znc ];
serviceConfig = { serviceConfig = {
User = "${cfg.user}"; User = cfg.user;
Restart = "always"; Restart = "always";
ExecReload = "${pkgs.coreutils}/bin/kill -HUP $MAINPID"; ExecReload = "${pkgs.coreutils}/bin/kill -HUP $MAINPID";
ExecStop = "${pkgs.coreutils}/bin/kill -INT $MAINPID"; ExecStop = "${pkgs.coreutils}/bin/kill -INT $MAINPID";
}; };
preStart = '' preStart = ''
${pkgs.coreutils}/bin/mkdir -p ${cfg.dataDir}
${pkgs.coreutils}/bin/chown ${cfg.user} ${cfg.dataDir} -R
${pkgs.coreutils}/bin/mkdir -p ${cfg.dataDir}/configs ${pkgs.coreutils}/bin/mkdir -p ${cfg.dataDir}/configs
# If mutable, regenerate conf file every time. # If mutable, regenerate conf file every time.
${optionalString (!cfg.mutable) '' ${optionalString (!cfg.mutable) ''
${pkgs.coreutils}/echo "znc-${cfg.user} is set to be system-managed. Now deleting old znc.conf file to be regenerated." ${pkgs.coreutils}/echo "znc is set to be system-managed. Now deleting old znc.conf file to be regenerated."
${pkgs.coreutils}/rm -f ${cfg.dataDir}/configs/znc.conf ${pkgs.coreutils}/rm -f ${cfg.dataDir}/configs/znc.conf
''} ''}
@ -259,7 +288,7 @@ in
if [[ ! -f ${cfg.dataDir}/configs/znc.conf ]]; then if [[ ! -f ${cfg.dataDir}/configs/znc.conf ]]; then
${pkgs.coreutils}/bin/echo "No znc.conf file found in ${cfg.dataDir}. Creating one now." ${pkgs.coreutils}/bin/echo "No znc.conf file found in ${cfg.dataDir}. Creating one now."
${if (!cfg.mutable) ${if (!cfg.mutable)
then "${pkgs.coreutils}/bin/ln --force -s ${zncConfFile} ${cfg.dataDir}/configs/znc.conf" then "${pkgs.coreutils}/bin/ln --force -s ${zncConfFile} ${cfg.dataDir}/.znc/configs/znc.conf"
else '' else ''
${pkgs.coreutils}/bin/cp --no-clobber ${zncConfFile} ${cfg.dataDir}/configs/znc.conf ${pkgs.coreutils}/bin/cp --no-clobber ${zncConfFile} ${cfg.dataDir}/configs/znc.conf
${pkgs.coreutils}/bin/chmod u+rw ${cfg.dataDir}/configs/znc.conf ${pkgs.coreutils}/bin/chmod u+rw ${cfg.dataDir}/configs/znc.conf
@ -269,8 +298,12 @@ in
if [[ ! -f ${cfg.dataDir}/znc.pem ]]; then if [[ ! -f ${cfg.dataDir}/znc.pem ]]; then
${pkgs.coreutils}/bin/echo "No znc.pem file found in ${cfg.dataDir}. Creating one now." ${pkgs.coreutils}/bin/echo "No znc.pem file found in ${cfg.dataDir}. Creating one now."
${pkgs.znc}/bin/znc --makepem ${pkgs.znc}/bin/znc --makepem --datadir ${cfg.dataDir}
fi fi
# Symlink modules
rm ${cfg.dataDir}/modules || true
ln -fs ${modules}/lib/znc ${cfg.dataDir}/modules
''; '';
script = "${pkgs.znc}/bin/znc --foreground --datadir ${cfg.dataDir} ${toString cfg.extraFlags}"; script = "${pkgs.znc}/bin/znc --foreground --datadir ${cfg.dataDir} ${toString cfg.extraFlags}";
}; };
@ -280,6 +313,7 @@ in
description = "ZNC server daemon owner"; description = "ZNC server daemon owner";
group = defaultUser; group = defaultUser;
uid = config.ids.uids.znc; uid = config.ids.uids.znc;
home = cfg.dataDir;
createHome = true; createHome = true;
createUser = true; createUser = true;
}; };

View File

@ -25,12 +25,17 @@ in
options = { options = {
services.fail2ban = { services.fail2ban = {
enable = mkOption {
default = false;
type = types.bool;
description = "Whether to enable the fail2ban service.";
};
daemonConfig = mkOption { daemonConfig = mkOption {
default = default =
'' ''
[Definition] [Definition]
loglevel = 3 loglevel = INFO
logtarget = SYSLOG logtarget = SYSLOG
socket = /run/fail2ban/fail2ban.sock socket = /run/fail2ban/fail2ban.sock
pidfile = /run/fail2ban/fail2ban.pid pidfile = /run/fail2ban/fail2ban.pid
@ -80,7 +85,7 @@ in
###### implementation ###### implementation
config = { config = mkIf cfg.enable {
environment.systemPackages = [ pkgs.fail2ban ]; environment.systemPackages = [ pkgs.fail2ban ];
@ -101,12 +106,13 @@ in
preStart = preStart =
'' ''
mkdir -p /run/fail2ban -m 0755 mkdir -p /run/fail2ban -m 0755
mkdir -p /var/lib/fail2ban
''; '';
serviceConfig = serviceConfig =
{ ExecStart = "${pkgs.fail2ban}/bin/fail2ban-server -f"; { ExecStart = "${pkgs.fail2ban}/bin/fail2ban-server -f";
ReadOnlyDirectories = "/"; ReadOnlyDirectories = "/";
ReadWriteDirectories = "/run /var/tmp"; ReadWriteDirectories = "/run /var/tmp /var/lib";
CapabilityBoundingSet = "CAP_DAC_READ_SEARCH CAP_NET_ADMIN CAP_NET_RAW"; CapabilityBoundingSet = "CAP_DAC_READ_SEARCH CAP_NET_ADMIN CAP_NET_RAW";
}; };
@ -131,7 +137,7 @@ in
bantime = 600 bantime = 600
findtime = 600 findtime = 600
maxretry = 3 maxretry = 3
backend = auto backend = systemd
''; '';
# Block SSH if there are too many failing connection attempts. # Block SSH if there are too many failing connection attempts.
@ -139,7 +145,6 @@ in
'' ''
filter = sshd filter = sshd
action = iptables[name=SSH, port=ssh, protocol=tcp] action = iptables[name=SSH, port=ssh, protocol=tcp]
logpath = /var/log/warn
maxretry = 5 maxretry = 5
''; '';

View File

@ -14,7 +14,7 @@ let
name = "dbus-conf"; name = "dbus-conf";
preferLocalBuild = true; preferLocalBuild = true;
buildCommand = '' buildCommand = ''
ensureDir $out mkdir -p $out
cp -v ${pkgs.dbus.daemon}/etc/dbus-1/system.conf $out/system.conf cp -v ${pkgs.dbus.daemon}/etc/dbus-1/system.conf $out/system.conf

View File

@ -80,7 +80,7 @@ let
# !!! should be in lib # !!! should be in lib
writeTextInDir = name: text: writeTextInDir = name: text:
pkgs.runCommand name {inherit text;} "ensureDir $out; echo -n \"$text\" > $out/$name"; pkgs.runCommand name {inherit text;} "mkdir -p $out; echo -n \"$text\" > $out/$name";
enableSSL = any (vhost: vhost.enableSSL) allHosts; enableSSL = any (vhost: vhost.enableSSL) allHosts;
@ -194,7 +194,7 @@ let
) null ([ cfg ] ++ subservices); ) null ([ cfg ] ++ subservices);
documentRoot = if maybeDocumentRoot != null then maybeDocumentRoot else documentRoot = if maybeDocumentRoot != null then maybeDocumentRoot else
pkgs.runCommand "empty" {} "ensureDir $out"; pkgs.runCommand "empty" {} "mkdir -p $out";
documentRootConf = '' documentRootConf = ''
DocumentRoot "${documentRoot}" DocumentRoot "${documentRoot}"

View File

@ -92,7 +92,7 @@ let
installPhase = installPhase =
'' ''
ensureDir $out mkdir -p $out
cp -r * $out cp -r * $out
cp ${mediawikiConfig} $out/LocalSettings.php cp ${mediawikiConfig} $out/LocalSettings.php
sed -i \ sed -i \
@ -106,7 +106,7 @@ let
mediawikiScripts = pkgs.runCommand "mediawiki-${config.id}-scripts" mediawikiScripts = pkgs.runCommand "mediawiki-${config.id}-scripts"
{ buildInputs = [ pkgs.makeWrapper ]; } { buildInputs = [ pkgs.makeWrapper ]; }
'' ''
ensureDir $out/bin mkdir -p $out/bin
for i in changePassword.php createAndPromote.php userOptions.php edit.php nukePage.php update.php; do for i in changePassword.php createAndPromote.php userOptions.php edit.php nukePage.php update.php; do
makeWrapper ${php}/bin/php $out/bin/mediawiki-${config.id}-$(basename $i .php) \ makeWrapper ${php}/bin/php $out/bin/mediawiki-${config.id}-$(basename $i .php) \
--add-flags ${mediawikiRoot}/maintenance/$i --add-flags ${mediawikiRoot}/maintenance/$i

View File

@ -9,7 +9,7 @@ let
cgi = pkgs.stdenv.mkDerivation { cgi = pkgs.stdenv.mkDerivation {
name = "mercurial-cgi"; name = "mercurial-cgi";
buildCommand = '' buildCommand = ''
ensureDir $out mkdir -p $out
cp -v ${mercurial}/share/cgi-bin/hgweb.cgi $out cp -v ${mercurial}/share/cgi-bin/hgweb.cgi $out
sed -i "s|/path/to/repo/or/config|$out/hgweb.config|" $out/hgweb.cgi sed -i "s|/path/to/repo/or/config|$out/hgweb.config|" $out/hgweb.cgi
echo " echo "

View File

@ -9,9 +9,9 @@ let
cfg = config.services.lighttpd; cfg = config.services.lighttpd;
needModRedirect = cfg.gitweb.enable; needModRedirect = cfg.gitweb.enable;
needModAlias = cfg.cgit.enable or cfg.gitweb.enable; needModAlias = cfg.cgit.enable || cfg.gitweb.enable;
needModSetenv = cfg.cgit.enable or cfg.gitweb.enable; needModSetenv = cfg.cgit.enable || cfg.gitweb.enable;
needModCgi = cfg.cgit.enable or cfg.gitweb.enable; needModCgi = cfg.cgit.enable || cfg.gitweb.enable;
needModStatus = cfg.mod_status; needModStatus = cfg.mod_status;
needModUserdir = cfg.mod_userdir; needModUserdir = cfg.mod_userdir;

View File

@ -35,6 +35,14 @@ in {
description = "Enable Gnome 3 desktop manager."; description = "Enable Gnome 3 desktop manager.";
}; };
services.xserver.desktopManager.gnome3.sessionPath = mkOption {
default = [];
example = "[ pkgs.gnome3.gpaste ]";
description = "Additional list of packages to be added to the session search path.
Useful for gnome shell extensions or gsettings-conditionated autostart.";
apply = list: list ++ [ gnome3.gnome_shell ];
};
environment.gnome3.packageSet = mkOption { environment.gnome3.packageSet = mkOption {
default = pkgs.gnome3; default = pkgs.gnome3;
example = literalExample "pkgs.gnome3_12"; example = literalExample "pkgs.gnome3_12";
@ -86,10 +94,19 @@ in {
export XDG_MENU_PREFIX=gnome export XDG_MENU_PREFIX=gnome
# Don't let epiphany depend upon gnome-shell ${concatMapStrings (p: ''
# Don't let gnome-session depend upon vino (for .desktop autostart condition) if [ -d "${p}/share/gsettings-schemas/${p.name}" ]; then
export XDG_DATA_DIRS=$XDG_DATA_DIRS''${XDG_DATA_DIRS:+:}${p}/share/gsettings-schemas/${p.name}
fi
if [ -d "${p}/lib/girepository-1.0" ]; then
export GI_TYPELIB_PATH=$GI_TYPELIB_PATH''${GI_TYPELIB_PATH:+:}${p}/lib/girepository-1.0
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH''${LD_LIBRARY_PATH:+:}${p}/lib
fi
'') cfg.sessionPath}
# Override default mimeapps # Override default mimeapps
export XDG_DATA_DIRS=$XDG_DATA_DIRS''${XDG_DATA_DIRS:+:}${gnome3.gnome_shell}/share/gsettings-schemas/${gnome3.gnome_shell.name}:${gnome3.vino}/share/gsettings-schemas/${gnome3.vino.name}:${mimeAppsList}/share export XDG_DATA_DIRS=$XDG_DATA_DIRS''${XDG_DATA_DIRS:+:}${mimeAppsList}/share
# Let gnome-control-center find gnome-shell search providers # Let gnome-control-center find gnome-shell search providers
export GNOME_SEARCH_PROVIDERS_DIR=${config.system.path}/share/gnome-shell/search-providers/ export GNOME_SEARCH_PROVIDERS_DIR=${config.system.path}/share/gnome-shell/search-providers/
@ -123,7 +140,7 @@ in {
gnome3.gnome_settings_daemon gnome3.gnome_settings_daemon
gnome3.gnome_shell gnome3.gnome_shell
gnome3.gnome_themes_standard gnome3.gnome_themes_standard
] ++ (removePackagesByName [ ] ++ cfg.sessionPath ++ (removePackagesByName [
gnome3.baobab gnome3.baobab
gnome3.empathy gnome3.empathy
gnome3.eog gnome3.eog

View File

@ -0,0 +1,151 @@
{ config, lib, pkgs, ... }:
with lib;
let
cfg = config.services.xserver.displayManager;
gdm = pkgs.gnome3_12.gdm; # gdm 3.10 not supported
gnome3 = config.environment.gnome3.packageSet;
in
{
###### interface
options = {
services.xserver.displayManager.gdm = {
enable = mkOption {
type = types.bool;
default = false;
example = true;
description = ''
Whether to enable GDM as the display manager.
<emphasis>GDM is very experimental and may render system unusable.</emphasis>
'';
};
};
};
###### implementation
config = mkIf cfg.gdm.enable {
services.xserver.displayManager.slim.enable = false;
users.extraUsers.gdm =
{ name = "gdm";
uid = config.ids.uids.gdm;
group = "gdm";
home = "/run/gdm";
description = "GDM user";
};
users.extraGroups.gdm.gid = config.ids.gids.gdm;
services.xserver.displayManager.job =
{
environment = {
GDM_X_SERVER = "${cfg.xserverBin} ${cfg.xserverArgs}";
GDM_SESSIONS_DIR = "${cfg.session.desktops}";
XDG_CONFIG_DIRS = "${gnome3.gnome_settings_daemon}/etc/xdg";
};
execCmd = "exec ${gdm}/sbin/gdm";
};
# Because sd_login_monitor_new requires /run/systemd/machines
systemd.services.display-manager.wants = [ "systemd-machined.service" ];
systemd.services.display-manager.after = [ "systemd-machined.service" ];
systemd.services.display-manager.path = [ gnome3.gnome_shell gnome3.caribou ];
services.dbus.packages = [ gdm ];
programs.dconf.profiles.gdm = "${gdm}/share/dconf/profile/gdm";
# GDM LFS PAM modules, adapted somehow to NixOS
security.pam.services = {
gdm-launch-environment.text = ''
auth required pam_succeed_if.so audit quiet_success user = gdm
auth optional pam_permit.so
account required pam_succeed_if.so audit quiet_success user = gdm
account sufficient pam_unix.so
password required pam_deny.so
session required pam_succeed_if.so audit quiet_success user = gdm
session required pam_env.so envfile=${config.system.build.pamEnvironment}
session optional ${pkgs.systemd}/lib/security/pam_systemd.so
session optional pam_keyinit.so force revoke
session optional pam_permit.so
'';
gdm.text = ''
auth requisite pam_nologin.so
auth required pam_env.so
auth required pam_succeed_if.so uid >= 1000 quiet
auth optional ${gnome3.gnome_keyring}/lib/security/pam_gnome_keyring.so
auth sufficient pam_unix.so nullok likeauth
auth required pam_deny.so
account sufficient pam_unix.so
password requisite pam_unix.so nullok sha512
session required pam_env.so envfile=${config.system.build.pamEnvironment}
session required pam_unix.so
session required pam_loginuid.so
session optional ${pkgs.systemd}/lib/security/pam_systemd.so
session optional ${gnome3.gnome_keyring}/lib/security/pam_gnome_keyring.so auto_start
'';
gdm-password.text = ''
auth requisite pam_nologin.so
auth required pam_env.so envfile=${config.system.build.pamEnvironment}
auth required pam_succeed_if.so uid >= 1000 quiet
auth optional ${gnome3.gnome_keyring}/lib/security/pam_gnome_keyring.so
auth sufficient pam_unix.so nullok likeauth
auth required pam_deny.so
account sufficient pam_unix.so
password requisite pam_unix.so nullok sha512
session required pam_env.so envfile=${config.system.build.pamEnvironment}
session required pam_unix.so
session required pam_loginuid.so
session optional ${pkgs.systemd}/lib/security/pam_systemd.so
session optional ${gnome3.gnome_keyring}/lib/security/pam_gnome_keyring.so auto_start
'';
gdm-autologin.text = ''
auth requisite pam_nologin.so
auth required pam_succeed_if.so uid >= 1000 quiet
auth required pam_permit.so
account sufficient pam_unix.so
password requisite pam_unix.so nullok sha512
session optional pam_keyinit.so revoke
session required pam_env.so envfile=${config.system.build.pamEnvironment}
session required pam_unix.so
session required pam_loginuid.so
session optional ${pkgs.systemd}/lib/security/pam_systemd.so
'';
};
};
}

View File

@ -26,7 +26,7 @@ let
buildInputs = [ pkgs.makeWrapper ]; buildInputs = [ pkgs.makeWrapper ];
buildCommand = '' buildCommand = ''
ensureDir $out/gtk-3.0/ mkdir -p $out/gtk-3.0/
# This wrapper ensures that we actually get fonts # This wrapper ensures that we actually get fonts
makeWrapper ${pkgs.lightdm_gtk_greeter}/sbin/lightdm-gtk-greeter \ makeWrapper ${pkgs.lightdm_gtk_greeter}/sbin/lightdm-gtk-greeter \

View File

@ -27,7 +27,7 @@ let
unpackedTheme = pkgs.stdenv.mkDerivation { unpackedTheme = pkgs.stdenv.mkDerivation {
name = "slim-theme"; name = "slim-theme";
buildCommand = '' buildCommand = ''
ensureDir $out mkdir -p $out
cd $out cd $out
unpackFile ${cfg.theme} unpackFile ${cfg.theme}
ln -s * default ln -s * default

View File

@ -0,0 +1,29 @@
{ config, lib, pkgs, ... }:
with lib;
let
cfg = config.services.xserver.windowManager.bspwm;
in
{
options = {
services.xserver.windowManager.bspwm.enable = mkOption {
type = types.bool;
default = false;
example = true;
description = "Enable the bspwm window manager.";
};
};
config = mkIf cfg.enable {
services.xserver.windowManager.session = singleton {
name = "bspwm";
start = "
${pkgs.sxhkd}/bin/sxhkd &
${pkgs.bspwm}/bin/bspwm
";
};
environment.systemPackages = [ pkgs.bspwm ];
};
}

View File

@ -17,6 +17,7 @@ in
./xmonad.nix ./xmonad.nix
./i3.nix ./i3.nix
./herbstluftwm.nix ./herbstluftwm.nix
./bspwm.nix
]; ];
options = { options = {

View File

@ -66,6 +66,9 @@ in
PATH=$PATH:$i/bin:$i/sbin PATH=$PATH:$i/bin:$i/sbin
done done
_status=0
trap "_status=1" ERR
# Ensure a consistent umask. # Ensure a consistent umask.
umask 0022 umask 0022
@ -84,6 +87,8 @@ in
# Prevent the current configuration from being garbage-collected. # Prevent the current configuration from being garbage-collected.
ln -sfn /run/current-system /nix/var/nix/gcroots/current-system ln -sfn /run/current-system /nix/var/nix/gcroots/current-system
exit $_status
''; '';
}; };

View File

@ -194,6 +194,9 @@ checkFS() {
# Don't check ROM filesystems. # Don't check ROM filesystems.
if [ "$fsType" = iso9660 -o "$fsType" = udf ]; then return 0; fi if [ "$fsType" = iso9660 -o "$fsType" = udf ]; then return 0; fi
# Don't check resilient COWs as they validate the fs structures at mount time
if [ "$fsType" = btrfs -o "$fsType" = zfs ]; then return 0; fi
# If we couldn't figure out the FS type, then skip fsck. # If we couldn't figure out the FS type, then skip fsck.
if [ "$fsType" = auto ]; then if [ "$fsType" = auto ]; then
echo 'cannot check filesystem with type "auto"!' echo 'cannot check filesystem with type "auto"!'

View File

@ -119,7 +119,7 @@ let
udevRules = pkgs.stdenv.mkDerivation { udevRules = pkgs.stdenv.mkDerivation {
name = "udev-rules"; name = "udev-rules";
buildCommand = '' buildCommand = ''
ensureDir $out mkdir -p $out
echo 'ENV{LD_LIBRARY_PATH}="${extraUtils}/lib"' > $out/00-env.rules echo 'ENV{LD_LIBRARY_PATH}="${extraUtils}/lib"' > $out/00-env.rules

View File

@ -180,4 +180,4 @@ echo "starting systemd..."
PATH=/run/current-system/systemd/lib/systemd \ PATH=/run/current-system/systemd/lib/systemd \
MODULE_DIR=/run/booted-system/kernel-modules/lib/modules \ MODULE_DIR=/run/booted-system/kernel-modules/lib/modules \
LOCALE_ARCHIVE=/run/current-system/sw/lib/locale/locale-archive \ LOCALE_ARCHIVE=/run/current-system/sw/lib/locale/locale-archive \
exec systemd --log-target=journal # --log-level=debug --log-target=console --crash-shell exec systemd

View File

@ -3,7 +3,7 @@ source $stdenv/setup
ttys=($ttys) ttys=($ttys)
themes=($themes) themes=($themes)
ensureDir $out mkdir -p $out
defaultName=$(cd $default && ls | grep -v default) defaultName=$(cd $default && ls | grep -v default)
echo $defaultName echo $defaultName

View File

@ -66,13 +66,22 @@ let kernel = config.boot.kernelPackages.kernel; in
# Panic if an error occurs in stage 1 (rather than waiting for # Panic if an error occurs in stage 1 (rather than waiting for
# user intervention). # user intervention).
boot.kernelParams = boot.kernelParams =
[ "console=tty1" "console=ttyS0" "panic=1" "boot.panic_on_fail" ]; [ "console=ttyS0" "panic=1" "boot.panic_on_fail" ];
# `xwininfo' is used by the test driver to query open windows. # `xwininfo' is used by the test driver to query open windows.
environment.systemPackages = [ pkgs.xorg.xwininfo ]; environment.systemPackages = [ pkgs.xorg.xwininfo ];
# Log everything to the serial console. # Log everything to the serial console.
services.journald.console = "/dev/console"; services.journald.extraConfig =
''
ForwardToConsole=yes
MaxLevelConsole=debug
'';
# Don't clobber the console with duplicate systemd messages.
systemd.extraConfig = "ShowStatus=no";
boot.consoleLogLevel = 7;
# Prevent tests from accessing the Internet. # Prevent tests from accessing the Internet.
networking.defaultGateway = mkOverride 150 ""; networking.defaultGateway = mkOverride 150 "";
@ -88,6 +97,9 @@ let kernel = config.boot.kernelPackages.kernel; in
networking.usePredictableInterfaceNames = false; networking.usePredictableInterfaceNames = false;
# Make it easy to log in as root when running the test interactively.
security.initialRootPassword = mkDefault "";
}; };
} }

View File

@ -187,6 +187,8 @@ in
"/nix/var/nix/profiles/per-container/$INSTANCE" \ "/nix/var/nix/profiles/per-container/$INSTANCE" \
"/nix/var/nix/gcroots/per-container/$INSTANCE" "/nix/var/nix/gcroots/per-container/$INSTANCE"
cp -f /etc/resolv.conf "$root/etc/resolv.conf"
if [ "$PRIVATE_NETWORK" = 1 ]; then if [ "$PRIVATE_NETWORK" = 1 ]; then
extraFlags+=" --network-veth" extraFlags+=" --network-veth"
fi fi

View File

@ -22,21 +22,22 @@ with lib;
systemd.services."fetch-ec2-data" = systemd.services."fetch-ec2-data" =
{ description = "Fetch EC2 Data"; { description = "Fetch EC2 Data";
wantedBy = [ "multi-user.target" ]; wantedBy = [ "multi-user.target" "sshd.service" ];
before = [ "sshd.service" ]; before = [ "sshd.service" ];
after = [ "network.target" ]; wants = [ "ip-up.target" ];
after = [ "ip-up.target" ];
path = [ pkgs.curl pkgs.iproute ]; path = [ pkgs.wget pkgs.iproute ];
script = script =
'' ''
ip route del blackhole 169.254.169.254/32 || true ip route del blackhole 169.254.169.254/32 || true
curl="curl --retry 3 --retry-delay 0 --fail" wget="wget -q --retry-connrefused -O -"
echo "setting host name..." echo "setting host name..."
${optionalString (config.networking.hostName == "") '' ${optionalString (config.networking.hostName == "") ''
${pkgs.nettools}/bin/hostname $($curl http://169.254.169.254/1.0/meta-data/hostname) ${pkgs.nettools}/bin/hostname $($wget http://169.254.169.254/1.0/meta-data/hostname)
''} ''}
# Don't download the SSH key if it has already been injected # Don't download the SSH key if it has already been injected
@ -44,7 +45,7 @@ with lib;
if ! [ -e /root/.ssh/authorized_keys ]; then if ! [ -e /root/.ssh/authorized_keys ]; then
echo "obtaining SSH key..." echo "obtaining SSH key..."
mkdir -p /root/.ssh mkdir -p /root/.ssh
$curl -o /root/key.pub http://169.254.169.254/1.0/meta-data/public-keys/0/openssh-key $wget http://169.254.169.254/1.0/meta-data/public-keys/0/openssh-key > /root/key.pub
if [ $? -eq 0 -a -e /root/key.pub ]; then if [ $? -eq 0 -a -e /root/key.pub ]; then
if ! grep -q -f /root/key.pub /root/.ssh/authorized_keys; then if ! grep -q -f /root/key.pub /root/.ssh/authorized_keys; then
cat /root/key.pub >> /root/.ssh/authorized_keys cat /root/key.pub >> /root/.ssh/authorized_keys
@ -58,7 +59,7 @@ with lib;
# Extract the intended SSH host key for this machine from # Extract the intended SSH host key for this machine from
# the supplied user data, if available. Otherwise sshd will # the supplied user data, if available. Otherwise sshd will
# generate one normally. # generate one normally.
$curl http://169.254.169.254/2011-01-01/user-data > /root/user-data || true $wget http://169.254.169.254/2011-01-01/user-data > /root/user-data || true
key="$(sed 's/|/\n/g; s/SSH_HOST_DSA_KEY://; t; d' /root/user-data)" key="$(sed 's/|/\n/g; s/SSH_HOST_DSA_KEY://; t; d' /root/user-data)"
key_pub="$(sed 's/SSH_HOST_DSA_KEY_PUB://; t; d' /root/user-data)" key_pub="$(sed 's/SSH_HOST_DSA_KEY_PUB://; t; d' /root/user-data)"
if [ -n "$key" -a -n "$key_pub" -a ! -e /etc/ssh/ssh_host_dsa_key ]; then if [ -n "$key" -a -n "$key_pub" -a ! -e /etc/ssh/ssh_host_dsa_key ]; then

View File

@ -152,8 +152,12 @@ if ($action eq "create") {
my $root = "/var/lib/containers/$containerName"; my $root = "/var/lib/containers/$containerName";
my $profileDir = "/nix/var/nix/profiles/per-container/$containerName"; my $profileDir = "/nix/var/nix/profiles/per-container/$containerName";
my $gcRootsDir = "/nix/var/nix/gcroots/per-container/$containerName";
my $confFile = "/etc/containers/$containerName.conf"; my $confFile = "/etc/containers/$containerName.conf";
die "$0: container $containerName does not exist\n" if !-e $confFile; if (!-e $confFile) {
exit 0 if $action eq "destroy";
die "$0: container $containerName does not exist\n" ;
}
sub isContainerRunning { sub isContainerRunning {
my $status = `systemctl show 'container\@$containerName'`; my $status = `systemctl show 'container\@$containerName'`;
@ -172,6 +176,7 @@ if ($action eq "destroy") {
stopContainer if isContainerRunning; stopContainer if isContainerRunning;
rmtree($profileDir) if -e $profileDir; rmtree($profileDir) if -e $profileDir;
rmtree($gcRootsDir) if -e $gcRootsDir;
rmtree($root) if -e $root; rmtree($root) if -e $root;
unlink($confFile) or die; unlink($confFile) or die;
} }

View File

@ -376,7 +376,7 @@ in
system.build.vm = pkgs.runCommand "nixos-vm" { preferLocalBuild = true; } system.build.vm = pkgs.runCommand "nixos-vm" { preferLocalBuild = true; }
'' ''
ensureDir $out/bin mkdir -p $out/bin
ln -s ${config.system.build.toplevel} $out/system ln -s ${config.system.build.toplevel} $out/system
ln -s ${pkgs.writeScript "run-nixos-vm" startVM} $out/bin/run-${vmName}-vm ln -s ${pkgs.writeScript "run-nixos-vm" startVM} $out/bin/run-${vmName}-vm
''; '';

View File

@ -12,7 +12,7 @@ in {
virtualbox = { virtualbox = {
baseImageSize = mkOption { baseImageSize = mkOption {
type = types.str; type = types.str;
default = 10G; default = "10G";
description = '' description = ''
The size of the VirtualBox base image. The size string should be on The size of the VirtualBox base image. The size string should be on
a format the qemu-img command accepts. a format the qemu-img command accepts.

View File

@ -42,8 +42,8 @@ in rec {
(all nixos.iso_graphical) (all nixos.iso_graphical)
(all nixos.ova) (all nixos.ova)
# (all nixos.tests.efi-installer.simple) #(all nixos.tests.efi-installer.simple)
(all nixos.tests.containers) #(all nixos.tests.containers)
(all nixos.tests.firefox) (all nixos.tests.firefox)
(all nixos.tests.firewall) (all nixos.tests.firewall)
(all nixos.tests.gnome3) (all nixos.tests.gnome3)

View File

@ -113,6 +113,7 @@ in rec {
manual = forAllSystems (system: (builtins.getAttr system iso_minimal).config.system.build.manual.manual); manual = forAllSystems (system: (builtins.getAttr system iso_minimal).config.system.build.manual.manual);
manualPDF = iso_minimal.x86_64-linux.config.system.build.manual.manualPDF;
manpages = forAllSystems (system: (builtins.getAttr system iso_minimal).config.system.build.manual.manpages); manpages = forAllSystems (system: (builtins.getAttr system iso_minimal).config.system.build.manual.manpages);

View File

@ -37,6 +37,7 @@ import ./make-test.nix {
$client->waitForUnit("network.target"); $client->waitForUnit("network.target");
$server->waitForUnit("network.target"); $server->waitForUnit("network.target");
$server->waitForUnit("httpd.service");
# Wait until the given interface has a non-tentative address of # Wait until the given interface has a non-tentative address of
# the desired scope (i.e. has completed Duplicate Address # the desired scope (i.e. has completed Duplicate Address

View File

@ -6,11 +6,11 @@
let withSpotify = config.clementine.spotify or false; let withSpotify = config.clementine.spotify or false;
in in
stdenv.mkDerivation { stdenv.mkDerivation {
name = "clementine-1.2.1"; name = "clementine-1.2.3";
src = fetchurl { src = fetchurl {
url = http://clementine-player.googlecode.com/files/clementine-1.2.1.tar.gz; url = https://github.com/clementine-player/Clementine/archive/1.2.3.tar.gz;
sha256 = "0kk5cjmb8nirx0im3c0z91af2k72zxi6lwzm6rb57qihya5nwmfv"; sha256 = "1gx1109i4pylz6x7gvp4rdzc6dvh0w6in6hfbygw01d08l26bxbx";
}; };
patches = [ ./clementine-1.2.1-include-paths.patch ]; patches = [ ./clementine-1.2.1-include-paths.patch ];
@ -40,6 +40,8 @@ stdenv.mkDerivation {
usbmuxd usbmuxd
] ++ stdenv.lib.optional withSpotify libspotify; ] ++ stdenv.lib.optional withSpotify libspotify;
enableParallelBuilding = true;
meta = with stdenv.lib; { meta = with stdenv.lib; {
homepage = "http://www.clementine-player.org"; homepage = "http://www.clementine-player.org";
description = "A multiplatform music player"; description = "A multiplatform music player";
@ -47,6 +49,6 @@ stdenv.mkDerivation {
platforms = platforms.linux; platforms = platforms.linux;
maintainers = [ maintainers.ttuegel ]; maintainers = [ maintainers.ttuegel ];
# libspotify is unfree # libspotify is unfree
hydraPlatforms = optional (!withSpotify) platforms.linux; hydraPlatforms = optionals (!withSpotify) platforms.linux;
}; };
} }

View File

@ -10,7 +10,7 @@ stdenv.mkDerivation rec {
buildInputs = [ libogg ]; buildInputs = [ libogg ];
doCheck = true; # takes lots of time but will be run rarely (small build-time closure) #doCheck = true; # takes lots of time
meta = with stdenv.lib; { meta = with stdenv.lib; {
homepage = http://xiph.org/flac/; homepage = http://xiph.org/flac/;

View File

@ -23,5 +23,6 @@ pythonPackages.buildPythonPackage rec {
homepage = "https://github.com/aszlig/LastWatch"; homepage = "https://github.com/aszlig/LastWatch";
description = "An inotify-based last.fm audio scrobbler"; description = "An inotify-based last.fm audio scrobbler";
license = stdenv.lib.licenses.gpl2; license = stdenv.lib.licenses.gpl2;
platforms = stdenv.lib.platforms.linux;
}; };
} }

View File

@ -28,7 +28,7 @@ stdenv.mkDerivation rec {
buildPhase = '' buildPhase = ''
runHook preBuild runHook preBuild
ensureDir "$out" mkdir -p "$out"
scons \ scons \
-j$NIX_BUILD_CORES -l$NIX_BUILD_CORES \ -j$NIX_BUILD_CORES -l$NIX_BUILD_CORES \
$sconsFlags "prefix=$out" $sconsFlags "prefix=$out"

View File

@ -3,11 +3,11 @@
pythonPackages.buildPythonPackage rec { pythonPackages.buildPythonPackage rec {
name = "mopidy-moped-${version}"; name = "mopidy-moped-${version}";
version = "0.3.1"; version = "0.3.3";
src = fetchurl { src = fetchurl {
url = "https://github.com/martijnboland/moped/archive/v${version}.tar.gz"; url = "https://github.com/martijnboland/moped/archive/v${version}.tar.gz";
sha256 = "0sjp8vr4yfyjx233gamhg0p67zjnlpc9yq3szbw897igsh23j2yr"; sha256 = "19f3asqx7wmla53nhrxzdwj6qlkjv2rcwh34jxp27bz7nkhn0ihv";
}; };
propagatedBuildInputs = [ mopidy ]; propagatedBuildInputs = [ mopidy ];

View File

@ -5,11 +5,11 @@
pythonPackages.buildPythonPackage rec { pythonPackages.buildPythonPackage rec {
name = "mopidy-${version}"; name = "mopidy-${version}";
version = "0.19.0"; version = "0.19.3";
src = fetchurl { src = fetchurl {
url = "https://github.com/mopidy/mopidy/archive/v${version}.tar.gz"; url = "https://github.com/mopidy/mopidy/archive/v${version}.tar.gz";
sha256 = "10cnc1bipr0brk7478201cgm71lp5bci3qiaadyxv9hhcn0nmn9b"; sha256 = "0rjq69vqak1d6fhvih259wmwp50xgr6x0x5nd0hl6hlkbbysc8dp";
}; };
propagatedBuildInputs = with pythonPackages; [ propagatedBuildInputs = with pythonPackages; [

View File

@ -13,7 +13,7 @@ stdenv.mkDerivation {
''; '';
installPhase = '' installPhase = ''
ensureDir $out/bin mkdir -p $out/bin
cp praat $out/bin cp praat $out/bin
''; '';

View File

@ -43,8 +43,8 @@ in stdenv.mkDerivation rec {
phases = [ "installPhase" ]; phases = [ "installPhase" ];
installPhase = '' installPhase = ''
ensureDir $out/share/atom mkdir -p $out/share/atom
ensureDir $out/bin mkdir -p $out/bin
tar -C $out/share/atom -xvf $src tar -C $out/share/atom -xvf $src
patchelf --set-interpreter "$(cat $NIX_GCC/nix-support/dynamic-linker)" \ patchelf --set-interpreter "$(cat $NIX_GCC/nix-support/dynamic-linker)" \
$out/share/atom/atom $out/share/atom/atom

View File

@ -12,9 +12,9 @@ stdenv.mkDerivation rec {
buildInputs = [ ncurses ]; buildInputs = [ ncurses ];
installPhase = '' installPhase = ''
ensureDir $out/bin mkdir -p $out/bin
ensureDir $out/share/man/man1 mkdir -p $out/share/man/man1
ensureDir $out/share/man/man5 mkdir -p $out/share/man/man5
cp dhex $out/bin cp dhex $out/bin
cp dhex.1 $out/share/man/man1 cp dhex.1 $out/share/man/man1

View File

@ -0,0 +1,50 @@
http://bazaar.launchpad.net/~naesten/emacs/nextstep-stuff/revision/108961
diff -ru emacs-24.3-orig/src/unexmacosx.c emacs-24.3/src/unexmacosx.c
--- emacs-24.3-orig/src/unexmacosx.c 2013-01-01 21:37:17.000000000 +0100
+++ emacs-24.3/src/unexmacosx.c 2014-08-09 18:39:52.000000000 +0200
@@ -838,7 +838,7 @@
if (!(sectp->addr <= (unsigned long)my_edata
&& my_size <= sectp->size))
unexec_error ("my_edata is not in section %s", SECT_DATA);
- if (!unexec_write (sectp->offset, (void *) sectp->addr, my_size))
+ if (!unexec_write (sectp->offset, (void *) sectp->addr, sectp->size))
unexec_error ("cannot write section %s", SECT_DATA);
if (!unexec_copy (sectp->offset + my_size, old_file_offset + my_size,
sectp->size - my_size))
@@ -880,6 +880,27 @@
if (!unexec_write (header_offset, sectp, sizeof (struct section)))
unexec_error ("cannot write section %.16s's header", sectp->sectname);
}
+ else if (strncmp (sectp->sectname, "__bss", 5) == 0
+ || strncmp (sectp->sectname, "__pu_bss", 8) == 0)
+ {
+ sectp->flags = S_REGULAR;
+
+ /* These sections are produced by GCC 4.6+.
+
+ FIXME: We possibly ought to clear uninitialized local
+ variables in statically linked libraries like for
+ SECT_BSS (__bss) above, but setting up the markers we
+ need in lastfile.c would be rather messy. See
+ darwin_output_aligned_bss () in gcc/config/darwin.c for
+ the root of the problem, keeping in mind that the
+ sections are numbered by their alignment in GCC 4.6, but
+ by log2(alignment) in GCC 4.7. */
+
+ if (!unexec_write (sectp->offset, (void *) sectp->addr, sectp->size))
+ unexec_error ("cannot copy section %.16s", sectp->sectname);
+ if (!unexec_write (header_offset, sectp, sizeof (struct section)))
+ unexec_error ("cannot write section %.16s's header", sectp->sectname);
+ }
else if (strncmp (sectp->sectname, "__la_symbol_ptr", 16) == 0
|| strncmp (sectp->sectname, "__nl_symbol_ptr", 16) == 0
|| strncmp (sectp->sectname, "__got", 16) == 0
@@ -891,6 +912,7 @@
|| strncmp (sectp->sectname, "__program_vars", 16) == 0
|| strncmp (sectp->sectname, "__mod_init_func", 16) == 0
|| strncmp (sectp->sectname, "__mod_term_func", 16) == 0
+ || strncmp (sectp->sectname, "__static_data", 16) == 0
|| strncmp (sectp->sectname, "__objc_", 7) == 0)
{
if (!unexec_copy (sectp->offset, old_file_offset, sectp->size))

View File

@ -1,6 +1,6 @@
{ stdenv, fetchurl, ncurses, x11, libXaw, libXpm, Xaw3d { stdenv, fetchurl, ncurses, x11, libXaw, libXpm, Xaw3d
, pkgconfig, gtk, libXft, dbus, libpng, libjpeg, libungif , pkgconfig, gtk, libXft, dbus, libpng, libjpeg, libungif
, libtiff, librsvg, texinfo, gconf, libxml2, imagemagick, gnutls , libtiff, librsvg, texinfo, gconf, libxml2, imagemagick, openssl
, alsaLib, cairo , alsaLib, cairo
, withX ? !stdenv.isDarwin, withGTK ? true , withX ? !stdenv.isDarwin, withGTK ? true
}: }:
@ -18,13 +18,15 @@ stdenv.mkDerivation rec {
sha256 = "1385qzs3bsa52s5rcncbrkxlydkw0ajzrvfxgv8rws5fx512kakh"; sha256 = "1385qzs3bsa52s5rcncbrkxlydkw0ajzrvfxgv8rws5fx512kakh";
}; };
patches = [ ./darwin-new-sections.patch ];
buildInputs = buildInputs =
[ ncurses gconf libxml2 gnutls alsaLib pkgconfig texinfo ] [ ncurses gconf libxml2 openssl alsaLib pkgconfig texinfo ]
++ stdenv.lib.optional stdenv.isLinux dbus ++ stdenv.lib.optional stdenv.isLinux dbus
++ stdenv.lib.optionals withX ++ stdenv.lib.optionals withX
[ x11 libXaw Xaw3d libXpm libpng libjpeg libungif libtiff librsvg libXft [ x11 libXaw Xaw3d libXpm libpng libjpeg libungif libtiff librsvg libXft
imagemagick gtk ] imagemagick gtk gconf ]
++ stdenv.lib.optional stdenv.isDarwin cairo; ++ stdenv.lib.optional (stdenv.isDarwin && withX) cairo;
configureFlags = configureFlags =
( if withX && withGTK then ( if withX && withGTK then

View File

@ -17,6 +17,8 @@ stdenv.mkDerivation rec {
sha256 = "194y341zrpjp75mc3099kjc0inr1d379wwsnav257bwsc967h8yx"; sha256 = "194y341zrpjp75mc3099kjc0inr1d379wwsnav257bwsc967h8yx";
}; };
patches = [ ./darwin-new-sections.patch ];
buildInputs = [ ncurses pkgconfig texinfo libxml2 gnutls ]; buildInputs = [ ncurses pkgconfig texinfo libxml2 gnutls ];
postUnpack = '' postUnpack = ''
@ -53,16 +55,13 @@ stdenv.mkDerivation rec {
postInstall = '' postInstall = ''
cat >$out/share/emacs/site-lisp/site-start.el <<EOF cat >$out/share/emacs/site-lisp/site-start.el <<EOF
;; nixos specific load-path ;; nixos specific load-path
(when (getenv "NIX_PROFILES") (when (getenv "NIX_PROFILES") (setq load-path
(setq load-path (append (reverse (mapcar (lambda (x) (concat x "/share/emacs/site-lisp/"))
(append (reverse
(mapcar (lambda (x) (concat x "/share/emacs/site-lisp/"))
(split-string (getenv "NIX_PROFILES")))) (split-string (getenv "NIX_PROFILES"))))
load-path))) load-path)))
;; make tramp work for NixOS machines ;; make tramp work for NixOS machines
(eval-after-load 'tramp (eval-after-load 'tramp '(add-to-list 'tramp-remote-path "/run/current-system/sw/bin"))
'(add-to-list 'tramp-remote-path "/run/current-system/sw/bin"))
EOF EOF
''; '';

View File

@ -16,10 +16,10 @@ stdenv.mkDerivation rec {
installPhase = installPhase =
'' ''
ensureDir "$out/share/doc/${name}" mkdir -p "$out/share/doc/${name}"
cp -v readme.md "$out/share/doc/${name}" cp -v readme.md "$out/share/doc/${name}"
ensureDir "$out/share/emacs/site-lisp/" mkdir -p "$out/share/emacs/site-lisp/"
cp *.el "$out/share/emacs/site-lisp/" cp *.el "$out/share/emacs/site-lisp/"
''; '';

View File

@ -68,5 +68,6 @@ stdenv.mkDerivation rec {
maintainers = [ stdenv.lib.maintainers.ludo ]; maintainers = [ stdenv.lib.maintainers.ludo ];
platforms = stdenv.lib.platforms.unix; platforms = stdenv.lib.platforms.unix;
broken = true;
}; };
} }

View File

@ -93,5 +93,7 @@ in
maintainers = [ ]; maintainers = [ ];
platforms = stdenv.lib.platforms.gnu; # arbitrary choice platforms = stdenv.lib.platforms.gnu; # arbitrary choice
broken = true;
}; };
} }

View File

@ -1,12 +1,11 @@
{ stdenv, fetchgit, emacs }: { stdenv, fetchgit, emacs }:
stdenv.mkDerivation { stdenv.mkDerivation {
name = "js2-mode-0-20120712"; name = "js2-mode-0-20140114";
src = fetchgit { src = fetchgit {
url = "git://github.com/mooz/js2-mode.git"; url = "git://github.com/mooz/js2-mode.git";
rev = "f8cb9c52614e0a8e477f1ac557585ed950246c9b"; sha256 = "dbdc07b864a9506a21af445c7fb1c75fbffadaac980ee7bbf752470d8054bd65";
sha256 = "37055b7e8c1d9eee6b86f6b9b9d74ad196cc43701bc2263ffd539a3e44025047";
}; };
buildInputs = [ emacs ]; buildInputs = [ emacs ];

View File

@ -18,7 +18,7 @@ in stdenv.mkDerivation {
installPhase = '' installPhase = ''
cd emacs; cd emacs;
ensureDir "$out/share/emacs/site-lisp" "$out/bin" mkdir -p "$out/share/emacs/site-lisp" "$out/bin"
EMACSDIR=$out/share/emacs/site-lisp make simple-install install-ocamltags EMACSDIR=$out/share/emacs/site-lisp make simple-install install-ocamltags
''; '';

View File

@ -15,7 +15,7 @@ in stdenv.mkDerivation {
buildInputs = [ emacs ]; buildInputs = [ emacs ];
installPhase = '' installPhase = ''
ensureDir "$out/share/emacs/site-lisp" mkdir -p "$out/share/emacs/site-lisp"
cp *.el *.elc "$out/share/emacs/site-lisp" cp *.el *.elc "$out/share/emacs/site-lisp"
''; '';

View File

@ -16,6 +16,7 @@ let
desktopName = "PyCharm"; desktopName = "PyCharm";
genericName = "Powerful Python and Django IDE"; genericName = "Powerful Python and Django IDE";
categories = "Application;Development;"; categories = "Application;Development;";
icon = "pycharm";
}; };
buildInputs = [ makeWrapper patchelf p7zip ]; buildInputs = [ makeWrapper patchelf p7zip ];
@ -39,8 +40,9 @@ let
''; '';
installPhase = '' installPhase = ''
mkdir -vp "$out/bin" "$out/$name" mkdir -vp "$out/bin" "$out/$name" "$out/share/pixmaps"
cp -va . "$out/$name" cp -va . "$out/$name"
ln -s "$out/$name/bin/pycharm.png" "$out/share/pixmaps/"
jdk="${jdk}/lib/openjdk" jdk="${jdk}/lib/openjdk"
makeWrapper "$out/$name/bin/pycharm.sh" "$out/bin/pycharm" \ makeWrapper "$out/$name/bin/pycharm.sh" "$out/bin/pycharm" \
@ -52,12 +54,12 @@ let
cp -a "${desktopItem}"/* "$out" cp -a "${desktopItem}"/* "$out"
''; '';
meta = { meta = with stdenv.lib; {
homepage = "https://www.jetbrains.com/pycharm/"; homepage = "https://www.jetbrains.com/pycharm/";
inherit description; inherit description;
inherit license; inherit license;
maintainers = [ stdenv.lib.maintainers.jgeerds ]; maintainers = [ maintainers.jgeerds ];
platforms = stdenv.lib.platforms.linux; platforms = platforms.linux;
}; };
}; };

View File

@ -2,17 +2,19 @@
stdenv.mkDerivation (rec { stdenv.mkDerivation (rec {
pname = "nano"; pname = "nano";
version = "2.3.2"; version = "2.3.6";
name = "${pname}-${version}"; name = "${pname}-${version}";
src = fetchurl { src = fetchurl {
url = "mirror://gnu/nano/${name}.tar.gz"; url = "mirror://gnu/nano/${name}.tar.gz";
sha256 = "1s3b21h5p7r8xafw0gahswj16ai6k2vnjhmd15b491hl0x494c7z"; sha256 = "a74bf3f18b12c1c777ae737c0e463152439e381aba8720b4bc67449f36a09534";
}; };
buildInputs = [ ncurses gettext ]; buildInputs = [ ncurses gettext ];
configureFlags = "sysconfdir=/etc";
meta = { meta = {
homepage = http://www.nano-editor.org/; homepage = http://www.nano-editor.org/;
description = "A small, user-friendly console text editor"; description = "A small, user-friendly console text editor";

View File

@ -62,7 +62,7 @@ in mkDerivation rec {
''; '';
postInstall = '' postInstall = ''
ensureDir $out/Applications mkdir -p $out/Applications
cp -r src/MacVim/build/Release/MacVim.app $out/Applications cp -r src/MacVim/build/Release/MacVim.app $out/Applications
rm $out/bin/{Vimdiff,Vimtutor,Vim,ex,rVim,rview,view} rm $out/bin/{Vimdiff,Vimtutor,Vim,ex,rVim,rview,view}

View File

@ -4,8 +4,8 @@
cabal.mkDerivation (self: { cabal.mkDerivation (self: {
pname = "yi-contrib"; pname = "yi-contrib";
version = "0.8.1"; version = "0.8.2";
sha256 = "0jsbga30x302mr708vj5y7cpc961vh85dshpq2zlrf44dh0kmpvf"; sha256 = "17rbgrra1ghlywiraadf16n7igxp1k8jqqmb0iw8sc15y7825qqm";
buildDepends = [ buildDepends = [
filepath lens mtl split time transformersBase yi filepath lens mtl split time transformersBase yi
]; ];
@ -14,5 +14,6 @@ cabal.mkDerivation (self: {
description = "Add-ons to Yi, the Haskell-Scriptable Editor"; description = "Add-ons to Yi, the Haskell-Scriptable Editor";
license = "GPL"; license = "GPL";
platforms = self.ghc.meta.platforms; platforms = self.ghc.meta.platforms;
maintainers = with self.stdenv.lib.maintainers; [ fuuzetsu ];
}; };
}) })

View File

@ -15,8 +15,8 @@
cabal.mkDerivation (self: { cabal.mkDerivation (self: {
pname = "yi"; pname = "yi";
version = "0.8.1"; version = "0.8.2";
sha256 = "1hyqlydc0na9pkb3fkbp13c6vnp4f80z8237bvrv12wkk5syyn23"; sha256 = "18rnyswsdzkh0jdcqfg8pr90mpm6xf11siv598svqkxg12d2qql9";
isLibrary = true; isLibrary = true;
isExecutable = true; isExecutable = true;
buildDepends = [ buildDepends = [

View File

@ -10,7 +10,7 @@ stdenv.mkDerivation {
}; };
installPhase = '' installPhase = ''
ensureDir $out/bin $out/share mkdir -p $out/bin $out/share
cp -a . $out/share/alchemy cp -a . $out/share/alchemy
cat >> $out/bin/alchemy << EOF cat >> $out/bin/alchemy << EOF
#!/bin/sh #!/bin/sh

View File

@ -16,6 +16,6 @@ cabal.mkDerivation (self: {
description = "Executable for hoodle"; description = "Executable for hoodle";
license = self.stdenv.lib.licenses.gpl3; license = self.stdenv.lib.licenses.gpl3;
platforms = self.ghc.meta.platforms; platforms = self.ghc.meta.platforms;
maintainers = [ self.stdenv.lib.maintainers.ianwookim ]; maintainers = with self.stdenv.lib.maintainers; [ ianwookim ];
}; };
}) })

View File

@ -1,25 +1,37 @@
{stdenv, fetchurl, panotools, cmake, wxGTK, libtiff, libpng, openexr, boost { stdenv, cmake, fetchurl, gnumake, pkgconfig
, pkgconfig, exiv2, gettext, ilmbase, enblendenfuse, autopanosiftc, mesa , boost, gettext, tclap, wxGTK
, freeglut, glew, libXmu, libXi, tclap }: , freeglut, glew, libXi, libXmu, mesa
, autopanosiftc, enblendenfuse, exiv2, ilmbase, lensfun, libpng, libtiff
, openexr, panotools, perlPackages
}:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "hugin-2011.4.0"; name = "hugin-2013.0.0";
src = fetchurl { src = fetchurl {
url = "mirror://sourceforge/hugin/${name}.tar.bz2"; url = "mirror://sourceforge/hugin/${name}.tar.bz2";
sha256 = "1bnxljgqxzfdz14l7y29wzi52x1a38mghsjavnr28fr4vfmqwjrf"; sha256 = "1mgbvg09xvf0zcm9jfv5lb65nd292l86ffa23yp4pzm6izaiwkj8";
}; };
NIX_CFLAGS_COMPILE = "-I${ilmbase}/include/OpenEXR"; NIX_CFLAGS_COMPILE = "-I${ilmbase}/include/OpenEXR";
#NIX_LDFLAGS = "-lrt"; buildInputs = [ boost gettext tclap wxGTK
freeglut glew libXi libXmu mesa
exiv2 ilmbase lensfun libtiff libpng openexr panotools
];
buildInputs = [ panotools wxGTK libtiff libpng openexr boost tclap # disable installation of the python scripting interface
exiv2 gettext ilmbase mesa freeglut glew libXmu libXi ]; cmakeFlags = [ "-DBUILD_HSI:BOOl=OFF" ];
nativeBuildInputs = [ cmake pkgconfig ]; nativeBuildInputs = [ cmake pkgconfig ];
propagatedUserEnvPackages = [ enblendenfuse autopanosiftc ]; enableParallelBuilding = true;
# commandline tools needed by the hugin batch processor
# you may have to tell hugin (in the preferences) where these binaries reside
propagatedUserEnvPackages = [ autopanosiftc enblendenfuse gnumake
perlPackages.ImageExifTool
];
postInstall = '' postInstall = ''
mkdir -p "$out/nix-support" mkdir -p "$out/nix-support"

View File

@ -39,7 +39,8 @@ stdenv.mkDerivation rec {
for i in "$out/bin/"* for i in "$out/bin/"*
do do
wrapProgram "$i" --prefix PYTHONPATH : \ wrapProgram "$i" --prefix PYTHONPATH : \
"$(toPythonPath ${pyxml}):$(toPythonPath ${lxml})" || \ "$(toPythonPath ${pyxml}):$(toPythonPath ${lxml})" \
--prefix PATH : ${python}/bin || \
exit 2 exit 2
done done
rm $out/share/icons/hicolor/icon-theme.cache rm $out/share/icons/hicolor/icon-theme.cache

View File

@ -25,5 +25,6 @@ stdenv.mkDerivation rec {
homepage = http://www.kipi-plugins.org; homepage = http://www.kipi-plugins.org;
inherit (kdelibs.meta) platforms; inherit (kdelibs.meta) platforms;
maintainers = with stdenv.lib.maintainers; [ viric urkud ]; maintainers = with stdenv.lib.maintainers; [ viric urkud ];
broken = true; # it should be build from digikam sources, perhaps together
}; };
} }

View File

@ -0,0 +1,26 @@
{ stdenv, cmake, fetchurl, pkgconfig, qt5, boost, exiv2, fftwFloat, gsl
, ilmbase, lcms2, libraw, libtiff, openexr
}:
stdenv.mkDerivation rec {
name = "luminance-hdr-2.4.0";
src = fetchurl {
url = "mirror://sourceforge/qtpfsgui/${name}.tar.bz2";
sha256 = "00fldbcizrx8jcnjgq74n3zmbm27dxzl96fxa7q49689mfnlw08l";
};
NIX_CFLAGS_COMPILE = "-I${ilmbase}/include/OpenEXR";
buildInputs = [ qt5 boost exiv2 fftwFloat gsl ilmbase lcms2 libraw libtiff openexr ];
nativeBuildInputs = [ cmake pkgconfig ];
meta = with stdenv.lib; {
homepage = http://qtpfsgui.sourceforge.net/;
description = "A complete open source solution for HDR photography";
license = licenses.gpl2;
platforms = platforms.linux;
maintainers = [ maintainers.hrdinka ];
};
}

View File

@ -1,4 +1,4 @@
{ stdenv, fetchurl, buildPythonPackage, pygtk, pil }: { stdenv, fetchurl, buildPythonPackage, pygtk, pil, python27Packages }:
buildPythonPackage rec { buildPythonPackage rec {
namePrefix = ""; namePrefix = "";
@ -11,7 +11,7 @@ buildPythonPackage rec {
doCheck = false; doCheck = false;
pythonPath = [ pygtk pil ]; pythonPath = [ pygtk pil python27Packages.sqlite3 ];
meta = { meta = {
description = "Image viewer designed to handle comic books"; description = "Image viewer designed to handle comic books";

View File

@ -4,26 +4,26 @@
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "oiio-${version}"; name = "oiio-${version}";
version = "1.3.12"; version = "1.4";
src = fetchurl { src = fetchurl {
url = "https://github.com/OpenImageIO/oiio/archive/Release-${version}.zip"; url = "https://github.com/OpenImageIO/oiio/archive/RB-${version}.zip";
sha256 = "114jx4pcqhzdchzpxbwrfzqmnxr2bm8cw13g4akz1hg8pvr1dhsb"; sha256 = "0ldj3hwpz363l1zyzf6c62wc5d2cpbiszlpjvv5w6rrsx2ddbbn1";
}; };
buildInputs = [ buildInputs = [
boost cmake ilmbase libjpeg libpng libtiff opencolorio openexr unzip boost cmake ilmbase libjpeg libpng libtiff opencolorio openexr unzip
]; ];
configurePhase = ""; cmakeFlags = [
"-DUSE_PYTHON=OFF"
];
buildPhase = '' buildPhase = ''
make ILMBASE_HOME=${ilmbase} OPENEXR_HOME=${openexr} USE_PYTHON=0 \ make ILMBASE_HOME=${ilmbase} OPENEXR_HOME=${openexr} USE_PYTHON=0 \
INSTALLDIR=$out dist_dir= INSTALLDIR=$out dist_dir=
''; '';
installPhase = ":";
meta = with stdenv.lib; { meta = with stdenv.lib; {
homepage = http://www.openimageio.org; homepage = http://www.openimageio.org;
description = "A library and tools for reading and writing images"; description = "A library and tools for reading and writing images";

View File

@ -1,13 +1,14 @@
{ stdenv, fetchurl { lib, stdenv, fetchurl
, enableAlsa ? true, alsaLib ? null , enableAlsa ? true, alsaLib ? null
, enableLibao ? true, libao ? null , enableLibao ? true, libao ? null
, enableLame ? false, lame ? null , enableLame ? false, lame ? null
, enableLibmad ? true, libmad ? null , enableLibmad ? true, libmad ? null
, enableLibogg ? true, libogg ? null, libvorbis ? null , enableLibogg ? true, libogg ? null, libvorbis ? null
}: }:
let
inherit (stdenv.lib) optional optionals; with stdenv.lib;
in stdenv.mkDerivation rec {
stdenv.mkDerivation rec {
name = "sox-14.4.1"; name = "sox-14.4.1";
src = fetchurl { src = fetchurl {
@ -16,21 +17,17 @@ in stdenv.mkDerivation rec {
}; };
buildInputs = buildInputs =
(optional enableAlsa alsaLib) ++ optional (enableAlsa && stdenv.isLinux) alsaLib ++
(optional enableLibao libao) ++ optional enableLibao libao ++
(optional enableLame lame) ++ optional enableLame lame ++
(optional enableLibmad libmad) ++ optional enableLibmad libmad ++
(optionals enableLibogg [ libogg libvorbis ]); optionals enableLibogg [ libogg libvorbis ];
meta = { meta = {
description = "Sample Rate Converter for audio"; description = "Sample Rate Converter for audio";
homepage = http://www.mega-nerd.com/SRC/index.html; homepage = http://www.mega-nerd.com/SRC/index.html;
maintainers = [stdenv.lib.maintainers.marcweber stdenv.lib.maintainers.shlevy]; maintainers = [ lib.maintainers.marcweber lib.maintainers.shlevy ];
# you can choose one of the following licenses: license = lib.licenses.gpl2Plus;
license = [ platforms = lib.platforms.linux ++ lib.platforms.darwin;
"GPL"
# http://www.mega-nerd.com/SRC/libsamplerate-cul.pdf
"libsamplerate Commercial Use License"
];
}; };
} }

View File

@ -2,13 +2,13 @@
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
version = "2.9.2"; version = "2.10.1";
name = "bibletime-${version}"; name = "bibletime-${version}";
src = fetchurl { src = fetchurl {
url = "mirror://sourceforge/bibletime/${name}.tar.bz2"; url = "mirror://sourceforge/bibletime/${name}.tar.xz";
sha256 = "1j4kc24qvhqlbqspczmkxvw09mnvgg9m4zs1y9f68505kd0pfg1r"; sha256 = "14fayy5h1ffjxin669q56fflxn4ij1irgn60cygwx2y02cwxbll6";
}; };
prePatch = '' prePatch = ''

View File

@ -2,12 +2,12 @@
, pkgconfig, protobuf, qrencode }: , pkgconfig, protobuf, qrencode }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
version = "0.9.1"; version = "0.9.2.1";
name = "bitcoin-${version}"; name = "bitcoin-${version}";
src = fetchurl { src = fetchurl {
url = "https://bitcoin.org/bin/${version}/${name}-linux.tar.gz"; url = "https://bitcoin.org/bin/${version}/${name}-linux.tar.gz";
sha256 = "3fabc1c629007b465a278525883663d41a2ba62699f2773536a8bf59ca210425"; sha256 = "0060f7d38b98113ab912d4c184000291d7f026eaf77ca5830deec15059678f54";
}; };
# hexdump from utillinux is required for tests # hexdump from utillinux is required for tests

View File

@ -3,6 +3,7 @@
, libtiff, mesa, openal, opencolorio, openexr, openimageio, openjpeg, python , libtiff, mesa, openal, opencolorio, openexr, openimageio, openjpeg, python
, zlib, fftw , zlib, fftw
, jackaudioSupport ? false, jack2 , jackaudioSupport ? false, jack2
, cudaSupport ? false, cudatoolkit6
}: }:
with lib; with lib;
@ -12,27 +13,22 @@ stdenv.mkDerivation rec {
src = fetchurl { src = fetchurl {
url = "http://download.blender.org/source/${name}.tar.gz"; url = "http://download.blender.org/source/${name}.tar.gz";
sha256 = "18pzcnrs4rcb6mf6aqr9xj2r05v8aay8daj31395ljfzw667zakx"; sha256 = "12aqdrpl86xjk2xdwj2nbfcmdzyv61n443gw6j2japffm1kmlz8x";
}; };
buildInputs = buildInputs =
[ SDL boost cmake ffmpeg gettext glew ilmbase libXi [ SDL boost cmake ffmpeg gettext glew ilmbase libXi
libjpeg libpng libsamplerate libsndfile libtiff mesa openal libjpeg libpng libsamplerate libsndfile libtiff mesa openal
opencolorio openexr openimageio /* openjpeg */ python zlib fftw opencolorio openexr openimageio /* openjpeg */ python zlib fftw
] ++ optional jackaudioSupport jack2; ]
++ optional jackaudioSupport jack2
++ optional cudaSupport cudatoolkit6;
postUnpack = postUnpack =
'' ''
substituteInPlace */doc/manpage/blender.1.py --replace /usr/bin/python ${python}/bin/python3 substituteInPlace */doc/manpage/blender.1.py --replace /usr/bin/python ${python}/bin/python3
''; '';
patches = [(fetchpatch { # fix parallel builds
url = "https://developer.blender.org/D619?download=true";
sha256 = "18h4fqsbpwxzqz7qby18lrrbzqnyd5xnann3xcac5wddwv5wjb0f";
name = "D619.diff";
})];
patchFlags = "-p0";
cmakeFlags = cmakeFlags =
[ "-DOPENEXR_INC=${openexr}/include/OpenEXR" [ "-DOPENEXR_INC=${openexr}/include/OpenEXR"
"-DWITH_OPENCOLLADA=OFF" "-DWITH_OPENCOLLADA=OFF"
@ -45,7 +41,8 @@ stdenv.mkDerivation rec {
"-DPYTHON_INCLUDE_DIR=${python}/include/python${python.majorVersion}m" "-DPYTHON_INCLUDE_DIR=${python}/include/python${python.majorVersion}m"
"-DPYTHON_VERSION=${python.majorVersion}" "-DPYTHON_VERSION=${python.majorVersion}"
] ]
++ optional jackaudioSupport "-DWITH_JACK=ON"; ++ optional jackaudioSupport "-DWITH_JACK=ON"
++ optional cudaSupport "-DWITH_CYCLES_CUDA_BINARIES=ON";
NIX_CFLAGS_COMPILE = "-I${ilmbase}/include/OpenEXR -I${python}/include/${python.libPrefix}m"; NIX_CFLAGS_COMPILE = "-I${ilmbase}/include/OpenEXR -I${python}/include/${python.libPrefix}m";

View File

@ -4,11 +4,11 @@
}: }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "calibre-1.47.0"; name = "calibre-1.48.0";
src = fetchurl { src = fetchurl {
url = "mirror://sourceforge/calibre/${name}.tar.xz"; url = "mirror://sourceforge/calibre/${name}.tar.xz";
sha256 = "1hmqynxh9h12whcjwcd5idgc6mdaggczsf4hm70ajhj7pfjp3szg"; sha256 = "0wplmf3p4s5zwn9ri8ry18bx7k3pw1c1ngrc4msf7i8icq7hj177";
}; };
inherit python; inherit python;

View File

@ -17,7 +17,7 @@ stdenv.mkDerivation rec {
''; '';
installPhase = '' installPhase = ''
ensureDir $out/bin mkdir -p $out/bin
cp bin/* $out/bin cp bin/* $out/bin
''; '';

View File

@ -1,18 +1,15 @@
{ stdenv, fetchgit, coreutils , unzip, which, pkgconfig , dbus { stdenv, fetchurl, coreutils , unzip, which, pkgconfig , dbus
, freetype, xdg_utils , libXext, glib, pango , cairo, libX11, libnotify , freetype, xdg_utils , libXext, glib, pango , cairo, libX11, libnotify
, libxdg_basedir , libXScrnSaver, xproto, libXinerama , perl, gdk_pixbuf , libxdg_basedir , libXScrnSaver, xproto, libXinerama , perl, gdk_pixbuf
}: }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
rev = "6a3a855b48a3db64821d1cf8a91c5ee2815a2b2d"; name = "dunst-1.1.0";
name = "dunst-0-${stdenv.lib.strings.substring 0 7 rev}"; version = "1.1.0";
# 1.0.0 release doesn't include 100% CPU fix src = fetchurl {
# https://github.com/knopwob/dunst/issues/98 url = "https://github.com/knopwob/dunst/archive/v${version}.tar.gz";
src = fetchgit { sha256 = "0x95f57s0a96c4lifxdpf73v706iggwmdw8742mabbjnxq55l1qs";
inherit rev;
url = "https://github.com/knopwob/dunst.git";
sha256 = "0m7yki16d72xm9n2m2fjszd8phqpn5b95q894cz75pmd0sv1j6bj";
}; };
patchPhase = '' patchPhase = ''
@ -26,7 +23,7 @@ stdenv.mkDerivation rec {
libXScrnSaver xproto libXinerama perl]; libXScrnSaver xproto libXinerama perl];
buildPhase = '' buildPhase = ''
export VERSION=${rev}; export VERSION=${version};
export PREFIX=$out; export PREFIX=$out;
make dunst; make dunst;
''; '';

View File

@ -0,0 +1,48 @@
{ stdenv, fetchurl, pkgconfig, makeWrapper, gtk, gnome3, libgksu,
intltool, libstartup_notification, gtk_doc
}:
stdenv.mkDerivation rec {
version = "2.0.2";
pname = "gksu";
name = "${pname}-${version}";
src = fetchurl {
url = "http://people.debian.org/~kov/gksu/${name}.tar.gz";
sha256 = "0npfanlh28daapkg25q4fncxd89rjhvid5fwzjaw324x0g53vpm1";
};
patches = [
# https://savannah.nongnu.org/bugs/index.php?36127
./gksu-2.0.2-glib-2.31.patch
];
postPatch = ''
sed -i -e 's|/usr/bin/x-terminal-emulator|-l gnome-terminal|g' gksu.desktop
'';
configureFlags = "--disable-nautilus-extension";
buildInputs = [
pkgconfig makeWrapper gtk gnome3.gconf intltool
libstartup_notification gnome3.libgnome_keyring gtk_doc
];
propagatedBuildInputs = [
libgksu
];
meta = {
description = "A graphical frontend for libgksu";
longDescription = ''
GKSu is a library that provides a Gtk+ frontend to su and sudo.
It supports login shells and preserving environment when acting as
a su frontend. It is useful to menu items or other graphical
programs that need to ask a user's password to run another program
as another user.
'';
homepage = "http://www.nongnu.org/gksu/";
license = stdenv.lib.licenses.gpl2;
maintainers = [ stdenv.lib.maintainers.romildo ];
};
}

View File

@ -0,0 +1,29 @@
From 10c7e67e11a56e2fe1acf9b085772bc995d35bc0 Mon Sep 17 00:00:00 2001
From: Alexandre Rostovtsev <tetromino@gentoo.org>
Date: Sat, 7 Apr 2012 17:57:36 -0400
Subject: [PATCH] Fix glib includes for building with >=glib-2.31
glib-2.31 and newer no longer allow most glib subheaders to be included
directly.
https://savannah.nongnu.org/bugs/index.php?36127
---
nautilus-gksu/libnautilus-gksu.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/nautilus-gksu/libnautilus-gksu.c b/nautilus-gksu/libnautilus-gksu.c
index 8e44d29..4acf3f8 100644
--- a/nautilus-gksu/libnautilus-gksu.c
+++ b/nautilus-gksu/libnautilus-gksu.c
@@ -5,7 +5,7 @@
#include <string.h>
#include <pthread.h>
-#include <glib/gkeyfile.h>
+#include <glib.h>
#include <gtk/gtk.h>
#include <gio/gio.h>
#include <libnautilus-extension/nautilus-extension-types.h>
--
1.7.8.5

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