merge master into x-updates (would-be fast-forward)

This commit is contained in:
Vladimír Čunát 2014-03-08 11:22:11 +01:00
commit 39cf7bd19a
424 changed files with 8061 additions and 2726 deletions

View File

@ -1 +1 @@
14.02 14.04

View File

@ -1,7 +1,7 @@
Nixpkgs is a collection of packages for [Nix](http://nixos.org/nix/) package Nixpkgs is a collection of packages for [Nix](http://nixos.org/nix/) package
manager. Nixpkgs also includes [NixOS](http://nixos.org/nixos/) linux distribution source code. manager. Nixpkgs also includes [NixOS](http://nixos.org/nixos/) linux distribution source code.
* [NixOS installation instructions](http://nixos.org/nixos/manual/#idm139984689550080) * [NixOS installation instructions](http://nixos.org/nixos/manual/#installing-nixos)
* [Manual (How to write packages for Nix)](http://nixos.org/nixpkgs/manual/) * [Manual (How to write packages for Nix)](http://nixos.org/nixpkgs/manual/)
* [Manual (NixOS)](http://nixos.org/nixos/manual/) * [Manual (NixOS)](http://nixos.org/nixos/manual/)
* [Continuous build](http://hydra.nixos.org/jobset/nixos/trunk-combined) * [Continuous build](http://hydra.nixos.org/jobset/nixos/trunk-combined)

View File

@ -235,12 +235,7 @@ Most of the time, these are the same. For instance, the package
bound to the variable name <varname>e2fsprogs</varname> in bound to the variable name <varname>e2fsprogs</varname> in
<filename>all-packages.nix</filename>, and the Nix expression is in <filename>all-packages.nix</filename>, and the Nix expression is in
<filename>pkgs/os-specific/linux/e2fsprogs/default.nix</filename>. <filename>pkgs/os-specific/linux/e2fsprogs/default.nix</filename>.
However, identifiers in the Nix language dont allow certain </para>
characters (e.g. dashes), so sometimes a different variable name
should be used. For instance, the
<literal>module-init-tools</literal> package is bound to the
<literal>module_init_tools</literal> variable in
<filename>all-packages.nix</filename>.</para>
<para>There are a few naming guidelines: <para>There are a few naming guidelines:
@ -261,17 +256,20 @@ should be used. For instance, the
a package named <literal>hello-svn</literal> by a package named <literal>hello-svn</literal> by
<command>nix-env</command>.</para></listitem> <command>nix-env</command>.</para></listitem>
<listitem><para>Dashes in the package name should be changed to <listitem><para>Dashes in the package name should be preserved
underscores in variable names, rather than to camel case — e.g., in new variable names, rather than converted to underscores
<varname>module_init_tools</varname> instead of (which was convention up to around 2013 and most names
<varname>moduleInitTools</varname>.</para></listitem> still have underscores instead of dashes) — e.g.,
<varname>http-parser</varname> instead of
<varname>http_parser</varname>.</para></listitem>
<listitem><para>If there are multiple versions of a package, this <listitem><para>If there are multiple versions of a package, this
should be reflected in the variable names in should be reflected in the variable names in
<filename>all-packages.nix</filename>, <filename>all-packages.nix</filename>,
e.g. <varname>hello_0_3</varname> and <varname>hello_0_4</varname>. e.g. <varname>json-c-0-9</varname> and <varname>json-c-0-11</varname>.
If there is an obvious “default” version, make an attribute like If there is an obvious “default” version, make an attribute like
<literal>hello = hello_0_4;</literal>.</para></listitem> <literal>json-c = json-c-0-9;</literal>.
See also <xref linkend="sec-versioning" /></para></listitem>
</itemizedlist> </itemizedlist>
@ -288,7 +286,7 @@ dashes between words — not in camel case. For instance, it should be
<filename>allPackages.nix</filename> or <filename>allPackages.nix</filename> or
<filename>AllPackages.nix</filename>.</para> <filename>AllPackages.nix</filename>.</para>
<section><title>Hierachy</title> <section><title>Hierarchy</title>
<para>Each package should be stored in its own directory somewhere in <para>Each package should be stored in its own directory somewhere in
the <filename>pkgs/</filename> tree, i.e. in the <filename>pkgs/</filename> tree, i.e. in
@ -567,7 +565,7 @@ splitting up an existing category.</para>
</section> </section>
<section><title>Versioning</title> <section xml:id="sec-versioning"><title>Versioning</title>
<para>Because every version of a package in Nixpkgs creates a <para>Because every version of a package in Nixpkgs creates a
potential maintenance burden, old versions of a package should not be potential maintenance burden, old versions of a package should not be

View File

@ -1156,12 +1156,27 @@ echo @foo@
to Qts path.</para></listitem> to Qts path.</para></listitem>
</varlistentry> </varlistentry>
<varlistentry>
<term>gdk-pixbuf</term>
<listitem><para>Exports <envar>GDK_PIXBUF_MODULE_FILE</envar>
environment variable the the builder. Add librsvg package
to <varname>buildInputs</varname> to get svg support.</para></listitem>
</varlistentry>
<varlistentry> <varlistentry>
<term>GHC</term> <term>GHC</term>
<listitem><para>Creates a temporary package database and registers <listitem><para>Creates a temporary package database and registers
every Haskell build input in it (TODO: how?).</para></listitem> every Haskell build input in it (TODO: how?).</para></listitem>
</varlistentry> </varlistentry>
<varlistentry>
<term>GStreamer</term>
<listitem><para>Adds the
GStreamer plugins subdirectory of
each build input to the <envar>GST_PLUGIN_SYSTEM_PATH_1_0</envar> or
<envar>GST_PLUGIN_SYSTEM_PATH</envar> environment variable.</para></listitem>
</varlistentry>
</variablelist> </variablelist>
</para> </para>

View File

@ -28,6 +28,7 @@
garbas = "Rok Garbas <rok@garbas.si>"; garbas = "Rok Garbas <rok@garbas.si>";
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>";
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>";
@ -43,6 +44,7 @@
matejc = "Matej Cotman <cotman.matej@gmail.com>"; matejc = "Matej Cotman <cotman.matej@gmail.com>";
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>";
ocharles = "Oliver Charles <ollie@ocharles.org.uk>"; ocharles = "Oliver Charles <ollie@ocharles.org.uk>";
offline = "Jaka Hudoklin <jakahudoklin@gmail.com>"; offline = "Jaka Hudoklin <jakahudoklin@gmail.com>";
orbitz = "Malcolm Matalka <mmatalka@gmail.com>"; orbitz = "Malcolm Matalka <mmatalka@gmail.com>";
@ -57,6 +59,7 @@
rob = "Rob Vermaas <rob.vermaas@gmail.com>"; rob = "Rob Vermaas <rob.vermaas@gmail.com>";
roconnor = "Russell O'Connor <roconnor@theorem.ca>"; roconnor = "Russell O'Connor <roconnor@theorem.ca>";
roelof = "Roelof Wobben <rwobben@hotmail.com>"; roelof = "Roelof Wobben <rwobben@hotmail.com>";
romildo = "José Romildo Malaquias <malaquias@gmail.com>";
rszibele = "Richard Szibele <richard_szibele@hotmail.com>"; rszibele = "Richard Szibele <richard_szibele@hotmail.com>";
sander = "Sander van der Burg <s.vanderburg@tudelft.nl>"; sander = "Sander van der Burg <s.vanderburg@tudelft.nl>";
shlevy = "Shea Levy <shea@shealevy.com>"; shlevy = "Shea Levy <shea@shealevy.com>";
@ -67,12 +70,14 @@
the-kenny = "Moritz Ulrich <moritz@tarn-vedra.de>"; the-kenny = "Moritz Ulrich <moritz@tarn-vedra.de>";
thoughtpolice = "Austin Seipp <aseipp@pobox.com>"; thoughtpolice = "Austin Seipp <aseipp@pobox.com>";
tomberek = "Thomas Bereknyei <tomberek@gmail.com>"; tomberek = "Thomas Bereknyei <tomberek@gmail.com>";
ttuegel = "Thomas Tuegel <ttuegel@gmail.com>";
urkud = "Yury G. Kudryashov <urkud+nix@ya.ru>"; urkud = "Yury G. Kudryashov <urkud+nix@ya.ru>";
vcunat = "Vladimír Čunát <vcunat@gmail.com>"; vcunat = "Vladimír Čunát <vcunat@gmail.com>";
viric = "Lluís Batlle i Rossell <viric@viric.name>"; viric = "Lluís Batlle i Rossell <viric@viric.name>";
vizanto = "Danny Wilson <danny@prime.vc>"; vizanto = "Danny Wilson <danny@prime.vc>";
vlstill = "Vladimír Štill <xstill@fi.muni.cz>"; vlstill = "Vladimír Štill <xstill@fi.muni.cz>";
winden = "Antonio Vargas Gonzalez <windenntw@gmail.com>"; winden = "Antonio Vargas Gonzalez <windenntw@gmail.com>";
wizeman = "Ricardo M. Correia <rcorreia@wizy.org>";
z77z = "Marco Maggesi <maggesi@math.unifi.it>"; z77z = "Marco Maggesi <maggesi@math.unifi.it>";
zef = "Zef Hemel <zef@zef.me>"; zef = "Zef Hemel <zef@zef.me>";
zimbatm = "zimbatm <zimbatm@zimbatm.com>"; zimbatm = "zimbatm <zimbatm@zimbatm.com>";

View File

@ -10,7 +10,6 @@ with import ./strings.nix;
rec { rec {
isType = type: x: (x._type or "") == type; isType = type: x: (x._type or "") == type;
typeOf = x: x._type or "";
setType = typeName: value: value // { setType = typeName: value: value // {
_type = typeName; _type = typeName;

View File

@ -1,5 +1,6 @@
<chapter xmlns="http://docbook.org/ns/docbook" <chapter xmlns="http://docbook.org/ns/docbook"
xmlns:xlink="http://www.w3.org/1999/xlink"> xmlns:xlink="http://www.w3.org/1999/xlink"
xml:id="installing-nixos">
<title>Installing NixOS</title> <title>Installing NixOS</title>

View File

@ -21,6 +21,10 @@ enhancements are the following:
<listitem><para>NixOS is now based on Glibc 2.18 and GCC <listitem><para>NixOS is now based on Glibc 2.18 and GCC
4.8.</para></listitem> 4.8.</para></listitem>
<listitem><para>The mysql55 service has been merged into the
mysql service, which no longer sets a default for the 'package
option.</para></listitem>
</itemizedlist> </itemizedlist>
</para> </para>

View File

@ -144,6 +144,13 @@ sub runTests {
} }
}); });
$log->nest("syncing", sub {
foreach my $vm (values %vms) {
next unless $vm->isUp();
$vm->execute("sync /tmp/xchg");
}
});
if ($nrTests != 0) { if ($nrTests != 0) {
$log->log("$nrSucceeded out of $nrTests tests succeeded", $log->log("$nrSucceeded out of $nrTests tests succeeded",
($nrSucceeded < $nrTests ? { error => 1 } : { })); ($nrSucceeded < $nrTests ? { error => 1 } : { }));

View File

@ -67,62 +67,16 @@ rec {
}; };
# Generate a coverage report from the coverage data produced by
# runTests.
makeReport = x: runCommand "report" { buildInputs = [rsync]; }
''
mkdir -p $TMPDIR/gcov/
for d in ${x}/coverage-data/*; do
echo "doing $d"
[ -n "$(ls -A "$d")" ] || continue
for i in $(cd $d/nix/store && ls); do
if ! test -e $TMPDIR/gcov/nix/store/$i; then
echo "copying $i"
mkdir -p $TMPDIR/gcov/$(echo $i | cut -c34-)
rsync -rv /nix/store/$i/.build/* $TMPDIR/gcov/
fi
done
chmod -R u+w $TMPDIR/gcov
find $TMPDIR/gcov -name "*.gcda" -exec rm {} \;
for i in $(cd $d/nix/store && ls); do
rsync -rv $d/nix/store/$i/.build/* $TMPDIR/gcov/
done
find $TMPDIR/gcov -name "*.gcda" -exec chmod 644 {} \;
echo "producing info..."
${pkgs.lcov}/bin/geninfo --ignore-errors source,gcov $TMPDIR/gcov --output-file $TMPDIR/app.info
cat $TMPDIR/app.info >> $TMPDIR/full.info
done
echo "making report..."
mkdir -p $out/coverage
${pkgs.lcov}/bin/genhtml --show-details $TMPDIR/full.info -o $out/coverage
cp $TMPDIR/full.info $out/coverage/
mkdir -p $out/nix-support
cat ${x}/nix-support/hydra-build-products >> $out/nix-support/hydra-build-products
echo "report coverage $out/coverage" >> $out/nix-support/hydra-build-products
[ ! -e ${x}/nix-support/failed ] || touch $out/nix-support/failed
''; # */
makeTest = testFun: complete (call testFun); makeTest = testFun: complete (call testFun);
makeTests = testsFun: lib.mapAttrs (name: complete) (call testsFun); makeTests = testsFun: lib.mapAttrs (name: complete) (call testsFun);
apply = makeTest; # compatibility apply = makeTest; # compatibility
call = f: f { inherit pkgs system; }; call = f: f { inherit pkgs system; };
complete = t: t // rec { complete = { testScript, ... } @ t: t // rec {
nodes = buildVirtualNetwork ( nodes = buildVirtualNetwork (
if t ? nodes then t.nodes else t.nodes or (if t ? machine then { machine = t.machine; } else { }));
if t ? machine then { machine = t.machine; }
else { } );
testScript = testScript =
# Call the test script with the computed nodes. # Call the test script with the computed nodes.
@ -162,7 +116,7 @@ rec {
test = runTests driver; test = runTests driver;
report = makeReport test; report = releaseTools.gcovReport { coverageRuns = [ test ]; };
}; };

View File

@ -77,7 +77,7 @@ in {
}; };
package = mkOption { package = mkOption {
type = types.path; type = types.package;
default = pulseaudio; default = pulseaudio;
example = literalExample "pulseaudio.override { jackaudioSupport = true; }"; example = literalExample "pulseaudio.override { jackaudioSupport = true; }";
description = '' description = ''

View File

@ -256,7 +256,7 @@ foreach my $fs (read_file("/proc/self/mountinfo")) {
$mountPoint = "/" if $mountPoint eq ""; $mountPoint = "/" if $mountPoint eq "";
# Skip special filesystems. # Skip special filesystems.
next if in($mountPoint, "/proc") || in($mountPoint, "/dev") || in($mountPoint, "/sys") || in($mountPoint, "/run"); next if in($mountPoint, "/proc") || in($mountPoint, "/dev") || in($mountPoint, "/sys") || in($mountPoint, "/run") || $mountPoint eq "/var/lib/nfs/rpc_pipefs";
# Skip the optional fields. # Skip the optional fields.
my $n = 6; $n++ while $fields[$n] ne "-"; $n++; my $n = 6; $n++ while $fields[$n] ne "-"; $n++;
@ -305,7 +305,15 @@ EOF
fileSystems.\"$mountPoint\" = fileSystems.\"$mountPoint\" =
{ device = \"$device\"; { device = \"$device\";
fsType = \"$fsType\"; fsType = \"$fsType\";
options = \"${\join ",", uniq(@extraOptions, @superOptions, @mountOptions)}\"; EOF
if (scalar @extraOptions > 0) {
$fileSystems .= <<EOF;
options = \"${\join ",", uniq(@extraOptions)}\";
EOF
}
$fileSystems .= <<EOF;
}; };
EOF EOF

View File

@ -228,7 +228,7 @@ else
escapeQuotes () { eval echo "$1"; } escapeQuotes () { eval echo "$1"; }
nixMap escapeQuotes "$names" nixMap escapeQuotes "$names"
else else
echo 1>&2 "An error occured while looking for attribute names." echo 1>&2 "An error occurred while looking for attribute names."
echo $result echo $result
fi fi
fi fi

View File

@ -113,6 +113,8 @@
munin = 102; munin = 102;
logcheck = 103; logcheck = 103;
nix-ssh = 104; nix-ssh = 104;
dictd = 105;
couchdb = 106;
# When adding a uid, make sure it doesn't match an existing gid. # When adding a uid, make sure it doesn't match an existing gid.
@ -204,6 +206,8 @@
connman = 94; connman = 94;
munin = 95; munin = 95;
keys = 96; keys = 96;
dictd = 105;
couchdb = 106;
# When adding a gid, make sure it doesn't match an existing uid. # When adding a gid, make sure it doesn't match an existing uid.

View File

@ -78,16 +78,17 @@
./services/backup/bacula.nix ./services/backup/bacula.nix
./services/backup/mysql-backup.nix ./services/backup/mysql-backup.nix
./services/backup/postgresql-backup.nix ./services/backup/postgresql-backup.nix
./services/backup/sitecopy-backup.nix
./services/backup/rsnapshot.nix ./services/backup/rsnapshot.nix
./services/backup/sitecopy-backup.nix
./services/backup/tarsnap.nix
./services/databases/4store-endpoint.nix ./services/databases/4store-endpoint.nix
./services/databases/4store.nix ./services/databases/4store.nix
./services/databases/couchdb.nix
./services/databases/firebird.nix ./services/databases/firebird.nix
./services/databases/memcached.nix ./services/databases/memcached.nix
./services/databases/mongodb.nix ./services/databases/mongodb.nix
./services/databases/redis.nix ./services/databases/redis.nix
./services/databases/mysql.nix ./services/databases/mysql.nix
./services/databases/mysql55.nix
./services/databases/openldap.nix ./services/databases/openldap.nix
./services/databases/postgresql.nix ./services/databases/postgresql.nix
./services/databases/virtuoso.nix ./services/databases/virtuoso.nix

View File

@ -45,7 +45,7 @@ in
TERMINFO_DIRS = [ "${i}/share/terminfo" ]; TERMINFO_DIRS = [ "${i}/share/terminfo" ];
PERL5LIB = [ "${i}/lib/perl5/site_perl" ]; PERL5LIB = [ "${i}/lib/perl5/site_perl" ];
ALSA_PLUGIN_DIRS = [ "${i}/lib/alsa-lib" ]; ALSA_PLUGIN_DIRS = [ "${i}/lib/alsa-lib" ];
GST_PLUGIN_PATH = [ "${i}/lib/gstreamer-0.10" ]; GST_PLUGIN_SYSTEM_PATH = [ "${i}/lib/gstreamer-0.10" ];
KDEDIRS = [ "${i}" ]; KDEDIRS = [ "${i}" ];
STRIGI_PLUGIN_PATH = [ "${i}/lib/strigi/" ]; STRIGI_PLUGIN_PATH = [ "${i}/lib/strigi/" ];
QT_PLUGIN_PATH = [ "${i}/lib/qt4/plugins" "${i}/lib/kde4/plugins" ]; QT_PLUGIN_PATH = [ "${i}/lib/qt4/plugins" "${i}/lib/kde4/plugins" ];

View File

@ -56,7 +56,7 @@ let
inherit visible; inherit visible;
}); });
} }
{ config = setTo (mkIf (fromOf options).isDefined (define (mkMerge (fromOf options).definitions))); { config = setTo (mkMerge (if (fromOf options).isDefined then [ (define (mkMerge (fromOf options).definitions)) ] else []));
} }
]; ];
@ -115,14 +115,12 @@ in zipModules ([]
# !!! this hardcodes bash, could we detect from config which shell is actually used? # !!! this hardcodes bash, could we detect from config which shell is actually used?
++ obsolete [ "environment" "promptInit" ] [ "programs" "bash" "promptInit" ] ++ obsolete [ "environment" "promptInit" ] [ "programs" "bash" "promptInit" ]
++ obsolete [ "services" "xserver" "driSupport" ] [ "services" "mesa" "driSupport" ] ++ obsolete [ "services" "xserver" "driSupport" ] [ "hardware" "opengl" "driSupport" ]
++ obsolete [ "services" "xserver" "driSupport32Bit" ] [ "services" "mesa" "driSupport32Bit" ] ++ obsolete [ "services" "xserver" "driSupport32Bit" ] [ "hardware" "opengl" "driSupport32Bit" ]
++ obsolete [ "services" "xserver" "s3tcSupport" ] [ "services" "mesa" "s3tcSupport" ] ++ obsolete [ "services" "xserver" "s3tcSupport" ] [ "hardware" "opengl" "s3tcSupport" ]
++ obsolete [ "services" "xserver" "videoDrivers" ] [ "services" "mesa" "videoDrivers" ] ++ obsolete [ "services" "xserver" "videoDrivers" ] [ "hardware" "opengl" "videoDrivers" ]
++ obsolete [ "services" "mesa" "driSupport" ] [ "hardware" "opengl" "driSupport" ]
++ obsolete [ "services" "mesa" "driSupport32Bit" ] [ "hardware" "opengl" "driSupport32Bit" ] ++ obsolete [ "services" "mysql55" ] [ "services" "mysql" ]
++ obsolete [ "services" "mesa" "s3tcSupport" ] [ "hardware" "opengl" "s3tcSupport" ]
++ obsolete [ "services" "mesa" "videoDrivers" ] [ "hardware" "opengl" "videoDrivers" ]
# Options that are obsolete and have no replacement. # Options that are obsolete and have no replacement.
++ obsolete' [ "boot" "loader" "grub" "bootDevice" ] ++ obsolete' [ "boot" "loader" "grub" "bootDevice" ]

View File

@ -0,0 +1,203 @@
{ config, pkgs, ... }:
with pkgs.lib;
let
cfg = config.services.tarsnap;
optionalNullStr = e: v: if e == null then "" else v;
configFile = pkgs.writeText "tarsnap.conf" ''
cachedir ${cfg.cachedir}
keyfile ${cfg.keyfile}
${optionalString cfg.nodump "nodump"}
${optionalString cfg.printStats "print-stats"}
${optionalNullStr cfg.checkpointBytes "checkpoint-bytes "+cfg.checkpointBytes}
${optionalString cfg.aggressiveNetworking "aggressive-networking"}
${concatStringsSep "\n" (map (v: "exclude "+v) cfg.excludes)}
${concatStringsSep "\n" (map (v: "include "+v) cfg.includes)}
${optionalString cfg.lowmem "lowmem"}
${optionalString cfg.verylowmem "verylowmem"}
'';
in
{
options = {
services.tarsnap = {
enable = mkOption {
type = types.bool;
default = false;
description = ''
If enabled, NixOS will periodically create backups of the
specified directories using the <literal>tarsnap</literal>
backup service. This installs a <literal>systemd</literal>
service called <literal>tarsnap-backup</literal> which is
periodically run by cron, or you may run it on-demand.
See <link xlink:href='http://www.tarsnap.com/gettingstarted.html'>Getting Started</link>
Tarsnap page.
'';
};
label = mkOption {
type = types.str;
default = "nixos";
description = ''
Specifies the label for archives created by Tarsnap. The
full name will be
<literal>label-$(date+"%Y%m%d%H%M%S")</literal>. For
example, by default your backups will look similar to
<literal>nixos-20140301021501</literal>.
'';
};
cachedir = mkOption {
type = types.path;
default = "/var/cache/tarsnap";
description = ''
Tarsnap operations use a "cache directory" which allows
Tarsnap to identify which blocks of data have been
previously stored; this directory is specified via the
<literal>cachedir</literal> option. If the cache directory
is lost or out of date, tarsnap creation/deletion operations
will exit with an error message instructing you to run
<literal>tarsnap --fsck</literal> to regenerate the cache
directory.
'';
};
keyfile = mkOption {
type = types.path;
default = "/root/tarsnap.key";
description = ''
Path to the keyfile which identifies the machine associated
with your Tarsnap account. This file can be created using
the <literal>tarsnap-keygen</literal> utility, and providing
your Tarsnap login credentials.
'';
};
nodump = mkOption {
type = types.bool;
default = true;
description = ''
If set to <literal>true</literal>, then don't archive files
which have the <literal>nodump</literal> flag set.
'';
};
printStats = mkOption {
type = types.bool;
default = true;
description = "Print statistics when creating archives.";
};
checkpointBytes = mkOption {
type = types.nullOr types.str;
default = "1G";
description = ''
Create a checkpoint per a particular amount of uploaded
data. By default, Tarsnap will create checkpoints once per
GB of data uploaded. At minimum,
<literal>checkpointBytes</literal> must be 1GB.
Can also be set to <literal>null</literal> to disable
checkpointing.
'';
};
period = mkOption {
type = types.str;
default = "15 01 * * *";
description = ''
This option defines (in the format used by cron) when
tarsnap is run for backups. The default is to update at
01:15 at night every day.
'';
};
aggressiveNetworking = mkOption {
type = types.bool;
default = false;
description = ''
Aggressive network behaviour: Use multiple TCP connections
when writing archives. Use of this option is recommended
only in cases where TCP congestion control is known to be
the limiting factor in upload performance.
'';
};
directories = mkOption {
type = types.listOf types.path;
default = [];
description = "List of filesystem paths to archive.";
};
excludes = mkOption {
type = types.listOf types.str;
default = [];
description = ''
Exclude files and directories matching the specified patterns.
'';
};
includes = mkOption {
type = types.listOf types.str;
default = [];
description = ''
Include only files and directories matching the specified patterns.
Note that exclusions specified via
<literal>excludes</literal> take precedence over inclusions.
'';
};
lowmem = mkOption {
type = types.bool;
default = false;
description = ''
Attempt to reduce tarsnap memory consumption. This option
will slow down the process of creating archives, but may
help on systems where the average size of files being backed
up is less than 1 MB.
'';
};
verylowmem = mkOption {
type = types.bool;
default = false;
description = ''
Try even harder to reduce tarsnap memory consumption. This
can significantly slow down tarsnap, but reduces its memory
usage by an additional factor of 2 beyond what the
<literal>lowmem</literal> option does.
'';
};
};
};
config = mkIf cfg.enable {
assertions =
[ { assertion = cfg.directories != [];
message = "Must specify directories for Tarsnap to back up";
}
{ assertion = cfg.lowmem -> !cfg.verylowmem && (cfg.verylowmem -> !cfg.lowmem);
message = "You cannot set both lowmem and verylowmem";
}
];
systemd.services.tarsnap-backup = {
description = "Tarsnap Backup process";
path = [ pkgs.tarsnap pkgs.coreutils ];
script = ''
mkdir -p -m 0755 $(dirname ${cfg.cachedir})
mkdir -p -m 0600 ${cfg.cachedir}
exec tarsnap --configfile ${configFile} -c -f ${cfg.label}-$(date +"%Y%m%d%H%M%S") ${concatStringsSep " " cfg.directories}
'';
};
services.cron.systemCronJobs = optional cfg.enable
"${cfg.period} root ${config.systemd.package}/bin/systemctl start tarsnap-backup.service";
environment.systemPackages = [ pkgs.tarsnap ];
};
}

View File

@ -0,0 +1,188 @@
{ config, pkgs, ... }:
with pkgs.lib;
let
cfg = config.services.couchdb;
configFile = pkgs.writeText "couchdb.ini"
''
[couchdb]
database_dir = ${cfg.databaseDir}
uri_file = ${cfg.uriFile}
view_index_dir = ${cfg.viewIndexDir}
[httpd]
port = ${toString cfg.port}
bind_address = ${cfg.bindAddress}
[log]
file = ${cfg.logFile}
'';
configExtraFile = pkgs.writeText "couchdb-extra.ini" cfg.extraConfig;
in
{
###### interface
options = {
services.couchdb = {
enable = mkOption {
type = types.bool;
default = false;
description = ''
Whether to run CouchDB Server.
'';
};
package = mkOption {
type = types.package;
default = pkgs.couchdb;
example = literalExample "pkgs.couchdb";
description = ''
CouchDB package to use.
'';
};
user = mkOption {
type = types.string;
default = "couchdb";
description = ''
User account under which couchdb runs.
'';
};
group = mkOption {
type = types.string;
default = "couchdb";
description = ''
Group account under which couchdb runs.
'';
};
pidFile = mkOption {
type = types.path;
default = "/var/run/couchdb/couchdb.pid";
description = ''
pid file.
'';
};
# couchdb options: http://docs.couchdb.org/en/latest/config/index.html
databaseDir = mkOption {
type = types.path;
default = "/var/lib/couchdb";
description = ''
Specifies location of CouchDB database files (*.couch named). This
location should be writable and readable for the user the CouchDB
service runs as (couchdb by default).
'';
};
uriFile = mkOption {
type = types.path;
default = "/var/run/couchdb/couchdb.uri";
description = ''
This file contains the full URI that can be used to access this
instance of CouchDB. It is used to help discover the port CouchDB is
running on (if it was set to 0 (e.g. automatically assigned any free
one). This file should be writable and readable for the user that
runs the CouchDB service (couchdb by default).
'';
};
viewIndexDir = mkOption {
type = types.path;
default = "/var/lib/couchdb";
description = ''
Specifies location of CouchDB view index files. This location should
be writable and readable for the user that runs the CouchDB service
(couchdb by default).
'';
};
bindAddress = mkOption {
type = types.string;
default = "127.0.0.1";
description = ''
Defines the IP address by which CouchDB will be accessible.
'';
};
port = mkOption {
type = types.int;
default = 5984;
description = ''
Defined the port number to listen.
'';
};
logFile = mkOption {
type = types.path;
default = "/var/log/couchdb.log";
description = ''
Specifies the location of file for logging output.
'';
};
extraConfig = mkOption {
type = types.lines;
default = "";
description = ''
Extra configuration. Overrides any other cofiguration.
'';
};
};
};
###### implementation
config = mkIf config.services.couchdb.enable {
environment.systemPackages = [ cfg.package ];
systemd.services.couchdb = {
description = "CouchDB Server";
wantedBy = [ "multi-user.target" ];
preStart =
''
mkdir -p `dirname ${cfg.pidFile}`;
mkdir -p `dirname ${cfg.uriFile}`;
mkdir -p `dirname ${cfg.logFile}`;
touch ${cfg.logFile};
mkdir -p ${cfg.databaseDir};
mkdir -p ${cfg.viewIndexDir};
chown ${cfg.user}:${cfg.group} `dirname ${cfg.pidFile}`
chown ${cfg.user}:${cfg.group} `dirname ${cfg.uriFile}`
chown ${cfg.user}:${cfg.group} ${cfg.logFile}
chown ${cfg.user}:${cfg.group} ${cfg.databaseDir}
chown ${cfg.user}:${cfg.group} ${cfg.viewIndexDir}
'';
serviceConfig = {
PermissionsStartOnly = true;
User = cfg.user;
Group = cfg.group;
Type = "forking";
ExecStart = "${cfg.package}/bin/couchdb -b -o /dev/null -e /dev/null -p ${cfg.pidFile} -a ${configFile} -a ${configExtraFile}";
ExecStop = "${cfg.package}/bin/couchdb -d";
};
};
users.extraUsers.couchdb = {
description = "CouchDB Server user";
group = "couchdb";
uid = config.ids.uids.couchdb;
};
users.extraGroups.couchdb.gid = config.ids.gids.couchdb;
};
}

View File

@ -49,6 +49,7 @@ in
package = mkOption { package = mkOption {
default = pkgs.firebirdSuper; default = pkgs.firebirdSuper;
type = types.package;
/* /*
Example: <code>package = pkgs.firebirdSuper.override { icu = Example: <code>package = pkgs.firebirdSuper.override { icu =
pkgs.icu; };</code> which is not recommended for compatibility pkgs.icu; };</code> which is not recommended for compatibility

View File

@ -39,6 +39,7 @@ in
package = mkOption { package = mkOption {
default = pkgs.mongodb; default = pkgs.mongodb;
type = types.package;
description = " description = "
Which MongoDB derivation to use. Which MongoDB derivation to use.
"; ";

View File

@ -8,6 +8,10 @@ let
mysql = cfg.package; mysql = cfg.package;
is55 = mysql.mysqlVersion == "5.5";
mysqldDir = if is55 then "${mysql}/bin" else "${mysql}/libexec";
pidFile = "${cfg.pidDir}/mysqld.pid"; pidFile = "${cfg.pidDir}/mysqld.pid";
mysqldOptions = mysqldOptions =
@ -19,7 +23,7 @@ let
[mysqld] [mysqld]
${optionalString (cfg.replication.role == "master" || cfg.replication.role == "slave") "log-bin=mysql-bin"} ${optionalString (cfg.replication.role == "master" || cfg.replication.role == "slave") "log-bin=mysql-bin"}
${optionalString (cfg.replication.role == "master" || cfg.replication.role == "slave") "server-id = ${toString cfg.replication.serverId}"} ${optionalString (cfg.replication.role == "master" || cfg.replication.role == "slave") "server-id = ${toString cfg.replication.serverId}"}
${optionalString (cfg.replication.role == "slave") ${optionalString (cfg.replication.role == "slave" && !is55)
'' ''
master-host = ${cfg.replication.masterHost} master-host = ${cfg.replication.masterHost}
master-user = ${cfg.replication.masterUser} master-user = ${cfg.replication.masterUser}
@ -47,7 +51,8 @@ in
}; };
package = mkOption { package = mkOption {
default = pkgs.mysql; type = types.package;
example = literalExample "pkgs.mysql";
description = " description = "
Which MySQL derivation to use. Which MySQL derivation to use.
"; ";
@ -176,7 +181,7 @@ in
chown -R ${cfg.user} ${cfg.pidDir} chown -R ${cfg.user} ${cfg.pidDir}
''; '';
serviceConfig.ExecStart = "${mysql}/libexec/mysqld --defaults-extra-file=${myCnf} ${mysqldOptions}"; serviceConfig.ExecStart = "${mysqldDir}/mysqld --defaults-extra-file=${myCnf} ${mysqldOptions}";
postStart = postStart =
'' ''
@ -216,6 +221,16 @@ in
fi fi
'') cfg.initialDatabases} '') cfg.initialDatabases}
${optionalString (cfg.replication.role == "slave" && is55)
''
# Set up the replication master
( echo "stop slave;"
echo "change master to master_host='${cfg.replication.masterHost}', master_user='${cfg.replication.masterUser}', master_password='${cfg.replication.masterPassword}';"
echo "start slave;"
) | ${mysql}/bin/mysql -u root -N
''}
${optionalString (cfg.initialScript != null) ${optionalString (cfg.initialScript != null)
'' ''
# Execute initial script # Execute initial script

View File

@ -1,248 +0,0 @@
{ config, pkgs, ... }:
with pkgs.lib;
let
cfg = config.services.mysql55;
mysql = cfg.package;
pidFile = "${cfg.pidDir}/mysqld.pid";
mysqldOptions =
"--user=${cfg.user} --datadir=${cfg.dataDir} " +
"--pid-file=${pidFile}";
myCnf = pkgs.writeText "my.cnf"
''
[mysqld]
${optionalString (cfg.replication.role == "master" || cfg.replication.role == "slave") "log-bin=mysql-bin"}
${optionalString (cfg.replication.role == "master" || cfg.replication.role == "slave") "server-id = ${toString cfg.replication.serverId}"}
${cfg.extraOptions}
'';
in
{
###### interface
options = {
services.mysql55 = {
enable = mkOption {
default = false;
description = "
Whether to enable the MySQL server.
";
};
package = mkOption {
default = pkgs.mysql55;
description = "
Which MySQL derivation to use.
";
};
port = mkOption {
default = "3306";
description = "Port of MySQL";
};
user = mkOption {
default = "mysql";
description = "User account under which MySQL runs";
};
dataDir = mkOption {
default = "/var/mysql"; # !!! should be /var/db/mysql
description = "Location where MySQL stores its table files";
};
pidDir = mkOption {
default = "/var/run/mysql";
description = "Location of the file which stores the PID of the MySQL server";
};
extraOptions = mkOption {
default = "";
example = ''
key_buffer_size = 6G
table_cache = 1600
log-error = /var/log/mysql_err.log
'';
description = ''
Provide extra options to the MySQL configuration file.
Please note, that these options are added to the
<literal>[mysqld]</literal> section so you don't need to explicitly
state it again.
'';
};
initialDatabases = mkOption {
default = [];
description = "List of database names and their initial schemas that should be used to create databases on the first startup of MySQL";
example = [
{ name = "foodatabase"; schema = literalExample "./foodatabase.sql"; }
{ name = "bardatabase"; schema = literalExample "./bardatabase.sql"; }
];
};
initialScript = mkOption {
default = null;
description = "A file containing SQL statements to be executed on the first startup. Can be used for granting certain permissions on the database";
};
# FIXME: remove this option; it's a really bad idea.
rootPassword = mkOption {
default = null;
description = "Path to a file containing the root password, modified on the first startup. Not specifying a root password will leave the root password empty.";
};
replication = {
role = mkOption {
default = "none";
description = "Role of the MySQL server instance. Can be either: master, slave or none";
};
serverId = mkOption {
default = 1;
description = "Id of the MySQL server instance. This number must be unique for each instance";
};
masterHost = mkOption {
description = "Hostname of the MySQL master server";
};
masterUser = mkOption {
description = "Username of the MySQL replication user";
};
masterPassword = mkOption {
description = "Password of the MySQL replication user";
};
masterPort = mkOption {
default = 3306;
description = "Port number on which the MySQL master server runs";
};
};
};
};
###### implementation
config = mkIf config.services.mysql55.enable {
users.extraUsers.mysql = {
description = "MySQL server user";
group = "mysql";
uid = config.ids.uids.mysql;
};
users.extraGroups.mysql.gid = config.ids.gids.mysql;
environment.systemPackages = [mysql];
systemd.services.mysql =
{ description = "MySQL Server";
wantedBy = [ "multi-user.target" ];
unitConfig.RequiresMountsFor = "${cfg.dataDir}";
preStart =
''
if ! test -e ${cfg.dataDir}/mysql; then
mkdir -m 0700 -p ${cfg.dataDir}
chown -R ${cfg.user} ${cfg.dataDir}
${mysql}/bin/mysql_install_db ${mysqldOptions}
touch /tmp/mysql_init
fi
mkdir -m 0700 -p ${cfg.pidDir}
chown -R ${cfg.user} ${cfg.pidDir}
'';
serviceConfig.ExecStart = "${mysql}/bin/mysqld --defaults-extra-file=${myCnf} ${mysqldOptions}";
postStart =
''
# Wait until the MySQL server is available for use
count=0
while [ ! -e /tmp/mysql.sock ]
do
if [ $count -eq 30 ]
then
echo "Tried 30 times, giving up..."
exit 1
fi
echo "MySQL daemon not yet started. Waiting for 1 second..."
count=$((count++))
sleep 1
done
if [ -f /tmp/mysql_init ]
then
${concatMapStrings (database:
''
# Create initial databases
if ! test -e "${cfg.dataDir}/${database.name}"; then
echo "Creating initial database: ${database.name}"
( echo "create database ${database.name};"
echo "use ${database.name};"
if [ -f "${database.schema}" ]
then
cat ${database.schema}
elif [ -d "${database.schema}" ]
then
cat ${database.schema}/mysql-databases/*.sql
fi
) | ${mysql}/bin/mysql -u root -N
fi
'') cfg.initialDatabases}
${optionalString (cfg.replication.role == "slave")
''
# Set up the replication master
( echo "stop slave;"
echo "change master to master_host='${cfg.replication.masterHost}', master_user='${cfg.replication.masterUser}', master_password='${cfg.replication.masterPassword}';"
echo "start slave;"
) | ${mysql}/bin/mysql -u root -N
''}
${optionalString (cfg.initialScript != null)
''
# Execute initial script
cat ${cfg.initialScript} | ${mysql}/bin/mysql -u root -N
''}
${optionalString (cfg.rootPassword != null)
''
# Change root password
( echo "use mysql;"
echo "update user set Password=password('$(cat ${cfg.rootPassword})') where User='root';"
echo "flush privileges;"
) | ${mysql}/bin/mysql -u root -N
''}
rm /tmp/mysql_init
fi
''; # */
serviceConfig.ExecStop =
"${mysql}/bin/mysqladmin ${optionalString (cfg.rootPassword != null) "--user=root --password=\"$(cat ${cfg.rootPassword})\""} shutdown";
};
};
}

