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

This commit is contained in:
Tuomas Tynkkynen 2016-03-06 11:48:57 +02:00
commit ad47355786
624 changed files with 28150 additions and 13343 deletions

View File

@ -1,15 +1,18 @@
###### Things done:
- [ ] Tested via `nix.useChroot`.
- [ ] Built on platform(s): .
- [ ] Tested compilation of all pkgs that depend on this change.
- [ ] Tested execution of binary products.
- [ ] Tested using sandboxing (`nix-build --option build-use-chroot true` or [nix.useChroot](http://nixos.org/nixos/manual/options.html#opt-nix.useChroot) on NixOS)
- [ ] Built on platform(s): NixOS / OSX / Linux
- [ ] Tested compilation of all pkgs that depend on this change using `nix-shell -p nox --run "nox-review wip"`
- [ ] Tested execution of all binary files (usually in `./result/bin/`)
- [ ] Fits [CONTRIBUTING.md](https://github.com/NixOS/nixpkgs/blob/master/.github/CONTRIBUTING.md).
###### Extra
Fixes # .
###### More
Fixes issue #<insert id>
cc @<maintainer>
cc @ .
---
_Please note, that points are not mandatory._
_Please note, that points are not mandatory, but rather desired._

4
.gitignore vendored
View File

@ -12,7 +12,5 @@ result-*
.DS_Store
/pkgs/applications/kde-apps-*/tmp/
/pkgs/development/libraries/kde-frameworks-*/tmp/
/pkgs/development/libraries/qt-5/*/tmp/
/pkgs/desktops/plasma-*/tmp/
/pkgs/desktops/kde-5/*/tmp/

View File

@ -1,5 +1,6 @@
{
"userBlacklist": [
"civodul"
"civodul",
"jhasse"
]
}

View File

@ -1 +1 @@
16.03
16.09

View File

@ -117,9 +117,10 @@ Also, the attributes `haskell.compiler.ghcXYC` and
### How to install a compiler
A simple development environment consists of a Haskell compiler and the tool
`cabal-install`, and we saw in section [How to install Haskell packages] how
you can install those programs into your user profile:
A simple development environment consists of a Haskell compiler and one or both
of the tools `cabal-install` and `stack`. We saw in section
[How to install Haskell packages] how you can install those programs into your
user profile:
$ nix-env -f "<nixpkgs>" -iA haskellPackages.ghc haskellPackages.cabal-install
@ -148,10 +149,16 @@ version; just enter the Nix shell environment with the command
$ nix-shell -p haskell.compiler.ghc784
to bring GHC 7.8.4 into `$PATH`. Re-running `cabal configure` switches your
build to use that compiler instead. If you're working on a project that doesn't
depend on any additional system libraries outside of GHC, then it's sufficient
even to run the `cabal configure` command inside of the shell:
to bring GHC 7.8.4 into `$PATH`. Alternatively, you can use Stack instead of
`nix-shell` directly to select compiler versions and other build tools
per-project. It uses `nix-shell` under the hood when Nix support is turned on.
See [How to build a Haskell project using Stack].
If you're using `cabal-install`, re-running `cabal configure` inside the spawned
shell switches your build to use that compiler instead. If you're working on
a project that doesn't depend on any additional system libraries outside of GHC,
then it's even sufficient to just run the `cabal configure` command inside of
the shell:
$ nix-shell -p haskell.compiler.ghc784 --command "cabal configure"
@ -320,6 +327,58 @@ security reasons, which might be quite an inconvenience. See [this
page](http://kb.mozillazine.org/Links_to_local_pages_do_not_work) for
workarounds.
### How to build a Haskell project using Stack
[Stack][http://haskellstack.org] is a popular build tool for Haskell projects.
It has first-class support for Nix. Stack can optionally use Nix to
automatically select the right version of GHC and other build tools to build,
test and execute apps in an existing project downloaded from somewhere on the
Internet. Pass the `--nix` flag to any `stack` command to do so, e.g.
$ git clone --recursive http://github.com/yesodweb/wai
$ cd wai
$ stack --nix build
If you want `stack` to use Nix by default, you can add a `nix` section to the
`stack.yaml` file, as explained in the [Stack documentation][stack-nix-doc]. For
example:
nix:
enable: true
packages: [pkgconfig zeromq zlib]
The example configuration snippet above tells Stack to create an ad hoc
environment for `nix-shell` as in the below section, in which the `pkgconfig`,
`zeromq` and `zlib` packages from Nixpkgs are available. All `stack` commands
will implicitly be executed inside this ad hoc environment.
Some projects have more sophisticated needs. For examples, some ad hoc
environments might need to expose Nixpkgs packages compiled in a certain way, or
with extra environment variables. In these cases, you'll need a `shell` field
instead of `packages`:
nix:
enable: true
shell-file: shell.nix
For more on how to write a `shell.nix` file see the below section. You'll need
to express a derivation. Note that Nixpkgs ships with a convenience wrapper
function around `mkDerivation` called `haskell.lib.buildStackProject` to help you
create this derivation in exactly the way Stack expects. All of the same inputs
as `mkDerivation` can be provided. For example, to build a Stack project that
including packages that link against a version of the R library compiled with
special options turned on:
with (import <nixpkgs> { });
let R = pkgs.R.override { enableStrictBarrier = true; };
in
haskell.lib.buildStackProject {
name = "HaskellR";
buildInputs = [ R zeromq zlib ];
}
[stack-nix-doc]: http://docs.haskellstack.org/en/stable/nix_integration.html
### How to create ad hoc environments for `nix-shell`
@ -605,7 +664,7 @@ can configure the environment variables
in their `~/.bashrc` file to avoid the compiler error.
### Using Stack together with Nix
### Builds using Stack complain about missing system libraries
-- While building package zlib-0.5.4.2 using:
runhaskell -package=Cabal-1.22.4.0 -clear-package-db [... lots of flags ...]
@ -633,13 +692,16 @@ means specific to Stack: you'll have that problem with any other
Haskell package that's built inside of nix-shell but run outside of that
environment.
I suppose we could try to remedy the issue by wrapping `stack` or
`cabal` with a script that tries to find those kind of implicit search
paths and makes them explicit on the "cabal configure" command line. I
don't think anyone is working on that subject yet, though, because the
problem doesn't seem so bad in practice.
You can remedy this issue in several ways. The easiest is to add a `nix` section
to the `stack.yaml` like the following:
You can remedy that issue in several ways. First of all, run
nix:
enable: true
packages: [ zlib ]
Stack's Nix support knows to add `${zlib}/lib` and `${zlib}/include` as an
`--extra-lib-dirs` and `extra-include-dirs`, respectively. Alternatively, you
can achieve the same effect by hand. First of all, run
$ nix-build --no-out-link "<nixpkgs>" -A zlib
/nix/store/alsvwzkiw4b7ip38l4nlfjijdvg3fvzn-zlib-1.2.8
@ -663,7 +725,8 @@ to find out the store path of the system's zlib library. Now, you can
Typically, you'll need --extra-include-dirs as well. It's possible
to add those flag to the project's "stack.yaml" or your user's
global "~/.stack/global/stack.yaml" file so that you don't have to
specify them manually every time.
specify them manually every time. But again, you're likely better off using
Stack's Nix support instead.
The same thing applies to `cabal configure`, of course, if you're
building with `cabal-install` instead of Stack.

View File

@ -10,10 +10,12 @@
aaronschif = "Aaron Schif <aaronschif@gmail.com>";
abaldeau = "Andreas Baldeau <andreas@baldeau.net>";
abbradar = "Nikolay Amiantov <ab@fmap.me>";
aboseley = "Adam Boseley <adam.boseley@gmail.com>";
adev = "Adrien Devresse <adev@adev.name>";
aespinosa = "Allan Espinosa <allan.espinosa@outlook.com>";
aflatter = "Alexander Flatter <flatter@fastmail.fm>";
aforemny = "Alexander Foremny <alexanderforemny@googlemail.com>";
afranchuk = "Alex Franchuk <alex.franchuk@gmail.com>";
aherrmann = "Andreas Herrmann <andreash87@gmx.ch>";
ak = "Alexander Kjeldaas <ak@formalprivacy.com>";
akaWolf = "Artjom Vejsel <akawolf0@gmail.com>";
@ -32,6 +34,7 @@
ardumont = "Antoine R. Dumont <eniotna.t@gmail.com>";
aristid = "Aristid Breitkreuz <aristidb@gmail.com>";
arobyn = "Alexei Robyn <shados@shados.net>";
artuuge = "Artur E. Ruuge <artuuge@gmail.com>";
asppsa = "Alastair Pharo <asppsa@gmail.com>";
astsmtl = "Alexander Tsamutali <astsmtl@yandex.ru>";
aszlig = "aszlig <aszlig@redmoonstudios.org>";
@ -67,6 +70,7 @@
chaoflow = "Florian Friesdorf <flo@chaoflow.net>";
chattered = "Phil Scott <me@philscotted.com>";
christopherpoole = "Christopher Mark Poole <mail@christopherpoole.net>";
cleverca22 = "Michael Bishop <cleverca22@gmail.com>";
coconnor = "Corey O'Connor <coreyoconnor@gmail.com>";
codsl = "codsl <codsl@riseup.net>";
codyopel = "Cody Opel <codyopel@gmail.com>";
@ -164,6 +168,7 @@
joelmo = "Joel Moberg <joel.moberg@gmail.com>";
joelteon = "Joel Taylor <me@joelt.io>";
jpbernardy = "Jean-Philippe Bernardy <jeanphilippe.bernardy@gmail.com>";
jraygauthier = "Raymond Gauthier <jraygauthier@gmail.com>";
jwiegley = "John Wiegley <johnw@newartisans.com>";
jwilberding = "Jordan Wilberding <jwilberding@afiniate.com>";
jzellner = "Jeff Zellner <jeffz@eml.cc>";
@ -210,6 +215,7 @@
maurer = "Matthew Maurer <matthew.r.maurer+nix@gmail.com>";
mbakke = "Marius Bakke <ymse@tuta.io>";
mbe = "Brandon Edens <brandonedens@gmail.com>";
mboes = "Mathieu Boespflug <mboes@tweag.net>";
mcmtroffaes = "Matthias C. M. Troffaes <matthias.troffaes@gmail.com>";
meditans = "Carlo Nucera <meditans@gmail.com>";
meisternu = "Matt Miemiec <meister@krutt.org>";
@ -330,7 +336,7 @@
tomberek = "Thomas Bereknyei <tomberek@gmail.com>";
travisbhartwell = "Travis B. Hartwell <nafai@travishartwell.net>";
trino = "Hubert Mühlhans <muehlhans.hubert@ekodia.de>";
tstrobel = "Thomas Strobel <ts468@cam.ac.uk>";
tstrobel = "Thomas Strobel <4ZKTUB6TEP74PYJOPWIR013S2AV29YUBW5F9ZH2F4D5UMJUJ6S@hash.domains>";
ttuegel = "Thomas Tuegel <ttuegel@gmail.com>";
tv = "Tomislav Viljetić <tv@shackspace.de>";
tvestelind = "Tomas Vestelind <tomas.vestelind@fripost.org>";

View File

@ -75,4 +75,25 @@ rec {
min = x: y: if x < y then x else y;
max = x: y: if x > y then x else y;
/* Reads a JSON file. It is useful to import pure data into other nix
expressions.
Example:
mkDerivation {
src = fetchgit (importJSON ./repo.json)
#...
}
where repo.json contains:
{
"url": "git://some-domain/some/repo",
"rev": "265de7283488964f44f0257a8b4a055ad8af984d",
"sha256": "0sb3h3067pzf3a7mlxn1hikpcjrsvycjcnj9hl9b1c3ykcgvps7h"
}
*/
importJSON = path:
builtins.fromJSON (builtins.readFile path);
}

File diff suppressed because it is too large Load Diff

View File

@ -279,7 +279,7 @@ sub get_deps {
next if $n eq "perl";
# Hacky way to figure out if this module is part of Perl.
if ( $n !~ /^JSON/ && $n !~ /^YAML/ && $n !~ /^Module::Pluggable/ ) {
if ( $n !~ /^JSON/ && $n !~ /^YAML/ && $n !~ /^Module::Pluggable/ && $n !~ /^if$/ ) {
eval "use $n;";
if ( !$@ ) {
DEBUG("skipping Perl-builtin module $n");
@ -431,7 +431,7 @@ my $build_fun = -e "$pkg_path/Build.PL"
print STDERR "===\n";
print <<EOF;
"$attr_name" = $build_fun rec {
${\(is_reserved($attr_name) ? "\"$attr_name\"" : $attr_name)} = $build_fun rec {
name = "$pkg_name";
src = fetchurl {
url = "mirror://cpan/${\$module->path}/\${name}.${\$module->package_extension}";
@ -450,7 +450,7 @@ EOF
print <<EOF if defined $homepage;
homepage = $homepage;
EOF
print <<EOF if defined $description;
print <<EOF if defined $description && $description ne "Unknown";
description = "$description";
EOF
print <<EOF if defined $license;

View File

@ -11,11 +11,7 @@ if [[ $1 == nix ]]; then
# Make sure we can use hydra's binary cache
sudo mkdir /etc/nix
sudo tee /etc/nix/nix.conf <<EOF >/dev/null
binary-caches = http://cache.nixos.org http://hydra.nixos.org
trusted-binary-caches = http://hydra.nixos.org
build-max-jobs = 4
EOF
sudo sh -c 'echo "build-max-jobs = 4" > /etc/nix/nix.conf'
# Verify evaluation
echo "=== Verifying that nixpkgs evaluates..."

View File

@ -9,7 +9,7 @@
<para>This section lists the release notes for each stable version of NixOS
and current unstable revision.</para>
<xi:include href="rl-unstable.xml" />
<xi:include href="rl-1603.xml" />
<xi:include href="rl-1509.xml" />
<xi:include href="rl-1412.xml" />
<xi:include href="rl-1404.xml" />

View File

@ -2,9 +2,9 @@
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:xi="http://www.w3.org/2001/XInclude"
version="5.0"
xml:id="sec-release-unstable">
xml:id="sec-release-16.03">
<title>Unstable</title>
<title>Release 16.03 (“Emu”, 2016/03/??)</title>
<para>In addition to numerous new and upgraded packages, this release
has the following highlights:</para>
@ -226,6 +226,27 @@ programs.ibus.plugins = with pkgs; [ ibus-anthy mozc ];
was removed. Please review the currently available options.</para>
</listitem>
<listitem>
<para>
The option <option>services.nsd.zones.&lt;name&gt;.data</option> no
longer interpret the dollar sign ($) as a shell variable, as such it
should not be escaped anymore. Thus the following zone data:
</para>
<programlisting>
\$ORIGIN example.com.
\$TTL 1800
@ IN SOA ns1.vpn.nbp.name. admin.example.com. (
</programlisting>
<para>
Should modified to look like the actual file expected by nsd:
</para>
<programlisting>
$ORIGIN example.com.
$TTL 1800
@ IN SOA ns1.vpn.nbp.name. admin.example.com. (
</programlisting>
</listitem>
</itemizedlist>

View File

@ -1,41 +0,0 @@
{ config, pkgs, lib, ... }:
{
imports = [
];
options = {
gtkPlugins = lib.mkOption {
type = lib.types.listOf lib.types.path;
default = [];
description = ''
Plugin packages for GTK+ such as input methods.
'';
};
};
config = {
environment.variables = if builtins.length config.gtkPlugins > 0
then
let
paths = [ pkgs.gtk2 pkgs.gtk3 ] ++ config.gtkPlugins;
env = pkgs.buildEnv {
name = "gtk-exe-env";
inherit paths;
postBuild = lib.concatStringsSep "\n"
(map (d: d.gtkExeEnvPostBuild or "") paths);
ignoreCollisions = true;
};
in {
GTK_EXE_PREFIX = builtins.toString env;
GTK_PATH = [
"${env}/lib/gtk-2.0"
"${env}/lib/gtk-3.0"
];
}
else {};
};
}

View File

@ -1,37 +0,0 @@
{ config, pkgs, lib, ... }:
{
imports = [
];
options = {
qtPlugins = lib.mkOption {
type = lib.types.listOf lib.types.path;
default = [];
description = ''
Plugin packages for Qt such as input methods.
'';
};
};
config = {
environment.variables = if builtins.length config.qtPlugins > 0
then
let
paths = [ pkgs.qt48 ] ++ config.qtPlugins;
env = pkgs.buildEnv {
name = "qt-plugin-env";
inherit paths;
postBuild = lib.concatStringsSep "\n"
(map (d: d.qtPluginEnvPostBuild or "") paths);
ignoreCollisions = true;
};
in {
QT_PLUGIN_PATH = [ (builtins.toString env) ];
}
else {};
};
}

View File

@ -18,10 +18,14 @@ in
type = with types; listOf fcitxEngine;
default = [];
example = literalExample "with pkgs.fcitx-engines; [ mozc hangul ]";
description = ''
Enabled Fcitx engines.
Available engines can be found by running `nix-env "&lt;nixpkgs&gt;" . -qaP -A fcitx-engines`.
'';
description =
let
engines =
lib.concatStringsSep ", "
(map (name: "<literal>${name}</literal>")
(lib.attrNames pkgs.fcitx-engines));
in
"Enabled Fcitx engines. Available engines are: ${engines}.";
};
};
@ -29,8 +33,6 @@ in
config = mkIf (config.i18n.inputMethod.enabled == "fcitx") {
environment.systemPackages = [ fcitxPackage ];
gtkPlugins = [ fcitxPackage ];
qtPlugins = [ fcitxPackage ];
environment.variables = {
GTK_IM_MODULE = "fcitx";

View File

@ -4,7 +4,6 @@ with lib;
{
config = mkIf (config.i18n.inputMethod.enabled == "nabi") {
environment.systemPackages = [ pkgs.nabi ];
qtPlugins = [ pkgs.nabi ];
environment.variables = {
GTK_IM_MODULE = "nabi";

View File

@ -23,8 +23,6 @@ in
config = mkIf (config.i18n.inputMethod.enabled == "uim") {
environment.systemPackages = [ pkgs.uim ];
gtkPlugins = [ pkgs.uim ];
qtPlugins = [ pkgs.uim ];
environment.variables = {
GTK_IM_MODULE = "uim";

View File

@ -0,0 +1,78 @@
# This module defines a NixOS installation CD that contains X11 and
# GNOME 3.
{ config, lib, pkgs, ... }:
with lib;
{
imports = [ ./installation-cd-base.nix ];
services.xserver = {
enable = true;
# GDM doesn't start in virtual machines with ISO
displayManager.slim = {
enable = true;
defaultUser = "root";
autoLogin = true;
};
desktopManager.gnome3 = {
enable = true;
extraGSettingsOverrides = ''
[org.gnome.desktop.background]
show-desktop-icons=true
[org.gnome.nautilus.desktop]
trash-icon-visible=false
volumes-visible=false
home-icon-visible=false
network-icon-visible=false
'';
extraGSettingsOverridePackages = [ pkgs.gnome3.nautilus ];
};
};
environment.systemPackages =
[ # Include gparted for partitioning disks.
pkgs.gparted
# Include some editors.
pkgs.vim
pkgs.bvi # binary editor
pkgs.joe
pkgs.glxinfo
];
# Don't start the X server by default.
services.xserver.autorun = mkForce false;
# Auto-login as root.
services.xserver.displayManager.gdm.autoLogin = {
enable = true;
user = "root";
};
system.activationScripts.installerDesktop = let
# Must be executable
desktopFile = pkgs.writeScript "nixos-manual.desktop" ''
[Desktop Entry]
Version=1.0
Type=Link
Name=NixOS Manual
URL=${config.system.build.manual.manual}/share/doc/nixos/index.html
Icon=system-help
'';
# use cp and chmod +x, we must be sure the apps are in the nix store though
in ''
mkdir -p /root/Desktop
ln -sfT ${desktopFile} /root/Desktop/nixos-manual.desktop
cp ${pkgs.gnome3.gnome_terminal}/share/applications/gnome-terminal.desktop /root/Desktop/gnome-terminal.desktop
chmod a+rx /root/Desktop/gnome-terminal.desktop
cp ${pkgs.gparted}/share/applications/gparted.desktop /root/Desktop/gparted.desktop
chmod a+rx /root/Desktop/gparted.desktop
'';
}

View File

@ -1,7 +1,7 @@
{ config, pkgs, ... }:
{
imports = [ ./installation-cd-graphical.nix ];
imports = [ ./installation-cd-graphical-kde.nix ];
boot.kernelPackages = pkgs.linuxPackages_latest;
}

View File

@ -253,6 +253,7 @@
pdnsd = 229;
octoprint = 230;
avahi-autoipd = 231;
nntp-proxy = 232;
# When adding a uid, make sure it doesn't match an existing gid. And don't use uids above 399!

View File

@ -7,7 +7,6 @@
./config/fonts/fonts.nix
./config/fonts/ghostscript.nix
./config/gnu.nix
./config/gtk-exe-env.nix
./config/i18n.nix
./config/krb5.nix
./config/ldap.nix
@ -16,7 +15,6 @@
./config/nsswitch.nix
./config/power-management.nix
./config/pulseaudio.nix
./config/qt-plugin-env.nix
./config/shells-environment.nix
./config/swap.nix
./config/sysctl.nix
@ -79,7 +77,6 @@
./programs/shell.nix
./programs/ssh.nix
./programs/ssmtp.nix
./programs/uim.nix
./programs/venus.nix
./programs/wvdial.nix
./programs/xfs_quota.nix
@ -243,6 +240,7 @@
./services/misc/ripple-data-api.nix
./services/misc/rogue.nix
./services/misc/siproxd.nix
./services/misc/spice-vdagentd.nix
./services/misc/subsonic.nix
./services/misc/sundtek.nix
./services/misc/svnserve.nix
@ -325,11 +323,11 @@
./services/networking/hostapd.nix
./services/networking/i2pd.nix
./services/networking/i2p.nix
./services/networking/ifplugd.nix
./services/networking/iodined.nix
./services/networking/ircd-hybrid/default.nix
./services/networking/kippo.nix
./services/networking/lambdabot.nix
./services/networking/libreswan.nix
./services/networking/mailpile.nix
./services/networking/minidlna.nix
./services/networking/miniupnpd.nix
@ -340,6 +338,7 @@
./services/networking/networkmanager.nix
./services/networking/ngircd.nix
./services/networking/nix-serve.nix
./services/networking/nntp-proxy.nix
./services/networking/nsd.nix
./services/networking/ntopng.nix
./services/networking/ntpd.nix

View File

@ -17,6 +17,7 @@
pkgs.ddrescue
pkgs.ccrypt
pkgs.cryptsetup # needed for dm-crypt volumes
pkgs.which # 88K size
# Some networking tools.
pkgs.fuse

View File

@ -56,7 +56,7 @@ in
*/
shellAliases = mkOption {
default = config.environment.shellAliases // { which = "type -P"; };
default = config.environment.shellAliases;
description = ''
Set of aliases for bash shell. See <option>environment.shellAliases</option>
for an option format description.

View File

@ -1,31 +0,0 @@
{ config, pkgs, lib, ... }:
with lib;
let
cfg = config.uim;
in
{
options = {
uim = {
enable = mkOption {
type = types.bool;
default = false;
example = true;
description = "Enable UIM input method";
};
};
};
config = mkIf cfg.enable {
environment.systemPackages = [ pkgs.uim ];
gtkPlugins = [ pkgs.uim ];
qtPlugins = [ pkgs.uim ];
environment.variables.GTK_IM_MODULE = "uim";
environment.variables.QT_IM_MODULE = "uim";
environment.variables.XMODIFIERS = "@im=uim";
services.xserver.displayManager.sessionCommands = "uim-xim &";
};
}

View File

@ -85,7 +85,7 @@ in
type = types.lines;
default = ''stdin { type => "example" }'';
description = "Logstash input configuration.";
example = literalExample ''
example = ''
# Read from journal
pipe {
command => "''${pkgs.systemd}/bin/journalctl -f -o json"
@ -98,7 +98,7 @@ in
type = types.lines;
default = ''noop {}'';
description = "logstash filter configuration.";
example = literalExample ''
example = ''
if [type] == "syslog" {
# Keep only relevant systemd fields
# http://www.freedesktop.org/software/systemd/man/systemd.journal-fields.html
@ -114,7 +114,7 @@ in
outputConfig = mkOption {
type = types.lines;
default = literalExample ''stdout { debug => true debug_format => "json"}'';
default = ''stdout { debug => true debug_format => "json"}'';
description = "Logstash output configuration.";
example = ''
redis { host => "localhost" data_type => "list" key => "logstash" codec => json }

View File

@ -254,7 +254,7 @@ in
${concatStringsSep "\n" (mapAttrsToList (to: from: ''
if [ -d '${from}' ]; then
mkdir '${stateDir}/sieve/${to}'
cp ${from}/*.sieve '${stateDir}/sieve/${to}'
cp "${from}/"*.sieve '${stateDir}/sieve/${to}'
else
cp '${from}' '${stateDir}/sieve/${to}'
fi

View File

@ -49,7 +49,12 @@ in {
domains = mkOption {
type = types.str;
description = "Local domains set; messages from them are signed, not verified.";
default = "csl:${config.networking.hostName}";
example = "csl:example.com,mydomain.net";
description = ''
Local domains set (see <literal>opendkim(8)</literal> for more information on datasets).
Messages from them are signed, not verified.
'';
};
keyFile = mkOption {
@ -77,8 +82,6 @@ in {
config = mkIf cfg.enable {
services.opendkim.domains = mkDefault "csl:${config.networking.hostName}";
users.extraUsers = optionalAttrs (cfg.user == "opendkim") (singleton
{ name = "opendkim";
group = cfg.group;

View File

@ -103,9 +103,13 @@ in
after = [ "network.target" ];
restartIfChanged = true;
environment = {
environment = let
penv = python.buildEnv.override {
extraLibs = [ bepasty gevent ];
};
in {
BEPASTY_CONFIG = "${server.workDir}/bepasty-${name}.conf";
PYTHONPATH= "${bepasty}/lib/${python.libPrefix}/site-packages:${gevent}/lib/${python.libPrefix}/site-packages";
PYTHONPATH= "${penv}/${python.sitePackages}/";
};
serviceConfig = {

View File

@ -62,7 +62,9 @@ in
};
plugins = mkOption {
#type = types.functionTo (types.listOf types.package);
default = plugins: [];
defaultText = "plugins: []";
example = literalExample "plugins: [ m3d-fio ]";
description = "Additional plugins.";
};

View File

@ -0,0 +1,30 @@
{ config, pkgs, lib, ... }:
with lib;
let
cfg = config.services.spice-vdagentd;
in
{
options = {
services.spice-vdagentd = {
enable = mkEnableOption "Spice guest vdagent daemon";
};
};
config = mkIf cfg.enable {
environment.systemPackages = [ pkgs.spice-vdagent ];
systemd.services.spice-vdagentd = {
description = "spice-vdagent daemon";
wantedBy = [ "graphical.target" ];
preStart = ''
mkdir -p "/var/run/spice-vdagentd/"
'';
serviceConfig = {
Type = "forking";
ExecStart = "/bin/sh -c '${pkgs.spice-vdagent}/bin/spice-vdagentd'";
};
};
};
}

View File

@ -100,7 +100,7 @@ in {
wantedBy = [ "multi-user.target" ];
serviceConfig = {
ExecStart = "${pkgs.collectd}/sbin/collectd -C ${conf} -P ${cfg.pidFile}";
ExecStart = "${cfg.package}/sbin/collectd -C ${conf} -P ${cfg.pidFile}";
Type = "forking";
PIDFile = cfg.pidFile;
User = optional (cfg.user!="root") cfg.user;

View File

@ -1,82 +0,0 @@
{ config, lib, pkgs, ... }:
with lib;
let
inherit (pkgs) ifplugd;
cfg = config.networking.interfaceMonitor;
# The ifplugd action script, which is called whenever the link
# status changes (i.e., a cable is plugged in or unplugged).
plugScript = pkgs.writeScript "ifplugd.action"
''
#! ${pkgs.stdenv.shell}
iface="$1"
status="$2"
${cfg.commands}
'';
in
{
###### interface
options = {
networking.interfaceMonitor.enable = mkOption {
type = types.bool;
default = false;
description = ''
If <literal>true</literal>, monitor Ethernet interfaces for
cables being plugged in or unplugged. When this occurs, the
commands specified in
<option>networking.interfaceMonitor.commands</option> are
executed.
'';
};
networking.interfaceMonitor.beep = mkOption {
type = types.bool;
default = false;
description = ''
If <literal>true</literal>, beep when an Ethernet cable is
plugged in or unplugged.
'';
};
networking.interfaceMonitor.commands = mkOption {
type = types.lines;
default = "";
description = ''
Shell commands to be executed when the link status of an
interface changes. On invocation, the shell variable
<varname>iface</varname> contains the name of the interface,
while the variable <varname>status</varname> contains either
<literal>up</literal> or <literal>down</literal> to indicate
the new status.
'';
};
};
###### implementation
config = mkIf cfg.enable {
systemd.services.ifplugd = {
description = "Network interface connectivity monitor";
after = [ "network-interfaces.target" ];
wantedBy = [ "multi-user.target" ];
script = ''
${ifplugd}/sbin/ifplugd --no-daemon --no-startup --no-shutdown \
${if config.networking.interfaceMonitor.beep then "" else "--no-beep"} \
--run ${plugScript}
'';
};
environment.systemPackages = [ ifplugd ];
};
}

View File

@ -0,0 +1,126 @@
{ config, lib, pkgs, ... }:
with lib;
let
cfg = config.services.libreswan;
libexec = "${pkgs.libreswan}/libexec/ipsec";
ipsec = "${pkgs.libreswan}/sbin/ipsec";
trim = chars: str: let
nonchars = filter (x : !(elem x.value chars))
(imap (i: v: {ind = (sub i 1); value = v;}) (stringToCharacters str));
in
if length nonchars == 0 then ""
else substring (head nonchars).ind (add 1 (sub (last nonchars).ind (head nonchars).ind)) str;
indent = str: concatStrings (concatMap (s: [" " (trim [" " "\t"] s) "\n"]) (splitString "\n" str));
configText = indent (toString cfg.configSetup);
connectionText = concatStrings (mapAttrsToList (n: v:
''
conn ${n}
${indent v}
'') cfg.connections);
configFile = pkgs.writeText "ipsec.conf"
''
config setup
${configText}
${connectionText}
'';
in
{
###### interface
options = {
services.libreswan = {
enable = mkEnableOption "libreswan ipsec service";
configSetup = mkOption {
type = types.lines;
default = ''
protostack=netkey
nat_traversal=yes
virtual_private=%v4:10.0.0.0/8,%v4:192.168.0.0/16,%v4:172.16.0.0/12,%v4:25.0.0.0/8,%v4:100.64.0.0/10,%v6:fd00::/8,%v6:fe80::/10
'';
example = ''
secretsfile=/root/ipsec.secrets
protostack=netkey
nat_traversal=yes
virtual_private=%v4:10.0.0.0/8,%v4:192.168.0.0/16,%v4:172.16.0.0/12,%v4:25.0.0.0/8,%v4:100.64.0.0/10,%v6:fd00::/8,%v6:fe80::/10
'';
description = "Options to go in the 'config setup' section of the libreswan ipsec configuration";
};
connections = mkOption {
type = types.attrsOf types.lines;
default = {};
example = {
myconnection = ''
auto=add
left=%defaultroute
leftid=@user
right=my.vpn.com
ikev2=no
ikelifetime=8h
'';
};
description = "A set of connections to define for the libreswan ipsec service";
};
};
};
###### implementation
config = mkIf cfg.enable {
environment.systemPackages = [ pkgs.libreswan pkgs.iproute ];
systemd.services.ipsec = {
description = "Internet Key Exchange (IKE) Protocol Daemon for IPsec";
path = [
"${pkgs.libreswan}"
"${pkgs.iproute}"
"${pkgs.procps}"
];
wants = [ "network-online.target" ];
after = [ "network-online.target" ];
wantedBy = [ "multi-user.target" ];
serviceConfig = {
Type = "simple";
Restart = "always";
EnvironmentFile = "${pkgs.libreswan}/etc/sysconfig/pluto";
ExecStartPre = [
"${libexec}/addconn --config ${configFile} --checkconfig"
"${libexec}/_stackmanager start"
"${ipsec} --checknss"
"${ipsec} --checknflog"
];
ExecStart = "${libexec}/pluto --config ${configFile} --nofork \$PLUTO_OPTIONS";
ExecStop = "${libexec}/whack --shutdown";
ExecStopPost = [
"${pkgs.iproute}/bin/ip xfrm policy flush"
"${pkgs.iproute}/bin/ip xfrm state flush"
"${ipsec} --stopnflog"
];
ExecReload = "${libexec}/whack --listen";
};
};
};
}

View File

@ -21,6 +21,9 @@ let
[logging]
level=WARN
[connection]
ipv6.ip6-privacy=2
'';
/*

View File

@ -0,0 +1,235 @@
{ config, lib, pkgs, ... }:
with lib;
let
inherit (pkgs) nntp-proxy;
proxyUser = "nntp-proxy";
cfg = config.services.nntp-proxy;
configBool = b: if b then "TRUE" else "FALSE";
confFile = pkgs.writeText "nntp-proxy.conf" ''
nntp_server:
{
# NNTP Server host and port address
server = "${cfg.upstreamServer}";
port = ${toString cfg.upstreamPort};
# NNTP username
username = "${cfg.upstreamUser}";
# NNTP password in clear text
password = "${cfg.upstreamPassword}";
# Maximum number of connections allowed by the NNTP
max_connections = ${toString cfg.upstreamMaxConnections};
};
proxy:
{
# Local address and port to bind to
bind_ip = "${cfg.listenAddress}";
bind_port = ${toString cfg.port};
# SSL key and cert file
ssl_key = "${cfg.sslKey}";
ssl_cert = "${cfg.sslCert}";
# prohibit users from posting
prohibit_posting = ${configBool cfg.prohibitPosting};
# Verbose levels: ERROR, WARNING, NOTICE, INFO, DEBUG
verbose = "${toUpper cfg.verbosity}";
# Password is made with: 'mkpasswd -m sha-512 <password>'
users = (${concatStringsSep ",\n" (mapAttrsToList (username: userConfig:
''
{
username = "${username}";
password = "${userConfig.passwordHash}";
max_connections = ${toString userConfig.maxConnections};
}
'') cfg.users)});
};
'';
in
{
###### interface
options = {
services.nntp-proxy = {
enable = mkEnableOption "NNTP-Proxy";
upstreamServer = mkOption {
type = types.str;
default = "";
example = "ssl-eu.astraweb.com";
description = ''
Upstream server address
'';
};
upstreamPort = mkOption {
type = types.int;
default = 563;
description = ''
Upstream server port
'';
};
upstreamMaxConnections = mkOption {
type = types.int;
default = 20;
description = ''
Upstream server maximum allowed concurrent connections
'';
};
upstreamUser = mkOption {
type = types.str;
default = "";
description = ''
Upstream server username
'';
};
upstreamPassword = mkOption {
type = types.str;
default = "";
description = ''
Upstream server password
'';
};
listenAddress = mkOption {
type = types.str;
default = "127.0.0.1";
example = "[::]";
description = ''
Proxy listen address (IPv6 literal addresses need to be enclosed in "[" and "]" characters)
'';
};
port = mkOption {
type = types.int;
default = 5555;
description = ''
Proxy listen port
'';
};
sslKey = mkOption {
type = types.str;
default = "key.pem";
example = "/path/to/your/key.file";
description = ''
Proxy ssl key path
'';
};
sslCert = mkOption {
type = types.str;
default = "cert.pem";
example = "/path/to/your/cert.file";
description = ''
Proxy ssl certificate path
'';
};
prohibitPosting = mkOption {
type = types.bool;
default = true;
description = ''
Whether to prohibit posting to the upstream server
'';
};
verbosity = mkOption {
type = types.str;
default = "info";
example = "error";
description = ''
Verbosity level (error, warning, notice, info, debug)
'';
};
users = mkOption {
type = types.attrsOf (types.submodule {
options = {
username = mkOption {
type = types.str;
default = null;
description = ''
Username
'';
};
passwordHash = mkOption {
type = types.str;
default = null;
example = "$6$GtzE7FrpE$wwuVgFYU.TZH4Rz.Snjxk9XGua89IeVwPQ/fEUD8eujr40q5Y021yhn0aNcsQ2Ifw.BLclyzvzgegopgKcneL0";
description = ''
SHA-512 password hash (can be generated by
<code>mkpasswd -m sha-512 &lt;password&gt;</code>)
'';
};
maxConnections = mkOption {
type = types.int;
default = 1;
description = ''
Maximum number of concurrent connections to the proxy for this user
'';
};
};
});
description = ''
NNTP-Proxy user configuration
'';
default = {};
example = literalExample ''
"user1" = {
passwordHash = "$6$1l0t5Kn2Dk$appzivc./9l/kjq57eg5UCsBKlcfyCr0zNWYNerKoPsI1d7eAwiT0SVsOVx/CTgaBNT/u4fi2vN.iGlPfv1ek0";
maxConnections = 5;
};
"anotheruser" = {
passwordHash = "$6$6lwEsWB.TmsS$W7m1riUx4QrA8pKJz8hvff0dnF1NwtZXgdjmGqA1Dx2MDPj07tI9GNcb0SWlMglE.2/hBgynDdAd/XqqtRqVQ0";
maxConnections = 7;
};
'';
};
};
};
###### implementation
config = mkIf cfg.enable {
users.extraUsers = singleton
{ name = proxyUser;
uid = config.ids.uids.nntp-proxy;
description = "NNTP-Proxy daemon user";
};
systemd.services.nntp-proxy = {
description = "NNTP proxy";
after = [ "network.target" "nss-lookup.target" ];
wantedBy = [ "multi-user.target" ];
serviceConfig = { User="${proxyUser}"; };
serviceConfig.ExecStart = "${nntp-proxy}/bin/nntp-proxy ${confFile}";
preStart = ''
if [ ! \( -f ${cfg.sslCert} -a -f ${cfg.sslKey} \) ]; then
${pkgs.openssl}/bin/openssl req -subj '/CN=AutoGeneratedCert/O=NixOS Service/C=US' \
-new -newkey rsa:2048 -days 365 -nodes -x509 -keyout ${cfg.sslKey} -out ${cfg.sslCert};
fi
'';
};
};
}

View File

@ -9,6 +9,7 @@ let
stateDir = "/var/lib/nsd";
pidFile = stateDir + "/var/nsd.pid";
# build nsd with the options needed for the given config
nsdPkg = pkgs.nsd.override {
bind8Stats = cfg.bind8Stats;
ipv6 = cfg.ipv6;
@ -17,74 +18,99 @@ let
zoneStats = length (collect (x: (x.zoneStats or null) != null) cfg.zones) > 0;
};
zoneFiles = pkgs.stdenv.mkDerivation {
preferLocalBuild = true;
nsdEnv = pkgs.buildEnv {
name = "nsd-env";
buildCommand = concatStringsSep "\n"
[ "mkdir -p $out"
(concatStrings (mapAttrsToList (zoneName: zoneOptions: ''
cat > "$out/${zoneName}" <<_EOF_
${zoneOptions.data}
_EOF_
'') zoneConfigs))
];
paths = [ configFile ]
++ mapAttrsToList (name: zone: writeZoneData name zone.data) zoneConfigs;
postBuild = ''
echo "checking zone files"
cd $out/zones
for zoneFile in *; do
${nsdPkg}/sbin/nsd-checkzone "$zoneFile" "$zoneFile" || {
if grep -q \\\\\\$ "$zoneFile"; then
echo zone "$zoneFile" contains escaped dollar signes \\\$
echo Escaping them is not needed any more. Please make shure \
to unescape them where they prefix a variable name
fi
exit 1
}
done
echo "checking configuration file"
${nsdPkg}/sbin/nsd-checkconf $out/nsd.conf
'';
};
configFile = pkgs.writeText "nsd.conf" ''
writeZoneData = name: text: pkgs.writeTextFile {
inherit name text;
destination = "/zones/${name}";
};
# options are ordered alphanumerically by the nixos option name
configFile = pkgs.writeTextDir "nsd.conf" ''
server:
username: ${username}
chroot: "${stateDir}"
username: ${username}
# The directory for zonefile: files. The daemon chdirs here.
zonesdir: "${stateDir}"
# the list of dynamically added zones.
zonelistfile: "${stateDir}/var/zone.list"
database: "${stateDir}/var/nsd.db"
pidfile: "${pidFile}"
xfrdfile: "${stateDir}/var/xfrd.state"
xfrdir: "${stateDir}/tmp"
zonelistfile: "${stateDir}/var/zone.list"
# interfaces
${forEach " ip-address: " cfg.interfaces}
server-count: ${toString cfg.serverCount}
ip-transparent: ${yesOrNo cfg.ipTransparent}
do-ip4: ${yesOrNo cfg.ipv4}
do-ip6: ${yesOrNo cfg.ipv6}
port: ${toString cfg.port}
verbosity: ${toString cfg.verbosity}
hide-version: ${yesOrNo cfg.hideVersion}
identity: "${cfg.identity}"
ip-transparent: ${yesOrNo cfg.ipTransparent}
do-ip4: ${yesOrNo cfg.ipv4}
ipv4-edns-size: ${toString cfg.ipv4EDNSSize}
do-ip6: ${yesOrNo cfg.ipv6}
ipv6-edns-size: ${toString cfg.ipv6EDNSSize}
log-time-ascii: ${yesOrNo cfg.logTimeAscii}
${maybeString "nsid: " cfg.nsid}
port: ${toString cfg.port}
reuseport: ${yesOrNo cfg.reuseport}
round-robin: ${yesOrNo cfg.roundRobin}
server-count: ${toString cfg.serverCount}
${if cfg.statistics == null then "" else "statistics: ${toString cfg.statistics}"}
tcp-count: ${toString cfg.tcpCount}
tcp-query-count: ${toString cfg.tcpQueryCount}
tcp-timeout: ${toString cfg.tcpTimeout}
ipv4-edns-size: ${toString cfg.ipv4EDNSSize}
ipv6-edns-size: ${toString cfg.ipv6EDNSSize}
${if cfg.statistics == null then "" else "statistics: ${toString cfg.statistics}"}
verbosity: ${toString cfg.verbosity}
${maybeString "version: " cfg.version}
xfrd-reload-timeout: ${toString cfg.xfrdReloadTimeout}
zonefiles-check: ${yesOrNo cfg.zonefilesCheck}
rrl-size: ${toString cfg.ratelimit.size}
rrl-ratelimit: ${toString cfg.ratelimit.ratelimit}
rrl-whitelist-ratelimit: ${toString cfg.ratelimit.whitelistRatelimit}
${maybeString "rrl-slip: " cfg.ratelimit.slip}
${maybeString "rrl-ipv4-prefix-length: " cfg.ratelimit.ipv4PrefixLength}
${maybeString "rrl-ipv6-prefix-length: " cfg.ratelimit.ipv6PrefixLength}
rrl-ratelimit: ${toString cfg.ratelimit.ratelimit}
${maybeString "rrl-slip: " cfg.ratelimit.slip}
rrl-size: ${toString cfg.ratelimit.size}
rrl-whitelist-ratelimit: ${toString cfg.ratelimit.whitelistRatelimit}
${keyConfigFile}
remote-control:
control-enable: ${yesOrNo cfg.remoteControl.enable}
${forEach " control-interface: " cfg.remoteControl.interfaces}
control-port: ${toString cfg.port}
server-key-file: "${cfg.remoteControl.serverKeyFile}"
server-cert-file: "${cfg.remoteControl.serverCertFile}"
control-key-file: "${cfg.remoteControl.controlKeyFile}"
control-cert-file: "${cfg.remoteControl.controlCertFile}"
${forEach " control-interface: " cfg.remoteControl.interfaces}
control-port: ${toString cfg.remoteControl.port}
server-key-file: "${cfg.remoteControl.serverKeyFile}"
server-cert-file: "${cfg.remoteControl.serverCertFile}"
# zone files reside in "${zoneFiles}" linked to "${stateDir}/zones"
${concatStrings (mapAttrsToList zoneConfigFile zoneConfigs)}
${cfg.extraConfig}
@ -106,22 +132,23 @@ let
secret=$(cat "${keyOptions.keyFile}")
dest="${stateDir}/private/${keyName}"
echo " secret: \"$secret\"" > "$dest"
${pkgs.coreutils}/bin/chown ${username}:${username} "$dest"
${pkgs.coreutils}/bin/chmod 0400 "$dest"
chown ${username}:${username} "$dest"
chmod 0400 "$dest"
'') cfg.keys);
# options are ordered alphanumerically by the nixos option name
zoneConfigFile = name: zone: ''
zone:
name: "${name}"
zonefile: "${stateDir}/zones/${name}"
${maybeString "zonestats: " zone.zoneStats}
${maybeString "outgoing-interface: " zone.outgoingInterface}
${forEach " rrl-whitelist: " zone.rrlWhitelist}
${maybeString "zonestats: " zone.zoneStats}
allow-axfr-fallback: ${yesOrNo zone.allowAXFRFallback}
${forEach " allow-notify: " zone.allowNotify}
${forEach " request-xfr: " zone.requestXFR}
allow-axfr-fallback: ${yesOrNo zone.allowAXFRFallback}
${forEach " notify: " zone.notify}
notify-retry: ${toString zone.notifyRetry}
@ -152,17 +179,16 @@ let
childConfig = x: v: { options.children = { type = types.attrsOf x; visible = v; }; };
# options are ordered alphanumerically
zoneOptionsRaw = types.submodule {
options = {
children = mkOption {
default = {};
allowAXFRFallback = mkOption {
type = types.bool;
default = true;
description = ''
Children zones inherit all options of their parents. Attributes
defined in a child will overwrite the ones of its parent. Only
leaf zones will be actually served. This way it's possible to
define maybe zones which share most attributes without
duplicating everything. This mechanism replaces nsd's patterns
in a save and functional way.
If NSD as secondary server should be allowed to AXFR if the primary
server does not allow IXFR.
'';
};
@ -193,21 +219,25 @@ let
'';
};
requestXFR = mkOption {
type = types.listOf types.str;
default = [];
example = [];
children = mkOption {
default = {};
description = ''
Format: <code>[AXFR|UDP] &lt;ip-address&gt; &lt;key-name | NOKEY&gt;</code>
Children zones inherit all options of their parents. Attributes
defined in a child will overwrite the ones of its parent. Only
leaf zones will be actually served. This way it's possible to
define maybe zones which share most attributes without
duplicating everything. This mechanism replaces nsd's patterns
in a save and functional way.
'';
};
allowAXFRFallback = mkOption {
type = types.bool;
default = true;
data = mkOption {
type = types.str;
default = "";
example = "";
description = ''
If NSD as secondary server should be allowed to AXFR if the primary
server does not allow IXFR.
The actual zone data. This is the content of your zone file.
Use imports or pkgs.lib.readFile if you don't want this data in your config file.
'';
};
@ -238,16 +268,6 @@ let
'';
};
provideXFR = mkOption {
type = types.listOf types.str;
default = [];
example = [ "192.0.2.0/24 NOKEY" "192.0.2.0/24 my_tsig_key_name" ];
description = ''
Allow these IPs and TSIG to transfer zones, addr TSIG|NOKEY|BLOCKED
address range 192.0.2.0/24, 1.2.3.4&amp;255.255.0.0, 3.0.2.20-3.0.2.40
'';
};
outgoingInterface = mkOption {
type = types.nullOr types.str;
default = null;
@ -260,6 +280,25 @@ let
'';
};
provideXFR = mkOption {
type = types.listOf types.str;
default = [];
example = [ "192.0.2.0/24 NOKEY" "192.0.2.0/24 my_tsig_key_name" ];
description = ''
Allow these IPs and TSIG to transfer zones, addr TSIG|NOKEY|BLOCKED
address range 192.0.2.0/24, 1.2.3.4&amp;255.255.0.0, 3.0.2.20-3.0.2.40
'';
};
requestXFR = mkOption {
type = types.listOf types.str;
default = [];
example = [];
description = ''
Format: <code>[AXFR|UDP] &lt;ip-address&gt; &lt;key-name | NOKEY&gt;</code>
'';
};
rrlWhitelist = mkOption {
type = types.listOf types.str;
default = [];
@ -270,16 +309,6 @@ let
'';
};
data = mkOption {
type = types.str;
default = "";
example = "";
description = ''
The actual zone data. This is the content of your zone file.
Use imports or pkgs.lib.readFile if you don't want this data in your config file.
'';
};
zoneStats = mkOption {
type = types.nullOr types.str;
default = null;
@ -292,79 +321,24 @@ let
and stats_noreset.
'';
};
};
};
in
{
options = {
services.nsd = {
# options are ordered alphanumerically
options.services.nsd = {
enable = mkEnableOption "NSD authoritative DNS server";
bind8Stats = mkEnableOption "BIND8 like statistics";
rootServer = mkOption {
type = types.bool;
default = false;
extraConfig = mkOption {
type = types.str;
default = "";
description = ''
Wheter if this server will be a root server (a DNS root server, you
usually don't want that).
'';
};
interfaces = mkOption {
type = types.listOf types.str;
default = [ "127.0.0.0" "::1" ];
description = ''
What addresses the server should listen to.
'';
};
serverCount = mkOption {
type = types.int;
default = 1;
description = ''
Number of NSD servers to fork. Put the number of CPUs to use here.
'';
};
ipTransparent = mkOption {
type = types.bool;
default = false;
description = ''
Allow binding to non local addresses.
'';
};
ipv4 = mkOption {
type = types.bool;
default = true;
description = ''
Wheter to listen on IPv4 connections.
'';
};
ipv6 = mkOption {
type = types.bool;
default = true;
description = ''
Wheter to listen on IPv6 connections.
'';
};
port = mkOption {
type = types.int;
default = 53;
description = ''
Port the service should bind do.
'';
};
verbosity = mkOption {
type = types.int;
default = 0;
description = ''
Verbosity level.
Extra nsd config.
'';
};
@ -384,6 +358,62 @@ in
'';
};
interfaces = mkOption {
type = types.listOf types.str;
default = [ "127.0.0.0" "::1" ];
description = ''
What addresses the server should listen to.
'';
};
ipTransparent = mkOption {
type = types.bool;
default = false;
description = ''
Allow binding to non local addresses.
'';
};
ipv4 = mkOption {
type = types.bool;
default = true;
description = ''
Wheter to listen on IPv4 connections.
'';
};
ipv4EDNSSize = mkOption {
type = types.int;
default = 4096;
description = ''
Preferred EDNS buffer size for IPv4.
'';
};
ipv6 = mkOption {
type = types.bool;
default = true;
description = ''
Wheter to listen on IPv6 connections.
'';
};
ipv6EDNSSize = mkOption {
type = types.int;
default = 4096;
description = ''
Preferred EDNS buffer size for IPv6.
'';
};
logTimeAscii = mkOption {
type = types.bool;
default = true;
description = ''
Log time in ascii, if false then in unix epoch seconds.
'';
};
nsid = mkOption {
type = types.nullOr types.str;
default = null;
@ -392,6 +422,53 @@ in
'';
};
port = mkOption {
type = types.int;
default = 53;
description = ''
Port the service should bind do.
'';
};
reuseport = mkOption {
type = types.bool;
default = pkgs.stdenv.isLinux;
description = ''
Wheter to enable SO_REUSEPORT on all used sockets. This lets multiple
processes bind to the same port. This speeds up operation especially
if the server count is greater than one and makes fast restarts less
prone to fail
'';
};
rootServer = mkOption {
type = types.bool;
default = false;
description = ''
Wheter if this server will be a root server (a DNS root server, you
usually don't want that).
'';
};
roundRobin = mkEnableOption "round robin rotation of records";
serverCount = mkOption {
type = types.int;
default = 1;
description = ''
Number of NSD servers to fork. Put the number of CPUs to use here.
'';
};
statistics = mkOption {
type = types.nullOr types.int;
default = null;
description = ''
Statistics are produced every number of seconds. Prints to log.
If null no statistics are logged.
'';
};
tcpCount = mkOption {
type = types.int;
default = 100;
@ -417,28 +494,21 @@ in
'';
};
ipv4EDNSSize = mkOption {
verbosity = mkOption {
type = types.int;
default = 4096;
default = 0;
description = ''
Preferred EDNS buffer size for IPv4.
Verbosity level.
'';
};
ipv6EDNSSize = mkOption {
type = types.int;
default = 4096;
description = ''
Preferred EDNS buffer size for IPv6.
'';
};
statistics = mkOption {
type = types.nullOr types.int;
version = mkOption {
type = types.nullOr types.str;
default = null;
description = ''
Statistics are produced every number of seconds. Prints to log.
If null no statistics are logged.
The version string replied for CH TXT version.server and version.bind
queries. Will use the compiled package version on null.
See hideVersion for enabling/disabling this responses.
'';
};
@ -459,134 +529,10 @@ in
};
extraConfig = mkOption {
type = types.str;
default = "";
description = ''
Extra nsd config.
'';
};
ratelimit = {
enable = mkEnableOption "ratelimit capabilities";
size = mkOption {
type = types.int;
default = 1000000;
description = ''
Size of the hashtable. More buckets use more memory but lower
the chance of hash hash collisions.
'';
};
ratelimit = mkOption {
type = types.int;
default = 200;
description = ''
Max qps allowed from any query source.
0 means unlimited. With an verbosity of 2 blocked and
unblocked subnets will be logged.
'';
};
whitelistRatelimit = mkOption {
type = types.int;
default = 2000;
description = ''
Max qps allowed from whitelisted sources.
0 means unlimited. Set the rrl-whitelist option for specific
queries to apply this limit instead of the default to them.
'';
};
slip = mkOption {
type = types.nullOr types.int;
default = null;
description = ''
Number of packets that get discarded before replying a SLIP response.
0 disables SLIP responses. 1 will make every response a SLIP response.
'';
};
ipv4PrefixLength = mkOption {
type = types.nullOr types.int;
default = null;
description = ''
IPv4 prefix length. Addresses are grouped by netblock.
'';
};
ipv6PrefixLength = mkOption {
type = types.nullOr types.int;
default = null;
description = ''
IPv6 prefix length. Addresses are grouped by netblock.
'';
};
};
remoteControl = {
enable = mkEnableOption "remote control via nsd-control";
interfaces = mkOption {
type = types.listOf types.str;
default = [ "127.0.0.1" "::1" ];
description = ''
Which interfaces NSD should bind to for remote control.
'';
};
port = mkOption {
type = types.int;
default = 8952;
description = ''
Port number for remote control operations (uses TLS over TCP).
'';
};
serverKeyFile = mkOption {
type = types.path;
default = "/etc/nsd/nsd_server.key";
description = ''
Path to the server private key, which is used by the server
but not by nsd-control. This file is generated by nsd-control-setup.
'';
};
serverCertFile = mkOption {
type = types.path;
default = "/etc/nsd/nsd_server.pem";
description = ''
Path to the server self signed certificate, which is used by the server
but and by nsd-control. This file is generated by nsd-control-setup.
'';
};
controlKeyFile = mkOption {
type = types.path;
default = "/etc/nsd/nsd_control.key";
description = ''
Path to the client private key, which is used by nsd-control
but not by the server. This file is generated by nsd-control-setup.
'';
};
controlCertFile = mkOption {
type = types.path;
default = "/etc/nsd/nsd_control.pem";
description = ''
Path to the client certificate signed with the server certificate.
This file is used by nsd-control and generated by nsd-control-setup.
'';
};
};
keys = mkOption {
type = types.attrsOf (types.submodule {
options = {
algorithm = mkOption {
type = types.str;
default = "hmac-sha256";
@ -604,20 +550,143 @@ in
user.
'';
};
};
});
default = {};
example = {
"tsig.example.org" = {
example = literalExample ''
{ "tsig.example.org" = {
algorithm = "hmac-md5";
secret = "aaaaaabbbbbbccccccdddddd";
};
keyFile = "/path/to/my/key";
};
}
'';
description = ''
Define your TSIG keys here.
'';
};
ratelimit = {
enable = mkEnableOption "ratelimit capabilities";
ipv4PrefixLength = mkOption {
type = types.nullOr types.int;
default = null;
description = ''
IPv4 prefix length. Addresses are grouped by netblock.
'';
};
ipv6PrefixLength = mkOption {
type = types.nullOr types.int;
default = null;
description = ''
IPv6 prefix length. Addresses are grouped by netblock.
'';
};
ratelimit = mkOption {
type = types.int;
default = 200;
description = ''
Max qps allowed from any query source.
0 means unlimited. With an verbosity of 2 blocked and
unblocked subnets will be logged.
'';
};
slip = mkOption {
type = types.nullOr types.int;
default = null;
description = ''
Number of packets that get discarded before replying a SLIP response.
0 disables SLIP responses. 1 will make every response a SLIP response.
'';
};
size = mkOption {
type = types.int;
default = 1000000;
description = ''
Size of the hashtable. More buckets use more memory but lower
the chance of hash hash collisions.
'';
};
whitelistRatelimit = mkOption {
type = types.int;
default = 2000;
description = ''
Max qps allowed from whitelisted sources.
0 means unlimited. Set the rrl-whitelist option for specific
queries to apply this limit instead of the default to them.
'';
};
};
remoteControl = {
enable = mkEnableOption "remote control via nsd-control";
controlCertFile = mkOption {
type = types.path;
default = "/etc/nsd/nsd_control.pem";
description = ''
Path to the client certificate signed with the server certificate.
This file is used by nsd-control and generated by nsd-control-setup.
'';
};
controlKeyFile = mkOption {
type = types.path;
default = "/etc/nsd/nsd_control.key";
description = ''
Path to the client private key, which is used by nsd-control
but not by the server. This file is generated by nsd-control-setup.
'';
};
interfaces = mkOption {
type = types.listOf types.str;
default = [ "127.0.0.1" "::1" ];
description = ''
Which interfaces NSD should bind to for remote control.
'';
};
port = mkOption {
type = types.int;
default = 8952;
description = ''
Port number for remote control operations (uses TLS over TCP).
'';
};
serverCertFile = mkOption {
type = types.path;
default = "/etc/nsd/nsd_server.pem";
description = ''
Path to the server self signed certificate, which is used by the server
but and by nsd-control. This file is generated by nsd-control-setup.
'';
};
serverKeyFile = mkOption {
type = types.path;
default = "/etc/nsd/nsd_server.key";
description = ''
Path to the server private key, which is used by the server
but not by nsd-control. This file is generated by nsd-control-setup.
'';
};
};
zones = mkOption {
type = types.attrsOf zoneOptions;
default = {};
@ -663,7 +732,6 @@ in
};
};
};
config = mkIf cfg.enable {
@ -683,31 +751,40 @@ in
systemd.services.nsd = {
description = "NSD authoritative only domain name service";
after = [ "keys.target" "network.target" ];
wantedBy = [ "multi-user.target" ];
after = [ "network.target" ];
wants = [ "keys.target" ];
serviceConfig = {
ExecStart = "${nsdPkg}/sbin/nsd -d -c ${nsdEnv}/nsd.conf";
PIDFile = pidFile;
Restart = "always";
ExecStart = "${nsdPkg}/sbin/nsd -d -c ${configFile}";
RestartSec = "4s";
StartLimitBurst = 4;
StartLimitInterval = "5min";
};
preStart = ''
${pkgs.coreutils}/bin/mkdir -m 0700 -p "${stateDir}/private"
${pkgs.coreutils}/bin/mkdir -m 0700 -p "${stateDir}/tmp"
${pkgs.coreutils}/bin/mkdir -m 0700 -p "${stateDir}/var"
rm -Rf "${stateDir}/private/"
rm -Rf "${stateDir}/tmp/"
${pkgs.coreutils}/bin/touch "${stateDir}/don't touch anything in here"
mkdir -m 0700 -p "${stateDir}/private"
mkdir -m 0700 -p "${stateDir}/tmp"
mkdir -m 0700 -p "${stateDir}/var"
${pkgs.coreutils}/bin/rm -f "${stateDir}/private/"*
${pkgs.coreutils}/bin/rm -f "${stateDir}/tmp/"*
cat > "${stateDir}/don't touch anything in here" << EOF
Everything in this directory except NSD's state in var is
automatically generated and will be purged and redeployed
by the nsd.service pre-start script.
EOF
${pkgs.coreutils}/bin/chown nsd:nsd -R "${stateDir}/private"
${pkgs.coreutils}/bin/chown nsd:nsd -R "${stateDir}/tmp"
${pkgs.coreutils}/bin/chown nsd:nsd -R "${stateDir}/var"
chown ${username}:${username} -R "${stateDir}/private"
chown ${username}:${username} -R "${stateDir}/tmp"
chown ${username}:${username} -R "${stateDir}/var"
${pkgs.coreutils}/bin/rm -rf "${stateDir}/zones"
${pkgs.coreutils}/bin/cp -r "${zoneFiles}" "${stateDir}/zones"
rm -rf "${stateDir}/zones"
cp -rL "${nsdEnv}/zones" "${stateDir}/zones"
${copyKeys}
'';

View File

@ -33,6 +33,17 @@ in
'';
};
all_proxy = mkOption {
type = types.string;
default = "";
example = "socks5://address.com:1234";
description = ''
Overwrites all_proxy environment variable for the syncthing process to
the given value. This is normaly used to let relay client connect
through SOCKS5 proxy server.
'';
};
dataDir = mkOption {
default = "/var/lib/syncthing";
description = ''
@ -51,7 +62,6 @@ in
};
};
};
@ -66,8 +76,13 @@ in
description = "Syncthing service";
after = [ "network.target" ];
wantedBy = [ "multi-user.target" ];
environment.STNORESTART = "yes"; # do not self-restart
environment.STNOUPGRADE = "yes";
environment = {
STNORESTART = "yes"; # do not self-restart
STNOUPGRADE = "yes";
} //
(config.networking.proxy.envVars) //
(if cfg.all_proxy != "" then { all_proxy = cfg.all_proxy; } else {});
serviceConfig = {
User = "${cfg.user}";
PermissionsStartOnly = true;

View File

@ -78,10 +78,11 @@ in {
'';
default = {};
example = literalExample ''
echelon = {
{ echelon = {
psk = "abcdefgh";
};
"free.wifi" = {};
}
'';
};

View File

@ -16,6 +16,7 @@ let
${cfg.daemon.extraConfig}
'';
pkg = pkgs.clamav.override { freshclamConf = cfg.updater.config; };
in
{
options = {
@ -54,7 +55,7 @@ in
};
config = mkIf cfg.updater.enable or cfg.daemon.enable {
environment.systemPackages = [ pkgs.clamav ];
environment.systemPackages = [ pkg ];
users.extraUsers = singleton {
name = clamavUser;
uid = config.ids.uids.clamav;
@ -76,7 +77,7 @@ in
systemd.services.clamd = mkIf cfg.daemon.enable {
description = "ClamAV daemon (clamd)";
path = [ pkgs.clamav ];
path = [ pkg ];
after = [ "network.target" "freshclam.service" ];
requires = [ "freshclam.service" ];
wantedBy = [ "multi-user.target" ];
@ -87,7 +88,7 @@ in
chown ${clamavUser}:${clamavGroup} ${runDir}
'';
serviceConfig = {
ExecStart = "${pkgs.clamav}/bin/clamd --config-file=${clamdConfigFile}";
ExecStart = "${pkg}/bin/clamd --config-file=${clamdConfigFile}";
Type = "forking";
ExecReload = "${pkgs.coreutils}/bin/kill -HUP $MAINPID";
Restart = "on-failure";
@ -100,13 +101,13 @@ in
description = "ClamAV updater (freshclam)";
after = [ "network.target" ];
wantedBy = [ "multi-user.target" ];
path = [ pkgs.clamav ];
path = [ pkg ];
preStart = ''
mkdir -m 0755 -p ${stateDir}
chown ${clamavUser}:${clamavGroup} ${stateDir}
'';
serviceConfig = {
ExecStart = "${pkgs.clamav}/bin/freshclam --daemon --config-file=${pkgs.writeText "freshclam.conf" cfg.updater.config}";
ExecStart = "${pkg}/bin/freshclam --daemon --config-file=${pkgs.writeText "freshclam.conf" cfg.updater.config}";
ExecReload = "${pkgs.coreutils}/bin/kill -HUP $MAINPID";
Restart = "on-failure";
RestartSec = "10s";

View File

@ -21,7 +21,7 @@ let
else toString ''"${x}"'';
# for users in group "transmission" to have access to torrents
fullSettings = { download-dir = downloadDir; incomplete-dir = incompleteDir; } // cfg.settings // { umask = 2; };
fullSettings = { umask = 2; download-dir = downloadDir; incomplete-dir = incompleteDir; } // cfg.settings;
in
{
options = {

View File

@ -46,11 +46,11 @@ let
'';
# Unpack Moodle and put the config file in its root directory.
moodleRoot = pkgs.stdenv.mkDerivation rec {
name= "moodle-2.8.5";
name= "moodle-2.8.10";
src = pkgs.fetchurl {
url = "https://download.moodle.org/stable28/${name}.tgz";
sha256 = "1a159a193010cddedce10ee009184502e6f732e4d7c85167d8597fe5dff9e190";
sha256 = "0c3r5081ipcwc9s6shakllnrkd589y2ln5z5m1q09l4h6a7cy4z2";
};
buildPhase =

View File

@ -27,19 +27,24 @@ let
nixos-gsettings-desktop-schemas = pkgs.stdenv.mkDerivation {
name = "nixos-gsettings-desktop-schemas";
buildInputs = [ pkgs.nixos-artwork ];
buildCommand = ''
mkdir -p $out/share/nixos-gsettings-schemas/nixos-gsettings-desktop-schemas
cp -rf ${gnome3.gsettings_desktop_schemas}/share/gsettings-schemas/gsettings-desktop-schemas*/glib-2.0 $out/share/nixos-gsettings-schemas/nixos-gsettings-desktop-schemas/
chmod -R a+w $out/share/nixos-gsettings-schemas/nixos-gsettings-desktop-schemas
cat - > $out/share/nixos-gsettings-schemas/nixos-gsettings-desktop-schemas/glib-2.0/schemas/nixos-defaults.gschema.override <<- EOF
mkdir -p $out/share/gsettings-schemas/nixos-gsettings-overrides/glib-2.0/schemas
cp -rf ${gnome3.gsettings_desktop_schemas}/share/gsettings-schemas/gsettings-desktop-schemas*/glib-2.0/schemas/*.xml $out/share/gsettings-schemas/nixos-gsettings-overrides/glib-2.0/schemas
${concatMapStrings (pkg: "cp -rf ${pkg}/share/gsettings-schemas/*/glib-2.0/schemas/*.xml $out/share/gsettings-schemas/nixos-gsettings-overrides/glib-2.0/schemas\n") cfg.extraGSettingsOverridePackages}
chmod -R a+w $out/share/gsettings-schemas/nixos-gsettings-overrides
cat - > $out/share/gsettings-schemas/nixos-gsettings-overrides/glib-2.0/schemas/nixos-defaults.gschema.override <<- EOF
[org.gnome.desktop.background]
picture-uri='${pkgs.nixos-artwork}/share/artwork/gnome/Gnome_Dark.png'
[org.gnome.desktop.screensaver]
picture-uri='${pkgs.nixos-artwork}/share/artwork/gnome/Gnome_Dark.png'
${cfg.extraGSettingsOverrides}
EOF
${pkgs.glib}/bin/glib-compile-schemas $out/share/nixos-gsettings-schemas/nixos-gsettings-desktop-schemas/glib-2.0/schemas/
${pkgs.glib}/bin/glib-compile-schemas $out/share/gsettings-schemas/nixos-gsettings-overrides/glib-2.0/schemas/
'';
};
@ -47,13 +52,14 @@ in {
options = {
services.xserver.desktopManager.gnome3.enable = mkOption {
services.xserver.desktopManager.gnome3 = {
enable = mkOption {
default = false;
example = true;
description = "Enable Gnome 3 desktop manager.";
};
services.xserver.desktopManager.gnome3.sessionPath = mkOption {
sessionPath = mkOption {
default = [];
example = literalExample "[ pkgs.gnome3.gpaste ]";
description = "Additional list of packages to be added to the session search path.
@ -61,6 +67,19 @@ in {
apply = list: list ++ [ gnome3.gnome_shell gnome3.gnome-shell-extensions ];
};
extraGSettingsOverrides = mkOption {
default = "";
type = types.lines;
description = "Additional gsettings overrides.";
};
extraGSettingsOverridePackages = mkOption {
default = [];
type = types.listOf types.path;
description = "List of packages for which gsettings are overridden.";
};
};
environment.gnome3.packageSet = mkOption {
type = types.nullOr types.package;
default = null;
@ -130,7 +149,7 @@ in {
export XDG_DATA_DIRS=$XDG_DATA_DIRS''${XDG_DATA_DIRS:+:}${mimeAppsList}/share
# Override gsettings-desktop-schema
export XDG_DATA_DIRS=${nixos-gsettings-desktop-schemas}/share/nixos-gsettings-schemas/nixos-gsettings-desktop-schemas''${XDG_DATA_DIRS:+:}$XDG_DATA_DIRS
export XDG_DATA_DIRS=${nixos-gsettings-desktop-schemas}/share/gsettings-schemas/nixos-gsettings-overrides''${XDG_DATA_DIRS:+:}$XDG_DATA_DIRS
# Let nautilus find extensions
export NAUTILUS_EXTENSION_DIR=${config.system.path}/lib/nautilus/extensions-3.0/

View File

@ -49,18 +49,6 @@ let
fi
''}
${optionalString cfg.displayManager.desktopManagerHandlesLidAndPower ''
# Stop systemd from handling the power button and lid switch,
# since presumably the desktop environment will handle these.
if [ -z "$_INHIBITION_LOCK_TAKEN" ]; then
export _INHIBITION_LOCK_TAKEN=1
if ! ${config.systemd.package}/bin/loginctl show-session $XDG_SESSION_ID | grep -q '^RemoteHost='; then
exec ${config.systemd.package}/bin/systemd-inhibit --what=handle-lid-switch:handle-power-key --why="Desktop environment handles power events" "$0" "$sessionType"
fi
fi
''}
${optionalString cfg.startGnuPGAgent ''
if test -z "$SSH_AUTH_SOCK"; then
# Restart this script as a child of the GnuPG agent.
@ -219,17 +207,6 @@ in
'';
};
desktopManagerHandlesLidAndPower = mkOption {
type = types.bool;
default = false;
description = ''
Whether the display manager should prevent systemd from handling
lid and power events. This is normally handled by the desktop
environment's power manager. Turn this off when using a minimal
X11 setup without a full power manager.
'';
};
session = mkOption {
default = [];
example = literalExample
@ -309,9 +286,11 @@ in
};
config = {
services.xserver.displayManager.xserverBin = "${xorg.xorgserver}/bin/X";
};
imports = [
(mkRemovedOptionModule [ "services" "xserver" "displayManager" "desktopManagerHandlesLidAndPower" ])
];
}

View File

@ -8,16 +8,39 @@ in
{
options = {
services.xserver.windowManager.bspwm.enable = mkEnableOption "bspwm";
services.xserver.windowManager.bspwm = {
enable = mkEnableOption "bspwm";
startThroughSession = mkOption {
type = with types; bool;
default = false;
description = "
Start the window manager through the script defined in
sessionScript. Defaults to the the bspwm-session script
provided by bspwm
";
};
sessionScript = mkOption {
default = "${pkgs.bspwm}/bin/bspwm-session";
defaultText = "(pkgs.bspwm)/bin/bspwm-session";
description = "
The start-session script to use. Defaults to the
provided bspwm-session script from the bspwm package.
Does nothing unless `bspwm.startThroughSession` is enabled
";
};
};
};
config = mkIf cfg.enable {
services.xserver.windowManager.session = singleton {
name = "bspwm";
start = "
${pkgs.sxhkd}/bin/sxhkd &
start = if cfg.startThroughSession
then cfg.sessionScript
else ''
SXHKD_SHELL=/bin/sh ${pkgs.sxhkd}/bin/sxhkd -f 100 &
${pkgs.bspwm}/bin/bspwm
";
'';
};
environment.systemPackages = [ pkgs.bspwm ];
};

View File

@ -13,6 +13,7 @@ in
./clfswm.nix
./compiz.nix
./dwm.nix
./exwm.nix
./fluxbox.nix
./herbstluftwm.nix
./i3.nix

View File

@ -0,0 +1,55 @@
{ config, lib, pkgs, ... }:
with lib;
let
cfg = config.services.xserver.windowManager.exwm;
loadScript = pkgs.writeText "emacs-exwm-load" ''
(require 'exwm)
${optionalString cfg.enableDefaultConfig ''
(require 'exwm-config)
(exwm-config-default)
''}
'';
packages = epkgs: cfg.extraPackages epkgs ++ [ epkgs.exwm ];
exwm-emacs = pkgs.emacsWithPackages packages;
in
{
options = {
services.xserver.windowManager.exwm = {
enable = mkEnableOption "exwm";
enableDefaultConfig = mkOption {
default = true;
example = false;
type = lib.types.bool;
description = "Enable an uncustomised exwm configuration.";
};
extraPackages = mkOption {
default = self: [];
example = literalExample ''
epkgs: [
epkgs.emms
epkgs.magit
epkgs.proofgeneral
]
'';
description = ''
Extra packages available to Emacs. The value must be a
function which receives the attrset defined in
<varname>emacsPackages</varname> as the sole argument.
'';
};
};
};
config = mkIf cfg.enable {
services.xserver.windowManager.session = singleton {
name = "exwm";
start = ''
${exwm-emacs}/bin/emacs -l ${loadScript}
'';
};
environment.systemPackages = [ exwm-emacs ];
};
}

View File

@ -178,9 +178,10 @@ in
default = false;
description = ''
If enabled, copies the NixOS configuration file
<literal>$NIXOS_CONFIG</literal> (usually
<filename>/etc/nixos/configuration.nix</filename>)
to the system store path.
(usually <filename>/etc/nixos/configuration.nix</filename>)
and links it from the resulting system
(getting to <filename>/run/current-system/configuration.nix</filename>).
Note that only this single file is copied, even if it imports others.
'';
};
@ -238,7 +239,9 @@ in
system.extraSystemBuilderCmds =
optionalString
config.system.copySystemConfiguration
"cp ${maybeEnv "NIXOS_CONFIG" "/etc/nixos/configuration.nix"} $out";
''ln -s '${import ../../../lib/from-env.nix "NIXOS_CONFIG" <nixos-config>}' \
"$out/configuration.nix"
'';
system.build.toplevel = system;

View File

@ -160,6 +160,7 @@ let
"systemd-timedated.service"
"systemd-localed.service"
"systemd-hostnamed.service"
"systemd-binfmt.service"
]
++ cfg.additionalUpstreamSystemUnits;
@ -779,6 +780,7 @@ in
systemd.services.systemd-user-sessions.restartIfChanged = false; # Restart kills all active sessions.
systemd.targets.local-fs.unitConfig.X-StopOnReconfiguration = true;
systemd.targets.remote-fs.unitConfig.X-StopOnReconfiguration = true;
systemd.services.systemd-binfmt.wants = [ "proc-sys-fs-binfmt_misc.automount" ];
# Don't bother with certain units in containers.
systemd.services.systemd-remount-fs.unitConfig.ConditionVirtualization = "!container";

View File

@ -0,0 +1,12 @@
{ config, pkgs, modulesPath, ... }:
{
# To build the configuration or use nix-env, you need to run
# either nixos-rebuild --upgrade or nix-channel --update
# to fetch the nixos channel.
# This configures everything but bootstrap services,
# which only need to be run once and have already finished
# if you are able to see this comment.
imports = [ "${modulesPath}/virtualisation/azure-common.nix" ];
}

View File

@ -78,7 +78,7 @@ in
echo Install a configuration.nix.
mkdir -p /mnt/etc/nixos /mnt/boot/grub
cp ${./azure-config.nix} /mnt/etc/nixos/configuration.nix
cp ${./azure-config-user.nix} /mnt/etc/nixos/configuration.nix
echo Generate the GRUB menu.
ln -s vda /dev/sda

View File

@ -48,7 +48,7 @@ in rec {
(all nixos.ova)
#(all nixos.tests.containers)
(all nixos.tests.chromium)
(all nixos.tests.chromium.stable)
(all nixos.tests.firefox)
(all nixos.tests.firewall)
nixos.tests.gnome3.x86_64-linux # FIXME: i686-linux
@ -63,7 +63,7 @@ in rec {
(all nixos.tests.installer.btrfsSimple)
(all nixos.tests.installer.btrfsSubvols)
(all nixos.tests.installer.btrfsSubvolDefault)
(all nixos.tests.bootBiosCdrom)
(all nixos.tests.boot.biosCdrom)
(all nixos.tests.ipv6)
(all nixos.tests.kde4)
#(all nixos.tests.lightdm)

View File

@ -13,7 +13,25 @@ let
forAllSystems = genAttrs supportedSystems;
callTest = fn: args: forAllSystems (system: hydraJob (import fn ({ inherit system; } // args)));
importTest = fn: args: system: import fn ({
inherit system;
} // args);
callTest = fn: args: forAllSystems (system: hydraJob (importTest fn args system));
callSubTests = fn: args: let
discover = attrs: let
subTests = filterAttrs (const (hasAttr "test")) attrs;
in mapAttrs (const (t: hydraJob t.test)) subTests;
discoverForSystem = system: mapAttrs (_: test: {
${system} = test;
}) (discover (importTest fn args system));
# If the test is only for a particular system, use only the specified
# system instead of generating attributes for all available systems.
in if args ? system then discover (import fn args)
else foldAttrs mergeAttrs {} (map discoverForSystem supportedSystems);
pkgs = import nixpkgs { system = "x86_64-linux"; };
@ -113,7 +131,7 @@ in rec {
});
iso_graphical = forAllSystems (system: makeIso {
module = ./modules/installer/cd-dvd/installation-cd-graphical.nix;
module = ./modules/installer/cd-dvd/installation-cd-graphical-kde.nix;
type = "graphical";
inherit system;
});
@ -215,8 +233,9 @@ in rec {
tests.avahi = callTest tests/avahi.nix {};
tests.bittorrent = callTest tests/bittorrent.nix {};
tests.blivet = callTest tests/blivet.nix {};
tests.boot = callSubTests tests/boot.nix {};
tests.cadvisor = hydraJob (import tests/cadvisor.nix { system = "x86_64-linux"; });
tests.chromium = callTest tests/chromium.nix {};
tests.chromium = callSubTests tests/chromium.nix {};
tests.cjdns = callTest tests/cjdns.nix {};
tests.containers = callTest tests/containers.nix {};
tests.docker = hydraJob (import tests/docker.nix { system = "x86_64-linux"; });
@ -232,18 +251,7 @@ in rec {
tests.gnome3-gdm = callTest tests/gnome3-gdm.nix {};
tests.grsecurity = callTest tests/grsecurity.nix {};
tests.i3wm = callTest tests/i3wm.nix {};
tests.installer.grub1 = forAllSystems (system: hydraJob (import tests/installer.nix { inherit system; }).grub1.test);
tests.installer.lvm = forAllSystems (system: hydraJob (import tests/installer.nix { inherit system; }).lvm.test);
tests.installer.luksroot = forAllSystems (system: hydraJob (import tests/installer.nix { inherit system; }).luksroot.test);
tests.installer.separateBoot = forAllSystems (system: hydraJob (import tests/installer.nix { inherit system; }).separateBoot.test);
tests.installer.separateBootFat = forAllSystems (system: hydraJob (import tests/installer.nix { inherit system; }).separateBootFat.test);
tests.installer.simple = forAllSystems (system: hydraJob (import tests/installer.nix { inherit system; }).simple.test);
tests.installer.simpleLabels = forAllSystems (system: hydraJob (import tests/installer.nix { inherit system; }).simpleLabels.test);
tests.installer.simpleProvided = forAllSystems (system: hydraJob (import tests/installer.nix { inherit system; }).simpleProvided.test);
tests.installer.swraid = forAllSystems (system: hydraJob (import tests/installer.nix { inherit system; }).swraid.test);
tests.installer.btrfsSimple = forAllSystems (system: hydraJob (import tests/installer.nix { inherit system; }).btrfsSimple.test);
tests.installer.btrfsSubvols = forAllSystems (system: hydraJob (import tests/installer.nix { inherit system; }).btrfsSubvols.test);
tests.installer.btrfsSubvolDefault = forAllSystems (system: hydraJob (import tests/installer.nix { inherit system; }).btrfsSubvolDefault.test);
tests.installer = callSubTests tests/installer.nix {};
tests.influxdb = callTest tests/influxdb.nix {};
tests.ipv6 = callTest tests/ipv6.nix {};
tests.jenkins = callTest tests/jenkins.nix {};
@ -262,24 +270,8 @@ in rec {
tests.mysqlReplication = callTest tests/mysql-replication.nix {};
tests.nat.firewall = callTest tests/nat.nix { withFirewall = true; };
tests.nat.standalone = callTest tests/nat.nix { withFirewall = false; };
tests.networking.networkd.loopback = callTest tests/networking.nix { networkd = true; test = "loopback"; };
tests.networking.networkd.static = callTest tests/networking.nix { networkd = true; test = "static"; };
tests.networking.networkd.dhcpSimple = callTest tests/networking.nix { networkd = true; test = "dhcpSimple"; };
tests.networking.networkd.dhcpOneIf = callTest tests/networking.nix { networkd = true; test = "dhcpOneIf"; };
tests.networking.networkd.bond = callTest tests/networking.nix { networkd = true; test = "bond"; };
tests.networking.networkd.bridge = callTest tests/networking.nix { networkd = true; test = "bridge"; };
tests.networking.networkd.macvlan = callTest tests/networking.nix { networkd = true; test = "macvlan"; };
tests.networking.networkd.sit = callTest tests/networking.nix { networkd = true; test = "sit"; };
tests.networking.networkd.vlan = callTest tests/networking.nix { networkd = true; test = "vlan"; };
tests.networking.scripted.loopback = callTest tests/networking.nix { networkd = false; test = "loopback"; };
tests.networking.scripted.static = callTest tests/networking.nix { networkd = false; test = "static"; };
tests.networking.scripted.dhcpSimple = callTest tests/networking.nix { networkd = false; test = "dhcpSimple"; };
tests.networking.scripted.dhcpOneIf = callTest tests/networking.nix { networkd = false; test = "dhcpOneIf"; };
tests.networking.scripted.bond = callTest tests/networking.nix { networkd = false; test = "bond"; };
tests.networking.scripted.bridge = callTest tests/networking.nix { networkd = false; test = "bridge"; };
tests.networking.scripted.macvlan = callTest tests/networking.nix { networkd = false; test = "macvlan"; };
tests.networking.scripted.sit = callTest tests/networking.nix { networkd = false; test = "sit"; };
tests.networking.scripted.vlan = callTest tests/networking.nix { networkd = false; test = "vlan"; };
tests.networking.networkd = callSubTests tests/networking.nix { networkd = true; };
tests.networking.scripted = callSubTests tests/networking.nix { networkd = false; };
# TODO: put in networking.nix after the test becomes more complete
tests.networkingProxy = callTest tests/networking-proxy.nix {};
tests.nfs3 = callTest tests/nfs.nix { version = 3; };
@ -299,12 +291,8 @@ in rec {
tests.simple = callTest tests/simple.nix {};
tests.tomcat = callTest tests/tomcat.nix {};
tests.udisks2 = callTest tests/udisks2.nix {};
tests.virtualbox = hydraJob (import tests/virtualbox.nix { system = "x86_64-linux"; });
tests.virtualbox = callSubTests tests/virtualbox.nix { system = "x86_64-linux"; };
tests.xfce = callTest tests/xfce.nix {};
tests.bootBiosCdrom = forAllSystems (system: hydraJob (import tests/boot.nix { inherit system; }).bootBiosCdrom);
tests.bootBiosUsb = forAllSystems (system: hydraJob (import tests/boot.nix { inherit system; }).bootBiosUsb);
tests.bootUefiCdrom = forAllSystems (system: hydraJob (import tests/boot.nix { inherit system; }).bootUefiCdrom);
tests.bootUefiUsb = forAllSystems (system: hydraJob (import tests/boot.nix { inherit system; }).bootUefiUsb);
/* Build a bunch of typical closures so that Hydra can keep track of

View File

@ -5,18 +5,21 @@ import ./make-test.nix ({ pkgs, ... } : {
maintainers = [ eelco chaoflow ];
};
nodes = {
one =
{ config, pkgs, ... }: {
services.avahi.enable = true;
services.avahi.nssmdns = true;
nodes = let
cfg = { config, pkgs, ... }: {
services.avahi = {
enable = true;
nssmdns = true;
publish.addresses = true;
publish.domain = true;
publish.enable = true;
publish.userServices = true;
publish.workstation = true;
};
two =
{ config, pkgs, ... }: {
services.avahi.enable = true;
services.avahi.nssmdns = true;
};
in {
one = cfg;
two = cfg;
};
testScript =

View File

@ -30,17 +30,17 @@ let
'';
};
in {
bootBiosCdrom = makeBootTest "bios-cdrom" ''
biosCdrom = makeBootTest "bios-cdrom" ''
cdrom => glob("${iso}/iso/*.iso")
'';
bootBiosUsb = makeBootTest "bios-usb" ''
biosUsb = makeBootTest "bios-usb" ''
usb => glob("${iso}/iso/*.iso")
'';
bootUefiCdrom = makeBootTest "uefi-cdrom" ''
uefiCdrom = makeBootTest "uefi-cdrom" ''
cdrom => glob("${iso}/iso/*.iso"),
bios => '${pkgs.OVMF}/FV/OVMF.fd'
'';
bootUefiUsb = makeBootTest "uefi-usb" ''
uefiUsb = makeBootTest "uefi-usb" ''
usb => glob("${iso}/iso/*.iso"),
bios => '${pkgs.OVMF}/FV/OVMF.fd'
'';

View File

@ -1,13 +1,10 @@
import ./make-test.nix (
{ pkgs
, channelMap ? {
stable = pkgs.chromium;
#beta = pkgs.chromiumBeta;
#dev = pkgs.chromiumDev;
}
, ...
}: rec {
name = "chromium";
{ system ? builtins.currentSystem }:
with import ../lib/testing.nix { inherit system; };
with pkgs.lib;
mapAttrs (channel: chromiumPkg: makeTest rec {
name = "chromium-${channel}";
meta = with pkgs.stdenv.lib.maintainers; {
maintainers = [ aszlig ];
};
@ -16,6 +13,7 @@ import ./make-test.nix (
machine.imports = [ ./common/x11.nix ];
machine.virtualisation.memorySize = 2047;
machine.environment.systemPackages = [ chromiumPkg ];
startupHTML = pkgs.writeText "chromium-startup.html" ''
<!DOCTYPE html>
@ -105,15 +103,13 @@ import ./make-test.nix (
closeWin;
}
sub chromiumTest {
my ($channel, $pkg, $code) = @_;
$machine->waitForX;
my $url = "file://${startupHTML}";
my $args = "--user-data-dir=/tmp/chromium-$channel";
my $args = "--user-data-dir=/tmp/chromium-${channel}";
$machine->execute(
"ulimit -c unlimited; ".
"$pkg/bin/chromium $args \"$url\" & disown"
"chromium $args \"$url\" & disown"
);
$machine->waitForText(qr/Type to search or enter a URL to navigate/);
$machine->waitUntilSucceeds("${xdo "check-startup" ''
@ -125,22 +121,11 @@ import ./make-test.nix (
''}");
createAndWaitForNewWin;
$machine->screenshot($channel."_emptywin");
$machine->screenshot("empty_windows");
closeWin;
$machine->screenshot($channel."_startup_done");
$machine->screenshot("startup_done");
subtest("Chromium $channel", $code);
$machine->shutdown;
}
for (${let
mkArray = name: pkg: "[\"${name}\", \"${pkg}\"]";
chanArrays = pkgs.lib.mapAttrsToList mkArray channelMap;
in pkgs.lib.concatStringsSep ", " chanArrays}) {
my ($channel, $pkg) = @$_;
chromiumTest $channel, $pkg, sub {
testNewWin "check sandbox", sub {
$machine->succeed("${xdo "type-url" ''
search --sync --onlyvisible --name "new tab"
@ -154,7 +139,7 @@ import ./make-test.nix (
key --delay 1000 Return
''}");
$machine->screenshot($channel."_sandbox");
$machine->screenshot("sandbox_info");
$machine->succeed("${xdo "submit-url" ''
search --sync --onlyvisible --name "sandbox status"
@ -172,7 +157,11 @@ import ./make-test.nix (
&& $clipboard =~ /seccomp.*sandbox.*yes/mi
&& $clipboard =~ /you are adequately sandboxed/mi;
};
};
}
$machine->shutdown;
'';
})
}) {
stable = pkgs.chromium;
beta = pkgs.chromiumBeta;
dev = pkgs.chromiumDev;
}

View File

@ -46,7 +46,7 @@ let
, grubIdentifier, preBootCommands, extraConfig
}:
let
iface = if grubVersion == 1 then "scsi" else "virtio";
iface = if grubVersion == 1 then "ide" else "virtio";
qemuFlags =
(if system == "x86_64-linux" then "-m 768 " else "-m 512 ") +
(optionalString (system == "x86_64-linux") "-cpu kvm64 ");

View File

@ -1,4 +1,8 @@
import ./make-test.nix ({ pkgs, networkd, test, ... }:
{ system ? builtins.currentSystem, networkd }:
with import ../lib/testing.nix { inherit system; };
with pkgs.lib;
let
router = { config, pkgs, ... }:
with pkgs.lib;
@ -30,6 +34,7 @@ import ./make-test.nix ({ pkgs, networkd, test, ... }:
'');
};
};
testCases = {
loopback = {
name = "Loopback";
@ -397,10 +402,10 @@ import ./make-test.nix ({ pkgs, networkd, test, ... }:
'';
};
};
case = testCases.${test};
in case // {
name = "${case.name}-Networking-${if networkd then "Networkd" else "Scripted"}";
in mapAttrs (const (attrs: makeTest (attrs // {
name = "${attrs.name}-Networking-${if networkd then "Networkd" else "Scripted"}";
meta = with pkgs.stdenv.lib.maintainers; {
maintainers = [ wkennington ];
};
})
}))) testCases

View File

@ -1,7 +1,9 @@
{ debug ? false, ... } @ args:
{ system ? builtins.currentSystem, debug ? false }:
import ./make-test.nix ({ pkgs, ... }: with pkgs.lib; let
with import ../lib/testing.nix { inherit system; };
with pkgs.lib;
let
testVMConfig = vmName: attrs: { config, pkgs, ... }: let
guestAdditions = pkgs.linuxPackages.virtualboxGuestAdditions;
@ -314,13 +316,10 @@ import ./make-test.nix ({ pkgs, ... }: with pkgs.lib; let
test2.vmScript = dhcpScript;
};
in {
name = "virtualbox";
meta = with pkgs.stdenv.lib.maintainers; {
maintainers = [ aszlig wkennington ];
};
mkVBoxTest = name: testScript: makeTest {
name = "virtualbox-${name}";
machine = { pkgs, lib, config, ... }: {
machine = { lib, config, ... }: {
imports = let
mkVMConf = name: val: val.machine // { key = "${name}-config"; };
vmConfigs = mapAttrsToList mkVMConf vboxVMs;
@ -342,15 +341,27 @@ in {
$machine->succeed(ru("VBoxManage ".$_[0]));
};
sub removeUUIDs {
return join("\n", grep { $_ !~ /^UUID:/ } split(/\n/, $_[0]))."\n";
}
${concatStrings (mapAttrsToList (_: getAttr "testSubs") vboxVMs)}
$machine->waitForX;
${mkLog "$HOME/.config/VirtualBox/VBoxSVC.log" "HOST-SVC"}
createVM_simple;
${testScript}
'';
subtest "simple-gui", sub {
meta = with pkgs.stdenv.lib.maintainers; {
maintainers = [ aszlig wkennington ];
};
};
in mapAttrs mkVBoxTest {
simple-gui = ''
createVM_simple;
$machine->succeed(ru "VirtualBox &");
$machine->waitForWindow(qr/Oracle VM VirtualBox Manager/);
$machine->sleep(5);
@ -369,32 +380,26 @@ in {
$machine->sendKeys("ctrl-q");
$machine->sleep(5);
$machine->screenshot("gui_manager_stopped");
};
'';
cleanup_simple;
subtest "simple-cli", sub {
simple-cli = ''
createVM_simple;
vbm("startvm simple");
waitForStartup_simple;
$machine->screenshot("cli_started");
waitForVMBoot_simple;
$machine->screenshot("cli_booted");
shutdownVM_simple;
};
subtest "privilege-escalation", sub {
$machine->nest("Checking for privilege escalation", sub {
$machine->fail("test -e '/root/VirtualBox VMs'");
$machine->fail("test -e '/root/.config/VirtualBox'");
$machine->succeed("test -e '/home/alice/VirtualBox VMs'");
};
});
destroyVM_simple;
shutdownVM_simple;
'';
sub removeUUIDs {
return join("\n", grep { $_ !~ /^UUID:/ } split(/\n/, $_[0]))."\n";
}
subtest "host-usb-permissions", sub {
host-usb-permissions = ''
my $userUSB = removeUUIDs vbm("list usbhost");
print STDERR $userUSB;
my $rootUSB = removeUUIDs $machine->succeed("VBoxManage list usbhost");
@ -403,9 +408,9 @@ in {
die "USB host devices differ for root and normal user"
if $userUSB ne $rootUSB;
die "No USB host devices found" if $userUSB =~ /<none>/;
};
'';
subtest "systemd-detect-virt", sub {
systemd-detect-virt = ''
createVM_detectvirt;
vbm("startvm detectvirt");
waitForStartup_detectvirt;
@ -416,9 +421,9 @@ in {
destroyVM_detectvirt;
die "systemd-detect-virt returned \"$result\" instead of \"oracle\""
if $result ne "oracle";
};
'';
subtest "net-hostonlyif", sub {
net-hostonlyif = ''
createVM_test1;
createVM_test2;
@ -446,6 +451,5 @@ in {
destroyVM_test1;
destroyVM_test2;
};
'';
}) args
}

View File

@ -5,7 +5,7 @@ stdenv.mkDerivation rec {
name = "qmidinet-${version}";
src = fetchurl {
url = "http://downloads.sourceforge.net/qmidinet/${name}.tar.gz";
url = "mirror://sourceforge/qmidinet/${name}.tar.gz";
sha256 = "1a1pj4w74wj1gcfv4a0vzcglmr5sw0xp0y56w8rk3ig4k11xi8sa";
};

View File

@ -1,7 +1,7 @@
{ stdenv, fetchurl, intltool, pkgconfig, fetchpatch
{ stdenv, fetchurl, intltool, pkgconfig, fetchpatch, jansson
# deadbeef can use either gtk2 or gtk3
, gtk2Support ? true, gtk2 ? null
, gtk3Support ? false, gtk3 ? null, gsettings_desktop_schemas ? null, makeWrapper ? null
, gtk2Support ? false, gtk2 ? null
, gtk3Support ? true, gtk3 ? null, gsettings_desktop_schemas ? null, makeWrapper ? null
# input plugins
, vorbisSupport ? true, libvorbis ? null
, mp123Support ? true, libmad ? null
@ -52,15 +52,16 @@ assert wavpackSupport -> wavpack != null;
assert remoteSupport -> curl != null;
stdenv.mkDerivation rec {
name = "deadbeef-0.6.2";
name = "deadbeef-${version}";
version = "0.7.0";
src = fetchurl {
url = "mirror://sourceforge/project/deadbeef/${name}.tar.bz2";
sha256 = "06jfsqyakpvq0xhah7dlyvdzh5ym3hhb4yfczczw11ijd1kbjcrl";
sha256 = "0s6qip1zs83pig75pnd30ayiv1dbbj7s72px9mr31f4m0v86kaqx";
};
buildInputs = with stdenv.lib;
optional gtk2Support gtk2
buildInputs = with stdenv.lib; [ jansson ]
++ optional gtk2Support gtk2
++ optionals gtk3Support [ gtk3 gsettings_desktop_schemas ]
++ optional vorbisSupport libvorbis
++ optional mp123Support libmad
@ -88,12 +89,6 @@ stdenv.mkDerivation rec {
enableParallelBuilding = true;
patches = [ (fetchpatch {
url = "https://github.com/Alexey-Yakovenko/deadbeef/commit/e7725ea73fa1bd279a3651704870156bca8efea8.patch";
sha256 = "1530w968zyvcm9c8k57889n125k7a1kk3ydinjm398n07gypd599";
})
];
postInstall = if !gtk3Support then "" else ''
wrapProgram "$out/bin/deadbeef" \
--prefix XDG_DATA_DIRS : "$GSETTINGS_SCHEMAS_PATH"

View File

@ -3,7 +3,7 @@ stdenv.mkDerivation rec {
name = "eq10q-2-${version}";
version = "beta7.1";
src = fetchurl {
url = "http://downloads.sourceforge.net/project/eq10q/${name}.tar.gz";
url = "mirror://sourceforge/project/eq10q/${name}.tar.gz";
sha256 = "1jmrcx4jlx8kgsy5n4jcxa6qkjqvx7d8l2p7dsmw4hj20s39lgyi";
};

View File

@ -12,7 +12,7 @@ let
version = "0.9.73";
src = fetchurl {
url = "http://downloads.sourceforge.net/project/faudiostream/faust-${version}.tgz";
url = "mirror://sourceforge/project/faudiostream/faust-${version}.tgz";
sha256 = "0x2scxkwvvjx7b7smj5xb8kr269qakf49z3fxpasd9g7025q44k5";
};

View File

@ -19,7 +19,7 @@ let
version = "2.0-a41";
src = fetchurl {
url = "http://downloads.sourceforge.net/project/faudiostream/faust-2.0.a41.tgz";
url = "mirror://sourceforge/project/faudiostream/faust-2.0.a41.tgz";
sha256 = "1cq4x1cax0lswrcqv0limx5mjdi3187zlmh7cj2pndr0xq6b96cm";
};

View File

@ -5,7 +5,7 @@ stdenv.mkDerivation {
name = "gjay-0.3.2";
src = fetchurl {
url = "http://downloads.sourceforge.net/project/gjay/gjay-0.3.2.tar.gz";
url = "mirror://sourceforge/project/gjay/gjay-0.3.2.tar.gz";
sha256 = "1a1vv4r0vnxjdyl0jyv7gga3zfd5azxlwjm1l6hjrf71lb228zn8";
};

View File

@ -1,7 +1,7 @@
{ stdenv, fetchurl, gettext, intltool, pkgconfig, python
, avahi, bluez, boost, eigen, fftw, glib, glibmm, gtk, gtkmm, libjack2
, ladspaH, librdf, libsndfile, lilv, lv2, serd, sord, sratom
, zita-convolver, zita-resampler
, webkitgtk2, zita-convolver, zita-resampler
, optimizationSupport ? false # Enable support for native CPU extensions
}:
@ -11,11 +11,11 @@ in
stdenv.mkDerivation rec {
name = "guitarix-${version}";
version = "0.33.0";
version = "0.34.0";
src = fetchurl {
url = "mirror://sourceforge/guitarix/guitarix2-${version}.tar.bz2";
sha256 = "1w6dg2n0alfjsx1iy6s53783invygwxk11p1i65cc3nq3zlidcgx";
sha256 = "0pamaq8iybsaglq6y1m1rlmz4wgbs2r6m24bj7x4fwg4grjvzjl8";
};
nativeBuildInputs = [ gettext intltool pkgconfig python ];
@ -23,7 +23,7 @@ stdenv.mkDerivation rec {
buildInputs = [
avahi bluez boost eigen fftw glib glibmm gtk gtkmm libjack2
ladspaH librdf libsndfile lilv lv2 serd sord sratom
zita-convolver zita-resampler
webkitgtk2 zita-convolver zita-resampler
];
configureFlags = [

View File

@ -12,7 +12,7 @@ stdenv.mkDerivation rec {
name = "kid3-${meta.version}";
src = fetchurl {
url = "http://downloads.sourceforge.net/project/kid3/kid3/${meta.version}/${name}.tar.gz";
url = "mirror://sourceforge/project/kid3/kid3/${meta.version}/${name}.tar.gz";
sha256 = "12sa54mg1b3wkagmh5yi20ski8km9d199lk0a1yfxy0ffjfld7js";
};

View File

@ -0,0 +1,27 @@
{ stdenv, fetchFromGitHub, glib, lilv, lv2, pkgconfig, serd, sord, sratom }:
stdenv.mkDerivation rec {
name = "lv2bm-${version}";
version = "git-2015-04-10";
src = fetchFromGitHub {
owner = "portalmod";
repo = "lv2bm";
rev = "08681624fc13eb700ec2b5cabedbffdf095e28b3";
sha256 = "11pi97jy4f4c3vsaizc8a6sw9hnhnanj6y1fil33yd9x7f8f0kbj";
};
buildInputs = [ glib lilv lv2 pkgconfig serd sord sratom ];
installPhase = ''
make install PREFIX=$out
'';
meta = with stdenv.lib; {
homepage = https://github.com/portalmod/lv2bm;
description = "A benchmark tool for LV2 plugins";
license = licenses.gpl3;
maintainers = [ maintainers.magnetophon ];
platforms = platforms.linux;
};
}

View File

@ -3,7 +3,7 @@
stdenv.mkDerivation {
name = "mp3gain-1.5.2";
src = fetchurl {
url = "http://downloads.sourceforge.net/mp3gain/mp3gain-1_5_2-src.zip";
url = "mirror://sourceforge/mp3gain/mp3gain-1_5_2-src.zip";
sha256 = "1jkgry59m8cnnfq05b9y1h4x4wpy3iq8j68slb9qffwa3ajcgbfv";
};

View File

@ -5,7 +5,7 @@ stdenv.mkDerivation rec {
version = "0.1-alpha55";
src = fetchurl {
url = "http://downloads.sourceforge.net/project/pure-data/libraries/cyclone/${name}.tar.gz";
url = "mirror://sourceforge/project/pure-data/libraries/cyclone/${name}.tar.gz";
sha256 = "1yys9xrlz09xgnqk2gqdl8vw6xj6l9d7km2lkihidgjql0jx5b5i";
};

View File

@ -5,7 +5,7 @@ stdenv.mkDerivation rec {
version = "1.5.5";
src = fetchurl {
url = "http://downloads.sourceforge.net/project/pure-data/libraries/maxlib/${name}.tar.gz";
url = "mirror://sourceforge/project/pure-data/libraries/maxlib/${name}.tar.gz";
sha256 = "0vxl9s815dnay5r0067rxsfh8f6jbk61f0nxrydzjydfycza7p1w";
};

View File

@ -11,25 +11,25 @@
}:
stdenv.mkDerivation rec {
version = "2.8.0";
version = "2.9.0";
name = "sonic-pi-${version}";
src = fetchFromGitHub {
owner = "samaaron";
repo = "sonic-pi";
rev = "v${version}";
sha256 = "1yyavgazb6ar7xnmjx460s9p8nh70klaja2yb20nci15k8vngq9h";
sha256 = "19db5dxrf6h1v2w3frds5g90nb6izd9ppp7cs2xi6i0m67l6jrwb";
};
buildInputs = [
qscintilla
supercollider
ruby
qt48Full
cmake
pkgconfig
bash
cmake
makeWrapper
pkgconfig
qscintilla
qt48Full
ruby
supercollider
];
meta = {
@ -42,13 +42,22 @@ stdenv.mkDerivation rec {
dontUseCmakeConfigure = true;
patches = [ ./fixed-prefixes.patch ];
preConfigure = ''
patchShebangs .
substituteInPlace app/gui/qt/mainwindow.cpp \
--subst-var-by ruby "${ruby}/bin/ruby" \
--subst-var out
'';
buildPhase = ''
pushd app/server/bin
${ruby}/bin/ruby compile-extensions.rb
./compile-extensions.rb
popd
pushd app/gui/qt
${bash}/bin/bash rp-build-app
./rp-build-app
popd
'';

View File

@ -0,0 +1,36 @@
diff --git a/app/gui/qt/mainwindow.cpp b/app/gui/qt/mainwindow.cpp
index 0af6cf7..97c17ad 100644
--- a/app/gui/qt/mainwindow.cpp
+++ b/app/gui/qt/mainwindow.cpp
@@ -677,28 +677,9 @@ void MainWindow::startServer(){
serverProcess = new QProcess();
- QString root = rootPath();
-
- #if defined(Q_OS_WIN)
- QString prg_path = root + "/app/server/native/windows/ruby/bin/ruby.exe";
- QString prg_arg = root + "/app/server/bin/sonic-pi-server.rb";
- sample_path = root + "/etc/samples";
- #elif defined(Q_OS_MAC)
- QString prg_path = root + "/server/native/osx/ruby/bin/ruby";
- QString prg_arg = root + "/server/bin/sonic-pi-server.rb";
- sample_path = root + "/etc/samples";
- #else
- //assuming Raspberry Pi
- QString prg_path = root + "/app/server/native/raspberry/ruby/bin/ruby";
- QFile file(prg_path);
- if(!file.exists()) {
- // use system ruby if bundled ruby doesn't exist
- prg_path = "/usr/bin/ruby";
- }
-
- QString prg_arg = root + "/app/server/bin/sonic-pi-server.rb";
- sample_path = root + "/etc/samples";
- #endif
+ QString prg_path = "@ruby@";
+ QString prg_arg = "@out@/app/server/bin/sonic-pi-server.rb";
+ sample_path = "@out@/etc/samples";
prg_path = QDir::toNativeSeparators(prg_path);
prg_arg = QDir::toNativeSeparators(prg_arg);

View File

@ -16,11 +16,11 @@ let
};
in stdenv.mkDerivation rec {
name = "atom-${version}";
version = "1.5.3";
version = "1.5.4";
src = fetchurl {
url = "https://github.com/atom/atom/releases/download/v${version}/atom-amd64.deb";
sha256 = "101fz4c5pj7yp7fg7kg7vcpqjzpwfrbxdyb6va5liip1llg1i2z3";
sha256 = "0jnszf1v7xqhm2sy5wzm3f8aw7j1dnapnbw4d46bvshv9hbbzrn8";
name = "${name}.deb";
};

View File

@ -4,7 +4,7 @@ stdenv.mkDerivation rec {
name = "bviplus-${version}";
version = "0.9.4";
src = fetchurl {
url = "http://downloads.sourceforge.net/project/bviplus/bviplus/${version}/bviplus-${version}.tgz";
url = "mirror://sourceforge/project/bviplus/bviplus/${version}/bviplus-${version}.tgz";
sha256 = "10x6fbn8v6i0y0m40ja30pwpyqksnn8k2vqd290vxxlvlhzah4zb";
};
buildInputs = [

View File

@ -171,12 +171,12 @@ rec {
checkstyle = buildEclipseUpdateSite rec {
name = "checkstyle-${version}";
version = "6.14.0.201601142217";
version = "6.16.0.201603042325";
src = fetchzip {
stripRoot = false;
url = "mirror://sourceforge/project/eclipse-cs/Eclipse%20Checkstyle%20Plug-in/6.14.0/net.sf.eclipsecs-updatesite_${version}-bin.zip";
sha256 = "0ysxir1fv0mb9xnidc9hv6llnk48lkav0sryjbx7pw7vy1f8nd4c";
url = "mirror://sourceforge/project/eclipse-cs/Eclipse%20Checkstyle%20Plug-in/6.16.0/net.sf.eclipsecs-updatesite_${version}.zip";
sha256 = "0bm1linyw82bryblyabcx89zqw1ingh8mx62bwp3qj05yc9ksnly";
};
meta = with stdenv.lib; {

View File

@ -132,6 +132,19 @@
license = lib.licenses.free;
};
}) {};
arbitools = callPackage ({ elpaBuild, fetchurl, lib }: elpaBuild {
pname = "arbitools";
version = "0.51";
src = fetchurl {
url = "http://elpa.gnu.org/packages/arbitools-0.51.el";
sha256 = "1pwps73s885i1777wlmqhkmfgj564bkb6rkpc964v0vcqia6fpag";
};
packageRequires = [];
meta = {
homepage = "http://elpa.gnu.org/packages/arbitools.html";
license = lib.licenses.free;
};
}) {};
ascii-art-to-unicode = callPackage ({ elpaBuild, fetchurl, lib }:
elpaBuild {
pname = "ascii-art-to-unicode";
@ -322,10 +335,10 @@
company-math = callPackage ({ company, elpaBuild, fetchurl, lib, math-symbol-lists }:
elpaBuild {
pname = "company-math";
version = "1.0.1";
version = "1.1";
src = fetchurl {
url = "http://elpa.gnu.org/packages/company-math-1.0.1.el";
sha256 = "1lkj9cqhmdf3h5zvr94hszkz1251i2rq2mycnhscsnzrk5ll3gck";
url = "http://elpa.gnu.org/packages/company-math-1.1.tar";
sha256 = "10yi5jmv7njcaansgy2aw7wm1j3acch1j9x6lfg9mxk0j21zvgwp";
};
packageRequires = [ company math-symbol-lists ];
meta = {
@ -350,10 +363,10 @@
context-coloring = callPackage ({ elpaBuild, emacs, fetchurl, js2-mode, lib }:
elpaBuild {
pname = "context-coloring";
version = "7.2.0";
version = "7.2.1";
src = fetchurl {
url = "http://elpa.gnu.org/packages/context-coloring-7.2.0.el";
sha256 = "0l7mzmnhqh6sri1fhhv51khi0fnpfp51drzy725s6zfmpbrcn7vn";
url = "http://elpa.gnu.org/packages/context-coloring-7.2.1.el";
sha256 = "1lh2p3fsym73h0dcj1gqg1xsw3lcikmcskbx8y3j0ds30l4xs13d";
};
packageRequires = [ emacs js2-mode ];
meta = {
@ -628,12 +641,26 @@
license = lib.licenses.free;
};
}) {};
excorporate = callPackage ({ elpaBuild, emacs, fetchurl, fsm, lib, soap-client, url-http-ntlm }:
elpaBuild {
pname = "excorporate";
version = "0.7.1";
src = fetchurl {
url = "http://elpa.gnu.org/packages/excorporate-0.7.1.tar";
sha256 = "1flvhk39yymskzazpwh95j2nj8kg4b02hsg7b8msnqi3q5lpqs54";
};
packageRequires = [ emacs fsm soap-client url-http-ntlm ];
meta = {
homepage = "http://elpa.gnu.org/packages/excorporate.html";
license = lib.licenses.free;
};
}) {};
exwm = callPackage ({ elpaBuild, fetchurl, lib, xelb }: elpaBuild {
pname = "exwm";
version = "0.2";
version = "0.4";
src = fetchurl {
url = "http://elpa.gnu.org/packages/exwm-0.2.tar";
sha256 = "0z96zz6h5r880nbhclbxs2r0zfkg771lg0fjghigqxz8ai0hh1ll";
url = "http://elpa.gnu.org/packages/exwm-0.4.tar";
sha256 = "1qlplx88mk8c5sahlymxxh46bzf6bxnsqk92wliv5ji4ai5373fb";
};
packageRequires = [ xelb ];
meta = {
@ -767,10 +794,10 @@
hydra = callPackage ({ cl-lib ? null, elpaBuild, fetchurl, lib }:
elpaBuild {
pname = "hydra";
version = "0.13.4";
version = "0.13.5";
src = fetchurl {
url = "http://elpa.gnu.org/packages/hydra-0.13.4.tar";
sha256 = "11msy6n075iv00c2r9f85bzx3srnj403rhlga1rgsl6vsryf21fj";
url = "http://elpa.gnu.org/packages/hydra-0.13.5.tar";
sha256 = "0vq1pjyq6ddbikbh0vzdigbs0zlldgwad0192s7v9npg8qlwi668";
};
packageRequires = [ cl-lib ];
meta = {
@ -978,10 +1005,10 @@
}) {};
math-symbol-lists = callPackage ({ elpaBuild, fetchurl, lib }: elpaBuild {
pname = "math-symbol-lists";
version = "1.0";
version = "1.1";
src = fetchurl {
url = "http://elpa.gnu.org/packages/math-symbol-lists-1.0.el";
sha256 = "1rry9x4pl7i0sij051i76zp1ypvnj1qbwm40a7bs462c74q4jlwn";
url = "http://elpa.gnu.org/packages/math-symbol-lists-1.1.tar";
sha256 = "06klvnqipz0n9slw72fxmhrydrw6bi9fs9vnn8hrja8gsqf8inlz";
};
packageRequires = [];
meta = {
@ -1005,10 +1032,10 @@
metar = callPackage ({ cl-lib ? null, elpaBuild, fetchurl, lib }:
elpaBuild {
pname = "metar";
version = "0.1";
version = "0.2";
src = fetchurl {
url = "http://elpa.gnu.org/packages/metar-0.1.el";
sha256 = "0s9zyzps022h5xax574bwsvsyp893x5w74kznnhfm63sxrifbi18";
url = "http://elpa.gnu.org/packages/metar-0.2.el";
sha256 = "0rfzq79llh6ixw02kjpn8s2shxrabvfvsq48pagwak1jl2s0askf";
};
packageRequires = [ cl-lib ];
meta = {
@ -1215,10 +1242,10 @@
}) {};
org = callPackage ({ elpaBuild, fetchurl, lib }: elpaBuild {
pname = "org";
version = "20160215";
version = "20160229";
src = fetchurl {
url = "http://elpa.gnu.org/packages/org-20160215.tar";
sha256 = "0w2686rza4xdknq3sy87s04zvlmjxyr6wrj9y9ydcv8hbzws3bhd";
url = "http://elpa.gnu.org/packages/org-20160229.tar";
sha256 = "15zrkw33ma8q079sb518rmcj97n35rnjv16p6zfw52m9xfdwxgi9";
};
packageRequires = [];
meta = {
@ -1411,6 +1438,19 @@
license = lib.licenses.free;
};
}) {};
sed-mode = callPackage ({ elpaBuild, fetchurl, lib }: elpaBuild {
pname = "sed-mode";
version = "1.0";
src = fetchurl {
url = "http://elpa.gnu.org/packages/sed-mode-1.0.el";
sha256 = "1zpdai5k9zhy5hw0a5zx7qv3rcf8cn29hncfjnhk9k6sjq0302lg";
};
packageRequires = [];
meta = {
homepage = "http://elpa.gnu.org/packages/sed-mode.html";
license = lib.licenses.free;
};
}) {};
seq = callPackage ({ elpaBuild, fetchurl, lib }: elpaBuild {
pname = "seq";
version = "1.11";
@ -1439,10 +1479,10 @@
}) {};
sisu-mode = callPackage ({ elpaBuild, fetchurl, lib }: elpaBuild {
pname = "sisu-mode";
version = "3.0.3";
version = "7.1.8";
src = fetchurl {
url = "http://elpa.gnu.org/packages/sisu-mode-3.0.3.el";
sha256 = "0ay9hfix3x53f39my02071dzxrw69d4zx5zirxwmmmyxmkaays3r";
url = "http://elpa.gnu.org/packages/sisu-mode-7.1.8.el";
sha256 = "12zs6y4rzng1d7djl9wh3wc0f9fj0bqb7h754rvixvndlr5c10nj";
};
packageRequires = [];
meta = {
@ -1492,10 +1532,10 @@
}) {};
sotlisp = callPackage ({ elpaBuild, emacs, fetchurl, lib }: elpaBuild {
pname = "sotlisp";
version = "1.4.1";
version = "1.5.1";
src = fetchurl {
url = "http://elpa.gnu.org/packages/sotlisp-1.4.1.el";
sha256 = "1v99pcj5lp1xxavghwv03apwpc589y7wb8vv6w3kai7483p13z5j";
url = "http://elpa.gnu.org/packages/sotlisp-1.5.1.el";
sha256 = "1dm2pl4i091gi5lljl68s6v3l3904jj38v56qjblm160wjiahgkm";
};
packageRequires = [ emacs ];
meta = {
@ -1518,10 +1558,10 @@
}) {};
stream = callPackage ({ elpaBuild, emacs, fetchurl, lib }: elpaBuild {
pname = "stream";
version = "2.1.0";
version = "2.2.0";
src = fetchurl {
url = "http://elpa.gnu.org/packages/stream-2.1.0.el";
sha256 = "05fihjd8gm5w4xbdcvah1g9srcgmk87ymk3i7wwa6961w5s01d5y";
url = "http://elpa.gnu.org/packages/stream-2.2.0.el";
sha256 = "0i6vwih61a0z0q05v9wyp9nj5h68snlb9n52nmrv1k0hhzsjmlrs";
};
packageRequires = [ emacs ];
meta = {
@ -1598,10 +1638,10 @@
test-simple = callPackage ({ cl-lib ? null, elpaBuild, fetchurl, lib }:
elpaBuild {
pname = "test-simple";
version = "1.1";
version = "1.2.0";
src = fetchurl {
url = "http://elpa.gnu.org/packages/test-simple-1.1.el";
sha256 = "0s8r6kr0a6n1c20fraif2ngis436a7d3gsj351s6icx6bbcjdalw";
url = "http://elpa.gnu.org/packages/test-simple-1.2.0.el";
sha256 = "1j97qrwi3i2kihszsxf3y2cby2bzp8g0zf6jlpdix3dinav8xa3b";
};
packageRequires = [ cl-lib ];
meta = {
@ -1704,10 +1744,10 @@
url-http-ntlm = callPackage ({ cl-lib ? null, elpaBuild, fetchurl, lib, ntlm ? null }:
elpaBuild {
pname = "url-http-ntlm";
version = "2.0.1";
version = "2.0.2";
src = fetchurl {
url = "http://elpa.gnu.org/packages/url-http-ntlm-2.0.1.tar";
sha256 = "0h6xsm1x7v69kb4shyvv1p4f6sxgcqs5ap6ylqydz10mbcx7aq0w";
url = "http://elpa.gnu.org/packages/url-http-ntlm-2.0.2.el";
sha256 = "0jci5cl31hw4dj0j9ljq0iplg530wnwbw7b63crrwn3mza5cb2wf";
};
packageRequires = [ cl-lib ntlm ];
meta = {
@ -1849,10 +1889,10 @@
xelb = callPackage ({ cl-generic, elpaBuild, emacs, fetchurl, lib }:
elpaBuild {
pname = "xelb";
version = "0.5";
version = "0.6";
src = fetchurl {
url = "http://elpa.gnu.org/packages/xelb-0.5.tar";
sha256 = "1wypffg492r2a3h136c6mphsbgimxcipsarm971z56kpy3lwi4sb";
url = "http://elpa.gnu.org/packages/xelb-0.6.tar";
sha256 = "1m91af5srxq8zs9w4gb44kl4bgka8fq7k33h7f2yn213h23kvvvh";
};
packageRequires = [ cl-generic emacs ];
meta = {

View File

@ -4,7 +4,7 @@ stdenv.mkDerivation rec {
name = "heme-${version}";
version = "0.4.2";
src = fetchurl {
url = "http://downloads.sourceforge.net/project/heme/heme/heme-${version}/heme-${version}.tar.gz";
url = "mirror://sourceforge/project/heme/heme/heme-${version}/heme-${version}.tar.gz";
sha256 = "0wsrnj5mrlazgqs4252k30aw8m86qw0z9dmrsli9zdxl7j4cg99v";
};
postPatch = ''

View File

@ -1,5 +1,6 @@
{ stdenv, fetchurl
, ncurses
, texinfo
, gettext ? null
, enableNls ? true
, enableTiny ? false
@ -16,7 +17,8 @@ stdenv.mkDerivation rec {
url = "mirror://gnu/nano/${name}.tar.gz";
sha256 = "1vl9bim56k1b4zwc3icxp46w6pn6gb042j1h4jlz1jklxxpkwcpz";
};
buildInputs = [ ncurses ] ++ optional enableNls gettext;
buildInputs = [ ncurses texinfo ] ++ optional enableNls gettext;
outputs = [ "out" "info" ];
configureFlags = ''
--sysconfdir=/etc
${optionalString (!enableNls) "--disable-nls"}

View File

@ -9,7 +9,7 @@ stdenv.mkDerivation rec {
enableParallelBuilding = true;
src = fetchurl {
url = "http://downloads.sourceforge.net/project/saga-gis/SAGA%20-%202.2/SAGA%202.2.2/saga-2.2.2.tar.gz";
url = "mirror://sourceforge/project/saga-gis/SAGA%20-%202.2/SAGA%202.2.2/saga-2.2.2.tar.gz";
sha256 = "031cd70b7ec248f32f955a9316aefc7f7ab283c5129c49aa4bd748717d20357e";
};

View File

@ -2,7 +2,7 @@
let
version = "0.9.11";
version = "0.9.12";
in
@ -10,8 +10,8 @@ stdenv.mkDerivation rec {
name = "pythonmagick-${version}";
src = fetchurl {
url = "http://www.imagemagick.org/download/python/releases/PythonMagick-${version}.tar.gz";
sha256 = "01z01mlqkk0lvrh2jsmf84qjw29sq4rpj0653x7nqy7mrszwwp2v";
url = "http://www.imagemagick.org/download/python/releases/PythonMagick-${version}.tar.xz";
sha256 = "1l1kr3d7l40fkxgs6mrlxj65alv2jizm9hhgg9i9g90a8qj8642b";
};
buildInputs = [python boost pkgconfig imagemagick];

View File

@ -1,4 +1,4 @@
{ stdenv, fetchFromGitHub, cmake, libX11, procps, python, qtbase }:
{ stdenv, fetchFromGitHub, cmake, libX11, procps, python, libdwarf, qtbase, qtwebkit }:
stdenv.mkDerivation rec {
name = "apitrace-${version}";
@ -11,13 +11,11 @@ stdenv.mkDerivation rec {
owner = "apitrace";
};
buildInputs = [ libX11 procps python qtbase ];
nativeBuildInputs = [ cmake ];
# LD_PRELOAD wrappers need to be statically linked to work against all kinds
# of games -- so it's fine to use e.g. bundled snappy.
buildInputs = [ libX11 procps python libdwarf qtbase qtwebkit ];
buildPhase = ''
cmake
make
'';
nativeBuildInputs = [ cmake ];
meta = with stdenv.lib; {
homepage = https://apitrace.github.io;

View File

@ -1,10 +1,10 @@
{ callPackage, fetchgit, ... } @ args:
callPackage ./generic.nix (args // {
version = "2016-02-25";
version = "2016-03-05";
src = fetchgit {
sha256 = "842b1186d38de14221be514a58f77c23d9f83979ea45f846440cf9cbb1f26c1f";
rev = "c5117ed0f1b522eab10fd2248f140b2acad2a708";
sha256 = "dc84530d5e0233427acfd132aa08a4cf9973c936ff72a66ee08ecf836200d367";
rev = "23eb95582da718791103b83ea002e947caa0f5fc";
url = "git://alioth.debian.org/git/sane/sane-backends.git";
};
})

View File

@ -3,10 +3,10 @@
stdenv.mkDerivation rec {
name = "simple-scan-${version}";
version = "3.19.90";
version = "3.19.91";
src = fetchurl {
sha256 = "16s8855sqrn5iiirpqva0mys8abfpzk9xryrb6rpjbynvx2lanmd";
sha256 = "1c5glf5vxgld41w4jxfqcv17q76qnh43fawpv33hncgh8d283xkf";
url = "https://launchpad.net/simple-scan/3.19/${version}/+download/${name}.tar.xz";
};
@ -17,7 +17,7 @@ stdenv.mkDerivation rec {
configureFlags = [ "--disable-packagekit" ];
preBuild = ''
# Clean up stale generated .c files still referencing packagekit headers:
# Clean up stale .c files referencing packagekit headers as of 3.19.91:
make clean
'';

View File

@ -17,4 +17,6 @@ stdenv.mkDerivation {
patches = map fetchurl (import ./debian-patches.nix);
prePatch = "patchShebangs Scripts";
meta.broken = true;
}

View File

@ -1,55 +1,47 @@
{ fetchurl, fetchhg, stdenv, xorg, gcc46, makeWrapper }:
{ fetchurl, fetchhg, stdenv, xorg, makeWrapper }:
stdenv.mkDerivation rec {
# Inferno is a rolling release from a mercurial repository. For the verison number
# of the package I'm using the mercurial commit number.
version = "645";
name = "inferno-${version}";
# The mercurial repository does not contain all the components needed for the
# runtime system. The 'base' package contains these. For this package I download
# the base, extract the elements required from that, and add them to the source
# pulled from the mercurial repository.
srcBase = fetchurl {
url = "http://www.vitanuova.com/dist/4e/inferno-20100120.tgz";
sha256 = "0msvy3iwl4n5k0ry0xiyysjkq0qsawmwn3hvg67hbi5y8g7f7l88";
};
rev = "785";
name = "inferno-${rev}";
host = "Linux";
objtype = "386";
src = fetchhg {
url = "https://inferno-os.googlecode.com/hg";
rev = "7ab390b860ca";
sha256 = "09y0iclb3yy10gw1p0182sddg64xh60q2fx4ai7lxyfb65i76qbh";
url = "https://bitbucket.org/inferno-os/inferno-os";
sha256 = "1b428ma9fi5skvfrxp91dr43a62kax89wmx7950ahc1cxyx90k7x";
};
# Fails with gcc48 due to inferno triggering an optimisation issue with floating point.
buildInputs = [ gcc46 xorg.libX11 xorg.libXpm xorg.libXext xorg.xextproto makeWrapper ];
buildInputs = [ makeWrapper ] ++ (with xorg; [ libX11 libXpm libXext xextproto ]);
infernoWrapper = ./inferno;
configurePhase = ''
tar --strip-components=1 -xvf $srcBase inferno/fonts inferno/Mkdirs inferno/empties
sed -e 's@^ROOT=.*$@ROOT='"$out"'/share/inferno@g' -e 's@^OBJTYPE=.*$@OBJTYPE=386@g' -e 's@^SYSHOST=.*$@SYSHOST=Linux@g' -i mkconfig
mkdir prof
sh Mkdirs
sed -e 's@^ROOT=.*$@ROOT='"$out"'/share/inferno@g' \
-e 's@^OBJTYPE=.*$@OBJTYPE=${objtype}@g' \
-e 's@^SYSHOST=.*$@SYSHOST=${host}@g' \
-i mkconfig
# Get rid of an annoying warning
sed -e 's/_BSD_SOURCE/_DEFAULT_SOURCE/g' \
-i ${host}/${objtype}/include/lib9.h
'';
buildPhase = ''
export PATH=$PATH:$out/share/inferno/Linux/386/bin
mkdir -p $out/share/inferno
cp -r . $out/share/inferno
./makemk.sh
export PATH=$PATH:$out/share/inferno/Linux/386/bin
mk nuke
mk
'';
installPhase = ''
# Installs executables in $out/share/inferno/${host}/${objtype}/bin
mk install
mkdir -p $out/bin
makeWrapper $out/share/inferno/Linux/386/bin/emu $out/bin/emu \
--suffix LD_LIBRARY_PATH ':' "${gcc46.cc}/lib" \
--suffix PATH ':' "$out/share/inferno/Linux/386/bin"
# Install start-up script
makeWrapper $infernoWrapper $out/bin/inferno \
--suffix LD_LIBRARY_PATH ':' "${gcc46.cc}/lib" \
--suffix PATH ':' "$out/share/inferno/Linux/386/bin" \
--set INFERNO_ROOT "$out/share/inferno"
'';
@ -58,7 +50,7 @@ stdenv.mkDerivation rec {
description = "A compact distributed operating system for building cross-platform distributed systems";
homepage = "http://inferno-os.org/";
license = stdenv.lib.licenses.gpl2;
maintainers = [ "Chris Double <chris.double@double.co.nz>" ];
maintainers = with stdenv.lib.maintainers; [ doublec kovirobi ];
platforms = with stdenv.lib.platforms; linux;
};
}

View File

@ -5,12 +5,12 @@
}:
stdenv.mkDerivation rec {
version = "2.51.0";
version = "2.52.0";
name = "calibre-${version}";
src = fetchurl {
url = "http://download.calibre-ebook.com/${version}/${name}.tar.xz";
sha256 = "1rhpcxic4g2zyr5s3xn8dayyb45l9r8zyniaig8j7pl5kmsfjijn";
sha256 = "1la114vhkm73iv0rrzwws28ydiszl58q5y9d6aafn5sh16ph2aws";
};
inherit python;

View File

@ -1,17 +1,34 @@
{ stdenv, fetchurl, buildPythonApplication, pythonPackages, slowaes }:
{ stdenv, fetchurl, pythonPackages }:
buildPythonApplication rec {
let
jsonrpclib = pythonPackages.buildPythonPackage rec {
version = "0.1.7";
name = "jsonrpclib-${version}";
src = fetchurl {
url = "https://pypi.python.org/packages/source/j/jsonrpclib/${name}.tar.gz";
sha256 = "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z";
};
propagatedBuildInputs = [ pythonPackages.cjson ];
meta = {
homepage = https://pypi.python.org/pypi/jsonrpclib;
license = stdenv.lib.licenses.asl20;
};
};
in
pythonPackages.buildPythonApplication rec {
name = "electrum-${version}";
version = "2.5.4";
version = "2.6.1";
src = fetchurl {
url = "https://download.electrum.org/${version}/Electrum-${version}.tar.gz";
sha256 = "18saa2rg07vfp9scp3i8s0wi2pqw9s8l8b44gq43zzl41120zc60";
sha256 = "14q6y1hwzki56nfhd3nfbxid07d5fv0pgmklvcf7yxjmpdxrg0iq";
};
propagatedBuildInputs = with pythonPackages; [
dns
ecdsa
jsonrpclib
pbkdf2
protobuf
pyasn1
@ -47,7 +64,7 @@ buildPythonApplication rec {
of the blockchain.
'';
homepage = https://electrum.org;
license = licenses.gpl3;
license = licenses.mit;
maintainers = with maintainers; [ ehmry joachifm np ];
};
}

View File

@ -0,0 +1,69 @@
{ stdenv, fetchFromGitHub, makeWrapper, automake, autoconf, libtool,
pkgconfig, file, intltool, libxml2, json_glib , sqlite, itstool,
vala, gnome3
}:
stdenv.mkDerivation rec {
name = "font-manager-${version}";
version = "git-2016-03-02";
src = fetchFromGitHub {
owner = "FontManager";
repo = "master";
rev = "743fb83558c86bfbbec898106072f84422c175d6";
sha256 = "1sakss6irfr3d8k39x1rf72fmnpq47akhyrv3g45a3l6v6xfqp3k";
};
enableParallelBuilding = true;
buildInputs = [
makeWrapper
pkgconfig
automake autoconf libtool
file
intltool
libxml2
json_glib
sqlite
itstool
vala
gnome3.gtk
gnome3.gucharmap
gnome3.libgee
gnome3.file-roller
gnome3.yelp_tools
];
preConfigure = ''
NOCONFIGURE=true ./autogen.sh
chmod +x configure;
substituteInPlace configure --replace "/usr/bin/file" "${file}/bin/file"
'';
configureFlags = "--disable-pycompile";
preFixup = ''
for prog in "$out/bin/"* "$out/libexec/font-manager/"*; do
wrapProgram "$prog" \
--prefix XDG_DATA_DIRS : "$out/share:$GSETTINGS_SCHEMAS_PATH"
done
'';
meta = {
homepage = https://fontmanager.github.io/;
description = "Simple font management for GTK+ desktop environments";
longDescription = ''
Font Manager is intended to provide a way for average users to
easily manage desktop fonts, without having to resort to command
line tools or editing configuration files by hand. While designed
primarily with the Gnome Desktop Environment in mind, it should
work well with other Gtk+ desktop environments.
Font Manager is NOT a professional-grade font management solution.
'';
license = stdenv.lib.licenses.gpl3;
maintainers = [ stdenv.lib.maintainers.romildo ];
repositories.git = https://github.com/FontManager/master;
platforms = stdenv.lib.platforms.unix;
};
}

View File

@ -7,7 +7,7 @@ stdenv.mkDerivation rec {
version = "2.1.3";
src = fetchurl {
url = "http://downloads.sourceforge.net/galculator/${name}.tar.gz";
url = "mirror://sourceforge/galculator/${name}.tar.gz";
sha256 = "12m7dldjk10lpkdxk7zpk98n32ci65zmxidghihb7n1m3rhp3q17";
};

View File

@ -5,11 +5,11 @@ assert withBuildColors -> ncurses != null;
with stdenv.lib;
stdenv.mkDerivation rec {
name = "girara-${version}";
version = "0.2.4";
version = "0.2.5";
src = fetchurl {
url = "http://pwmt.org/projects/girara/download/${name}.tar.gz";
sha256 = "0pnfdsg435b5vc4x8l9pgm77aj7ram1q0bzrp9g4a3bh1r64xq1f";
sha256 = "14m8mfbck49ldwi1w2i47bbg5c9daglcmvz9v2g1hnrq8k8g5x2w";
};
preConfigure = ''

View File

@ -0,0 +1,37 @@
{ stdenv, fetchurl, automake, autoconf, pkgconfig, gtk3 }:
stdenv.mkDerivation rec {
name = "gsimplecal-${version}";
version = "2.1";
src = fetchurl {
url = "https://github.com/dmedvinsky/gsimplecal/archive/v${version}.tar.gz";
sha256 = "1sa05ifjp41xipfspk5n6l3wzpzmp3i45q88l01p4l6k6drsq336";
};
enableParallelBuilding = true;
buildInputs = [ pkgconfig automake autoconf gtk3 ];
preConfigure = "./autogen.sh";
meta = {
homepage = http://dmedvinsky.github.io/gsimplecal/;
description = "Lightweight calendar application written in C++ using GTK";
longDescription = ''
gsimplecal was intentionally made for use with tint2 panel in the
openbox environment to be launched upon clock click, but of course it
will work without it. In fact, binding the gsimplecal to some hotkey in
you window manager will probably make you happy. The thing is that when
it is started it first shows up, when you run it again it closes the
running instance. In that way it is very easy to integrate anywhere. No
need to write some wrapper scripts or whatever.
Also, you can configure it to not only show the calendar, but also
display multiple clocks for different world time zones.
'';
license = stdenv.lib.licenses.bsd3;
maintainers = [ stdenv.lib.maintainers.romildo ];
platforms = stdenv.lib.platforms.unix;
};
}

View File

@ -2,11 +2,11 @@
stdenv.mkDerivation rec {
name = "josm-${version}";
version = "9329";
version = "9900";
src = fetchurl {
url = "https://josm.openstreetmap.de/download/josm-snapshot-${version}.jar";
sha256 = "084a3pizmz09abn2n7brhx6757bq9k3xq3jy8ip2ifbl2hcrw7pq";
sha256 = "1dsfamh2bsiz3xkhmh7g4jz6bbh25x22k3zgj1k0v0gj8k6yl7dy";
};
phases = [ "installPhase" ];

View File

@ -1,4 +1,4 @@
{ stdenv, lib, fetchurl, buildDotnetPackage, makeWrapper, unzip, makeDesktopItem, plugins ? [] }:
{ stdenv, lib, fetchurl, buildDotnetPackage, makeWrapper, unzip, makeDesktopItem, icoutils, plugins ? [] }:
# KeePass looks for plugins in under directory in which KeePass.exe is
# located. It follows symlinks where looking for that directory, so
@ -17,7 +17,7 @@ with builtins; buildDotnetPackage rec {
sourceRoot = ".";
buildInputs = [ unzip makeWrapper ];
buildInputs = [ unzip makeWrapper icoutils ];
pluginLoadPathsPatch =
let outputLc = toString (add 8 (length plugins));
@ -52,9 +52,14 @@ with builtins; buildDotnetPackage rec {
name = "keepass";
exec = "keepass";
comment = "Password manager";
icon = "keepass";
desktopName = "Keepass";
genericName = "Password manager";
categories = "Application;Other;";
categories = "Application;Utility;";
mimeType = stdenv.lib.concatStringsSep ";" [
"application/x-keepass2"
""
];
};
outputFiles = [ "Build/KeePass/Release/*" "Build/KeePassLib/Release/*" ];
@ -67,16 +72,29 @@ with builtins; buildDotnetPackage rec {
# is found and does not pollute output path.
binPaths = lib.concatStrings (lib.intersperse ":" (map (x: x + "/bin") plugins));
postInstall = ''
postInstall =
let
extractFDeskIcons = ./extractWinRscIconsToStdFreeDesktopDir.sh;
in
''
mkdir -p "$out/share/applications"
cp ${desktopItem}/share/applications/* $out/share/applications
wrapProgram $out/bin/keepass --prefix PATH : "$binPaths"
${extractFDeskIcons} \
"./Translation/TrlUtil/Resources/KeePass.ico" \
'[^\.]+_[0-9]+_([0-9]+x[0-9]+)x[0-9]+\.png' \
'\1' \
'([^\.]+).+' \
'keepass' \
"$out" \
"./tmp"
'';
meta = {
description = "GUI password manager with strong cryptography";
homepage = http://www.keepass.info/;
maintainers = with stdenv.lib.maintainers; [ amorsillo obadz ];
maintainers = with stdenv.lib.maintainers; [ amorsillo obadz jraygauthier ];
platforms = with stdenv.lib.platforms; all;
license = stdenv.lib.licenses.gpl2;
};

View File

@ -0,0 +1,61 @@
#!/bin/sh
# The file from which to extract *.ico files.
#rscFile="./KeePass.exe"
rscFile=$1
# A regexp that can extract the image size from the file name.
# sizeRegex='[^\.]+\.exe_[0-9]+_[0-9]+_[0-9]+_[0-9]+_([0-9]+x[0-9]+)x[0-9]+\.png'
sizeRegex=$2
# sizeReplaceExp='\1'
sizeReplaceExp=$3
# A regexp that can extract the name of the target image from the file name.
# nameRegex='([^\.]+)\.exe.+'
nameRegex=$4
# nameReplaceExp='\1'
nameReplaceExp=$5
# out=./myOut
out=$6
# An optional temp dir. TODO: Generate it randomly by default instead.
tmp=./tmp
if [ "" != "$4" ]; then
tmp=$7
fi
rm -rf $tmp/png $tmp/ico
mkdir -p $tmp/png $tmp/ico
# Extract the ressource file's extension.
rscFileExt=`echo "$rscFile" | sed -re 's/.+\.(.+)$/\1/'`
# Debug ressource file extension.
echo "rscFileExt=$rscFileExt"
if [ "ico" = "$rscFileExt" ]; then
cp -p $rscFile $tmp/ico
else
wrestool -x --output=$tmp/ico -t14 $rscFile
fi
icotool --icon -x --palette-size=0 -o $tmp/png $tmp/ico/*.ico
mkdir -p $out
for i in $tmp/png/*.png; do
fn=`basename "$i"`
size=$(echo $fn | sed -re 's/'${sizeRegex}'/'${sizeReplaceExp}'/')
name=$(echo $fn | sed -re 's/'${nameRegex}'/'${nameReplaceExp}'/')
targetDir=$out/share/icons/hicolor/$size/apps
targetFile=$targetDir/$name.png
mkdir -p $targetDir
mv $i $targetFile
done
rm -rf $tmp/png $tmp/ico

View File

@ -1,6 +1,6 @@
{ stdenv, fetchurl, pkgs, pythonPackages }:
{ stdenv, fetchurl, pkgs, python3Packages }:
pythonPackages.buildPythonApplication rec {
python3Packages.buildPythonApplication rec {
version = "0.7.0";
name = "khal-${version}";
@ -9,7 +9,7 @@ pythonPackages.buildPythonApplication rec {
sha256 = "00llxj7cv31mjsx0j6zxmyi9s1q20yvfkn025xcy8cv1ylfwic66";
};
propagatedBuildInputs = with pythonPackages; [
propagatedBuildInputs = with python3Packages; [
atomicwrites
click
configobj
@ -22,7 +22,6 @@ pythonPackages.buildPythonApplication rec {
requests_toolbelt
tzlocal
urwid
python.modules.sqlite3
pkginfo
];

View File

@ -1,6 +1,6 @@
{ stdenv, fetchurl, pkgs, pythonPackages }:
{ stdenv, fetchurl, pkgs, python2Packages }:
pythonPackages.buildPythonApplication rec {
python2Packages.buildPythonApplication rec {
version = "0.8.1";
name = "khard-${version}";
namePrefix = "";
@ -10,7 +10,7 @@ pythonPackages.buildPythonApplication rec {
sha256 = "13axfrs96isirx0c483545xdmjwwfq1k7yy92xpk7l184v71rgi1";
};
propagatedBuildInputs = with pythonPackages; [
propagatedBuildInputs = with python2Packages; [
atomicwrites
configobj
vobject
@ -18,10 +18,6 @@ pythonPackages.buildPythonApplication rec {
pyyaml
];
buildInputs = with pythonPackages; [
pkgs.vdirsyncer
];
meta = {
homepage = https://github.com/scheibler/khard;
description = "Console carddav client";

View File

@ -3,7 +3,7 @@
stdenv.mkDerivation rec {
name = "lxappearance-0.6.1";
src = fetchurl{
url = "http://downloads.sourceforge.net/project/lxde/LXAppearance/${name}.tar.xz";
url = "mirror://sourceforge/project/lxde/LXAppearance/${name}.tar.xz";
sha256 = "1phnv1b2jdj2vlibjyc9z01izcf3k5zxj8glsaf0i3vh77zqmqq9";
};
buildInputs = [ intltool libX11 pkgconfig gtk ];

View File

@ -8,13 +8,13 @@ in {
m3d-fio = buildPlugin rec {
name = "M3D-Fio-${version}";
version = "0.27.1";
version = "0.29";
src = fetchFromGitHub {
owner = "donovan6000";
repo = "M3D-Fio";
rev = "V${version}";
sha256 = "0jfb417wgdq6fzpxwq6xrrlpkndjwq69h4cdm0ixbyqkp7a3kcm2";
sha256 = "1ifbq7yibq42jjvqvklnx3qzr6vk2ngsxh3xhlbdrhqrg54gky4r";
};
patches = [

View File

@ -1,11 +1,12 @@
{ stdenv, fetchurl, pkgconfig, glib, gtk, menu-cache }:
stdenv.mkDerivation rec {
name = "openbox-menu-0.5.1";
name = "openbox-menu-${version}";
version = "0.8.0";
src = fetchurl {
url = "https://bitbucket.org/fabriceT/openbox-menu/downloads/${name}.tar.bz2";
sha256 = "11v3nlhqcnks5vms1a7rrvwvj8swc9axgjkp7z0r97lijsg6d3rj";
sha256 = "1hi4b6mq97y6ajq4hhsikbkk23aha7ikaahm92djw48mgj2f1w8l";
};
buildInputs = [ pkgconfig glib gtk menu-cache ];
@ -15,8 +16,13 @@ stdenv.mkDerivation rec {
installPhase = "make install prefix=$out";
meta = {
homepage = "http://fabrice.thiroux.free.fr/openbox-menu_en.html";
description = "Dynamic XDG menu generator for Openbox";
homepage = "http://mimasgpc.free.fr/openbox-menu.html";
longDescription = ''
Openbox-menu is a pipemenu for Openbox window manager. It provides a
dynamic menu listing installed applications. Most of the work is done by
the LXDE library menu-cache.
'';
license = stdenv.lib.licenses.gpl3;
maintainers = [ stdenv.lib.maintainers.romildo ];
platforms = stdenv.lib.platforms.unix;

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