View File

@ -55,7 +55,7 @@ in
}; };
package = mkOption { package = mkOption {
type = types.path; type = types.package;
example = literalExample "pkgs.postgresql92"; example = literalExample "pkgs.postgresql92";
description = '' description = ''
PostgreSQL package to use. PostgreSQL package to use.

View File

@ -45,6 +45,7 @@ in
package = mkOption { package = mkOption {
default = pkgs.redis; default = pkgs.redis;
description = "Which Redis derivation to use."; description = "Which Redis derivation to use.";
type = types.package;
}; };
user = mkOption { user = mkOption {

View File

@ -42,6 +42,7 @@ in
package = mkOption { package = mkOption {
default = pkgs.cgminer; default = pkgs.cgminer;
description = "Which cgminer derivation to use."; description = "Which cgminer derivation to use.";
type = types.package;
}; };
user = mkOption { user = mkOption {

View File

@ -43,10 +43,12 @@ with pkgs.lib;
group = "dictd"; group = "dictd";
description = "DICT.org dictd server"; description = "DICT.org dictd server";
home = "${dictdb}/share/dictd"; home = "${dictdb}/share/dictd";
uid = config.ids.uids.dictd;
}; };
users.extraGroups = singleton users.extraGroups = singleton
{ name = "dictd"; { name = "dictd";
gid = config.ids.gids.dictd;
}; };
jobs.dictd = jobs.dictd =

View File

@ -58,7 +58,7 @@ in
nix = { nix = {
package = mkOption { package = mkOption {
type = types.path; type = types.package;
default = pkgs.nix; default = pkgs.nix;
description = '' description = ''
This option specifies the Nix package instance to use throughout the system. This option specifies the Nix package instance to use throughout the system.

View File

@ -63,7 +63,7 @@ in
services.nixosManual.showManual = mkOption { services.nixosManual.showManual = mkOption {
type = types.bool; type = types.bool;
default = false; default = true;
description = '' description = ''
Whether to show the NixOS manual on one of the virtual Whether to show the NixOS manual on one of the virtual
consoles. consoles.

View File

@ -128,6 +128,17 @@ in
''; '';
}; };
networking.firewall.allowedTCPPortRanges = mkOption {
default = [];
example = [ { from = 8999; to = 9003; } ];
type = types.listOf (types.attrsOf types.int);
description =
''
A range of TCP ports on which incoming connections are
accepted.
'';
};
networking.firewall.allowedUDPPorts = mkOption { networking.firewall.allowedUDPPorts = mkOption {
default = []; default = [];
example = [ 53 ]; example = [ 53 ];
@ -138,6 +149,16 @@ in
''; '';
}; };
networking.firewall.allowedUDPPortRanges = mkOption {
default = [];
example = [ { from = 60000; to = 61000; } ];
type = types.listOf (types.attrsOf types.int);
description =
''
Range of open UDP ports.
'';
};
networking.firewall.allowPing = mkOption { networking.firewall.allowPing = mkOption {
default = false; default = false;
type = types.bool; type = types.bool;
@ -322,6 +343,15 @@ in
) cfg.allowedTCPPorts ) cfg.allowedTCPPorts
} }
# Accept connections to the allowed TCP port ranges.
${concatMapStrings (rangeAttr:
let range = toString rangeAttr.from + ":" + toString rangeAttr.to; in
''
ip46tables -A nixos-fw -p tcp --dport ${range} -j nixos-fw-accept
''
) cfg.allowedTCPPortRanges
}
# Accept packets on the allowed UDP ports. # Accept packets on the allowed UDP ports.
${concatMapStrings (port: ${concatMapStrings (port:
'' ''
@ -330,6 +360,15 @@ in
) cfg.allowedUDPPorts ) cfg.allowedUDPPorts
} }
# Accept packets on the allowed UDP port ranges.
${concatMapStrings (rangeAttr:
let range = toString rangeAttr.from + ":" + toString rangeAttr.to; in
''
ip46tables -A nixos-fw -p udp --dport ${range} -j nixos-fw-accept
''
) cfg.allowedUDPPortRanges
}
# Accept IPv4 multicast. Not a big security risk since # Accept IPv4 multicast. Not a big security risk since
# probably nobody is listening anyway. # probably nobody is listening anyway.
#iptables -A nixos-fw -d 224.0.0.0/4 -j nixos-fw-accept #iptables -A nixos-fw -d 224.0.0.0/4 -j nixos-fw-accept

View File

@ -17,6 +17,8 @@ let
restrict default kod nomodify notrap nopeer noquery restrict default kod nomodify notrap nopeer noquery
restrict -6 default kod nomodify notrap nopeer noquery restrict -6 default kod nomodify notrap nopeer noquery
restrict 127.0.0.1
restrict -6 ::1
${toString (map (server: "server " + server + " iburst\n") config.services.ntp.servers)} ${toString (map (server: "server " + server + " iburst\n") config.services.ntp.servers)}
''; '';

View File

@ -63,6 +63,7 @@ let
enablePHP = false; enablePHP = false;
phpOptions = ""; phpOptions = "";
options = {}; options = {};
documentRoot = null;
}; };
res = defaults // svcFunction { inherit config pkgs serverInfo php; }; res = defaults // svcFunction { inherit config pkgs serverInfo php; };
in res; in res;
@ -188,7 +189,11 @@ let
subservices = callSubservices serverInfo cfg.extraSubservices; subservices = callSubservices serverInfo cfg.extraSubservices;
documentRoot = if cfg.documentRoot != null then cfg.documentRoot else maybeDocumentRoot = fold (svc: acc:
if acc == null then svc.documentRoot else assert svc.documentRoot == null; acc
) null ([ cfg ] ++ subservices);
documentRoot = if maybeDocumentRoot != null then maybeDocumentRoot else
pkgs.runCommand "empty" {} "ensureDir $out"; pkgs.runCommand "empty" {} "ensureDir $out";
documentRootConf = '' documentRootConf = ''
@ -240,7 +245,7 @@ let
${robotsConf} ${robotsConf}
${if isMainServer || cfg.documentRoot != null then documentRootConf else ""} ${if isMainServer || maybeDocumentRoot != null then documentRootConf else ""}
${if cfg.enableUserDir then '' ${if cfg.enableUserDir then ''
@ -414,7 +419,7 @@ in
}; };
package = mkOption { package = mkOption {
type = types.path; type = types.package;
default = pkgs.apacheHttpd.override { mpm = mainCfg.multiProcessingModule; }; default = pkgs.apacheHttpd.override { mpm = mainCfg.multiProcessingModule; };
example = "pkgs.apacheHttpd_2_4"; example = "pkgs.apacheHttpd_2_4";
description = '' description = ''

View File

@ -126,7 +126,18 @@ in
</Directory> </Directory>
''} ''}
Alias ${config.urlPrefix} ${mediawikiRoot} ${if config.urlPrefix != "" then "Alias ${config.urlPrefix} ${mediawikiRoot}" else ''
RewriteEngine On
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-f
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-d
RewriteRule ${if config.enableUploads
then "!^/images"
else "^.*\$"
} %{DOCUMENT_ROOT}/${if config.articleUrlPrefix == ""
then ""
else "${config.articleUrlPrefix}/"
}index.php [L]
''}
<Directory ${mediawikiRoot}> <Directory ${mediawikiRoot}>
Order allow,deny Order allow,deny
@ -139,6 +150,8 @@ in
''} ''}
''; '';
documentRoot = if config.urlPrefix == "" then mediawikiRoot else null;
enablePHP = true; enablePHP = true;
options = { options = {

View File

@ -25,6 +25,7 @@ in
package = mkOption { package = mkOption {
default = pkgs.nginx; default = pkgs.nginx;
type = types.package;
description = " description = "
Nginx package to use. Nginx package to use.
"; ";

View File

@ -7,9 +7,9 @@ let
xcfg = config.services.xserver; xcfg = config.services.xserver;
cfg = xcfg.desktopManager; cfg = xcfg.desktopManager;
# Whether desktop manager `d' is capable of setting a background. # If desktop manager `d' isn't capable of setting a background and
# If it isn't, the `feh' program is used as a fallback. # the xserver is enabled, the `feh' program is used as a fallback.
needBGCond = d: ! (d ? bgSupport && d.bgSupport); needBGCond = d: ! (d ? bgSupport && d.bgSupport) && xcfg.enable;
in in

View File

@ -2,9 +2,23 @@
with pkgs.lib; with pkgs.lib;
let cfg = config.services.xserver.synaptics; in let cfg = config.services.xserver.synaptics;
tapConfig = if cfg.tapButtons then enabledTapConfig else disabledTapConfig;
{ enabledTapConfig = ''
Option "MaxTapTime" "180"
Option "MaxTapMove" "220"
Option "TapButton1" "${builtins.elemAt cfg.buttonsMap 0}"
Option "TapButton2" "${builtins.elemAt cfg.buttonsMap 1}"
Option "TapButton3" "${builtins.elemAt cfg.buttonsMap 2}"
'';
disabledTapConfig = ''
Option "MaxTapTime" "0"
Option "MaxTapMove" "0"
Option "TapButton1" "0"
Option "TapButton2" "0"
Option "TapButton3" "0"
'';
in {
options = { options = {
@ -106,15 +120,10 @@ let cfg = config.services.xserver.synaptics; in
MatchIsTouchpad "on" MatchIsTouchpad "on"
${optionalString (cfg.dev != null) ''MatchDevicePath "${cfg.dev}"''} ${optionalString (cfg.dev != null) ''MatchDevicePath "${cfg.dev}"''}
Driver "synaptics" Driver "synaptics"
Option "MaxTapTime" "180"
Option "MaxTapMove" "220"
Option "MinSpeed" "${cfg.minSpeed}" Option "MinSpeed" "${cfg.minSpeed}"
Option "MaxSpeed" "${cfg.maxSpeed}" Option "MaxSpeed" "${cfg.maxSpeed}"
Option "AccelFactor" "${cfg.accelFactor}" Option "AccelFactor" "${cfg.accelFactor}"
${if cfg.tapButtons then "" else ''Option "MaxTapTime" "0"''} ${optionalString cfg.tapButtons tapConfig}
Option "TapButton1" "${builtins.elemAt cfg.buttonsMap 0}"
Option "TapButton2" "${builtins.elemAt cfg.buttonsMap 1}"
Option "TapButton3" "${builtins.elemAt cfg.buttonsMap 2}"
Option "ClickFinger1" "${builtins.elemAt cfg.buttonsMap 0}" Option "ClickFinger1" "${builtins.elemAt cfg.buttonsMap 0}"
Option "ClickFinger2" "${builtins.elemAt cfg.buttonsMap 1}" Option "ClickFinger2" "${builtins.elemAt cfg.buttonsMap 1}"
Option "ClickFinger3" "${builtins.elemAt cfg.buttonsMap 2}" Option "ClickFinger3" "${builtins.elemAt cfg.buttonsMap 2}"

View File

@ -159,7 +159,7 @@ in
boot.kernel.sysctl."kernel.printk" = config.boot.consoleLogLevel; boot.kernel.sysctl."kernel.printk" = config.boot.consoleLogLevel;
boot.kernelModules = [ "loop" ]; boot.kernelModules = [ "loop" "configs" ];
boot.initrd.availableKernelModules = boot.initrd.availableKernelModules =
[ # Note: most of these (especially the SATA/PATA modules) [ # Note: most of these (especially the SATA/PATA modules)

View File

@ -14,7 +14,7 @@ fail() {
# in an interactive shell. # in an interactive shell.
cat <<EOF cat <<EOF
An error occured in stage 1 of the boot process, which must mount the An error occurred in stage 1 of the boot process, which must mount the
root filesystem on \`$targetRoot' and then start stage 2. Press one root filesystem on \`$targetRoot' and then start stage 2. Press one
of the following keys: of the following keys:

View File

@ -649,6 +649,7 @@ in
systemd.targets.keys = systemd.targets.keys =
{ description = "Security Keys"; { description = "Security Keys";
unitConfig.X-StopOnReconfiguration = true;
}; };
systemd.units = systemd.units =

View File

@ -164,5 +164,5 @@ with pkgs.lib;
# Prevent logging in as root without a password. This doesn't really matter, # Prevent logging in as root without a password. This doesn't really matter,
# since the only PAM services that allow logging in with a null # since the only PAM services that allow logging in with a null
# password are local ones that are inaccessible on EC2 machines. # password are local ones that are inaccessible on EC2 machines.
security.initialRootPassword = "!"; security.initialRootPassword = mkDefault "!";
} }

View File

@ -55,7 +55,7 @@ with pkgs.lib;
modules = modules =
let extraConfig = let extraConfig =
{ boot.isContainer = true; { boot.isContainer = true;
security.initialRootPassword = "!"; security.initialRootPassword = mkDefault "!";
networking.hostName = mkDefault name; networking.hostName = mkDefault name;
}; };
in [ extraConfig config.config ]; in [ extraConfig config.config ];

View File

@ -114,7 +114,7 @@ with pkgs.lib;
# Prevent logging in as root without a password. This doesn't really matter, # Prevent logging in as root without a password. This doesn't really matter,
# since the only PAM services that allow logging in with a null # since the only PAM services that allow logging in with a null
# password are local ones that are inaccessible on Google Compute machines. # password are local ones that are inaccessible on Google Compute machines.
security.initialRootPassword = "!"; security.initialRootPassword = mkDefault "!";
# Configure default metadata hostnames # Configure default metadata hostnames
networking.extraHosts = '' networking.extraHosts = ''

View File

@ -44,7 +44,7 @@ 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.firefox) (all nixos.tests.firefox)
(all nixos.tests.firewall) (all nixos.tests.firewall)
(all nixos.tests.installer.grub1) (all nixos.tests.installer.grub1)

View File

@ -213,7 +213,8 @@ in rec {
with lib; with lib;
let let
testsFor = system: testsFor = system:
mapAttrsRecursiveCond (x: !x ? test) (n: v: listToAttrs [(nameValuePair system v.test)]) mapAttrsRecursiveCond (x: !x ? test)
(n: v: listToAttrs [(nameValuePair system (if v.makeCoverageReport or false then v.report else v.test))])
(import ./tests { inherit nixpkgs system; }); (import ./tests { inherit nixpkgs system; });
in fold recursiveUpdate {} (map testsFor systems); in fold recursiveUpdate {} (map testsFor systems);
} }

View File

@ -11,6 +11,7 @@ in
{ {
services.mysql.enable = true; services.mysql.enable = true;
services.mysql.package = pkgs.mysql;
services.mysql.replication.role = "master"; services.mysql.replication.role = "master";
services.mysql.initialDatabases = [ { name = "testdb"; schema = ./testdb.sql; } ]; services.mysql.initialDatabases = [ { name = "testdb"; schema = ./testdb.sql; } ];
services.mysql.initialScript = pkgs.writeText "initmysql" services.mysql.initialScript = pkgs.writeText "initmysql"
@ -25,6 +26,7 @@ in
{ {
services.mysql.enable = true; services.mysql.enable = true;
services.mysql.package = pkgs.mysql;
services.mysql.replication.role = "slave"; services.mysql.replication.role = "slave";
services.mysql.replication.serverId = 2; services.mysql.replication.serverId = 2;
services.mysql.replication.masterHost = nodes.master.config.networking.hostName; services.mysql.replication.masterHost = nodes.master.config.networking.hostName;
@ -37,6 +39,7 @@ in
{ {
services.mysql.enable = true; services.mysql.enable = true;
services.mysql.package = pkgs.mysql;
services.mysql.replication.role = "slave"; services.mysql.replication.role = "slave";
services.mysql.replication.serverId = 3; services.mysql.replication.serverId = 3;
services.mysql.replication.masterHost = nodes.master.config.networking.hostName; services.mysql.replication.masterHost = nodes.master.config.networking.hostName;

View File

@ -9,6 +9,7 @@
services.mysql.enable = true; services.mysql.enable = true;
services.mysql.replication.role = "master"; services.mysql.replication.role = "master";
services.mysql.initialDatabases = [ { name = "testdb"; schema = ./testdb.sql; } ]; services.mysql.initialDatabases = [ { name = "testdb"; schema = ./testdb.sql; } ];
services.mysql.package = pkgs.mysql;
}; };
}; };

View File

@ -14,11 +14,13 @@ in
rec { rec {
makeCoverageReport = true;
client = client =
{ config, pkgs, ... }: { config, pkgs, ... }:
{ imports = [ ./common/x11.nix ]; { imports = [ ./common/x11.nix ];
services.xserver.driSupport = true; hardware.opengl.driSupport = true;
services.xserver.defaultDepth = pkgs.lib.mkOverride 0 16; services.xserver.defaultDepth = pkgs.lib.mkOverride 0 16;
environment.systemPackages = [ pkgs.quake3demo ]; environment.systemPackages = [ pkgs.quake3demo ];
nixpkgs.config.packageOverrides = overrides; nixpkgs.config.packageOverrides = overrides;

View File

@ -20,7 +20,7 @@ let
# To build the kernel with coverage instrumentation, we need a # To build the kernel with coverage instrumentation, we need a
# special patch to make coverage data available under /proc. # special patch to make coverage data available under /proc.
linux = pkgs.linux.override (orig: { linux = pkgs.linux.override (orig: {
stdenv = cleanupBuildTree (keepBuildTree orig.stdenv); stdenv = overrideInStdenv pkgs.stdenv [ pkgs.keepBuildTree ];
extraConfig = extraConfig =
'' ''
GCOV_KERNEL y GCOV_KERNEL y

View File

@ -6,18 +6,16 @@
, perl, pkgconfig, python, serd, sord, sratom, suil }: , perl, pkgconfig, python, serd, sord, sratom, suil }:
let let
# Ardour 3.5.308 tag tag = "3.5.357";
rev = "40d8c5ae";
in in
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "ardour-${version}"; name = "ardour-${tag}";
version = "3.5.308";
src = fetchgit { src = fetchgit {
url = git://git.ardour.org/ardour/ardour.git; url = git://git.ardour.org/ardour/ardour.git;
inherit rev; rev = "refs/tags/${tag}";
sha256 = "7473c19c2aeb68bd93d512c2d4e976b23dd36d2453c877c859ad37a76f50dc8a"; sha256 = "1e026fb9a6ad4179d52c4b578cc3861bdfd3629b9e7b7a7341d431c7d3692c42";
}; };
buildInputs = buildInputs =
@ -29,10 +27,10 @@ stdenv.mkDerivation rec {
]; ];
patchPhase = '' patchPhase = ''
# The funny revision number is from `git describe ${rev} # The funny revision number is from `git describe rev`
printf '#include "libs/ardour/ardour/revision.h"\nnamespace ARDOUR { const char* revision = \"${version}-g40d8c5a\"; }\n' > libs/ardour/revision.cc printf '#include "libs/ardour/ardour/revision.h"\nnamespace ARDOUR { const char* revision = \"${tag}-gce4d125\"; }\n' > libs/ardour/revision.cc
# Note the different version number # Note the different version number
sed -i '33i rev = \"3.5-308-g40d8c5a\"' wscript sed -i '33i rev = \"3.5-357-gce4d125\"' wscript
sed 's|/usr/include/libintl.h|${glibc}/include/libintl.h|' -i wscript sed 's|/usr/include/libintl.h|${glibc}/include/libintl.h|' -i wscript
sed -e 's|^#!/usr/bin/perl.*$|#!${perl}/bin/perl|g' -i tools/fmt-bindings sed -e 's|^#!/usr/bin/perl.*$|#!${perl}/bin/perl|g' -i tools/fmt-bindings
sed -e 's|^#!/usr/bin/env.*$|#!${perl}/bin/perl|g' -i tools/*.pl sed -e 's|^#!/usr/bin/env.*$|#!${perl}/bin/perl|g' -i tools/*.pl

View File

@ -44,5 +44,6 @@ stdenv.mkDerivation {
description = "A multiplatform music player"; description = "A multiplatform music player";
license = licenses.gpl3Plus; license = licenses.gpl3Plus;
platforms = platforms.linux; platforms = platforms.linux;
maintainers = [ maintainers.ttuegel ];
}; };
} }

View File

@ -1,18 +1,19 @@
{ stdenv, fetchurl, python, gettext, intltool, pkgconfig, jackaudio, libsndfile { stdenv, fetchurl, avahi, boost, fftw, gettext, glib, glibmm, gtk
, glib, gtk, glibmm, gtkmm, fftw, librdf, ladspaH, boost }: , gtkmm, intltool, jackaudio, ladspaH, librdf, libsndfile, lv2
, pkgconfig, python }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "guitarix-${version}"; name = "guitarix-${version}";
version = "0.25.2"; version = "0.28.3";
src = fetchurl { src = fetchurl {
url = "mirror://sourceforge/guitarix/guitarix2-${version}.tar.bz2"; url = "mirror://sourceforge/guitarix/guitarix2-${version}.tar.bz2";
sha256 = "1wcg3yc2iy72hj6z9l88393f00by0iwhhn8xrc3q55p4rj0mnrga"; sha256 = "0ks5avylyicqfj9l1wf4gj62i8m6is2jmp0h11h5l2wbg3xiwxjd";
}; };
buildInputs = buildInputs = [
[ python gettext intltool pkgconfig jackaudio libsndfile glib gtk glibmm avahi boost fftw gettext glib glibmm gtk gtkmm intltool jackaudio
gtkmm fftw librdf ladspaH boost ladspaH librdf libsndfile lv2 pkgconfig python
]; ];
configurePhase = "python waf configure --prefix=$out"; configurePhase = "python waf configure --prefix=$out";
@ -21,7 +22,7 @@ stdenv.mkDerivation rec {
installPhase = "python waf install"; installPhase = "python waf install";
meta = { meta = with stdenv.lib; {
description = "A virtual guitar amplifier for Linux running with JACK"; description = "A virtual guitar amplifier for Linux running with JACK";
longDescription = '' longDescription = ''
guitarix is a virtual guitar amplifier for Linux running with guitarix is a virtual guitar amplifier for Linux running with
@ -46,8 +47,8 @@ stdenv.mkDerivation rec {
crazy sounds never heard before. crazy sounds never heard before.
''; '';
homepage = http://guitarix.sourceforge.net/; homepage = http://guitarix.sourceforge.net/;
license = stdenv.lib.licenses.gpl3Plus; license = licenses.gpl3Plus;
maintainers = [ stdenv.lib.maintainers.astsmtl ]; maintainers = with maintainers; [ astsmtl goibhniu ];
platforms = stdenv.lib.platforms.linux; platforms = platforms.linux;
}; };
} }

View File

@ -19,8 +19,6 @@ pythonPackages.buildPythonPackage rec {
propagatedBuildInputs = pythonPath; propagatedBuildInputs = pythonPath;
installCommand = "python setup.py install --prefix=$out";
meta = { meta = {
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";

View File

@ -13,7 +13,7 @@ pythonPackages.buildPythonPackage rec {
}; };
propagatedBuildInputs = with pythonPackages; [ propagatedBuildInputs = with pythonPackages; [
gst_python pygobject pykka pyspotify pylast cherrypy ws4py gst_python pygobject pykka pyspotify pylast cherrypy ws4py gst_plugins_base gst_plugins_good
]; ];
# python zip complains about old timestamps # python zip complains about old timestamps
@ -27,8 +27,7 @@ pythonPackages.buildPythonPackage rec {
postInstall = '' postInstall = ''
for p in $out/bin/mopidy $out/bin/mopidy-scan; do for p in $out/bin/mopidy $out/bin/mopidy-scan; do
wrapProgram $p \ wrapProgram $p \
--prefix GST_PLUGIN_PATH : ${gst_plugins_good}/lib/gstreamer-0.10 \ --prefix GST_PLUGIN_SYSTEM_PATH : "$GST_PLUGIN_SYSTEM_PATH"
--prefix GST_PLUGIN_PATH : ${gst_plugins_base}/lib/gstreamer-0.10
done done
''; '';

View File

@ -1,11 +1,11 @@
{stdenv, fetchurl, alsaLib }: {stdenv, fetchurl, alsaLib }:
stdenv.mkDerivation { stdenv.mkDerivation {
name = "mpg123-1.16.0"; name = "mpg123-1.18.1";
src = fetchurl { src = fetchurl {
url = mirror://sourceforge/mpg123/mpg123-1.16.0.tar.bz2; url = mirror://sourceforge/mpg123/mpg123-1.18.1.tar.bz2;
sha256 = "1lznnfdvg69a9qbbhvhfc9i86hxdmdqx67lvbkqbh8mmhpip43zh"; sha256 = "0bb5hv0qw3ln09xisi7d19gb4p2y69sx3905rdc293q3gr7khvdw";
}; };
buildInputs = stdenv.lib.optional (!stdenv.isDarwin) alsaLib; buildInputs = stdenv.lib.optional (!stdenv.isDarwin) alsaLib;

View File

@ -1,14 +1,15 @@
{stdenv, fetchurl, alsaLib, gtk, pkgconfig }: { stdenv, fetchurl, alsaLib, gtk, pkgconfig }:
stdenv.mkDerivation { stdenv.mkDerivation {
name = "praat-5323"; name = "praat-5365";
src = fetchurl { src = fetchurl {
url = http://www.fon.hum.uva.nl/praat/praat5323_sources.tar.gz; url = http://www.fon.hum.uva.nl/praat/praat5365_sources.tar.gz;
sha256 = "1m0m5165h74mw5xhmnnyzh5ans3cn78w5rs9572sa1512cams203"; sha256 = "1w3mcq0mipx88i7ckhvzhmdj0p67nhppnn7kbkp21d01yyyz5rgq";
}; };
configurePhase = '' configurePhase = ''
cp makefiles/makefile.defs.linux makefile.defs cp makefiles/makefile.defs.linux.alsa makefile.defs
''; '';
installPhase = '' installPhase = ''
@ -22,5 +23,6 @@ stdenv.mkDerivation {
description = "Doing phonetics by computer"; description = "Doing phonetics by computer";
homepage = http://www.fon.hum.uva.nl/praat/; homepage = http://www.fon.hum.uva.nl/praat/;
license = "GPLv2+"; # Has some 3rd-party code in it though license = "GPLv2+"; # Has some 3rd-party code in it though
platforms = stdenv.lib.platforms.linux;
}; };
} }

View File

@ -1,4 +1,4 @@
{ stdenv, fetchurl, python, buildPythonPackage, mutagen, pygtk, pygobject { stdenv, fetchurl, python, buildPythonPackage, mutagen, pygtk, pygobject, intltool
, pythonDBus, gst_python, withGstPlugins ? false, gst_plugins_base ? null , pythonDBus, gst_python, withGstPlugins ? false, gst_plugins_base ? null
, gst_plugins_good ? null, gst_plugins_ugly ? null, gst_plugins_bad ? null }: , gst_plugins_good ? null, gst_plugins_ugly ? null, gst_plugins_bad ? null }:
@ -29,6 +29,11 @@ buildPythonPackage {
}) })
]; ];
preConfigure = ''
# TODO: for now don't a apply gdist overrides, will be needed for shipping icons, gtk, etc
sed -i /distclass/d setup.py
'';
sourceRoot = "quodlibet-${version}"; sourceRoot = "quodlibet-${version}";
postUnpack = '' postUnpack = ''
# the patch searches for plugins in directory ../plugins # the patch searches for plugins in directory ../plugins
@ -42,18 +47,13 @@ buildPythonPackage {
]; ];
propagatedBuildInputs = [ propagatedBuildInputs = [
mutagen pygtk pygobject pythonDBus gst_python mutagen pygtk pygobject pythonDBus gst_python intltool
]; ];
postInstall = stdenv.lib.optionalString withGstPlugins '' postInstall = stdenv.lib.optionalString withGstPlugins ''
# Wrap quodlibet so it finds the GStreamer plug-ins # Wrap quodlibet so it finds the GStreamer plug-ins
wrapProgram "$out/bin/quodlibet" --prefix \ wrapProgram "$out/bin/quodlibet" --prefix \
GST_PLUGIN_PATH ":" \ GST_PLUGIN_SYSTEM_PATH ":" "$GST_PLUGIN_SYSTEM_PATH" \
${ stdenv.lib.concatStringsSep ":"
(map (s: s+"/lib/gstreamer-0.10")
(stdenv.lib.filter (s: s != null) [
gst_plugins_base gst_plugins_good gst_plugins_ugly gst_plugins_bad
])) }
''; '';
meta = { meta = {

View File

@ -1,12 +1,12 @@
{ stdenv, fetchgit, emacs }: { stdenv, fetchgit, emacs }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "idris-mode-20140106"; name = "idris-mode-20140223";
src = fetchgit { src = fetchgit {
url = https://github.com/idris-hackers/idris-mode.git; url = https://github.com/idris-hackers/idris-mode.git;
rev = "47df65dd5b554c1d7cf70a07c3bd06d80867f870"; rev = "486470533e74c55192e92a1afa050475915ee1e7";
sha256 = "55df66d1bace134bea83f0547e01daf068fc96dc080cf88ea8945ddcb2d08ea4"; sha256 = "ff2e6bd8fbf421e8f2db0789d2ff56c5103775b911b99bab64e4652d332bad43";
}; };
buildInputs = [ emacs ]; buildInputs = [ emacs ];

View File

@ -0,0 +1,23 @@
{ cabal, emacs, haskellSrcExts }:
cabal.mkDerivation (self: {
pname = "structured-haskell-mode";
version = "1.0.2";
sha256 = "1lwdhlr38y5hdr78nplplr3q0hrjhryw378f1857qh0lvp03gwl2";
isLibrary = false;
isExecutable = true;
buildDepends = [ haskellSrcExts ];
buildTools = [ emacs ];
postInstall = ''
emacs -L elisp --batch -f batch-byte-compile "elisp/"*.el
install -d $out/share/emacs/site-lisp
install "elisp/"*.elc $out/share/emacs/site-lisp
'';
meta = {
homepage = "https://github.com/chrisdone/structured-haskell-mode";
description = "Structured editing Emacs mode for Haskell";
license = self.stdenv.lib.licenses.bsd3;
platforms = self.ghc.meta.platforms;
maintainers = [ self.stdenv.lib.maintainers.pSub ];
};
})

View File

@ -1,7 +1,9 @@
{ stdenv, fetchhg, ncurses, gettext, pkgconfig }: { stdenv, fetchhg, ncurses, gettext, pkgconfig }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "vim-7.4.131"; name = "vim-${version}";
version = "7.4.131";
src = fetchhg { src = fetchhg {
url = "https://vim.googlecode.com/hg/"; url = "https://vim.googlecode.com/hg/";

View File

@ -0,0 +1,30 @@
{ stdenv, makeWrapper, writeText, vim, vimrc }:
let
vimrcfile = writeText "vimrc" (if vimrc == null then "" else vimrc);
in stdenv.mkDerivation rec {
name = "vimwrapper-${vim.version}";
buildInputs = [ makeWrapper vim vimrcfile ];
phases = [ "installPhase" ];
installPhase = ''
mkdir -p $out
cp -r ${vim}/* $out/
chmod u+w $out/bin
chmod u+w $out/share/vim
ln -s ${vimrcfile} $out/share/vim/vimrc
wrapProgram $out/bin/vim --set VIM "$out/share/vim"
'';
meta = with stdenv.lib; {
description = "The most popular clone of the VI editor";
homepage = http://www.vim.org;
platforms = platforms.unix;
};
}

View File

@ -2,8 +2,8 @@
cabal.mkDerivation (self: { cabal.mkDerivation (self: {
pname = "yi-contrib"; pname = "yi-contrib";
version = "0.7.0"; version = "0.7.1";
sha256 = "12x9ps5yrszr8dlj15kmsm9myq3gzd9x9nacvl3x6cq91wk53mzj"; sha256 = "0915ikck01kc5npbvywd9r7azylqrhfymzc72rf4iaghz4w939li";
buildDepends = [ dataAccessor filepath mtl split yi ]; buildDepends = [ dataAccessor filepath mtl split yi ];
meta = { meta = {
homepage = "http://haskell.org/haskellwiki/Yi"; homepage = "http://haskell.org/haskellwiki/Yi";

View File

@ -1,25 +1,24 @@
{ cabal, alex, binary, Cabal, cautiousFile, concreteTyperep { cabal, alex, binary, Cabal, cautiousFile, concreteTyperep
, dataAccessor, dataAccessorMtl, dataAccessorTemplate, derive, Diff , dataAccessor, dataAccessorMtl, dataAccessorTemplate, derive, Diff
, dlist, dyre, filepath, fingertree, ghcPaths, glib, gtk, hashable , dlist, dyre, filepath, fingertree, glib, gtk, hashable, hint
, hint, HUnit, mtl, pango, parsec, pointedlist, pureMD5, QuickCheck , HUnit, mtl, pango, parsec, pointedlist, QuickCheck, random
, random, regexBase, regexTdfa, split, testFramework , regexBase, regexTdfa, split, testFramework, testFrameworkHunit
, testFrameworkHunit, time, uniplate, unixCompat , time, uniplate, unixCompat, unorderedContainers, utf8String, vty
, unorderedContainers, utf8String, vty, xdgBasedir , xdgBasedir
}: }:
cabal.mkDerivation (self: { cabal.mkDerivation (self: {
pname = "yi"; pname = "yi";
version = "0.7.0"; version = "0.7.1";
sha256 = "0mzcjgp12k5mxb37r6chxsk726b1qxds49ch656bpgrg7n22w2j1"; sha256 = "111xg7qpjhsqf6pfr136wh8km3lrgpzghd9h5rlypafr61w59vly";
isLibrary = true; isLibrary = true;
isExecutable = true; isExecutable = true;
buildDepends = [ buildDepends = [
binary Cabal cautiousFile concreteTyperep dataAccessor binary Cabal cautiousFile concreteTyperep dataAccessor
dataAccessorMtl dataAccessorTemplate derive Diff dlist dyre dataAccessorMtl dataAccessorTemplate derive Diff dlist dyre
filepath fingertree ghcPaths glib gtk hashable hint mtl pango filepath fingertree glib gtk hashable hint mtl pango parsec
parsec pointedlist pureMD5 QuickCheck random regexBase regexTdfa pointedlist QuickCheck random regexBase regexTdfa split time
split time uniplate unixCompat unorderedContainers utf8String vty uniplate unixCompat unorderedContainers utf8String vty xdgBasedir
xdgBasedir
]; ];
testDepends = [ testDepends = [
filepath HUnit QuickCheck testFramework testFrameworkHunit filepath HUnit QuickCheck testFramework testFrameworkHunit

View File

@ -18,14 +18,14 @@
}: }:
let let
version = "6.8.7-6"; version = "6.8.8-7";
in in
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "ImageMagick-${version}"; name = "ImageMagick-${version}";
src = fetchurl { src = fetchurl {
url = "mirror://imagemagick/${name}.tar.xz"; url = "mirror://imagemagick/${name}.tar.xz";
sha256 = "0cbfhk184kxdxz5czyyqxac29mbfiahygjji6k97z6hp8ngnqlvh"; sha256 = "1x5jkbrlc10rx7vm344j7xrs74c80xk3n1akqx8w5c194fj56mza";
}; };
enableParallelBuilding = true; enableParallelBuilding = true;

View File

@ -2,11 +2,11 @@
, libXinerama, curl }: , libXinerama, curl }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "feh-2.9.3"; name = "feh-2.10";
src = fetchurl { src = fetchurl {
url = "http://feh.finalrewind.org/${name}.tar.bz2"; url = "http://feh.finalrewind.org/${name}.tar.bz2";
sha256 = "1wlhfbglzc1jzsh80s4s1fawclgzyjy2105ffzx2mw9s0c1xds5l"; sha256 = "10ya8j0mxlni08qli3gdkyjhy54g4d2q2kc0hhragmzd9s42ly5w";
}; };
buildInputs = [makeWrapper x11 imlib2 giblib libjpeg libpng libXinerama curl ]; buildInputs = [makeWrapper x11 imlib2 giblib libjpeg libpng libXinerama curl ];

View File

@ -9,10 +9,6 @@ buildPythonPackage rec {
sha256 = "d214a1b6d99d1d1e83da5848a2cef181f6781e0990e93f7ebff5880b0c43f43c"; sha256 = "d214a1b6d99d1d1e83da5848a2cef181f6781e0990e93f7ebff5880b0c43f43c";
}; };
postInstall = ''
mv $out/lib/${python.libPrefix}/site-packages/*.egg/share $out
'';
doCheck = false; doCheck = false;
buildInputs = [ stdenv libX11 gettext ]; buildInputs = [ stdenv libX11 gettext ];

View File

@ -4,11 +4,11 @@
}: }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "calibre-1.23.0"; name = "calibre-1.25.0";
src = fetchurl { src = fetchurl {
url = "mirror://sourceforge/calibre/${name}.tar.xz"; url = "mirror://sourceforge/calibre/${name}.tar.xz";
sha256 = "1sm6v53c12nkqnpv7n4g1mzkwmzbn74a8v83bzvvjiz0i9c7cl59"; sha256 = "1y221r5vgq426ldqjrx3qvgf3j3v2wncwzra747psvhwf95zd5fd";
}; };
inherit python; inherit python;

View File

@ -23,11 +23,11 @@
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "gnuradio-${version}"; name = "gnuradio-${version}";
version = "3.7.1"; version = "3.7.2.1";
src = fetchurl { src = fetchurl {
url = "http://gnuradio.org/releases/gnuradio/${name}.tar.gz"; url = "http://gnuradio.org/releases/gnuradio/${name}.tar.gz";
sha256 = "1kfni8vpgr6v9rdiz3zsmwc07qj6zka9x22z2y0y4rak2xnzdxz9"; sha256 = "101wr19nxfc5x7i4s10vgrypaa0vj2pkg8b2vn5j5s9iv8gpwswc";
}; };
buildInputs = [ buildInputs = [
@ -51,7 +51,7 @@ stdenv.mkDerivation rec {
postInstall = '' postInstall = ''
printf "backend : Qt4Agg\n" > "$out/share/gnuradio/matplotlibrc" printf "backend : Qt4Agg\n" > "$out/share/gnuradio/matplotlibrc"
for file in "$out"/bin/*; do for file in "$out"/bin/* "$out"/share/gnuradio/examples/*/*.py; do
wrapProgram "$file" \ wrapProgram "$file" \
--set PYTHONPATH $PYTHONPATH:$(toPythonPath "$out") \ --set PYTHONPATH $PYTHONPATH:$(toPythonPath "$out") \
--set MATPLOTLIBRC "$out/share/gnuradio" --set MATPLOTLIBRC "$out/share/gnuradio"

View File

@ -0,0 +1,17 @@
{ stdenv, fetchurl, intltool, pkgconfig, libX11, gtk }:
stdenv.mkDerivation rec {
name = "lxappearance-0.5.5";
src = fetchurl{
url = "http://downloads.sourceforge.net/project/lxde/LXAppearance/${name}.tar.xz";
sha256 = "8cae82e6425ba8a0267774e4d10096df2d91b0597520058331684a5ece068b4c";
};
buildInputs = [ intltool libX11 pkgconfig gtk ];
meta = {
description = "A lightweight program for configuring the theme and fonts of gtk applications";
maintainers = [ stdenv.lib.maintainers.hinton ];
platforms = stdenv.lib.platforms.all;
license = stdenv.lib.licenses.gpl2;
homepage = "http://lxappearance.sourceforce.net/";
};
}

View File

@ -8,6 +8,13 @@ stdenv.mkDerivation rec {
sha256 = "0y247nka5gkr1ajn47jrlp5rcnf6h4ff7dfsprma3h4wxqdv7a5b"; sha256 = "0y247nka5gkr1ajn47jrlp5rcnf6h4ff7dfsprma3h4wxqdv7a5b";
}; };
patches = [(fetchurl {
name = "CVE-2014-2013.patch";
url = "http://git.ghostscript.com/?p=mupdf.git;a=commitdiff_plain;"
+ "h=60dabde18d7fe12b19da8b509bdfee9cc886aafc";
sha256 = "1walj3wir9x50i6lph33bx14c8593r9xrn08gkd3v7r6d15lmjps";
})];
buildInputs = [ pkgconfig zlib freetype libjpeg jbig2dec openjpeg libX11 libXext ]; buildInputs = [ pkgconfig zlib freetype libjpeg jbig2dec openjpeg libX11 libXext ];
enableParallelBuilding = true; enableParallelBuilding = true;

View File

@ -0,0 +1,19 @@
{ stdenv, fetchurl, glib, gtk, intltool, libfm, libX11, pango, pkgconfig }:
stdenv.mkDerivation {
name = "pcmanfm-1.2.0";
src = fetchurl {
url = "mirror://sourceforge/pcmanfm/pcmanfm-1.2.0.tar.xz";
sha256 = "1cmskj7dpjgrrn89z7cc1h1nsmd6qq3bakf207ldrhrxxv3fxl2j";
};
buildInputs = [ glib gtk intltool libfm libX11 pango pkgconfig ];
meta = with stdenv.lib; {
homepage = "http://blog.lxde.org/?cat=28/";
license = licenses.gpl2Plus;
description = "File manager with GTK+ interface";
maintainers = [ maintainers.ttuegel ];
platforms = platforms.linux;
};
}

View File

@ -0,0 +1,29 @@
{ fetchurl, stdenv, fetchgit, qt4, pkgconfig, boost, dbus }:
stdenv.mkDerivation rec {
rev = "9f52882688ba03d7aaab2e3fd83cb05cfbf1a374";
name = "twmn-${rev}";
src = fetchgit {
inherit rev;
url = "https://github.com/sboli/twmn.git";
sha256 = "1jd2y0ydcpjdmjbx77lw35710sqfwbgyrnpv66mi3gwvrbyiwpf3";
};
buildInputs = [ qt4 pkgconfig boost ];
propagatedBuildInputs = [ dbus ];
configurePhase = "qmake";
installPhase = ''
mkdir -p "$out/bin"
cp bin/* "$out/bin"
'';
meta = {
description = "A notification system for tiling window managers";
homepage = "https://github.com/sboli/twmn";
platforms = with stdenv.lib.platforms; linux;
maintainers = [ stdenv.lib.maintainers.matejc ];
};
}

View File

@ -1,58 +0,0 @@
diff --git a/readme.md b/readme.md
index f4f07e8..de679c7 100644
--- a/readme.md
+++ b/readme.md
@@ -645,7 +645,7 @@ something like:
- Args: default monitor arguments
- Variables that can be used with the `-t`/`--template` argument:
`total`, `free`, `buffer`, `cache`, `rest`, `used`,
- `usedratio`, `usedbar`, `freebar`
+ `usedratio`, `usedbar`, `freeratio`, `freebar`
- Default template: `Mem: <usedratio>% (<cache>M)`
### `Swap Args RefreshRate`
diff --git a/src/Plugins/Monitors/Mem.hs b/src/Plugins/Monitors/Mem.hs
index 5c55ee2..3cf46c7 100644
--- a/src/Plugins/Monitors/Mem.hs
+++ b/src/Plugins/Monitors/Mem.hs
@@ -19,8 +19,8 @@ import Plugins.Monitors.Common
memConfig :: IO MConfig
memConfig = mkMConfig
"Mem: <usedratio>% (<cache>M)" -- template
- ["usedbar", "freebar", "usedratio", "total",
- "free", "buffer", "cache", "rest", "used"] -- available replacements
+ ["usedbar", "freebar", "usedratio", "freeratio", "total",
+ "free", "buffer", "cache", "rest", "used"] -- available replacements
fileMEM :: IO String
fileMEM = readFile "/proc/meminfo"
@@ -33,7 +33,8 @@ parseMEM =
rest = free + buffer + cache
used = total - rest
usedratio = used / total
- return [usedratio, total, free, buffer, cache, rest, used]
+ freeratio = free / total
+ return [usedratio, freeratio, total, free, buffer, cache, rest, used, freeratio]
totalMem :: IO Float
totalMem = fmap ((*1024) . (!!1)) parseMEM
@@ -42,15 +43,16 @@ usedMem :: IO Float
usedMem = fmap ((*1024) . (!!6)) parseMEM
formatMem :: [Float] -> Monitor [String]
-formatMem (r:xs) =
+formatMem (r:fr:xs) =
do let f = showDigits 0
rr = 100 * r
ub <- showPercentBar rr r
fb <- showPercentBar (100 - rr) (1 - r)
rs <- showPercentWithColors r
+ fs <- showPercentWithColors fr
s <- mapM (showWithColors f) xs
- return (ub:fb:rs:s)
-formatMem _ = return $ replicate 9 "N/A"
+ return (ub:fb:rs:fs:s)
+formatMem _ = return $ replicate 10 "N/A"
runMem :: [String] -> Monitor String
runMem _ =

View File

@ -1,11 +1,11 @@
{ stdenv, fetchurl, xorg, ncurses, freetype, fontconfig, pkgconfig }: { stdenv, fetchurl, xorg, ncurses, freetype, fontconfig, pkgconfig }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "xterm-300"; name = "xterm-301";
src = fetchurl { src = fetchurl {
url = "ftp://invisible-island.net/xterm/${name}.tgz"; url = "ftp://invisible-island.net/xterm/${name}.tgz";
sha256 = "1k8p7q4d1gpk6zikb8hys8b30yq2v001nlp3r9g40my31ij9al31"; sha256 = "040rarvv18zg0lk7qy0m3n7gv10mh40jic708wvng01z4rlbpfhz";
}; };
buildInputs = buildInputs =

View File

@ -1,4 +1,4 @@
{ stdenv, fetchurl, pkgconfig, gtk, girara, gettext, docutils, file, makeWrapper }: { stdenv, fetchurl, pkgconfig, gtk, girara, gettext, docutils, file, makeWrapper, zathura_icon }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
version = "0.2.7"; version = "0.2.7";
@ -21,7 +21,12 @@ stdenv.mkDerivation rec {
makeFlags = [ "PREFIX=$(out)" "RSTTOMAN=${docutils}/bin/rst2man.py" "VERBOSE=1" ]; makeFlags = [ "PREFIX=$(out)" "RSTTOMAN=${docutils}/bin/rst2man.py" "VERBOSE=1" ];
postInstall = '' postInstall = ''
wrapProgram "$out/bin/zathura" --prefix PATH ":" "${file}/bin" wrapProgram "$out/bin/zathura" \
--prefix PATH ":" "${file}/bin" \
--prefix XDG_CONFIG_DIRS ":" "$out/etc"
mkdir -pv $out/etc
echo "set window-icon ${zathura_icon}" > $out/etc/zathurarc
''; '';
meta = { meta = {

View File

@ -3,8 +3,11 @@
rec { rec {
inherit (pkgs) stdenv; inherit (pkgs) stdenv;
icon = ./icon.xpm;
zathura_core = callPackage ./core { zathura_core = callPackage ./core {
gtk = pkgs.gtk3; gtk = pkgs.gtk3;
zathura_icon = icon;
}; };
zathura_pdf_poppler = callPackage ./pdf-poppler { }; zathura_pdf_poppler = callPackage ./pdf-poppler { };
@ -19,7 +22,7 @@ rec {
zathuraWrapper = stdenv.mkDerivation { zathuraWrapper = stdenv.mkDerivation {
inherit zathura_core; inherit zathura_core icon;
name = "zathura-${zathura_core.version}"; name = "zathura-${zathura_core.version}";
@ -29,8 +32,6 @@ rec {
zathura_ps zathura_ps
]; ];
icon = ./icon.xpm;
builder = ./builder.sh; builder = ./builder.sh;
preferLocalBuild = true; preferLocalBuild = true;

View File

@ -14,9 +14,9 @@ let
else if stdenv.system == "i686-linux" then "ld-linux.so.2" else if stdenv.system == "i686-linux" then "ld-linux.so.2"
else throw "Bittorrent Sync for: ${stdenv.system} not supported!"; else throw "Bittorrent Sync for: ${stdenv.system} not supported!";
version = "1.2.82"; version = "1.2.91";
sha256 = if stdenv.system == "x86_64-linux" then "0cqrscav57xwz7rag6wy06xw6z7ca97xailprgg6jdjv4pnc91ra" sha256 = if stdenv.system == "x86_64-linux" then "1rx5mmk3ffkh6dbm0m33nyx6spsxqjw9djclcf9x9bs3zfyzgmnd"
else if stdenv.system == "i686-linux" then "1b9rnfk0wkhj1zybvfqwgd9dcqnxwdnp7m0vf6lhrgi75cydj7is" else if stdenv.system == "i686-linux" then "1566mp01149gsb57dv87420w1vq2f3adp6g1c90xdxjxzd67yqpw"
else throw "Bittorrent Sync for: ${stdenv.system} not supported!"; else throw "Bittorrent Sync for: ${stdenv.system} not supported!";
in stdenv.mkDerivation { in stdenv.mkDerivation {

View File

@ -1,18 +1,18 @@
# This file is autogenerated from update.sh in the same directory. # This file is autogenerated from update.sh in the same directory.
{ {
dev = { dev = {
version = "34.0.1847.3"; version = "35.0.1862.2";
url = "http://commondatastorage.googleapis.com/chromium-browser-official/chromium-34.0.1847.3.tar.xz"; url = "http://commondatastorage.googleapis.com/chromium-browser-official/chromium-35.0.1862.2.tar.xz";
sha256 = "1jm9cr1qqfqd82fy3f1q4d0qg94vsrzyq8dbn4hrxyzqbjc4sclg"; sha256 = "19426x4x3bnx21qjhqc4sk27k7dnhm1pw84079h6gk0hyjzcwn0f";
}; };
beta = { beta = {
version = "33.0.1750.115"; version = "34.0.1847.14";
url = "http://commondatastorage.googleapis.com/chromium-browser-official/chromium-33.0.1750.115.tar.xz"; url = "http://commondatastorage.googleapis.com/chromium-browser-official/chromium-34.0.1847.14.tar.xz";
sha256 = "1whr5vz8w8h9la219ah1bcsa5r84jby306w12gfzlsbk9czxchrp"; sha256 = "038bz2d40rgjppkalal9ycjhfvkhph926k35v8pc3618z2fy10cn";
}; };
stable = { stable = {
version = "33.0.1750.115"; version = "33.0.1750.146";
url = "http://commondatastorage.googleapis.com/chromium-browser-official/chromium-33.0.1750.115.tar.xz"; url = "http://commondatastorage.googleapis.com/chromium-browser-official/chromium-33.0.1750.146.tar.xz";
sha256 = "1whr5vz8w8h9la219ah1bcsa5r84jby306w12gfzlsbk9czxchrp"; sha256 = "0x2a5kyaj38661c5s33pywhrwkm8kj2fbr1z940c5al6y2hfgc6m";
}; };
} }

View File

@ -2,12 +2,12 @@
m4, glib_networking, gsettings_desktop_schemas }: m4, glib_networking, gsettings_desktop_schemas }:
stdenv.mkDerivation { stdenv.mkDerivation {
name = "dwb-2014-01-29"; name = "dwb-2014-03-01";
src = fetchgit { src = fetchgit {
url = "https://bitbucket.org/portix/dwb.git"; url = "https://bitbucket.org/portix/dwb.git";
rev = "eaf090af9ad63341a846377cb9ce473feee8f032"; rev = "e8d4b8d7937b70279d006da4938dfe52fb85f9e8";
sha256 = "1wqa5dry9p3x3y07zpq3km8ycr8wvz8c11754vf99pv1kzk8gq0n"; sha256 = "0m4730zqmnvb9k6xyydi221sh0wbanzbhg07xvwil3kn1d29340w";
}; };
buildInputs = [ pkgconfig makeWrapper libsoup webkit gtk3 gnutls json_c m4 ]; buildInputs = [ pkgconfig makeWrapper libsoup webkit gtk3 gnutls json_c m4 ];

View File

@ -17,9 +17,9 @@ assert stdenv.gcc ? libc && stdenv.gcc.libc != null;
rec { rec {
firefoxVersion = "27.0"; firefoxVersion = "27.0.1";
xulVersion = "27.0"; # this attribute is used by other packages xulVersion = "27.0.1"; # this attribute is used by other packages
src = fetchurl { src = fetchurl {
@ -29,7 +29,7 @@ rec {
# Fall back to this url for versions not available at releases.mozilla.org. # Fall back to this url for versions not available at releases.mozilla.org.
"http://ftp.mozilla.org/pub/mozilla.org/firefox/releases/${firefoxVersion}/source/firefox-${firefoxVersion}.source.tar.bz2" "http://ftp.mozilla.org/pub/mozilla.org/firefox/releases/${firefoxVersion}/source/firefox-${firefoxVersion}.source.tar.bz2"
]; ];
sha1 = "ec2031385237e30be829817ac79caa8e80cc2a14"; sha256 = "13qd53yf8dn9m03p4x5ml9h3mys60nba5nz82lcvaq7ycp1pl1bn";
}; };
commonConfigureFlags = commonConfigureFlags =

View File

@ -8,12 +8,12 @@
}: }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
version = "2.5"; version = "2.8";
name = "links2-${version}"; name = "links2-${version}";
src = fetchurl { src = fetchurl {
url = "${meta.homepage}/download/links-${version}.tar.bz2"; url = "${meta.homepage}/download/links-${version}.tar.bz2";
sha256 = "1wlmj8s6bxgznh0pnawihyvhffzryciz3lkagcxhf7fp64zz5izm"; sha256 = "15h07498z52jfdahzgvkphg1f7qvxnpbyfn2xmsls0d2dwwdll3r";
}; };
buildInputs = buildInputs =

View File

@ -36,7 +36,7 @@
let let
# -> http://get.adobe.com/flashplayer/ # -> http://get.adobe.com/flashplayer/
version = "11.2.202.336"; version = "11.2.202.341";
src = src =
if stdenv.system == "x86_64-linux" then if stdenv.system == "x86_64-linux" then
@ -47,7 +47,7 @@ let
else rec { else rec {
inherit version; inherit version;
url = "http://fpdownload.macromedia.com/get/flashplayer/pdc/${version}/install_flash_player_11_linux.x86_64.tar.gz"; url = "http://fpdownload.macromedia.com/get/flashplayer/pdc/${version}/install_flash_player_11_linux.x86_64.tar.gz";
sha256 = "1wri6y5vllgs452dfklv23k7bp5daajnaqblkn5cb2gl28l5xcni"; sha256 = "0d1ic70awdig0v699svmq8mmnil8xmmwsap30sgi0r94saxmq49j";
} }
else if stdenv.system == "i686-linux" then else if stdenv.system == "i686-linux" then
if debug then { if debug then {
@ -58,7 +58,7 @@ let
} else rec { } else rec {
inherit version; inherit version;
url = "http://fpdownload.macromedia.com/get/flashplayer/pdc/${version}/install_flash_player_11_linux.i386.tar.gz"; url = "http://fpdownload.macromedia.com/get/flashplayer/pdc/${version}/install_flash_player_11_linux.i386.tar.gz";
sha256 = "0mjxjbj75r74gqpmqzqa6vlrk2wv7r358wcqbmg132bhv8kaph85"; sha256 = "0bfz1id4035jnkwy4xm0dj8l9lygrrzqdbf8dgc9pcy8c63d1hac";
} }
else throw "Flash Player is not supported on this platform"; else throw "Flash Player is not supported on this platform";

View File

@ -45,20 +45,22 @@ in
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "google-talk-plugin-${version}"; name = "google-talk-plugin-${version}";
# Use the following to determine the current upstream version:
# curl -s http://dl.google.com/linux/talkplugin/deb/dists/stable/main/binary-amd64/Packages | sed -nr 's/^Version: *([^ ]+)-1$/\1/p' # You can get the upstream version and SHA-1 hash from the following URLs:
version = "4.2.1.0"; # http://dl.google.com/linux/talkplugin/deb/dists/stable/main/binary-amd64/Packages
# http://dl.google.com/linux/talkplugin/deb/dists/stable/main/binary-i386/Packages
version = "5.1.5.0";
src = src =
if stdenv.system == "x86_64-linux" then if stdenv.system == "x86_64-linux" then
fetchurl { fetchurl {
url = "${baseURL}/google-talkplugin_${version}-1_amd64.deb"; url = "${baseURL}/google-talkplugin_${version}-1_amd64.deb";
sha256 = "1g7kpz2lzzz1gri5rd3isp7cfyls6gzwcw2kc8jgrgrixq9iixfd"; sha1 = "fc830f4c7f5816f4578ec73e6d4aef059ad4a0b1";
} }
else if stdenv.system == "i686-linux" then else if stdenv.system == "i686-linux" then
fetchurl { fetchurl {
url = "${baseURL}/google-talkplugin_${version}-1_i386.deb"; url = "${baseURL}/google-talkplugin_${version}-1_i386.deb";
sha256 = "1z0zbblzlky9nyifxmnl49v4zafpqp3l08b9v1486sinm35rf58r"; sha1 = "9b7043c3585b3479ba11aabb7b8af755a61df963";
} }
else throw "Google Talk does not support your platform."; else throw "Google Talk does not support your platform.";

View File

@ -0,0 +1,127 @@
{ stdenv, fetchurl, jre, bash, simpleBuildTool, python27Packages }:
stdenv.mkDerivation rec {
name = "spark-${version}";
version = "0.9.0";
src = fetchurl {
url = "http://d3kbcqa49mib13.cloudfront.net/${name}-incubating-bin-cdh4.tgz";
sha256 = "0dgirq2ws25accijijanqij6d1mwxkrcqkmq1xsslfpz26svs1w1";
};
unpackPhase = ''tar zxf $src'';
untarDir = "spark-${version}-incubating-bin-cdh4";
installPhase = ''
set -x
mkdir -p $out/lib $out/bin
mv ${untarDir} $out/lib
cat > $out/bin/spark-class <<EOF
#!${bash}/bin/bash
export JAVA_HOME=${jre}
export SPARK_HOME=$out/lib/${untarDir}
if [ -z "\$1" ]; then
echo "Usage: spark-class <class> [<args>]" >&2
exit 1
fi
export SPARK_MEM=\''${SPARK_MEM:-1024m}
JAVA_OPTS=""
JAVA_OPTS="\$JAVA_OPTS -Djava.library.path=\"\$SPARK_LIBRARY_PATH\""
JAVA_OPTS="\$JAVA_OPTS -Xms\$SPARK_MEM -Xmx\$SPARK_MEM"
export JAVA_OPTS
CLASSPATH=\`$out/lib/${untarDir}/bin/compute-classpath.sh\`
export CLASSPATH
exec ${jre}/bin/java -cp "\$CLASSPATH" \$JAVA_OPTS "\$@"
EOF
chmod +x $out/bin/spark-class
cat > $out/bin/spark-shell <<EOF
#!${bash}/bin/bash
set -o posix
export JAVA_HOME=${jre}
export SPARK_HOME=$out/lib/${untarDir}
for o in "\$@"; do
if [ "\$1" = "-c" -o "\$1" = "--cores" ]; then
shift
if [ -n "\$1" ]; then
OPTIONS="-Dspark.cores.max=\$1"
shift
fi
fi
done
exit_status=127
saved_stty=""
function restoreSttySettings() {
stty \$saved_stty
saved_stty=""
}
function onExit() {
if [[ "\$saved_stty" != "" ]]; then
restoreSttySettings
fi
exit \$exit_status
}
trap onExit INT
saved_stty=\$(stty -g 2>/dev/null)
if [[ ! \$? ]]; then
saved_stty=""
fi
$out/bin/spark-class \$OPTIONS org.apache.spark.repl.Main "\$@"
exit_status=\$?
onExit
EOF
chmod +x $out/bin/spark-shell
cat > $out/bin/pyspark <<EOF
#!${bash}/bin/bash
export JAVA_HOME=${jre}
export SPARK_HOME=$out/lib/${untarDir}
export PYTHONPATH=$out/lib/${untarDir}/python:\$PYTHONPATH
export OLD_PYTHONSTARTUP=\$PYTHONSTARTUP
export PYTHONSTARTUP=$out/lib/${untarDir}/python/pyspark/shell.py
export SPARK_MEM=\''${SPARK_MEM:-1024m}
exec ${python27Packages.ipythonLight}/bin/ipython \$@
EOF
chmod +x $out/bin/pyspark
cat > $out/bin/spark-upload-scala <<EOF
#!${bash}/bin/bash
export JAVA_HOME=${jre}
export SPARK_HOME=$out/lib/${untarDir}
export SPARK_MEM=\''${SPARK_MEM:-1024m}
CLASS=\$1; shift
exec ${simpleBuildTool}/bin/sbt package "run-main \$CLASS \$@"
EOF
chmod +x $out/bin/spark-upload-scala
cat > $out/bin/spark-upload-python <<EOF
#!${bash}/bin/bash
exec $out/bin/pyspark \$@
EOF
chmod +x $out/bin/spark-upload-python
'';
phases = "unpackPhase installPhase";
meta = {
description = "Spark cluster computing";
homepage = "http://spark.incubator.apache.org";
platforms = stdenv.lib.platforms.all;
license = stdenv.lib.licenses.asl20;
maintainers = [ stdenv.lib.maintainers.thoughtpolice ];
};
}

View File

@ -0,0 +1,25 @@
{ fetchurl, stdenv, jre, glib, libXtst, gtk, makeWrapper }:
stdenv.mkDerivation rec {
name = "davmail-4.4.1";
src = fetchurl {
url = "http://downloads.sourceforge.net/project/davmail/davmail/4.4.1/davmail-linux-x86_64-4.4.1-2225.tgz";
sha256 = "66c7ae23c0242860cca1576e5fc29343431789a821f7623e420b91ba91e480a9";
};
buildInputs = [ makeWrapper ];
meta = {
description = "A Java application which presents a Microsoft Exchange server as local CALDAV, IMAP and SMTP servers";
maintainers = [ stdenv.lib.maintainers.hinton ];
platforms = stdenv.lib.platforms.all;
homepage = "http://davmail.sourceforce.net/";
license = stdenv.lib.licenses.gpl2;
};
installPhase = ''
mkdir -p $out/bin
cp ./* $out/bin/ -R
wrapProgram $out/bin/davmail.sh --prefix PATH : ${jre}/bin --prefix LD_LIBRARY_PATH : ${glib}/lib:${gtk}/lib:${libXtst}/lib
'';
}

View File

@ -1,4 +1,4 @@
{ stdenv, fetchurl, dbus, gnutls2, wxGTK28, libidn, tinyxml, gettext { stdenv, fetchurl, dbus, gnutls, wxGTK28, libidn, tinyxml, gettext
, pkgconfig, xdg_utils, gtk2, sqlite }: , pkgconfig, xdg_utils, gtk2, sqlite }:
let version = "3.7.3"; in let version = "3.7.3"; in
@ -15,7 +15,7 @@ stdenv.mkDerivation {
]; ];
buildInputs = [ buildInputs = [
dbus gnutls2 wxGTK28 libidn tinyxml gettext pkgconfig xdg_utils gtk2 sqlite dbus gnutls wxGTK28 libidn tinyxml gettext pkgconfig xdg_utils gtk2 sqlite
]; ];
meta = with stdenv.lib; { meta = with stdenv.lib; {

View File

@ -0,0 +1,46 @@
{ stdenv, fetchurl, makeDesktopItem, unzip, ant, jdk }:
stdenv.mkDerivation rec {
name = "jitsi-${version}";
version = "2.4.4997";
src = fetchurl {
url = "https://download.jitsi.org/jitsi/src/jitsi-src-${version}.zip";
sha256 = "f1c2688d7d6bf1916fed3b8b105a785662980c5b297dcab3c9e7d272647ef825";
};
patches = [ ./jitsi.patch ];
jitsiItem = makeDesktopItem {
name = "Jitsi";
exec = "jitsi";
comment = "VoIP and Instant Messaging client";
desktopName = "Jitsi";
genericName = "Instant Messaging";
categories = "Application;Internet;";
};
buildInputs = [unzip ant jdk];
buildPhase = ''ant make'';
installPhase = ''
mkdir -p $out
cp -a lib $out/
cp -a sc-bundles $out/
mkdir $out/bin
cp resources/install/generic/run.sh $out/bin/jitsi
chmod +x $out/bin/jitsi
sed -i 's| java | ${jdk}/bin/java |' $out/bin/jitsi
patchShebangs $out
'';
meta = {
homepage = https://jitsi.org/;
description = "Open Source Video Calls and Chat";
license = stdenv.lib.licenses.lgpl21Plus.shortName;
platforms = stdenv.lib.platforms.linux;
};
}

View File

@ -0,0 +1,27 @@
--- /home/dario/Downloads/jitsi/resources/install/generic/run.sh 2013-11-01 15:37:21.000000000 +0000
+++ jitsi/resources/install/generic/run.sh 2014-03-04 11:52:30.796397567 +0000
@@ -1,4 +1,9 @@
-mkdir -p $HOME/.sip-communicator/log
+#! /bin/bash
+# A modified version of the generic run.sh
+
+#mkdir -p $HOME/.sip-communicator/log
+
+cd "$( dirname "$( dirname "${BASH_SOURCE[0]}" )" )"
# Get architecture
ARCH=`uname -m | sed -e s/x86_64/64/ -e s/i.86/32/`
@@ -6,10 +11,12 @@
# Additionnal JVM arguments
CLIENTARGS=""
+NATIVELIBS="lib/native/linux-64"
if [ $ARCH -eq 32 ]
then
CLIENTARGS="-client -Xmx256m"
+ NATIVELIBS="lib/native/linux"
fi
export PATH=$PATH:native
-java $CLIENTARGS -classpath "lib/felix.jar:sc-bundles/sc-launcher.jar:sc-bundles/util.jar:lib/" -Djava.library.path=native -Dfelix.config.properties=file:./lib/felix.client.run.properties -Djava.util.logging.config.file=lib/logging.properties net.java.sip.communicator.launcher.SIPCommunicator
+exec java $CLIENTARGS -classpath "lib/felix.jar:sc-bundles/sc-launcher.jar:sc-bundles/util.jar:lib/" -Djava.library.path=$NATIVELIBS -Dfelix.config.properties=file:lib/felix.client.run.properties -Djava.util.logging.config.file=lib/logging.properties net.java.sip.communicator.launcher.SIPCommunicator

View File

@ -5,11 +5,11 @@
assert stdenv.system == "i686-linux"; assert stdenv.system == "i686-linux";
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "skype-4.2.0.11"; name = "skype-4.2.0.13";
src = fetchurl { src = fetchurl {
url = "http://download.skype.com/linux/${name}.tar.bz2"; url = "http://download.skype.com/linux/${name}.tar.bz2";
sha256 = "0kh66p50m3x4ql6j8ciz73c30npcizd00ya9qrhid711rar0mlw7"; sha256 = "137kp6c0v4z7n7pp4hwrx4gjgk4knwj815dc6swh44lb5cj1c5m5";
}; };
buildInputs = buildInputs =

View File

@ -0,0 +1,32 @@
{ stdenv, fetchgit, libconfig, lua5_2, openssl, readline, zlib
}:
stdenv.mkDerivation rec {
name = "telegram-cli";
src = fetchgit {
url = "https://github.com/vysheng/tg.git";
rev = "ac6079a00ac66bb37a3179a82af130b41ec39bc9";
sha256 = "1rpwnyzmqk7p97n5pd00m5c6rypc39mb3hs94qxxrdcpwpgcb73q";
};
buildInputs = [ libconfig lua5_2 openssl readline zlib ];
installPhase = ''
mkdir -p $out/bin
cp ./telegram $out/bin/telegram-wo-key
cp ./tg.pub $out/
cat > $out/bin/telegram <<EOF
#!/usr/bin/env bash
$out/bin/telegram-wo-key -k $out/tg.pub
EOF
chmod +x $out/bin/telegram
'';
meta = {
description = "Command-line interface for Telegram messenger";
homepage = https://telegram.org/;
license = "GPLv2";
platforms = stdenv.lib.platforms.linux;
};
}

View File

@ -19,6 +19,8 @@ stdenv.mkDerivation rec {
configureFlags = "--enable-call"; configureFlags = "--enable-call";
installFlags = "gsettingsschemadir=\${out}/share/telepathy/logger/glib-2.0/schemas/";
meta = { meta = {
description = "Logger service for Telepathy framework"; description = "Logger service for Telepathy framework";
homepage = http://telepathy.freedesktop.org/wiki/Logger ; homepage = http://telepathy.freedesktop.org/wiki/Logger ;

View File

@ -2,8 +2,8 @@
, libtoxcore, pkgconfig }: , libtoxcore, pkgconfig }:
let let
version = "da99d776df"; version = "b308e19e6b";
date = "20140203"; date = "20140224";
in in
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "toxic-${date}-${version}"; name = "toxic-${date}-${version}";
@ -11,7 +11,7 @@ stdenv.mkDerivation rec {
src = fetchurl { src = fetchurl {
url = "https://github.com/Tox/toxic/tarball/${version}"; url = "https://github.com/Tox/toxic/tarball/${version}";
name = "${name}.tar.gz"; name = "${name}.tar.gz";
sha256 = "0d97crkslyk7sgcsawnnwyzp31azp80yprpd6xqjcraxd442dfyj"; sha256 = "0fgkvnpy3dl2h378h796z9md0zg05b3174fgx17b919av6j9x4ma";
}; };
preConfigure = '' preConfigure = ''

View File

@ -0,0 +1,32 @@
{ stdenv, fetchurl, pkgconfig, gtk, perl, python, gettext
, libtool, pciutils, dbus_glib, libcanberra, libproxy
, libsexy, enchant, libnotify, openssl
, desktop_file_utils, hicolor_icon_theme
}:
stdenv.mkDerivation rec {
version = "2.9.6.1";
name = "hexchat-${version}";
src = fetchurl {
url = "http://dl.hexchat.net/hexchat/${name}.tar.xz";
sha256 = "0w34jr1pqril6r011fwxv40m17bnb88q9cv5hf08mv0a9lygyrv2";
};
buildInputs = [
pkgconfig gtk perl python gettext
libtool pciutils dbus_glib libcanberra libproxy
libsexy libnotify openssl
desktop_file_utils hicolor_icon_theme
];
configureFlags = [ "--enable-shm" "--enable-textfe" ];
meta = {
description = "A popular and easy to use graphical IRC (chat) client";
homepage = http://hexchat.github.io/;
license = stdenv.lib.licenses.gpl2;
platforms = stdenv.lib.platforms.linux;
maintainers = [ stdenv.lib.maintainers.romildo ];
};
}

View File

@ -0,0 +1,39 @@
{stdenv, fetchurl, writeScript, pkgconfig, cmake, qt4, seafile-shared, ccnet, makeWrapper}:
stdenv.mkDerivation rec
{
version = "2.1.1";
name = "seafile-client-${version}";
src = fetchurl
{
url = "https://github.com/haiwen/seafile-client/archive/v${version}.tar.gz";
sha256 = "d98515ea229df702cbe973d85ec0bd5cf3f5282ef1022ba0157d5301b521c8e0";
};
buildInputs = [ pkgconfig cmake qt4 seafile-shared makeWrapper ];
builder = writeScript "${name}-builder.sh" ''
source $stdenv/setup
tar xvfz $src
cd seafile-client-*
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_SKIP_BUILD_RPATH=ON -DCMAKE_INSTALL_PREFIX="$out" .
make -j1
make install
wrapProgram $out/bin/seafile-applet \
--suffix PATH : ${ccnet}/bin:${seafile-shared}/bin
'';
meta =
{
homepage = "https://github.com/haiwen/seafile-clients";
description = "Desktop client for Seafile, the Next-generation Open Source Cloud Storage";
license = stdenv.lib.licenses.asl20;
platforms = stdenv.lib.platforms.linux;
maintainers = [ stdenv.lib.maintainers.calrama ];
};
}

View File

@ -1,7 +1,7 @@
{ fetchurl, stdenv, pkgconfig, libxml2, gconf, glib, gtk, libgnomeui, libofx { fetchurl, stdenv, pkgconfig, libxml2, gconf, glib, gtk, libgnomeui, libofx
, libgtkhtml, gtkhtml, libgnomeprint, goffice, enchant, gettext, libbonoboui , libgtkhtml, gtkhtml, libgnomeprint, goffice, enchant, gettext, libbonoboui
, intltool, perl, guile, slibGuile, swig, isocodes, bzip2, makeWrapper, libglade , intltool, perl, guile, slibGuile, swig, isocodes, bzip2, makeWrapper, libglade
, libgsf, libart_lgpl, perlPackages , libgsf, libart_lgpl, perlPackages, aqbanking, gwenhywfar
}: }:
/* If you experience GConf errors when running GnuCash on NixOS, see /* If you experience GConf errors when running GnuCash on NixOS, see
@ -21,10 +21,10 @@ stdenv.mkDerivation rec {
pkgconfig libxml2 gconf glib gtk libgnomeui libgtkhtml gtkhtml pkgconfig libxml2 gconf glib gtk libgnomeui libgtkhtml gtkhtml
libgnomeprint goffice enchant gettext intltool perl guile slibGuile libgnomeprint goffice enchant gettext intltool perl guile slibGuile
swig isocodes bzip2 makeWrapper libofx libglade libgsf libart_lgpl swig isocodes bzip2 makeWrapper libofx libglade libgsf libart_lgpl
perlPackages.DateManip perlPackages.FinanceQuote perlPackages.DateManip perlPackages.FinanceQuote aqbanking gwenhywfar
]; ];
configureFlags = "CFLAGS=-O3 CXXFLAGS=-O3 --disable-dbi --enable-ofx"; configureFlags = "CFLAGS=-O3 CXXFLAGS=-O3 --disable-dbi --enable-ofx --enable-aqbanking";
postInstall = '' postInstall = ''
# Auto-updaters don't make sense in Nix. # Auto-updaters don't make sense in Nix.

View File

@ -2,7 +2,7 @@
let let
download_root = "http://homebank.free.fr/public/"; download_root = "http://homebank.free.fr/public/";
name = "homebank-4.5.4"; name = "homebank-4.5.5";
lastrelease = download_root + name + ".tar.gz"; lastrelease = download_root + name + ".tar.gz";
oldrelease = download_root + "old/" + name + ".tar.gz"; oldrelease = download_root + "old/" + name + ".tar.gz";
in in
@ -12,7 +12,7 @@ stdenv.mkDerivation {
src = fetchurl { src = fetchurl {
urls = [ lastrelease oldrelease ]; urls = [ lastrelease oldrelease ];
sha256 = "10xh76mxwbl56xp118gg3b4isv16yvhsvqxwqc28pqqxkpr7vpdk"; sha256 = "05k4497qsb6fzr662h9yxz1amsavd287wh0sabrpr9jdbh3jcfkg";
}; };
buildInputs = [ pkgconfig gtk libofx intltool ]; buildInputs = [ pkgconfig gtk libofx intltool ];

View File

@ -5,11 +5,11 @@
}: }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "R-3.0.2"; name = "R-3.0.3";
src = fetchurl { src = fetchurl {
url = "http://cran.r-project.org/src/base/R-3/${name}.tar.gz"; url = "http://cran.r-project.org/src/base/R-3/${name}.tar.gz";
sha256 = "0jq2vk6bgksbvgmdjvv7vfj6llp091d0nhl5j825aya4c2nhavlm"; sha256 = "1mp6zp25nycn8bxnnq97gq6n21c6vprm6qc4drwap57j82azsz5r";
}; };
buildInputs = [ blas bzip2 gfortran liblapack libX11 libXmu libXt buildInputs = [ blas bzip2 gfortran liblapack libX11 libXmu libXt

View File

@ -2,11 +2,11 @@
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "root-${version}"; name = "root-${version}";
version = "5.34.14"; version = "5.34.15";
src = fetchurl { src = fetchurl {
url = "ftp://root.cern.ch/root/root_v${version}.source.tar.gz"; url = "ftp://root.cern.ch/root/root_v${version}.source.tar.gz";
sha256 = "d5347ba1b614eb083cf08050b784d66a93c125ed89938708da1adb33323dee2b"; sha256 = "1bkiggcyya39a794d3d2rzzmmkbdymf86hbqhh0l1pl4f38xvp6i";
}; };
buildInputs = [ cmake gfortran mesa libX11 libXpm libXft libXext zlib ]; buildInputs = [ cmake gfortran mesa libX11 libXpm libXft libXext zlib ];

View File

@ -1,17 +0,0 @@
source $stdenv/setup
buildPhase() {
for i in bin/*; do
patchelf \
--set-interpreter "$(cat $NIX_GCC/nix-support/dynamic-linker)" \
--set-rpath $libX11/lib:$libXext/lib \
$i
done
}
installPhase() {
mkdir -p $out
cp -prvd * $out/
}
genericBuild

View File

@ -1,13 +0,0 @@
{stdenv, fetchurl, libX11, libXext}:
stdenv.mkDerivation {
name = "aangifte2005-1";
builder = ./builder.sh;
src = fetchurl {
url = http://download.belastingdienst.nl/belastingdienst/apps/linux/ib2005_linux.tar.gz;
md5 = "9cc709b8ad041f4b20154ff1491d0436";
};
inherit libX11 libXext;
}

View File

@ -14,5 +14,8 @@ stdenv.mkDerivation {
meta = { meta = {
description = "Elektronische aangifte IB 2006"; description = "Elektronische aangifte IB 2006";
url = "http://www.belastingdienst.nl/download/1341.html"; url = "http://www.belastingdienst.nl/download/1341.html";
license = stdenv.lib.licenses.unfree;
platforms = stdenv.lib.platforms.linux;
hydraPlatforms = [];
}; };
} }

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