diff --git a/.gitignore b/.gitignore
index 165e92c7fc327eff3b5da70c10521ab9147260f3..105e621d7021ed4f43b865797353718577b6fc0c 100644
--- a/.gitignore
+++ b/.gitignore
@@ -7,3 +7,4 @@ doc/NEWS.html
doc/NEWS.txt
doc/manual.html
doc/manual.pdf
+.version-suffix
diff --git a/.version b/.version
new file mode 100644
index 0000000000000000000000000000000000000000..381796ec8b7e97ad514d99773900d047653d211e
--- /dev/null
+++ b/.version
@@ -0,0 +1 @@
+13.10
\ No newline at end of file
diff --git a/VERSION b/VERSION
deleted file mode 100644
index 9f8e9b69a33f4e8067d5b21661a35d8856758aba..0000000000000000000000000000000000000000
--- a/VERSION
+++ /dev/null
@@ -1 +0,0 @@
-1.0
\ No newline at end of file
diff --git a/doc/manual.xml b/doc/manual.xml
index 927361ba5c8e9838ffdc12f34d85ee599e1adf91..d2c07859b2814682589da8699d242dc8bde13b1f 100644
--- a/doc/manual.xml
+++ b/doc/manual.xml
@@ -5,7 +5,7 @@
Nixpkgs Manual
- Draft (Version Draft (Version )
diff --git a/pkgs/lib/attrsets.nix b/lib/attrsets.nix
similarity index 100%
rename from pkgs/lib/attrsets.nix
rename to lib/attrsets.nix
diff --git a/pkgs/lib/composable-derivation.nix b/lib/composable-derivation.nix
similarity index 100%
rename from pkgs/lib/composable-derivation.nix
rename to lib/composable-derivation.nix
diff --git a/pkgs/lib/customisation.nix b/lib/customisation.nix
similarity index 100%
rename from pkgs/lib/customisation.nix
rename to lib/customisation.nix
diff --git a/pkgs/lib/debug.nix b/lib/debug.nix
similarity index 100%
rename from pkgs/lib/debug.nix
rename to lib/debug.nix
diff --git a/pkgs/lib/default.nix b/lib/default.nix
similarity index 100%
rename from pkgs/lib/default.nix
rename to lib/default.nix
diff --git a/pkgs/lib/licenses.nix b/lib/licenses.nix
similarity index 100%
rename from pkgs/lib/licenses.nix
rename to lib/licenses.nix
diff --git a/pkgs/lib/lists.nix b/lib/lists.nix
similarity index 100%
rename from pkgs/lib/lists.nix
rename to lib/lists.nix
diff --git a/pkgs/lib/maintainers.nix b/lib/maintainers.nix
similarity index 100%
rename from pkgs/lib/maintainers.nix
rename to lib/maintainers.nix
diff --git a/pkgs/lib/meta.nix b/lib/meta.nix
similarity index 100%
rename from pkgs/lib/meta.nix
rename to lib/meta.nix
diff --git a/pkgs/lib/misc.nix b/lib/misc.nix
similarity index 100%
rename from pkgs/lib/misc.nix
rename to lib/misc.nix
diff --git a/pkgs/lib/modules.nix b/lib/modules.nix
similarity index 100%
rename from pkgs/lib/modules.nix
rename to lib/modules.nix
diff --git a/pkgs/lib/options.nix b/lib/options.nix
similarity index 96%
rename from pkgs/lib/options.nix
rename to lib/options.nix
index e8e01083a77a2affdb2a3ffa8f6de68c4cc4391c..a91115287e45b0b6bfb23889e197e44e893db475 100644
--- a/pkgs/lib/options.nix
+++ b/lib/options.nix
@@ -31,7 +31,7 @@ rec {
mkEnableOption = name: mkOption {
default = false;
example = true;
- description = "Whether to enable ${name}";
+ description = "Whether to enable ${name}.";
type = lib.types.bool;
};
@@ -266,16 +266,13 @@ rec {
# Generate documentation template from the list of option declaration like
# the set generated with filterOptionSets.
- optionAttrSetToDocList = ignore: newOptionAttrSetToDocList;
- newOptionAttrSetToDocList = attrs:
+ optionAttrSetToDocList = attrs:
let options = collect isOption attrs; in
fold (opt: rest:
let
docOption = {
inherit (opt) name;
- description = if opt ? description then opt.description else
- throw "Option ${opt.name}: No description.";
-
+ description = opt.description or (throw "Option ${opt.name}: No description.");
declarations = map (x: toString x.source) opt.declarations;
#definitions = map (x: toString x.source) opt.definitions;
}
@@ -285,7 +282,7 @@ rec {
subOptions =
if opt ? options then
- newOptionAttrSetToDocList opt.options
+ optionAttrSetToDocList opt.options
else
[];
in
@@ -298,7 +295,7 @@ rec {
generation of `options.xml' much more efficient: the XML
representation of derivations is very large (on the order of
megabytes) and is not actually used by the manual generator. */
- scrubOptionValue = x:
+ scrubOptionValue = x:
if isDerivation x then { type = "derivation"; drvPath = x.name; outPath = x.name; name = x.name; }
else if isList x then map scrubOptionValue x
else if isAttrs x then mapAttrs (n: v: scrubOptionValue v) (removeAttrs x ["_args"])
diff --git a/pkgs/lib/platforms.nix b/lib/platforms.nix
similarity index 100%
rename from pkgs/lib/platforms.nix
rename to lib/platforms.nix
diff --git a/pkgs/lib/properties.nix b/lib/properties.nix
similarity index 100%
rename from pkgs/lib/properties.nix
rename to lib/properties.nix
diff --git a/pkgs/lib/sources.nix b/lib/sources.nix
similarity index 100%
rename from pkgs/lib/sources.nix
rename to lib/sources.nix
diff --git a/pkgs/lib/strings-with-deps.nix b/lib/strings-with-deps.nix
similarity index 100%
rename from pkgs/lib/strings-with-deps.nix
rename to lib/strings-with-deps.nix
diff --git a/pkgs/lib/strings.nix b/lib/strings.nix
similarity index 100%
rename from pkgs/lib/strings.nix
rename to lib/strings.nix
diff --git a/pkgs/lib/systems.nix b/lib/systems.nix
similarity index 100%
rename from pkgs/lib/systems.nix
rename to lib/systems.nix
diff --git a/pkgs/lib/tests.nix b/lib/tests.nix
similarity index 100%
rename from pkgs/lib/tests.nix
rename to lib/tests.nix
diff --git a/pkgs/lib/trivial.nix b/lib/trivial.nix
similarity index 100%
rename from pkgs/lib/trivial.nix
rename to lib/trivial.nix
diff --git a/pkgs/lib/types.nix b/lib/types.nix
similarity index 100%
rename from pkgs/lib/types.nix
rename to lib/types.nix
diff --git a/maintainers/scripts/eval-release.nix b/maintainers/scripts/eval-release.nix
index 4bd2b0f1fa8bdbd141ab6ed26eebded0570b1844..bb9572cbc795679d5f0be93218aa9192b590e624 100644
--- a/maintainers/scripts/eval-release.nix
+++ b/maintainers/scripts/eval-release.nix
@@ -1,7 +1,7 @@
# Evaluate `release.nix' like Hydra would. Too bad nix-instantiate
# can't to do this.
-with import ../../pkgs/lib;
+with import ../../lib;
let
trace = if builtins.getEnv "VERBOSE" == "1" then builtins.trace else (x: y: y);
@@ -10,14 +10,15 @@ let
# Add the ‘recurseForDerivations’ attribute to ensure that
# nix-instantiate recurses into nested attribute sets.
- recurse = attrs:
+ recurse = path: attrs:
if (builtins.tryEval attrs).success then
- if isDerivation attrs
+ if isDerivation attrs
then
- if (builtins.tryEval attrs.outPath).success
- then attrs
- else { }
- else { recurseForDerivations = true; } // mapAttrs (n: v: recurse v) attrs
+ if (builtins.tryEval attrs.drvPath).success
+ then { inherit (attrs) name drvPath; }
+ else { failed = true; }
+ else { recurseForDerivations = true; } //
+ mapAttrs (n: v: let path' = path ++ [n]; in trace path' (recurse path' v)) attrs
else { };
-in recurse rel
+in recurse [] rel
diff --git a/nixos/COPYING b/nixos/COPYING
new file mode 100644
index 0000000000000000000000000000000000000000..c9b44cb8aaebb163e8524d67558696aa965ad0ec
--- /dev/null
+++ b/nixos/COPYING
@@ -0,0 +1,18 @@
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/nixos/README b/nixos/README
new file mode 100644
index 0000000000000000000000000000000000000000..4ecf648a93024a8731a5cee0df36dc933b8fd54d
--- /dev/null
+++ b/nixos/README
@@ -0,0 +1,5 @@
+*** NixOS ***
+
+NixOS is a Linux distribution based on the purely functional package
+management system Nix. More information can be found at
+http://nixos.org/nixos and in the manual in doc/manual.
diff --git a/nixos/default.nix b/nixos/default.nix
new file mode 100644
index 0000000000000000000000000000000000000000..88f82a824822f8bb9ab6a55046e85f50e7ef24cc
--- /dev/null
+++ b/nixos/default.nix
@@ -0,0 +1,43 @@
+{ configuration ? import ./lib/from-env.nix "NIXOS_CONFIG"
+, system ? builtins.currentSystem
+}:
+
+let
+
+ eval = import ./lib/eval-config.nix {
+ inherit system;
+ modules = [ configuration ];
+ };
+
+ inherit (eval) config pkgs;
+
+ # This is for `nixos-rebuild build-vm'.
+ vmConfig = (import ./lib/eval-config.nix {
+ inherit system;
+ modules = [ configuration ./modules/virtualisation/qemu-vm.nix ];
+ }).config;
+
+ # This is for `nixos-rebuild build-vm-with-bootloader'.
+ vmWithBootLoaderConfig = (import ./lib/eval-config.nix {
+ inherit system;
+ modules =
+ [ configuration
+ ./modules/virtualisation/qemu-vm.nix
+ { virtualisation.useBootLoader = true; }
+ ];
+ }).config;
+
+in
+
+{
+ inherit eval config;
+
+ system = config.system.build.toplevel;
+
+ vm = vmConfig.system.build.vm;
+
+ vmWithBootLoader = vmWithBootLoaderConfig.system.build.vm;
+
+ # The following are used by nixos-rebuild.
+ nixFallback = pkgs.nixUnstable;
+}
diff --git a/nixos/doc/config-examples/basic.nix b/nixos/doc/config-examples/basic.nix
new file mode 100644
index 0000000000000000000000000000000000000000..da37cfb8c28601ade565db95ce363020cb9a4ed2
--- /dev/null
+++ b/nixos/doc/config-examples/basic.nix
@@ -0,0 +1,21 @@
+{
+ boot = {
+ loader.grub.device = "/dev/sda";
+ };
+
+ fileSystems = [
+ { mountPoint = "/";
+ device = "/dev/sda1";
+ }
+ ];
+
+ swapDevices = [
+ { device = "/dev/sdb1"; }
+ ];
+
+ services = {
+ openssh = {
+ enable = true;
+ };
+ };
+}
diff --git a/nixos/doc/config-examples/closed-install-configuration.nix b/nixos/doc/config-examples/closed-install-configuration.nix
new file mode 100644
index 0000000000000000000000000000000000000000..0cebacdb0ccdcff6be5fb3e046b36563bd77fba1
--- /dev/null
+++ b/nixos/doc/config-examples/closed-install-configuration.nix
@@ -0,0 +1,32 @@
+{
+ boot = {
+ loader.grub.device = "/dev/sda";
+ copyKernels = true;
+ bootMount = "(hd0,0)";
+ };
+
+ fileSystems = [
+ { mountPoint = "/";
+ device = "/dev/sda3";
+ }
+ { mountPoint = "/boot";
+ device = "/dev/sda1";
+ neededForBoot = true;
+ }
+ ];
+
+ swapDevices = [
+ { device = "/dev/sda2"; }
+ ];
+
+ services = {
+ sshd = {
+ enable = true;
+ };
+ };
+
+ fonts = {
+ enableFontConfig = false;
+ };
+
+}
diff --git a/nixos/doc/config-examples/root-on-lvm.nix b/nixos/doc/config-examples/root-on-lvm.nix
new file mode 100644
index 0000000000000000000000000000000000000000..2ea1e547921f85247982a979b1e8c9d7b35c011a
--- /dev/null
+++ b/nixos/doc/config-examples/root-on-lvm.nix
@@ -0,0 +1,27 @@
+# This configuration has / on a LVM volume. Since Grub
+# doesn't know about LVM, a separate /boot is therefore
+# needed.
+#
+# In this example, labels are used for file systems and
+# swap devices: "boot" might be /dev/sda1, "root" might be
+# /dev/my-volume-group/root, and "swap" might be /dev/sda2.
+# In particular there is no specific reference to the fact
+# that / is on LVM; that's figured out automatically.
+
+{
+ boot.loader.grub.device = "/dev/sda";
+ boot.initrd.kernelModules = ["ata_piix"];
+
+ fileSystems = [
+ { mountPoint = "/";
+ label = "root";
+ }
+ { mountPoint = "/boot";
+ label = "boot";
+ }
+ ];
+
+ swapDevices = [
+ { label = "swap"; }
+ ];
+}
diff --git a/nixos/doc/config-examples/svn-server.nix b/nixos/doc/config-examples/svn-server.nix
new file mode 100644
index 0000000000000000000000000000000000000000..e727007117b1f7bb49b25fe913d7e3fa1720eca6
--- /dev/null
+++ b/nixos/doc/config-examples/svn-server.nix
@@ -0,0 +1,36 @@
+{
+ boot = {
+ loader.grub.device = "/dev/sda";
+ };
+
+ fileSystems = [
+ { mountPoint = "/";
+ device = "/dev/sda1";
+ }
+ ];
+
+ services = {
+
+ sshd = {
+ enable = true;
+ };
+
+ httpd = {
+ enable = true;
+ adminAddr = "admin@example.org";
+
+ subservices = {
+
+ subversion = {
+ enable = true;
+ dataDir = "/data/subversion";
+ notificationSender = "svn@example.org";
+ };
+
+ };
+
+ };
+
+ };
+
+}
diff --git a/nixos/doc/config-examples/x86_64-usbstick.nix b/nixos/doc/config-examples/x86_64-usbstick.nix
new file mode 100644
index 0000000000000000000000000000000000000000..374d3ba3bc74f4982425d96a2e26dd47d6b30034
--- /dev/null
+++ b/nixos/doc/config-examples/x86_64-usbstick.nix
@@ -0,0 +1,20 @@
+# Configuration file used to install NixOS-x86_64 on a USB stick.
+
+{
+ boot = {
+ loader.grub.device = "/dev/sda";
+ initrd = {
+ kernelModules = ["usb_storage" "ehci_hcd" "ohci_hcd"];
+ };
+ };
+
+ fileSystems = [
+ { mountPoint = "/";
+ label = "nixos-usb";
+ }
+ ];
+
+ fonts = {
+ enableFontConfig = false;
+ };
+}
diff --git a/nixos/doc/manual/configuration.xml b/nixos/doc/manual/configuration.xml
new file mode 100644
index 0000000000000000000000000000000000000000..e93c49d1ccec271441f674f78b6759507bde835a
--- /dev/null
+++ b/nixos/doc/manual/configuration.xml
@@ -0,0 +1,810 @@
+
+
+Configuring NixOS
+
+This chapter describes how to configure various aspects of a
+NixOS machine through the configuration file
+/etc/nixos/configuration.nix. As described in
+, changes to that file only take
+effect after you run nixos-rebuild.
+
+
+
+
+Package management
+
+This section describes how to add additional packages to your
+system. NixOS has two distinct styles of package management:
+
+
+
+ Declarative, where you declare
+ what packages you want in your
+ configuration.nix. Every time you run
+ nixos-rebuild, NixOS will ensure that you get a
+ consistent set of binaries corresponding to your
+ specification.
+
+ Ad hoc, where you install,
+ upgrade and uninstall packages via the nix-env
+ command. This style allows mixing packages from different Nixpkgs
+ versions. It’s the only choice for non-root
+ users.
+
+
+
+
+
+The next two sections describe these two styles.
+
+
+Declarative package management
+
+With declarative package management, you specify which packages
+you want on your system by setting the option
+. For instance, adding the
+following line to configuration.nix enables the
+Mozilla Thunderbird email application:
+
+
+environment.systemPackages = [ pkgs.thunderbird ];
+
+
+The effect of this specification is that the Thunderbird package from
+Nixpkgs will be built or downloaded as part of the system when you run
+nixos-rebuild switch.
+
+You can get a list of the available packages as follows:
+
+$ nix-env -qaP '*' --description
+nixos.pkgs.firefox firefox-23.0 Mozilla Firefox - the browser, reloaded
+...
+
+
+The first column in the output is the attribute
+name, such as
+nixos.pkgs.thunderbird. (The
+nixos prefix allows distinguishing between
+different channels that you might have.)
+
+To “uninstall” a package, simply remove it from
+ and run
+nixos-rebuild switch.
+
+
+Customising packages
+
+Some packages in Nixpkgs have options to enable or disable
+optional functionality or change other aspects of the package. For
+instance, the Firefox wrapper package (which provides Firefox with a
+set of plugins such as the Adobe Flash player) has an option to enable
+the Google Talk plugin. It can be set in
+configuration.nix as follows:
+
+
+nixpkgs.config.firefox.enableGoogleTalkPlugin = true;
+
+
+
+Unfortunately, Nixpkgs currently lacks a way to query
+available configuration options.
+
+Apart from high-level options, it’s possible to tweak a package
+in almost arbitrary ways, such as changing or disabling dependencies
+of a package. For instance, the Emacs package in Nixpkgs by default
+has a dependency on GTK+ 2. If you want to build it against GTK+ 3,
+you can specify that as follows:
+
+
+environment.systemPackages = [ (pkgs.emacs.override { gtk = pkgs.gtk3; }) ];
+
+
+The function override performs the call to the Nix
+function that produces Emacs, with the original arguments amended by
+the set of arguments specified by you. So here the function argument
+gtk gets the value pkgs.gtk3,
+causing Emacs to depend on GTK+ 3. (The parentheses are necessary
+because in Nix, function application binds more weakly than list
+construction, so without them,
+environment.systemPackages would be a list with two
+elements.)
+
+Even greater customisation is possible using the function
+overrideDerivation. While the
+override mechanism above overrides the arguments of
+a package function, overrideDerivation allows
+changing the result of the function. This
+permits changing any aspect of the package, such as the source code.
+For instance, if you want to override the source code of Emacs, you
+can say:
+
+
+environment.systemPackages =
+ [ (pkgs.lib.overrideDerivation pkgs.emacs (attrs: {
+ name = "emacs-25.0-pre";
+ src = /path/to/my/emacs/tree;
+ }))
+ ];
+
+
+Here, overrideDerivation takes the Nix derivation
+specified by pkgs.emacs and produces a new
+derivation in which the original’s name and
+src attribute have been replaced by the given
+values. The original attributes are accessible via
+attrs.
+
+The overrides shown above are not global. They do not affect
+the original package; other packages in Nixpkgs continue to depend on
+the original rather than the customised package. This means that if
+another package in your system depends on the original package, you
+end up with two instances of the package. If you want to have
+everything depend on your customised instance, you can apply a
+global override as follows:
+
+
+nixpkgs.config.packageOverrides = pkgs:
+ { emacs = pkgs.emacs.override { gtk = pkgs.gtk3; };
+ };
+
+
+The effect of this definition is essentially equivalent to modifying
+the emacs attribute in the Nixpkgs source tree.
+Any package in Nixpkgs that depends on emacs will
+be passed your customised instance. (However, the value
+pkgs.emacs in
+nixpkgs.config.packageOverrides refers to the
+original rather than overriden instance, to prevent an infinite
+recursion.)
+
+
+
+Adding custom packages
+
+It’s possible that a package you need is not available in NixOS.
+In that case, you can do two things. First, you can clone the Nixpkgs
+repository, add the package to your clone, and (optionally) submit a
+patch or pull request to have it accepted into the main Nixpkgs
+repository. This is described in detail in the Nixpkgs manual.
+In short, you clone Nixpkgs:
+
+
+$ git clone git://github.com/NixOS/nixpkgs.git
+$ cd nixpkgs
+
+
+Then you write and test the package as described in the Nixpkgs
+manual. Finally, you add it to
+environment.systemPackages, e.g.
+
+
+environment.systemPackages = [ pkgs.my-package ];
+
+
+and you run nixos-rebuild, specifying your own
+Nixpkgs tree:
+
+
+$ nixos-rebuild switch -I nixpkgs=/path/to/my/nixpkgs
+
+
+
+The second possibility is to add the package outside of the
+Nixpkgs tree. For instance, here is how you specify a build of the
+GNU Hello
+package directly in configuration.nix:
+
+
+environment.systemPackages =
+ let
+ my-hello = with pkgs; stdenv.mkDerivation rec {
+ name = "hello-2.8";
+ src = fetchurl {
+ url = "mirror://gnu/hello/${name}.tar.gz";
+ sha256 = "0wqd8sjmxfskrflaxywc7gqw7sfawrfvdxd9skxawzfgyy0pzdz6";
+ };
+ };
+ in
+ [ my-hello ];
+
+
+Of course, you can also move the definition of
+my-hello into a separate Nix expression, e.g.
+
+environment.systemPackages = [ (import ./my-hello.nix) ];
+
+where my-hello.nix contains:
+
+with <nixpkgs> {}; # bring all of Nixpkgs into scope
+
+stdenv.mkDerivation rec {
+ name = "hello-2.8";
+ src = fetchurl {
+ url = "mirror://gnu/hello/${name}.tar.gz";
+ sha256 = "0wqd8sjmxfskrflaxywc7gqw7sfawrfvdxd9skxawzfgyy0pzdz6";
+ };
+}
+
+
+This allows testing the package easily:
+
+$ nix-build my-hello.nix
+$ ./result/bin/hello
+Hello, world!
+
+
+
+
+
+
+
+
+
+Ad hoc package management
+
+With the command nix-env, you can install and
+uninstall packages from the command line. For instance, to install
+Mozilla Thunderbird:
+
+
+$ nix-env -iA nixos.pkgs.thunderbird
+
+If you invoke this as root, the package is installed in the Nix
+profile /nix/var/nix/profiles/default and visible
+to all users of the system; otherwise, the package ends up in
+/nix/var/nix/profiles/per-user/username/profile
+and is not visible to other users. The flag
+specifies the package by its attribute name; without it, the package
+is installed by matching against its package name
+(e.g. thunderbird). The latter is slower because
+it requires matching against all available Nix packages, and is
+ambiguous if there are multiple matching packages.
+
+Packages come from the NixOS channel. You typically upgrade a
+package by updating to the latest version of the NixOS channel:
+
+$ nix-channel --update nixos
+
+and then running nix-env -i again. Other packages
+in the profile are not affected; this is the
+crucial difference with the declarative style of package management,
+where running nixos-rebuild switch causes all
+packages to be updated to their current versions in the NixOS channel.
+You can however upgrade all packages for which there is a newer
+version by doing:
+
+$ nix-env -u '*'
+
+
+
+A package can be uninstalled using the
+flag:
+
+$ nix-env -e thunderbird
+
+
+
+Finally, you can roll back an undesirable
+nix-env action:
+
+$ nix-env --rollback
+
+
+
+nix-env has many more flags. For details,
+see the
+nix-env1
+manpage or the Nix manual.
+
+
+
+
+
+
+
+
+
+User management
+
+NixOS supports both declarative and imperative styles of user
+management. In the declarative style, users are specified in
+configuration.nix. For instance, the following
+states that a user account named alice shall exist:
+
+
+users.extraUsers.alice =
+ { createHome = true;
+ home = "/home/alice";
+ description = "Alice Foobar";
+ extraGroups = [ "wheel" ];
+ isSystemUser = false;
+ useDefaultShell = true;
+ openssh.authorizedKeys.keys = [ "ssh-dss AAAAB3Nza... alice@foobar" ];
+ };
+
+
+Note that alice is a member of the
+wheel group, which allows her to use
+sudo to execute commands as
+root. Also note the SSH public key that allows
+remote logins with the corresponding private key. Users created in
+this way do not have a password by default, so they cannot log in via
+mechanisms that require a password. However, you can use the
+passwd program to set a password, which is retained
+across invocations of nixos-rebuild.
+
+A user ID (uid) is assigned automatically. You can also specify
+a uid manually by adding
+
+
+ uid = 1000;
+
+
+to the user specification.
+
+Groups can be specified similarly. The following states that a
+group named students shall exist:
+
+
+users.extraGroups.students.gid = 1000;
+
+
+As with users, the group ID (gid) is optional and will be assigned
+automatically if it’s missing.
+
+Currently declarative user management is not perfect:
+nixos-rebuild does not know how to realise certain
+configuration changes. This includes removing a user or group, and
+removing group membership from a user.
+
+In the imperative style, users and groups are managed by
+commands such as useradd,
+groupmod and so on. For instance, to create a user
+account named alice:
+
+
+$ useradd -m alice
+
+The flag causes the creation of a home directory
+for the new user, which is generally what you want. The user does not
+have an initial password and therefore cannot log in. A password can
+be set using the passwd utility:
+
+
+$ passwd alice
+Enter new UNIX password: ***
+Retype new UNIX password: ***
+
+
+A user can be deleted using userdel:
+
+
+$ userdel -r alice
+
+The flag deletes the user’s home directory.
+Accounts can be modified using usermod. Unix
+groups can be managed using groupadd,
+groupmod and groupdel.
+
+
+
+
+
+
+File systems
+
+You can define file systems using the
+ configuration option. For instance, the
+following definition causes NixOS to mount the Ext4 file system on
+device /dev/disk/by-label/data onto the mount
+point /data:
+
+
+fileSystems."/data" =
+ { device = "/dev/disk/by-label/data";
+ fsType = "ext4";
+ };
+
+
+Mount points are created automatically if they don’t already exist.
+For , it’s best to use the topology-independent
+device aliases in /dev/disk/by-label and
+/dev/disk/by-uuid, as these don’t change if the
+topology changes (e.g. if a disk is moved to another IDE
+controller).
+
+You can usually omit the file system type
+(), since mount can usually
+detect the type and load the necessary kernel module automatically.
+However, if the file system is needed at early boot (in the initial
+ramdisk) and is not ext2, ext3
+or ext4, then it’s best to specify
+ to ensure that the kernel module is
+available.
+
+LUKS-encrypted file systems
+
+NixOS supports file systems that are encrypted using
+LUKS (Linux Unified Key Setup). For example,
+here is how you create an encrypted Ext4 file system on the device
+/dev/sda2:
+
+
+$ cryptsetup luksFormat /dev/sda2
+
+WARNING!
+========
+This will overwrite data on /dev/sda2 irrevocably.
+
+Are you sure? (Type uppercase yes): YES
+Enter LUKS passphrase: ***
+Verify passphrase: ***
+
+$ cryptsetup luksOpen /dev/sda2 crypted
+Enter passphrase for /dev/sda2: ***
+
+$ mkfs.ext4 /dev/mapper/crypted
+
+
+To ensure that this file system is automatically mounted at boot time
+as /, add the following to
+configuration.nix:
+
+
+boot.initrd.luks.devices = [ { device = "/dev/sda2"; name = "crypted"; } ];
+fileSystems."/".device = "/dev/mapper/crypted";
+
+
+
+
+
+
+
+
+
+
+
+X Window System
+
+The X Window System (X11) provides the basis of NixOS’ graphical
+user interface. It can be enabled as follows:
+
+services.xserver.enable = true;
+
+The X server will automatically detect and use the appropriate video
+driver from a set of X.org drivers (such as vesa
+and intel). You can also specify a driver
+manually, e.g.
+
+services.xserver.videoDrivers = [ "r128" ];
+
+to enable X.org’s xf86-video-r128 driver.
+
+You also need to enable at least one desktop or window manager.
+Otherwise, you can only log into a plain undecorated
+xterm window. Thus you should pick one or more of
+the following lines:
+
+services.xserver.desktopManager.kde4.enable = true;
+services.xserver.desktopManager.xfce.enable = true;
+services.xserver.windowManager.xmonad.enable = true;
+services.xserver.windowManager.twm.enable = true;
+services.xserver.windowManager.icewm.enable = true;
+
+
+
+NixOS’s default display manager (the
+program that provides a graphical login prompt and manages the X
+server) is SLiM. You can select KDE’s kdm instead:
+
+services.xserver.displayManager.kdm.enable = true;
+
+
+
+The X server is started automatically at boot time. If you
+don’t want this to happen, you can set:
+
+services.xserver.autorun = false;
+
+The X server can then be started manually:
+
+$ systemctl start display-manager.service
+
+
+
+
+NVIDIA graphics cards
+
+NVIDIA provides a proprietary driver for its graphics cards that
+has better 3D performance than the X.org drivers. It is not enabled
+by default because it’s not free software. You can enable it as follows:
+
+services.xserver.videoDrivers = [ "nvidia" ];
+
+You may need to reboot after enabling this driver to prevent a clash
+with other kernel modules.
+
+On 64-bit systems, if you want full acceleration for 32-bit
+programs such as Wine, you should also set the following:
+
+service.xserver.driSupport32Bit = true;
+
+
+
+
+
+
+Touchpads
+
+Support for Synaptics touchpads (found in many laptops such as
+the Dell Latitude series) can be enabled as follows:
+
+services.xserver.synaptics.enable = true;
+
+The driver has many options (see ). For
+instance, the following enables two-finger scrolling:
+
+services.xserver.synaptics.twoFingerScroll = true;
+
+
+
+
+
+
+
+
+
+
+
+Networking
+
+Secure shell access
+
+Secure shell (SSH) access to your machine can be enabled by
+setting:
+
+
+services.openssh.enable = true;
+
+
+By default, root logins using a password are disallowed. They can be
+disabled entirely by setting
+services.openssh.permitRootLogin to
+"no".
+
+You can declaratively specify authorised RSA/DSA public keys for
+a user as follows:
+
+
+
+users.extraUsers.alice.openssh.authorizedKeys.keys =
+ [ "ssh-dss AAAAB3NzaC1kc3MAAACBAPIkGWVEt4..." ];
+
+
+
+
+
+
+
+IPv4 configuration
+
+By default, NixOS uses DHCP (specifically,
+dhcpcd) to automatically configure network
+interfaces. However, you can configure an interface manually as
+follows:
+
+
+networking.interfaces.eth0 = { ipAddress = "192.168.1.2"; prefixLength = 24; };
+
+
+(The network prefix can also be specified using the option
+subnetMask,
+e.g. "255.255.255.0", but this is deprecated.)
+Typically you’ll also want to set a default gateway and set of name
+servers:
+
+
+networking.defaultGateway = "192.168.1.1";
+networking.nameservers = [ "8.8.8.8" ];
+
+
+
+
+Statically configured interfaces are set up by the systemd
+service
+interface-name-cfg.service.
+The default gateway and name server configuration is performed by
+network-setup.service.
+
+The host name is set using :
+
+
+networking.hostName = "cartman";
+
+
+The default host name is nixos. Set it to the
+empty string ("") to allow the DHCP server to
+provide the host name.
+
+
+
+
+IPv6 configuration
+
+IPv6 is enabled by default. Stateless address autoconfiguration
+is used to automatically assign IPv6 addresses to all interfaces. You
+can disable IPv6 support globally by setting:
+
+
+networking.enableIPv6 = false;
+
+
+
+
+
+
+
+Firewall
+
+NixOS has a simple stateful firewall that blocks incoming
+connections and other unexpected packets. The firewall applies to
+both IPv4 and IPv6 traffic. It can be enabled as follows:
+
+
+networking.firewall.enable = true;
+
+
+You can open specific TCP ports to the outside world:
+
+
+networking.firewall.allowedTCPPorts = [ 80 443 ];
+
+
+Note that TCP port 22 (ssh) is opened automatically if the SSH daemon
+is enabled (). UDP
+ports can be opened through
+. Also of
+interest is
+
+
+networking.firewall.allowPing = true;
+
+
+to allow the machine to respond to ping requests. (ICMPv6 pings are
+always allowed.)
+
+
+
+
+Wireless networks
+
+
+NixOS will start wpa_supplicant for you if you enable this setting:
+
+
+networking.wireless.enable = true;
+
+
+NixOS currently does not generate wpa_supplicant's
+configuration file, /etc/wpa_supplicant.conf. You should edit this file
+yourself to define wireless networks, WPA keys and so on (see
+wpa_supplicant.conf(5)).
+
+
+
+If you are using WPA2 the wpa_passphrase tool might be useful
+to generate the wpa_supplicant.conf.
+
+
+$ wpa_passphrase ESSID PSK > /etc/wpa_supplicant.conf
+
+After you have edited the wpa_supplicant.conf,
+you need to restart the wpa_supplicant service.
+
+
+$ systemctl restart wpa_supplicant.service
+
+
+
+
+
+
+Ad-hoc configuration
+
+You can use to specify
+shell commands to be run at the end of
+network-setup.service. This is useful for doing
+network configuration not covered by the existing NixOS modules. For
+instance, to statically configure an IPv6 address:
+
+
+networking.localCommands =
+ ''
+ ip -6 addr add 2001:610:685:1::1/64 dev eth0
+ '';
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Linux kernel
+
+You can override the Linux kernel and associated packages using
+the option . For instance, this
+selects the Linux 3.10 kernel:
+
+boot.kernelPackages = pkgs.linuxPackages_3_10;
+
+Note that this not only replaces the kernel, but also packages that
+are specific to the kernel version, such as the NVIDIA video drivers.
+This ensures that driver packages are consistent with the
+kernel.
+
+The default Linux kernel configuration should be fine for most
+users. You can see the configuration of your current kernel in
+/run/booted-system/kernel-modules/config. If you
+want to change the kernel configuration, you can use the
+ feature (see ). For instance, to enable
+support for the kernel debugger KGDB:
+
+
+nixpkgs.config.packageOverrides = pkgs:
+ { linux_3_4 = pkgs.linux_3_4.override {
+ extraConfig =
+ ''
+ KGDB y
+ '';
+ };
+ };
+
+
+extraConfig takes a list of Linux kernel
+configuration options, one per line. The name of the option should
+not include the prefix CONFIG_. The option value
+is typically y, n or
+m (to build something as a kernel module).
+
+Kernel modules for hardware devices are generally loaded
+automatically by udev. You can force a module to
+be loaded via , e.g.
+
+boot.kernelModules = [ "fuse" "kvm-intel" "coretemp" ];
+
+If the module is required early during the boot (e.g. to mount the
+root file system), you can use
+:
+
+boot.initrd.extraKernelModules = [ "cifs" ];
+
+This causes the specified modules and their dependencies to be added
+to the initial ramdark.
+
+Kernel runtime parameters can be set through
+, e.g.
+
+boot.kernel.sysctl."net.ipv4.tcp_keepalive_time" = 120;
+
+sets the kernel’s TCP keepalive time to 120 seconds. To see the
+available parameters, run sysctl -a.
+
+
+
+
+
+
+
+
diff --git a/nixos/doc/manual/default.nix b/nixos/doc/manual/default.nix
new file mode 100644
index 0000000000000000000000000000000000000000..56ad652c60edea929867471b4f763b1a8f4878b9
--- /dev/null
+++ b/nixos/doc/manual/default.nix
@@ -0,0 +1,100 @@
+{ pkgs, options
+# revision can have multiple values: local, HEAD or any revision number.
+, revision ? "HEAD"
+}:
+
+with pkgs.lib;
+
+let
+
+ # To prevent infinite recursion, remove system.path from the
+ # options. Not sure why this happens.
+ options_ =
+ options //
+ { system = removeAttrs options.system ["path"]; };
+
+ optionsXML = builtins.toFile "options.xml" (builtins.unsafeDiscardStringContext
+ (builtins.toXML (optionAttrSetToDocList options_)));
+
+ optionsDocBook = pkgs.runCommand "options-db.xml" {} ''
+ ${pkgs.libxslt}/bin/xsltproc \
+ --stringparam revision '${revision}' \
+ -o $out ${./options-to-docbook.xsl} ${optionsXML}
+ '';
+
+in rec {
+
+ # Generate the NixOS manual.
+ manual = pkgs.stdenv.mkDerivation {
+ name = "nixos-manual";
+
+ sources = sourceFilesBySuffices ./. [".xml"];
+
+ buildInputs = [ pkgs.libxml2 pkgs.libxslt ];
+
+ xsltFlags = ''
+ --param section.autolabel 1
+ --param section.label.includes.component.label 1
+ --param html.stylesheet 'style.css'
+ --param xref.with.number.and.title 1
+ --param toc.section.depth 3
+ --param admon.style '''
+ --param callout.graphics.extension '.gif'
+ '';
+
+ buildCommand = ''
+ ln -s $sources/*.xml . # */
+ ln -s ${optionsDocBook} options-db.xml
+
+ # Check the validity of the manual sources.
+ xmllint --noout --nonet --xinclude --noxincludenode \
+ --relaxng ${pkgs.docbook5}/xml/rng/docbook/docbook.rng \
+ manual.xml
+
+ # Generate the HTML manual.
+ dst=$out/share/doc/nixos
+ ensureDir $dst
+ xsltproc $xsltFlags --nonet --xinclude \
+ --output $dst/manual.html \
+ ${pkgs.docbook5_xsl}/xml/xsl/docbook/xhtml/docbook.xsl \
+ ./manual.xml
+
+ mkdir -p $dst/images/callouts
+ cp ${pkgs.docbook5_xsl}/xml/xsl/docbook/images/callouts/*.gif $dst/images/callouts/
+
+ cp ${./style.css} $dst/style.css
+
+ ensureDir $out/nix-support
+ echo "doc manual $dst manual.html" >> $out/nix-support/hydra-build-products
+ ''; # */
+ };
+
+ # Generate the NixOS manpages.
+ manpages = pkgs.stdenv.mkDerivation {
+ name = "nixos-manpages";
+
+ sources = sourceFilesBySuffices ./. [".xml"];
+
+ buildInputs = [ pkgs.libxml2 pkgs.libxslt ];
+
+ buildCommand = ''
+ ln -s $sources/*.xml . # */
+ ln -s ${optionsDocBook} options-db.xml
+
+ # Check the validity of the manual sources.
+ xmllint --noout --nonet --xinclude --noxincludenode \
+ --relaxng ${pkgs.docbook5}/xml/rng/docbook/docbook.rng \
+ ./man-pages.xml
+
+ # Generate manpages.
+ ensureDir $out/share/man
+ xsltproc --nonet --xinclude \
+ --param man.output.in.separate.dir 1 \
+ --param man.output.base.dir "'$out/share/man/'" \
+ --param man.endnotes.are.numbered 0 \
+ ${pkgs.docbook5_xsl}/xml/xsl/docbook/manpages/docbook.xsl \
+ ./man-pages.xml
+ '';
+ };
+
+}
diff --git a/nixos/doc/manual/development.xml b/nixos/doc/manual/development.xml
new file mode 100644
index 0000000000000000000000000000000000000000..7b4e6df5f878e6c84c1fd4f569a13e1b71f52252
--- /dev/null
+++ b/nixos/doc/manual/development.xml
@@ -0,0 +1,599 @@
+
+
+Development
+
+This chapter has some random notes on hacking on
+NixOS.
+
+
+
+
+
+
+Hacking on NixOS
+
+By default, NixOS’s nixos-rebuild command
+uses the NixOS and Nixpkgs sources provided by the
+nixos-unstable channel (kept in
+/nix/var/nix/profiles/per-user/root/channels/nixos).
+To modify NixOS, however, you should check out the latest sources from
+Git. This is done using the following command:
+
+
+$ nixos-checkout /my/sources
+
+
+or
+
+
+$ mkdir -p /my/sources
+$ cd /my/sources
+$ nix-env -i git
+$ git clone git://github.com/NixOS/nixos.git
+$ git clone git://github.com/NixOS/nixpkgs.git
+
+
+This will check out the latest NixOS sources to
+/my/sources/nixos and
+the Nixpkgs sources to
+/my/sources/nixpkgs.
+If you want to rebuild your system using your (modified) sources, you
+need to tell nixos-rebuild about them using the
+ flag:
+
+
+$ nixos-rebuild switch -I /my/sources
+
+
+
+
+nixos-rebuild affects only the system profile.
+To install packages to your user profile from expressions in
+/my/sources, use
+nix-env -f /my/sources/nixpkgs,
+or change the default by replacing the symlink in
+~/.nix-defexpr:
+
+
+$ rm -f ~/.nix-defexpr/channels
+$ ln -s /my/sources/nixpkgs ~/.nix-defexpr/nixpkgs
+
+
+
+
+You should not pass the base directory
+/my/sources
+to nix-env, as it will break after interpreting expressions
+in nixos/ as packages.
+
+
+
+
+
+
+
+
+Extending NixOS
+
+NixOS is based on a modular system for declarative configuration.
+ This system combines multiple modules to produce one
+ configuration. One of the module which compose your computer
+ configuration is /etc/nixos/configuration.nix. Other
+ modules are available under NixOS modules
+ directory
+
+A module is a file which handles one specific part of the
+ configuration. This part of the configuration could correspond to
+ hardware, a service, network settings, or preferences. A module
+ configuration does not have to handle everything from scratch, it can base
+ its configuration on other configurations provided by other modules. Thus
+ a module can define options to setup its
+ configuration, and it can also declare options to be
+ fed by other modules.
+
+
+
+A module is a file which contains a Nix
+ expression. This expression should be either an expression which gets
+ evaluated into an attribute set or a function which returns an attribute
+ set.
+
+When the expression is a function, it should expect only one argument
+ which is an attribute set containing an attribute
+ named config and another attribute
+ named pkgs. The config attribute
+ contains the result of the merge of all modules. This attribute is
+ evaluated lazily, such as any Nix expression. For more details on how
+ options are merged, see the details in .
+ The pkgs attribute
+ contains nixpkgs attribute set of packages. This
+ attribute is necessary for declaring options.
+
+Usual module content
+
+{ config, pkgs, ... }:
+
+{
+ imports =
+ [
+ ];
+
+ options = {
+
+ };
+
+ config = {
+
+ };
+}
+
+
+ Illustrates
+ a module skeleton.
+
+
+
+ This line makes the current Nix expression a function. This
+ line can be omitted if there is no reference to pkgs
+ and config inside the module.
+
+
+
+ This list is used to enumerate path to other modules which are
+ declaring options used by the current module. In NixOS, default modules
+ are listed in the file modules/module-list.nix.
+ The default modules don't need to be added in the import list.
+
+
+
+ This attribute set contains an attribute set of option
+ declaration.
+
+
+
+ This attribute set contains an attribute set of option
+ definitions. If the module does not have any imported
+ modules or any option declarations, then this attribute set can be used
+ in place of its parent attribute set. This is a common case for simple
+ modules such
+ as /etc/nixos/configuration.nix.
+
+
+
+
+
+
+
+A module defines a configuration which would be
+ interpreted by other modules. To define a configuration, a module needs
+ to provide option definitions. An option definition is a simple
+ attribute assignment.
+
+Option definitions are made in a declarative manner. Without
+ properties, options will always be defined with the same value. To
+ introduce more flexibility in the system, option definitions are guarded
+ by properties.
+
+Properties are means to introduce conditional values inside option
+ definitions. This conditional values can be distinguished in two
+ categories. The condition which are local to the current configuration
+ and conditions which are dependent on others configurations. Local
+ properties are mkIf
+ and mkAssert. Global properties
+ are mkOverride, mkDefault
+ and mkOrder.
+
+mkIf is used to remove the option definitions which
+ are below it if the condition is evaluated to
+ false. mkAssert expects the condition to be evaluated
+ to true otherwise it raises an error message.
+
+mkOverride is used to mask previous definitions if
+ the current value has a lower mask number. The mask value is 100 (default)
+ for any option definition which does not use this property.
+ Thus, mkDefault is just a short-cut with a higher mask
+ (1000) than the default mask value. This means that a module can set an
+ option definition as a preference, and still let another module defining
+ it with a different value without using any property.
+
+mkOrder is used to sort definitions based on the
+ rank number. The rank number will sort all options definitions before
+ giving the sorted list of option definition to the merge function defined
+ in the option declaration. A lower rank will move the definition to the
+ beginning and a higher rank will move the option toward the end. The
+ default rank is 100.
+
+
+
+A module may declare options which are used by
+ other module to change the configuration provided by the current module.
+ Changes to the option definitions are made with properties which are using
+ values extracted from the result of the merge of all modules
+ (the config argument).
+
+The config argument reproduce the same hierarchy of
+ all options declared in all modules. For each option, the result of the
+ option is available, it is either the default value or the merge of all
+ definitions of the option.
+
+Options are declared with the
+ function pkgs.lib.mkOption. This function expects an
+ attribute set which at least provides a description. A default value, an
+ example, a type, a merge function and a post-process function can be
+ added.
+
+Types are used to provide a merge strategy for options and to ensure
+ the type of each option definitions. They are defined
+ in pkgs.lib.types.
+
+The merge function expects a list of option definitions and merge
+ them to obtain one result of the same type.
+
+The post-process function (named apply) takes the
+ result of the merge or of the default value, and produce an output which
+ could have a different type than the type expected by the option.
+
+
+
+Locate Module Example
+
+{ config, pkgs, ... }:
+
+with pkgs.lib;
+
+let
+ cfg = config.services.locate;
+ locatedb = "/var/cache/locatedb";
+ logfile = "/var/log/updatedb";
+ cmd =''root updatedb --localuser=nobody --output=${locatedb} > ${logfile}'';
+in
+
+{
+ imports = [ /etc/nixos/nixos/modules/services/scheduling/cron.nix ];
+
+ options = {
+ services.locate = {
+ enable = mkOption {
+ default = false;
+ example = true;
+ type = with types; bool;
+ description = ''
+ If enabled, NixOS will periodically update the database of
+ files used by the locate command.
+ '';
+ };
+
+ period = mkOption {
+ default = "15 02 * * *";
+ type = with types; uniq string;
+ description = ''
+ This option defines (in the format used by cron) when the
+ locate database is updated.
+ The default is to update at 02:15 (at night) every day.
+ '';
+ };
+ };
+ };
+
+ config = mkIf cfg.enable {
+ services.cron = {
+ enable = true;
+ systemCronJobs = "${cfg.period} root ${cmd}";
+ };
+ };
+}
+
+
+ illustrates a module which handles
+ the regular update of the database which index all files on the file
+ system. This modules has option definitions to rely on the cron service
+ to run the command at predefined dates. In addition, this modules
+ provides option declarations to enable the indexing and to use different
+ period of time to run the indexing. Properties are used to prevent
+ ambiguous definitions of option (enable locate service and disable cron
+ services) and to ensure that no options would be defined if the locate
+ service is not enabled.
+
+
+
+
+
+
+
+
+Building specific parts of NixOS
+
+
+
+
+$ nix-build /etc/nixos/nixos -A attr
+
+where attr is an attribute in
+/etc/nixos/nixos/default.nix. Attributes of interest include:
+
+
+
+
+ config
+ The computer configuration generated from
+ the NIXOS_CONFIG environment variable (default
+ is /etc/nixos/configuration.nix) with the NixOS
+ default set of modules.
+
+
+
+ system
+ The derivation which build your computer system. It is
+ built by the command nixos-rebuild
+ build
+
+
+
+ vm
+ The derivation which build your computer system inside a
+ virtual machine. It is built by the command nixos-rebuild
+ build-vm
+
+
+
+
+
+
+Most parts of NixOS can be built through the config
+attribute set. This attribute set allows you to have a view of the merged
+option definitions and all its derivations. Important derivations are store
+inside the option and can be listed with the
+command nix-instantiate --xml --eval-only /etc/nixos/nixos -A
+config.system.build
+
+
+
+
+
+
+
+
+
+Building your own NixOS CD
+
+Building a NixOS CD is as easy as configuring your own computer. The
+idea is to use another module which will replace
+your configuration.nix to configure the system that
+would be installed on the CD.
+
+Default CD/DVD configurations are available
+inside nixos/modules/installer/cd-dvd. To build them
+you have to set NIXOS_CONFIG before
+running nix-build to build the ISO.
+
+
+$ export NIXOS_CONFIG=/etc/nixos/nixos/modules/installer/cd-dvd/installation-cd-minimal.nix
+$ nix-build /etc/nixos/nixos -A config.system.build.isoImage
+
+
+
+Before burning your CD/DVD, you can check the content of the image by mounting anywhere like
+suggested by the following command:
+
+
+$ mount -o loop -t iso9660 ./result/iso/cd.iso /mnt/iso
+
+
+
+
+
+
+
+
+
+
+Testing/building the NixOS Manual
+
+A quick way to see if your documentation improvements
+or option descriptions look good:
+
+
+$ nix-build -A config.system.build.manual
+
+
+
+
+
+
+
+
+
+
+Testing the installer
+
+Building, burning, and
+booting from an installation CD is rather
+tedious, so here is a quick way to see if the installer works
+properly:
+
+
+$ export NIXOS_CONFIG=/etc/nixos/nixos/modules/installer/cd-dvd/installation-cd-minimal.nix
+$ nix-build /etc/nixos/nixos -A config.system.build.nixos-install
+$ dd if=/dev/zero of=diskimage seek=2G count=0 bs=1
+$ yes | mke2fs -j diskimage
+$ mount -o loop diskimage /mnt
+$ ./result/bin/nixos-install
+
+
+
+
+
+
+
+
+
+
+
+Testing the initrd
+
+A quick way to test whether the kernel and the initial ramdisk
+boot correctly is to use QEMU’s and
+ options:
+
+
+$ nix-build /etc/nixos/nixos -A config.system.build.initialRamdisk -o initrd
+$ nix-build /etc/nixos/nixos -A config.system.build.kernel -o kernel
+$ qemu-system-x86_64 -kernel ./kernel/bzImage -initrd ./initrd/initrd -hda /dev/null
+
+
+
+
+
+
+
+
+ Whole-system testing using virtual machines
+
+
+ Complete NixOS GNU/Linux systems can be tested in virtual machines
+ (VMs). This makes it possible to test a system upgrade or
+ configuration change before rebooting into it, using the
+ nixos-rebuild build-vm or
+ nixos-rebuild build-vm-with-bootloader command.
+
+
+
+
+
+ The tests/ directory in the NixOS source tree
+ contains several whole-system unit tests.
+ These tests can be runNixOS tests can be run both from
+ NixOS and from a non-NixOS GNU/Linux distribution, provided the
+ Nix package manager is installed. from the NixOS
+ source tree as follows:
+
+
+$ nix-build tests/ -A nfs.test
+
+
+ This performs an automated test of the NFS client and server
+ functionality in the Linux kernel, including file locking
+ semantics (e.g., whether locks are maintained across server
+ crashes). It will first build or download all the dependencies of
+ the test (e.g., all packages needed to run a NixOS VM). The test
+ is defined in
+ tests/nfs.nix. If the test succeeds,
+ nix-build will place a symlink
+ ./result in the current directory pointing at
+ the location in the Nix store of the test results (e.g.,
+ screenshots, test reports, and so on). In particular, a
+ pretty-printed log of the test is written to
+ log.html, which can be viewed using a web
+ browser like this:
+
+
+$ firefox result/log.html
+
+
+
+
+ It is also possible to run the test environment interactively,
+ allowing you to experiment with the VMs. For example:
+
+
+$ nix-build tests/ -A nfs.driver
+$ ./result/bin/nixos-run-vms
+
+
+ The script nixos-run-vms starts the three
+ virtual machines defined in the NFS test using QEMU/KVM. The root
+ file system of the VMs is created on the fly and kept across VM
+ restarts in
+ ./hostname.qcow2.
+
+
+
+ Finally, the test itself can be run interactively. This is
+ particularly useful when developing or debugging a test:
+
+
+$ nix-build tests/ -A nfs.driver
+$ ./result/bin/nixos-test-driver
+starting VDE switch for network 1
+>
+
+
+ Perl statements can now be typed in to start or manipulate the
+ VMs:
+
+
+> startAll;
+(the VMs start booting)
+> $server->waitForJob("nfs-kernel-nfsd");
+> $client1->succeed("flock -x /data/lock -c 'sleep 100000' &");
+> $client2->fail("flock -n -s /data/lock true");
+> $client1->shutdown;
+(this releases client1's lock)
+> $client2->succeed("flock -n -s /data/lock true");
+
+
+ The function testScript executes the entire
+ test script and drops you back into the test driver command line
+ upon its completion. This allows you to inspect the state of the
+ VMs after the test (e.g. to debug the test script).
+
+
+
+ This and other tests are continuously run on the Hydra
+ instance at nixos.org, which allows
+ developers to be notified of any regressions introduced by a NixOS
+ or Nixpkgs change.
+
+
+
+ The actual Nix programming interface to VM testing is in NixOS,
+ under
+ lib/testing.nix. This file defines a
+ function which takes an attribute set containing a
+ nixpkgs attribute (the path to a Nixpkgs
+ checkout), and a system attribute (the system
+ type). It returns an attribute set containing several utility
+ functions, among which the main entry point is
+ makeTest.
+
+
+
+ The makeTest function takes a function similar to
+ that found in
+ tests/nfs.nix (discussed above). It
+ returns an attribute set containing (among others):
+
+
+
+
+ test
+ A derivation containing the test log as an HTML file,
+ as seen above, suitable for presentation in the Hydra continuous
+ build system.
+
+
+
+ report
+ A derivation containing a code coverage report, with
+ meta-data suitable for Hydra.
+
+
+
+ driver
+ A derivation containing scripts to run the VM test or
+ interact with the VM network interactively, as seen above.
+
+
+
+
+
+
+
+
+
diff --git a/nixos/doc/manual/installation.xml b/nixos/doc/manual/installation.xml
new file mode 100644
index 0000000000000000000000000000000000000000..3068fa5cb944c4cac2cf128b18a3e7bdc1db5ef5
--- /dev/null
+++ b/nixos/doc/manual/installation.xml
@@ -0,0 +1,340 @@
+
+
+Installing NixOS
+
+
+
+
+
+
+Obtaining NixOS
+
+NixOS ISO images can be downloaded from the NixOS
+homepage. These can be burned onto a CD. It is also possible
+to copy them onto a USB stick and install NixOS from there. For
+details, see the NixOS
+Wiki.
+
+
+
+
+
+
+
+
+Installation
+
+
+
+ Boot from the CD.
+
+ The CD contains a basic NixOS installation. (It
+ also contains Memtest86+, useful if you want to test new hardware.)
+ When it’s finished booting, it should have detected most of your
+ hardware and brought up networking (check
+ ifconfig). Networking is necessary for the
+ installer, since it will download lots of stuff (such as source
+ tarballs or Nixpkgs channel binaries). It’s best if you have a DHCP
+ server on your network. Otherwise configure networking manually
+ using ifconfig.
+
+ The NixOS manual is available on virtual console 8
+ (press Alt+F8 to access).
+
+ Login as root, empty
+ password.
+
+ If you downloaded the graphical ISO image, you can
+ run start display-manager to start KDE.
+
+ The NixOS installer doesn’t do any partitioning or
+ formatting yet, so you need to that yourself. Use the following
+ commands:
+
+
+
+ For partitioning:
+ fdisk.
+
+ For initialising Ext4 partitions:
+ mkfs.ext4. It is recommended that you assign a
+ unique symbolic label to the file system using the option
+ . This will
+ make the file system configuration independent from device
+ changes.
+
+ For creating swap partitions:
+ mkswap. Again it’s recommended to assign a
+ label to the swap partition: .
+
+ For creating LVM volumes, the LVM commands, e.g.,
+
+
+$ pvcreate /dev/sda1 /dev/sdb1
+$ vgcreate MyVolGroup /dev/sda1 /dev/sdb1
+$ lvcreate --size 2G --name bigdisk MyVolGroup
+$ lvcreate --size 1G --name smalldisk MyVolGroup
+
+
+
+ For creating software RAID devices, use
+ mdadm.
+
+
+
+
+
+ Mount the target file system on which NixOS should
+ be installed on /mnt.
+
+
+
+ You now need to create a file
+ /mnt/etc/nixos/configuration.nix that
+ specifies the intended configuration of the system. This is
+ because NixOS has a declarative configuration
+ model: you create or edit a description of the configuration that
+ you want to be built and activated, and then NixOS takes care of
+ realising that configuration. The command
+ nixos-option can generate an initial
+ configuration file for you:
+
+
+$ nixos-option --install
+
+ It tries to figure out the kernel modules necessary for mounting
+ the root device, as well as various other hardware
+ characteristics. However, it doesn’t try to figure out the
+ option yet.
+
+ You should edit
+ /mnt/etc/nixos/configuration.nix to suit your
+ needs. The text editors nano and
+ vim are available.
+
+ You need to specify a root file system in
+ and the target device for the Grub boot
+ loader in . See
+ for a list of the available configuration
+ options.
+
+ It is very important that you specify in the option
+ all kernel modules that
+ are necessary for mounting the root file system, otherwise the
+ installed system will not be able to boot. (If this happens, boot
+ from the CD again, mount the target file system on
+ /mnt, fix
+ /mnt/etc/nixos/configuration.nix and rerun
+ nixos-install.) In most cases,
+ nixos-option --install will figure out the
+ required modules.
+
+ Examples of real-world NixOS configuration files can be
+ found at .
+
+
+
+ If your machine has a limited amount of memory, you
+ may want to activate swap devices now (swapon
+ device). The installer (or
+ rather, the build actions that it may spawn) may need quite a bit of
+ RAM, depending on your configuration.
+
+
+
+ Do the installation:
+
+
+$ nixos-install
+
+ Cross fingers.
+
+ If everything went well:
+
+
+$ reboot
+
+
+
+
+
+ You should now be able to boot into the installed NixOS.
+ The Grub boot menu shows a list of available
+ configurations (initially just one). Every time you
+ change the NixOS configuration (see ), a new item appears in the menu.
+ This allows you to easily roll back to another configuration if
+ something goes wrong.
+
+ You should log in and change the root
+ password with passwd.
+
+ You’ll probably want to create some user accounts as well,
+ which can be done with useradd:
+
+
+$ useradd -c 'Eelco Dolstra' -m eelco
+$ passwd eelco
+
+
+
+ You may also want to install some software. For instance,
+
+
+$ nix-env -qa \*
+
+ shows what packages are available, and
+
+
+$ nix-env -i w3m
+
+ install the w3m browser.
+
+
+
+
+
+ shows a typical sequence
+of commands for installing NixOS on an empty hard drive (here
+/dev/sda). shows a
+corresponding configuration Nix expression.
+
+Commands for installing NixOS on /dev/sda
+
+$ fdisk /dev/sda (or whatever device you want to install on)
+$ mkfs.ext4 -L nixos /dev/sda1 (idem)
+$ mkswap -L swap /dev/sda2 (idem)
+$ mount LABEL=nixos /mnt
+$ nixos-option --install
+$ nano /mnt/etc/nixos/configuration.nix
+(in particular, set the fileSystems and swapDevices options)
+$ nixos-install
+$ reboot
+
+
+NixOS configuration
+
+{
+ boot.loader.grub.device = "/dev/sda";
+
+ fileSystems."/".device = "/dev/disk/by-label/nixos";
+
+ swapDevices =
+ [ { device = "/dev/disk/by-label/swap"; } ];
+
+ services.sshd.enable = true;
+}
+
+
+
+
+
+
+
+
+
+
+Changing the configuration
+
+The file /etc/nixos/configuration.nix
+contains the current configuration of your machine. Whenever you’ve
+changed something to that file, you should do
+
+
+$ nixos-rebuild switch
+
+to build the new configuration, make it the default configuration for
+booting, and try to realise the configuration in the running system
+(e.g., by restarting system services).
+
+You can also do
+
+
+$ nixos-rebuild test
+
+to build the configuration and switch the running system to it, but
+without making it the boot default. So if (say) the configuration
+locks up your machine, you can just reboot to get back to a working
+configuration.
+
+There is also
+
+
+$ nixos-rebuild boot
+
+to build the configuration and make it the boot default, but not
+switch to it now (so it will only take effect after the next
+reboot).
+
+Finally, you can do
+
+
+$ nixos-rebuild build
+
+to build the configuration but nothing more. This is useful to see
+whether everything compiles cleanly.
+
+If you have a machine that supports hardware virtualisation, you
+can also test the new configuration in a sandbox by building and
+running a virtual machine that contains the
+desired configuration. Just do
+
+
+$ nixos-rebuild build-vm
+$ ./result/bin/run-*-vm
+
+
+The VM does not have use any data from your host system, so your
+existing user accounts and home directories will not be
+available.
+
+
+
+
+
+
+
+
+
+Upgrading NixOS
+
+The best way to keep your NixOS installation up to date is to
+use the nixos-unstable channel. (A channel is a
+Nix mechanism for distributing Nix expressions and associated
+binaries.) The NixOS channel is updated automatically from NixOS’s
+Git repository after running certain tests and building most
+packages.
+
+NixOS automatically subscribes you to the NixOS channel. If for
+some reason this is not the case, just do
+
+
+$ nix-channel --add http://nixos.org/channels/nixos-unstable
+
+
+You can then upgrade NixOS to the latest version in the channel by
+running
+
+
+$ nix-channel --update nixos
+
+
+and running the nixos-rebuild command as described
+in .
+
+
+
+
diff --git a/nixos/doc/manual/man-configuration.xml b/nixos/doc/manual/man-configuration.xml
new file mode 100644
index 0000000000000000000000000000000000000000..d49369d2c584d4d568eb162a40dc2e9194df9ce9
--- /dev/null
+++ b/nixos/doc/manual/man-configuration.xml
@@ -0,0 +1,38 @@
+
+
+
+ configuration.nix
+ 5
+ NixOS
+
+
+
+
+ configuration.nix
+ NixOS system configuration specification
+
+
+
+Description
+
+The file /etc/nixos/configuration.nix
+contains the declarative specification of your NixOS system
+configuration. The command nixos-rebuild takes
+this file and realises the system configuration specified
+therein.
+
+
+
+
+Options
+
+You can use the following options in
+configuration.nix.
+
+
+
+
+
+
diff --git a/nixos/doc/manual/man-nixos-build-vms.xml b/nixos/doc/manual/man-nixos-build-vms.xml
new file mode 100644
index 0000000000000000000000000000000000000000..f37677629d0ce9852396f7f8bf31b5982f8c748c
--- /dev/null
+++ b/nixos/doc/manual/man-nixos-build-vms.xml
@@ -0,0 +1,110 @@
+
+
+
+ nixos-build-vms
+ 8
+ NixOS
+
+
+
+
+ nixos-build-vms
+ build a network of virtual machines from a network of NixOS configurations
+
+
+
+
+ nixos-build-vms
+
+
+
+ network.nix
+
+
+
+Description
+
+This command builds a network of QEMU-KVM virtual machines of a Nix expression
+specifying a network of NixOS machines. The virtual network can be started by
+executing the bin/run-vms shell script that is generated by
+this command. By default, a result symlink is produced that
+points to the generated virtual network.
+
+
+A network Nix expression has the following structure:
+
+
+{
+ test1 = {pkgs, config, ...}:
+ {
+ services.openssh.enable = true;
+ nixpkgs.system = "i686-linux";
+ deployment.targetHost = "test1.example.net";
+
+ # Other NixOS options
+ };
+
+ test2 = {pkgs, config, ...}:
+ {
+ services.openssh.enable = true;
+ services.httpd.enable = true;
+ environment.systemPackages = [ pkgs.lynx ];
+ nixpkgs.system = "x86_64-linux";
+ deployment.targetHost = "test2.example.net";
+
+ # Other NixOS options
+ };
+}
+
+
+Each attribute in the expression represents a machine in the network
+(e.g. test1 and test2)
+referring to a function defining a NixOS configuration.
+In each NixOS configuration, two attributes have a special meaning.
+The deployment.targetHost specifies the address
+(domain name or IP address)
+of the system which is used by ssh to perform
+remote deployment operations. The nixpkgs.system
+attribute can be used to specify an architecture for the target machine,
+such as i686-linux which builds a 32-bit NixOS
+configuration. Omitting this property will build the configuration
+for the same architecture as the host system.
+
+
+
+
+Options
+
+This command accepts the following options:
+
+
+
+
+
+
+ Shows a trace of the output.
+
+
+
+
+
+
+ Do not create a 'result' symlink.
+
+
+
+
+ ,
+
+ Shows the usage of this command to the user.
+
+
+
+
+
+
+
+
+
diff --git a/nixos/doc/manual/man-nixos-generate-config.xml b/nixos/doc/manual/man-nixos-generate-config.xml
new file mode 100644
index 0000000000000000000000000000000000000000..ff69d8d91701a91f0c6afc6a8a94896cbed9adf3
--- /dev/null
+++ b/nixos/doc/manual/man-nixos-generate-config.xml
@@ -0,0 +1,191 @@
+
+
+
+ nixos-generate-config
+ 8
+ NixOS
+
+
+
+
+ nixos-generate-config
+ generate NixOS configuration modules
+
+
+
+
+ nixos-generate-config
+
+
+
+ root
+
+
+
+ dir
+
+
+
+
+
+Description
+
+This command writes two NixOS configuration modules:
+
+
+
+
+
+
+ This module sets NixOS configuration options based on your
+ current hardware configuration. In particular, it sets the
+ option to reflect all currently
+ mounted file systems, the option to
+ reflect active swap devices, and the
+ options to ensure that the
+ initial ramdisk contains any kernel modules necessary for
+ mounting the root file system.
+
+ If this file already exists, it is overwritten. Thus, you
+ should not modify it manually. Rather, you should include it
+ from your /etc/nixos/configuration.nix, and
+ re-run nixos-generate-config to update it
+ whenever your hardware configuration changes.
+
+
+
+
+
+
+ This is the main NixOS system configuration module. If it
+ already exists, it’s left unchanged. Otherwise,
+ nixos-generate-config will write a template
+ for you to customise.
+
+
+
+
+
+
+
+
+
+
+Options
+
+This command accepts the following options:
+
+
+
+
+
+
+ If this option is given, treat the directory
+ root as the root of the file system.
+ This means that configuration files will be written to
+ root/etc/nixos,
+ and that any file systems outside of
+ root are ignored for the purpose of
+ generating the option.
+
+
+
+
+
+
+ If this option is given, write the configuration files to
+ the directory dir instead of
+ /etc/nixos.
+
+
+
+
+
+
+ Overwrite
+ /etc/nixos/configuration.nix if it already
+ exists.
+
+
+
+
+
+
+
+
+Examples
+
+This command is typically used during NixOS installation to
+write initial configuration modules. For example, if you created and
+mounted the target file systems on /mnt and
+/mnt/boot, you would run:
+
+
+$ nixos-generate-config --root /mnt
+
+
+The resulting file
+/mnt/etc/nixos/hardware-configuration.nix might
+look like this:
+
+
+# Do not modify this file! It was generated by ‘nixos-generate-config’
+# and may be overwritten by future invocations. Please make changes
+# to /etc/nixos/configuration.nix instead.
+{ config, pkgs, ... }:
+
+{
+ imports =
+ [ <nixos/modules/installer/scan/not-detected.nix>
+ ];
+
+ boot.initrd.availableKernelModules = [ "ehci_hcd" "ahci" ];
+ boot.kernelModules = [ "kvm-intel" ];
+ boot.extraModulePackages = [ ];
+
+ fileSystems."/" =
+ { device = "/dev/disk/by-label/nixos";
+ fsType = "ext3";
+ options = "rw,data=ordered,relatime";
+ };
+
+ fileSystems."/boot" =
+ { device = "/dev/sda1";
+ fsType = "ext3";
+ options = "rw,errors=continue,user_xattr,acl,barrier=1,data=writeback,relatime";
+ };
+
+ swapDevices =
+ [ { device = "/dev/sda2"; }
+ ];
+
+ nix.maxJobs = 8;
+}
+
+
+It will also create a basic
+/mnt/etc/nixos/configuration.nix, which you
+should edit to customise the logical configuration of your system.
+This file includes the result of the hardware scan as follows:
+
+
+ imports = [ ./hardware-configuration.nix ];
+
+
+
+After installation, if your hardware configuration changes, you
+can run:
+
+
+$ nixos-generate-config
+
+
+to update /etc/nixos/hardware-configuration.nix.
+Your /etc/nixos/configuration.nix will
+not be overwritten.
+
+
+
+
diff --git a/nixos/doc/manual/man-nixos-install.xml b/nixos/doc/manual/man-nixos-install.xml
new file mode 100644
index 0000000000000000000000000000000000000000..d5157859857b70dd27443399af39d08fa9d54892
--- /dev/null
+++ b/nixos/doc/manual/man-nixos-install.xml
@@ -0,0 +1,78 @@
+
+
+
+ nixos-install
+ 8
+ NixOS
+
+
+
+
+ nixos-install
+ install NixOS
+
+
+
+
+ nixos-install
+
+
+
+
+Description
+
+This command installs NixOS in the file system mounted on
+/mnt, based on the NixOS configuration specified
+in /mnt/etc/nixos/configuration.nix. It performs
+the following steps:
+
+
+
+ It copies Nix and its dependencies to
+ /mnt/nix/store.
+
+ It runs Nix in /mnt to build
+ the NixOS configuration specified in
+ /mnt/etc/nixos/configuration.nix.
+
+ It installs the GRUB boot loader on the device
+ specified in the option ,
+ and generates a GRUB configuration file that boots into the NixOS
+ configuration just installed.
+
+
+
+
+
+This command is idempotent: if it is interrupted or fails due to
+a temporary problem (e.g. a network issue), you can safely re-run
+it.
+
+
+
+
+Examples
+
+A typical NixOS installation is done by creating and mounting a
+file system on /mnt, generating a NixOS
+configuration in
+/mnt/etc/nixos/configuration.nix, and running
+nixos-install. For instance, if we want to install
+NixOS on an ext4 file system created in
+/dev/sda1:
+
+
+$ mkfs.ext4 /dev/sda1
+$ mount /dev/sda1 /mnt
+$ nixos-generate-config --root /mnt
+$ # edit /mnt/etc/nixos/configuration.nix
+$ nixos-install
+
+
+
+
+
+
+
diff --git a/nixos/doc/manual/man-nixos-option.xml b/nixos/doc/manual/man-nixos-option.xml
new file mode 100644
index 0000000000000000000000000000000000000000..bd180363e70d5ed69f97edc173e26db4cc357795
--- /dev/null
+++ b/nixos/doc/manual/man-nixos-option.xml
@@ -0,0 +1,138 @@
+
+
+
+ nixos-option
+ 8
+ NixOS
+
+
+
+
+ nixos-option
+ inspect a NixOS configuration
+
+
+
+
+ nixos-option
+
+
+
+
+
+ option.name
+
+
+
+
+Description
+
+This command evaluates the configuration specified in
+/etc/nixos/configuration.nix and returns the properties
+of the option name given as argument. By default, it returns the value of
+the option.
+
+When the option name is not an option, the command prints the list of
+attributes contained in the attribute set.
+
+
+
+Options
+
+This command accepts the following options:
+
+
+
+
+ ,
+
+ Returns the value of the option. This is the default operation
+ if no other options are defined.
+
+
+
+
+ ,
+
+ Return the default value, the example and the description of the
+ option when available.
+
+
+
+
+ ,
+
+ Return the locations where the option is declared and where it
+ is defined. This is extremely useful to find sources of errors in
+ your configuration.
+
+
+
+
+
+
+
+
+Environment
+
+
+
+
+ NIXOS_CONFIG
+
+ Path to the main NixOS configuration module. Defaults to
+ /etc/nixos/configuration.nix.
+
+
+
+
+
+
+
+
+Examples
+
+Investigate option values:
+
+$ nixos-option boot.loader
+This attribute set contains:
+generationsDir
+grub
+initScript
+
+$ nixos-option boot.loader.grub.enable
+true
+
+Prints option information:
+
+$ nixos-option -d networking.hostName
+Default: "nixos"
+Description:
+The name of the machine. Leave it empty if you want to obtain
+it from a DHCP server (if using DHCP).
+
+Find the locations which are declaring and defining an option:
+
+$ nixos-option -l hardware.firmware
+Declared by:
+ /mnt/data/nix-sources/nixos/modules/services/hardware/udev.nix
+
+Defined by:
+ /etc/nixos/nixos/modules/system/boot/kernel.nix
+ /etc/nixos/nixos/modules/hardware/network/rt73.nix
+ /etc/nixos/nixos/modules/hardware/network/intel-3945abg.nix
+ /etc/nixos/nixos/modules/hardware/network/intel-2200bg.nix
+
+
+
+Bugs
+
+The author listed in the following section is wrong. If there is any
+ other bug, please report to Nicolas Pierron.
+
+
+
+
+
diff --git a/nixos/doc/manual/man-nixos-rebuild.xml b/nixos/doc/manual/man-nixos-rebuild.xml
new file mode 100644
index 0000000000000000000000000000000000000000..e08153c723d914d69b32f8a9e12f78f3d3725d37
--- /dev/null
+++ b/nixos/doc/manual/man-nixos-rebuild.xml
@@ -0,0 +1,335 @@
+
+
+
+ nixos-rebuild
+ 8
+ NixOS
+
+
+
+
+ nixos-rebuild
+ reconfigure a NixOS machine
+
+
+
+
+ nixos-rebuild
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ name
+
+
+
+
+
+
+
+Description
+
+This command updates the system so that it corresponds to the
+configuration specified in
+/etc/nixos/configuration.nix. Thus, every time
+you modify /etc/nixos/configuration.nix or any
+NixOS module, you must run nixos-rebuild to make
+the changes take effect. It builds the new system in
+/nix/store, runs its activation script, and stop
+and (re)starts any system services if needed.
+
+This command has one required argument, which specifies the
+desired operation. It must be one of the following:
+
+
+
+
+
+
+ Build and activate the new configuration, and make it the
+ boot default. That is, the configuration is added to the GRUB
+ boot menu as the default meny entry, so that subsequent reboots
+ will boot the system into the new configuration. Previous
+ configurations activated with nixos-rebuild
+ switch or nixos-rebuild boot remain
+ available in the GRUB menu.
+
+
+
+
+
+
+ Build the new configuration and make it the boot default
+ (as with nixos-rebuild switch), but do not
+ activate it. That is, the system continues to run the previous
+ configuration until the next reboot.
+
+
+
+
+
+
+ Build and activate the new configuration, but do not add
+ it to the GRUB boot menu. Thus, if you reboot the system (or if
+ it crashes), you will automatically revert to the default
+ configuration (i.e. the configuration resulting from the last
+ call to nixos-rebuild switch or
+ nixos-rebuild boot).
+
+
+
+
+
+
+ Build the new configuration, but neither activate it nor
+ add it to the GRUB boot menu. It leaves a symlink named
+ result in the current directory, which
+ points to the output of the top-level “system” derivation. This
+ is essentially the same as doing
+
+$ nix-build /etc/nixos/nixos -A system
+
+ Note that you do not need to be root to run
+ nixos-rebuild build.
+
+
+
+
+
+
+ Simply show what store paths would be built or downloaded
+ by any of the operations above.
+
+
+
+
+
+
+ Build a script that starts a NixOS virtual machine with
+ the desired configuration. It leaves a symlink
+ result in the current directory that points
+ (under
+ result/bin/run-hostname-vm)
+ at the script that starts the VM. Thus, to test a NixOS
+ configuration in a virtual machine, you should do the following:
+
+$ nixos-rebuild build-vm
+$ ./result/bin/run-*-vm
+
+
+ The VM is implemented using the qemu
+ package. For best performance, you should load the
+ kvm-intel or kvm-amd
+ kernel modules to get hardware virtualisation.
+
+ The VM mounts the Nix store of the host through the 9P
+ file system. The host Nix store is read-only, so Nix commands
+ that modify the Nix store will not work in the VM. This
+ includes commands such as nixos-rebuild; to
+ change the VM’s configuration, you must halt the VM and re-run
+ the commands above.
+
+
+ The VM has its own ext3 root file
+ system, which is automatically created when the VM is first
+ started, and is persistent across reboots of the VM. It is
+ stored in
+ ./hostname.qcow2.
+
+
+
+
+
+
+
+ Like , but boots using the
+ regular boot loader of your configuration (e.g., GRUB 1 or 2),
+ rather than booting directly into the kernel and initial ramdisk
+ of the system. This allows you to test whether the boot loader
+ works correctly. However, it does not guarantee that your NixOS
+ configuration will boot successfully on the host hardware (i.e.,
+ after running nixos-rebuild switch), because
+ the hardware and boot loader configuration in the VM are
+ different. The boot loader is installed on an automatically
+ generated virtual disk containing a /boot
+ partition, which is mounted read-only in the VM.
+
+
+
+
+
+
+
+
+
+
+
+Options
+
+This command accepts the following options:
+
+
+
+
+
+
+ Fetch the latest version of NixOS from the NixOS
+ channel.
+
+
+
+
+
+
+ Causes the GRUB boot loader to be (re)installed on the
+ device specified by the
+ boot.loader.grub.device configuration
+ option.
+
+
+
+
+
+
+ Normally, nixos-rebuild first builds
+ the nixUnstable attribute in Nixpkgs, and
+ uses the resulting instance of the Nix package manager to build
+ the new system configuration. This is necessary if the NixOS
+ modules use features not provided by the currently installed
+ version of Nix. This option disables building a new Nix.
+
+
+
+
+
+
+ Equivalent to
+ . This option is useful if you
+ call nixos-rebuild frequently (e.g. if you’re
+ hacking on a NixOS module).
+
+
+
+
+
+
+ Instead of building a new configuration as specified by
+ /etc/nixos/configuration.nix, roll back to
+ the previous configuration. (The previous configuration is
+ defined as the one before the “current” generation of the
+ Nix profile /nix/var/nix/profiles/system.)
+
+
+
+
+
+
+
+ Instead of using the Nix profile
+ /nix/var/nix/profiles/system to keep track
+ of the current and previous system configurations, use
+ /nix/var/nix/profiles/system-profiles/name.
+ When you use GRUB 2, for every system profile created with this
+ flag, NixOS will create a submenu named “NixOS - Profile
+ 'name'” in GRUB’s boot menu,
+ containing the current and previous configurations of this
+ profile.
+
+ For instance, if you want to test a configuration file
+ named test.nix without affecting the
+ default system profile, you would do:
+
+
+$ nixos-rebuild switch -p test -I nixos-config=./test.nix
+
+
+ The new configuration will appear in the GRUB 2 submenu “NixOS - Profile
+ 'test'”.
+
+
+
+
+
+In addition, nixos-rebuild accepts various
+Nix-related flags, including /
+, ,
+, and
+ / . See
+the Nix manual for details.
+
+
+
+
+Environment
+
+
+
+
+ NIXOS_CONFIG
+
+ Path to the main NixOS configuration module. Defaults to
+ /etc/nixos/configuration.nix.
+
+
+
+
+
+
+
+
+Files
+
+
+
+
+ /run/current-system
+
+ A symlink to the currently active system configuration in
+ the Nix store.
+
+
+
+
+ /nix/var/nix/profiles/system
+
+ The Nix profile that contains the current and previous
+ system configurations. Used to generate the GRUB boot
+ menu.
+
+
+
+
+
+
+
+
+Bugs
+
+This command should be renamed to something more
+descriptive.
+
+
+
+
+
+
diff --git a/nixos/doc/manual/man-pages.xml b/nixos/doc/manual/man-pages.xml
new file mode 100644
index 0000000000000000000000000000000000000000..467864e208bd26f543d55b4490c7557010d44974
--- /dev/null
+++ b/nixos/doc/manual/man-pages.xml
@@ -0,0 +1,31 @@
+
+
+ NixOS Reference Pages
+
+
+
+
+
+ Eelco
+ Dolstra
+
+ Author
+
+
+
+ 2007-2013
+ Eelco Dolstra
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/nixos/doc/manual/manual.xml b/nixos/doc/manual/manual.xml
new file mode 100644
index 0000000000000000000000000000000000000000..7d6634bf0931815501cfec4dc76d029b703d14a2
--- /dev/null
+++ b/nixos/doc/manual/manual.xml
@@ -0,0 +1,62 @@
+
+
+
+
+ NixOS Manual
+
+
+
+ Eelco
+ Dolstra
+
+
+
+
+
+ Nicolas
+ Pierron
+
+
+
+
+ 2007-2013
+ Eelco Dolstra
+
+
+
+
+
+
+ Preface
+
+ This manual describes how to install, use and extend NixOS,
+ a Linux distribution based on the purely functional package
+ management system Nix.
+
+ If you encounter problems, please report them on the
+ nix-dev@lists.science.uu.nl
+ mailing list or on the
+ #nixos channel on Freenode. Bugs should
+ be reported in NixOS’ GitHub
+ issue tracker.
+
+
+
+
+
+
+
+
+
+
+
+ List of Options
+
+
+
+
diff --git a/nixos/doc/manual/options-to-docbook.xsl b/nixos/doc/manual/options-to-docbook.xsl
new file mode 100644
index 0000000000000000000000000000000000000000..adc6c93c72233f5c93b9162759f6855922fcee71
--- /dev/null
+++ b/nixos/doc/manual/options-to-docbook.xsl
@@ -0,0 +1,187 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Default:
+
+
+
+
+
+
+
+
+ none
+
+
+
+
+
+
+
+ Example:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Declared by:
+
+
+
+
+
+
+ Defined by:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ""
+
+
+
+
+
+
+
+
+
+ true
+
+
+
+
+ false
+
+
+
+
+ [
+
+
+
+
+ ]
+
+
+
+
+ {
+
+
+ =
+ ;
+
+ }
+
+
+
+
+
+
+ (download of )
+
+
+ (build of )
+
+
+
+
+
+
+
+
+
+
+
+ https://github.com/NixOS/nixos/blob//modules/
+
+
+ https://github.com/NixOS/nixops/blob//nix/
+
+
+ file://
+
+
+
+
+
+ <nixos/modules/>
+
+
+ <nixops/>
+
+
+
+
+
+
+
+
+
+
+
diff --git a/nixos/doc/manual/running.xml b/nixos/doc/manual/running.xml
new file mode 100644
index 0000000000000000000000000000000000000000..e50099707cc539a150fcabafd33b3d948c4bb77b
--- /dev/null
+++ b/nixos/doc/manual/running.xml
@@ -0,0 +1,369 @@
+
+
+Running NixOS
+
+This chapter describes various aspects of managing a running
+NixOS system, such as how to use the systemd
+service manager.
+
+
+
+
+Service management
+
+In NixOS, all system services are started and monitored using
+the systemd program. Systemd is the “init” process of the system
+(i.e. PID 1), the parent of all other processes. It manages a set of
+so-called “units”, which can be things like system services
+(programs), but also mount points, swap files, devices, targets
+(groups of units) and more. Units can have complex dependencies; for
+instance, one unit can require that another unit must be successfully
+started before the first unit can be started. When the system boots,
+it starts a unit named default.target; the
+dependencies of this unit cause all system services to be started,
+file systems to be mounted, swap files to be activated, and so
+on.
+
+The command systemctl is the main way to
+interact with systemd. Without any arguments, it
+shows the status of active units:
+
+
+$ systemctl
+-.mount loaded active mounted /
+swapfile.swap loaded active active /swapfile
+sshd.service loaded active running SSH Daemon
+graphical.target loaded active active Graphical Interface
+...
+
+
+
+
+You can ask for detailed status information about a unit, for
+instance, the PostgreSQL database service:
+
+
+$ systemctl status postgresql.service
+postgresql.service - PostgreSQL Server
+ Loaded: loaded (/nix/store/pn3q73mvh75gsrl8w7fdlfk3fq5qm5mw-unit/postgresql.service)
+ Active: active (running) since Mon, 2013-01-07 15:55:57 CET; 9h ago
+ Main PID: 2390 (postgres)
+ CGroup: name=systemd:/system/postgresql.service
+ ├─2390 postgres
+ ├─2418 postgres: writer process
+ ├─2419 postgres: wal writer process
+ ├─2420 postgres: autovacuum launcher process
+ ├─2421 postgres: stats collector process
+ └─2498 postgres: zabbix zabbix [local] idle
+
+Jan 07 15:55:55 hagbard postgres[2394]: [1-1] LOG: database system was shut down at 2013-01-07 15:55:05 CET
+Jan 07 15:55:57 hagbard postgres[2390]: [1-1] LOG: database system is ready to accept connections
+Jan 07 15:55:57 hagbard postgres[2420]: [1-1] LOG: autovacuum launcher started
+Jan 07 15:55:57 hagbard systemd[1]: Started PostgreSQL Server.
+
+
+Note that this shows the status of the unit (active and running), all
+the processes belonging to the service, as well as the most recent log
+messages from the service.
+
+
+
+Units can be stopped, started or restarted:
+
+
+$ systemctl stop postgresql.service
+$ systemctl start postgresql.service
+$ systemctl restart postgresql.service
+
+
+These operations are synchronous: they wait until the service has
+finished starting or stopping (or has failed). Starting a unit will
+cause the dependencies of that unit to be started as well (if
+necessary).
+
+
+
+
+
+
+
+
+Rebooting and shutting down
+
+The system can be shut down (and automatically powered off) by
+doing:
+
+
+$ shutdown
+
+
+This is equivalent to running systemctl
+poweroff.
+
+To reboot the system, run
+
+
+$ reboot
+
+
+which is equivalent to systemctl reboot.
+Alternatively, you can quickly reboot the system using
+kexec, which bypasses the BIOS by directly loading
+the new kernel into memory:
+
+
+$ systemctl kexec
+
+
+
+
+The machine can be suspended to RAM (if supported) using
+systemctl suspend, and suspended to disk using
+systemctl hibernate.
+
+These commands can be run by any user who is logged in locally,
+i.e. on a virtual console or in X11; otherwise, the user is asked for
+authentication.
+
+
+
+
+
+
+User sessions
+
+Systemd keeps track of all users who are logged into the system
+(e.g. on a virtual console or remotely via SSH). The command
+loginctl allows querying and manipulating user
+sessions. For instance, to list all user sessions:
+
+
+$ loginctl
+ SESSION UID USER SEAT
+ c1 500 eelco seat0
+ c3 0 root seat0
+ c4 500 alice
+
+
+This shows that two users are logged in locally, while another is
+logged in remotely. (“Seats” are essentially the combinations of
+displays and input devices attached to the system; usually, there is
+only one seat.) To get information about a session:
+
+
+$ loginctl session-status c3
+c3 - root (0)
+ Since: Tue, 2013-01-08 01:17:56 CET; 4min 42s ago
+ Leader: 2536 (login)
+ Seat: seat0; vc3
+ TTY: /dev/tty3
+ Service: login; type tty; class user
+ State: online
+ CGroup: name=systemd:/user/root/c3
+ ├─ 2536 /nix/store/10mn4xip9n7y9bxqwnsx7xwx2v2g34xn-shadow-4.1.5.1/bin/login --
+ ├─10339 -bash
+ └─10355 w3m nixos.org
+
+
+This shows that the user is logged in on virtual console 3. It also
+lists the processes belonging to this session. Since systemd keeps
+track of this, you can terminate a session in a way that ensures that
+all the session’s processes are gone:
+
+
+$ loginctl terminate-session c3
+
+
+
+
+
+
+
+
+
+Control groups
+
+To keep track of the processes in a running system, systemd uses
+control groups (cgroups). A control group is a
+set of processes used to allocate resources such as CPU, memory or I/O
+bandwidth. There can be multiple control group hierarchies, allowing
+each kind of resource to be managed independently.
+
+The command systemd-cgls lists all control
+groups in the systemd hierarchy, which is what
+systemd uses to keep track of the processes belonging to each service
+or user session:
+
+
+$ systemd-cgls
+├─user
+│ └─eelco
+│ └─c1
+│ ├─ 2567 -:0
+│ ├─ 2682 kdeinit4: kdeinit4 Running...
+│ ├─ ...
+│ └─10851 sh -c less -R
+└─system
+ ├─httpd.service
+ │ ├─2444 httpd -f /nix/store/3pyacby5cpr55a03qwbnndizpciwq161-httpd.conf -DNO_DETACH
+ │ └─...
+ ├─dhcpcd.service
+ │ └─2376 dhcpcd --config /nix/store/f8dif8dsi2yaa70n03xir8r653776ka6-dhcpcd.conf
+ └─ ...
+
+
+Similarly, systemd-cgls cpu shows the cgroups in
+the CPU hierarchy, which allows per-cgroup CPU scheduling priorities.
+By default, every systemd service gets its own CPU cgroup, while all
+user sessions are in the top-level CPU cgroup. This ensures, for
+instance, that a thousand run-away processes in the
+httpd.service cgroup cannot starve the CPU for one
+process in the postgresql.service cgroup. (By
+contrast, it they were in the same cgroup, then the PostgreSQL process
+would get 1/1001 of the cgroup’s CPU time.) You can limit a service’s
+CPU share in configuration.nix:
+
+
+systemd.services.httpd.serviceConfig.CPUShares = 512;
+
+
+By default, every cgroup has 1024 CPU shares, so this will halve the
+CPU allocation of the httpd.service cgroup.
+
+There also is a memory hierarchy that
+controls memory allocation limits; by default, all processes are in
+the top-level cgroup, so any service or session can exhaust all
+available memory. Per-cgroup memory limits can be specified in
+configuration.nix; for instance, to limit
+httpd.service to 512 MiB of RAM (excluding swap)
+and 640 MiB of RAM (including swap):
+
+
+systemd.services.httpd.serviceConfig.MemoryLimit = "512M";
+systemd.services.httpd.serviceConfig.ControlGroupAttribute = [ "memory.memsw.limit_in_bytes 640M" ];
+
+
+
+
+The command systemd-cgtop shows a
+continuously updated list of all cgroups with their CPU and memory
+usage.
+
+
+
+
+
+
+Logging
+
+System-wide logging is provided by systemd’s
+journal, which subsumes traditional logging
+daemons such as syslogd and klogd. Log entries are kept in binary
+files in /var/log/journal/. The command
+journalctl allows you to see the contents of the
+journal. For example,
+
+
+$ journalctl -b
+
+
+shows all journal entries since the last reboot. (The output of
+journalctl is piped into less by
+default.) You can use various options and match operators to restrict
+output to messages of interest. For instance, to get all messages
+from PostgreSQL:
+
+
+$ journalctl -u postgresql.service
+-- Logs begin at Mon, 2013-01-07 13:28:01 CET, end at Tue, 2013-01-08 01:09:57 CET. --
+...
+Jan 07 15:44:14 hagbard postgres[2681]: [2-1] LOG: database system is shut down
+-- Reboot --
+Jan 07 15:45:10 hagbard postgres[2532]: [1-1] LOG: database system was shut down at 2013-01-07 15:44:14 CET
+Jan 07 15:45:13 hagbard postgres[2500]: [1-1] LOG: database system is ready to accept connections
+
+
+Or to get all messages since the last reboot that have at least a
+“critical” severity level:
+
+
+$ journalctl -b -p crit
+Dec 17 21:08:06 mandark sudo[3673]: pam_unix(sudo:auth): auth could not identify password for [alice]
+Dec 29 01:30:22 mandark kernel[6131]: [1053513.909444] CPU6: Core temperature above threshold, cpu clock throttled (total events = 1)
+
+
+
+
+The system journal is readable by root and by users in the
+wheel and systemd-journal
+groups. All users have a private journal that can be read using
+journalctl.
+
+
+
+
+
+
+Cleaning up the Nix store
+
+Nix has a purely functional model, meaning that packages are
+never upgraded in place. Instead new versions of packages end up in a
+different location in the Nix store (/nix/store).
+You should periodically run Nix’s garbage
+collector to remove old, unreferenced packages. This is
+easy:
+
+
+$ nix-collect-garbage
+
+
+Alternatively, you can use a systemd unit that does the same in the
+background:
+
+
+$ systemctl start nix-gc.service
+
+
+You can tell NixOS in configuration.nix to run
+this unit automatically at certain points in time, for instance, every
+night at 03:15:
+
+
+nix.gc.automatic = true;
+nix.gc.dates = "03:15";
+
+
+
+
+The commands above do not remove garbage collector roots, such
+as old system configurations. Thus they do not remove the ability to
+roll back to previous configurations. The following command deletes
+old roots, removing the ability to roll back to them:
+
+$ nix-collect-garbage -d
+
+You can also do this for specific profiles, e.g.
+
+$ nix-env -p /nix/var/nix/profiles/per-user/eelco/profile --delete-generations old
+
+Note that NixOS system configurations are stored in the profile
+/nix/var/nix/profiles/system.
+
+Another way to reclaim disk space (often as much as 40% of the
+size of the Nix store) is to run Nix’s store optimiser, which seeks
+out identical files in the store and replaces them with hard links to
+a single copy.
+
+$ nix-store --optimise
+
+Since this command needs to read the entire Nix store, it can take
+quite a while to finish.
+
+
+
+
+
diff --git a/nixos/doc/manual/style.css b/nixos/doc/manual/style.css
new file mode 100644
index 0000000000000000000000000000000000000000..e2204c159e22db8a9e31efcd71e649360d57b253
--- /dev/null
+++ b/nixos/doc/manual/style.css
@@ -0,0 +1,268 @@
+/* Copied from http://bakefile.sourceforge.net/, which appears
+ licensed under the GNU GPL. */
+
+
+/***************************************************************************
+ Basic headers and text:
+ ***************************************************************************/
+
+body
+{
+ font-family: "Nimbus Sans L", sans-serif;
+ background: white;
+ margin: 2em 1em 2em 1em;
+}
+
+h1, h2, h3, h4
+{
+ color: #005aa0;
+}
+
+h1 /* title */
+{
+ font-size: 200%;
+}
+
+h2 /* chapters, appendices, subtitle */
+{
+ font-size: 180%;
+}
+
+/* Extra space between chapters, appendices. */
+div.chapter > div.titlepage h2, div.appendix > div.titlepage h2
+{
+ margin-top: 1.5em;
+}
+
+div.section > div.titlepage h2 /* sections */
+{
+ font-size: 150%;
+ margin-top: 1.5em;
+}
+
+h3 /* subsections */
+{
+ font-size: 125%;
+}
+
+div.simplesect h2
+{
+ font-size: 110%;
+}
+
+div.appendix h3
+{
+ font-size: 150%;
+ margin-top: 1.5em;
+}
+
+div.refnamediv h2, div.refsynopsisdiv h2, div.refsection h2 /* refentry parts */
+{
+ margin-top: 1.4em;
+ font-size: 125%;
+}
+
+div.refsection h3
+{
+ font-size: 110%;
+}
+
+
+/***************************************************************************
+ Examples:
+ ***************************************************************************/
+
+div.example
+{
+ border: 1px solid #b0b0b0;
+ padding: 6px 6px;
+ margin-left: 1.5em;
+ margin-right: 1.5em;
+ background: #f4f4f8;
+ border-radius: 0.4em;
+ box-shadow: 0.4em 0.4em 0.5em #e0e0e0;
+}
+
+div.example p.title
+{
+ margin-top: 0em;
+}
+
+div.example pre
+{
+ box-shadow: none;
+}
+
+
+/***************************************************************************
+ Screen dumps:
+ ***************************************************************************/
+
+pre.screen, pre.programlisting
+{
+ border: 1px solid #b0b0b0;
+ padding: 3px 3px;
+ margin-left: 1.5em;
+ margin-right: 1.5em;
+ color: #600000;
+ background: #f4f4f8;
+ font-family: monospace;
+ border-radius: 0.4em;
+ box-shadow: 0.4em 0.4em 0.5em #e0e0e0;
+}
+
+div.example pre.programlisting
+{
+ border: 0px;
+ padding: 0 0;
+ margin: 0 0 0 0;
+}
+
+
+/***************************************************************************
+ Notes, warnings etc:
+ ***************************************************************************/
+
+.note, .warning
+{
+ border: 1px solid #b0b0b0;
+ padding: 3px 3px;
+ margin-left: 1.5em;
+ margin-right: 1.5em;
+ margin-bottom: 1em;
+ padding: 0.3em 0.3em 0.3em 0.3em;
+ background: #fffff5;
+ border-radius: 0.4em;
+ box-shadow: 0.4em 0.4em 0.5em #e0e0e0;
+}
+
+div.note, div.warning
+{
+ font-style: italic;
+}
+
+div.note h3, div.warning h3
+{
+ color: red;
+ font-size: 100%;
+ padding-right: 0.5em;
+ display: inline;
+}
+
+div.note p, div.warning p
+{
+ margin-bottom: 0em;
+}
+
+div.note h3 + p, div.warning h3 + p
+{
+ display: inline;
+}
+
+div.note h3
+{
+ color: blue;
+ font-size: 100%;
+}
+
+div.navfooter *
+{
+ font-size: 90%;
+}
+
+
+/***************************************************************************
+ Links colors and highlighting:
+ ***************************************************************************/
+
+a { text-decoration: none; }
+a:hover { text-decoration: underline; }
+a:link { color: #0048b3; }
+a:visited { color: #002a6a; }
+
+
+/***************************************************************************
+ Table of contents:
+ ***************************************************************************/
+
+div.toc
+{
+ font-size: 90%;
+}
+
+div.toc dl
+{
+ margin-top: 0em;
+ margin-bottom: 0em;
+}
+
+
+/***************************************************************************
+ Special elements:
+ ***************************************************************************/
+
+tt, code
+{
+ color: #400000;
+}
+
+.term
+{
+ font-weight: bold;
+
+}
+
+div.variablelist dd p, div.glosslist dd p
+{
+ margin-top: 0em;
+}
+
+div.variablelist dd, div.glosslist dd
+{
+ margin-left: 1.5em;
+}
+
+div.glosslist dt
+{
+ font-style: italic;
+}
+
+.varname
+{
+ color: #400000;
+}
+
+span.command strong
+{
+ font-weight: normal;
+ color: #400000;
+}
+
+div.calloutlist table
+{
+ box-shadow: none;
+}
+
+table
+{
+ border-collapse: collapse;
+ box-shadow: 0.4em 0.4em 0.5em #e0e0e0;
+}
+
+table.simplelist
+{
+ text-align: left;
+ color: #005aa0;
+ border: 0;
+ padding: 5px;
+ background: #fffff5;
+ font-weight: normal;
+ font-style: italic;
+ box-shadow: none;
+ margin-bottom: 1em;
+}
+
+div.affiliation
+{
+ font-style: italic;
+}
\ No newline at end of file
diff --git a/nixos/doc/manual/troubleshooting.xml b/nixos/doc/manual/troubleshooting.xml
new file mode 100644
index 0000000000000000000000000000000000000000..c6e0a3a7888c5fc2dc473098db17ce775af6d8f5
--- /dev/null
+++ b/nixos/doc/manual/troubleshooting.xml
@@ -0,0 +1,198 @@
+
+
+Troubleshooting
+
+
+
+
+Boot problems
+
+If NixOS fails to boot, there are a number of kernel command
+line parameters that may help you to identify or fix the issue. You
+can add these parameters in the GRUB boot menu by pressing “e” to
+modify the selected boot entry and editing the line starting with
+linux. The following are some useful kernel command
+line parameters that are recognised by the NixOS boot scripts or by
+systemd:
+
+
+
+ boot.shell_on_fail
+ Start a root shell if something goes wrong in
+ stage 1 of the boot process (the initial ramdisk). This is
+ disabled by default because there is no authentication for the
+ root shell.
+
+
+ boot.debug1
+ Start an interactive shell in stage 1 before
+ anything useful has been done. That is, no modules have been
+ loaded and no file systems have been mounted, except for
+ /proc and
+ /sys.
+
+
+ boot.trace
+ Print every shell command executed by the stage 1
+ and 2 boot scripts.
+
+
+ single
+ Boot into rescue mode (a.k.a. single user mode).
+ This will cause systemd to start nothing but the unit
+ rescue.target, which runs
+ sulogin to prompt for the root password and
+ start a root login shell. Exiting the shell causes the system to
+ continue with the normal boot process.
+
+
+ systemd.log_level=debug systemd.log_target=console
+ Make systemd very verbose and send log messages to
+ the console instead of the journal.
+
+
+
+
+For more parameters recognised by systemd, see
+systemd1.
+
+If no login prompts or X11 login screens appear (e.g. due to
+hanging dependencies), you can press Alt+ArrowUp. If you’re lucky,
+this will start rescue mode (described above). (Also note that since
+most units have a 90-second timeout before systemd gives up on them,
+the agetty login prompts should appear eventually
+unless something is very wrong.)
+
+
+
+
+
+
+Maintenance mode
+
+You can enter rescue mode by running:
+
+
+$ systemctl rescue
+
+This will eventually give you a single-user root shell. Systemd will
+stop (almost) all system services. To get out of maintenance mode,
+just exit from the rescue shell.
+
+
+
+
+
+
+Rolling back configuration changes
+
+After running nixos-rebuild to switch to a
+new configuration, you may find that the new configuration doesn’t
+work very well. In that case, there are several ways to return to a
+previous configuration.
+
+First, the GRUB boot manager allows you to boot into any
+previous configuration that hasn’t been garbage-collected. These
+configurations can be found under the GRUB submenu “NixOS - All
+configurations”. This is especially useful if the new configuration
+fails to boot. After the system has booted, you can make the selected
+configuration the default for subsequent boots:
+
+
+$ /run/current-system/bin/switch-to-configuration boot
+
+
+
+Second, you can switch to the previous configuration in a running
+system:
+
+
+$ nixos-rebuild switch --rollback
+
+This is equivalent to running:
+
+
+$ /nix/var/nix/profiles/system-N-link/bin/switch-to-configuration switch
+
+where N is the number of the NixOS system
+configuration. To get a list of the available configurations, do:
+
+
+$ ls -l /nix/var/nix/profiles/system-*-link
+...
+lrwxrwxrwx 1 root root 78 Aug 12 13:54 /nix/var/nix/profiles/system-268-link -> /nix/store/202b...-nixos-13.07pre4932_5a676e4-4be1055
+
+
+
+
+
+
+
+
+
+Nix store corruption
+
+After a system crash, it’s possible for files in the Nix store
+to become corrupted. (For instance, the Ext4 file system has the
+tendency to replace un-synced files with zero bytes.) NixOS tries
+hard to prevent this from happening: it performs a
+sync before switching to a new configuration, and
+Nix’s database is fully transactional. If corruption still occurs,
+you may be able to fix it automatically.
+
+If the corruption is in a path in the closure of the NixOS
+system configuration, you can fix it by doing
+
+
+$ nixos-rebuild switch --repair
+
+
+This will cause Nix to check every path in the closure, and if its
+cryptographic hash differs from the hash recorded in Nix’s database,
+the path is rebuilt or redownloaded.
+
+You can also scan the entire Nix store for corrupt paths:
+
+
+$ nix-store --verify --check-contents --repair
+
+
+Any corrupt paths will be redownloaded if they’re available in a
+binary cache; otherwise, they cannot be repaired.
+
+
+
+
+
+
+Nix network issues
+
+Nix uses a so-called binary cache to
+optimise building a package from source into downloading it as a
+pre-built binary. That is, whenever a command like
+nixos-rebuild needs a path in the Nix store, Nix
+will try to download that path from the Internet rather than build it
+from source. The default binary cache is
+http://cache.nixos.org/. If this cache is unreachable, Nix
+operations may take a long time due to HTTP connection timeouts. You
+can disable the use of the binary cache by adding , e.g.
+
+
+$ nixos-rebuild switch --option use-binary-caches false
+
+
+If you have an alternative binary cache at your disposal, you can use
+it instead:
+
+
+$ nixos-rebuild switch --option binary-caches http://my-cache.example.org/
+
+
+
+
+
+
+
+
diff --git a/nixos/doc/manual/userconfiguration.xml b/nixos/doc/manual/userconfiguration.xml
new file mode 100644
index 0000000000000000000000000000000000000000..7c6540caf3a74410bad643ccce14fd52701a25cb
--- /dev/null
+++ b/nixos/doc/manual/userconfiguration.xml
@@ -0,0 +1,80 @@
+
+
+Configuration in home directory
+
+
+
+
+
+Compiz Fusion
+
+ Compiz Fusion is just a set of plugins for Compiz. Your best interest is to have
+ them found both by Compiz and by Compiz Configuration Settings (also in Compiz Fusion
+ distribution). By default they look in Compiz installation path and in home directory.
+ You do not need to track /nix/store manually - everything is already in
+ /run/current-system/sw/share.
+
+
+ $HOME/.compiz/plugins
+ should contain plugins you want to load. All the installed
+ plugins are available in
+ /run/current-system/sw/share/compiz-plugins/compiz/,
+ so you can use symlinks to this directory.
+
+
+ $HOME/.compiz/metadata
+ should contain metadata (definition of configuration options) for plugins
+ you want to load. All the installed metadata is available in
+ /run/current-system/sw/share/compiz/,
+ so you can use symlinks to this directory.
+
+
+
+ Probably a way to load GConf configuration backend by default
+ should be found, but if you run Compiz with
+ GConf configuration (default for X server job
+ for now), you have to link
+ /run/current-system/sw/share/compizconfig/backends/
+ into $HOME/.compizconfig/backends directory.
+
+
+
+
+ To summarize the above, these are the commands you have to execute
+ ln -s /run/current-system/sw/share/compiz/ $HOME/.compiz/metadata
+ ln -s /run/current-system/sw/share/compiz-plugins/compiz/ $HOME/.compiz/plugins
+ ln -s /run/current-system/sw/share/compizconfig/backends/ $HOME/.compizconfig/backends
+
+ Now you can launch ccsm and configure everything. You should select
+ GConf as a backend in the preferences menu of ccsm
+
+
+
+
+Pidgin-LaTeX
+
+ To have pidgin-latex plugin working after installation, you need the following:
+
+
+ Symlink /run/current-system/sw/share/pidgin-latex/pidgin-latex.so
+ to $HOME/.purple/plugins/pidgin-latex.so
+
+
+ Enable smileys. If you do not want to, you can create
+ $HOME/.purple/smileys/empty/theme with the following contents:
+
+ Name=Empty
+ Description=No predefined smileys
+ Author=Nobody
+
+ Enabling this theme will enable smileys, but define none.
+
+
+ Enable the plugin.
+
+
+
+
+
+
diff --git a/nixos/gui/README b/nixos/gui/README
new file mode 100644
index 0000000000000000000000000000000000000000..c038314a0dc77e3af86315816da6a4f232d30ea3
--- /dev/null
+++ b/nixos/gui/README
@@ -0,0 +1,16 @@
+This file should become a nix expression. (see modules/installer/tools/tools.nix)
+
+you need to:
+- download the latest jQuery from and copy it to chrome/content:
+ http://code.jquery.com/jquery-1.5.2.js
+
+- install 'xulrunner' with nix:
+ nix-env -Ai nixpkgs_sys.firefox40Pkgs.xulrunner
+
+- make sure nixos-option in your path
+
+- have /etc/nixos/nixpkgs
+- have /etc/nixos/nixos
+
+run it:
+- xulrunner /etc/nixos/nixos/gui/application.ini -jsconsole
diff --git a/nixos/gui/application.ini b/nixos/gui/application.ini
new file mode 100644
index 0000000000000000000000000000000000000000..d2494a1a5cd5eab4436635ecdf314e9f9fc26daa
--- /dev/null
+++ b/nixos/gui/application.ini
@@ -0,0 +1,36 @@
+[App]
+;
+; This field specifies your organization's name. This field is recommended,
+; but optional.
+Vendor=NixOS
+;
+; This field specifies your application's name. This field is required.
+Name=NixOS-gui
+;
+; This field specifies your application's version. This field is optional.
+Version=0.1
+;
+; This field specifies your application's build ID (timestamp). This field is
+; required.
+BuildID=20110424
+;
+; This field specifies a compact copyright notice for your application. This
+; field is optional.
+;Copyright=
+
+;
+; This ID is just an example. Every XUL app ought to have it's own unique ID.
+; You can use the microsoft "guidgen" or "uuidgen" tools, or go on
+; irc.mozilla.org and /msg botbot uuid. This field is optional.
+;ID=
+
+[Gecko]
+;
+; This field is required. It specifies the minimum Gecko version that this
+; application requires.
+MinVersion=1.9a5
+;
+; This field is optional. It specifies the maximum Gecko version that this
+; application requires. It should be specified if your application uses
+; unfrozen interfaces.
+MaxVersion=2.*
diff --git a/nixos/gui/chrome.manifest b/nixos/gui/chrome.manifest
new file mode 100644
index 0000000000000000000000000000000000000000..865d6a88fb4815decc27fa10f6e4293a815a5bc9
--- /dev/null
+++ b/nixos/gui/chrome.manifest
@@ -0,0 +1 @@
+manifest chrome/chrome.manifest
diff --git a/nixos/gui/chrome/chrome.manifest b/nixos/gui/chrome/chrome.manifest
new file mode 100644
index 0000000000000000000000000000000000000000..775445ee17bf6cd04f2143e434f92c7861b2c56f
--- /dev/null
+++ b/nixos/gui/chrome/chrome.manifest
@@ -0,0 +1 @@
+content nixos-gui content/
diff --git a/nixos/gui/chrome/content/io.js b/nixos/gui/chrome/content/io.js
new file mode 100644
index 0000000000000000000000000000000000000000..8d9c8c173656261ae6a39fcfa64cafe3fc22dd0a
--- /dev/null
+++ b/nixos/gui/chrome/content/io.js
@@ -0,0 +1,137 @@
+
+function inspect(obj, maxLevels, level)
+{
+ var str = '', type, msg;
+
+ // Start Input Validations
+ // Don't touch, we start iterating at level zero
+ if(level == null) level = 0;
+
+ // At least you want to show the first level
+ if(maxLevels == null) maxLevels = 1;
+ if(maxLevels < 1)
+ return 'Error: Levels number must be > 0';
+
+ // We start with a non null object
+ if(obj == null)
+ return 'Error: Object NULL';
+ // End Input Validations
+
+ // Each Iteration must be indented
+ str += '
';
+
+ // Start iterations for all objects in obj
+ for(property in obj)
+ {
+ try
+ {
+ // Show "property" and "type property"
+ type = typeof(obj[property]);
+ str += '
+
+
+
+
+
+
+
+
+ errorLine
+
+
+ warningLine
+
+
+ prio3
+
+
+
+ serial
+
+
+
+
+
+ #
+
+
+ :
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ /...
+
+
+
+
diff --git a/nixos/lib/test-driver/logfile.css b/nixos/lib/test-driver/logfile.css
new file mode 100644
index 0000000000000000000000000000000000000000..a54d8504a86713adbc2c6d24878c10d3ac4cf9c2
--- /dev/null
+++ b/nixos/lib/test-driver/logfile.css
@@ -0,0 +1,129 @@
+body {
+ font-family: sans-serif;
+ background: white;
+}
+
+h1
+{
+ color: #005aa0;
+ font-size: 180%;
+}
+
+a {
+ text-decoration: none;
+}
+
+
+ul.nesting, ul.toplevel {
+ padding: 0;
+ margin: 0;
+}
+
+ul.toplevel {
+ list-style-type: none;
+}
+
+.line, .head {
+ padding-top: 0em;
+}
+
+ul.nesting li.line, ul.nesting li.lastline {
+ position: relative;
+ list-style-type: none;
+}
+
+ul.nesting li.line {
+ padding-left: 2.0em;
+}
+
+ul.nesting li.lastline {
+ padding-left: 2.1em; /* for the 0.1em border-left in .lastline > .lineconn */
+}
+
+li.line {
+ border-left: 0.1em solid #6185a0;
+}
+
+li.line > span.lineconn, li.lastline > span.lineconn {
+ position: absolute;
+ height: 0.65em;
+ left: 0em;
+ width: 1.5em;
+ border-bottom: 0.1em solid #6185a0;
+}
+
+li.lastline > span.lineconn {
+ border-left: 0.1em solid #6185a0;
+}
+
+
+em.storeref {
+ color: #500000;
+ position: relative;
+ width: 100%;
+}
+
+em.storeref:hover {
+ background-color: #eeeeee;
+}
+
+*.popup {
+ display: none;
+/* background: url('http://losser.st-lab.cs.uu.nl/~mbravenb/menuback.png') repeat; */
+ background: #ffffcd;
+ border: solid #555555 1px;
+ position: absolute;
+ top: 0em;
+ left: 0em;
+ margin: 0;
+ padding: 0;
+ z-index: 100;
+}
+
+em.storeref:hover span.popup {
+ display: inline;
+ width: 40em;
+}
+
+
+.logTreeToggle {
+ text-decoration: none;
+ font-family: monospace;
+ font-size: larger;
+}
+
+.errorLine {
+ color: #ff0000;
+ font-weight: bold;
+}
+
+.warningLine {
+ color: darkorange;
+ font-weight: bold;
+}
+
+.prio3 {
+ font-style: italic;
+}
+
+code {
+ white-space: pre-wrap;
+}
+
+.serial {
+ color: #56115c;
+}
+
+.machine {
+ color: #002399;
+ font-style: italic;
+}
+
+ul.vmScreenshots {
+ padding-left: 1em;
+}
+
+ul.vmScreenshots li {
+ font-family: monospace;
+ list-style: square;
+}
diff --git a/nixos/lib/test-driver/test-driver.pl b/nixos/lib/test-driver/test-driver.pl
new file mode 100644
index 0000000000000000000000000000000000000000..c6a707cdf6b9e8f028dad3b94fd4e45e5a0ab5ce
--- /dev/null
+++ b/nixos/lib/test-driver/test-driver.pl
@@ -0,0 +1,178 @@
+#! /somewhere/perl -w
+
+use strict;
+use Machine;
+use Term::ReadLine;
+use IO::File;
+use IO::Pty;
+use Logger;
+use Cwd;
+use POSIX qw(_exit dup2);
+
+$SIG{PIPE} = 'IGNORE'; # because Unix domain sockets may die unexpectedly
+
+STDERR->autoflush(1);
+
+my $log = new Logger;
+
+
+# Start vde_switch for each network required by the test.
+my %vlans;
+foreach my $vlan (split / /, $ENV{VLANS} || "") {
+ next if defined $vlans{$vlan};
+ # Start vde_switch as a child process. We don't run it in daemon
+ # mode because we want the child process to be cleaned up when we
+ # die. Since we have to make sure that the control socket is
+ # ready, we send a dummy command to vde_switch (via stdin) and
+ # wait for a reply. Note that vde_switch requires stdin to be a
+ # TTY, so we create one.
+ $log->log("starting VDE switch for network $vlan");
+ my $socket = Cwd::abs_path "./vde$vlan.ctl";
+ my $pty = new IO::Pty;
+ my ($stdoutR, $stdoutW); pipe $stdoutR, $stdoutW;
+ my $pid = fork(); die "cannot fork" unless defined $pid;
+ if ($pid == 0) {
+ dup2(fileno($pty->slave), 0);
+ dup2(fileno($stdoutW), 1);
+ exec "vde_switch -s $socket" or _exit(1);
+ }
+ close $stdoutW;
+ print $pty "version\n";
+ readline $stdoutR or die "cannot start vde_switch";
+ $ENV{"QEMU_VDE_SOCKET_$vlan"} = $socket;
+ $vlans{$vlan} = $pty;
+ die unless -e "$socket/ctl";
+}
+
+
+my %vms;
+my $context = "";
+
+sub createMachine {
+ my ($args) = @_;
+ my $vm = Machine->new({%{$args}, log => $log, redirectSerial => ($ENV{USE_SERIAL} // "0") ne "1"});
+ $vms{$vm->name} = $vm;
+ return $vm;
+}
+
+foreach my $vmScript (@ARGV) {
+ my $vm = createMachine({startCommand => $vmScript});
+ $context .= "my \$" . $vm->name . " = \$vms{'" . $vm->name . "'}; ";
+}
+
+
+sub startAll {
+ $log->nest("starting all VMs", sub {
+ $_->start foreach values %vms;
+ });
+}
+
+
+# Wait until all VMs have terminated.
+sub joinAll {
+ $log->nest("waiting for all VMs to finish", sub {
+ $_->waitForShutdown foreach values %vms;
+ });
+}
+
+
+# In interactive tests, this allows the non-interactive test script to
+# be executed conveniently.
+sub testScript {
+ eval "$context $ENV{testScript};\n";
+ warn $@ if $@;
+}
+
+
+my $nrTests = 0;
+my $nrSucceeded = 0;
+
+
+sub subtest {
+ my ($name, $coderef) = @_;
+ $log->nest("subtest: $name", sub {
+ $nrTests++;
+ eval { &$coderef };
+ if ($@) {
+ $log->log("error: $@", { error => 1 });
+ } else {
+ $nrSucceeded++;
+ }
+ });
+}
+
+
+sub runTests {
+ if (defined $ENV{tests}) {
+ $log->nest("running the VM test script", sub {
+ eval "$context $ENV{tests}";
+ if ($@) {
+ $log->log("error: $@", { error => 1 });
+ die $@;
+ }
+ }, { expanded => 1 });
+ } else {
+ my $term = Term::ReadLine->new('nixos-vm-test');
+ $term->ReadHistory;
+ while (defined ($_ = $term->readline("> "))) {
+ eval "$context $_\n";
+ warn $@ if $@;
+ }
+ $term->WriteHistory;
+ }
+
+ # Copy the kernel coverage data for each machine, if the kernel
+ # has been compiled with coverage instrumentation.
+ $log->nest("collecting coverage data", sub {
+ foreach my $vm (values %vms) {
+ my $gcovDir = "/sys/kernel/debug/gcov";
+
+ next unless $vm->isUp();
+
+ my ($status, $out) = $vm->execute("test -e $gcovDir");
+ next if $status != 0;
+
+ # Figure out where to put the *.gcda files so that the
+ # report generator can find the corresponding kernel
+ # sources.
+ my $kernelDir = $vm->mustSucceed("echo \$(dirname \$(readlink -f /run/current-system/kernel))/.build/linux-*");
+ chomp $kernelDir;
+ my $coverageDir = "/tmp/xchg/coverage-data/$kernelDir";
+
+ # Copy all the *.gcda files.
+ $vm->execute("for d in $gcovDir/nix/store/*/.build/linux-*; do for i in \$(cd \$d && find -name '*.gcda'); do echo \$i; mkdir -p $coverageDir/\$(dirname \$i); cp -v \$d/\$i $coverageDir/\$i; done; done");
+ }
+ });
+
+ if ($nrTests != 0) {
+ $log->log("$nrSucceeded out of $nrTests tests succeeded",
+ ($nrSucceeded < $nrTests ? { error => 1 } : { }));
+ }
+}
+
+
+# Create an empty raw virtual disk with the given name and size (in
+# MiB).
+sub createDisk {
+ my ($name, $size) = @_;
+ system("qemu-img create -f raw $name ${size}M") == 0
+ or die "cannot create image of size $size";
+}
+
+
+END {
+ $log->nest("cleaning up", sub {
+ foreach my $vm (values %vms) {
+ if ($vm->{pid}) {
+ $log->log("killing " . $vm->{name} . " (pid " . $vm->{pid} . ")");
+ kill 9, $vm->{pid};
+ }
+ }
+ });
+ $log->close();
+}
+
+
+runTests;
+
+exit ($nrSucceeded < $nrTests ? 1 : 0);
diff --git a/nixos/lib/test-driver/treebits.js b/nixos/lib/test-driver/treebits.js
new file mode 100644
index 0000000000000000000000000000000000000000..9754093dfd074932f64ce2083dec565c11751d09
--- /dev/null
+++ b/nixos/lib/test-driver/treebits.js
@@ -0,0 +1,30 @@
+$(document).ready(function() {
+
+ /* When a toggle is clicked, show or hide the subtree. */
+ $(".logTreeToggle").click(function() {
+ if ($(this).siblings("ul:hidden").length != 0) {
+ $(this).siblings("ul").show();
+ $(this).text("-");
+ } else {
+ $(this).siblings("ul").hide();
+ $(this).text("+");
+ }
+ });
+
+ /* Implementation of the expand all link. */
+ $(".logTreeExpandAll").click(function() {
+ $(".logTreeToggle", $(this).parent().siblings(".toplevel")).map(function() {
+ $(this).siblings("ul").show();
+ $(this).text("-");
+ });
+ });
+
+ /* Implementation of the collapse all link. */
+ $(".logTreeCollapseAll").click(function() {
+ $(".logTreeToggle", $(this).parent().siblings(".toplevel")).map(function() {
+ $(this).siblings("ul").hide();
+ $(this).text("+");
+ });
+ });
+
+});
diff --git a/nixos/lib/testing.nix b/nixos/lib/testing.nix
new file mode 100644
index 0000000000000000000000000000000000000000..3407229e921a8650748f0f6ff8224fd91e3efe64
--- /dev/null
+++ b/nixos/lib/testing.nix
@@ -0,0 +1,249 @@
+{ system, minimal ? false }:
+
+with import ./build-vms.nix { inherit system minimal; };
+with pkgs;
+
+rec {
+
+ inherit pkgs;
+
+
+ testDriver = stdenv.mkDerivation {
+ name = "nixos-test-driver";
+
+ buildInputs = [ makeWrapper perl ];
+
+ unpackPhase = "true";
+
+ installPhase =
+ ''
+ mkdir -p $out/bin
+ cp ${./test-driver/test-driver.pl} $out/bin/nixos-test-driver
+ chmod u+x $out/bin/nixos-test-driver
+
+ libDir=$out/lib/perl5/site_perl
+ mkdir -p $libDir
+ cp ${./test-driver/Machine.pm} $libDir/Machine.pm
+ cp ${./test-driver/Logger.pm} $libDir/Logger.pm
+
+ wrapProgram $out/bin/nixos-test-driver \
+ --prefix PATH : "${pkgs.qemu_kvm}/bin:${pkgs.vde2}/bin:${imagemagick}/bin:${coreutils}/bin" \
+ --prefix PERL5LIB : "${lib.makePerlPath [ perlPackages.TermReadLineGnu perlPackages.XMLWriter perlPackages.IOTty ]}:$out/lib/perl5/site_perl"
+ '';
+ };
+
+
+ # Run an automated test suite in the given virtual network.
+ # `driver' is the script that runs the network.
+ runTests = driver:
+ stdenv.mkDerivation {
+ name = "vm-test-run";
+
+ requiredSystemFeatures = [ "kvm" "nixos-test" ];
+
+ buildInputs = [ pkgs.libxslt ];
+
+ buildCommand =
+ ''
+ mkdir -p $out/nix-support
+
+ LOGFILE=$out/log.xml tests='eval $ENV{testScript}; die $@ if $@;' ${driver}/bin/nixos-test-driver || failed=1
+
+ # Generate a pretty-printed log.
+ xsltproc --output $out/log.html ${./test-driver/log2html.xsl} $out/log.xml
+ ln -s ${./test-driver/logfile.css} $out/logfile.css
+ ln -s ${./test-driver/treebits.js} $out/treebits.js
+
+ touch $out/nix-support/hydra-build-products
+ echo "report testlog $out log.html" >> $out/nix-support/hydra-build-products
+
+ for i in */xchg/coverage-data; do
+ mkdir -p $out/coverage-data
+ mv $i $out/coverage-data/$(dirname $(dirname $i))
+ done
+
+ [ -z "$failed" ] || touch $out/nix-support/failed
+ ''; # */
+ };
+
+
+ # Generate a coverage report from the coverage data produced by
+ # runTests.
+ makeReport = x: runCommand "report" { buildInputs = [rsync]; }
+ ''
+ mkdir -p $TMPDIR/gcov/
+
+ for d in ${x}/coverage-data/*; do
+ echo "doing $d"
+ [ -n "$(ls -A "$d")" ] || continue
+
+ for i in $(cd $d/nix/store && ls); do
+ if ! test -e $TMPDIR/gcov/nix/store/$i; then
+ echo "copying $i"
+ mkdir -p $TMPDIR/gcov/$(echo $i | cut -c34-)
+ rsync -rv /nix/store/$i/.build/* $TMPDIR/gcov/
+ fi
+ done
+
+ chmod -R u+w $TMPDIR/gcov
+
+ find $TMPDIR/gcov -name "*.gcda" -exec rm {} \;
+
+ for i in $(cd $d/nix/store && ls); do
+ rsync -rv $d/nix/store/$i/.build/* $TMPDIR/gcov/
+ done
+
+ find $TMPDIR/gcov -name "*.gcda" -exec chmod 644 {} \;
+
+ echo "producing info..."
+ ${pkgs.lcov}/bin/geninfo --ignore-errors source,gcov $TMPDIR/gcov --output-file $TMPDIR/app.info
+ cat $TMPDIR/app.info >> $TMPDIR/full.info
+ done
+
+ echo "making report..."
+ mkdir -p $out/coverage
+ ${pkgs.lcov}/bin/genhtml --show-details $TMPDIR/full.info -o $out/coverage
+ cp $TMPDIR/full.info $out/coverage/
+
+ mkdir -p $out/nix-support
+ cat ${x}/nix-support/hydra-build-products >> $out/nix-support/hydra-build-products
+ echo "report coverage $out/coverage" >> $out/nix-support/hydra-build-products
+ [ ! -e ${x}/nix-support/failed ] || touch $out/nix-support/failed
+ ''; # */
+
+
+ makeTest = testFun: complete (call testFun);
+ makeTests = testsFun: lib.mapAttrs (name: complete) (call testsFun);
+
+ apply = makeTest; # compatibility
+ call = f: f { inherit pkgs system; };
+
+ complete = t: t // rec {
+ nodes = buildVirtualNetwork (
+ if t ? nodes then t.nodes else
+ if t ? machine then { machine = t.machine; }
+ else { } );
+
+ testScript =
+ # Call the test script with the computed nodes.
+ if builtins.isFunction t.testScript
+ then t.testScript { inherit nodes; }
+ else t.testScript;
+
+ vlans = map (m: m.config.virtualisation.vlans) (lib.attrValues nodes);
+
+ vms = map (m: m.config.system.build.vm) (lib.attrValues nodes);
+
+ # Generate onvenience wrappers for running the test driver
+ # interactively with the specified network, and for starting the
+ # VMs from the command line.
+ driver = runCommand "nixos-test-driver"
+ { buildInputs = [ makeWrapper];
+ inherit testScript;
+ preferLocalBuild = true;
+ }
+ ''
+ mkdir -p $out/bin
+ echo "$testScript" > $out/test-script
+ ln -s ${testDriver}/bin/nixos-test-driver $out/bin/
+ vms="$(for i in ${toString vms}; do echo $i/bin/run-*-vm; done)"
+ wrapProgram $out/bin/nixos-test-driver \
+ --add-flags "$vms" \
+ --run "testScript=\"\$(cat $out/test-script)\"" \
+ --set testScript '"$testScript"' \
+ --set VLANS '"${toString vlans}"'
+ ln -s ${testDriver}/bin/nixos-test-driver $out/bin/nixos-run-vms
+ wrapProgram $out/bin/nixos-run-vms \
+ --add-flags "$vms" \
+ --set tests '"startAll; joinAll;"' \
+ --set VLANS '"${toString vlans}"' \
+ ${lib.optionalString (builtins.length vms == 1) "--set USE_SERIAL 1"}
+ ''; # "
+
+ test = runTests driver;
+
+ report = makeReport test;
+ };
+
+
+ runInMachine =
+ { drv
+ , machine
+ , preBuild ? ""
+ , postBuild ? ""
+ , ... # ???
+ }:
+ let
+ vm = buildVM { }
+ [ machine
+ { key = "run-in-machine";
+ networking.hostName = "client";
+ nix.readOnlyStore = false;
+ }
+ ];
+
+ buildrunner = writeText "vm-build" ''
+ source $1
+
+ ${coreutils}/bin/mkdir -p $TMPDIR
+ cd $TMPDIR
+
+ $origBuilder $origArgs
+
+ exit $?
+ '';
+
+ testscript = ''
+ startAll;
+ $client->waitForUnit("multi-user.target");
+ ${preBuild}
+ $client->succeed("env -i ${pkgs.bash}/bin/bash ${buildrunner} /tmp/xchg/saved-env >&2");
+ ${postBuild}
+ $client->succeed("sync"); # flush all data before pulling the plug
+ '';
+
+ vmRunCommand = writeText "vm-run" ''
+ ${coreutils}/bin/mkdir $out
+ ${coreutils}/bin/mkdir -p vm-state-client/xchg
+ export > vm-state-client/xchg/saved-env
+ export tests='${testscript}'
+ ${testDriver}/bin/nixos-test-driver ${vm.config.system.build.vm}/bin/run-*-vm
+ ''; # */
+
+ in
+ lib.overrideDerivation drv (attrs: {
+ requiredSystemFeatures = [ "kvm" ];
+ builder = "${bash}/bin/sh";
+ args = ["-e" vmRunCommand];
+ origArgs = attrs.args;
+ origBuilder = attrs.builder;
+ });
+
+
+ runInMachineWithX = { require ? [], ... } @ args:
+ let
+ client =
+ { config, pkgs, ... }:
+ {
+ inherit require;
+ virtualisation.memorySize = 1024;
+ services.xserver.enable = true;
+ services.xserver.displayManager.slim.enable = false;
+ services.xserver.displayManager.auto.enable = true;
+ services.xserver.windowManager.default = "icewm";
+ services.xserver.windowManager.icewm.enable = true;
+ services.xserver.desktopManager.default = "none";
+ };
+ in
+ runInMachine ({
+ machine = client;
+ preBuild =
+ ''
+ $client->waitForX;
+ '';
+ } // args);
+
+
+ simpleTest = as: (makeTest ({ ... }: as)).test;
+
+}
diff --git a/nixos/lib/utils.nix b/nixos/lib/utils.nix
new file mode 100644
index 0000000000000000000000000000000000000000..35c56e8c32bbf9b2990a56215201395874f7a078
--- /dev/null
+++ b/nixos/lib/utils.nix
@@ -0,0 +1,10 @@
+pkgs: with pkgs.lib;
+
+rec {
+
+ # Escape a path according to the systemd rules, e.g. /dev/xyzzy
+ # becomes dev-xyzzy. FIXME: slow.
+ escapeSystemdPath = s:
+ replaceChars ["/" "-" " "] ["-" "\\x2d" "\\x20"] (substring 1 (stringLength s) s);
+
+}
diff --git a/nixos/maintainers/option-usages.nix b/nixos/maintainers/option-usages.nix
new file mode 100644
index 0000000000000000000000000000000000000000..7413b9e18cec0e4a478b0fd97d516701d1942ca4
--- /dev/null
+++ b/nixos/maintainers/option-usages.nix
@@ -0,0 +1,99 @@
+{ configuration ? import ../lib/from-env.nix "NIXOS_CONFIG"
+
+# []: display all options
+# [.
+ '';
+ };
+
+ daemonNiceLevel = mkOption {
+ default = 0;
+ description = "
+ Nix daemon process priority. This priority propagates to build processes.
+ 0 is the default Unix process priority, 20 is the lowest.
+ ";
+ };
+
+ daemonIONiceLevel = mkOption {
+ default = 0;
+ description = "
+ Nix daemon process I/O priority. This priority propagates to build processes.
+ 0 is the default Unix process I/O priority, 7 is the lowest.
+ ";
+ };
+
+ buildMachines = mkOption {
+ default = [];
+ example = [
+ { hostName = "voila.labs.cs.uu.nl";
+ sshUser = "nix";
+ sshKey = "/root/.ssh/id_buildfarm";
+ system = "powerpc-darwin";
+ maxJobs = 1;
+ }
+ { hostName = "linux64.example.org";
+ sshUser = "buildfarm";
+ sshKey = "/root/.ssh/id_buildfarm";
+ system = "x86_64-linux";
+ maxJobs = 2;
+ supportedFeatures = "kvm";
+ mandatoryFeatures = "perf";
+ }
+ ];
+ description = ''
+ This option lists the machines to be used if distributed
+ builds are enabled (see
+
nix.distributedBuilds
). Nix will perform
+ derivations on those machines via SSH by copying the inputs
+ to the Nix store on the remote machine, starting the build,
+ then copying the output back to the local Nix store. Each
+ element of the list should be an attribute set containing
+ the machine's host name (hostname), the
+ user name to be used for the SSH connection
+ (sshUser), the Nix system type
+ (system, e.g.,
+ \"i686-linux\"), the maximum number of
+ jobs to be run in parallel on that machine
+ (maxJobs), the path to the SSH private
+ key to be used to connect (sshKey), a
+ list of supported features of the machine
+ (supportedFeatures) and a list of
+ mandatory features of the machine
+ (mandatoryFeatures). The SSH private key
+ should not have a passphrase, and the corresponding public
+ key should be added to
+ ~sshUser/authorized_keys
+ on the remote machine.
+ '';
+ };
+
+ proxy = mkOption {
+ default = "";
+ description = "
+ This option specifies the proxy to use for fetchurl. The real effect
+ is just exporting http_proxy, https_proxy and ftp_proxy with that
+ value.
+ ";
+ example = "http://127.0.0.1:3128";
+ };
+
+ # Environment variables for running Nix.
+ envVars = mkOption {
+ internal = true;
+ default = {};
+ type = types.attrs;
+ description = "Environment variables used by Nix.";
+ };
+
+ nrBuildUsers = mkOption {
+ default = 10;
+ description = ''
+ Number of nixbld user accounts created to
+ perform secure concurrent builds. If you receive an error
+ message saying that “all build users are currently in use”,
+ you should increase this value.
+ '';
+ };
+
+ readOnlyStore = mkOption {
+ default = true;
+ description = ''
+ If set, NixOS will enforce the immutability of the Nix store
+ by making /nix/store a read-only bind
+ mount. Nix will automatically make the store writable when
+ needed.
+ '';
+ };
+
+ binaryCaches = mkOption {
+ default = [ http://cache.nixos.org/ ];
+ type = types.listOf types.string;
+ description = ''
+ List of binary cache URLs used to obtain pre-built binaries
+ of Nix packages.
+ '';
+ };
+
+ trustedBinaryCaches = mkOption {
+ default = [ ];
+ example = [ http://hydra.nixos.org/ ];
+ type = types.listOf types.string;
+ description = ''
+ List of binary cache URLs that non-root users can use (in
+ addition to those specified using
+
nix.binaryCaches
by passing
+ --option binary-caches to Nix commands.
+ '';
+ };
+
+ };
+
+ };
+
+
+ ###### implementation
+
+ config = {
+
+ nix.chrootDirs = [ "/dev" "/dev/pts" "/proc" "/bin" ];
+
+ environment.etc."nix/nix.conf".source = nixConf;
+
+ # List of machines for distributed Nix builds in the format
+ # expected by build-remote.pl.
+ environment.etc."nix/machines" =
+ { enable = cfg.buildMachines != [];
+ text =
+ concatMapStrings (machine:
+ "${machine.sshUser}@${machine.hostName} "
+ + (if machine ? system then machine.system else concatStringsSep "," machine.systems)
+ + " ${machine.sshKey} ${toString machine.maxJobs} "
+ + (if machine ? speedFactor then toString machine.speedFactor else "1" )
+ + " "
+ + (if machine ? supportedFeatures then concatStringsSep "," machine.supportedFeatures else "" )
+ + " "
+ + (if machine ? mandatoryFeatures then concatStringsSep "," machine.mandatoryFeatures else "" )
+ + "\n"
+ ) cfg.buildMachines;
+ };
+
+ systemd.sockets."nix-daemon" =
+ { description = "Nix Daemon Socket";
+ wantedBy = [ "sockets.target" ];
+ before = [ "multi-user.target" ];
+ socketConfig.ListenStream = "/nix/var/nix/daemon-socket/socket";
+ };
+
+ systemd.services."nix-daemon" =
+ { description = "Nix Daemon";
+
+ path = [ nix pkgs.openssl pkgs.utillinux ]
+ ++ optionals cfg.distributedBuilds [ pkgs.openssh pkgs.gzip ];
+
+ environment = cfg.envVars // { CURL_CA_BUNDLE = "/etc/ssl/certs/ca-bundle.crt"; };
+
+ serviceConfig =
+ { ExecStart = "@${nix}/bin/nix-daemon nix-daemon --daemon";
+ KillMode = "process";
+ Nice = cfg.daemonNiceLevel;
+ IOSchedulingPriority = cfg.daemonIONiceLevel;
+ LimitNOFILE = 4096;
+ };
+
+ restartTriggers = [ nixConf ];
+ };
+
+ nix.envVars =
+ { NIX_CONF_DIR = "/etc/nix";
+
+ # Enable the copy-from-other-stores substituter, which allows
+ # builds to be sped up by copying build results from remote
+ # Nix stores. To do this, mount the remote file system on a
+ # subdirectory of /run/nix/remote-stores.
+ NIX_OTHER_STORES = "/run/nix/remote-stores/*/nix";
+ }
+
+ // optionalAttrs cfg.distributedBuilds {
+ NIX_BUILD_HOOK = "${config.environment.nix}/libexec/nix/build-remote.pl";
+ NIX_REMOTE_SYSTEMS = "/etc/nix/machines";
+ NIX_CURRENT_LOAD = "/run/nix/current-load";
+ }
+
+ # !!! These should not be defined here, but in some general proxy configuration module!
+ // optionalAttrs (cfg.proxy != "") {
+ http_proxy = cfg.proxy;
+ https_proxy = cfg.proxy;
+ ftp_proxy = cfg.proxy;
+ };
+
+ # Set up the environment variables for running Nix.
+ environment.variables = cfg.envVars;
+
+ environment.extraInit =
+ ''
+ # Set up secure multi-user builds: non-root users build through the
+ # Nix daemon.
+ if test "$USER" != root; then
+ export NIX_REMOTE=daemon
+ else
+ export NIX_REMOTE=
+ fi
+ '';
+
+ users.extraUsers = map makeNixBuildUser (range 1 cfg.nrBuildUsers);
+
+ system.activationScripts.nix = stringAfter [ "etc" "users" ]
+ ''
+ # Nix initialisation.
+ mkdir -m 0755 -p \
+ /nix/var/nix/gcroots \
+ /nix/var/nix/temproots \
+ /nix/var/nix/manifests \
+ /nix/var/nix/userpool \
+ /nix/var/nix/profiles \
+ /nix/var/nix/db \
+ /nix/var/log/nix/drvs \
+ /nix/var/nix/channel-cache \
+ /nix/var/nix/chroots
+ mkdir -m 1777 -p \
+ /nix/var/nix/gcroots/per-user \
+ /nix/var/nix/profiles/per-user \
+ /nix/var/nix/gcroots/tmp
+
+ ln -sf /nix/var/nix/profiles /nix/var/nix/gcroots/
+ ln -sf /nix/var/nix/manifests /nix/var/nix/gcroots/
+ '';
+
+ };
+
+}
diff --git a/nixos/modules/services/misc/nix-gc.nix b/nixos/modules/services/misc/nix-gc.nix
new file mode 100644
index 0000000000000000000000000000000000000000..dfdc4db65d54b1744ce094f43e0caab8da5ad2a5
--- /dev/null
+++ b/nixos/modules/services/misc/nix-gc.nix
@@ -0,0 +1,61 @@
+{ config, pkgs, ... }:
+
+with pkgs.lib;
+
+let
+ cfg = config.nix.gc;
+in
+
+{
+
+ ###### interface
+
+ options = {
+
+ nix.gc = {
+
+ automatic = mkOption {
+ default = false;
+ type = types.bool;
+ description = "Automatically run the garbage collector at a specific time.";
+ };
+
+ dates = mkOption {
+ default = "03:15";
+ type = types.uniq types.string;
+ description = ''
+ Specification (in the format described by
+ systemd.time
+ 5) of the time at
+ which the garbage collector will run.
+ '';
+ };
+
+ options = mkOption {
+ default = "";
+ example = "--max-freed $((64 * 1024**3))";
+ type = types.uniq types.string;
+ description = ''
+ Options given to nix-collect-garbage when the
+ garbage collector is run automatically.
+ '';
+ };
+
+ };
+
+ };
+
+
+ ###### implementation
+
+ config = {
+
+ systemd.services.nix-gc =
+ { description = "Nix Garbage Collector";
+ serviceConfig.ExecStart = "${config.environment.nix}/bin/nix-collect-garbage ${cfg.options}";
+ startAt = optionalString cfg.automatic cfg.dates;
+ };
+
+ };
+
+}
diff --git a/nixos/modules/services/misc/nixos-manual.nix b/nixos/modules/services/misc/nixos-manual.nix
new file mode 100644
index 0000000000000000000000000000000000000000..1260272b68e9c372eee4f566dbb034f65c230e08
--- /dev/null
+++ b/nixos/modules/services/misc/nixos-manual.nix
@@ -0,0 +1,120 @@
+# This module includes the NixOS man-pages in the system environment,
+# and optionally starts a browser that shows the NixOS manual on one
+# of the virtual consoles. The latter is useful for the installation
+# CD.
+
+{ config, pkgs, baseModules, ... } @ extraArgs:
+
+with pkgs.lib;
+
+let
+
+ cfg = config.services.nixosManual;
+
+ manual = import ../../../doc/manual {
+ inherit (cfg) revision;
+ inherit pkgs;
+ options = (fixMergeModules baseModules
+ (removeAttrs extraArgs ["config" "options"]) // {
+ modules = [ ];
+ }).options;
+ };
+
+ entry = "${manual.manual}/share/doc/nixos/manual.html";
+
+ help = pkgs.writeScriptBin "nixos-help"
+ ''
+ #! ${pkgs.stdenv.shell} -e
+ browser="$BROWSER"
+ if [ -z "$browser" ]; then
+ browser="$(type -P xdg-open || true)"
+ if [ -z "$browser" ]; then
+ browser="$(type -P w3m || true)"
+ if [ -z "$browser" ]; then
+ echo "$0: unable to start a web browser; please set \$BROWSER"
+ exit 1
+ fi
+ fi
+ fi
+ exec "$browser" ${entry}
+ '';
+
+in
+
+{
+
+ options = {
+
+ services.nixosManual.enable = mkOption {
+ default = true;
+ type = types.bool;
+ description = ''
+ Whether to build the NixOS manual pages.
+ '';
+ };
+
+ services.nixosManual.showManual = mkOption {
+ default = false;
+ description = ''
+ Whether to show the NixOS manual on one of the virtual
+ consoles.
+ '';
+ };
+
+ services.nixosManual.ttyNumber = mkOption {
+ default = "8";
+ description = ''
+ Virtual console on which to show the manual.
+ '';
+ };
+
+ services.nixosManual.browser = mkOption {
+ default = "${pkgs.w3m}/bin/w3m";
+ description = ''
+ Browser used to show the manual.
+ '';
+ };
+
+ services.nixosManual.revision = mkOption {
+ default = "local";
+ type = types.uniq types.string;
+ description = ''
+ Revision of the targeted source file. This value can either be
+ "local", "HEAD" or any
+ revision number embedded in a string.
+ '';
+ };
+
+ };
+
+
+ config = mkIf cfg.enable {
+
+ system.build.manual = manual;
+
+ environment.systemPackages = [ manual.manpages help ];
+
+ boot.extraTTYs = mkIf cfg.showManual ["tty${cfg.ttyNumber}"];
+
+ systemd.services = optionalAttrs cfg.showManual
+ { "nixos-manual" =
+ { description = "NixOS Manual";
+ wantedBy = [ "multi-user.target" ];
+ serviceConfig =
+ { ExecStart = "${cfg.browser} ${entry}";
+ StandardInput = "tty";
+ StandardOutput = "tty";
+ TTYPath = "/dev/tty${cfg.ttyNumber}";
+ TTYReset = true;
+ TTYVTDisallocate = true;
+ Restart = "always";
+ };
+ };
+ };
+
+ services.mingetty.helpLine = mkIf cfg.showManual
+ "\nPress for the NixOS manual.";
+
+ };
+
+}
diff --git a/nixos/modules/services/misc/rogue.nix b/nixos/modules/services/misc/rogue.nix
new file mode 100644
index 0000000000000000000000000000000000000000..94fa885075044aa307d367ecb7fd8668434e87ab
--- /dev/null
+++ b/nixos/modules/services/misc/rogue.nix
@@ -0,0 +1,59 @@
+# Execute the game `rogue' on tty 9. Mostly used by the NixOS
+# installation CD.
+
+{ config, pkgs, ... }:
+
+with pkgs.lib;
+
+let
+
+ cfg = config.services.rogue;
+
+in
+
+{
+ ###### interface
+
+ options = {
+
+ services.rogue.enable = mkOption {
+ default = false;
+ description = ''
+ Whether to enable the Rogue game on one of the virtual
+ consoles.
+ '';
+ };
+
+ services.rogue.tty = mkOption {
+ default = "tty9";
+ description = ''
+ Virtual console on which to run Rogue.
+ '';
+ };
+
+ };
+
+
+ ###### implementation
+
+ config = mkIf cfg.enable {
+
+ boot.extraTTYs = [ cfg.tty ];
+
+ systemd.services.rogue =
+ { description = "Rogue dungeon crawling game";
+ wantedBy = [ "multi-user.target" ];
+ serviceConfig =
+ { ExecStart = "${pkgs.rogue}/bin/rogue";
+ StandardInput = "tty";
+ StandardOutput = "tty";
+ TTYPath = "/dev/${cfg.tty}";
+ TTYReset = true;
+ TTYVTDisallocate = true;
+ Restart = "always";
+ };
+ };
+
+ };
+
+}
diff --git a/nixos/modules/services/misc/svnserve.nix b/nixos/modules/services/misc/svnserve.nix
new file mode 100644
index 0000000000000000000000000000000000000000..b0806d14738b0b6ab9eb13b0bda838f59b85037b
--- /dev/null
+++ b/nixos/modules/services/misc/svnserve.nix
@@ -0,0 +1,46 @@
+# SVN server
+{ config, pkgs, ... }:
+
+with pkgs.lib;
+
+let
+
+ cfg = config.services.svnserve;
+
+in
+
+{
+
+ ###### interface
+
+ options = {
+
+ services.svnserve = {
+
+ enable = mkOption {
+ default = false;
+ description = "Whether to enable svnserve to serve Subversion repositories through the SVN protocol.";
+ };
+
+ svnBaseDir = mkOption {
+ default = "/repos";
+ description = "Base directory from which Subversion repositories are accessed.";
+ };
+ };
+
+ };
+
+
+ ###### implementation
+
+ config = mkIf cfg.enable {
+ jobs.svnserve = {
+ startOn = "started network-interfaces";
+ stopOn = "stopping network-interfaces";
+
+ preStart = "mkdir -p ${cfg.svnBaseDir}";
+
+ exec = "${pkgs.subversion}/bin/svnserve -r ${cfg.svnBaseDir} -d --foreground --pid-file=/var/run/svnserve.pid";
+ };
+ };
+}
diff --git a/nixos/modules/services/misc/synergy.nix b/nixos/modules/services/misc/synergy.nix
new file mode 100644
index 0000000000000000000000000000000000000000..91c0acb0bc2c4925347b1132fd1bec2e88fcf2a1
--- /dev/null
+++ b/nixos/modules/services/misc/synergy.nix
@@ -0,0 +1,131 @@
+{ config, pkgs, ... }:
+
+with pkgs.lib;
+
+let
+
+ cfgC = config.services.synergy.client;
+ cfgS = config.services.synergy.server;
+
+in
+
+{
+ ###### interface
+
+ options = {
+
+ services.synergy = {
+
+ # !!! All these option descriptions needs to be cleaned up.
+
+ client = {
+ enable = mkOption {
+ default = false;
+ description = "
+ Whether to enable the synergy client (receive keyboard and mouse events from a synergy server)
+ ";
+ };
+ screenName = mkOption {
+ default = "";
+ description = "
+ use screen-name instead the hostname to identify
+ ourselves to the server.
+ ";
+ };
+ serverAddress = mkOption {
+ description = "
+ The server address is of the form: [hostname][:port]. The
+ hostname must be the address or hostname of the server. The
+ port overrides the default port, 24800.
+ ";
+ };
+ autoStart = mkOption {
+ default = true;
+ type = types.bool;
+ description = "Whether synergy-client should be started automatically.";
+ };
+ };
+
+ server = {
+ enable = mkOption {
+ default = false;
+ description = "
+ Whether to enable the synergy server (send keyboard and mouse events)
+ ";
+ };
+ configFile = mkOption {
+ default = "/etc/synergy-server.conf";
+ description = "
+ The synergy server configuration file. open upstart-jobs/synergy.nix to see an example
+ ";
+ };
+ screenName = mkOption {
+ default = "";
+ description = "
+ use screen-name instead the hostname to identify
+ this screen in the configuration.
+ ";
+ };
+ address = mkOption {
+ default = "";
+ description = "listen for clients on the given address";
+ };
+ autoStart = mkOption {
+ default = true;
+ type = types.bool;
+ description = "Whether synergy-server should be started automatically.";
+ };
+ };
+ };
+
+ };
+
+
+ ###### implementation
+
+ config = {
+
+ systemd.services."synergy-client" = mkIf cfgC.enable {
+ after = [ "network.target" ];
+ description = "Synergy client";
+ wantedBy = optional cfgC.autoStart "multi-user.target";
+ path = [ pkgs.synergy ];
+ serviceConfig.ExecStart = ''${pkgs.synergy}/bin/synergyc -f ${optionalString (cfgC.screenName != "") "-n ${cfgC.screenName}"} ${cfgC.serverAddress}'';
+ };
+
+ systemd.services."synergy-server" = mkIf cfgS.enable {
+ after = [ "network.target" ];
+ description = "Synergy server";
+ wantedBy = optional cfgS.autoStart "multi-user.target";
+ path = [ pkgs.synergy ];
+ serviceConfig.ExecStart = ''${pkgs.synergy}/bin/synergys -c ${cfgS.configFile} -f ${optionalString (cfgS.address != "") "-a ${cfgS.address}"} ${optionalString (cfgS.screenName != "") "-n ${cfgS.screenName}" }'';
+ };
+
+ };
+
+}
+
+/* SYNERGY SERVER example configuration file
+section: screens
+ laptop:
+ dm:
+ win:
+end
+section: aliases
+ laptop:
+ 192.168.5.5
+ dm:
+ 192.168.5.78
+ win:
+ 192.168.5.54
+end
+section: links
+ laptop:
+ left = dm
+ dm:
+ right = laptop
+ left = win
+ win:
+ right = dm
+end
+*/
diff --git a/nixos/modules/services/monitoring/apcupsd.nix b/nixos/modules/services/monitoring/apcupsd.nix
new file mode 100644
index 0000000000000000000000000000000000000000..114bad5c947e8ea29e2bed443abef83906f47d52
--- /dev/null
+++ b/nixos/modules/services/monitoring/apcupsd.nix
@@ -0,0 +1,190 @@
+{ config, pkgs, ... }:
+
+with pkgs.lib;
+
+let
+ cfg = config.services.apcupsd;
+
+ configFile = pkgs.writeText "apcupsd.conf" ''
+ ## apcupsd.conf v1.1 ##
+ # apcupsd complains if the first line is not like above.
+ ${cfg.configText}
+ SCRIPTDIR ${toString scriptDir}
+ '';
+
+ # List of events from "man apccontrol"
+ eventList = [
+ "annoyme"
+ "battattach"
+ "battdetach"
+ "changeme"
+ "commfailure"
+ "commok"
+ "doreboot"
+ "doshutdown"
+ "emergency"
+ "failing"
+ "killpower"
+ "loadlimit"
+ "mainsback"
+ "onbattery"
+ "offbattery"
+ "powerout"
+ "remotedown"
+ "runlimit"
+ "timeout"
+ "startselftest"
+ "endselftest"
+ ];
+
+ shellCmdsForEventScript = eventname: commands: ''
+ echo "#!${pkgs.stdenv.shell}" > "$out/${eventname}"
+ echo "${commands}" >> "$out/${eventname}"
+ chmod a+x "$out/${eventname}"
+ '';
+
+ eventToShellCmds = event: if builtins.hasAttr event cfg.hooks then (shellCmdsForEventScript event (builtins.getAttr event cfg.hooks)) else "";
+
+ scriptDir = pkgs.runCommand "apcupsd-scriptdir" {} (''
+ mkdir "$out"
+ # Copy SCRIPTDIR from apcupsd package
+ cp -r ${pkgs.apcupsd}/etc/apcupsd/* "$out"/
+ # Make the files writeable (nix will unset the write bits afterwards)
+ chmod u+w "$out"/*
+ # Remove the sample event notification scripts, because they don't work
+ # anyways (they try to send mail to "root" with the "mail" command)
+ (cd "$out" && rm changeme commok commfailure onbattery offbattery)
+ # Remove the sample apcupsd.conf file (we're generating our own)
+ rm "$out/apcupsd.conf"
+ # Set the SCRIPTDIR= line in apccontrol to the dir we're creating now
+ sed -i -e "s|^SCRIPTDIR=.*|SCRIPTDIR=$out|" "$out/apccontrol"
+ '' + concatStringsSep "\n" (map eventToShellCmds eventList)
+
+ );
+
+in
+
+{
+
+ ###### interface
+
+ options = {
+
+ services.apcupsd = {
+
+ enable = mkOption {
+ default = false;
+ type = types.uniq types.bool;
+ description = ''
+ Whether to enable the APC UPS daemon. apcupsd monitors your UPS and
+ permits orderly shutdown of your computer in the event of a power
+ failure. User manual: http://www.apcupsd.com/manual/manual.html.
+ Note that apcupsd runs as root (to allow shutdown of computer).
+ You can check the status of your UPS with the "apcaccess" command.
+ '';
+ };
+
+ configText = mkOption {
+ default = ''
+ UPSTYPE usb
+ NISIP 127.0.0.1
+ BATTERYLEVEL 50
+ MINUTES 5
+ '';
+ type = types.string;
+ description = ''
+ Contents of the runtime configuration file, apcupsd.conf. The default
+ settings makes apcupsd autodetect USB UPSes, limit network access to
+ localhost and shutdown the system when the battery level is below 50
+ percent, or when the UPS has calculated that it has 5 minutes or less
+ of remaining power-on time. See man apcupsd.conf for details.
+ '';
+ };
+
+ hooks = mkOption {
+ default = {};
+ example = {
+ doshutdown = ''# shell commands to notify that the computer is shutting down'';
+ };
+ type = types.attrsOf types.string;
+ description = ''
+ Each attribute in this option names an apcupsd event and the string
+ value it contains will be executed in a shell, in response to that
+ event (prior to the default action). See "man apccontrol" for the
+ list of events and what they represent.
+
+ A hook script can stop apccontrol from doing its default action by
+ exiting with value 99. Do not do this unless you know what you're
+ doing.
+ '';
+ };
+
+ };
+
+ };
+
+
+ ###### implementation
+
+ config = mkIf cfg.enable {
+
+ assertions = [ {
+ assertion = let hooknames = builtins.attrNames cfg.hooks; in all (x: elem x eventList) hooknames;
+ message = ''
+ One (or more) attribute names in services.apcupsd.hooks are invalid.
+ Current attribute names: ${toString (builtins.attrNames cfg.hooks)}
+ Valid attribute names : ${toString eventList}
+ '';
+ } ];
+
+ # Give users access to the "apcaccess" tool
+ environment.systemPackages = [ pkgs.apcupsd ];
+
+ # NOTE 1: apcupsd runs as root because it needs permission to run
+ # "shutdown"
+ #
+ # NOTE 2: When apcupsd calls "wall", it prints an error because stdout is
+ # not connected to a tty (it is connected to the journal):
+ # wall: cannot get tty name: Inappropriate ioctl for device
+ # The message still gets through.
+ systemd.services.apcupsd = {
+ description = "APC UPS daemon";
+ wantedBy = [ "multi-user.target" ];
+ preStart = "mkdir -p /run/apcupsd/";
+ serviceConfig = {
+ ExecStart = "${pkgs.apcupsd}/bin/apcupsd -b -f ${configFile} -d1";
+ # TODO: When apcupsd has initiated a shutdown, systemd always ends up
+ # waiting for it to stop ("A stop job is running for UPS daemon"). This
+ # is weird, because in the journal one can clearly see that apcupsd has
+ # received the SIGTERM signal and has already quit (or so it seems).
+ # This reduces the wait time from 90 seconds (default) to just 5. Then
+ # systemd kills it with SIGKILL.
+ TimeoutStopSec = 5;
+ };
+ };
+
+ # A special service to tell the UPS to power down/hibernate just before the
+ # computer shuts down. (The UPS has a built in delay before it actually
+ # shuts off power.) Copied from here:
+ # http://forums.opensuse.org/english/get-technical-help-here/applications/479499-apcupsd-systemd-killpower-issues.html
+ systemd.services.apcupsd-killpower = {
+ after = [ "shutdown.target" ]; # append umount.target?
+ before = [ "final.target" ];
+ wantedBy = [ "shutdown.target" ];
+ unitConfig = {
+ Description = "APC UPS killpower";
+ ConditionPathExists = "/run/apcupsd/powerfail";
+ DefaultDependencies = "no";
+ };
+ serviceConfig = {
+ Type = "oneshot";
+ ExecStart = "${pkgs.apcupsd}/bin/apcupsd --killpower -f ${configFile}";
+ TimeoutSec = 0;
+ StandardOutput = "tty";
+ RemainAfterExit = "yes";
+ };
+ };
+
+ };
+
+}
diff --git a/nixos/modules/services/monitoring/dd-agent.nix b/nixos/modules/services/monitoring/dd-agent.nix
new file mode 100644
index 0000000000000000000000000000000000000000..ef658523c1f34d11e6be0566ccb7902af46b652f
--- /dev/null
+++ b/nixos/modules/services/monitoring/dd-agent.nix
@@ -0,0 +1,83 @@
+{ config, pkgs, ... }:
+
+with pkgs.lib;
+
+let
+ cfg = config.services.dd-agent;
+
+ datadog_conf = pkgs.runCommand "datadog.conf" {} ''
+ sed -e 's|^api_key:|api_key: ${cfg.api_key}|' ${optionalString (cfg.hostname != null)
+ "-e 's|^#hostname: mymachine.mydomain|hostname: ${cfg.hostname}|'"
+ } ${pkgs.dd-agent}/etc/dd-agent/datadog.conf.example > $out
+ '';
+in {
+ options.services.dd-agent = {
+ enable = mkOption {
+ description = "Whether to enable the dd-agent montioring service";
+
+ default = false;
+
+ type = types.bool;
+ };
+
+ # !!! This gets stored in the store (world-readable), wish we had https://github.com/NixOS/nix/issues/8
+ api_key = mkOption {
+ description = "The Datadog API key to associate the agent with your account";
+
+ example = "ae0aa6a8f08efa988ba0a17578f009ab";
+
+ type = types.uniq types.string;
+ };
+
+ hostname = mkOption {
+ description = "The hostname to show in the Datadog dashboard (optional)";
+
+ default = null;
+
+ example = "mymachine.mydomain";
+
+ type = types.uniq (types.nullOr types.string);
+ };
+ };
+
+ config = mkIf cfg.enable {
+ environment.etc = [ { source = datadog_conf; target = "dd-agent/datadog.conf"; } ];
+ environment.systemPackages = [ pkgs."dd-agent" pkgs.sysstat pkgs.procps ];
+
+ users.extraUsers."dd-agent" = {
+ description = "Datadog Agent User";
+ uid = config.ids.uids.dd-agent;
+ group = "dd-agent";
+ home = "/var/log/datadog/";
+ createHome = true;
+ };
+
+ users.extraGroups.dd-agent.gid = config.ids.gids.dd-agent;
+
+ systemd.services.dd-agent = {
+ description = "Datadog agent monitor";
+ path = [ pkgs."dd-agent" pkgs.python pkgs.sysstat pkgs.procps];
+ wantedBy = [ "multi-user.target" ];
+ serviceConfig = {
+ ExecStart = "${pkgs.dd-agent}/bin/dd-agent foreground";
+ User = "dd-agent";
+ Group = "dd-agent";
+ };
+ restartTriggers = [ pkgs.dd-agent datadog_conf ];
+ };
+
+ systemd.services.dogstatsd = {
+ description = "Datadog statsd";
+ path = [ pkgs."dd-agent" pkgs.python ];
+ wantedBy = [ "multi-user.target" ];
+ serviceConfig = {
+ ExecStart = "${pkgs.dd-agent}/bin/dogstatsd start";
+ User = "dd-agent";
+ Group = "dd-agent";
+ Type = "forking";
+ PIDFile = "/tmp/dogstatsd.pid";
+ };
+ restartTriggers = [ pkgs.dd-agent datadog_conf ];
+ };
+ };
+}
diff --git a/nixos/modules/services/monitoring/graphite.nix b/nixos/modules/services/monitoring/graphite.nix
new file mode 100644
index 0000000000000000000000000000000000000000..7fa3ab22b0018551aae6c98f536ecd5b4b01be03
--- /dev/null
+++ b/nixos/modules/services/monitoring/graphite.nix
@@ -0,0 +1,262 @@
+{ config, pkgs, ... }:
+
+with pkgs.lib;
+
+let
+ cfg = config.services.graphite;
+ writeTextOrNull = f: t: if t == null then null else pkgs.writeText f t;
+
+ dataDir = "/var/db/graphite";
+ carbonOpts = name: with config.ids; ''
+ --nodaemon --syslog --prefix=${name} \
+ --uid ${toString uids.graphite} --gid ${toString uids.graphite} ${name}
+ '';
+ carbonEnv = {
+ PYTHONPATH = "${pkgs.python27Packages.carbon}/lib/python2.7/site-packages";
+ GRAPHITE_ROOT = dataDir;
+ GRAPHITE_CONF_DIR = "/etc/graphite/";
+ };
+
+in {
+
+ ###### interface
+
+ options.services.graphite = {
+ web = {
+ enable = mkOption {
+ description = "Whether to enable graphite web frontend";
+ default = false;
+ type = types.uniq types.bool;
+ };
+
+ host = mkOption {
+ description = "Graphite web frontend listen address";
+ default = "127.0.0.1";
+ types = type.uniq types.string;
+ };
+
+ port = mkOption {
+ description = "Graphite web frontend port";
+ default = "8080";
+ types = type.uniq types.string;
+ };
+ };
+
+ carbon = {
+ config = mkOption {
+ description = "Content of carbon configuration file";
+ default = ''
+ [cache]
+ # Listen on localhost by default for security reasons
+ UDP_RECEIVER_INTERFACE = 127.0.0.1
+ PICKLE_RECEIVER_INTERFACE = 127.0.0.1
+ LINE_RECEIVER_INTERFACE = 127.0.0.1
+ CACHE_QUERY_INTERFACE = 127.0.0.1
+ '';
+ type = types.uniq types.string;
+ };
+
+ enableCache = mkOption {
+ description = "Whether to enable carbon cache, the graphite storage daemon";
+ default = false;
+ type = types.uniq types.bool;
+ };
+
+ storageAggregation = mkOption {
+ description = "Defines how to aggregate data to lower-precision retentions";
+ default = null;
+ type = types.uniq (types.nullOr types.string);
+ example = ''
+ [all_min]
+ pattern = \.min$
+ xFilesFactor = 0.1
+ aggregationMethod = min
+ '';
+ };
+
+ storageSchemas = mkOption {
+ description = "Defines retention rates for storing metrics";
+ default = "";
+ type = types.uniq (types.nullOr types.string);
+ example = ''
+ [apache_busyWorkers]
+ pattern = ^servers\.www.*\.workers\.busyWorkers$
+ retentions = 15s:7d,1m:21d,15m:5y
+ '';
+ };
+
+ blacklist = mkOption {
+ description = "Any metrics received which match one of the experssions will be dropped";
+ default = null;
+ type = types.uniq (types.nullOr types.string);
+ example = "^some\.noisy\.metric\.prefix\..*";
+ };
+
+ whitelist = mkOption {
+ description = "Only metrics received which match one of the experssions will be persisted";
+ default = null;
+ type = types.uniq (types.nullOr types.string);
+ example = ".*";
+ };
+
+ rewriteRules = mkOption {
+ description = "Regular expression patterns that can be used to rewrite metric names in a search and replace fashion";
+ default = null;
+ type = types.uniq (types.nullOr types.string);
+ example = ''
+ [post]
+ _sum$ =
+ _avg$ =
+ '';
+ };
+
+ enableRelay = mkOption {
+ description = "Whether to enable carbon relay, the carbon replication and sharding service";
+ default = false;
+ type = types.uniq types.bool;
+ };
+
+ relayRules = mkOption {
+ description = "Relay rules are used to send certain metrics to a certain backend.";
+ default = null;
+ type = types.uniq (types.nullOr types.string);
+ example = ''
+ [example]
+ pattern = ^mydata\.foo\..+
+ servers = 10.1.2.3, 10.1.2.4:2004, myserver.mydomain.com
+ '';
+ };
+
+ enableAggregator = mkOption {
+ description = "Whether to enable carbon agregator, the carbon buffering service";
+ default = false;
+ type = types.uniq types.bool;
+ };
+
+ aggregationRules = mkOption {
+ description = "Defines if and how received metrics will be agregated";
+ default = null;
+ type = types.uniq (types.nullOr types.string);
+ example = ''
+ .applications..all.requests (60) = sum .applications..*.requests
+ .applications..all.latency (60) = avg .applications..*.latency
+ '';
+ };
+ };
+ };
+
+ ###### implementation
+
+ config = mkIf (cfg.carbon.enableAggregator || cfg.carbon.enableCache || cfg.carbon.enableRelay || cfg.web.enable) {
+ environment.etc = lists.filter (el: el.source != null) [
+ { source = writeTextOrNull "carbon.conf" cfg.carbon.config;
+ target = "graphite/carbon.conf"; }
+ { source = writeTextOrNull "storage-agregation.conf" cfg.carbon.storageAggregation;
+ target = "graphite/storage-agregation.conf"; }
+ { source = writeTextOrNull "storage-schemas.conf" cfg.carbon.storageSchemas;
+ target = "graphite/storage-schemas.conf"; }
+ { source = writeTextOrNull "blacklist.conf" cfg.carbon.blacklist;
+ target = "graphite/blacklist.conf"; }
+ { source = writeTextOrNull "whitelist.conf" cfg.carbon.whitelist;
+ target = "graphite/whitelist.conf"; }
+ { source = writeTextOrNull "rewrite-rules.conf" cfg.carbon.rewriteRules;
+ target = "graphite/rewrite-rules.conf"; }
+ { source = writeTextOrNull "relay-rules.conf" cfg.carbon.relayRules;
+ target = "graphite/relay-rules.conf"; }
+ { source = writeTextOrNull "aggregation-rules.conf" cfg.carbon.aggregationRules;
+ target = "graphite/aggregation-rules.conf"; }
+ ];
+
+ systemd.services.carbonCache = mkIf cfg.carbon.enableCache {
+ description = "Graphite data storage backend";
+ wantedBy = [ "multi-user.target" ];
+ after = [ "network-interfaces.target" ];
+ environment = carbonEnv;
+ serviceConfig.ExecStart = "${pkgs.twisted}/bin/twistd ${carbonOpts "carbon-cache"}";
+ restartTriggers = [
+ pkgs.pythonPackages.carbon
+ cfg.carbon.config
+ cfg.carbon.storageAggregation
+ cfg.carbon.storageSchemas
+ cfg.carbon.rewriteRules
+ ];
+ preStart = ''
+ mkdir -p ${dataDir}/whisper
+ '';
+ };
+
+ systemd.services.carbonAggregator = mkIf cfg.carbon.enableAggregator {
+ description = "Carbon data aggregator";
+ wantedBy = [ "multi-user.target" ];
+ after = [ "network-interfaces.target" ];
+ environment = carbonEnv;
+ serviceConfig.ExecStart = "${pkgs.twisted}/bin/twistd ${carbonOpts "carbon-aggregator"}";
+ restartTriggers = [
+ pkgs.pythonPackages.carbon cfg.carbon.config cfg.carbon.aggregationRules
+ ];
+ };
+
+ systemd.services.carbonRelay = mkIf cfg.carbon.enableRelay {
+ description = "Carbon data relay";
+ wantedBy = [ "multi-user.target" ];
+ after = [ "network-interfaces.target" ];
+ environment = carbonEnv;
+ serviceConfig.ExecStart = "${pkgs.twisted}/bin/twistd ${carbonOpts "carbon-relay"}";
+ restartTriggers = [
+ pkgs.pythonPackages.carbon cfg.carbon.config cfg.carbon.relayRules
+ ];
+ };
+
+ systemd.services.graphiteWeb = mkIf cfg.web.enable {
+ description = "Graphite web interface";
+ wantedBy = [ "multi-user.target" ];
+ after = [ "network-interfaces.target" ];
+ environment = {
+ PYTHONPATH = "${pkgs.python27Packages.graphite_web}/lib/python2.7/site-packages";
+ DJANGO_SETTINGS_MODULE = "graphite.settings";
+ GRAPHITE_CONF_DIR = "/etc/graphite/";
+ GRAPHITE_STORAGE_DIR = dataDir;
+ };
+ serviceConfig = {
+ ExecStart = ''
+ ${pkgs.python27Packages.waitress}/bin/waitress-serve \
+ --host=${cfg.web.host} --port=${cfg.web.port} \
+ --call django.core.handlers.wsgi:WSGIHandler'';
+ User = "graphite";
+ Group = "graphite";
+ };
+ preStart = ''
+ if ! test -e ${dataDir}/db-created; then
+ mkdir -p ${dataDir}/{whisper/,log/webapp/}
+
+ # populate database
+ ${pkgs.python27Packages.graphite_web}/bin/manage-graphite.py syncdb --noinput
+
+ # create index
+ ${pkgs.python27Packages.graphite_web}/bin/build-index.sh
+
+ touch ${dataDir}/db-created
+ fi
+ '';
+ restartTriggers = [
+ pkgs.python27Packages.graphite_web
+ pkgs.python27Packages.waitress
+ ];
+ };
+
+ environment.systemPackages = [
+ pkgs.pythonPackages.carbon
+ pkgs.python27Packages.graphite_web
+ pkgs.python27Packages.waitress
+ ];
+
+ users.extraUsers = singleton {
+ name = "graphite";
+ uid = config.ids.uids.graphite;
+ description = "Graphite daemon user";
+ home = dataDir;
+ createHome = true;
+ };
+ users.extraGroups.graphite.gid = config.ids.gids.graphite;
+ };
+}
diff --git a/nixos/modules/services/monitoring/monit.nix b/nixos/modules/services/monitoring/monit.nix
new file mode 100644
index 0000000000000000000000000000000000000000..2acc51c64a6aa5a876f76722865cd030920c8cf0
--- /dev/null
+++ b/nixos/modules/services/monitoring/monit.nix
@@ -0,0 +1,52 @@
+# Monit system watcher
+# http://mmonit.org/monit/
+
+{config, pkgs, ...}:
+
+let inherit (pkgs.lib) mkOption mkIf;
+in
+
+{
+ options = {
+ services.monit = {
+ enable = mkOption {
+ default = false;
+ description = ''
+ Whether to run Monit system watcher.
+ '';
+ };
+ config = mkOption {
+ default = "";
+ description = "monit.conf content";
+ };
+ startOn = mkOption {
+ default = "started network-interfaces";
+ description = "What Monit supposes to be already present";
+ };
+ };
+ };
+
+ config = mkIf config.services.monit.enable {
+
+ environment.etc = [
+ {
+ source = pkgs.writeTextFile {
+ name = "monit.conf";
+ text = config.services.monit.config;
+ };
+ target = "monit.conf";
+ mode = "0400";
+ }
+ ];
+
+ jobs.monit = {
+ description = "Monit system watcher";
+
+ startOn = config.services.monit.startOn;
+
+ exec = "${pkgs.monit}/bin/monit -I -c /etc/monit.conf";
+
+ respawn = true;
+ };
+ };
+}
diff --git a/nixos/modules/services/monitoring/nagios/commands.cfg b/nixos/modules/services/monitoring/nagios/commands.cfg
new file mode 100644
index 0000000000000000000000000000000000000000..6efdefcd37dcdc2236bde864d0bc81c6b676782d
--- /dev/null
+++ b/nixos/modules/services/monitoring/nagios/commands.cfg
@@ -0,0 +1,34 @@
+define command {
+ command_name host-notify-by-email
+ command_line printf "%b" "To: $CONTACTEMAIL$\nSubject: [Nagios] Host $HOSTSTATE$ alert for $HOSTNAME$\n\n***** Nagios *****\n\nNotification Type: $NOTIFICATIONTYPE$\nHost: $HOSTNAME$\nState: $HOSTSTATE$\nAddress: $HOSTADDRESS$\nInfo: $HOSTOUTPUT$\n\nDate/Time: $LONGDATETIME$\n" | sendmail $CONTACTEMAIL$
+}
+
+
+define command {
+ command_name notify-by-email
+ command_line printf "%b" "To: $CONTACTEMAIL$\nSubject: [Nagios] $NOTIFICATIONTYPE$ alert - $HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$\n\n***** Nagios *****\n\nNotification Type: $NOTIFICATIONTYPE$\nService: $SERVICEDESC$\nHost: $HOSTALIAS$\nAddress: $HOSTADDRESS$\nState: $SERVICESTATE$\n\nDate/Time: $LONGDATETIME$\n\nAdditional Info:\n\n$SERVICEOUTPUT$" | sendmail $CONTACTEMAIL$
+}
+
+
+define command {
+ command_name dummy-ok
+ command_line true
+}
+
+
+define command {
+ command_name check-host-alive
+ command_line check_ping -H $HOSTADDRESS$ -w 3000.0,80% -c 5000.0,100% -p 1
+}
+
+
+define command {
+ command_name check_local_disk
+ command_line check_disk -w $ARG1$ -c $ARG2$ -p $ARG3$
+}
+
+
+define command {
+ command_name check_ssh
+ command_line check_ssh $HOSTADDRESS$
+}
diff --git a/nixos/modules/services/monitoring/nagios/default.nix b/nixos/modules/services/monitoring/nagios/default.nix
new file mode 100644
index 0000000000000000000000000000000000000000..c809a3b84573fbe3ca7b37be8c15e9e67cfbbaa7
--- /dev/null
+++ b/nixos/modules/services/monitoring/nagios/default.nix
@@ -0,0 +1,186 @@
+# Nagios system/network monitoring daemon.
+{ config, pkgs, ... }:
+
+with pkgs.lib;
+
+let
+
+ cfg = config.services.nagios;
+
+ nagiosUser = "nagios";
+ nagiosGroup = "nogroup";
+
+ nagiosState = "/var/lib/nagios";
+ nagiosLogDir = "/var/log/nagios";
+
+ nagiosObjectDefs =
+ [ ./timeperiods.cfg
+ ./host-templates.cfg
+ ./service-templates.cfg
+ ./commands.cfg
+ ] ++ cfg.objectDefs;
+
+ nagiosObjectDefsDir = pkgs.runCommand "nagios-objects" {inherit nagiosObjectDefs;}
+ "ensureDir $out; ln -s $nagiosObjectDefs $out/";
+
+ nagiosCfgFile = pkgs.writeText "nagios.cfg"
+ ''
+ # Paths for state and logs.
+ log_file=${nagiosLogDir}/current
+ log_archive_path=${nagiosLogDir}/archive
+ status_file=${nagiosState}/status.dat
+ object_cache_file=${nagiosState}/objects.cache
+ comment_file=${nagiosState}/comment.dat
+ downtime_file=${nagiosState}/downtime.dat
+ temp_file=${nagiosState}/nagios.tmp
+ lock_file=/var/run/nagios.lock # Not used I think.
+ state_retention_file=${nagiosState}/retention.dat
+
+ # Configuration files.
+ #resource_file=resource.cfg
+ cfg_dir=${nagiosObjectDefsDir}
+
+ # Uid/gid that the daemon runs under.
+ nagios_user=${nagiosUser}
+ nagios_group=${nagiosGroup}
+
+ # Misc. options.
+ illegal_macro_output_chars=`~$&|'"<>
+ retain_state_information=1
+ ''; # "
+
+ # Plain configuration for the Nagios web-interface with no
+ # authentication.
+ nagiosCGICfgFile = pkgs.writeText "nagios.cgi.conf"
+ ''
+ main_config_file=${nagiosCfgFile}
+ use_authentication=0
+ url_html_path=/nagios
+ '';
+
+ urlPath = cfg.urlPath;
+
+ extraHttpdConfig =
+ ''
+ ScriptAlias ${urlPath}/cgi-bin ${pkgs.nagios}/sbin
+
+
+ Options ExecCGI
+ AllowOverride None
+ Order allow,deny
+ Allow from all
+ SetEnv NAGIOS_CGI_CONFIG ${nagiosCGICfgFile}
+
+
+ Alias ${urlPath} ${pkgs.nagios}/share
+
+
+ Options None
+ AllowOverride None
+ Order allow,deny
+ Allow from all
+
+ '';
+
+in
+
+{
+ ###### interface
+
+ options = {
+
+ services.nagios = {
+
+ enable = mkOption {
+ default = false;
+ description = "
+ Whether to use Nagios to monitor
+ your system or network.
+ ";
+ };
+
+ objectDefs = mkOption {
+ description = "
+ A list of Nagios object configuration files that must define
+ the hosts, host groups, services and contacts for the
+ network that you want Nagios to monitor.
+ ";
+ };
+
+ plugins = mkOption {
+ default = [pkgs.nagiosPluginsOfficial pkgs.ssmtp];
+ description = "
+ Packages to be added to the Nagios PATH.
+ Typically used to add plugins, but can be anything.
+ ";
+ };
+
+ enableWebInterface = mkOption {
+ default = false;
+ description = "
+ Whether to enable the Nagios web interface. You should also
+ enable Apache (
services.httpd.enable
).
+ ";
+ };
+
+ urlPath = mkOption {
+ default = "/nagios";
+ description = "
+ The URL path under which the Nagios web interface appears.
+ That is, you can access the Nagios web interface through
+ http://server/urlPath.
+ ";
+ };
+
+ };
+
+ };
+
+
+ ###### implementation
+
+ config = mkIf cfg.enable {
+
+ users.extraUsers = singleton
+ { name = nagiosUser;
+ uid = config.ids.uids.nagios;
+ description = "Nagios monitoring daemon";
+ home = nagiosState;
+ };
+
+ # This isn't needed, it's just so that the user can type "nagiostats
+ # -c /etc/nagios.cfg".
+ environment.etc = singleton
+ { source = nagiosCfgFile;
+ target = "nagios.cfg";
+ };
+
+ environment.systemPackages = [ pkgs.nagios ];
+
+ jobs.nagios =
+ { description = "Nagios monitoring daemon";
+
+ startOn = "started network-interfaces";
+ stopOn = "stopping network-interfaces";
+
+ preStart =
+ ''
+ mkdir -m 0755 -p ${nagiosState} ${nagiosLogDir}
+ chown ${nagiosUser} ${nagiosState} ${nagiosLogDir}
+ '';
+
+ script =
+ ''
+ for i in ${toString config.services.nagios.plugins}; do
+ export PATH=$i/bin:$i/sbin:$i/libexec:$PATH
+ done
+ exec ${pkgs.nagios}/bin/nagios ${nagiosCfgFile}
+ '';
+ };
+
+ services.httpd.extraConfig = optionalString cfg.enableWebInterface extraHttpdConfig;
+
+ };
+
+}
diff --git a/nixos/modules/services/monitoring/nagios/host-templates.cfg b/nixos/modules/services/monitoring/nagios/host-templates.cfg
new file mode 100644
index 0000000000000000000000000000000000000000..3a4c269e25721b3a1a10e4cedd4e1cb3a030959b
--- /dev/null
+++ b/nixos/modules/services/monitoring/nagios/host-templates.cfg
@@ -0,0 +1,27 @@
+define host {
+ name generic-host
+ notifications_enabled 1
+ event_handler_enabled 1
+ flap_detection_enabled 1
+ failure_prediction_enabled 1
+ process_perf_data 1
+ retain_status_information 1
+ retain_nonstatus_information 1
+ notification_period 24x7
+ register 0
+}
+
+
+define host {
+ name generic-server
+ use generic-host
+ check_period 24x7
+ max_check_attempts 10
+ check_command check-host-alive
+ notification_period 24x7
+ notification_interval 120
+ notification_options d,u,r
+ contact_groups admins
+ register 0
+ #check_interval 1
+}
diff --git a/nixos/modules/services/monitoring/nagios/service-templates.cfg b/nixos/modules/services/monitoring/nagios/service-templates.cfg
new file mode 100644
index 0000000000000000000000000000000000000000..e729ea77675d337e337a3f8fc2c179ca681401a0
--- /dev/null
+++ b/nixos/modules/services/monitoring/nagios/service-templates.cfg
@@ -0,0 +1,32 @@
+define service {
+ name generic-service
+ active_checks_enabled 1
+ passive_checks_enabled 1
+ parallelize_check 1
+ obsess_over_service 1
+ check_freshness 0
+ notifications_enabled 1
+ event_handler_enabled 1
+ flap_detection_enabled 1
+ failure_prediction_enabled 1
+ process_perf_data 1
+ retain_status_information 1
+ retain_nonstatus_information 1
+ is_volatile 0
+ register 0
+}
+
+
+define service {
+ name local-service
+ use generic-service
+ check_period 24x7
+ max_check_attempts 4
+ normal_check_interval 5
+ retry_check_interval 1
+ contact_groups admins
+ notification_options w,u,c,r
+ notification_interval 0 # notify only once
+ notification_period 24x7
+ register 0
+}
diff --git a/nixos/modules/services/monitoring/nagios/timeperiods.cfg b/nixos/modules/services/monitoring/nagios/timeperiods.cfg
new file mode 100644
index 0000000000000000000000000000000000000000..2669be54d3db1db8ed04b20e0520493c0ad97e54
--- /dev/null
+++ b/nixos/modules/services/monitoring/nagios/timeperiods.cfg
@@ -0,0 +1,11 @@
+define timeperiod {
+ timeperiod_name 24x7
+ alias 24 Hours A Day, 7 Days A Week
+ sunday 00:00-24:00
+ monday 00:00-24:00
+ tuesday 00:00-24:00
+ wednesday 00:00-24:00
+ thursday 00:00-24:00
+ friday 00:00-24:00
+ saturday 00:00-24:00
+}
diff --git a/nixos/modules/services/monitoring/smartd.nix b/nixos/modules/services/monitoring/smartd.nix
new file mode 100644
index 0000000000000000000000000000000000000000..de07dc0dbaa62592b845f8faef1d073f603f5122
--- /dev/null
+++ b/nixos/modules/services/monitoring/smartd.nix
@@ -0,0 +1,117 @@
+{ config, pkgs, ... }:
+
+with pkgs.lib;
+
+let
+
+ cfg = config.services.smartd;
+
+ smartdOpts = { name, ... }: {
+
+ options = {
+
+ device = mkOption {
+ example = "/dev/sda";
+ type = types.string;
+ description = "Location of the device.";
+ };
+
+ options = mkOption {
+ default = "";
+ example = "-d sat";
+ type = types.string;
+ merge = pkgs.lib.concatStringsSep " ";
+ description = "Options that determine how smartd monitors the device";
+ };
+ };
+
+ };
+
+ smartdMail = pkgs.writeScript "smartdmail.sh" ''
+ #! ${pkgs.stdenv.shell}
+ TMPNAM=/tmp/smartd-message.$$.tmp
+ if test -n "$SMARTD_ADDRESS"; then
+ echo >"$TMPNAM" "From: smartd "
+ echo >>"$TMPNAM" 'To: undisclosed-recipients:;'
+ echo >>"$TMPNAM" "Subject: $SMARTD_SUBJECT"
+ echo >>"$TMPNAM"
+ echo >>"$TMPNAM" "Failure on $SMARTD_DEVICESTRING: $SMARTD_FAILTYPE"
+ echo >>"$TMPNAM"
+ cat >>"$TMPNAM"
+ ${pkgs.smartmontools}/sbin/smartctl >>"$TMPNAM" -a -d "$SMARTD_DEVICETYPE" "$SMARTD_DEVICE"
+ /var/setuid-wrappers/sendmail <"$TMPNAM" -f "$SENDER" -i "$SMARTD_ADDRESS"
+ fi
+ '';
+
+ smartdConf = pkgs.writeText "smartd.conf" (concatMapStrings (device:
+ ''
+ ${device.device} -a -m root -M exec ${smartdMail} ${device.options} ${cfg.deviceOpts}
+ ''
+ ) cfg.devices);
+
+ smartdFlags = if (cfg.devices == []) then "" else "--configfile=${smartdConf}";
+
+in
+
+{
+ ###### interface
+
+ options = {
+
+ services.smartd = {
+
+ enable = mkOption {
+ default = false;
+ type = types.bool;
+ example = "true";
+ description = ''
+ Run smartd from the smartmontools package. Note that e-mail
+ notifications will not be enabled unless you configure the list of
+ devices with services.smartd.devices as well.
+ '';
+ };
+
+ deviceOpts = mkOption {
+ default = "";
+ type = types.string;
+ example = "-o on -s (S/../.././02|L/../../7/04)";
+ description = ''
+ Additional options for each device that is monitored. The example
+ turns on SMART Automatic Offline Testing on startup, and schedules short
+ self-tests daily, and long self-tests weekly.
+ '';
+ };
+
+ devices = mkOption {
+ default = [];
+ example = [ { device = "/dev/sda"; } { device = "/dev/sdb"; options = "-d sat"; } ];
+ type = types.listOf types.optionSet;
+ options = [ smartdOpts ];
+ description = ''
+ List of devices to monitor. By default -- if this list is empty --,
+ smartd will monitor all devices connected to the machine at the time
+ it's being run. Configuring this option has the added benefit of
+ enabling e-mail notifications to "root" every time smartd detects an
+ error.
+ '';
+ };
+ };
+
+ };
+
+
+ ###### implementation
+
+ config = mkIf cfg.enable {
+
+ systemd.services.smartd = {
+ description = "S.M.A.R.T. Daemon";
+
+ wantedBy = [ "multi-user.target" ];
+
+ serviceConfig.ExecStart = "${pkgs.smartmontools}/sbin/smartd --no-fork ${smartdFlags}";
+ };
+
+ };
+
+}
diff --git a/nixos/modules/services/monitoring/statsd.nix b/nixos/modules/services/monitoring/statsd.nix
new file mode 100644
index 0000000000000000000000000000000000000000..120c8860d57152cc714829cf5a2c04139353eae0
--- /dev/null
+++ b/nixos/modules/services/monitoring/statsd.nix
@@ -0,0 +1,108 @@
+{ config, pkgs, ... }:
+
+with pkgs.lib;
+
+let
+
+ cfg = config.services.statsd;
+
+ configFile = pkgs.writeText "statsd.conf" ''
+ {
+ host: "${cfg.host}",
+ port: "${toString cfg.port}",
+ mgmt_address: "${cfg.mgmt_address}",
+ mgmt_port: "${toString cfg.mgmt_port}",
+ backends: [${concatMapStrings (el: ''"./backends/${el}",'') cfg.backends}],
+ graphiteHost: "${cfg.graphiteHost}",
+ graphitePort: "${toString cfg.graphitePort}",
+ ${cfg.extraConfig}
+ }
+ '';
+
+in
+
+{
+
+ ###### interface
+
+ options.services.statsd = {
+
+ enable = mkOption {
+ description = "Whether to enable statsd stats aggregation service";
+ default = false;
+ type = types.uniq types.bool;
+ };
+
+ host = mkOption {
+ description = "Address that statsd listens on over UDP";
+ default = "127.0.0.1";
+ type = types.uniq types.string;
+ };
+
+ port = mkOption {
+ description = "Port that stats listens for messages on over UDP";
+ default = 8125;
+ type = types.uniq types.int;
+ };
+
+ mgmt_address = mkOption {
+ description = "Address to run managment TCP interface on";
+ default = "127.0.0.1";
+ type = types.uniq types.string;
+ };
+
+ mgmt_port = mkOption {
+ description = "Port to run the management TCP interface on";
+ default = 8126;
+ type = types.uniq types.int;
+ };
+
+ backends = mkOption {
+ description = "List of backends statsd will use for data persistance";
+ default = ["graphite"];
+ };
+
+ graphiteHost = mkOption {
+ description = "Hostname or IP of Graphite server";
+ default = "127.0.0.1";
+ type = types.uniq types.string;
+ };
+
+ graphitePort = mkOption {
+ description = "Port of Graphite server";
+ default = 2003;
+ type = types.uniq types.int;
+ };
+
+ extraConfig = mkOption {
+ default = "";
+ description = "Extra configuration options for statsd";
+ type = types.uniq types.string;
+ };
+
+ };
+
+ ###### implementation
+
+ config = mkIf cfg.enable {
+
+ users.extraUsers = singleton {
+ name = "statsd";
+ uid = config.ids.uids.statsd;
+ description = "Statsd daemon user";
+ };
+
+ systemd.services.statsd = {
+ description = "Statsd Server";
+ wantedBy = [ "multi-user.target" ];
+ serviceConfig = {
+ ExecStart = "${pkgs.nodePackages.statsd}/bin/statsd ${configFile}";
+ User = "statsd";
+ };
+ };
+
+ environment.systemPackages = [pkgs.nodePackages.statsd];
+
+ };
+
+}
diff --git a/nixos/modules/services/monitoring/systemhealth.nix b/nixos/modules/services/monitoring/systemhealth.nix
new file mode 100644
index 0000000000000000000000000000000000000000..0a3e666ad4e7a7eb348335f21ac9346cba351321
--- /dev/null
+++ b/nixos/modules/services/monitoring/systemhealth.nix
@@ -0,0 +1,133 @@
+{config, pkgs, ...}:
+
+with pkgs.lib;
+
+let
+ cfg = config.services.systemhealth;
+
+ systemhealth = with pkgs; stdenv.mkDerivation {
+ name = "systemhealth-1.0";
+ src = fetchurl {
+ url = "http://www.brianlane.com/static/downloads/systemhealth/systemhealth-1.0.tar.bz2";
+ sha256 = "1q69lz7hmpbdpbz36zb06nzfkj651413n9icx0njmyr3xzq1j9qy";
+ };
+ buildInputs = [ python ];
+ installPhase = ''
+ ensureDir $out/bin
+ # Make it work for kernels 3.x, not so different than 2.6
+ sed -i 's/2\.6/4.0/' system_health.py
+ cp system_health.py $out/bin
+ '';
+ };
+
+ rrdDir = "/var/lib/health/rrd";
+ htmlDir = "/var/lib/health/html";
+
+ configFile = rrdDir + "/.syshealthrc";
+ # The program will try to read $HOME/.syshealthrc, so we set the proper home.
+ command = "HOME=${rrdDir} ${systemhealth}/bin/system_health.py";
+
+ cronJob = ''
+ */5 * * * * wwwrun ${command} --log
+ 5 * * * * wwwrun ${command} --graph
+ '';
+
+ nameEqualName = s: "${s} = ${s}";
+ interfacesSection = concatStringsSep "\n" (map nameEqualName cfg.interfaces);
+
+ driveLine = d: "${d.path} = ${d.name}";
+ drivesSection = concatStringsSep "\n" (map driveLine cfg.drives);
+
+in
+{
+ options = {
+ services.systemhealth = {
+ enable = mkOption {
+ default = false;
+ description = ''
+ Enable the system health monitor and its generation of graphs.
+ '';
+ };
+
+ urlPrefix = mkOption {
+ default = "/health";
+ description = ''
+ The URL prefix under which the System Health web pages appear in httpd.
+ '';
+ };
+
+ interfaces = mkOption {
+ default = [ "lo" ];
+ example = [ "lo" "eth0" "eth1" ];
+ description = ''
+ Interfaces to monitor (minimum one).
+ '';
+ };
+
+ drives = mkOption {
+ default = [ ];
+ example = [ { name = "root"; path = "/"; } ];
+ description = ''
+ Drives to monitor.
+ '';
+ };
+ };
+ };
+
+ config = mkIf cfg.enable {
+ services.cron.systemCronJobs = [ cronJob ];
+
+ system.activationScripts.systemhealth = stringAfter [ "var" ]
+ ''
+ mkdir -p ${rrdDir} ${htmlDir}
+ chown wwwrun:wwwrun ${rrdDir} ${htmlDir}
+
+ cat >${configFile} << EOF
+ [paths]
+ rrdtool = ${pkgs.rrdtool}/bin/rrdtool
+ loadavg_rrd = loadavg
+ ps = /run/current-system/sw/bin/ps
+ df = /run/current-system/sw/bin/df
+ meminfo_rrd = meminfo
+ uptime_rrd = uptime
+ rrd_path = ${rrdDir}
+ png_path = ${htmlDir}
+
+ [processes]
+
+ [interfaces]
+ ${interfacesSection}
+
+ [drives]
+ ${drivesSection}
+
+ [graphs]
+ width = 400
+ time = ['-3hours', '-32hours', '-8days', '-5weeks', '-13months']
+ height = 100
+
+ [external]
+
+ EOF
+
+ chown wwwrun:wwwrun ${configFile}
+
+ ${pkgs.su}/bin/su -s "/bin/sh" -c "${command} --check" wwwrun
+ ${pkgs.su}/bin/su -s "/bin/sh" -c "${command} --html" wwwrun
+ '';
+
+ services.httpd.extraSubservices = [
+ { function = f: {
+ extraConfig = ''
+ Alias ${cfg.urlPrefix} ${htmlDir}
+
+
+ Order allow,deny
+ Allow from all
+
+ '';
+ };
+ }
+ ];
+ };
+}
diff --git a/nixos/modules/services/monitoring/ups.nix b/nixos/modules/services/monitoring/ups.nix
new file mode 100644
index 0000000000000000000000000000000000000000..a7b72e53f0a476d7bd0434146017c96613e9ae11
--- /dev/null
+++ b/nixos/modules/services/monitoring/ups.nix
@@ -0,0 +1,275 @@
+{config, pkgs, ...}:
+
+# TODO: This is not secure, have a look at the file docs/security.txt inside
+# the project sources.
+with pkgs.lib;
+
+let
+ cfg = config.power.ups;
+in
+
+let
+ upsOptions = {name, config, ...}:
+ {
+ options = {
+ # This can be infered from the UPS model by looking at
+ # /nix/store/nut/share/driver.list
+ driver = mkOption {
+ type = types.uniq types.string;
+ description = ''
+ Specify the program to run to talk to this UPS. apcsmart,
+ bestups, and sec are some examples.
+ '';
+ };
+
+ port = mkOption {
+ type = types.uniq types.string;
+ description = ''
+ The serial port to which your UPS is connected. /dev/ttyS0 is
+ usually the first port on Linux boxes, for example.
+ '';
+ };
+
+ shutdownOrder = mkOption {
+ default = 0;
+ type = types.uniq types.int;
+ description = ''
+ When you have multiple UPSes on your system, you usually need to
+ turn them off in a certain order. upsdrvctl shuts down all the
+ 0s, then the 1s, 2s, and so on. To exclude a UPS from the
+ shutdown sequence, set this to -1.
+ '';
+ };
+
+ maxStartDelay = mkOption {
+ default = null;
+ type = types.uniq (types.nullOr types.int);
+ description = ''
+ This can be set as a global variable above your first UPS
+ definition and it can also be set in a UPS section. This value
+ controls how long upsdrvctl will wait for the driver to finish
+ starting. This keeps your system from getting stuck due to a
+ broken driver or UPS.
+ '';
+ };
+
+ description = mkOption {
+ default = "";
+ type = types.string;
+ description = ''
+ Description of the UPS.
+ '';
+ };
+
+ directives = mkOption {
+ default = [];
+ type = types.listOf types.string;
+ description = ''
+ List of configuration directives for this UPS.
+ '';
+ };
+
+ summary = mkOption {
+ default = "";
+ type = types.string;
+ description = ''
+ Lines which would be added inside ups.conf for handling this UPS.
+ '';
+ };
+
+ };
+
+ config = {
+ directives = mkHeader ([
+ "driver = ${config.driver}"
+ "port = ${config.port}"
+ ''desc = "${config.description}"''
+ "sdorder = ${toString config.shutdownOrder}"
+ ] ++ (optional (config.maxStartDelay != null)
+ "maxstartdelay = ${toString config.maxStartDelay}")
+ );
+
+ summary =
+ concatStringsSep "\n "
+ (["[${name}]"] ++ config.directives);
+ };
+ };
+
+in
+
+
+{
+ options = {
+ # powerManagement.powerDownCommands
+
+ power.ups = {
+ enable = mkOption {
+ default = false;
+ type = with types; bool;
+ description = ''
+ Enables support for Power Devices, such as Uninterruptible Power
+ Supplies, Power Distribution Units and Solar Controllers.
+ '';
+ };
+
+ # This option is not used yet.
+ mode = mkOption {
+ default = "standalone";
+ type = types.uniq types.string;
+ description = ''
+ The MODE determines which part of the NUT is to be started, and
+ which configuration files must be modified.
+
+ The values of MODE can be:
+
+ - none: NUT is not configured, or use the Integrated Power
+ Management, or use some external system to startup NUT
+ components. So nothing is to be started.
+
+ - standalone: This mode address a local only configuration, with 1
+ UPS protecting the local system. This implies to start the 3 NUT
+ layers (driver, upsd and upsmon) and the matching configuration
+ files. This mode can also address UPS redundancy.
+
+ - netserver: same as for the standalone configuration, but also
+ need some more ACLs and possibly a specific LISTEN directive in
+ upsd.conf. Since this MODE is opened to the network, a special
+ care should be applied to security concerns.
+
+ - netclient: this mode only requires upsmon.
+ '';
+ };
+
+ schedulerRules = mkOption {
+ example = "/etc/nixos/upssched.conf";
+ type = types.uniq types.string;
+ description = ''
+ File which contains the rules to handle UPS events.
+ '';
+ };
+
+
+ maxStartDelay = mkOption {
+ default = 45;
+ type = types.uniq types.int;
+ description = ''
+ This can be set as a global variable above your first UPS
+ definition and it can also be set in a UPS section. This value
+ controls how long upsdrvctl will wait for the driver to finish
+ starting. This keeps your system from getting stuck due to a
+ broken driver or UPS.
+ '';
+ };
+
+ ups = mkOption {
+ default = {};
+ # see nut/etc/ups.conf.sample
+ description = ''
+ This is where you configure all the UPSes that this system will be
+ monitoring directly. These are usually attached to serial ports,
+ but USB devices are also supported.
+ '';
+ type = types.attrsOf types.optionSet;
+ options = [ upsOptions ];
+ };
+
+ };
+ };
+
+ config = mkIf cfg.enable {
+
+ environment.systemPackages = [ pkgs.nut ];
+
+ jobs.upsmon = {
+ description = "Uninterruptible Power Supplies (Monitor)";
+ startOn = "ip-up";
+ daemonType = "fork";
+ exec = ''${pkgs.nut}/sbin/upsmon'';
+ environment.NUT_CONFPATH = "/etc/nut/";
+ environment.NUT_STATEPATH = "/var/lib/nut/";
+ };
+
+ jobs.upsd = {
+ description = "Uninterruptible Power Supplies (Daemon)";
+ startOn = "started network-interfaces and started upsmon";
+ daemonType = "fork";
+ # TODO: replace 'root' by another username.
+ exec = ''${pkgs.nut}/sbin/upsd -u root'';
+ environment.NUT_CONFPATH = "/etc/nut/";
+ environment.NUT_STATEPATH = "/var/lib/nut/";
+ };
+
+ jobs.upsdrv = {
+ description = "Uninterruptible Power Supplies (Register all UPS)";
+ startOn = "started upsd";
+ # TODO: replace 'root' by another username.
+ exec = ''${pkgs.nut}/bin/upsdrvctl -u root start'';
+ task = true;
+ environment.NUT_CONFPATH = "/etc/nut/";
+ environment.NUT_STATEPATH = "/var/lib/nut/";
+ };
+
+ environment.etc = [
+ { source = pkgs.writeText "nut.conf"
+ ''
+ MODE = ${cfg.mode}
+ '';
+ target = "nut/nut.conf";
+ }
+ { source = pkgs.writeText "ups.conf"
+ ''
+ maxstartdelay = ${toString cfg.maxStartDelay}
+
+ ${flip concatStringsSep (flip map (attrValues cfg.ups) (ups: ups.summary)) "
+
+ "}
+ '';
+ target = "nut/ups.conf";
+ }
+ { source = cfg.schedulerRules;
+ target = "nut/upssched.conf";
+ }
+ # These file are containing private informations and thus should not
+ # be stored inside the Nix store.
+ /*
+ { source = ;
+ target = "nut/upsd.conf";
+ }
+ { source = ;
+ target = "nut/upsd.users";
+ }
+ { source = ;
+ target = "nut/upsmon.conf;
+ }
+ */
+ ];
+
+ power.ups.schedulerRules = mkDefault "${pkgs.nut}/etc/upssched.conf.sample";
+
+ system.activationScripts.upsSetup = stringAfter [ "users" "groups" ]
+ ''
+ # Used to store pid files of drivers.
+ mkdir -p /var/state/ups
+ '';
+
+
+/*
+ users.extraUsers = [
+ { name = "nut";
+ uid = 84;
+ home = "/var/lib/nut";
+ createHome = true;
+ group = "nut";
+ description = "UPnP A/V Media Server user";
+ }
+ ];
+
+ users.extraGroups = [
+ { name = "nut";
+ gid = 84;
+ }
+ ];
+*/
+
+ };
+}
diff --git a/nixos/modules/services/monitoring/uptime.nix b/nixos/modules/services/monitoring/uptime.nix
new file mode 100644
index 0000000000000000000000000000000000000000..553110d7b80c5cb7474e993d855d84242100c3e7
--- /dev/null
+++ b/nixos/modules/services/monitoring/uptime.nix
@@ -0,0 +1,95 @@
+{ config, pkgs, ... }:
+let
+ inherit (pkgs.lib) mkOption mkEnableOption mkIf mkMerge types optionalAttrs optional;
+
+ cfg = config.services.uptime;
+
+ configDir = pkgs.runCommand "config" {} (if cfg.configFile != null then ''
+ mkdir $out
+ ext=`echo ${cfg.configFile} | grep -o \\..*`
+ ln -sv ${cfg.configFile} $out/default$ext
+ ln -sv /var/lib/uptime/runtime.json $out/runtime.json
+ '' else ''
+ mkdir $out
+ cat ${pkgs.nodePackages.node-uptime}/lib/node_modules/node-uptime/config/default.yaml > $out/default.yaml
+ cat >> $out/default.yaml <drbd.conf configuration file.
+ '';
+ };
+
+ };
+
+
+ ###### implementation
+
+ config = mkIf cfg.enable {
+
+ environment.systemPackages = [ pkgs.drbd ];
+
+ services.udev.packages = [ pkgs.drbd ];
+
+ boot.kernelModules = [ "drbd" ];
+
+ boot.extraModprobeConfig =
+ ''
+ options drbd usermode_helper=/run/current-system/sw/sbin/drbdadm
+ '';
+
+ environment.etc = singleton
+ { source = pkgs.writeText "drbd.conf" cfg.config;
+ target = "drbd.conf";
+ };
+
+ jobs.drbd_up =
+ { name = "drbd-up";
+ startOn = "stopped udevtrigger or ip-up";
+ task = true;
+ script =
+ ''
+ ${pkgs.drbd}/sbin/drbdadm up all
+ '';
+ };
+
+ jobs.drbd_down =
+ { name = "drbd-down";
+ startOn = "starting shutdown";
+ task = true;
+ script =
+ ''
+ ${pkgs.drbd}/sbin/drbdadm down all
+ '';
+ };
+
+ };
+
+}
diff --git a/nixos/modules/services/network-filesystems/nfsd.nix b/nixos/modules/services/network-filesystems/nfsd.nix
new file mode 100644
index 0000000000000000000000000000000000000000..4daa5e9d06391d473a814b125e1cd40dcc761e84
--- /dev/null
+++ b/nixos/modules/services/network-filesystems/nfsd.nix
@@ -0,0 +1,147 @@
+{ config, pkgs, ... }:
+
+with pkgs.lib;
+
+let
+
+ cfg = config.services.nfs.server;
+
+ exports = pkgs.writeText "exports" cfg.exports;
+
+in
+
+{
+
+ ###### interface
+
+ options = {
+
+ services.nfs = {
+
+ server = {
+ enable = mkOption {
+ default = false;
+ description = ''
+ Whether to enable the kernel's NFS server.
+ '';
+ };
+
+ exports = mkOption {
+ default = "";
+ description = ''
+ Contents of the /etc/exports file. See
+ exports
+ 5 for the format.
+ '';
+ };
+
+ hostName = mkOption {
+ default = null;
+ description = ''
+ Hostname or address on which NFS requests will be accepted.
+ Default is all. See the
-H
option in
+ nfsd
+ 8.
+ '';
+ };
+
+ nproc = mkOption {
+ default = 8;
+ description = ''
+ Number of NFS server threads. Defaults to the recommended value of 8.
+ '';
+ };
+
+ createMountPoints = mkOption {
+ default = false;
+ description = "Whether to create the mount points in the exports file at startup time.";
+ };
+ };
+
+ };
+
+ };
+
+
+ ###### implementation
+
+ config = mkIf cfg.enable {
+
+ services.rpcbind.enable = true;
+
+ boot.supportedFilesystems = [ "nfs" ]; # needed for statd and idmapd
+
+ environment.systemPackages = [ pkgs.nfsUtils ];
+
+ environment.etc = singleton
+ { source = exports;
+ target = "exports";
+ };
+
+ boot.kernelModules = [ "nfsd" ];
+
+ systemd.services.nfsd =
+ { description = "NFS Server";
+
+ wantedBy = [ "multi-user.target" ];
+
+ requires = [ "rpcbind.service" "mountd.service" ];
+ after = [ "rpcbind.service" "mountd.service" "idmapd.service" ];
+ before = [ "statd.service" ];
+
+ path = [ pkgs.nfsUtils ];
+
+ script =
+ ''
+ # Create a state directory required by NFSv4.
+ mkdir -p /var/lib/nfs/v4recovery
+
+ rpc.nfsd \
+ ${if cfg.hostName != null then "-H ${cfg.hostName}" else ""} \
+ ${builtins.toString cfg.nproc}
+ '';
+
+ postStop = "rpc.nfsd 0";
+
+ serviceConfig.Type = "oneshot";
+ serviceConfig.RemainAfterExit = true;
+ };
+
+ systemd.services.mountd =
+ { description = "NFSv3 Mount Daemon";
+
+ requires = [ "rpcbind.service" ];
+ after = [ "rpcbind.service" ];
+
+ path = [ pkgs.nfsUtils pkgs.sysvtools pkgs.utillinux ];
+
+ preStart =
+ ''
+ mkdir -p /var/lib/nfs
+ touch /var/lib/nfs/rmtab
+
+ mountpoint -q /proc/fs/nfsd || mount -t nfsd none /proc/fs/nfsd
+
+ ${optionalString cfg.createMountPoints
+ ''
+ # create export directories:
+ # skip comments, take first col which may either be a quoted
+ # "foo bar" or just foo (-> man export)
+ sed '/^#.*/d;s/^"\([^"]*\)".*/\1/;t;s/[ ].*//' ${exports} \
+ | xargs -d '\n' mkdir -p
+ ''
+ }
+
+ exportfs -rav
+ '';
+
+ restartTriggers = [ exports ];
+
+ serviceConfig.Type = "forking";
+ serviceConfig.ExecStart = "@${pkgs.nfsUtils}/sbin/rpc.mountd rpc.mountd";
+ serviceConfig.Restart = "always";
+ };
+
+ };
+
+}
diff --git a/nixos/modules/services/network-filesystems/openafs-client/default.nix b/nixos/modules/services/network-filesystems/openafs-client/default.nix
new file mode 100644
index 0000000000000000000000000000000000000000..4a888b64bd34ed2f87ea0e4b0ed42d51445b26b7
--- /dev/null
+++ b/nixos/modules/services/network-filesystems/openafs-client/default.nix
@@ -0,0 +1,90 @@
+{ config, pkgs, ... }:
+
+let
+ inherit (pkgs.lib) mkOption mkIf;
+
+ cfg = config.services.openafsClient;
+
+ cellServDB = pkgs.fetchurl {
+ url = http://dl.central.org/dl/cellservdb/CellServDB.2009-06-29;
+ sha256 = "be566f850e88130333ab8bc3462872ad90c9482e025c60a92f728b5bac1b4fa9";
+ };
+
+ afsConfig = pkgs.runCommand "afsconfig" {} ''
+ ensureDir $out
+ echo ${cfg.cellName} > $out/ThisCell
+ cp ${cellServDB} $out/CellServDB
+ echo "/afs:${cfg.cacheDirectory}:${cfg.cacheSize}" > $out/cacheinfo
+ '';
+
+ openafsPkgs = config.boot.kernelPackages.openafsClient;
+in
+{
+ ###### interface
+
+ options = {
+
+ services.openafsClient = {
+
+ enable = mkOption {
+ default = false;
+ description = "Whether to enable the OpenAFS client.";
+ };
+
+ cellName = mkOption {
+ default = "grand.central.org";
+ description = "Cell name.";
+ };
+
+ cacheSize = mkOption {
+ default = "100000";
+ description = "Cache size.";
+ };
+
+ cacheDirectory = mkOption {
+ default = "/var/cache/openafs";
+ description = "Cache directory.";
+ };
+
+ };
+ };
+
+
+ ###### implementation
+
+ config = mkIf cfg.enable {
+
+ environment.systemPackages = [ openafsPkgs ];
+
+ environment.etc = [
+ { source = afsConfig;
+ target = "openafs";
+ }
+ ];
+
+ jobs.openafsClient =
+ { name = "afsd";
+
+ description = "AFS client";
+
+ startOn = "started network-interfaces";
+ stopOn = "stopping network-interfaces";
+
+ preStart = ''
+ mkdir -m 0755 /afs || true
+ mkdir -m 0755 -p ${cfg.cacheDirectory} || true
+ ${pkgs.module_init_tools}/sbin/insmod ${openafsPkgs}/lib/openafs/libafs-*.ko || true
+ ${openafsPkgs}/sbin/afsd -confdir ${afsConfig} -cachedir ${cfg.cacheDirectory} -dynroot -fakestat
+ '';
+
+ postStop = ''
+ umount /afs
+ ${openafsPkgs}/sbin/afsd -shutdown
+ rmmod libafs
+ '';
+
+ };
+
+ };
+
+}
diff --git a/nixos/modules/services/network-filesystems/samba.nix b/nixos/modules/services/network-filesystems/samba.nix
new file mode 100644
index 0000000000000000000000000000000000000000..e18d9d7b67b548843792d96f240be5c16ce240cb
--- /dev/null
+++ b/nixos/modules/services/network-filesystems/samba.nix
@@ -0,0 +1,237 @@
+{ config, pkgs, ... }:
+
+with pkgs.lib;
+
+let
+
+ cfg = config.services.samba;
+
+ user = "smbguest";
+ group = "smbguest";
+
+ logDir = "/var/log/samba";
+ privateDir = "/var/samba/private";
+
+ inherit (pkgs) samba;
+
+ setupScript =
+ ''
+ if ! test -d /home/smbd ; then
+ mkdir -p /home/smbd
+ chown ${user} /home/smbd
+ chmod a+rwx /home/smbd
+ fi
+
+ if ! test -d /var/samba ; then
+ mkdir -p /var/samba/locks /var/samba/cores/nmbd /var/samba/cores/smbd /var/samba/cores/winbindd
+ fi
+
+ passwdFile="$(${pkgs.gnused}/bin/sed -n 's/^.*smb[ ]\+passwd[ ]\+file[ ]\+=[ ]\+\(.*\)/\1/p' ${configFile})"
+ if [ -n "$passwdFile" ]; then
+ echo 'INFO: [samba] creating directory containing passwd file'
+ mkdir -p "$(dirname "$passwdFile")"
+ fi
+
+ mkdir -p ${logDir}
+ mkdir -p ${privateDir}
+ '';
+
+ configFile = pkgs.writeText "smb.conf"
+ ''
+ [ global ]
+ log file = ${logDir}/log.%m
+ private dir = ${privateDir}
+ ${optionalString cfg.syncPasswordsByPam "pam password change = true"}
+
+ ${if cfg.defaultShare.enable then ''
+ [default]
+ path = /home/smbd
+ read only = ${if cfg.defaultShare.writeable then "no" else "yes"}
+ guest ok = ${if cfg.defaultShare.guest then "yes" else "no"}
+ ''else ""}
+
+ ${cfg.extraConfig}
+ '';
+
+ # This may include nss_ldap, needed for samba if it has to use ldap.
+ nssModulesPath = config.system.nssModules.path;
+
+ daemonService = appName: args:
+ { description = "Samba Service daemon ${appName}";
+
+ wantedBy = [ "samba.target" ];
+ partOf = [ "samba.target" ];
+
+ environment = {
+ LD_LIBRARY_PATH = nssModulesPath;
+ LOCALE_ARCHIVE = "/run/current-system/sw/lib/locale/locale-archive";
+ };
+
+ serviceConfig = {
+ ExecStart = "${samba}/sbin/${appName} ${args}";
+ ExecReload = "${pkgs.coreutils}/bin/kill -HUP $MAINPID";
+ };
+
+ restartTriggers = [ configFile ];
+ };
+
+in
+
+{
+
+ ###### interface
+
+ options = {
+
+ # !!! clean up the descriptions.
+
+ services.samba = {
+
+ enable = mkOption {
+ default = false;
+ description = "
+ Whether to enable Samba, which provides file and print
+ services to Windows clients through the SMB/CIFS protocol.
+ ";
+ };
+
+ syncPasswordsByPam = mkOption {
+ default = false;
+ description = "
+ enabling this will add a line directly after pam_unix.so.
+ Whenever a password is changed the samba password will be updated as well.
+ However you still yave to add the samba password once using smbpasswd -a user
+ If you don't want to maintain an extra pwd database you still can send plain text
+ passwords which is not secure.
+ ";
+ };
+
+ extraConfig = mkOption {
+ # !!! Bad default.
+ default = ''
+ # [global] continuing global section here, section is started by nix to set pids etc
+
+ smb passwd file = /etc/samba/passwd
+
+ # is this useful ?
+ domain master = auto
+
+ encrypt passwords = Yes
+ client plaintext auth = No
+
+ # yes: if you use this you probably also want to enable syncPasswordsByPam
+ # no: You can still use the pam password database. However
+ # passwords will be sent plain text on network (discouraged)
+
+ workgroup = Users
+ server string = %h
+ comment = Samba
+ log file = /var/log/samba/log.%m
+ log level = 10
+ max log size = 50000
+ security = ${cfg.securityType}
+
+ client lanman auth = Yes
+ dns proxy = no
+ invalid users = root
+ passdb backend = tdbsam
+ passwd program = /usr/bin/passwd %u
+ '';
+
+ description = "
+ additional global section and extra section lines go in here.
+ ";
+ };
+
+ configFile = mkOption {
+ description = "
+ internal use to pass filepath to samba pam module
+ ";
+ };
+
+ defaultShare = {
+ enable = mkOption {
+ description = "Whether to share /home/smbd as 'default'.";
+ default = false;
+ };
+ writeable = mkOption {
+ description = "Whether to allow write access to default share.";
+ default = false;
+ };
+ guest = mkOption {
+ description = "Whether to allow guest access to default share.";
+ default = true;
+ };
+ };
+
+ securityType = mkOption {
+ description = "Samba security type";
+ default = "user";
+ example = "share";
+ };
+
+ nsswins = mkOption {
+ default = false;
+ type = types.uniq types.bool;
+ description = ''
+ Whether to enable the WINS NSS (Name Service Switch) plug-in.
+ Enabling it allows applications to resolve WINS/NetBIOS names (a.k.a.
+ Windows machine names) by transparently querying the winbindd daemon.
+ '';
+ };
+
+ };
+
+ };
+
+
+ ###### implementation
+
+ config = mkMerge
+ [ { # Always provide a smb.conf to shut up programs like smbclient and smbspool.
+ environment.etc = singleton
+ { source =
+ if cfg.enable then configFile
+ else pkgs.writeText "smb-dummy.conf" "# Samba is disabled.";
+ target = "samba/smb.conf";
+ };
+ }
+
+ (mkIf config.services.samba.enable {
+
+ users.extraUsers.smbguest = {
+ description = "Samba service user";
+ group = group;
+ uid = config.ids.uids.smbguest;
+ };
+
+ users.extraGroups.smbguest.gid = config.ids.uids.smbguest;
+
+ system.nssModules = optional cfg.nsswins samba;
+
+ systemd = {
+ targets.samba = {
+ description = "Samba server";
+ requires = [ "samba-setup.service" ];
+ after = [ "samba-setup.service" "network.target" ];
+ wantedBy = [ "multi-user.target" ];
+ };
+
+ services = {
+ "samba-nmbd" = daemonService "nmbd" "-F";
+ "samba-smbd" = daemonService "smbd" "-F";
+ "samba-winbindd" = daemonService "winbindd" "-F";
+ "samba-setup" = {
+ description = "Samba setup task";
+ script = setupScript;
+ unitConfig.RequiresMountsFor = "/home/smbd /var/samba /var/log/samba";
+ };
+ };
+ };
+
+ security.pam.services.sambda = {};
+
+ })
+ ];
+
+}
diff --git a/nixos/modules/services/networking/amuled.nix b/nixos/modules/services/networking/amuled.nix
new file mode 100644
index 0000000000000000000000000000000000000000..8652d0daf4c81a9e3301605708d8c2c4921b870a
--- /dev/null
+++ b/nixos/modules/services/networking/amuled.nix
@@ -0,0 +1,78 @@
+{ config, pkgs, ... }:
+
+with pkgs.lib;
+
+let
+ cfg = config.services.amule;
+ user = if cfg.user != null then cfg.user else "amule";
+in
+
+{
+
+ ###### interface
+
+ options = {
+
+ services.amule = {
+
+ enable = mkOption {
+ default = false;
+ description = ''
+ Whether to run the AMule daemon. You need to manually run "amuled --ec-config" to configure the service for the first time.
+ '';
+ };
+
+ dataDir = mkOption {
+ default = ''/home/${user}/'';
+ description = ''
+ The directory holding configuration, incoming and temporary files.
+ '';
+ };
+
+ user = mkOption {
+ default = null;
+ description = ''
+ The user the AMule daemon should run as.
+ '';
+ };
+
+ };
+
+ };
+
+
+ ###### implementation
+
+ config = mkIf cfg.enable {
+
+ users.extraUsers = mkIf (cfg.user == null) [
+ { name = "amule";
+ description = "AMule daemon";
+ group = "amule";
+ uid = config.ids.uids.amule;
+ } ];
+
+ users.extraGroups = mkIf (cfg.user == null) [
+ { name = "amule";
+ gid = config.ids.gids.amule;
+ } ];
+
+ jobs.amuled =
+ { description = "AMule daemon";
+
+ startOn = "ip-up";
+
+ preStart = ''
+ mkdir -p ${cfg.dataDir}
+ chown ${user} ${cfg.dataDir}
+ '';
+
+ exec = ''
+ ${pkgs.su}/bin/su -s ${pkgs.stdenv.shell} ${user} \
+ -c 'HOME="${cfg.dataDir}" ${pkgs.amuleDaemon}/bin/amuled'
+ '';
+ };
+
+ };
+
+}
diff --git a/nixos/modules/services/networking/avahi-daemon.nix b/nixos/modules/services/networking/avahi-daemon.nix
new file mode 100644
index 0000000000000000000000000000000000000000..3603d677837f5f14626d9afd78151ceeafe0a5ff
--- /dev/null
+++ b/nixos/modules/services/networking/avahi-daemon.nix
@@ -0,0 +1,144 @@
+# Avahi daemon.
+{ config, pkgs, ... }:
+
+with pkgs.lib;
+
+let
+
+ cfg = config.services.avahi;
+
+ inherit (pkgs) avahi;
+
+ avahiDaemonConf = with cfg; pkgs.writeText "avahi-daemon.conf" ''
+ [server]
+ ${# Users can set `networking.hostName' to the empty string, when getting
+ # a host name from DHCP. In that case, let Avahi take whatever the
+ # current host name is; setting `host-name' to the empty string in
+ # `avahi-daemon.conf' would be invalid.
+ if hostName != ""
+ then "host-name=${hostName}"
+ else ""}
+ browse-domains=${concatStringsSep ", " browseDomains}
+ use-ipv4=${if ipv4 then "yes" else "no"}
+ use-ipv6=${if ipv6 then "yes" else "no"}
+
+ [wide-area]
+ enable-wide-area=${if wideArea then "yes" else "no"}
+
+ [publish]
+ disable-publishing=${if publishing then "no" else "yes"}
+ '';
+
+in
+
+{
+
+ ###### interface
+
+ options = {
+
+ services.avahi = {
+
+ enable = mkOption {
+ default = false;
+ description = ''
+ Whether to run the Avahi daemon, which allows Avahi clients
+ to use Avahi's service discovery facilities and also allows
+ the local machine to advertise its presence and services
+ (through the mDNS responder implemented by `avahi-daemon').
+ '';
+ };
+
+ hostName = mkOption {
+ type = types.uniq types.string;
+ description = ''Host name advertised on the LAN.'';
+ };
+
+ browseDomains = mkOption {
+ default = [ "0pointer.de" "zeroconf.org" ];
+ description = ''
+ List of non-local DNS domains to be browsed.
+ '';
+ };
+
+ ipv4 = mkOption {
+ default = true;
+ description = ''Whether to use IPv4'';
+ };
+
+ ipv6 = mkOption {
+ default = false;
+ description = ''Whether to use IPv6'';
+ };
+
+ wideArea = mkOption {
+ default = true;
+ description = ''Whether to enable wide-area service discovery.'';
+ };
+
+ publishing = mkOption {
+ default = true;
+ description = ''Whether to allow publishing.'';
+ };
+
+ nssmdns = mkOption {
+ default = false;
+ description = ''
+ Whether to enable the mDNS NSS (Name Service Switch) plug-in.
+ Enabling it allows applications to resolve names in the `.local'
+ domain by transparently querying the Avahi daemon.
+ '';
+ };
+
+ };
+
+ };
+
+
+ ###### implementation
+
+ config = mkIf cfg.enable {
+
+ services.avahi.hostName = mkDefault config.networking.hostName;
+
+ users.extraUsers = singleton
+ { name = "avahi";
+ uid = config.ids.uids.avahi;
+ description = "`avahi-daemon' privilege separation user";
+ home = "/var/empty";
+ };
+
+ users.extraGroups = singleton
+ { name = "avahi";
+ gid = config.ids.gids.avahi;
+ };
+
+ system.nssModules = optional cfg.nssmdns pkgs.nssmdns;
+
+ environment.systemPackages = [ avahi ];
+
+ jobs.avahi_daemon =
+ { name = "avahi-daemon";
+
+ startOn = "ip-up";
+
+ script =
+ ''
+ export PATH="${avahi}/bin:${avahi}/sbin:$PATH"
+
+ # Make NSS modules visible so that `avahi_nss_support ()' can
+ # return a sensible value.
+ export LD_LIBRARY_PATH="${config.system.nssModules.path}"
+
+ mkdir -p /var/run/avahi-daemon
+
+ exec ${avahi}/sbin/avahi-daemon --syslog -f "${avahiDaemonConf}"
+ '';
+ };
+
+ services.dbus.enable = true;
+ services.dbus.packages = [avahi];
+
+ };
+
+}
diff --git a/nixos/modules/services/networking/bind.nix b/nixos/modules/services/networking/bind.nix
new file mode 100644
index 0000000000000000000000000000000000000000..765dc014dcb7776909a409b57829cf69b841d85c
--- /dev/null
+++ b/nixos/modules/services/networking/bind.nix
@@ -0,0 +1,152 @@
+{ config, pkgs, ... }:
+
+with pkgs.lib;
+
+let
+
+ cfg = config.services.bind;
+
+ bindUser = "named";
+
+ confFile = pkgs.writeText "named.conf"
+ ''
+ acl cachenetworks { ${concatMapStrings (entry: " ${entry}; ") cfg.cacheNetworks} };
+ acl badnetworks { ${concatMapStrings (entry: " ${entry}; ") cfg.blockedNetworks} };
+
+ options {
+ listen-on {any;};
+ listen-on-v6 {any;};
+ allow-query { cachenetworks; };
+ blackhole { badnetworks; };
+ forward first;
+ forwarders { ${concatMapStrings (entry: " ${entry}; ") cfg.forwarders} };
+ directory "/var/run/named";
+ pid-file "/var/run/named/named.pid";
+ };
+
+ ${ concatMapStrings
+ ({ name, file, master ? true, slaves ? [], masters ? [] }:
+ ''
+ zone "${name}" {
+ type ${if master then "master" else "slave"};
+ file "${file}";
+ ${ if master then
+ ''
+ allow-transfer {
+ ${concatMapStrings (ip: "${ip};\n") slaves}
+ };
+ ''
+ else
+ ''
+ masters {
+ ${concatMapStrings (ip: "${ip};\n") masters}
+ };
+ ''
+ }
+ allow-query { any; };
+ };
+ '')
+ cfg.zones }
+ '';
+
+in
+
+{
+
+ ###### interface
+
+ options = {
+
+ services.bind = {
+
+ enable = mkOption {
+ default = false;
+ description = "
+ Whether to enable BIND domain name server.
+ ";
+ };
+
+ cacheNetworks = mkOption {
+ default = ["127.0.0.0/24"];
+ description = "
+ What networks are allowed to use us as a resolver.
+ ";
+ };
+
+ blockedNetworks = mkOption {
+ default = [];
+ description = "
+ What networks are just blocked.
+ ";
+ };
+
+ ipv4Only = mkOption {
+ default = false;
+ description = "
+ Only use ipv4, even if the host supports ipv6.
+ ";
+ };
+
+ forwarders = mkOption {
+ default = config.networking.nameservers;
+ description = "
+ List of servers we should forward requests to.
+ ";
+ };
+
+ zones = mkOption {
+ default = [];
+ description = "
+ List of zones we claim authority over.
+ master=false means slave server; slaves means addresses
+ who may request zone transfer.
+ ";
+ example = [{
+ name = "example.com";
+ master = false;
+ file = "/var/dns/example.com";
+ masters = ["192.168.0.1"];
+ slaves = [];
+ }];
+ };
+
+ configFile = mkOption {
+ default = confFile;
+ description = "
+ Overridable config file to use for named. By default, that
+ generated by nixos.
+ ";
+ };
+
+ };
+
+ };
+
+
+ ###### implementation
+
+ config = mkIf config.services.bind.enable {
+
+ users.extraUsers = singleton
+ { name = bindUser;
+ uid = config.ids.uids.bind;
+ description = "BIND daemon user";
+ };
+
+ jobs.bind =
+ { description = "BIND name server job";
+
+ startOn = "started network-interfaces";
+
+ preStart =
+ ''
+ ${pkgs.coreutils}/bin/mkdir -p /var/run/named
+ chown ${bindUser} /var/run/named
+ '';
+
+ exec = "${pkgs.bind}/sbin/named -u ${bindUser} ${optionalString cfg.ipv4Only "-4"} -c ${cfg.configFile} -f";
+ };
+
+ };
+
+}
diff --git a/nixos/modules/services/networking/bitlbee.nix b/nixos/modules/services/networking/bitlbee.nix
new file mode 100644
index 0000000000000000000000000000000000000000..82e875f5aae06e810c975664d1bd012c29b783c2
--- /dev/null
+++ b/nixos/modules/services/networking/bitlbee.nix
@@ -0,0 +1,123 @@
+{ config, pkgs, ... }:
+
+with pkgs.lib;
+
+let
+
+ cfg = config.services.bitlbee;
+ bitlbeeUid = config.ids.uids.bitlbee;
+
+ authModeCheck = v:
+ v == "Open" ||
+ v == "Closed" ||
+ v == "Registered";
+
+ bitlbeeConfig = pkgs.writeText "bitlbee.conf"
+ ''
+ [settings]
+ RunMode = Daemon
+ User = bitlbee
+ ConfigDir = /var/lib/bitlbee
+ DaemonInterface = ${cfg.interface}
+ DaemonPort = ${toString cfg.portNumber}
+ AuthMode = ${cfg.authMode}
+ ${cfg.extraSettings}
+
+ [defaults]
+ ${cfg.extraDefaults}
+ '';
+
+in
+
+{
+
+ ###### interface
+
+ options = {
+
+ services.bitlbee = {
+
+ enable = mkOption {
+ default = false;
+ description = ''
+ Whether to run the BitlBee IRC to other chat network gateway.
+ Running it allows you to access the MSN, Jabber, Yahoo! and ICQ chat
+ networks via an IRC client.
+ '';
+ };
+
+ interface = mkOption {
+ default = "127.0.0.1";
+ description = ''
+ The interface the BitlBee deamon will be listening to. If `127.0.0.1',
+ only clients on the local host can connect to it; if `0.0.0.0', clients
+ can access it from any network interface.
+ '';
+ };
+
+ portNumber = mkOption {
+ default = 6667;
+ description = ''
+ Number of the port BitlBee will be listening to.
+ '';
+ };
+
+ authMode = mkOption {
+ default = "Open";
+ check = authModeCheck;
+ description = ''
+ The following authentication modes are available:
+ Open -- Accept connections from anyone, use NickServ for user authentication.
+ Closed -- Require authorization (using the PASS command during login) before allowing the user to connect at all.
+ Registered -- Only allow registered users to use this server; this disables the register- and the account command until the user identifies himself.
+ '';
+ };
+
+ extraSettings = mkOption {
+ default = "";
+ description = ''
+ Will be inserted in the Settings section of the config file.
+ '';
+ };
+
+ extraDefaults = mkOption {
+ default = "";
+ description = ''
+ Will be inserted in the Default section of the config file.
+ '';
+ };
+
+ };
+
+ };
+
+ ###### implementation
+
+ config = mkIf config.services.bitlbee.enable {
+
+ users.extraUsers = singleton
+ { name = "bitlbee";
+ uid = bitlbeeUid;
+ description = "BitlBee user";
+ home = "/var/lib/bitlbee";
+ createHome = true;
+ };
+
+ users.extraGroups = singleton
+ { name = "bitlbee";
+ gid = config.ids.gids.bitlbee;
+ };
+
+ systemd.services.bitlbee =
+ { description = "BitlBee IRC to other chat networks gateway";
+ after = [ "network.target" ];
+ wantedBy = [ "multi-user.target" ];
+ serviceConfig.User = "bitlbee";
+ serviceConfig.ExecStart = "${pkgs.bitlbee}/sbin/bitlbee -F -n -c ${bitlbeeConfig}";
+ };
+
+ environment.systemPackages = [ pkgs.bitlbee ];
+
+ };
+
+}
diff --git a/nixos/modules/services/networking/chrony.nix b/nixos/modules/services/networking/chrony.nix
new file mode 100644
index 0000000000000000000000000000000000000000..5e9818858e0ca5811b24d9caf38d5d881c9a7025
--- /dev/null
+++ b/nixos/modules/services/networking/chrony.nix
@@ -0,0 +1,118 @@
+{ config, pkgs, ... }:
+
+with pkgs.lib;
+
+let
+
+ inherit (pkgs) chrony;
+
+ stateDir = "/var/lib/chrony";
+
+ chronyUser = "chrony";
+
+ cfg = config.services.chrony;
+
+ configFile = pkgs.writeText "chrony.conf" ''
+ ${toString (map (server: "server " + server + "\n") cfg.servers)}
+
+ ${optionalString cfg.initstepslew.enabled ''
+ initstepslew ${toString cfg.initstepslew.threshold} ${toString (map (server: server + " ") cfg.initstepslew.servers)}
+ ''}
+
+ driftfile ${stateDir}/chrony.drift
+
+ ${optionalString (!config.time.hardwareClockInLocalTime) "rtconutc"}
+
+ ${cfg.extraConfig}
+ '';
+
+ chronyFlags = "-m -f ${configFile} -u ${chronyUser}";
+
+in
+
+{
+
+ ###### interface
+
+ options = {
+
+ services.chrony = {
+
+ enable = mkOption {
+ default = false;
+ description = ''
+ Whether to synchronise your machine's time using chrony.
+ Make sure you disable NTP if you enable this service.
+ '';
+ };
+
+ servers = mkOption {
+ default = [
+ "0.pool.ntp.org"
+ "1.pool.ntp.org"
+ "2.pool.ntp.org"
+ ];
+ description = ''
+ The set of NTP servers from which to synchronise.
+ '';
+ };
+
+ initstepslew = mkOption {
+ default = {
+ enabled = true;
+ threshold = 1000; # by default, same threshold as 'ntpd -g' (1000s)
+ servers = cfg.servers;
+ };
+ description = ''
+ Allow chronyd to make a rapid measurement of the system clock error at
+ boot time, and to correct the system clock by stepping before normal
+ operation begins.
+ '';
+ };
+
+ extraConfig = mkOption {
+ default = "";
+ description = ''
+ Extra configuration directives that should be added to
+ chrony.conf
+ '';
+ };
+ };
+
+ };
+
+
+ ###### implementation
+
+ config = mkIf config.services.chrony.enable {
+
+ # Make chronyc available in the system path
+ environment.systemPackages = [ pkgs.chrony ];
+
+ users.extraUsers = singleton
+ { name = chronyUser;
+ uid = config.ids.uids.chrony;
+ description = "chrony daemon user";
+ home = stateDir;
+ };
+
+ jobs.chronyd =
+ { description = "chrony daemon";
+
+ wantedBy = [ "ip-up.target" ];
+ partOf = [ "ip-up.target" ];
+
+ path = [ chrony ];
+
+ preStart =
+ ''
+ mkdir -m 0755 -p ${stateDir}
+ chown ${chronyUser} ${stateDir}
+ '';
+
+ exec = "chronyd -n ${chronyFlags}";
+ };
+
+ };
+
+}
diff --git a/nixos/modules/services/networking/cntlm.nix b/nixos/modules/services/networking/cntlm.nix
new file mode 100644
index 0000000000000000000000000000000000000000..bfe7209b991f29aec8ae520f5c455d8d29198997
--- /dev/null
+++ b/nixos/modules/services/networking/cntlm.nix
@@ -0,0 +1,115 @@
+{ config, pkgs, ... }:
+
+with pkgs.lib;
+
+let
+
+ cfg = config.services.cntlm;
+ uid = config.ids.uids.cntlm;
+
+in
+
+{
+
+ options = {
+
+ services.cntlm = {
+
+ enable = mkOption {
+ default = false;
+ description = ''
+ Whether to enable the cntlm, which start a local proxy.
+ '';
+ };
+
+ username = mkOption {
+ description = ''
+ Proxy account name, without the possibility to include domain name ('at' sign is interpreted literally).
+ '';
+ };
+
+ domain = mkOption {
+ description = ''Proxy account domain/workgroup name.'';
+ };
+
+ password = mkOption {
+ default = "/etc/cntlm.password";
+ type = with pkgs.lib.types; string;
+ description = ''Proxy account password. Note: use chmod 0600 on /etc/cntlm.password for security.'';
+ };
+
+ netbios_hostname = mkOption {
+ type = types.uniq types.string;
+ description = ''
+ The hostname of your machine.
+ '';
+ };
+
+ proxy = mkOption {
+ description = ''
+ A list of NTLM/NTLMv2 authenticating HTTP proxies.
+
+ Parent proxy, which requires authentication. The same as proxy on the command-line, can be used more than once to specify unlimited
+ number of proxies. Should one proxy fail, cntlm automatically moves on to the next one. The connect request fails only if the whole
+ list of proxies is scanned and (for each request) and found to be invalid. Command-line takes precedence over the configuration file.
+ '';
+ };
+
+ port = mkOption {
+ default = [3128];
+ description = "Specifies on which ports the cntlm daemon listens.";
+ };
+
+ extraConfig = mkOption {
+ default = "";
+ description = "Verbatim contents of cntlm.conf.";
+ };
+
+ };
+
+ };
+
+
+ ###### implementation
+
+ config = mkIf config.services.cntlm.enable {
+
+ services.cntlm.netbios_hostname = mkDefault config.networking.hostName;
+
+ users.extraUsers = singleton {
+ name = "cntlm";
+ description = "cntlm system-wide daemon";
+ home = "/var/empty";
+ };
+
+ jobs.cntlm =
+ { description = "CNTLM is an NTLM / NTLM Session Response / NTLMv2 authenticating HTTP proxy";
+
+ startOn = "started network-interfaces";
+
+ daemonType = "fork";
+
+ exec =
+ ''
+ ${pkgs.cntlm}/bin/cntlm -U cntlm \
+ -c ${pkgs.writeText "cntlm_config" cfg.extraConfig}
+ '';
+ };
+
+ services.cntlm.extraConfig =
+ ''
+ # Cntlm Authentication Proxy Configuration
+ Username ${cfg.username}
+ Domain ${cfg.domain}
+ Password ${cfg.password}
+ Workstation ${cfg.netbios_hostname}
+ ${concatMapStrings (entry: "Proxy ${entry}\n") cfg.proxy}
+
+ ${concatMapStrings (port: ''
+ Listen ${toString port}
+ '') cfg.port}
+ '';
+
+ };
+
+}
diff --git a/nixos/modules/services/networking/ddclient.nix b/nixos/modules/services/networking/ddclient.nix
new file mode 100644
index 0000000000000000000000000000000000000000..62709a040a1f3a117ea4c975355f14d55e1a1e02
--- /dev/null
+++ b/nixos/modules/services/networking/ddclient.nix
@@ -0,0 +1,127 @@
+{ config, pkgs, ... }:
+
+let
+
+ inherit (pkgs.lib) mkOption mkIf singleton;
+
+ inherit (pkgs) ddclient;
+
+ stateDir = "/var/spool/ddclient";
+
+ ddclientUser = "ddclient";
+
+ ddclientFlags = "-foreground -file ${ddclientCfg}";
+
+ ddclientCfg = pkgs.writeText "ddclient.conf" ''
+ daemon=600
+ cache=${stateDir}/ddclient.cache
+ pid=${stateDir}/ddclient.pid
+ use=${config.services.ddclient.web}
+ login=${config.services.ddclient.username}
+ password=${config.services.ddclient.password}
+ protocol=${config.services.ddclient.protocol}
+ server=${config.services.ddclient.server}
+ wildcard=YES
+ ${config.services.ddclient.domain}
+ ${config.services.ddclient.extraConfig}
+ '';
+
+in
+
+{
+
+ ###### interface
+
+ options = {
+
+ services.ddclient = {
+
+ enable = mkOption {
+ default = false;
+ description = ''
+ Whether to synchronise your machine's IP address with a dynamic DNS provider (e.g. dyndns.org).
+ '';
+ };
+
+ domain = mkOption {
+ default = "";
+ description = ''
+ Domain name to synchronize.
+ '';
+ };
+
+ username = mkOption {
+ default = "";
+ description = ''
+ Username.
+ '';
+ };
+
+ password = mkOption {
+ default = "" ;
+ description = ''
+ Password.
+ '';
+ };
+
+ protocol = mkOption {
+ default = "dyndns2" ;
+ description = ''
+ Protocol to use with dynamic DNS provider. (see also, http://sourceforge.net/apps/trac/ddclient/wiki/Protocols)
+ '';
+ };
+
+ server = mkOption {
+ default = "members.dyndns.org" ;
+ description = ''
+ Server
+ '';
+ };
+
+ extraConfig = mkOption {
+ default = "" ;
+ description = ''
+ Extra configuration. Contents will be added verbatim to the configuration file.
+ '';
+ };
+
+ web = mkOption {
+ default = "web, web=checkip.dyndns.com/, web-skip='IP Address'" ;
+ description = "";
+ };
+
+ };
+
+ };
+
+
+ ###### implementation
+
+ config = mkIf config.services.ddclient.enable {
+
+ environment.systemPackages = [ ddclient ];
+
+ users.extraUsers = singleton
+ { name = ddclientUser;
+ uid = config.ids.uids.ddclient;
+ description = "ddclient daemon user";
+ home = stateDir;
+ };
+
+ jobs.ddclient =
+ { name = "ddclient";
+
+ startOn = "startup";
+
+ preStart =
+ ''
+ mkdir -m 0755 -p ${stateDir}
+ chown ${ddclientUser} ${stateDir}
+ '';
+
+ exec = "${ddclient}/bin/ddclient ${ddclientFlags}";
+ };
+
+ };
+
+}
diff --git a/nixos/modules/services/networking/dhclient.nix b/nixos/modules/services/networking/dhclient.nix
new file mode 100644
index 0000000000000000000000000000000000000000..1e34344389977fa32e31d20fa533ecb5c91ef5b1
--- /dev/null
+++ b/nixos/modules/services/networking/dhclient.nix
@@ -0,0 +1,111 @@
+{ config, pkgs, ... }:
+
+with pkgs.lib;
+
+let
+
+ inherit (pkgs) nettools dhcp lib;
+
+ # Don't start dhclient on explicitly configured interfaces or on
+ # interfaces that are part of a bridge.
+ ignoredInterfaces =
+ map (i: i.name) (lib.filter (i: i ? ipAddress && i.ipAddress != "" ) config.networking.interfaces)
+ ++ concatLists (attrValues (mapAttrs (n: v: v.interfaces) config.networking.bridges));
+
+ stateDir = "/var/lib/dhcp"; # Don't use /var/state/dhcp; not FHS-compliant.
+
+ dhclientExitHooks = pkgs.writeText "dhclient-exit-hooks"
+ ''
+ #echo "$reason" >> /tmp/dhcp-exit
+ #echo "$exit_status" >> /tmp/dhcp-exit
+
+ if test "$reason" = BOUND -o "$reason" = REBOOT; then
+ # Restart ntpd. (The "ip-up" event below will trigger the
+ # restart.) We need to restart it to make sure that it will
+ # actually do something: if ntpd cannot resolve the server
+ # hostnames in its config file, then it will never do
+ # anything ever again ("couldn't resolve ..., giving up on
+ # it"), so we silently lose time synchronisation.
+ ${config.system.build.upstart}/sbin/initctl stop ntpd
+
+ ${config.system.build.upstart}/sbin/initctl emit -n ip-up
+ fi
+
+ if test "$reason" = EXPIRE -o "$reason" = RELEASE; then
+ ${config.system.build.upstart}/sbin/initctl emit -n ip-down
+ fi
+ '';
+
+in
+
+{
+
+ ###### implementation
+
+ config = mkIf config.networking.useDHCP {
+
+ # dhclient barfs if /proc/net/if_inet6 doesn't exist.
+ boot.kernelModules = [ "ipv6" ];
+
+ jobs.dhclient =
+ { startOn = "started network-interfaces";
+ stopOn = "stopping network-interfaces";
+
+ path = [ dhcp ];
+
+ script =
+ ''
+ # Determine the interface on which to start dhclient.
+ interfaces=
+
+ for i in $(cd /sys/class/net && ls -d *); do
+ # Only run dhclient on interfaces of type ARPHRD_ETHER
+ # (1), i.e. Ethernet. Ignore peth* devices; on Xen,
+ # they're renamed physical Ethernet cards used for
+ # bridging. Likewise for vif* and tap* (Xen) and
+ # virbr* and vnet* (libvirt).
+ if [ "$(cat /sys/class/net/$i/type)" = 1 ]; then
+ if ! for j in ${toString ignoredInterfaces}; do echo $j; done | grep -F -x -q "$i" &&
+ ! echo "$i" | grep -x -q "peth.*\|vif.*\|tap.*\|virbr.*\|vnet.*";
+ then
+ echo "Running dhclient on $i"
+ interfaces="$interfaces $i"
+ fi
+ fi
+ done
+
+ if test -z "$interfaces"; then
+ echo 'No interfaces on which to start dhclient!'
+ exit 1
+ fi
+
+ mkdir -m 755 -p ${stateDir}
+
+ exec dhclient -d $interfaces -e "PATH=$PATH" -lf ${stateDir}/dhclient.leases -sf ${dhcp}/sbin/dhclient-script
+ '';
+ };
+
+ environment.systemPackages = [dhcp];
+
+ environment.etc =
+ [ # Dhclient hooks for emitting ip-up/ip-down events.
+ { source = dhclientExitHooks;
+ target = "dhclient-exit-hooks";
+ }
+ ];
+
+ powerManagement.resumeCommands =
+ ''
+ ${config.system.build.upstart}/sbin/restart dhclient
+ '';
+
+ networking.interfaceMonitor.commands =
+ ''
+ if [ "$status" = up ]; then
+ ${config.system.build.upstart}/sbin/restart dhclient
+ fi
+ '';
+
+ };
+
+}
diff --git a/nixos/modules/services/networking/dhcpcd.nix b/nixos/modules/services/networking/dhcpcd.nix
new file mode 100644
index 0000000000000000000000000000000000000000..48803511a5eaf1e33594ee890631fdb491160778
--- /dev/null
+++ b/nixos/modules/services/networking/dhcpcd.nix
@@ -0,0 +1,143 @@
+{ config, pkgs, ... }:
+
+with pkgs.lib;
+
+let
+
+ inherit (pkgs) dhcpcd;
+
+ # Don't start dhclient on explicitly configured interfaces or on
+ # interfaces that are part of a bridge.
+ ignoredInterfaces =
+ map (i: i.name) (filter (i: i.ipAddress != null) (attrValues config.networking.interfaces))
+ ++ concatLists (attrValues (mapAttrs (n: v: v.interfaces) config.networking.bridges))
+ ++ config.networking.dhcpcd.denyInterfaces;
+
+ # Config file adapted from the one that ships with dhcpcd.
+ dhcpcdConf = pkgs.writeText "dhcpcd.conf"
+ ''
+ # Inform the DHCP server of our hostname for DDNS.
+ hostname
+
+ # A list of options to request from the DHCP server.
+ option domain_name_servers, domain_name, domain_search, host_name
+ option classless_static_routes, ntp_servers, interface_mtu
+
+ # A ServerID is required by RFC2131.
+ # Commented out because of many non-compliant DHCP servers in the wild :(
+ #require dhcp_server_identifier
+
+ # A hook script is provided to lookup the hostname if not set by
+ # the DHCP server, but it should not be run by default.
+ nohook lookup-hostname
+
+ # Ignore peth* devices; on Xen, they're renamed physical
+ # Ethernet cards used for bridging. Likewise for vif* and tap*
+ # (Xen) and virbr* and vnet* (libvirt).
+ denyinterfaces ${toString ignoredInterfaces} peth* vif* tap* tun* virbr* vnet* vboxnet*
+
+ ${config.networking.dhcpcd.extraConfig}
+ '';
+
+ # Hook for emitting ip-up/ip-down events.
+ exitHook = pkgs.writeText "dhcpcd.exit-hook"
+ ''
+ #exec >> /var/log/dhcpcd 2>&1
+ #set -x
+
+ params="IFACE=$interface REASON=$reason"
+
+ # only works when interface is wireless and wpa_supplicant has a control socket
+ # but we allow it to fail silently
+ ${optionalString config.networking.wireless.enable ''
+ params+=" $(${pkgs.wpa_supplicant}/sbin/wpa_cli -i$interface status 2>/dev/null | grep ssid | sed 's|^b|B|;s|ssid|SSID|' | xargs)"
+ ''}
+
+ if [ "$reason" = BOUND -o "$reason" = REBOOT ]; then
+ # Restart ntpd. We need to restart it to make sure that it
+ # will actually do something: if ntpd cannot resolve the
+ # server hostnames in its config file, then it will never do
+ # anything ever again ("couldn't resolve ..., giving up on
+ # it"), so we silently lose time synchronisation.
+ ${config.systemd.package}/bin/systemctl try-restart ntpd.service
+
+ ${config.systemd.package}/bin/systemctl start ip-up.target
+ fi
+
+ #if [ "$reason" = EXPIRE -o "$reason" = RELEASE -o "$reason" = NOCARRIER ] ; then
+ # ${config.systemd.package}/bin/systemctl start ip-down.target
+ #fi
+ '';
+
+in
+
+{
+
+ ###### interface
+
+ options = {
+
+ networking.dhcpcd.denyInterfaces = mkOption {
+ default = [];
+ description = ''
+ Disable the DHCP client for any interface whose name matches
+ any of the shell glob patterns in this list. The purpose of
+ this option is to blacklist virtual interfaces such as those
+ created by Xen, libvirt, LXC, etc.
+ '';
+ };
+
+ networking.dhcpcd.extraConfig = mkOption {
+ default = "";
+ description = ''
+ Literal string to append to the config file generated for dhcpcd.
+ '';
+ };
+
+ };
+
+
+ ###### implementation
+
+ config = mkIf config.networking.useDHCP {
+
+ systemd.services.dhcpcd =
+ { description = "DHCP Client";
+
+ wantedBy = [ "network.target" ];
+ after = [ "systemd-udev-settle.service" ];
+
+ # Stopping dhcpcd during a reconfiguration is undesirable
+ # because it brings down the network interfaces configured by
+ # dhcpcd. So do a "systemctl restart" instead.
+ stopIfChanged = false;
+
+ path = [ dhcpcd pkgs.nettools pkgs.openresolv ];
+
+ serviceConfig =
+ { Type = "forking";
+ PIDFile = "/run/dhcpcd.pid";
+ ExecStart = "@${dhcpcd}/sbin/dhcpcd dhcpcd --config ${dhcpcdConf}";
+ ExecReload = "${dhcpcd}/sbin/dhcpcd --rebind";
+ StandardError = "null";
+ Restart = "always";
+ };
+ };
+
+ environment.systemPackages = [ dhcpcd ];
+
+ environment.etc =
+ [ { source = exitHook;
+ target = "dhcpcd.exit-hook";
+ }
+ ];
+
+ powerManagement.resumeCommands =
+ ''
+ # Tell dhcpcd to rebind its interfaces if it's running.
+ ${config.systemd.package}/bin/systemctl reload dhcpcd.service
+ '';
+
+ };
+
+}
diff --git a/nixos/modules/services/networking/dhcpd.nix b/nixos/modules/services/networking/dhcpd.nix
new file mode 100644
index 0000000000000000000000000000000000000000..43e0843cb97183f939e6a5a369aa395372732e13
--- /dev/null
+++ b/nixos/modules/services/networking/dhcpd.nix
@@ -0,0 +1,131 @@
+{ config, pkgs, ... }:
+
+with pkgs.lib;
+
+let
+
+ cfg = config.services.dhcpd;
+
+ stateDir = "/var/lib/dhcp"; # Don't use /var/state/dhcp; not FHS-compliant.
+
+ configFile = if cfg.configFile != null then cfg.configFile else pkgs.writeText "dhcpd.conf"
+ ''
+ default-lease-time 600;
+ max-lease-time 7200;
+ authoritative;
+ ddns-update-style ad-hoc;
+ log-facility local1; # see dhcpd.nix
+
+ ${cfg.extraConfig}
+
+ ${pkgs.lib.concatMapStrings
+ (machine: ''
+ host ${machine.hostName} {
+ hardware ethernet ${machine.ethernetAddress};
+ fixed-address ${machine.ipAddress};
+ }
+ '')
+ cfg.machines
+ }
+ '';
+
+in
+
+{
+
+ ###### interface
+
+ options = {
+
+ services.dhcpd = {
+
+ enable = mkOption {
+ default = false;
+ description = "
+ Whether to enable the DHCP server.
+ ";
+ };
+
+ extraConfig = mkOption {
+ default = "";
+ example = "
+ option subnet-mask 255.255.255.0;
+ option broadcast-address 192.168.1.255;
+ option routers 192.168.1.5;
+ option domain-name-servers 130.161.158.4, 130.161.33.17, 130.161.180.1;
+ option domain-name \"example.org\";
+ subnet 192.168.1.0 netmask 255.255.255.0 {
+ range 192.168.1.100 192.168.1.200;
+ }
+ ";
+ description = "
+ Extra text to be appended to the DHCP server configuration
+ file. Currently, you almost certainly need to specify
+ something here, such as the options specifying the subnet
+ mask, DNS servers, etc.
+ ";
+ };
+
+ configFile = mkOption {
+ default = null;
+ description = "
+ The path of the DHCP server configuration file. If no file
+ is specified, a file is generated using the other options.
+ ";
+ };
+
+ interfaces = mkOption {
+ default = ["eth0"];
+ description = "
+ The interfaces on which the DHCP server should listen.
+ ";
+ };
+
+ machines = mkOption {
+ default = [];
+ example = [
+ { hostName = "foo";
+ ethernetAddress = "00:16:76:9a:32:1d";
+ ipAddress = "192.168.1.10";
+ }
+ { hostName = "bar";
+ ethernetAddress = "00:19:d1:1d:c4:9a";
+ ipAddress = "192.168.1.11";
+ }
+ ];
+ description = "
+ A list mapping ethernet addresses to IP addresses for the
+ DHCP server.
+ ";
+ };
+
+ };
+
+ };
+
+
+ ###### implementation
+
+ config = mkIf config.services.dhcpd.enable {
+
+ jobs.dhcpd =
+ { description = "DHCP server";
+
+ startOn = "started network-interfaces";
+ stopOn = "stopping network-interfaces";
+
+ script =
+ ''
+ mkdir -m 755 -p ${stateDir}
+
+ touch ${stateDir}/dhcpd.leases
+
+ exec ${pkgs.dhcp}/sbin/dhcpd -f -cf ${configFile} \
+ -lf ${stateDir}/dhcpd.leases \
+ ${toString cfg.interfaces}
+ '';
+ };
+
+ };
+
+}
diff --git a/nixos/modules/services/networking/dnsmasq.nix b/nixos/modules/services/networking/dnsmasq.nix
new file mode 100644
index 0000000000000000000000000000000000000000..b726493d421fbe4218b14fc85192be35b03798ed
--- /dev/null
+++ b/nixos/modules/services/networking/dnsmasq.nix
@@ -0,0 +1,70 @@
+{ config, pkgs, ... }:
+
+with pkgs.lib;
+
+let
+ cfg = config.services.dnsmasq;
+ dnsmasq = pkgs.dnsmasq;
+
+ serversParam = concatMapStrings (s: "-S ${s} ") cfg.servers;
+
+ dnsmasqConf = pkgs.writeText "dnsmasq.conf" ''
+ ${cfg.extraConfig}
+ '';
+
+in
+
+{
+
+ ###### interface
+
+ options = {
+
+ services.dnsmasq = {
+
+ enable = mkOption {
+ default = false;
+ description = ''
+ Whether to run dnsmasq.
+ '';
+ };
+
+ servers = mkOption {
+ default = [];
+ example = [ "8.8.8.8" "8.8.4.4" ];
+ description = ''
+ The parameter to dnsmasq -S.
+ '';
+ };
+
+ extraConfig = mkOption {
+ type = types.string;
+ default = "";
+ description = ''
+ Extra configuration directives that should be added to
+ dnsmasq.conf
+ '';
+ };
+
+ };
+
+ };
+
+
+ ###### implementation
+
+ config = mkIf config.services.dnsmasq.enable {
+
+ jobs.dnsmasq =
+ { description = "dnsmasq daemon";
+
+ startOn = "ip-up";
+
+ daemonType = "daemon";
+
+ exec = "${dnsmasq}/bin/dnsmasq -R ${serversParam} -o -C ${dnsmasqConf}";
+ };
+
+ };
+
+}
diff --git a/nixos/modules/services/networking/ejabberd.nix b/nixos/modules/services/networking/ejabberd.nix
new file mode 100644
index 0000000000000000000000000000000000000000..05e0aba7d70e25e2349b89335c9012355e49e8fd
--- /dev/null
+++ b/nixos/modules/services/networking/ejabberd.nix
@@ -0,0 +1,137 @@
+{ config, pkgs, ... }:
+
+with pkgs.lib;
+
+let
+
+ cfg = config.services.ejabberd;
+
+in
+
+{
+
+ ###### interface
+
+ options = {
+
+ services.ejabberd = {
+
+ enable = mkOption {
+ default = false;
+ description = "Whether to enable ejabberd server";
+ };
+
+ spoolDir = mkOption {
+ default = "/var/lib/ejabberd";
+ description = "Location of the spooldir of ejabberd";
+ };
+
+ logsDir = mkOption {
+ default = "/var/log/ejabberd";
+ description = "Location of the logfile directory of ejabberd";
+ };
+
+ confDir = mkOption {
+ default = "/var/ejabberd";
+ description = "Location of the config directory of ejabberd";
+ };
+
+ virtualHosts = mkOption {
+ default = "\"localhost\"";
+ description = "Virtualhosts that ejabberd should host. Hostnames are surrounded with doublequotes and separated by commas";
+ };
+
+ loadDumps = mkOption {
+ default = [];
+ description = "Configuration dump that should be loaded on the first startup";
+ example = [ ./myejabberd.dump ];
+ };
+ };
+
+ };
+
+
+ ###### implementation
+
+ config = mkIf cfg.enable {
+ environment.systemPackages = [ pkgs.ejabberd ];
+
+ jobs.ejabberd =
+ { description = "EJabberd server";
+
+ startOn = "started network-interfaces";
+ stopOn = "stopping network-interfaces";
+
+ environment = {
+ PATH = "$PATH:${pkgs.ejabberd}/sbin:${pkgs.ejabberd}/bin:${pkgs.coreutils}/bin:${pkgs.bash}/bin:${pkgs.gnused}/bin";
+ };
+
+ preStart =
+ ''
+ # Initialise state data
+ mkdir -p ${cfg.logsDir}
+
+ if ! test -d ${cfg.spoolDir}
+ then
+ initialize=1
+ cp -av ${pkgs.ejabberd}/var/lib/ejabberd /var/lib
+ fi
+
+ if ! test -d ${cfg.confDir}
+ then
+ mkdir -p ${cfg.confDir}
+ cp ${pkgs.ejabberd}/etc/ejabberd/* ${cfg.confDir}
+ sed -e 's|{hosts, \["localhost"\]}.|{hosts, \[${cfg.virtualHosts}\]}.|' ${pkgs.ejabberd}/etc/ejabberd/ejabberd.cfg > ${cfg.confDir}/ejabberd.cfg
+ fi
+
+ ejabberdctl --config-dir ${cfg.confDir} --logs ${cfg.logsDir} --spool ${cfg.spoolDir} start
+
+ ${if cfg.loadDumps == [] then "" else
+ ''
+ if [ "$initialize" = "1" ]
+ then
+ # Wait until the ejabberd server is available for use
+ count=0
+ while ! ejabberdctl --config-dir ${cfg.confDir} --logs ${cfg.logsDir} --spool ${cfg.spoolDir} status
+ do
+ if [ $count -eq 30 ]
+ then
+ echo "Tried 30 times, giving up..."
+ exit 1
+ fi
+
+ echo "Ejabberd daemon not yet started. Waiting for 1 second..."
+ count=$((count++))
+ sleep 1
+ done
+
+ ${concatMapStrings (dump:
+ ''
+ echo "Importing dump: ${dump}"
+
+ if [ -f ${dump} ]
+ then
+ ejabberdctl --config-dir ${cfg.confDir} --logs ${cfg.logsDir} --spool ${cfg.spoolDir} load ${dump}
+ elif [ -d ${dump} ]
+ then
+ for i in ${dump}/ejabberd-dump/*
+ do
+ ejabberdctl --config-dir ${cfg.confDir} --logs ${cfg.logsDir} --spool ${cfg.spoolDir} load $i
+ done
+ fi
+ '') cfg.loadDumps}
+ fi
+ ''}
+ '';
+
+ postStop =
+ ''
+ ejabberdctl --config-dir ${cfg.confDir} --logs ${cfg.logsDir} --spool ${cfg.spoolDir} stop
+ '';
+ };
+
+ security.pam.services.ejabberd = {};
+
+ };
+
+}
diff --git a/nixos/modules/services/networking/firewall.nix b/nixos/modules/services/networking/firewall.nix
new file mode 100644
index 0000000000000000000000000000000000000000..b24ac2d7032516b0c5112e5c71dd63d16f28482c
--- /dev/null
+++ b/nixos/modules/services/networking/firewall.nix
@@ -0,0 +1,368 @@
+/* This module enables a simple firewall.
+
+ The firewall can be customised in arbitrary ways by setting
+ ‘networking.firewall.extraCommands’. For modularity, the firewall
+ uses several chains:
+
+ - ‘nixos-fw-input’ is the main chain for input packet processing.
+
+ - ‘nixos-fw-log-refuse’ and ‘nixos-fw-refuse’ are called for
+ refused packets. (The former jumps to the latter after logging
+ the packet.) If you want additional logging, or want to accept
+ certain packets anyway, you can insert rules at the start of
+ these chain.
+
+ - ‘nixos-fw-accept’ is called for accepted packets. If you want
+ additional logging, or want to reject certain packets anyway, you
+ can insert rules at the start of this chain.
+
+*/
+
+
+
+{ config, pkgs, ... }:
+
+with pkgs.lib;
+
+let
+
+ cfg = config.networking.firewall;
+
+ helpers =
+ ''
+ # Helper command to manipulate both the IPv4 and IPv6 tables.
+ ip46tables() {
+ iptables "$@"
+ ${optionalString config.networking.enableIPv6 ''
+ ip6tables "$@"
+ ''}
+ }
+ '';
+
+ kernelPackages = config.boot.kernelPackages;
+
+ kernelHasRPFilter = kernelPackages.kernel.features.netfilterRPFilter or false;
+ kernelCanDisableHelpers = kernelPackages.kernel.features.canDisableNetfilterConntrackHelpers or false;
+
+in
+
+{
+
+ ###### interface
+
+ options = {
+
+ networking.firewall.enable = mkOption {
+ default = false;
+ description =
+ ''
+ Whether to enable the firewall. This is a simple stateful
+ firewall that blocks connection attempts to unauthorised TCP
+ or UDP ports on this machine. It does not affect packet
+ forwarding.
+ '';
+ };
+
+ networking.firewall.logRefusedConnections = mkOption {
+ default = true;
+ description =
+ ''
+ Whether to log rejected or dropped incoming connections.
+ '';
+ };
+
+ networking.firewall.logRefusedPackets = mkOption {
+ default = false;
+ description =
+ ''
+ Whether to log all rejected or dropped incoming packets.
+ This tends to give a lot of log messages, so it's mostly
+ useful for debugging.
+ '';
+ };
+
+ networking.firewall.logRefusedUnicastsOnly = mkOption {
+ default = true;
+ description =
+ ''
+ If
networking.firewall.logRefusedPackets
+ and this option are enabled, then only log packets
+ specifically directed at this machine, i.e., not broadcasts
+ or multicasts.
+ '';
+ };
+
+ networking.firewall.rejectPackets = mkOption {
+ default = false;
+ description =
+ ''
+ If set, forbidden packets are rejected rather than dropped
+ (ignored). This means that an ICMP "port unreachable" error
+ message is sent back to the client. Rejecting packets makes
+ port scanning somewhat easier.
+ '';
+ };
+
+ networking.firewall.trustedInterfaces = mkOption {
+ type = types.listOf types.string;
+ description =
+ ''
+ Traffic coming in from these interfaces will be accepted
+ unconditionally.
+ '';
+ };
+
+ networking.firewall.allowedTCPPorts = mkOption {
+ default = [];
+ example = [ 22 80 ];
+ type = types.listOf types.int;
+ description =
+ ''
+ List of TCP ports on which incoming connections are
+ accepted.
+ '';
+ };
+
+ networking.firewall.allowedUDPPorts = mkOption {
+ default = [];
+ example = [ 53 ];
+ type = types.listOf types.int;
+ description =
+ ''
+ List of open UDP ports.
+ '';
+ };
+
+ networking.firewall.allowPing = mkOption {
+ default = false;
+ type = types.bool;
+ description =
+ ''
+ Whether to respond to incoming ICMPv4 echo requests
+ ("pings"). ICMPv6 pings are always allowed because the
+ larger address space of IPv6 makes network scanning much
+ less effective.
+ '';
+ };
+
+ networking.firewall.checkReversePath = mkOption {
+ default = kernelHasRPFilter;
+ type = types.bool;
+ description =
+ ''
+ Performs a reverse path filter test on a packet.
+ If a reply to the packet would not be sent via the same interface
+ that the packet arrived on, it is refused.
+
+ If using asymmetric routing or other complicated routing,
+ disable this setting and setup your own counter-measures.
+
+ (needs kernel 3.3+)
+ '';
+ };
+
+ networking.firewall.connectionTrackingModules = mkOption {
+ default = [ "ftp" ];
+ example = [ "ftp" "irc" "sane" "sip" "tftp" "amanda" "h323" "netbios_sn" "pptp" "snmp" ];
+ type = types.listOf types.string;
+ description =
+ ''
+ List of connection-tracking helpers that are auto-loaded.
+ The complete list of possible values is given in the example.
+
+ As helpers can pose as a security risk, it is advised to
+ set this to an empty list and disable the setting
+ networking.firewall.autoLoadConntrackHelpers
+
+ Loading of helpers is recommended to be done through the new
+ CT target. More info:
+ https://home.regit.org/netfilter-en/secure-use-of-helpers/
+ '';
+ };
+
+ networking.firewall.autoLoadConntrackHelpers = mkOption {
+ default = true;
+ type = types.bool;
+ description =
+ ''
+ Whether to auto-load connection-tracking helpers.
+ See the description at networking.firewall.connectionTrackingModules
+
+ (needs kernel 3.5+)
+ '';
+ };
+
+ networking.firewall.extraCommands = mkOption {
+ default = "";
+ example = "iptables -A INPUT -p icmp -j ACCEPT";
+ description =
+ ''
+ Additional shell commands executed as part of the firewall
+ initialisation script. These are executed just before the
+ final "reject" firewall rule is added, so they can be used
+ to allow packets that would otherwise be refused.
+ '';
+ };
+
+ };
+
+
+ ###### implementation
+
+ # !!! Maybe if `enable' is false, the firewall should still be built
+ # but not started by default. However, currently nixos-rebuild
+ # doesn't deal with such Upstart jobs properly (it starts them if
+ # they are changed, regardless of whether the start condition
+ # holds).
+ config = mkIf cfg.enable {
+
+ networking.firewall.trustedInterfaces = [ "lo" ];
+
+ environment.systemPackages = [ pkgs.iptables ];
+
+ boot.kernelModules = map (x: "nf_conntrack_${x}") cfg.connectionTrackingModules;
+ boot.extraModprobeConfig = optionalString (!cfg.autoLoadConntrackHelpers) ''
+ options nf_conntrack nf_conntrack_helper=0
+ '';
+
+ assertions = [ { assertion = ! cfg.checkReversePath || kernelHasRPFilter;
+ message = "This kernel does not support rpfilter"; }
+ { assertion = cfg.autoLoadConntrackHelpers || kernelCanDisableHelpers;
+ message = "This kernel does not support disabling conntrack helpers"; }
+ ];
+
+ jobs.firewall =
+ { description = "Firewall";
+
+ startOn = "started network-interfaces";
+
+ path = [ pkgs.iptables ];
+
+ preStart =
+ ''
+ ${helpers}
+
+ # Flush the old firewall rules. !!! Ideally, updating the
+ # firewall would be atomic. Apparently that's possible
+ # with iptables-restore.
+ ip46tables -D INPUT -j nixos-fw 2> /dev/null || true
+ for chain in nixos-fw nixos-fw-accept nixos-fw-log-refuse nixos-fw-refuse FW_REFUSE; do
+ ip46tables -F "$chain" 2> /dev/null || true
+ ip46tables -X "$chain" 2> /dev/null || true
+ done
+
+
+ # The "nixos-fw-accept" chain just accepts packets.
+ ip46tables -N nixos-fw-accept
+ ip46tables -A nixos-fw-accept -j ACCEPT
+
+
+ # The "nixos-fw-refuse" chain rejects or drops packets.
+ ip46tables -N nixos-fw-refuse
+
+ ${if cfg.rejectPackets then ''
+ # Send a reset for existing TCP connections that we've
+ # somehow forgotten about. Send ICMP "port unreachable"
+ # for everything else.
+ ip46tables -A nixos-fw-refuse -p tcp ! --syn -j REJECT --reject-with tcp-reset
+ ip46tables -A nixos-fw-refuse -j REJECT
+ '' else ''
+ ip46tables -A nixos-fw-refuse -j DROP
+ ''}
+
+
+ # The "nixos-fw-log-refuse" chain performs logging, then
+ # jumps to the "nixos-fw-refuse" chain.
+ ip46tables -N nixos-fw-log-refuse
+
+ ${optionalString cfg.logRefusedConnections ''
+ ip46tables -A nixos-fw-log-refuse -p tcp --syn -j LOG --log-level info --log-prefix "rejected connection: "
+ ''}
+ ${optionalString (cfg.logRefusedPackets && !cfg.logRefusedUnicastsOnly) ''
+ ip46tables -A nixos-fw-log-refuse -m pkttype --pkt-type broadcast \
+ -j LOG --log-level info --log-prefix "rejected broadcast: "
+ ip46tables -A nixos-fw-log-refuse -m pkttype --pkt-type multicast \
+ -j LOG --log-level info --log-prefix "rejected multicast: "
+ ''}
+ ip46tables -A nixos-fw-log-refuse -m pkttype ! --pkt-type unicast -j nixos-fw-refuse
+ ${optionalString cfg.logRefusedPackets ''
+ ip46tables -A nixos-fw-log-refuse \
+ -j LOG --log-level info --log-prefix "rejected packet: "
+ ''}
+ ip46tables -A nixos-fw-log-refuse -j nixos-fw-refuse
+
+
+ # The "nixos-fw" chain does the actual work.
+ ip46tables -N nixos-fw
+
+ # Perform a reverse-path test to refuse spoofers
+ # For now, we just drop, as the raw table doesn't have a log-refuse yet
+ ${optionalString (kernelHasRPFilter && cfg.checkReversePath) ''
+ if ! ip46tables -A PREROUTING -t raw -m rpfilter --invert -j DROP; then
+ echo "<2>failed to initialise rpfilter support" >&2
+ fi
+ ''}
+
+ # Accept all traffic on the trusted interfaces.
+ ${flip concatMapStrings cfg.trustedInterfaces (iface: ''
+ ip46tables -A nixos-fw -i ${iface} -j nixos-fw-accept
+ '')}
+
+ # Accept packets from established or related connections.
+ ip46tables -A nixos-fw -m conntrack --ctstate ESTABLISHED,RELATED -j nixos-fw-accept
+
+ # Accept connections to the allowed TCP ports.
+ ${concatMapStrings (port:
+ ''
+ ip46tables -A nixos-fw -p tcp --dport ${toString port} -j nixos-fw-accept
+ ''
+ ) cfg.allowedTCPPorts
+ }
+
+ # Accept packets on the allowed UDP ports.
+ ${concatMapStrings (port:
+ ''
+ ip46tables -A nixos-fw -p udp --dport ${toString port} -j nixos-fw-accept
+ ''
+ ) cfg.allowedUDPPorts
+ }
+
+ # Accept IPv4 multicast. Not a big security risk since
+ # probably nobody is listening anyway.
+ #iptables -A nixos-fw -d 224.0.0.0/4 -j nixos-fw-accept
+
+ # Optionally respond to ICMPv4 pings.
+ ${optionalString cfg.allowPing ''
+ iptables -A nixos-fw -p icmp --icmp-type echo-request -j nixos-fw-accept
+ ''}
+
+ # Accept all ICMPv6 messages except redirects and node
+ # information queries (type 139). See RFC 4890, section
+ # 4.4.
+ ${optionalString config.networking.enableIPv6 ''
+ ip6tables -A nixos-fw -p icmpv6 --icmpv6-type redirect -j DROP
+ ip6tables -A nixos-fw -p icmpv6 --icmpv6-type 139 -j DROP
+ ip6tables -A nixos-fw -p icmpv6 -j nixos-fw-accept
+ ''}
+
+ ${cfg.extraCommands}
+
+ # Reject/drop everything else.
+ ip46tables -A nixos-fw -j nixos-fw-log-refuse
+
+
+ # Enable the firewall.
+ ip46tables -A INPUT -j nixos-fw
+ '';
+
+ postStop =
+ ''
+ ${helpers}
+ ip46tables -D INPUT -j nixos-fw || true
+ #ip46tables -P INPUT ACCEPT
+ '';
+ };
+
+ };
+
+}
diff --git a/nixos/modules/services/networking/flashpolicyd.nix b/nixos/modules/services/networking/flashpolicyd.nix
new file mode 100644
index 0000000000000000000000000000000000000000..f5bc550ab5f8f9ac98177eabe779a58bca538418
--- /dev/null
+++ b/nixos/modules/services/networking/flashpolicyd.nix
@@ -0,0 +1,84 @@
+{ config, pkgs, ... }:
+
+with pkgs.lib;
+
+let
+
+ cfg = config.services.flashpolicyd;
+
+ flashpolicyd = pkgs.stdenv.mkDerivation {
+ name = "flashpolicyd-0.6";
+
+ src = pkgs.fetchurl {
+ name = "flashpolicyd_v0.6.zip";
+ url = "http://www.adobe.com/content/dotcom/en/devnet/flashplayer/articles/socket_policy_files/_jcr_content/articlePrerequistes/multiplefiles/node_1277808777771/file.res/flashpolicyd_v0.6%5B1%5D.zip";
+ sha256 = "16zk237233npwfq1m4ksy4g5lzy1z9fp95w7pz0cdlpmv0fv9sm3";
+ };
+
+ buildInputs = [ pkgs.unzip pkgs.perl ];
+
+ installPhase = "mkdir $out; cp -pr * $out/; chmod +x $out/*/*.pl";
+ };
+
+ flashpolicydWrapper = pkgs.writeScriptBin "flashpolicyd"
+ ''
+ #! ${pkgs.stdenv.shell}
+ exec ${flashpolicyd}/Perl_xinetd/in.flashpolicyd.pl \
+ --file=${pkgs.writeText "flashpolixy.xml" cfg.policy} \
+ 2> /dev/null
+ '';
+
+in
+
+{
+
+ ###### interface
+
+ options = {
+
+ services.flashpolicyd = {
+
+ enable = mkOption {
+ default = false;
+ description =
+ ''
+ Whether to enable the Flash Policy server. This is
+ necessary if you want Flash applications to make
+ connections to your server.
+ '';
+ };
+
+ policy = mkOption {
+ default =
+ ''
+
+
+
+
+
+
+ '';
+ description = "The policy to be served. The default is to allow connections from any domain to any port.";
+ };
+
+ };
+
+ };
+
+
+ ###### implementation
+
+ config = mkIf cfg.enable {
+
+ services.xinetd.enable = true;
+
+ services.xinetd.services = singleton
+ { name = "flashpolicy";
+ port = 843;
+ unlisted = true;
+ server = "${flashpolicydWrapper}/bin/flashpolicyd";
+ };
+
+ };
+
+}
diff --git a/nixos/modules/services/networking/freenet.nix b/nixos/modules/services/networking/freenet.nix
new file mode 100644
index 0000000000000000000000000000000000000000..a4bd2098986dd1353f82ea2ac302531f700ec01c
--- /dev/null
+++ b/nixos/modules/services/networking/freenet.nix
@@ -0,0 +1,64 @@
+# NixOS module for Freenet daemon
+
+{ config, pkgs, ... }:
+
+with pkgs.lib;
+
+let
+
+ cfg = config.services.freenet;
+ varDir = "/var/lib/freenet";
+
+in
+
+{
+
+ ### configuration
+
+ options = {
+
+ services.freenet = {
+
+ enable = mkOption {
+ type = types.uniq types.bool;
+ default = false;
+ description = "Enable the Freenet daemon";
+ };
+
+ nice = mkOption {
+ type = types.uniq types.int;
+ default = 10;
+ description = "Set the nice level for the Freenet daemon";
+ };
+
+ };
+
+ };
+
+ ### implementation
+
+ config = mkIf cfg.enable {
+
+ systemd.services.freenet = {
+ description = "Freenet daemon";
+ after = [ "network.target" ];
+ wantedBy = [ "multi-user.target" ];
+ serviceConfig.ExecStart = "${pkgs.freenet}/bin/freenet";
+ serviceConfig.User = "freenet";
+ serviceConfig.UMask = "0007";
+ serviceConfig.WorkingDirectory = varDir;
+ serviceConfig.Nice = cfg.nice;
+ };
+
+ users.extraUsers.freenet = {
+ group = "freenet";
+ description = "Freenet daemon user";
+ home = varDir;
+ createHome = true;
+ uid = config.ids.uids.freenet;
+ };
+
+ users.extraGroups.freenet.gid = config.ids.gids.freenet;
+ };
+
+}
diff --git a/nixos/modules/services/networking/git-daemon.nix b/nixos/modules/services/networking/git-daemon.nix
new file mode 100644
index 0000000000000000000000000000000000000000..a7c7c206198ff1762f8cd4197367cc335d3e8880
--- /dev/null
+++ b/nixos/modules/services/networking/git-daemon.nix
@@ -0,0 +1,112 @@
+{pkgs, config, ...}:
+with pkgs.lib;
+let
+
+ cfg = config.services.gitDaemon;
+ gitUser = "git";
+
+in
+{
+
+ ###### interface
+
+ options = {
+ services.gitDaemon = {
+
+ enable = mkOption {
+ default = false;
+ description = ''
+ Enable Git daemon, which allows public hosting of git repositories
+ without any access controls. This is mostly intended for read-only access.
+
+ You can allow write access by setting daemon.receivepack configuration
+ item of the repository to true. This is solely meant for a closed LAN setting
+ where everybody is friendly.
+
+ If you need any access controls, use something else.
+ '';
+ };
+
+ basePath = mkOption {
+ default = "";
+ example = "/srv/git/";
+ description = ''
+ Remap all the path requests as relative to the given path. For example,
+ if you set base-path to /srv/git, then if you later try to pull
+ git://example.com/hello.git, Git daemon will interpret the path as /srv/git/hello.git.
+ '';
+ };
+
+ exportAll = mkOption {
+ default = false;
+ description = ''
+ Publish all directories that look like Git repositories (have the objects
+ and refs subdirectories), even if they do not have the git-daemon-export-ok file.
+
+ If disabled, you need to touch .git/git-daemon-export-ok in each repository
+ you want the daemon to publish.
+
+ Warning: enabling this without a repository whitelist or basePath
+ publishes every git repository you have.
+ '';
+ };
+
+ repositories = mkOption {
+ default = [];
+ example = [ "/srv/git" "/home/user/git/repo2" ];
+ description = ''
+ A whitelist of paths of git repositories, or directories containing repositories
+ all of which would be published. Paths must not end in "/".
+
+ Warning: leaving this empty and enabling exportAll publishes all
+ repositories in your filesystem or basePath if specified.
+ '';
+ };
+
+ listenAddress = mkOption {
+ default = "";
+ example = "example.com";
+ description = "Listen on a specific IP address or hostname.";
+ };
+
+ port = mkOption {
+ default = 9418;
+ description = "Port to listen on.";
+ };
+
+ options = mkOption {
+ default = "";
+ description = "Extra configuration options to be passed to Git daemon.";
+ };
+
+ };
+ };
+
+ ###### implementation
+
+ config = mkIf cfg.enable {
+
+ users.extraUsers = singleton
+ { name = gitUser;
+ uid = config.ids.uids.git;
+ description = "Git daemon user";
+ };
+
+ users.extraGroups = singleton
+ { name = gitUser;
+ gid = config.ids.gids.git;
+ };
+
+ jobs.gitDaemon = {
+ name = "git-daemon";
+ startOn = "ip-up";
+ exec = "${pkgs.git}/bin/git daemon --reuseaddr "
+ + (optionalString (cfg.basePath != "") "--basepath=${cfg.basePath} ")
+ + (optionalString (cfg.listenAddress != "") "--listen=${cfg.listenAddress} ")
+ + "--port=${toString cfg.port} --user=${gitUser} --group=${gitUser} ${cfg.options} "
+ + "--verbose " + (optionalString cfg.exportAll "--export-all") + concatStringsSep " " cfg.repositories;
+ };
+
+ };
+
+}
diff --git a/nixos/modules/services/networking/gnunet.nix b/nixos/modules/services/networking/gnunet.nix
new file mode 100644
index 0000000000000000000000000000000000000000..421c0d9bb697517c723e43a0d21b8a14289427b8
--- /dev/null
+++ b/nixos/modules/services/networking/gnunet.nix
@@ -0,0 +1,148 @@
+{ config, pkgs, ... }:
+
+with pkgs.lib;
+
+let
+
+ cfg = config.services.gnunet;
+
+ homeDir = "/var/lib/gnunet";
+
+ configFile = with cfg; pkgs.writeText "gnunetd.conf"
+ ''
+ [PATHS]
+ SERVICEHOME = ${homeDir}
+
+ [ats]
+ WAN_QUOTA_IN = ${toString load.maxNetDownBandwidth} b
+ WAN_QUOTA_OUT = ${toString load.maxNetUpBandwidth} b
+
+ [datastore]
+ QUOTA = ${toString fileSharing.quota} MB
+
+ [transport-udp]
+ PORT = ${toString udp.port}
+ ADVERTISED_PORT = ${toString udp.port}
+
+ [transport-tcp]
+ PORT = ${toString tcp.port}
+ ADVERTISED_PORT = ${toString tcp.port}
+
+ ${extraOptions}
+ '';
+
+in
+
+{
+
+ ###### interface
+
+ options = {
+
+ services.gnunet = {
+
+ enable = mkOption {
+ default = false;
+ description = ''
+ Whether to run the GNUnet daemon. GNUnet is GNU's anonymous
+ peer-to-peer communication and file sharing framework.
+ '';
+ };
+
+ fileSharing = {
+ quota = mkOption {
+ default = 1024;
+ description = ''
+ Maximum file system usage (in MiB) for file sharing.
+ '';
+ };
+ };
+
+ udp = {
+ port = mkOption {
+ default = 2086; # assigned by IANA
+ description = ''
+ The UDP port for use by GNUnet.
+ '';
+ };
+ };
+
+ tcp = {
+ port = mkOption {
+ default = 2086; # assigned by IANA
+ description = ''
+ The TCP port for use by GNUnet.
+ '';
+ };
+ };
+
+ load = {
+ maxNetDownBandwidth = mkOption {
+ default = 50000;
+ description = ''
+ Maximum bandwidth usage (in bits per second) for GNUnet
+ when downloading data.
+ '';
+ };
+
+ maxNetUpBandwidth = mkOption {
+ default = 50000;
+ description = ''
+ Maximum bandwidth usage (in bits per second) for GNUnet
+ when downloading data.
+ '';
+ };
+
+ hardNetUpBandwidth = mkOption {
+ default = 0;
+ description = ''
+ Hard bandwidth limit (in bits per second) when uploading
+ data.
+ '';
+ };
+ };
+
+ extraOptions = mkOption {
+ default = "";
+ description = ''
+ Additional options that will be copied verbatim in `gnunet.conf'.
+ See `gnunet.conf(5)' for details.
+ '';
+ };
+ };
+
+ };
+
+
+ ###### implementation
+
+ config = mkIf config.services.gnunet.enable {
+
+ users.extraUsers.gnunet = {
+ group = "gnunet";
+ description = "GNUnet User";
+ home = homeDir;
+ createHome = true;
+ uid = config.ids.uids.gnunet;
+ };
+
+ users.extraGroups.gnunet.gid = config.ids.gids.gnunet;
+
+ # The user tools that talk to `gnunetd' should come from the same source,
+ # so install them globally.
+ environment.systemPackages = [ pkgs.gnunet ];
+
+ systemd.services.gnunet = {
+ description = "GNUnet";
+ after = [ "network.target" ];
+ wantedBy = [ "multi-user.target" ];
+ path = [ pkgs.gnunet pkgs.miniupnpc ];
+ serviceConfig.ExecStart = "${pkgs.gnunet}/lib/gnunet/libexec/gnunet-service-arm -c ${configFile}";
+ serviceConfig.User = "gnunet";
+ serviceConfig.UMask = "0007";
+ serviceConfig.WorkingDirectory = homeDir;
+ };
+
+ };
+
+}
diff --git a/nixos/modules/services/networking/gogoclient.nix b/nixos/modules/services/networking/gogoclient.nix
new file mode 100644
index 0000000000000000000000000000000000000000..07c35e3cb3d6b605ad98bfc2f74fbe20b2b1bc0b
--- /dev/null
+++ b/nixos/modules/services/networking/gogoclient.nix
@@ -0,0 +1,88 @@
+{pkgs, config, ...}:
+
+with pkgs.lib;
+
+let cfg = config.services.gogoclient;
+in
+
+{
+
+ ###### interface
+
+ options = {
+ services.gogoclient = {
+ enable = mkOption {
+ default = false;
+ type = types.bool;
+ description = ''
+ Enable the gogoclient ipv6 tunnel.
+ '';
+ };
+ autorun = mkOption {
+ default = true;
+ description = "
+ Switch to false to create upstart-job and configuration,
+ but not run it automatically
+ ";
+ };
+
+ username = mkOption {
+ default = "";
+ description = "
+ Your Gateway6 login name, if any.
+ ";
+ };
+
+ password = mkOption {
+ default = "";
+ type = types.string;
+ description = "
+ Path to a file (as a string), containing your gogonet password, if any.
+ ";
+ };
+
+ server = mkOption {
+ default = "anonymous.freenet6.net";
+ example = "broker.freenet6.net";
+ description = "
+ Used Gateway6 server.
+ ";
+ };
+ };
+ };
+
+ ###### implementation
+
+ config = mkIf cfg.enable {
+ boot.kernelModules = [ "tun" ];
+
+ networking.enableIPv6 = true;
+
+ systemd.services.gogoclient = {
+ description = "ipv6 tunnel";
+
+ after = [ "network.target" ];
+ requires = [ "network.target" ];
+
+ unitConfig.RequiresMountsFor = "/var/lib/gogoc";
+
+ script = let authMethod = if cfg.password == "" then "anonymous" else "any"; in ''
+ mkdir -p -m 700 /var/lib/gogoc
+ cat ${pkgs.gogoclient}/share/${pkgs.gogoclient.name}/gogoc.conf.sample | \
+ ${pkgs.gnused}/bin/sed \
+ -e "s|^userid=|&${cfg.username}|" \
+ -e "s|^passwd=|&${optionalString (cfg.password != "") "$(cat ${cfg.password})"}|" \
+ -e "s|^server=.*|server=${cfg.server}|" \
+ -e "s|^auth_method=.*|auth_method=${authMethod}|" \
+ -e "s|^#log_file=|log_file=1|" > /var/lib/gogoc/gogoc.conf
+ cd /var/lib/gogoc
+ exec ${pkgs.gogoclient}/bin/gogoc -y -f /var/lib/gogoc/gogoc.conf
+ '';
+ } // optionalAttrs cfg.autorun {
+ wantedBy = [ "ip-up.target" ];
+ partOf = [ "ip-up.target" ];
+ };
+
+ };
+
+}
diff --git a/nixos/modules/services/networking/gvpe.nix b/nixos/modules/services/networking/gvpe.nix
new file mode 100644
index 0000000000000000000000000000000000000000..594a2e80f3450698f4f855020d239d9e870dbe75
--- /dev/null
+++ b/nixos/modules/services/networking/gvpe.nix
@@ -0,0 +1,144 @@
+# GNU Virtual Private Ethernet
+
+{config, pkgs, ...}:
+
+let
+ inherit (pkgs.lib) mkOption mkIf;
+
+ cfg = config.services.gvpe;
+
+ finalConfig = if cfg.configFile != null then
+ cfg.configFile
+ else if cfg.configText != null then
+ pkgs.writeTextFile {
+ name = "gvpe.conf";
+ text = cfg.configText;
+ }
+ else
+ throw "You must either specify contents of the config file or the config file itself for GVPE";
+
+ ifupScript = if cfg.ipAddress == null || cfg.subnet == null then
+ throw "Specify IP address and subnet (with mask) for GVPE"
+ else if cfg.nodename == null then
+ throw "You must set node name for GVPE"
+ else
+ (pkgs.writeTextFile {
+ name = "gvpe-if-up";
+ text = ''
+ #! /bin/sh
+
+ export PATH=$PATH:${pkgs.iproute}/sbin
+
+ ip link set $IFNAME up
+ ip address add ${cfg.ipAddress} dev $IFNAME
+ ip route add ${cfg.subnet} dev $IFNAME
+
+ ${cfg.customIFSetup}
+ '';
+ executable = true;
+ });
+
+ exec = "${pkgs.gvpe}/sbin/gvpe -c /var/gvpe -D ${cfg.nodename} "
+ + " ${cfg.nodename}.pid-file=/var/gvpe/gvpe.pid"
+ + " ${cfg.nodename}.if-up=if-up"
+ + " &> /var/log/gvpe";
+
+ inherit (cfg) startOn stopOn;
+in
+
+{
+ options = {
+ services.gvpe = {
+ enable = mkOption {
+ default = false;
+ description = ''
+ Whether to run gvpe
+ '';
+ };
+ startOn = mkOption {
+ default = "started network-interfaces";
+ description = ''
+ Condition to start GVPE
+ '';
+ };
+ stopOn = mkOption {
+ default = "stopping network-interfaces";
+ description = ''
+ Condition to stop GVPE
+ '';
+ };
+ nodename = mkOption {
+ default = null;
+ description =''
+ GVPE node name
+ '';
+ };
+ configText = mkOption {
+ default = null;
+ example = ''
+ tcp-port = 655
+ udp-port = 655
+ mtu = 1480
+ ifname = vpn0
+
+ node = alpha
+ hostname = alpha.example.org
+ connect = always
+ enable-udp = true
+ enable-tcp = true
+ on alpha if-up = if-up-0
+ on alpha pid-file = /var/gvpe/gvpe.pid
+ '';
+ description = ''
+ GVPE config contents
+ '';
+ };
+ configFile = mkOption {
+ default = null;
+ example = "/root/my-gvpe-conf";
+ description = ''
+ GVPE config file, if already present
+ '';
+ };
+ ipAddress = mkOption {
+ default = null;
+ description = ''
+ IP address to assign to GVPE interface
+ '';
+ };
+ subnet = mkOption {
+ default = null;
+ example = "10.0.0.0/8";
+ description = ''
+ IP subnet assigned to GVPE network
+ '';
+ };
+ customIFSetup = mkOption {
+ default = "";
+ description = ''
+ Additional commands to apply in ifup script
+ '';
+ };
+ };
+ };
+ config = mkIf cfg.enable {
+ jobs.gvpe = {
+ description = "GNU Virtual Private Ethernet node";
+
+ inherit startOn stopOn;
+
+ preStart = ''
+ mkdir -p /var/gvpe
+ mkdir -p /var/gvpe/pubkey
+ chown root /var/gvpe
+ chmod 700 /var/gvpe
+ cp ${finalConfig} /var/gvpe/gvpe.conf
+ cp ${ifupScript} /var/gvpe/if-up
+ '';
+
+ inherit exec;
+
+ respawn = true;
+ };
+ };
+}
diff --git a/nixos/modules/services/networking/hostapd.nix b/nixos/modules/services/networking/hostapd.nix
new file mode 100644
index 0000000000000000000000000000000000000000..4edea12b6be8441c07e8b1e09a89e18b77e88abd
--- /dev/null
+++ b/nixos/modules/services/networking/hostapd.nix
@@ -0,0 +1,163 @@
+{ config, pkgs, ... }:
+
+# TODO:
+#
+# asserts
+# ensure that the nl80211 module is loaded/compiled in the kernel
+# hwMode must be a/b/g
+# channel must be between 1 and 13 (maybe)
+# wpa_supplicant and hostapd on the same wireless interface doesn't make any sense
+# perhaps an assertion that there is a dhcp server and a dns server on the IP address serviced by the hostapd?
+
+with pkgs.lib;
+
+let
+
+ cfg = config.services.hostapd;
+
+ configFile = pkgs.writeText "hostapd.conf"
+ ''
+ interface=${cfg.interface}
+ driver=${cfg.driver}
+ ssid=${cfg.ssid}
+ hw_mode=${cfg.hwMode}
+ channel=${toString cfg.channel}
+
+ # logging (debug level)
+ logger_syslog=-1
+ logger_syslog_level=2
+ logger_stdout=-1
+ logger_stdout_level=2
+
+ ctrl_interface=/var/run/hostapd
+ ctrl_interface_group=${cfg.group}
+
+ ${if cfg.wpa then ''
+ wpa=1
+ wpa_passphrase=${cfg.wpaPassphrase}
+ '' else ""}
+
+ ${cfg.extraCfg}
+ '' ;
+
+in
+
+{
+ ###### interface
+
+ options = {
+
+ services.hostapd = {
+
+ enable = mkOption {
+ default = false;
+ description = ''
+ Enable putting a wireless interface into infrastructure mode,
+ allowing other wireless devices to associate with the wireless interface and do
+ wireless networking. A simple access point will enable hostapd.wpa, and
+ hostapd.wpa_passphrase, hostapd.ssid, dhcpd on the wireless interface to
+ provide IP addresses to the associated stations, and nat (from the wireless
+ interface to an upstream interface).
+ '';
+ };
+
+ interface = mkOption {
+ default = "";
+ example = "wlan0";
+ description = ''
+ The interfaces hostapd will use.
+ '';
+ };
+
+ driver = mkOption {
+ default = "nl80211";
+ example = "hostapd";
+ type = types.string;
+ description = "Which driver hostapd will use. Most things will probably use the default.";
+ };
+
+ ssid = mkOption {
+ default = "nixos";
+ example = "mySpecialSSID";
+ type = types.string;
+ description = "SSID to be used in IEEE 802.11 management frames.";
+ };
+
+ hwMode = mkOption {
+ default = "b";
+ example = "g";
+ type = types.string;
+ description = "Operation mode (a = IEEE 802.11a, b = IEEE 802.11b, g = IEEE 802.11g";
+ };
+
+ channel = mkOption {
+ default = 7;
+ example = 11;
+ type = types.int;
+ description =
+ ''
+ Channel number (IEEE 802.11)
+ Please note that some drivers do not use this value from hostapd and the
+ channel will need to be configured separately with iwconfig.
+ '';
+ };
+
+ group = mkOption {
+ default = "wheel";
+ example = "network";
+ type = types.string;
+ description = "members of this group can control hostapd";
+ };
+
+ wpa = mkOption {
+ default = true;
+ description = "enable WPA (IEEE 802.11i/D3.0) to authenticate to the access point";
+ };
+
+ wpaPassphrase = mkOption {
+ default = "my_sekret";
+ example = "any_64_char_string";
+ type = types.string;
+ description =
+ ''
+ WPA-PSK (pre-shared-key) passphrase. Clients will need this
+ passphrase to associate with this access point. Warning: This passphrase will
+ get put into a world-readable file in the nix store.
+ '';
+ };
+
+ extraCfg = mkOption {
+ default = "";
+ example = ''
+ auth_algo=0
+ ieee80211n=1
+ ht_capab=[HT40-][SHORT-GI-40][DSSS_CCK-40]
+ '';
+ type = types.string;
+ description = "Extra configuration options to put in the hostapd.conf";
+ };
+ };
+ };
+
+
+ ###### implementation
+
+ config = mkIf cfg.enable {
+
+ environment.systemPackages = [ pkgs.hostapd ];
+
+ systemd.services.hostapd =
+ { description = "hostapd wireless AP";
+
+ path = [ pkgs.hostapd ];
+ wantedBy = [ "network.target" ];
+
+ after = [ "${cfg.interface}-cfg.service" "nat.service" "bind.service" "dhcpd.service"];
+
+ serviceConfig =
+ { ExecStart = "${pkgs.hostapd}/bin/hostapd ${configFile}";
+ Restart = "always";
+ };
+ };
+ };
+}
diff --git a/nixos/modules/services/networking/ifplugd.nix b/nixos/modules/services/networking/ifplugd.nix
new file mode 100644
index 0000000000000000000000000000000000000000..df50e9807a9061f27b6afd5375fb41aefe2cd8a9
--- /dev/null
+++ b/nixos/modules/services/networking/ifplugd.nix
@@ -0,0 +1,88 @@
+{pkgs, config, ...}:
+
+with pkgs.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). We do
+ # nothing when a cable is unplugged. When a cable is plugged in, we
+ # restart dhclient, which will hopefully give us a new IP address
+ # if appropriate.
+ plugScript = pkgs.writeScript "ifplugd.action"
+ ''
+ #! ${pkgs.stdenv.shell}
+ iface="$1"
+ status="$2"
+ ${cfg.commands}
+ '';
+
+in
+
+{
+
+ ###### interface
+
+ options = {
+
+ networking.interfaceMonitor.enable = mkOption {
+ default = false;
+ description = ''
+ If true, monitor Ethernet interfaces for
+ cables being plugged in or unplugged. When this occurs, the
+ dhclient service is restarted to
+ automatically obtain a new IP address. This is useful for
+ roaming users (laptops).
+ '';
+ };
+
+ networking.interfaceMonitor.beep = mkOption {
+ default = false;
+ description = ''
+ If true, beep when an Ethernet cable is
+ plugged in or unplugged.
+ '';
+ };
+
+ networking.interfaceMonitor.commands = mkOption {
+ default = "";
+ description = ''
+ Shell commands to be executed when the link status of an
+ interface changes. On invocation, the shell variable
+ iface contains the name of the interface,
+ while the variable status contains either
+ up or down to indicate
+ the new status.
+ '';
+ };
+
+ };
+
+
+ ###### implementation
+
+ config = mkIf cfg.enable {
+
+ jobs.ifplugd =
+ { description = "Network interface connectivity monitor";
+
+ startOn = "started network-interfaces";
+ stopOn = "stopping network-interfaces";
+
+ exec =
+ ''
+ ${ifplugd}/sbin/ifplugd --no-daemon --no-startup --no-shutdown \
+ ${if config.networking.interfaceMonitor.beep then "" else "--no-beep"} \
+ --run ${plugScript}
+ '';
+ };
+
+ environment.systemPackages = [ ifplugd ];
+
+ };
+
+}
diff --git a/nixos/modules/services/networking/iodined.nix b/nixos/modules/services/networking/iodined.nix
new file mode 100644
index 0000000000000000000000000000000000000000..1b3473ee0ee1b2c33dfa7f24c4f294b1cd519f8e
--- /dev/null
+++ b/nixos/modules/services/networking/iodined.nix
@@ -0,0 +1,87 @@
+# NixOS module for iodine, ip over dns daemon
+
+{ config, pkgs, ... }:
+
+with pkgs.lib;
+
+let
+ cfg = config.services.iodined;
+
+ iodinedUser = "iodined";
+
+in
+
+{
+
+ ### configuration
+
+ options = {
+
+ services.iodined = {
+
+ enable = mkOption {
+ type = types.uniq types.bool;
+ default = false;
+ description = "Enable iodine, ip over dns daemon";
+ };
+
+ client = mkOption {
+ type = types.uniq types.bool;
+ default = false;
+ description = "Start iodine in client mode";
+ };
+
+ ip = mkOption {
+ type = types.uniq types.string;
+ default = "";
+ description = "Assigned ip address or ip range";
+ example = "172.16.10.1/24";
+ };
+
+ domain = mkOption {
+ type = types.uniq types.string;
+ default = "";
+ description = "Domain or subdomain of which nameservers point to us";
+ example = "tunnel.mydomain.com";
+ };
+
+ extraConfig = mkOption {
+ type = types.uniq types.string;
+ default = "";
+ description = "Additional command line parameters";
+ example = "-P mysecurepassword -l 192.168.1.10 -p 23";
+ };
+
+ };
+
+ };
+
+ ### implementation
+
+ config = mkIf cfg.enable {
+ environment.systemPackages = [ pkgs.iodine ];
+ boot.kernelModules = [ "tun" ];
+
+ systemd.services.iodined = {
+ description = "iodine, ip over dns daemon";
+ after = [ "network.target" ];
+ wantedBy = [ "multi-user.target" ];
+ serviceConfig.ExecStart = "${pkgs.iodine}/sbin/iodined -f -u ${iodinedUser} ${cfg.extraConfig} ${cfg.ip} ${cfg.domain}";
+ };
+
+
+ users.extraUsers = singleton {
+ name = iodinedUser;
+ uid = config.ids.uids.iodined;
+ description = "Iodine daemon user";
+ };
+ users.extraGroups.iodined.gid = config.ids.gids.iodined;
+
+ assertions = [{ assertion = if !cfg.client then cfg.ip != "" else true;
+ message = "cannot start iodined without ip set";}
+ { assertion = cfg.domain != "";
+ message = "cannot start iodined without domain name set";}];
+
+ };
+
+}
diff --git a/nixos/modules/services/networking/ircd-hybrid/builder.sh b/nixos/modules/services/networking/ircd-hybrid/builder.sh
new file mode 100644
index 0000000000000000000000000000000000000000..b8cb836db95e5ee455debc8146d4262a89389d9e
--- /dev/null
+++ b/nixos/modules/services/networking/ircd-hybrid/builder.sh
@@ -0,0 +1,31 @@
+source $stdenv/setup
+
+doSub() {
+ local src=$1
+ local dst=$2
+ ensureDir $(dirname $dst)
+ substituteAll $src $dst
+}
+
+subDir=/
+for i in $scripts; do
+ if test "$(echo $i | cut -c1-2)" = "=>"; then
+ subDir=$(echo $i | cut -c3-)
+ else
+ dst=$out/$subDir/$((stripHash $i; echo $strippedName) | sed 's/\.in//')
+ doSub $i $dst
+ chmod +x $dst # !!!
+ fi
+done
+
+subDir=/
+for i in $substFiles; do
+ if test "$(echo $i | cut -c1-2)" = "=>"; then
+ subDir=$(echo $i | cut -c3-)
+ else
+ dst=$out/$subDir/$((stripHash $i; echo $strippedName) | sed 's/\.in//')
+ doSub $i $dst
+ fi
+done
+
+ensureDir $out/bin
diff --git a/nixos/modules/services/networking/ircd-hybrid/control.in b/nixos/modules/services/networking/ircd-hybrid/control.in
new file mode 100644
index 0000000000000000000000000000000000000000..312dfaada329e8dbe60cb27009291fa604b8260b
--- /dev/null
+++ b/nixos/modules/services/networking/ircd-hybrid/control.in
@@ -0,0 +1,26 @@
+#! @shell@ -e
+
+# Make sure that the environment is deterministic.
+export PATH=@coreutils@/bin
+
+if test "$1" = "start"; then
+ if ! @procps@/bin/pgrep ircd; then
+ if @ipv6Enabled@; then
+ while ! @iproute@/sbin/ip addr |
+ @gnugrep@/bin/grep inet6 |
+ @gnugrep@/bin/grep global; do
+ sleep 1;
+ done;
+ fi;
+ rm -rf /home/ircd
+ mkdir -p /home/ircd
+ chown ircd: /home/ircd
+ cd /home/ircd
+ env - HOME=/homeless-shelter $extraEnv \
+ @su@/bin/su ircd --shell=/bin/sh -c ' @ircdHybrid@/bin/ircd -configfile @out@/conf/ircd.conf &1 >/var/log/ircd-hybrid.out
+ fi;
+fi
+
+if test "$1" = "stop" ; then
+ @procps@/bin/pkill ircd;
+fi;
diff --git a/nixos/modules/services/networking/ircd-hybrid/default.nix b/nixos/modules/services/networking/ircd-hybrid/default.nix
new file mode 100644
index 0000000000000000000000000000000000000000..cd82a41ef7af9c64a023c62056e28569ff40b3c3
--- /dev/null
+++ b/nixos/modules/services/networking/ircd-hybrid/default.nix
@@ -0,0 +1,137 @@
+{ config, pkgs, ... }:
+
+with pkgs.lib;
+
+let
+
+ cfg = config.services.ircdHybrid;
+
+ ircdService = pkgs.stdenv.mkDerivation rec {
+ name = "ircd-hybrid-service";
+ scripts = [ "=>/bin" ./control.in ];
+ substFiles = [ "=>/conf" ./ircd.conf ];
+ inherit (pkgs) ircdHybrid coreutils su iproute gnugrep procps;
+
+ ipv6Enabled = if config.networking.enableIPv6 then "true" else "false";
+
+ inherit (cfg) serverName sid description adminEmail
+ extraPort;
+
+ cryptoSettings =
+ (optionalString (cfg.rsaKey != null) "rsa_private_key_file = \"${cfg.rsaKey}\";\n") +
+ (optionalString (cfg.certificate != null) "ssl_certificate_file = \"${cfg.certificate}\";\n");
+
+ extraListen = map (ip: "host = \""+ip+"\";\nport = 6665 .. 6669, "+extraPort+"; ") cfg.extraIPs;
+
+ builder = ./builder.sh;
+ };
+
+in
+
+{
+
+ ###### interface
+
+ options = {
+
+ services.ircdHybrid = {
+
+ enable = mkOption {
+ default = false;
+ description = "
+ Enable IRCD.
+ ";
+ };
+
+ serverName = mkOption {
+ default = "hades.arpa";
+ description = "
+ IRCD server name.
+ ";
+ };
+
+ sid = mkOption {
+ default = "0NL";
+ description = "
+ IRCD server unique ID in a net of servers.
+ ";
+ };
+
+ description = mkOption {
+ default = "Hybrid-7 IRC server.";
+ description = "
+ IRCD server description.
+ ";
+ };
+
+ rsaKey = mkOption {
+ default = null;
+ example = /root/certificates/irc.key;
+ description = "
+ IRCD server RSA key.
+ ";
+ };
+
+ certificate = mkOption {
+ default = null;
+ example = /root/certificates/irc.pem;
+ description = "
+ IRCD server SSL certificate. There are some limitations - read manual.
+ ";
+ };
+
+ adminEmail = mkOption {
+ default = "";
+ example = "";
+ description = "
+ IRCD server administrator e-mail.
+ ";
+ };
+
+ extraIPs = mkOption {
+ default = [];
+ example = ["127.0.0.1"];
+ description = "
+ Extra IP's to bind.
+ ";
+ };
+
+ extraPort = mkOption {
+ default = "7117";
+ description = "
+ Extra port to avoid filtering.
+ ";
+ };
+
+ };
+
+ };
+
+
+ ###### implementation
+
+ config = mkIf config.services.ircdHybrid.enable {
+
+ users.extraUsers = singleton
+ { name = "ircd";
+ description = "IRCD owner";
+ group = "ircd";
+ uid = config.ids.uids.ircd;
+ };
+
+ users.extraGroups.ircd.gid = config.ids.gids.ircd;
+
+ jobs.ircd_hybrid =
+ { name = "ircd-hybrid";
+
+ description = "IRCD Hybrid server";
+
+ startOn = "started networking";
+ stopOn = "stopping networking";
+
+ exec = "${ircdService}/bin/control start";
+ };
+
+ };
+
+}
diff --git a/nixos/modules/services/networking/ircd-hybrid/ircd.conf b/nixos/modules/services/networking/ircd-hybrid/ircd.conf
new file mode 100644
index 0000000000000000000000000000000000000000..bb22832dbdb2028915da2e08bcfe59de62cb259f
--- /dev/null
+++ b/nixos/modules/services/networking/ircd-hybrid/ircd.conf
@@ -0,0 +1,1051 @@
+/* doc/example.conf - ircd-hybrid-7 Example configuration file
+ * Copyright (C) 2000-2006 Hybrid Development Team
+ *
+ * Written by ejb, wcampbel, db, leeh and others
+ * Other example configurations can be found in the source dir under
+ * etc/.
+ *
+ * $Id: example.conf 639 2006-06-01 14:12:21Z michael $
+ */
+
+/* IMPORTANT NOTES:
+ *
+ * auth {} blocks MUST be specified in order of precedence. The first one
+ * that matches a user will be used. So place spoofs first, then specials,
+ * then general access.
+ *
+ * Shell style (#), C++ style (//) and C style comments are supported.
+ *
+ * Files may be included by either:
+ * .include "filename"
+ * .include
+ *
+ * Times/durations are written as:
+ * 12 hours 30 minutes 1 second
+ *
+ * Valid units of time:
+ * month, week, day, hour, minute, second
+ *
+ * Valid units of size:
+ * megabyte/mbyte/mb, kilobyte/kbyte/kb, byte
+ *
+ * Sizes and times may be singular or plural.
+ */
+
+/* EFNET NOTE:
+ *
+ * This config file is NOT suitable for EFNet. EFNet admins should use
+ * example.efnet.conf
+ */
+
+/*
+ * serverinfo {}: contains information about the server. (OLD M:)
+ */
+serverinfo {
+ /*
+ * name: the name of our server. This cannot be changed at runtime.
+ */
+ name = "@serverName@";
+
+ /*
+ * sid: a server's unique ID. This is three characters long and must
+ * be in the form [0-9][A-Z0-9][A-Z0-9]. The first character must be
+ * a digit, followed by 2 alpha-numerical letters.
+ * NOTE: The letters must be capitalized. This cannot be changed at runtime.
+ */
+ sid = "@sid@";
+
+ /*
+ * description: the description of the server. '[' and ']' may not
+ * be used here for compatibility with older servers.
+ */
+ description = "@description@";
+
+ /*
+ * network info: the name and description of the network this server
+ * is on. Shown in the 005 reply and used with serverhiding.
+ */
+ network_name = "JustIRCNetwork";
+ network_desc = "This is My Network";
+
+ /*
+ * hub: allow this server to act as a hub and have multiple servers
+ * connected to it. This may not be changed if there are active
+ * LazyLink servers.
+ */
+ hub = no;
+
+ /*
+ * vhost: the IP to bind to when we connect outward to ipv4 servers.
+ * This should be an ipv4 IP only, or "* for INADDR_ANY.
+ */
+ #vhost = "192.169.0.1";
+
+ /*
+ * vhost6: the IP to bind to when we connect outward to ipv6 servers.
+ * This should be an ipv6 IP only, or "* for INADDR_ANY.
+ */
+ #vhost6 = "3ffe:80e8:546::2";
+
+ /* max_clients: the maximum number of clients allowed to connect */
+ max_clients = 512;
+
+ /*
+ * rsa key: the path to the file containing our rsa key for cryptlink.
+ *
+ * Example command to store a 2048 bit RSA keypair in
+ * rsa.key, and the public key in rsa.pub:
+ *
+ * openssl genrsa -out rsa.key 2048
+ * openssl rsa -in rsa.key -pubout -out rsa.pub
+ * chown . rsa.key rsa.pub
+ * chmod 0600 rsa.key
+ * chmod 0644 rsa.pub
+ */
+ #rsa_private_key_file = "/usr/local/ircd/etc/rsa.key";
+
+ /*
+ * ssl certificate: the path to the file containing our ssl certificate
+ * for encrypted client connection.
+ *
+ * This assumes your private RSA key is stored in rsa.key. You
+ * MUST have an RSA key in order to generate the certificate
+ *
+ * openssl req -new -days 365 -x509 -key rsa.key -out cert.pem
+ *
+ * See http://www.openssl.org/docs/HOWTO/certificates.txt
+ *
+ * Please use the following values when generating the cert
+ *
+ * Organization Name: Network Name
+ * Organization Unit Name: changme.someirc.net
+ * Common Name: irc.someirc.net
+ * E-mail: you@domain.com
+ */
+ #ssl_certificate_file = "/usr/local/ircd/etc/cert.pem";
+
+ @cryptoSettings@
+};
+
+/*
+ * admin {}: contains admin information about the server. (OLD A:)
+ */
+admin {
+ name = "Anonymous Hero";
+ description = "Main Server Administrator";
+ email = "@adminEmail@";
+};
+
+/*
+ * log {}: contains information about logfiles.
+ */
+log {
+ /* Do you want to enable logging to ircd.log? */
+ use_logging = yes;
+
+ /*
+ * logfiles: the logfiles to use for user connects, /oper uses,
+ * and failed /oper. These files must exist for logging to be used.
+ */
+ fname_userlog = "/home/ircd/logs/userlog";
+ fname_operlog = "/home/ircd/logs/operlog";
+ fname_killlog = "/home/ircd/logs/kill";
+ fname_klinelog = "/home/ircd/logs/kline";
+ fname_glinelog = "/home/ircd/logs/gline";
+
+ /*
+ * log_level: the amount of detail to log in ircd.log. The
+ * higher, the more information is logged. May be changed
+ * once the server is running via /quote SET LOG. Either:
+ * L_CRIT, L_ERROR, L_WARN, L_NOTICE, L_TRACE, L_INFO or L_DEBUG
+ */
+ log_level = L_INFO;
+};
+
+/*
+ * class {}: contains information about classes for users (OLD Y:)
+ */
+class {
+ /* name: the name of the class. classes are text now */
+ name = "users";
+
+ /*
+ * ping_time: how often a client must reply to a PING from the
+ * server before they are dropped.
+ */
+ ping_time = 90 seconds;
+
+ /*
+ * number_per_ip: how many local users are allowed to connect
+ * from one IP (optional)
+ */
+ number_per_ip = 10;
+
+ /*
+ * max_local: how many local users are allowed to connect
+ * from one ident@host (optional)
+ */
+ max_local = 50;
+
+ /*
+ * max_global: network-wide limit of users per ident@host (optional)
+ */
+ max_global = 50;
+
+ /*
+ * max_number: the maximum number of users allowed in this class (optional)
+ */
+ max_number = 10000;
+
+ /*
+ * the following lines are optional and allow you to define
+ * how many users can connect from one /NN subnet
+ */
+ /*cidr_bitlen_ipv4 = 24;
+ *cidr_bitlen_ipv6 = 120;
+ *number_per_cidr = 16;*/
+
+ /*
+ * sendq: the amount of data allowed in a clients queue before
+ * they are dropped.
+ */
+ sendq = 100 kbytes;
+};
+
+class {
+ name = "opers";
+ ping_time = 90 seconds;
+ number_per_ip = 10;
+ max_number = 100;
+ sendq = 100kbytes;
+};
+
+class {
+ name = "server";
+ ping_time = 90 seconds;
+
+ /*
+ * ping_warning: how fast a server must reply to a PING before
+ * a warning to opers is generated.
+ */
+ ping_warning = 15 seconds;
+
+ /*
+ * connectfreq: only used in server classes. Specifies the delay
+ * between autoconnecting to servers.
+ */
+ connectfreq = 5 minutes;
+
+ /* max number: the amount of servers to autoconnect to */
+ max_number = 1;
+
+ /* sendq: servers need a higher sendq as they send more data */
+ sendq = 2 megabytes;
+};
+
+/*
+ * listen {}: contains information about the ports ircd listens on (OLD P:)
+ */
+listen {
+ /*
+ * port: the specific port to listen on. If no host is specified
+ * before, it will listen on all available IPs.
+ *
+ * Ports are separated via a comma, a range may be specified using ".."
+ */
+
+ /* port: listen on all available IPs, ports 6665 to 6669 */
+ port = 6665 .. 6669;
+
+ /*
+ * Listen on 192.168.0.1/6697 with ssl enabled and hidden from STATS P
+ * unless you are an administrator.
+ *
+ * NOTE: The "flags" directive has to come before "port". Always!
+ */
+ #flags = hidden, ssl;
+ #host = "192.168.0.1";
+ #port = 6697;
+
+ /*
+ * host: set a specific IP/host the ports after the line will listen
+ * on. This may be ipv4 or ipv6.
+ */
+ #host = "1.2.3.4";
+ #port = 7000, 7001;
+
+ #host = "3ffe:1234:a:b:c::d";
+ #port = 7002;
+
+ @extraListen@
+};
+
+auth {
+ user = "*@*";
+ class = "users";
+ #flags = need_ident;
+};
+
+/*
+ * operator {}: defines ircd operators. (OLD O:)
+ *
+ * ircd-hybrid no longer supports local operators, privileges are
+ * controlled via flags.
+ */
+operator {
+ /* name: the name of the oper */
+ /* NOTE: operator "opername"{} is also supported */
+ name = "god";
+
+ /*
+ * user: the user@host required for this operator. CIDR is not
+ * supported. Multiple user="" lines are supported.
+ */
+ user = "*god@*";
+ user = "*@127.0.0.1";
+
+ /*
+ * password: the password required to oper. By default this will
+ * need to be encrypted using 'mkpasswd'. MD5 is supported.
+ */
+ password = "iamoperator";
+
+ /*
+ * encrypted: controls whether the oper password above has been
+ * encrypted. (OLD CRYPT_OPER_PASSWORD now optional per operator)
+ */
+ encrypted = no;
+
+ /*
+ * rsa_public_key_file: the public key for this oper when using Challenge.
+ * A password should not be defined when this is used, see
+ * doc/challenge.txt for more information.
+ */
+# rsa_public_key_file = "/usr/local/ircd/etc/oper.pub";
+
+ /* class: the class the oper joins when they successfully /oper */
+ class = "opers";
+
+ /*
+ * umodes: default usermodes opers get when they /oper. If defined,
+ * it will override oper_umodes settings in general {}.
+ * Available usermodes:
+ *
+ * +b - bots - See bot and drone flooding notices
+ * +c - cconn - Client connection/quit notices
+ * +D - deaf - Don't receive channel messages
+ * +d - debug - See debugging notices
+ * +f - full - See I: line full notices
+ * +G - softcallerid - Server Side Ignore for users not on your channels
+ * +g - callerid - Server Side Ignore (for privmsgs etc)
+ * +i - invisible - Not shown in NAMES or WHO unless you share a
+ * a channel
+ * +k - skill - See server generated KILL messages
+ * +l - locops - See LOCOPS messages
+ * +n - nchange - See client nick changes
+ * +r - rej - See rejected client notices
+ * +s - servnotice - See general server notices
+ * +u - unauth - See unauthorized client notices
+ * +w - wallop - See server generated WALLOPS
+ * +x - external - See remote server connection and split notices
+ * +y - spy - See LINKS, STATS, TRACE notices etc.
+ * +z - operwall - See oper generated WALLOPS
+ */
+# umodes = locops, servnotice, operwall, wallop;
+
+ /*
+ * privileges: controls the activities and commands an oper is
+ * allowed to do on the server. All options default to no.
+ * Available options:
+ *
+ * global_kill: allows remote users to be /KILL'd (OLD 'O' flag)
+ * remote: allows remote SQUIT and CONNECT (OLD 'R' flag)
+ * remoteban: allows remote KLINE/UNKLINE
+ * kline: allows KILL, KLINE and DLINE (OLD 'K' flag)
+ * unkline: allows UNKLINE and UNDLINE (OLD 'U' flag)
+ * gline: allows GLINE (OLD 'G' flag)
+ * xline: allows XLINE (OLD 'X' flag)
+ * operwall: allows OPERWALL
+ * nick_changes: allows oper to see nickchanges (OLD 'N' flag)
+ * via usermode +n
+ * rehash: allows oper to REHASH config (OLD 'H' flag)
+ * die: allows DIE and RESTART (OLD 'D' flag)
+ * admin: gives admin privileges. admins
+ * may (un)load modules and see the
+ * real IPs of servers.
+ * hidden_admin: same as 'admin', but noone can recognize you as
+ * being an admin
+ * hidden_oper: not shown in /stats p (except for other operators)
+ */
+ /* You can either use
+ * die = yes;
+ * rehash = yes;
+ *
+ * or in a flags statement i.e.
+ * flags = die, rehash;
+ *
+ * You can also negate a flag with ~ i.e.
+ * flags = ~remote;
+ *
+ */
+ flags = global_kill, remote, kline, unkline, xline,
+ die, rehash, nick_changes, admin, operwall;
+};
+
+/*
+ * shared {}: users that are allowed to remote kline (OLD U:)
+ *
+ * NOTE: This can be effectively used for remote klines.
+ * Please note that there is no password authentication
+ * for users setting remote klines. You must also be
+ * /oper'd in order to issue a remote kline.
+ */
+shared {
+ /*
+ * name: the server the user must be on to set klines. If this is not
+ * specified, the user will be allowed to kline from all servers.
+ */
+ name = "irc2.some.server";
+
+ /*
+ * user: the user@host mask that is allowed to set klines. If this is
+ * not specified, all users on the server above will be allowed to set
+ * a remote kline.
+ */
+ user = "oper@my.host.is.spoofed";
+
+ /*
+ * type: list of what to share, options are as follows:
+ * kline - allow oper/server to kline
+ * tkline - allow temporary klines
+ * unkline - allow oper/server to unkline
+ * xline - allow oper/server to xline
+ * txline - allow temporary xlines
+ * unxline - allow oper/server to unxline
+ * resv - allow oper/server to resv
+ * tresv - allow temporary resvs
+ * unresv - allow oper/server to unresv
+ * locops - allow oper/server to locops - only used for servers that cluster
+ * all - allow oper/server to do all of the above (default)
+ */
+ type = kline, unkline, resv;
+};
+
+/*
+ * kill {}: users that are not allowed to connect (OLD K:)
+ * Oper issued klines will be added to the specified kline config
+ */
+kill {
+ user = "bad@*.hacked.edu";
+ reason = "Obviously hacked account";
+};
+
+kill {
+ user = "^O[[:alpha:]]?[[:digit:]]+(x\.o|\.xo)$@^[[:alnum:]]{4}\.evilnet.org$";
+ type = regex;
+};
+
+/*
+ * deny {}: IPs that are not allowed to connect (before DNS/ident lookup)
+ * Oper issued dlines will be added to the specified dline config
+ */
+deny {
+ ip = "10.0.1.0/24";
+ reason = "Reconnecting vhosted bots";
+};
+
+/*
+ * exempt {}: IPs that are exempt from deny {} and Dlines. (OLD d:)
+ */
+exempt {
+ ip = "192.168.0.0/16";
+};
+
+/*
+ * resv {}: nicks and channels users may not use/join (OLD Q:)
+ */
+resv {
+ /* reason: the reason for the proceeding resv's */
+ reason = "There are no services on this network";
+
+ /* resv: the nicks and channels users may not join/use */
+ nick = "nickserv";
+ nick = "chanserv";
+ channel = "#services";
+
+ /* resv: wildcard masks are also supported in nicks only */
+ reason = "Clone bots";
+ nick = "clone*";
+};
+
+/*
+ * gecos {}: The X: replacement, used for banning users based on
+ * their "realname".
+ */
+gecos {
+ name = "*sex*";
+ reason = "Possible spambot";
+};
+
+gecos {
+ name = "sub7server";
+ reason = "Trojan drone";
+};
+
+gecos {
+ name = "*http*";
+ reason = "Spambot";
+};
+
+gecos {
+ name = "^\[J[0o]hn Do[3e]\]-[0-9]{2,5}$";
+ type = regex;
+};
+
+/*
+ * channel {}: The channel block contains options pertaining to channels
+ */
+channel {
+ /*
+ * disable_fake_channels: this option, if set to 'yes', will
+ * disallow clients to create or join channels that have one
+ * of the following ASCII characters in their name:
+ *
+ * 2 | bold
+ * 3 | mirc color
+ * 15 | plain text
+ * 22 | reverse
+ * 31 | underline
+ * 160 | non-breaking space
+ */
+ disable_fake_channels = yes;
+
+ /*
+ * restrict_channels: reverse channel RESVs logic, only reserved
+ * channels are allowed
+ */
+ restrict_channels = no;
+
+ /*
+ * disable_local_channels: prevent users from joining &channels.
+ */
+ disable_local_channels = no;
+
+ /*
+ * use_invex: Enable/disable channel mode +I, a n!u@h list of masks
+ * that can join a +i channel without an invite.
+ */
+ use_invex = yes;
+
+ /*
+ * use_except: Enable/disable channel mode +e, a n!u@h list of masks
+ * that can join a channel through a ban (+b).
+ */
+ use_except = yes;
+
+ /*
+ * use_knock: Allows users to request an invite to a channel that
+ * is locked somehow (+ikl). If the channel is +p or you are banned
+ * the knock will not be sent.
+ */
+ use_knock = yes;
+
+ /*
+ * knock_delay: The amount of time a user must wait between issuing
+ * the knock command.
+ */
+ knock_delay = 1 minutes;
+
+ /*
+ * knock_delay_channel: How often a knock to any specific channel
+ * is permitted, regardless of the user sending the knock.
+ */
+ knock_delay_channel = 1 minute;
+
+ /*
+ * burst_topicwho: enable sending of who set topic on topicburst
+ * default is yes
+ */
+ burst_topicwho = yes;
+
+ /*
+ * max_chans_per_user: The maximum number of channels a user can
+ * join/be on.
+ */
+ max_chans_per_user = 25;
+
+ /* quiet_on_ban: stop banned people talking in channels. */
+ quiet_on_ban = yes;
+
+ /* max_bans: maximum number of +b/e/I modes in a channel */
+ max_bans = 1000;
+
+ /*
+ * how many joins in how many seconds constitute a flood, use 0 to
+ * disable. +b opers will be notified (changeable via /set)
+ */
+ join_flood_count = 100;
+ join_flood_time = 10 seconds;
+
+ /*
+ * splitcode: The ircd will now check splitmode every few seconds.
+ *
+ * Either split users or split servers can activate splitmode, but
+ * both conditions must be met for the ircd to deactivate splitmode.
+ *
+ * You may force splitmode to be permanent by /quote set splitmode on
+ */
+
+ /*
+ * default_split_user_count: when the usercount is lower than this level,
+ * consider ourselves split. This must be set for automatic splitmode.
+ */
+ default_split_user_count = 0;
+
+ /*
+ * default_split_server_count: when the servercount is lower than this,
+ * consider ourselves split. This must be set for automatic splitmode.
+ */
+ default_split_server_count = 0;
+
+ /* split no create: disallow users creating channels on split. */
+ no_create_on_split = yes;
+
+ /* split: no join: disallow users joining channels at all on a split */
+ no_join_on_split = no;
+};
+
+/*
+ * serverhide {}: The serverhide block contains the options regarding
+ * serverhiding
+ */
+serverhide {
+ /*
+ * flatten_links: this option will show all servers in /links appear
+ * that they are linked to this current server
+ */
+ flatten_links = no;
+
+ /*
+ * links_delay: how often to update the links file when it is
+ * flattened.
+ */
+ links_delay = 5 minutes;
+
+ /*
+ * hidden: hide this server from a /links output on servers that
+ * support it. This allows hub servers to be hidden etc.
+ */
+ hidden = no;
+
+ /*
+ * disable_hidden: prevent servers hiding themselves from a
+ * /links output.
+ */
+ disable_hidden = no;
+
+ /*
+ * hide_servers: hide remote servernames everywhere and instead use
+ * hidden_name and network_desc.
+ */
+ hide_servers = no;
+
+ /*
+ * Use this as the servername users see if hide_servers = yes.
+ */
+ hidden_name = "*.hidden.com";
+
+ /*
+ * hide_server_ips: If this is disabled, opers will be unable to see servers
+ * ips and will be shown a masked ip, admins will be shown the real ip.
+ *
+ * If this is enabled, nobody can see a servers ip. *This is a kludge*, it
+ * has the side effect of hiding the ips everywhere, including logfiles.
+ *
+ * We recommend you leave this disabled, and just take care with who you
+ * give admin=yes; to.
+ */
+ hide_server_ips = no;
+};
+
+/*
+ * general {}: The general block contains many of the options that were once
+ * compiled in options in config.h. The general block is read at start time.
+ */
+general {
+ /*
+ * gline_min_cidr: the minimum required length of a CIDR bitmask
+ * for IPv4 based glines
+ */
+ gline_min_cidr = 16;
+
+ /*
+ * gline_min_cidr6: the minimum required length of a CIDR bitmask
+ * for IPv6 based glines
+ */
+ gline_min_cidr6 = 48;
+
+ /*
+ * Whether to automatically set mode +i on connecting users.
+ */
+ invisible_on_connect = yes;
+
+ /*
+ * If you don't explicitly specify burst_away in your connect blocks, then
+ * they will default to the burst_away value below.
+ */
+ burst_away = no;
+
+ /*
+ * Show "actually using host " on /whois when possible.
+ */
+ use_whois_actually = yes;
+
+ /*
+ * Max time from the nickname change that still causes KILL
+ * automatically to switch for the current nick of that user. (seconds)
+ */
+ kill_chase_time_limit = 90;
+
+ /*
+ * If hide_spoof_ips is disabled, opers will be allowed to see the real IP of spoofed
+ * users in /trace etc. If this is defined they will be shown a masked IP.
+ */
+ hide_spoof_ips = yes;
+
+ /*
+ * Ignore bogus timestamps from other servers. Yes, this will desync
+ * the network, but it will allow chanops to resync with a valid non TS 0
+ *
+ * This should be enabled network wide, or not at all.
+ */
+ ignore_bogus_ts = no;
+
+ /*
+ * disable_auth: completely disable ident lookups; if you enable this,
+ * be careful of what you set need_ident to in your auth {} blocks
+ */
+ disable_auth = no;
+
+ /* disable_remote_commands: disable users doing commands on remote servers */
+ disable_remote_commands = no;
+
+ /*
+ * tkline_expire_notices: enables or disables temporary kline/xline
+ * expire notices.
+ */
+ tkline_expire_notices = no;
+
+ /*
+ * default_floodcount: the default value of floodcount that is configurable
+ * via /quote set floodcount. This is the amount of lines a user
+ * may send to any other user/channel in one second.
+ */
+ default_floodcount = 10;
+
+ /*
+ * failed_oper_notice: send a notice to all opers on the server when
+ * someone tries to OPER and uses the wrong password, host or ident.
+ */
+ failed_oper_notice = yes;
+
+ /*
+ * dots_in_ident: the amount of '.' characters permitted in an ident
+ * reply before the user is rejected.
+ */
+ dots_in_ident = 2;
+
+ /*
+ * dot_in_ip6_addr: ircd-hybrid-6.0 and earlier will disallow hosts
+ * without a '.' in them. This will add one to the end. Only needed
+ * for older servers.
+ */
+ dot_in_ip6_addr = no;
+
+ /*
+ * min_nonwildcard: the minimum non wildcard characters in k/d/g lines
+ * placed via the server. klines hand placed are exempt from limits.
+ * wildcard chars: '.' ':' '*' '?' '@' '!' '#'
+ */
+ min_nonwildcard = 4;
+
+ /*
+ * min_nonwildcard_simple: the minimum non wildcard characters in
+ * gecos bans. wildcard chars: '*' '?' '#'
+ */
+ min_nonwildcard_simple = 3;
+
+ /* max_accept: maximum allowed /accept's for +g usermode */
+ max_accept = 20;
+
+ /* anti_nick_flood: enable the nickflood control code */
+ anti_nick_flood = yes;
+
+ /* nick flood: the nick changes allowed in the specified period */
+ max_nick_time = 20 seconds;
+ max_nick_changes = 5;
+
+ /*
+ * anti_spam_exit_message_time: the minimum time a user must be connected
+ * before custom quit messages are allowed.
+ */
+ anti_spam_exit_message_time = 5 minutes;
+
+ /*
+ * ts delta: the time delta allowed between server clocks before
+ * a warning is given, or before the link is dropped. all servers
+ * should run ntpdate/rdate to keep clocks in sync
+ */
+ ts_warn_delta = 30 seconds;
+ ts_max_delta = 5 minutes;
+
+ /*
+ * kline_with_reason: show the user the reason why they are k/d/glined
+ * on exit. May give away who set k/dline when set via tcm.
+ */
+ kline_with_reason = yes;
+
+ /*
+ * kline_reason: show this message to users on channel
+ * instead of the oper reason.
+ */
+ kline_reason = "Connection closed";
+
+ /*
+ * reject_hold_time: wait this amount of time before disconnecting
+ * a rejected client. Use 0 to disable.
+ */
+ reject_hold_time = 0;
+
+ /*
+ * warn_no_nline: warn opers about servers that try to connect but
+ * we don't have a connect {} block for. Twits with misconfigured
+ * servers can get really annoying with this enabled.
+ */
+ warn_no_nline = yes;
+
+ /*
+ * stats_e_disabled: set this to 'yes' to disable "STATS e" for both
+ * operators and administrators. Doing so is a good idea in case
+ * there are any exempted (exempt{}) server IPs you don't want to
+ * see leaked.
+ */
+ stats_e_disabled = no;
+
+ /* stats_o_oper only: make stats o (opers) oper only */
+ stats_o_oper_only = yes;
+
+ /* stats_P_oper_only: make stats P (ports) oper only */
+ stats_P_oper_only = yes;
+
+ /*
+ * stats i oper only: make stats i (auth {}) oper only. set to:
+ * yes: show users no auth blocks, made oper only.
+ * masked: show users first matching auth block
+ * no: show users all auth blocks.
+ */
+ stats_i_oper_only = yes;
+
+ /*
+ * stats_k_oper_only: make stats k/K (klines) oper only. set to:
+ * yes: show users no auth blocks, made oper only
+ * masked: show users first matching auth block
+ * no: show users all auth blocks.
+ */
+ stats_k_oper_only = yes;
+
+ /*
+ * caller_id_wait: time between notifying a +g user that somebody
+ * is messaging them.
+ */
+ caller_id_wait = 1 minute;
+
+ /*
+ * opers_bypass_callerid: allows operators to bypass +g and message
+ * anyone who has it set (useful if you use services).
+ */
+ opers_bypass_callerid = no;
+
+ /*
+ * pace_wait_simple: time between use of less intensive commands
+ * (ADMIN, HELP, (L)USERS, VERSION, remote WHOIS)
+ */
+ pace_wait_simple = 1 second;
+
+ /*
+ * pace_wait: time between more intensive commands
+ * (INFO, LINKS, LIST, MAP, MOTD, STATS, WHO, wildcard WHOIS, WHOWAS)
+ */
+ pace_wait = 10 seconds;
+
+ /*
+ * short_motd: send clients a notice telling them to read the motd
+ * instead of forcing a motd to clients who may simply ignore it.
+ */
+ short_motd = no;
+
+ /*
+ * ping_cookie: require clients to respond exactly to a ping command,
+ * can help block certain types of drones and FTP PASV mode spoofing.
+ */
+ ping_cookie = no;
+
+ /* no_oper_flood: increase flood limits for opers. */
+ no_oper_flood = yes;
+
+ /*
+ * true_no_oper_flood: completely eliminate flood limits for opers
+ * and for clients with can_flood = yes in their auth {} blocks
+ */
+ true_no_oper_flood = yes;
+
+ /* oper_pass_resv: allow opers to over-ride RESVs on nicks/channels */
+ oper_pass_resv = yes;
+
+ /*
+ * idletime: the maximum amount of time a user may idle before
+ * they are disconnected
+ */
+ idletime = 0;
+
+ /* REMOVE ME. The following line checks you've been reading. */
+ #havent_read_conf = 1;
+
+ /*
+ * max_targets: the maximum amount of targets in a single
+ * PRIVMSG/NOTICE. Set to 999 NOT 0 for unlimited.
+ */
+ max_targets = 4;
+
+ /*
+ * client_flood: maximum amount of data in a clients queue before
+ * they are dropped for flooding.
+ */
+ client_flood = 2560 bytes;
+
+ /*
+ * message_locale: the default message locale
+ * Use "standard" for the compiled in defaults.
+ * To install the translated messages, go into messages/ in the
+ * source directory and run `make install'.
+ */
+ message_locale = "standard";
+
+ /*
+ * usermodes configurable: a list of usermodes for the options below
+ *
+ * +b - bots - See bot and drone flooding notices
+ * +c - cconn - Client connection/quit notices
+ * +D - deaf - Don't receive channel messages
+ * +d - debug - See debugging notices
+ * +f - full - See I: line full notices
+ * +G - softcallerid - Server Side Ignore for users not on your channels
+ * +g - callerid - Server Side Ignore (for privmsgs etc)
+ * +i - invisible - Not shown in NAMES or WHO unless you share a
+ * a channel
+ * +k - skill - See server generated KILL messages
+ * +l - locops - See LOCOPS messages
+ * +n - nchange - See client nick changes
+ * +r - rej - See rejected client notices
+ * +s - servnotice - See general server notices
+ * +u - unauth - See unauthorized client notices
+ * +w - wallop - See server generated WALLOPS
+ * +x - external - See remote server connection and split notices
+ * +y - spy - See LINKS, STATS, TRACE notices etc.
+ * +z - operwall - See oper generated WALLOPS
+ */
+
+ /* oper_only_umodes: usermodes only opers may set */
+ oper_only_umodes = bots, cconn, debug, full, skill, nchange,
+ rej, spy, external, operwall, locops, unauth;
+
+ /* oper_umodes: default usermodes opers get when they /oper */
+ oper_umodes = bots, locops, servnotice, operwall, wallop;
+
+ /*
+ * servlink_path: path to 'servlink' program used by ircd to handle
+ * encrypted/compressed server <-> server links.
+ *
+ * only define if servlink is not in same directory as ircd itself.
+ */
+ #servlink_path = "/usr/local/ircd/bin/servlink";
+
+ /*
+ * default_cipher_preference: default cipher to use for cryptlink when none is
+ * specified in connect block.
+ */
+ #default_cipher_preference = "BF/168";
+
+ /*
+ * use_egd: if your system does not have *random devices yet you
+ * want to use OpenSSL and encrypted links, enable this. Beware -
+ * EGD is *very* CPU intensive when gathering data for its pool
+ */
+# use_egd = yes;
+
+ /*
+ * egdpool_path: path to EGD pool. Not necessary for OpenSSL >= 0.9.7
+ * which automatically finds the path.
+ */
+# egdpool_path = "/var/run/egd-pool";
+
+
+ /*
+ * compression_level: level of compression for compressed links between
+ * servers.
+ *
+ * values are between: 1 (least compression, fastest)
+ * and: 9 (most compression, slowest).
+ */
+# compression_level = 6;
+
+ /*
+ * throttle_time: the minimum amount of time between connections from
+ * the same ip. exempt {} blocks are excluded from this throttling.
+ * Offers protection against flooders who reconnect quickly.
+ * Set to 0 to disable.
+ */
+ throttle_time = 10;
+};
+
+glines {
+ /* enable: enable glines, network wide temp klines */
+ enable = yes;
+
+ /*
+ * duration: the amount of time a gline will remain on your
+ * server before expiring
+ */
+ duration = 1 day;
+
+ /*
+ * logging: which types of rules you want to log when triggered
+ * (choose reject or block)
+ */
+ logging = reject, block;
+
+ /*
+ * NOTE: gline ACLs can cause a desync of glines throughout the
+ * network, meaning some servers may have a gline triggered, and
+ * others may not. Also, you only need insert rules for glines
+ * that you want to block and/or reject. If you want to accept and
+ * propagate the gline, do NOT put a rule for it.
+ */
+
+ /* user@host for rule to apply to */
+ user = "god@I.still.hate.packets";
+ /* server for rule to apply to */
+ name = "hades.arpa";
+
+ /*
+ * action: action to take when a matching gline is found. options are:
+ * reject - do not apply the gline locally
+ * block - do not propagate the gline
+ */
+ action = reject, block;
+
+ user = "god@*";
+ name = "*";
+ action = block;
+};
+
diff --git a/nixos/modules/services/networking/minidlna.nix b/nixos/modules/services/networking/minidlna.nix
new file mode 100644
index 0000000000000000000000000000000000000000..ea5bc8514f1c79a4af11d8f1d74a8b2d8b6a0ebb
--- /dev/null
+++ b/nixos/modules/services/networking/minidlna.nix
@@ -0,0 +1,112 @@
+# Module for MiniDLNA, a simple DLNA server.
+
+{ config, pkgs, ... }:
+
+with pkgs.lib;
+
+let
+
+ cfg = config.services.minidlna;
+
+ port = 8200;
+
+in
+
+{
+
+ ###### interface
+
+ options = {
+
+ services.minidlna.enable = mkOption {
+ type = types.bool;
+ default = false;
+ description =
+ ''
+ Whether to enable MiniDLNA, a simple DLNA server. It serves
+ media files such as video and music to DLNA client devices
+ such as televisions and media players.
+ '';
+ };
+
+ services.minidlna.mediaDirs = mkOption {
+ type = types.listOf types.string;
+ default = [];
+ examples = [ "/data/media" "V,/home/alice/video" ];
+ description =
+ ''
+ Directories to be scanned for media files. The prefixes
+ A,, V, and
+ P, restrict a directory to audio, video
+ or image files. The directories must be accessible to the
+ minidlna user account.
+ '';
+ };
+
+ services.minidlna.config = mkOption {
+ type = types.lines;
+ description = "The contents of MiniDLNA's configuration file.";
+ };
+
+ };
+
+
+ ###### implementation
+
+ config = mkIf cfg.enable {
+
+ # Running minidlna only makes sense for serving files to the
+ # outside, so open up the required ports by default.
+ networking.firewall.allowedTCPPorts = [ port ];
+ networking.firewall.allowedUDPPorts = [ 1900 ]; # SSDP
+
+ services.minidlna.config =
+ ''
+ port=${toString port}
+ friendly_name=NixOS Media Server
+ db_dir=/var/cache/minidlna
+ log_dir=/var/log/minidlna
+ inotify=yes
+ ${concatMapStrings (dir: ''
+ media_dir=${dir}
+ '') cfg.mediaDirs}
+ '';
+
+ users.extraUsers.minidlna = {
+ description = "MiniDLNA daemon user";
+ group = "minidlna";
+ uid = config.ids.uids.minidlna;
+ };
+
+ users.extraGroups.minidlna.gid = config.ids.gids.minidlna;
+
+ systemd.services.minidlna =
+ { description = "MiniDLNA Server";
+
+ wantedBy = [ "multi-user.target" ];
+ after = [ "network.target" ];
+
+ preStart =
+ ''
+ mkdir -p /var/cache/minidlna /var/log/minidlna /run/minidlna
+ chown minidlna /var/cache/minidlna /var/log/minidlna /run/minidlna
+ '';
+
+ # FIXME: log through the journal rather than
+ # /var/log/minidlna. The -d flag does that, but also raises
+ # the log level to debug...
+ serviceConfig =
+ { User = "minidlna";
+ Group = "nogroup";
+ PermissionsStartOnly = true;
+ Type = "forking";
+ PIDFile = "/run/minidlna/pid";
+ ExecStart =
+ "@${pkgs.minidlna}/sbin/minidlna minidlna -P /run/minidlna/pid" +
+ " -f ${pkgs.writeText "minidlna.conf" cfg.config}";
+ };
+ };
+
+ };
+
+}
diff --git a/nixos/modules/services/networking/nat.nix b/nixos/modules/services/networking/nat.nix
new file mode 100644
index 0000000000000000000000000000000000000000..9d62a764f0609d4dd21f5437b9825dfc8423c2a8
--- /dev/null
+++ b/nixos/modules/services/networking/nat.nix
@@ -0,0 +1,104 @@
+# This module enables Network Address Translation (NAT).
+# XXX: todo: support multiple upstream links
+# see http://yesican.chsoft.biz/lartc/MultihomedLinuxNetworking.html
+
+{ config, pkgs, ... }:
+
+with pkgs.lib;
+
+let
+
+ cfg = config.networking.nat;
+
+in
+
+{
+
+ ###### interface
+
+ options = {
+
+ networking.nat.enable = mkOption {
+ default = false;
+ description =
+ ''
+ Whether to enable Network Address Translation (NAT).
+ '';
+ };
+
+ networking.nat.internalIPs = mkOption {
+ example = [ "192.168.1.0/24" ] ;
+ description =
+ ''
+ The IP address ranges for which to perform NAT. Packets
+ coming from these networks and destined for the external
+ interface will be rewritten.
+ '';
+ # Backward compatibility: this used to be a single range instead
+ # of a list.
+ apply = x: if isList x then x else [x];
+ };
+
+ networking.nat.externalInterface = mkOption {
+ example = "eth1";
+ description =
+ ''
+ The name of the external network interface.
+ '';
+ };
+
+ networking.nat.externalIP = mkOption {
+ default = "";
+ example = "203.0.113.123";
+ description =
+ ''
+ The public IP address to which packets from the local
+ network are to be rewritten. If this is left empty, the
+ IP address associated with the external interface will be
+ used.
+ '';
+ };
+
+ };
+
+
+ ###### implementation
+
+ config = mkIf config.networking.nat.enable {
+
+ environment.systemPackages = [ pkgs.iptables ];
+
+ boot.kernelModules = [ "nf_nat_ftp" ];
+
+ jobs.nat =
+ { description = "Network Address Translation";
+
+ startOn = "started network-interfaces";
+
+ path = [ pkgs.iptables ];
+
+ preStart =
+ ''
+ iptables -t nat -F POSTROUTING
+ iptables -t nat -X
+ ''
+ + (concatMapStrings (network:
+ ''
+ iptables -t nat -A POSTROUTING \
+ -s ${network} -o ${cfg.externalInterface} \
+ ${if cfg.externalIP == ""
+ then "-j MASQUERADE"
+ else "-j SNAT --to-source ${cfg.externalIP}"}
+ ''
+ ) cfg.internalIPs) +
+ ''
+ echo 1 > /proc/sys/net/ipv4/ip_forward
+ '';
+
+ postStop =
+ ''
+ iptables -t nat -F POSTROUTING
+ '';
+ };
+ };
+}
diff --git a/nixos/modules/services/networking/networkmanager.nix b/nixos/modules/services/networking/networkmanager.nix
new file mode 100644
index 0000000000000000000000000000000000000000..1d5682f5f3fba104dba7b5ce7ca9ffe9bb3d952a
--- /dev/null
+++ b/nixos/modules/services/networking/networkmanager.nix
@@ -0,0 +1,193 @@
+{ config, pkgs, ... }:
+
+with pkgs.lib;
+with pkgs;
+
+let
+ cfg = config.networking.networkmanager;
+
+ stateDirs = "/var/lib/NetworkManager /var/lib/dhclient";
+
+ configFile = writeText "NetworkManager.conf" ''
+ [main]
+ plugins=keyfile
+
+ [keyfile]
+ ${optionalString (config.networking.hostName != "") ''
+ hostname=${config.networking.hostName}
+ ''}
+
+ [logging]
+ level=WARN
+ '';
+
+ polkitConf = ''
+ [network-manager]
+ Identity=unix-group:networkmanager
+ Action=org.freedesktop.NetworkManager.*
+ ResultAny=yes
+ ResultInactive=no
+ ResultActive=yes
+
+ [modem-manager]
+ Identity=unix-group:networkmanager
+ Action=org.freedesktop.ModemManager.*
+ ResultAny=yes
+ ResultInactive=no
+ ResultActive=yes
+ '';
+
+ ipUpScript = writeScript "01nixos-ip-up" ''
+ #!/bin/sh
+ if test "$2" = "up"; then
+ ${config.systemd.package}/bin/systemctl start ip-up.target
+ fi
+ '';
+
+ overrideNameserversScript = writeScript "02overridedns" ''
+ #!/bin/sh
+ ${optionalString cfg.overrideNameservers "${gnused}/bin/sed -i '/nameserver /d' /etc/resolv.conf"}
+ ${concatStrings (map (s: ''
+ ${optionalString cfg.appendNameservers
+ "${gnused}/bin/sed -i '/nameserver ${s}/d' /etc/resolv.conf"
+ }
+ echo 'nameserver ${s}' >> /etc/resolv.conf
+ '') config.networking.nameservers)}
+ '';
+
+in {
+
+ ###### interface
+
+ options = {
+
+ networking.networkmanager = {
+
+ enable = mkOption {
+ default = false;
+ merge = mergeEnableOption;
+ description = ''
+ Whether to use NetworkManager to obtain an IP address and other
+ configuration for all network interfaces that are not manually
+ configured. If enabled, a group networkmanager
+ will be created. Add all users that should have permission
+ to change network settings to this group.
+ '';
+ };
+
+ packages = mkOption {
+ default = [ ];
+ description = ''
+ Extra packages that provide NetworkManager plugins.
+ '';
+ merge = mergeListOption;
+ apply = list: [ networkmanager modemmanager wpa_supplicant ] ++ list;
+ };
+
+ overrideNameservers = mkOption {
+ default = false;
+ description = ''
+ If enabled, any nameservers received by DHCP or configured in
+ NetworkManager will be replaced by the nameservers configured
+ in the networking.nameservers option. This
+ option overrides the appendNameservers option
+ if both are enabled.
+ '';
+ };
+
+ appendNameservers = mkOption {
+ default = false;
+ description = ''
+ If enabled, the name servers configured in the
+ networking.nameservers option will be appended
+ to the ones configured in NetworkManager or received by DHCP.
+ '';
+ };
+
+ };
+ };
+
+
+ ###### implementation
+
+ config = mkIf cfg.enable {
+
+ assertions = [{
+ assertion = config.networking.wireless.enable == false;
+ message = "You can not use networking.networkmanager with services.networking.wireless";
+ }];
+
+ environment.etc = [
+ { source = ipUpScript;
+ target = "NetworkManager/dispatcher.d/01nixos-ip-up";
+ }
+ { source = configFile;
+ target = "NetworkManager/NetworkManager.conf";
+ }
+ { source = "${networkmanager_openvpn}/etc/NetworkManager/VPN/nm-openvpn-service.name";
+ target = "NetworkManager/VPN/nm-openvpn-service.name";
+ }
+ { source = "${networkmanager_vpnc}/etc/NetworkManager/VPN/nm-vpnc-service.name";
+ target = "NetworkManager/VPN/nm-vpnc-service.name";
+ }
+ { source = "${networkmanager_openconnect}/etc/NetworkManager/VPN/nm-openconnect-service.name";
+ target = "NetworkManager/VPN/nm-openconnect-service.name";
+ }
+ ] ++ pkgs.lib.optional (cfg.overrideNameservers || cfg.appendNameservers)
+ { source = overrideNameserversScript;
+ target = "NetworkManager/dispatcher.d/02overridedns";
+ };
+
+ environment.systemPackages = cfg.packages ++ [
+ networkmanager_openvpn
+ networkmanager_vpnc
+ networkmanager_openconnect
+ ];
+
+ users.extraGroups = singleton {
+ name = "networkmanager";
+ gid = config.ids.gids.networkmanager;
+ };
+
+ systemd.packages = cfg.packages;
+
+ # Create an initialisation service that both starts
+ # NetworkManager when network.target is reached,
+ # and sets up necessary directories for NM.
+ systemd.services."networkmanager-init" = {
+ description = "NetworkManager initialisation";
+ wantedBy = [ "network.target" ];
+ partOf = [ "NetworkManager.service" ];
+ wants = [ "NetworkManager.service" ];
+ before = [ "NetworkManager.service" ];
+ script = ''
+ mkdir -m 700 -p /etc/NetworkManager/system-connections
+ mkdir -m 755 -p ${stateDirs}
+ '';
+ serviceConfig = {
+ Type = "oneshot";
+ };
+ };
+
+ # Turn off NixOS' network management
+ networking = {
+ useDHCP = false;
+ wireless.enable = false;
+ };
+
+ powerManagement.resumeCommands = ''
+ systemctl restart NetworkManager
+ '';
+
+ security.polkit.permissions = polkitConf;
+
+ # openvpn plugin has only dbus interface
+ services.dbus.packages = cfg.packages ++ [
+ networkmanager_openvpn
+ networkmanager_vpnc
+ networkmanager_openconnect
+ ];
+
+ services.udev.packages = cfg.packages;
+ };
+}
diff --git a/nixos/modules/services/networking/ntpd.nix b/nixos/modules/services/networking/ntpd.nix
new file mode 100644
index 0000000000000000000000000000000000000000..e5e164021d3a1faa7b3ed87f7b067401303a17c7
--- /dev/null
+++ b/nixos/modules/services/networking/ntpd.nix
@@ -0,0 +1,90 @@
+{ config, pkgs, ... }:
+
+with pkgs.lib;
+
+let
+
+ inherit (pkgs) ntp;
+
+ stateDir = "/var/lib/ntp";
+
+ ntpUser = "ntp";
+
+ configFile = pkgs.writeText "ntp.conf" ''
+ # Keep the drift file in ${stateDir}/ntp.drift. However, since we
+ # chroot to ${stateDir}, we have to specify it as /ntp.drift.
+ driftfile /ntp.drift
+
+ ${toString (map (server: "server " + server + " iburst\n") config.services.ntp.servers)}
+ '';
+
+ ntpFlags = "-c ${configFile} -u ${ntpUser}:nogroup -i ${stateDir}";
+
+in
+
+{
+
+ ###### interface
+
+ options = {
+
+ services.ntp = {
+
+ enable = mkOption {
+ default = true;
+ description = ''
+ Whether to synchronise your machine's time using the NTP
+ protocol.
+ '';
+ };
+
+ servers = mkOption {
+ default = [
+ "0.pool.ntp.org"
+ "1.pool.ntp.org"
+ "2.pool.ntp.org"
+ ];
+ description = ''
+ The set of NTP servers from which to synchronise.
+ '';
+ };
+
+ };
+
+ };
+
+
+ ###### implementation
+
+ config = mkIf config.services.ntp.enable {
+
+ # Make tools such as ntpq available in the system path
+ environment.systemPackages = [ pkgs.ntp ];
+
+ users.extraUsers = singleton
+ { name = ntpUser;
+ uid = config.ids.uids.ntp;
+ description = "NTP daemon user";
+ home = stateDir;
+ };
+
+ jobs.ntpd =
+ { description = "NTP Daemon";
+
+ wantedBy = [ "ip-up.target" ];
+ partOf = [ "ip-up.target" ];
+
+ path = [ ntp ];
+
+ preStart =
+ ''
+ mkdir -m 0755 -p ${stateDir}
+ chown ${ntpUser} ${stateDir}
+ '';
+
+ exec = "ntpd -g -n ${ntpFlags}";
+ };
+
+ };
+
+}
diff --git a/nixos/modules/services/networking/oidentd.nix b/nixos/modules/services/networking/oidentd.nix
new file mode 100644
index 0000000000000000000000000000000000000000..a2a555a8ad1b76471a555162e1f324a6e50940b0
--- /dev/null
+++ b/nixos/modules/services/networking/oidentd.nix
@@ -0,0 +1,44 @@
+{ config, pkgs, ... }:
+
+with pkgs.lib;
+
+{
+
+ ###### interface
+
+ options = {
+
+ services.oidentd.enable = mkOption {
+ default = false;
+ type = types.bool;
+ description = ''
+ Whether to enable ‘oidentd’, an implementation of the Ident
+ protocol (RFC 1413). It allows remote systems to identify the
+ name of the user associated with a TCP connection.
+ '';
+ };
+
+ };
+
+
+ ###### implementation
+
+ config = mkIf config.services.oidentd.enable {
+
+ jobs.oidentd =
+ { startOn = "started network-interfaces";
+ daemonType = "fork";
+ exec = "${pkgs.oidentd}/sbin/oidentd -u oidentd -g nogroup";
+ };
+
+ users.extraUsers.oidentd = {
+ description = "Ident Protocol daemon user";
+ group = "oidentd";
+ uid = config.ids.uids.oidentd;
+ };
+
+ users.extraGroups.oidentd.gid = config.ids.gids.oidentd;
+
+ };
+
+}
diff --git a/nixos/modules/services/networking/openfire.nix b/nixos/modules/services/networking/openfire.nix
new file mode 100644
index 0000000000000000000000000000000000000000..d5c18c0675cf8fb4f338589c52cab1abae97ada2
--- /dev/null
+++ b/nixos/modules/services/networking/openfire.nix
@@ -0,0 +1,70 @@
+{ config, pkgs, ... }:
+
+with pkgs.lib;
+
+let
+
+ inherit (pkgs) jre openfire coreutils which gnugrep gawk gnused;
+
+ extraStartDependency =
+ if config.services.openfire.usePostgreSQL then "and started postgresql" else "";
+
+in
+
+{
+
+ ###### interface
+
+ options = {
+
+ services.openfire = {
+
+ enable = mkOption {
+ default = false;
+ description = "
+ Whether to enable OpenFire XMPP server.
+ ";
+ };
+
+ usePostgreSQL = mkOption {
+ default = true;
+ description = "
+ Whether you use PostgreSQL service for your storage back-end.
+ ";
+ };
+
+ };
+
+ };
+
+
+ ###### implementation
+
+ config = mkIf config.services.openfire.enable (
+ mkAssert (!(config.services.openfire.usePostgreSQL -> config.services.postgresql.enable)) "
+ openfire assertion failed
+ " {
+
+ jobs.openfire =
+ { description = "OpenFire XMPP server";
+
+ startOn = "started networking ${extraStartDependency}";
+
+ script =
+ ''
+ export PATH=${jre}/bin:${openfire}/bin:${coreutils}/bin:${which}/bin:${gnugrep}/bin:${gawk}/bin:${gnused}/bin
+ export HOME=/tmp
+ mkdir /var/log/openfire || true
+ mkdir /etc/openfire || true
+ for i in ${openfire}/conf.inst/*; do
+ if ! test -f /etc/openfire/$(basename $i); then
+ cp $i /etc/openfire/
+ fi
+ done
+ openfire start
+ ''; # */
+ };
+
+ });
+
+}
diff --git a/nixos/modules/services/networking/openvpn.nix b/nixos/modules/services/networking/openvpn.nix
new file mode 100644
index 0000000000000000000000000000000000000000..1e862591406db8b3d98382e01a578c236e5ade67
--- /dev/null
+++ b/nixos/modules/services/networking/openvpn.nix
@@ -0,0 +1,172 @@
+{ config, pkgs, ... }:
+
+with pkgs.lib;
+
+let
+
+ cfg = config.services.openvpn;
+
+ inherit (pkgs) openvpn;
+
+ makeOpenVPNJob = cfg: name:
+ let
+
+ path = (getAttr "openvpn-${name}" config.systemd.services).path;
+
+ upScript = ''
+ #! /bin/sh
+ export PATH=${path}
+
+ # For convenience in client scripts, extract the remote domain
+ # name and name server.
+ for var in ''${!foreign_option_*}; do
+ x=(''${!var})
+ if [ "''${x[0]}" = dhcp-option ]; then
+ if [ "''${x[1]}" = DOMAIN ]; then domain="''${x[2]}"
+ elif [ "''${x[1]}" = DNS ]; then nameserver="''${x[2]}"
+ fi
+ fi
+ done
+
+ ${cfg.up}
+ '';
+
+ downScript = ''
+ #! /bin/sh
+ export PATH=${path}
+ ${cfg.down}
+ '';
+
+ configFile = pkgs.writeText "openvpn-config-${name}"
+ ''
+ errors-to-stderr
+ ${optionalString (cfg.up != "" || cfg.down != "") "script-security 2"}
+ ${cfg.config}
+ ${optionalString (cfg.up != "") "up ${pkgs.writeScript "openvpn-${name}-up" upScript}"}
+ ${optionalString (cfg.down != "") "down ${pkgs.writeScript "openvpn-${name}-down" downScript}"}
+ '';
+
+ in {
+ description = "OpenVPN instance ‘${name}’";
+
+ wantedBy = optional cfg.autoStart "multi-user.target";
+ after = [ "network-interfaces.target" ];
+
+ path = [ pkgs.iptables pkgs.iproute pkgs.nettools ];
+
+ serviceConfig.ExecStart = "@${openvpn}/sbin/openvpn openvpn --config ${configFile}";
+ serviceConfig.Restart = "always";
+ };
+
+in
+
+{
+
+ ###### interface
+
+ options = {
+
+ /* !!! Obsolete. */
+ services.openvpn.enable = mkOption {
+ default = true;
+ description = "Whether to enable OpenVPN.";
+ };
+
+ services.openvpn.servers = mkOption {
+ default = {};
+
+ example = {
+
+ server = {
+ config = ''
+ # Simplest server configuration: http://openvpn.net/index.php/documentation/miscellaneous/static-key-mini-howto.html.
+ # server :
+ dev tun
+ ifconfig 10.8.0.1 10.8.0.2
+ secret /root/static.key
+ '';
+ up = "ip route add ...";
+ down = "ip route del ...";
+ };
+
+ client = {
+ config = ''
+ client
+ remote vpn.example.org
+ dev tun
+ proto tcp-client
+ port 8080
+ ca /root/.vpn/ca.crt
+ cert /root/.vpn/alice.crt
+ key /root/.vpn/alice.key
+ '';
+ up = "echo nameserver $nameserver | ${pkgs.openresolv}/sbin/resolvconf -m 0 -a $dev";
+ down = "${pkgs.openresolv}/sbin/resolvconf -d $dev";
+ };
+
+ };
+
+ description = ''
+ Each attribute of this option defines an Upstart job to run an
+ OpenVPN instance. These can be OpenVPN servers or clients.
+ The name of each Upstart job is
+ openvpn-name,
+ where name is the corresponding
+ attribute name.
+ '';
+
+ type = types.attrsOf types.optionSet;
+
+ options = {
+
+ config = mkOption {
+ type = types.string;
+ description = ''
+ Configuration of this OpenVPN instance. See
+ openvpn8
+ for details.
+ '';
+ };
+
+ up = mkOption {
+ default = "";
+ type = types.string;
+ description = ''
+ Shell commands executed when the instance is starting.
+ '';
+ };
+
+ down = mkOption {
+ default = "";
+ type = types.string;
+ description = ''
+ Shell commands executed when the instance is shutting down.
+ '';
+ };
+
+ autoStart = mkOption {
+ default = true;
+ type = types.bool;
+ description = "Whether this OpenVPN instance should be started automatically.";
+ };
+
+ };
+
+ };
+
+ };
+
+
+ ###### implementation
+
+ config = mkIf (cfg.servers != {}) {
+
+ systemd.services = listToAttrs (mapAttrsFlatten (name: value: nameValuePair "openvpn-${name}" (makeOpenVPNJob value name)) cfg.servers);
+
+ environment.systemPackages = [ openvpn ];
+
+ boot.kernelModules = [ "tun" ];
+
+ };
+
+}
diff --git a/nixos/modules/services/networking/prayer.nix b/nixos/modules/services/networking/prayer.nix
new file mode 100644
index 0000000000000000000000000000000000000000..fb541bf101ae8065eac7dff57e49838dac99ce20
--- /dev/null
+++ b/nixos/modules/services/networking/prayer.nix
@@ -0,0 +1,103 @@
+{ config, pkgs, ... }:
+
+with pkgs.lib;
+
+let
+
+ inherit (pkgs) prayer;
+
+ cfg = config.services.prayer;
+
+ stateDir = "/var/lib/prayer";
+
+ prayerUser = "prayer";
+ prayerGroup = "prayer";
+
+ prayerExtraCfg = pkgs.writeText "extraprayer.cf" ''
+ prefix = "${prayer}"
+ var_prefix = "${stateDir}"
+ prayer_user = "${prayerUser}"
+ prayer_group = "${prayerGroup}"
+ sendmail_path = "/var/setuid-wrappers/sendmail"
+
+ use_http_port ${cfg.port}
+
+ ${cfg.extraConfig}
+ '';
+
+ prayerCfg = pkgs.runCommand "prayer.cf" { } ''
+ # We have to remove the http_port 80, or it will start a server there
+ cat ${prayer}/etc/prayer.cf | grep -v http_port > $out
+ cat ${prayerExtraCfg} >> $out
+ '';
+
+in
+
+{
+
+ ###### interface
+
+ options = {
+
+ services.prayer = {
+
+ enable = mkOption {
+ default = false;
+ description = ''
+ Whether to run the prayer webmail http server.
+ '';
+ };
+
+ port = mkOption {
+ default = "2080";
+ description = ''
+ Port the prayer http server is listening to.
+ '';
+ };
+
+ extraConfig = mkOption {
+ default = "" ;
+ description = ''
+ Extra configuration. Contents will be added verbatim to the configuration file.
+ '';
+ };
+ };
+
+ };
+
+
+ ###### implementation
+
+ config = mkIf config.services.prayer.enable {
+ environment.systemPackages = [ prayer ];
+
+ users.extraUsers = singleton
+ { name = prayerUser;
+ uid = config.ids.uids.prayer;
+ description = "Prayer daemon user";
+ home = stateDir;
+ };
+
+ users.extraGroups = singleton
+ { name = prayerGroup;
+ gid = config.ids.gids.prayer;
+ };
+
+ jobs.prayer =
+ { name = "prayer";
+
+ startOn = "startup";
+
+ preStart =
+ ''
+ mkdir -m 0755 -p ${stateDir}
+ chown ${prayerUser}.${prayerGroup} ${stateDir}
+ '';
+
+ daemonType = "daemon";
+
+ exec = "${prayer}/sbin/prayer --config-file=${prayerCfg}";
+ };
+ };
+
+}
diff --git a/nixos/modules/services/networking/privoxy.nix b/nixos/modules/services/networking/privoxy.nix
new file mode 100644
index 0000000000000000000000000000000000000000..89c40c53157936aecc6ae305a219fd81f74b8d20
--- /dev/null
+++ b/nixos/modules/services/networking/privoxy.nix
@@ -0,0 +1,95 @@
+{ config, pkgs, ... }:
+
+with pkgs.lib;
+
+let
+
+ inherit (pkgs) privoxy;
+
+ stateDir = "/var/spool/privoxy";
+
+ privoxyUser = "privoxy";
+
+ privoxyFlags = "--no-daemon --user ${privoxyUser} ${privoxyCfg}";
+
+ privoxyCfg = pkgs.writeText "privoxy.conf" ''
+ listen-address ${config.services.privoxy.listenAddress}
+ logdir ${config.services.privoxy.logDir}
+ confdir ${privoxy}/etc
+ filterfile default.filter
+
+ ${config.services.privoxy.extraConfig}
+ '';
+
+in
+
+{
+
+ ###### interface
+
+ options = {
+
+ services.privoxy = {
+
+ enable = mkOption {
+ default = false;
+ description = ''
+ Whether to run the machine as a HTTP proxy server.
+ '';
+ };
+
+ listenAddress = mkOption {
+ default = "127.0.0.1:8118";
+ description = ''
+ Address the proxy server is listening to.
+ '';
+ };
+
+ logDir = mkOption {
+ default = "/var/log/privoxy" ;
+ description = ''
+ Location for privoxy log files.
+ '';
+ };
+
+ extraConfig = mkOption {
+ default = "" ;
+ description = ''
+ Extra configuration. Contents will be added verbatim to the configuration file.
+ '';
+ };
+ };
+
+ };
+
+
+ ###### implementation
+
+ config = mkIf config.services.privoxy.enable {
+
+ environment.systemPackages = [ privoxy ];
+
+ users.extraUsers = singleton
+ { name = privoxyUser;
+ uid = config.ids.uids.privoxy;
+ description = "Privoxy daemon user";
+ home = stateDir;
+ };
+
+ jobs.privoxy =
+ { name = "privoxy";
+
+ startOn = "startup";
+
+ preStart =
+ ''
+ mkdir -m 0755 -p ${stateDir}
+ chown ${privoxyUser} ${stateDir}
+ '';
+
+ exec = "${privoxy}/sbin/privoxy ${privoxyFlags}";
+ };
+
+ };
+
+}
diff --git a/nixos/modules/services/networking/quassel.nix b/nixos/modules/services/networking/quassel.nix
new file mode 100644
index 0000000000000000000000000000000000000000..f3a4e457ec847df384e4abaa5eb311fb09d1085c
--- /dev/null
+++ b/nixos/modules/services/networking/quassel.nix
@@ -0,0 +1,96 @@
+{ config, pkgs, ... }:
+
+with pkgs.lib;
+
+let
+ quassel = pkgs.kde4.quasselDaemon;
+ cfg = config.services.quassel;
+ user = if cfg.user != null then cfg.user else "quassel";
+in
+
+{
+
+ ###### interface
+
+ options = {
+
+ services.quassel = {
+
+ enable = mkOption {
+ default = false;
+ description = ''
+ Whether to run the Quassel IRC client daemon.
+ '';
+ };
+
+ interface = mkOption {
+ default = "127.0.0.1";
+ description = ''
+ The interface the Quassel daemon will be listening to. If `127.0.0.1',
+ only clients on the local host can connect to it; if `0.0.0.0', clients
+ can access it from any network interface.
+ '';
+ };
+
+ portNumber = mkOption {
+ default = 4242;
+ description = ''
+ The port number the Quassel daemon will be listening to.
+ '';
+ };
+
+ dataDir = mkOption {
+ default = ''/home/${user}/.config/quassel-irc.org'';
+ description = ''
+ The directory holding configuration files, the SQlite database and the SSL Cert.
+ '';
+ };
+
+ user = mkOption {
+ default = null;
+ description = ''
+ The existing user the Quassel daemon should run as. If left empty, a default "quassel" user will be created.
+ '';
+ };
+
+ };
+
+ };
+
+
+ ###### implementation
+
+ config = mkIf cfg.enable {
+
+ users.extraUsers = mkIf (cfg.user == null) [
+ { name = "quassel";
+ description = "Quassel IRC client daemon";
+ group = "quassel";
+ uid = config.ids.uids.quassel;
+ }];
+
+ users.extraGroups = mkIf (cfg.user == null) [
+ { name = "quassel";
+ gid = config.ids.gids.quassel;
+ }];
+
+ jobs.quassel =
+ { description = "Quassel IRC client daemon";
+
+ startOn = "ip-up";
+
+ preStart = ''
+ mkdir -p ${cfg.dataDir}
+ chown ${user} ${cfg.dataDir}
+ '';
+
+ exec = ''
+ ${pkgs.su}/bin/su -s ${pkgs.stdenv.shell} ${user} \
+ -c '${quassel}/bin/quasselcore --listen=${cfg.interface}\
+ --port=${toString cfg.portNumber} --configdir=${cfg.dataDir}'
+ '';
+ };
+
+ };
+
+}
diff --git a/nixos/modules/services/networking/radvd.nix b/nixos/modules/services/networking/radvd.nix
new file mode 100644
index 0000000000000000000000000000000000000000..8d586ce6e46b165ab76466c717465861d1281b32
--- /dev/null
+++ b/nixos/modules/services/networking/radvd.nix
@@ -0,0 +1,77 @@
+# Module for the IPv6 Router Advertisement Daemon.
+
+{ config, pkgs, ... }:
+
+with pkgs.lib;
+
+let
+
+ cfg = config.services.radvd;
+
+ confFile = pkgs.writeText "radvd.conf" cfg.config;
+
+in
+
+{
+
+ ###### interface
+
+ options = {
+
+ services.radvd.enable = mkOption {
+ default = false;
+ description =
+ ''
+ Whether to enable the Router Advertisement Daemon
+ (radvd), which provides link-local
+ advertisements of IPv6 router addresses and prefixes using
+ the Neighbor Discovery Protocol (NDP). This enables
+ stateless address autoconfiguration in IPv6 clients on the
+ network.
+ '';
+ };
+
+ services.radvd.config = mkOption {
+ example =
+ ''
+ interface eth0 {
+ AdvSendAdvert on;
+ prefix 2001:db8:1234:5678::/64 { };
+ };
+ '';
+ description =
+ ''
+ The contents of the radvd configuration file.
+ '';
+ };
+
+ };
+
+
+ ###### implementation
+
+ config = mkIf cfg.enable {
+
+ environment.systemPackages = [ pkgs.radvd ];
+
+ jobs.radvd =
+ { description = "IPv6 Router Advertisement Daemon";
+
+ startOn = "started network-interfaces";
+
+ preStart =
+ ''
+ # !!! Radvd only works if IPv6 forwarding is enabled. But
+ # this should probably be done somewhere else (and not
+ # necessarily for all interfaces).
+ echo 1 > /proc/sys/net/ipv6/conf/all/forwarding
+ '';
+
+ exec = "${pkgs.radvd}/sbin/radvd -m syslog -s -C ${confFile}";
+
+ daemonType = "fork";
+ };
+
+ };
+
+}
diff --git a/nixos/modules/services/networking/rdnssd.nix b/nixos/modules/services/networking/rdnssd.nix
new file mode 100644
index 0000000000000000000000000000000000000000..f797206ad5c768e986ca4ffc1707725b2e96c564
--- /dev/null
+++ b/nixos/modules/services/networking/rdnssd.nix
@@ -0,0 +1,48 @@
+# Module for rdnssd, a daemon that configures DNS servers in
+# /etc/resolv/conf from IPv6 RDNSS advertisements.
+
+{ config, pkgs, ... }:
+
+with pkgs.lib;
+
+{
+
+ ###### interface
+
+ options = {
+
+ services.rdnssd.enable = mkOption {
+ default = false;
+ #default = config.networking.enableIPv6;
+ description =
+ ''
+ Whether to enable the RDNSS daemon
+ (rdnssd), which configures DNS servers in
+ /etc/resolv.conf from RDNSS
+ advertisements sent by IPv6 routers.
+ '';
+ };
+
+ };
+
+
+ ###### implementation
+
+ config = mkIf config.services.rdnssd.enable {
+
+ jobs.rdnssd =
+ { description = "RDNSS daemon";
+
+ # Start before the network interfaces are brought up so that
+ # the daemon receives RDNSS advertisements from the kernel.
+ startOn = "starting network-interfaces";
+
+ # !!! Should write to /var/run/rdnssd/resolv.conf and run the daemon under another uid.
+ exec = "${pkgs.ndisc6}/sbin/rdnssd --resolv-file /etc/resolv.conf -u root";
+
+ daemonType = "fork";
+ };
+
+ };
+
+}
diff --git a/nixos/modules/services/networking/rpcbind.nix b/nixos/modules/services/networking/rpcbind.nix
new file mode 100644
index 0000000000000000000000000000000000000000..00c958c5a4a2786c121ee7eb159883ab93e0db9e
--- /dev/null
+++ b/nixos/modules/services/networking/rpcbind.nix
@@ -0,0 +1,81 @@
+{ config, pkgs, ... }:
+
+with pkgs.lib;
+
+let
+
+ netconfigFile = {
+ target = "netconfig";
+ source = pkgs.writeText "netconfig" ''
+ #
+ # The network configuration file. This file is currently only used in
+ # conjunction with the TI-RPC code in the libtirpc library.
+ #
+ # Entries consist of:
+ #
+ # \
+ #
+ #
+ # The and fields are always empty in this
+ # implementation.
+ #
+ udp tpi_clts v inet udp - -
+ tcp tpi_cots_ord v inet tcp - -
+ udp6 tpi_clts v inet6 udp - -
+ tcp6 tpi_cots_ord v inet6 tcp - -
+ rawip tpi_raw - inet - - -
+ local tpi_cots_ord - loopback - - -
+ unix tpi_cots_ord - loopback - - -
+ '';
+ };
+
+in
+
+{
+
+ ###### interface
+
+ options = {
+
+ services.rpcbind = {
+
+ enable = mkOption {
+ default = false;
+ description = ''
+ Whether to enable `rpcbind', an ONC RPC directory service
+ notably used by NFS and NIS, and which can be queried
+ using the rpcinfo(1) command. `rpcbind` is a replacement for
+ `portmap`.
+ '';
+ };
+
+ };
+
+ };
+
+
+ ###### implementation
+
+ config = mkIf config.services.rpcbind.enable {
+
+ environment.systemPackages = [ pkgs.rpcbind ];
+
+ environment.etc = [ netconfigFile ];
+
+ systemd.services.rpcbind =
+ { description = "ONC RPC Directory Service";
+
+ wantedBy = [ "multi-user.target" ];
+
+ requires = [ "basic.target" ];
+ after = [ "basic.target" ];
+
+ unitConfig.DefaultDependencies = false; # don't stop during shutdown
+
+ serviceConfig.Type = "forking";
+ serviceConfig.ExecStart = "@${pkgs.rpcbind}/bin/rpcbind rpcbind";
+ };
+
+ };
+
+}
diff --git a/nixos/modules/services/networking/sabnzbd.nix b/nixos/modules/services/networking/sabnzbd.nix
new file mode 100644
index 0000000000000000000000000000000000000000..8816ac0d2f83a12695c8e46843876c181d332449
--- /dev/null
+++ b/nixos/modules/services/networking/sabnzbd.nix
@@ -0,0 +1,52 @@
+{ config, pkgs, ... }:
+
+with pkgs.lib;
+
+let
+
+ cfg = config.services.sabnzbd;
+ inherit (pkgs) sabnzbd;
+
+in
+
+{
+
+ ###### interface
+
+ options = {
+ services.sabnzbd = {
+ enable = mkOption {
+ default = false;
+ description = "Whether to enable the sabnzbd FTP server.";
+ };
+ configFile = mkOption {
+ default = "/var/sabnzbd/sabnzbd.ini";
+ description = "Path to config file. (You need to create this file yourself!)";
+ };
+ };
+ };
+
+
+ ###### implementation
+
+ config = mkIf cfg.enable {
+
+ users.extraUsers =
+ [ { name = "sabnzbd";
+ uid = config.ids.uids.sabnzbd;
+ description = "sabnzbd user";
+ home = "/homeless-shelter";
+ }
+ ];
+
+ jobs.sabnzbd =
+ { description = "sabnzbd server";
+
+ startOn = "started network-interfaces";
+ stopOn = "stopping network-interfaces";
+
+ exec = "${sabnzbd}/bin/sabnzbd -d -f ${cfg.configFile}";
+ };
+
+ };
+}
diff --git a/nixos/modules/services/networking/ssh/lshd.nix b/nixos/modules/services/networking/ssh/lshd.nix
new file mode 100644
index 0000000000000000000000000000000000000000..04ef76f1e4d41ad0327f5b2a9e14c2e6db7276f4
--- /dev/null
+++ b/nixos/modules/services/networking/ssh/lshd.nix
@@ -0,0 +1,177 @@
+{ config, pkgs, ... }:
+
+with pkgs.lib;
+
+let
+
+ inherit (pkgs) lsh;
+
+ cfg = config.services.lshd;
+
+in
+
+{
+
+ ###### interface
+
+ options = {
+
+ services.lshd = {
+
+ enable = mkOption {
+ default = false;
+ description = ''
+ Whether to enable the GNU lshd SSH2 daemon, which allows
+ secure remote login.
+ '';
+ };
+
+ portNumber = mkOption {
+ default = 22;
+ description = ''
+ The port on which to listen for connections.
+ '';
+ };
+
+ interfaces = mkOption {
+ default = [];
+ description = ''
+ List of network interfaces where listening for connections.
+ When providing the empty list, `[]', lshd listens on all
+ network interfaces.
+ '';
+ example = [ "localhost" "1.2.3.4:443" ];
+ };
+
+ hostKey = mkOption {
+ default = "/etc/lsh/host-key";
+ description = ''
+ Path to the server's private key. Note that this key must
+ have been created, e.g., using "lsh-keygen --server |
+ lsh-writekey --server", so that you can run lshd.
+ '';
+ };
+
+ syslog = mkOption {
+ default = true;
+ description = ''Whether to enable syslog output.'';
+ };
+
+ passwordAuthentication = mkOption {
+ default = true;
+ description = ''Whether to enable password authentication.'';
+ };
+
+ publicKeyAuthentication = mkOption {
+ default = true;
+ description = ''Whether to enable public key authentication.'';
+ };
+
+ rootLogin = mkOption {
+ default = false;
+ description = ''Whether to enable remote root login.'';
+ };
+
+ loginShell = mkOption {
+ default = null;
+ description = ''
+ If non-null, override the default login shell with the
+ specified value.
+ '';
+ example = "/nix/store/xyz-bash-10.0/bin/bash10";
+ };
+
+ srpKeyExchange = mkOption {
+ default = false;
+ description = ''
+ Whether to enable SRP key exchange and user authentication.
+ '';
+ };
+
+ tcpForwarding = mkOption {
+ default = true;
+ description = ''Whether to enable TCP/IP forwarding.'';
+ };
+
+ x11Forwarding = mkOption {
+ default = true;
+ description = ''Whether to enable X11 forwarding.'';
+ };
+
+ subsystems = mkOption {
+ default = [ ["sftp" "${pkgs.lsh}/sbin/sftp-server"] ];
+ description = ''
+ List of subsystem-path pairs, where the head of the pair
+ denotes the subsystem name, and the tail denotes the path to
+ an executable implementing it.
+ '';
+ };
+
+ };
+
+ };
+
+
+ ###### implementation
+
+ config = mkIf cfg.enable {
+
+ jobs.lshd =
+ { description = "GNU lshd SSH2 daemon";
+
+ startOn = "started network-interfaces";
+ stopOn = "stopping network-interfaces";
+
+ environment =
+ { LD_LIBRARY_PATH = config.system.nssModules.path; };
+
+ preStart =
+ ''
+ test -d /etc/lsh || mkdir -m 0755 -p /etc/lsh
+ test -d /var/spool/lsh || mkdir -m 0755 -p /var/spool/lsh
+
+ if ! test -f /var/spool/lsh/yarrow-seed-file
+ then
+ # XXX: It would be nice to provide feedback to the
+ # user when this fails, so that they can retry it
+ # manually.
+ ${lsh}/bin/lsh-make-seed --sloppy \
+ -o /var/spool/lsh/yarrow-seed-file
+ fi
+
+ if ! test -f "${cfg.hostKey}"
+ then
+ ${lsh}/bin/lsh-keygen --server | \
+ ${lsh}/bin/lsh-writekey --server -o "${cfg.hostKey}"
+ fi
+ '';
+
+ exec = with cfg;
+ ''
+ ${lsh}/sbin/lshd --daemonic \
+ --password-helper="${lsh}/sbin/lsh-pam-checkpw" \
+ -p ${toString portNumber} \
+ ${if interfaces == [] then ""
+ else (concatStrings (map (i: "--interface=\"${i}\"")
+ interfaces))} \
+ -h "${hostKey}" \
+ ${if !syslog then "--no-syslog" else ""} \
+ ${if passwordAuthentication then "--password" else "--no-password" } \
+ ${if publicKeyAuthentication then "--publickey" else "--no-publickey" } \
+ ${if rootLogin then "--root-login" else "--no-root-login" } \
+ ${if loginShell != null then "--login-shell=\"${loginShell}\"" else "" } \
+ ${if srpKeyExchange then "--srp-keyexchange" else "--no-srp-keyexchange" } \
+ ${if !tcpForwarding then "--no-tcpip-forward" else "--tcpip-forward"} \
+ ${if x11Forwarding then "--x11-forward" else "--no-x11-forward" } \
+ --subsystems=${concatStringsSep ","
+ (map (pair: (head pair) + "=" +
+ (head (tail pair)))
+ subsystems)}
+ '';
+ };
+
+ security.pam.services.lshd = {};
+
+ };
+
+}
diff --git a/nixos/modules/services/networking/ssh/sshd.nix b/nixos/modules/services/networking/ssh/sshd.nix
new file mode 100644
index 0000000000000000000000000000000000000000..c85c9307e3e4d5d04c7b05fee73ac3570b168857
--- /dev/null
+++ b/nixos/modules/services/networking/ssh/sshd.nix
@@ -0,0 +1,331 @@
+{ config, pkgs, ... }:
+
+with pkgs.lib;
+
+let
+
+ cfg = config.services.openssh;
+ cfgc = config.programs.ssh;
+
+ nssModulesPath = config.system.nssModules.path;
+
+ permitRootLoginCheck = v:
+ v == "yes" ||
+ v == "without-password" ||
+ v == "forced-commands-only" ||
+ v == "no";
+
+ knownHosts = map (h: getAttr h cfg.knownHosts) (attrNames cfg.knownHosts);
+
+ knownHostsFile = pkgs.writeText "ssh_known_hosts" (
+ flip concatMapStrings knownHosts (h:
+ "${concatStringsSep "," h.hostNames} ${builtins.readFile h.publicKeyFile}"
+ )
+ );
+
+ userOptions = {
+
+ openssh.authorizedKeys = {
+ keys = mkOption {
+ type = types.listOf types.string;
+ default = [];
+ description = ''
+ A list of verbatim OpenSSH public keys that should be added to the
+ user's authorized keys. The keys are added to a file that the SSH
+ daemon reads in addition to the the user's authorized_keys file.
+ You can combine the keys and
+ keyFiles options.
+ '';
+ };
+
+ keyFiles = mkOption {
+ default = [];
+ description = ''
+ A list of files each containing one OpenSSH public key that should be
+ added to the user's authorized keys. The contents of the files are
+ read at build time and added to a file that the SSH daemon reads in
+ addition to the the user's authorized_keys file. You can combine the
+ keyFiles and keys options.
+ '';
+ };
+ };
+
+ };
+
+ authKeysFiles = let
+ mkAuthKeyFile = u: {
+ target = "ssh/authorized_keys.d/${u.name}";
+ mode = "0444";
+ source = pkgs.writeText "${u.name}-authorized_keys" ''
+ ${concatStringsSep "\n" u.openssh.authorizedKeys.keys}
+ ${concatMapStrings (f: builtins.readFile f + "\n") u.openssh.authorizedKeys.keyFiles}
+ '';
+ };
+ usersWithKeys = attrValues (flip filterAttrs config.users.extraUsers (n: u:
+ length u.openssh.authorizedKeys.keys != 0 || length u.openssh.authorizedKeys.keyFiles != 0
+ ));
+ in map mkAuthKeyFile usersWithKeys;
+
+in
+
+{
+
+ ###### interface
+
+ options = {
+
+ services.openssh = {
+
+ enable = mkOption {
+ default = false;
+ description = ''
+ Whether to enable the OpenSSH secure shell daemon, which
+ allows secure remote logins.
+ '';
+ };
+
+ forwardX11 = mkOption {
+ default = cfgc.setXAuthLocation;
+ description = ''
+ Whether to allow X11 connections to be forwarded.
+ '';
+ };
+
+ allowSFTP = mkOption {
+ default = true;
+ description = ''
+ Whether to enable the SFTP subsystem in the SSH daemon. This
+ enables the use of commands such as sftp and
+ sshfs.
+ '';
+ };
+
+ permitRootLogin = mkOption {
+ default = "without-password";
+ check = permitRootLoginCheck;
+ description = ''
+ Whether the root user can login using ssh. Valid values are
+ yes, without-password,
+ forced-commands-only or
+ no.
+ '';
+ };
+
+ gatewayPorts = mkOption {
+ default = "no";
+ description = ''
+ Specifies whether remote hosts are allowed to connect to
+ ports forwarded for the client. See
+ sshd_config
+ 5.
+ '';
+ };
+
+ ports = mkOption {
+ default = [22];
+ description = ''
+ Specifies on which ports the SSH daemon listens.
+ '';
+ };
+
+ passwordAuthentication = mkOption {
+ default = true;
+ description = ''
+ Specifies whether password authentication is allowed.
+ '';
+ };
+
+ challengeResponseAuthentication = mkOption {
+ default = true;
+ description = ''
+ Specifies whether challenge/response authentication is allowed.
+ '';
+ };
+
+ hostKeys = mkOption {
+ default =
+ [ { path = "/etc/ssh/ssh_host_dsa_key";
+ type = "dsa";
+ bits = 1024;
+ }
+ { path = "/etc/ssh/ssh_host_ecdsa_key";
+ type = "ecdsa";
+ bits = 521;
+ }
+ ];
+ description = ''
+ NixOS can automatically generate SSH host keys. This option
+ specifies the path, type and size of each key. See
+ ssh-keygen
+ 1 for supported types
+ and sizes.
+ '';
+ };
+
+ authorizedKeysFiles = mkOption {
+ default = [];
+ description = "Files from with authorized keys are read.";
+ };
+
+ extraConfig = mkOption {
+ default = "";
+ description = "Verbatim contents of sshd_config.";
+ };
+
+ knownHosts = mkOption {
+ default = {};
+ type = types.loaOf types.optionSet;
+ description = ''
+ The set of system-wide known SSH hosts.
+ '';
+ example = [
+ {
+ hostNames = [ "myhost" "myhost.mydomain.com" "10.10.1.4" ];
+ publicKeyFile = ./pubkeys/myhost_ssh_host_dsa_key.pub;
+ }
+ {
+ hostNames = [ "myhost2" ];
+ publicKeyFile = ./pubkeys/myhost2_ssh_host_dsa_key.pub;
+ }
+ ];
+ options = {
+ hostNames = mkOption {
+ type = types.listOf types.string;
+ default = [];
+ description = ''
+ A list of host names and/or IP numbers used for accessing
+ the host's ssh service.
+ '';
+ };
+ publicKeyFile = mkOption {
+ description = ''
+ The path to the public key file for the host. The public
+ key file is read at build time and saved in the Nix store.
+ You can fetch a public key file from a running SSH server
+ with the ssh-keyscan command.
+ '';
+ };
+ };
+ };
+
+ };
+
+ users.extraUsers = mkOption {
+ options = [ userOptions ];
+ };
+
+ };
+
+
+ ###### implementation
+
+ config = mkIf cfg.enable {
+
+ users.extraUsers = singleton
+ { name = "sshd";
+ uid = config.ids.uids.sshd;
+ description = "SSH privilege separation user";
+ home = "/var/empty";
+ };
+
+ environment.etc = authKeysFiles ++ [
+ { source = "${pkgs.openssh}/etc/ssh/moduli";
+ target = "ssh/moduli";
+ }
+ { source = knownHostsFile;
+ target = "ssh/ssh_known_hosts";
+ }
+ ];
+
+ systemd.services.sshd =
+ { description = "SSH Daemon";
+
+ wantedBy = [ "multi-user.target" ];
+
+ stopIfChanged = false;
+
+ path = [ pkgs.openssh pkgs.gawk ];
+
+ environment.LD_LIBRARY_PATH = nssModulesPath;
+ environment.LOCALE_ARCHIVE = "/run/current-system/sw/lib/locale/locale-archive";
+
+ preStart =
+ ''
+ mkdir -m 0755 -p /etc/ssh
+
+ ${flip concatMapStrings cfg.hostKeys (k: ''
+ if ! [ -f "${k.path}" ]; then
+ ssh-keygen -t "${k.type}" -b "${toString k.bits}" -f "${k.path}" -N ""
+ fi
+ '')}
+ '';
+
+ serviceConfig =
+ { ExecStart =
+ "${pkgs.openssh}/sbin/sshd " +
+ "-f ${pkgs.writeText "sshd_config" cfg.extraConfig}";
+ Restart = "always";
+ Type = "forking";
+ KillMode = "process";
+ PIDFile = "/run/sshd.pid";
+ };
+ };
+
+ networking.firewall.allowedTCPPorts = cfg.ports;
+
+ security.pam.services.sshd =
+ { startSession = true;
+ showMotd = true;
+ unixAuth = cfg.passwordAuthentication;
+ };
+
+ services.openssh.authorizedKeysFiles =
+ [ ".ssh/authorized_keys" ".ssh/authorized_keys2" "/etc/ssh/authorized_keys.d/%u" ];
+
+ services.openssh.extraConfig =
+ ''
+ PidFile /run/sshd.pid
+
+ Protocol 2
+
+ UsePAM yes
+
+ AddressFamily ${if config.networking.enableIPv6 then "any" else "inet"}
+ ${concatMapStrings (port: ''
+ Port ${toString port}
+ '') cfg.ports}
+
+ ${optionalString cfgc.setXAuthLocation ''
+ XAuthLocation ${pkgs.xorg.xauth}/bin/xauth
+ ''}
+
+ ${if cfg.forwardX11 then ''
+ X11Forwarding yes
+ '' else ''
+ X11Forwarding no
+ ''}
+
+ ${optionalString cfg.allowSFTP ''
+ Subsystem sftp ${pkgs.openssh}/libexec/sftp-server
+ ''}
+
+ PermitRootLogin ${cfg.permitRootLogin}
+ GatewayPorts ${cfg.gatewayPorts}
+ PasswordAuthentication ${if cfg.passwordAuthentication then "yes" else "no"}
+ ChallengeResponseAuthentication ${if cfg.challengeResponseAuthentication then "yes" else "no"}
+
+ PrintMotd no # handled by pam_motd
+
+ AuthorizedKeysFile ${toString cfg.authorizedKeysFiles}
+
+ ${flip concatMapStrings cfg.hostKeys (k: ''
+ HostKey ${k.path}
+ '')}
+ '';
+
+ assertions = [{ assertion = if cfg.forwardX11 then cfgc.setXAuthLocation else true;
+ message = "cannot enable X11 forwarding without setting xauth location";}];
+
+ };
+
+}
diff --git a/nixos/modules/services/networking/supybot.nix b/nixos/modules/services/networking/supybot.nix
new file mode 100644
index 0000000000000000000000000000000000000000..fa8b7556de5d018c1fbf7bcc79de6ccfe10bd6f1
--- /dev/null
+++ b/nixos/modules/services/networking/supybot.nix
@@ -0,0 +1,88 @@
+{ config, pkgs, ... }:
+
+with pkgs.lib;
+
+let
+
+ cfg = config.services.supybot;
+
+in
+
+{
+
+ options = {
+
+ services.supybot = {
+
+ enable = mkOption {
+ default = false;
+ description = "Enable Supybot, an IRC bot";
+ };
+
+ stateDir = mkOption {
+ # Setting this to /var/lib/supybot caused useradd to fail
+ default = "/home/supybot";
+ description = "The root directory, logs and plugins are stored here";
+ };
+
+ configFile = mkOption {
+ type = types.path;
+ description = ''
+ Path to a supybot config file. This can be generated by
+ running supybot-wizard.
+
+ Note: all paths should include the full path to the stateDir
+ directory (backup conf data logs logs/plugins plugins tmp web).
+ '';
+ };
+
+ };
+
+ };
+
+
+ config = mkIf cfg.enable {
+
+ environment.systemPackages = [ pkgs.pythonPackages.limnoria ];
+
+ users.extraUsers = singleton {
+ name = "supybot";
+ uid = config.ids.uids.supybot;
+ group = "supybot";
+ description = "Supybot IRC bot user";
+ home = cfg.stateDir;
+ createHome = true;
+ };
+
+ users.extraGroups.supybot = {
+ name = "supybot";
+ gid = config.ids.gids.supybot;
+ };
+
+ systemd.services.supybot = {
+ description = "Supybot, an IRC bot";
+ after = [ "network.target" ];
+ wantedBy = [ "multi-user.target" ];
+ path = [ pkgs.pythonPackages.limnoria ];
+ preStart = ''
+ cd ${cfg.stateDir}
+ mkdir -p backup conf data plugins logs/plugins tmp web
+ ln -sf ${cfg.configFile} supybot.cfg
+ # This needs to be created afresh every time
+ rm -f supybot.cfg.bak
+ '';
+
+ serviceConfig = {
+ ExecStart = "${pkgs.pythonPackages.limnoria}/bin/supybot ${cfg.stateDir}/supybot.cfg";
+ PIDFile = "/run/supybot.pid";
+ User = "supybot";
+ Group = "supybot";
+ UMask = "0007";
+ Restart = "on-abort";
+ StartLimitInterval = "5m";
+ StartLimitBurst = "1";
+ };
+ };
+
+ };
+}
diff --git a/nixos/modules/services/networking/tcpcrypt.nix b/nixos/modules/services/networking/tcpcrypt.nix
new file mode 100644
index 0000000000000000000000000000000000000000..48cb884f2466397637d82e0ec656c5cfd8d15e2a
--- /dev/null
+++ b/nixos/modules/services/networking/tcpcrypt.nix
@@ -0,0 +1,78 @@
+{ config, pkgs, ... }:
+
+with pkgs.lib;
+
+let
+
+ cfg = config.networking.tcpcrypt;
+
+in
+
+{
+
+ ###### interface
+
+ options = {
+
+ networking.tcpcrypt.enable = mkOption {
+ default = false;
+ description = ''
+ Whether to enable opportunistic TCP encryption. If the other end
+ speaks Tcpcrypt, then your traffic will be encrypted; otherwise
+ it will be sent in clear text. Thus, Tcpcrypt alone provides no
+ guarantees -- it is best effort. If, however, a Tcpcrypt
+ connection is successful and any attackers that exist are
+ passive, then Tcpcrypt guarantees privacy.
+ '';
+ };
+ };
+
+ config = mkIf cfg.enable {
+
+ users.extraUsers = singleton {
+ name = "tcpcryptd";
+ uid = config.ids.uids.tcpcryptd;
+ description = "tcpcrypt daemon user";
+ };
+
+ jobs.tcpcrypt = {
+ description = "tcpcrypt";
+
+ wantedBy = ["multi-user.target"];
+ after = ["network-interfaces.target"];
+
+ path = [ pkgs.iptables pkgs.tcpcrypt pkgs.procps ];
+
+ preStart = ''
+ sysctl -n net.ipv4.tcp_ecn >/run/pre-tcpcrypt-ecn-state
+ sysctl -w net.ipv4.tcp_ecn=0
+
+ iptables -t raw -N nixos-tcpcrypt
+ iptables -t raw -A nixos-tcpcrypt -p tcp -m mark --mark 0x0/0x10 -j NFQUEUE --queue-num 666
+ iptables -t raw -I PREROUTING -j nixos-tcpcrypt
+
+ iptables -t mangle -N nixos-tcpcrypt
+ iptables -t mangle -A nixos-tcpcrypt -p tcp -m mark --mark 0x0/0x10 -j NFQUEUE --queue-num 666
+ iptables -t mangle -I POSTROUTING -j nixos-tcpcrypt
+ '';
+
+ exec = "tcpcryptd -x 0x10";
+
+ postStop = ''
+ if [ -f /run/pre-tcpcrypt-ecn-state ]; then
+ sysctl -w net.ipv4.tcp_ecn=$(cat /run/pre-tcpcrypt-ecn-state)
+ fi
+
+ iptables -t mangle -D POSTROUTING -j nixos-tcpcrypt || true
+ iptables -t raw -D PREROUTING -j nixos-tcpcrypt || true
+
+ iptables -t raw -F nixos-tcpcrypt || true
+ iptables -t raw -X nixos-tcpcrypt || true
+
+ iptables -t mangle -F nixos-tcpcrypt || true
+ iptables -t mangle -X nixos-tcpcrypt || true
+ '';
+ };
+ };
+
+}
diff --git a/nixos/modules/services/networking/tftpd.nix b/nixos/modules/services/networking/tftpd.nix
new file mode 100644
index 0000000000000000000000000000000000000000..37935496c59766a9e17e07dc6fa8522370d40861
--- /dev/null
+++ b/nixos/modules/services/networking/tftpd.nix
@@ -0,0 +1,43 @@
+{ config, pkgs, ... }:
+
+with pkgs.lib;
+
+{
+
+ ###### interface
+
+ options = {
+
+ services.tftpd.enable = mkOption {
+ default = false;
+ description = ''
+ Whether to enable the anonymous FTP user.
+ '';
+ };
+
+ services.tftpd.path = mkOption {
+ default = "/home/tftp";
+ description = ''
+ Where the tftp server files are stored
+ '';
+ };
+
+ };
+
+
+ ###### implementation
+
+ config = mkIf config.services.tftpd.enable {
+
+ services.xinetd.enable = true;
+
+ services.xinetd.services = singleton
+ { name = "tftp";
+ protocol = "udp";
+ server = "${pkgs.netkittftp}/sbin/in.tftpd";
+ serverArgs = "${config.services.tftpd.path}";
+ };
+
+ };
+
+}
diff --git a/nixos/modules/services/networking/unbound.nix b/nixos/modules/services/networking/unbound.nix
new file mode 100644
index 0000000000000000000000000000000000000000..fb75b4ed069a87bd80759b30ba33aa0ee033e6af
--- /dev/null
+++ b/nixos/modules/services/networking/unbound.nix
@@ -0,0 +1,118 @@
+{ config, pkgs, ... }:
+
+with pkgs.lib;
+
+let
+
+ cfg = config.services.unbound;
+
+ username = "unbound";
+
+ stateDir = "/var/lib/unbound";
+
+ access = concatMapStrings (x: " access-control: ${x} allow\n") cfg.allowedAccess;
+
+ interfaces = concatMapStrings (x: " interface: ${x}\n") cfg.interfaces;
+
+ forward = optionalString (length cfg.forwardAddresses != 0)
+ "forward-zone:\n name: .\n" +
+ concatMapStrings (x: " forward-addr: ${x}\n") cfg.forwardAddresses;
+
+ confFile = pkgs.writeText "unbound.conf"
+ ''
+ server:
+ directory: "${stateDir}"
+ username: ${username}
+ # make sure unbound can access entropy from inside the chroot.
+ # e.g. on linux the use these commands (on BSD, devfs(8) is used):
+ # mount --bind -n /dev/random /etc/unbound/dev/random
+ # and mount --bind -n /dev/log /etc/unbound/dev/log
+ chroot: "${stateDir}"
+ # logfile: "${stateDir}/unbound.log" #uncomment to use logfile.
+ pidfile: "${stateDir}/unbound.pid"
+ verbosity: 1 # uncomment and increase to get more logging.
+ # listen on all interfaces, answer queries from the local subnet.
+ ${interfaces}
+ ${access}
+ ${forward}
+ ${cfg.extraConfig}
+ '';
+
+in
+
+{
+
+ ###### interface
+
+ options = {
+
+ services.unbound = {
+
+ enable = mkOption {
+ default = false;
+ description = "
+ Whether to enable the Unbound domain name server.
+ ";
+ };
+
+ allowedAccess = mkOption {
+ default = ["127.0.0.0/24"];
+ description = "
+ What networks are allowed to use us as a resolver.
+ ";
+ };
+
+ interfaces = mkOption {
+ default = [ "127.0.0.0" "::1" ];
+ description = "
+ What addresses the server should listen to.
+ ";
+ };
+
+ forwardAddresses = mkOption {
+ default = [ ];
+ description = "
+ What servers to forward the queries to.
+ ";
+ };
+
+ extraConfig = mkOption {
+ default = "";
+ description = "
+ Extra unbound config
+ ";
+ };
+
+ };
+
+ };
+
+
+ ###### implementation
+
+ config = mkIf config.services.unbound.enable {
+ environment.systemPackages = [ pkgs.unbound ];
+
+ users.extraUsers = singleton
+ { name = username;
+ uid = config.ids.uids.unbound;
+ description = "unbound daemon user";
+ home = "/tmp";
+ };
+
+ jobs.unbound =
+ { description = "Unbound name server job";
+
+ preStart =
+ ''
+ ${pkgs.coreutils}/bin/mkdir -p ${stateDir}
+ '';
+
+ daemonType = "fork";
+
+ exec = "${pkgs.unbound}/sbin/unbound -c ${confFile}";
+ };
+
+ };
+
+}
diff --git a/nixos/modules/services/networking/vsftpd.nix b/nixos/modules/services/networking/vsftpd.nix
new file mode 100644
index 0000000000000000000000000000000000000000..1b2432401deff16fc609bef894bb71d1db2c8a62
--- /dev/null
+++ b/nixos/modules/services/networking/vsftpd.nix
@@ -0,0 +1,137 @@
+{ config, pkgs, ... }:
+
+with pkgs.lib;
+
+let
+
+ cfg = config.services.vsftpd;
+
+ inherit (pkgs) vsftpd;
+
+ yesNoOption = p : name :
+ "${name}=${if p then "YES" else "NO"}";
+
+in
+
+{
+
+ ###### interface
+
+ options = {
+
+ services.vsftpd = {
+
+ enable = mkOption {
+ default = false;
+ description = "Whether to enable the vsftpd FTP server.";
+ };
+
+ anonymousUser = mkOption {
+ default = false;
+ description = "Whether to enable the anonymous FTP user.";
+ };
+
+ anonymousUserHome = mkOption {
+ default = "/home/ftp";
+ description = "Path to anonymous user data.";
+ };
+
+ localUsers = mkOption {
+ default = false;
+ description = "Whether to enable FTP for local users.";
+ };
+
+ writeEnable = mkOption {
+ default = false;
+ description = "Whether any write activity is permitted to users.";
+ };
+
+ anonymousUploadEnable = mkOption {
+ default = false;
+ description = "Whether any uploads are permitted to anonymous users.";
+ };
+
+ anonymousMkdirEnable = mkOption {
+ default = false;
+ description = "Whether mkdir is permitted to anonymous users.";
+ };
+
+ chrootlocalUser = mkOption {
+ default = false;
+ description = "Whether local users are confined to their home directory.";
+ };
+
+ userlistEnable = mkOption {
+ default = false;
+ description = "Whether users are included.";
+ };
+
+ userlistDeny = mkOption {
+ default = false;
+ description = "Whether users are excluded.";
+ };
+
+ };
+
+ };
+
+
+ ###### implementation
+
+ config = mkIf cfg.enable {
+
+ users.extraUsers =
+ [ { name = "vsftpd";
+ uid = config.ids.uids.vsftpd;
+ description = "VSFTPD user";
+ home = "/homeless-shelter";
+ }
+ ] ++ pkgs.lib.optional cfg.anonymousUser
+ { name = "ftp";
+ uid = config.ids.uids.ftp;
+ group = "ftp";
+ description = "Anonymous FTP user";
+ home = cfg.anonymousUserHome;
+ };
+
+ users.extraGroups = singleton
+ { name = "ftp";
+ gid = config.ids.gids.ftp;
+ };
+
+ jobs.vsftpd =
+ { description = "vsftpd server";
+
+ startOn = "started network-interfaces";
+ stopOn = "stopping network-interfaces";
+
+ preStart =
+ ''
+ # !!! Why isn't this generated in the normal way?
+ cat > /etc/vsftpd.conf <wicd. Wired and
+ wireless network configurations can then be managed by
+ wicd-client.
+ '';
+ };
+ };
+
+
+ ###### implementation
+
+ config = mkIf config.networking.wicd.enable {
+
+ environment.systemPackages = [pkgs.wicd];
+
+ jobs.wicd =
+ { startOn = "started network-interfaces";
+ stopOn = "stopping network-interfaces";
+
+ script =
+ "${pkgs.wicd}/sbin/wicd -f";
+ };
+
+ services.dbus.enable = true;
+ services.dbus.packages = [pkgs.wicd];
+
+ };
+
+}
diff --git a/nixos/modules/services/networking/wpa_supplicant.nix b/nixos/modules/services/networking/wpa_supplicant.nix
new file mode 100644
index 0000000000000000000000000000000000000000..dca398dd8be25f6b46cb4d765174bcb14bc176b8
--- /dev/null
+++ b/nixos/modules/services/networking/wpa_supplicant.nix
@@ -0,0 +1,136 @@
+{ config, pkgs, ... }:
+
+with pkgs.lib;
+
+let
+
+ cfg = config.networking.wireless;
+ configFile = "/etc/wpa_supplicant.conf";
+
+ ifaces =
+ cfg.interfaces ++
+ optional (config.networking.WLANInterface != "") config.networking.WLANInterface;
+
+in
+
+{
+
+ ###### interface
+
+ options = {
+
+ networking.WLANInterface = mkOption {
+ default = "";
+ description = "Obsolete. Use
networking.wireless.interfaces
instead.";
+ };
+
+ networking.wireless = {
+ enable = mkOption {
+ default = false;
+ description = ''
+ Whether to start wpa_supplicant to scan for
+ and associate with wireless networks. Note: NixOS currently
+ does not generate wpa_supplicant's
+ configuration file, ${configFile}. You
+ should edit this file yourself to define wireless networks,
+ WPA keys and so on (see
+ wpa_supplicant.conf
+ 5).
+ '';
+ };
+
+ interfaces = mkOption {
+ default = [];
+ example = [ "wlan0" "wlan1" ];
+ description = ''
+ The interfaces wpa_supplicant will use. If empty, it will
+ automatically use all wireless interfaces. (Note that auto-detection is currently
+ broken on Linux 3.4.x kernels. See http://github.com/NixOS/nixos/issues/10 for
+ further details.)
+ '';
+ };
+
+ driver = mkOption {
+ default = "nl80211,wext";
+ description = "Force a specific wpa_supplicant driver.";
+ };
+
+ userControlled = {
+ enable = mkOption {
+ default = false;
+ description = ''
+ Allow normal users to control wpa_supplicant through wpa_gui or wpa_cli.
+ This is useful for laptop users that switch networks a lot.
+
+ When you want to use this, make sure ${configFile} doesn't exist.
+ It will be created for you.
+
+ Currently it is also necessary to explicitly specify networking.wireless.interfaces.
+ '';
+ };
+
+ group = mkOption {
+ default = "wheel";
+ example = "network";
+ type = types.string;
+ description = "Members of this group can control wpa_supplicant.";
+ };
+ };
+ };
+ };
+
+
+ ###### implementation
+
+ config = mkIf cfg.enable {
+
+ environment.systemPackages = [ pkgs.wpa_supplicant ];
+
+ services.dbus.packages = [ pkgs.wpa_supplicant ];
+
+ jobs.wpa_supplicant =
+ { description = "WPA Supplicant";
+
+ wantedBy = [ "network.target" ];
+ after = [ "systemd-udev-settle.service" ];
+
+ path = [ pkgs.wpa_supplicant ];
+
+ preStart = ''
+ touch -a ${configFile}
+ chmod 600 ${configFile}
+ '' + optionalString cfg.userControlled.enable ''
+ if [ ! -s ${configFile} ]; then
+ echo "ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=${cfg.userControlled.group}" >> ${configFile}
+ echo "update_config=1" >> ${configFile}
+ fi
+ '';
+
+ script =
+ ''
+ ${if ifaces == [] then ''
+ for i in $(cd /sys/class/net && echo *); do
+ DEVTYPE=
+ source /sys/class/net/$i/uevent
+ if [ "$DEVTYPE" = "wlan" -o -e /sys/class/net/$i/wireless ]; then
+ ifaces="$ifaces''${ifaces:+ -N} -i$i"
+ fi
+ done
+ '' else ''
+ ifaces="${concatStringsSep " -N " (map (i: "-i${i}") ifaces)}"
+ ''}
+ exec wpa_supplicant -s -u -D${cfg.driver} -c ${configFile} $ifaces
+ '';
+ };
+
+ powerManagement.resumeCommands =
+ ''
+ ${config.systemd.package}/bin/systemctl try-restart wpa_supplicant
+ '';
+
+ assertions = [{ assertion = !cfg.userControlled.enable || cfg.interfaces != [];
+ message = "user controlled wpa_supplicant needs explicit networking.wireless.interfaces";}];
+
+ };
+
+}
diff --git a/nixos/modules/services/networking/xinetd.nix b/nixos/modules/services/networking/xinetd.nix
new file mode 100644
index 0000000000000000000000000000000000000000..626183b810f13677b1819784838c8c7c122a8123
--- /dev/null
+++ b/nixos/modules/services/networking/xinetd.nix
@@ -0,0 +1,158 @@
+{ config, pkgs, ... }:
+
+with pkgs.lib;
+
+let
+
+ cfg = config.services.xinetd;
+
+ inherit (pkgs) xinetd;
+
+ configFile = pkgs.writeText "xinetd.conf"
+ ''
+ defaults
+ {
+ log_type = SYSLOG daemon info
+ log_on_failure = HOST
+ log_on_success = PID HOST DURATION EXIT
+ ${cfg.extraDefaults}
+ }
+
+ ${concatMapStrings makeService cfg.services}
+ '';
+
+ makeService = srv:
+ ''
+ service ${srv.name}
+ {
+ protocol = ${srv.protocol}
+ ${optionalString srv.unlisted "type = UNLISTED"}
+ ${optionalString (srv.flags != "") "flags = ${srv.flags}"}
+ socket_type = ${if srv.protocol == "udp" then "dgram" else "stream"}
+ ${if srv.port != 0 then "port = ${toString srv.port}" else ""}
+ wait = ${if srv.protocol == "udp" then "yes" else "no"}
+ user = ${srv.user}
+ server = ${srv.server}
+ ${optionalString (srv.serverArgs != "") "server_args = ${srv.serverArgs}"}
+ ${srv.extraConfig}
+ }
+ '';
+
+in
+
+{
+
+ ###### interface
+
+ options = {
+
+ services.xinetd.enable = mkOption {
+ default = false;
+ description = ''
+ Whether to enable the xinetd super-server daemon.
+ '';
+ };
+
+ services.xinetd.extraDefaults = mkOption {
+ default = "";
+ type = types.string;
+ description = ''
+ Additional configuration lines added to the default section of xinetd's configuration.
+ '';
+ };
+
+ services.xinetd.services = mkOption {
+ default = [];
+ description = ''
+ A list of services provided by xinetd.
+ '';
+
+ type = types.listOf types.optionSet;
+
+ options = {
+
+ name = mkOption {
+ type = types.string;
+ example = "login";
+ description = "Name of the service.";
+ };
+
+ protocol = mkOption {
+ type = types.string;
+ default = "tcp";
+ description =
+ "Protocol of the service. Usually tcp or udp.";
+ };
+
+ port = mkOption {
+ type = types.int;
+ default = 0;
+ example = 123;
+ description = "Port number of the service.";
+ };
+
+ user = mkOption {
+ type = types.string;
+ default = "nobody";
+ description = "User account for the service";
+ };
+
+ server = mkOption {
+ type = types.string;
+ example = "/foo/bin/ftpd";
+ description = "Path of the program that implements the service.";
+ };
+
+ serverArgs = mkOption {
+ type = types.string;
+ default = "";
+ description = "Command-line arguments for the server program.";
+ };
+
+ flags = mkOption {
+ type = types.string;
+ default = "";
+ description = "";
+ };
+
+ unlisted = mkOption {
+ type = types.bool;
+ default = false;
+ description = ''
+ Whether this server is listed in
+ /etc/services. If so, the port
+ number can be omitted.
+ '';
+ };
+
+ extraConfig = mkOption {
+ type = types.string;
+ default = "";
+ description = "Extra configuration-lines added to the section of the service.";
+ };
+
+ };
+
+ };
+
+ };
+
+
+ ###### implementation
+
+ config = mkIf cfg.enable {
+
+ jobs.xinetd =
+ { description = "xinetd server";
+
+ startOn = "started network-interfaces";
+ stopOn = "stopping network-interfaces";
+
+ path = [ xinetd ];
+
+ exec = "xinetd -syslog daemon -dontfork -stayalive -f ${configFile}";
+ };
+
+ };
+
+}
diff --git a/nixos/modules/services/printing/cupsd.nix b/nixos/modules/services/printing/cupsd.nix
new file mode 100644
index 0000000000000000000000000000000000000000..1c3dc9d90b1de44974900be26758818586c94a5a
--- /dev/null
+++ b/nixos/modules/services/printing/cupsd.nix
@@ -0,0 +1,225 @@
+{ config, pkgs, ... }:
+
+with pkgs.lib;
+
+let
+
+ inherit (pkgs) cups;
+
+ cfg = config.services.printing;
+
+ additionalBackends = pkgs.runCommand "additional-cups-backends" { }
+ ''
+ mkdir -p $out
+ if [ ! -e ${pkgs.cups}/lib/cups/backend/smb ]; then
+ mkdir -p $out/lib/cups/backend
+ ln -sv ${pkgs.samba}/bin/smbspool $out/lib/cups/backend/smb
+ fi
+
+ # Provide support for printing via HTTPS.
+ if [ ! -e ${pkgs.cups}/lib/cups/backend/https ]; then
+ mkdir -p $out/lib/cups/backend
+ ln -sv ${pkgs.cups}/lib/cups/backend/ipp $out/lib/cups/backend/https
+ fi
+
+ # Import filter configuration from Ghostscript.
+ mkdir -p $out/share/cups/mime/
+ ln -v -s "${pkgs.ghostscript}/etc/cups/"* $out/share/cups/mime/
+ '';
+
+ # Here we can enable additional backends, filters, etc. that are not
+ # part of CUPS itself, e.g. the SMB backend is part of Samba. Since
+ # we can't update ${cups}/lib/cups itself, we create a symlink tree
+ # here and add the additional programs. The ServerBin directive in
+ # cupsd.conf tells cupsd to use this tree.
+ bindir = pkgs.buildEnv {
+ name = "cups-progs";
+ paths = cfg.drivers;
+ pathsToLink = [ "/lib/cups" "/share/cups" "/bin" ];
+ postBuild = cfg.bindirCmds;
+ };
+
+in
+
+{
+
+ ###### interface
+
+ options = {
+ services.printing = {
+
+ enable = mkOption {
+ default = false;
+ description = ''
+ Whether to enable printing support through the CUPS daemon.
+ '';
+ };
+
+ bindirCmds = mkOption {
+ default = "";
+ description = ''
+ Additional commands executed while creating the directory
+ containing the CUPS server binaries.
+ '';
+ };
+
+ cupsdConf = mkOption {
+ default = "";
+ example =
+ ''
+ BrowsePoll cups.example.com
+ LogLevel debug
+ '';
+ description = ''
+ The contents of the configuration file of the CUPS daemon
+ (cupsd.conf).
+ '';
+ };
+
+ drivers = mkOption {
+ example = [ pkgs.splix ];
+ description = ''
+ CUPS drivers (CUPS, gs and samba are added unconditionally).
+ '';
+ };
+
+ tempDir = mkOption {
+ default = "/tmp";
+ example = "/tmp/cups";
+ description = ''
+ CUPSd temporary directory.
+ '';
+ };
+ };
+
+ };
+
+
+ ###### implementation
+
+ config = mkIf config.services.printing.enable {
+
+ users.extraUsers = singleton
+ { name = "cups";
+ uid = config.ids.uids.cups;
+ group = "lp";
+ description = "CUPS printing services";
+ };
+
+ environment.systemPackages = [ cups ];
+
+ services.dbus.packages = [ cups ];
+
+ # Cups uses libusb to talk to printers, and does not use the
+ # linux kernel driver. If the driver is not in a black list, it
+ # gets loaded, and then cups cannot access the printers.
+ boot.blacklistedKernelModules = [ "usblp" ];
+
+ systemd.services.cupsd =
+ { description = "CUPS Printing Daemon";
+
+ wantedBy = [ "multi-user.target" ];
+ after = [ "network-interfaces.target" ];
+
+ path = [ cups ];
+
+ preStart =
+ ''
+ mkdir -m 0755 -p /etc/cups
+ mkdir -m 0700 -p /var/cache/cups
+ mkdir -m 0700 -p /var/spool/cups
+ mkdir -m 0755 -p ${cfg.tempDir}
+ '';
+
+ serviceConfig.Type = "forking";
+ serviceConfig.ExecStart = "@${cups}/sbin/cupsd cupsd -c ${pkgs.writeText "cupsd.conf" cfg.cupsdConf}";
+ };
+
+ services.printing.drivers =
+ [ pkgs.cups pkgs.cups_pdf_filter pkgs.ghostscript additionalBackends pkgs.perl pkgs.coreutils pkgs.gnused ];
+
+ services.printing.cupsdConf =
+ ''
+ LogLevel info
+
+ SystemGroup root
+
+ Listen localhost:631
+ Listen /var/run/cups/cups.sock
+
+ # Note: we can't use ${cups}/etc/cups as the ServerRoot, since
+ # CUPS will write in the ServerRoot when e.g. adding new printers
+ # through the web interface.
+ ServerRoot /etc/cups
+
+ ServerBin ${bindir}/lib/cups
+ DataDir ${bindir}/share/cups
+
+ SetEnv PATH ${bindir}/lib/cups/filter:${bindir}/bin:${bindir}/sbin
+
+ AccessLog syslog
+ ErrorLog syslog
+ PageLog syslog
+
+ TempDir ${cfg.tempDir}
+
+ # User and group used to run external programs, including
+ # those that actually send the job to the printer. Note that
+ # Udev sets the group of printer devices to `lp', so we want
+ # these programs to run as `lp' as well.
+ User cups
+ Group lp
+
+ Browsing On
+ BrowseOrder allow,deny
+ BrowseAllow @LOCAL
+
+ DefaultAuthType Basic
+
+
+ Order allow,deny
+ Allow localhost
+
+
+
+ Order allow,deny
+ Allow localhost
+
+
+
+ AuthType Basic
+ Require user @SYSTEM
+ Order allow,deny
+ Allow localhost
+
+
+
+
+ Require user @OWNER @SYSTEM
+ Order deny,allow
+
+
+
+ AuthType Basic
+ Require user @SYSTEM
+ Order deny,allow
+
+
+
+ Require user @OWNER @SYSTEM
+ Order deny,allow
+
+
+
+ Order deny,allow
+
+
+ '';
+
+ # Allow CUPS to receive IPP printer announcements via UDP.
+ networking.firewall.allowedUDPPorts = [ 631 ];
+
+ security.pam.services.cups = {};
+
+ };
+}
diff --git a/nixos/modules/services/scheduling/atd.nix b/nixos/modules/services/scheduling/atd.nix
new file mode 100644
index 0000000000000000000000000000000000000000..8c96252668e3fe43c27536162c91846e4cb2d3ce
--- /dev/null
+++ b/nixos/modules/services/scheduling/atd.nix
@@ -0,0 +1,111 @@
+{pkgs, config, ...}:
+
+with pkgs.lib;
+
+let
+
+ cfg = config.services.atd;
+
+ inherit (pkgs) at;
+
+in
+
+{
+
+ ###### interface
+
+ options = {
+
+ services.atd.enable = mkOption {
+ default = false;
+ description = ''
+ Whether to enable the `at' daemon, a command scheduler.
+ '';
+ };
+
+ services.atd.allowEveryone = mkOption {
+ default = false;
+ description = ''
+ Whether to make /var/spool/at{jobs,spool} writeable
+ by everyone (and sticky). This is normally not needed since
+ the `at' commands are setuid/setgid `atd'.
+ '';
+ };
+
+ };
+
+
+ ###### implementation
+
+ config = mkIf cfg.enable {
+
+ security.setuidOwners = map (program: {
+ inherit program;
+ owner = "atd";
+ group = "atd";
+ setuid = true;
+ setgid = true;
+ }) [ "at" "atq" "atrm" "batch" ];
+
+ environment.systemPackages = [ at ];
+
+ security.pam.services.atd = {};
+
+ users.extraUsers = singleton
+ { name = "atd";
+ uid = config.ids.uids.atd;
+ description = "atd user";
+ home = "/var/empty";
+ };
+
+ users.extraGroups = singleton
+ { name = "atd";
+ gid = config.ids.gids.atd;
+ };
+
+ jobs.atd =
+ { description = "Job Execution Daemon (atd)";
+
+ startOn = "stopped udevtrigger";
+
+ path = [ at ];
+
+ preStart =
+ ''
+ # Snippets taken and adapted from the original `install' rule of
+ # the makefile.
+
+ # We assume these values are those actually used in Nixpkgs for
+ # `at'.
+ spooldir=/var/spool/atspool
+ jobdir=/var/spool/atjobs
+ etcdir=/etc/at
+
+ for dir in "$spooldir" "$jobdir" "$etcdir"; do
+ if [ ! -d "$dir" ]; then
+ mkdir -p "$dir"
+ chown atd:atd "$dir"
+ fi
+ done
+ chmod 1770 "$spooldir" "$jobdir"
+ ${if cfg.allowEveryone then ''chmod a+rwxt "$spooldir" "$jobdir" '' else ""}
+ if [ ! -f "$etcdir"/at.deny ]; then
+ touch "$etcdir"/at.deny
+ chown root:atd "$etcdir"/at.deny
+ chmod 640 "$etcdir"/at.deny
+ fi
+ if [ ! -f "$jobdir"/.SEQ ]; then
+ touch "$jobdir"/.SEQ
+ chown atd:atd "$jobdir"/.SEQ
+ chmod 600 "$jobdir"/.SEQ
+ fi
+ '';
+
+ exec = "atd";
+
+ daemonType = "fork";
+ };
+
+ };
+
+}
diff --git a/nixos/modules/services/scheduling/cron.nix b/nixos/modules/services/scheduling/cron.nix
new file mode 100644
index 0000000000000000000000000000000000000000..e14f03fb1e832cbf48a9b6a510d4e2717028fceb
--- /dev/null
+++ b/nixos/modules/services/scheduling/cron.nix
@@ -0,0 +1,111 @@
+{ config, pkgs, ... }:
+
+with pkgs.lib;
+
+let
+
+ inherit (config.services) jobsTags;
+
+ # Put all the system cronjobs together.
+ systemCronJobsFile = pkgs.writeText "system-crontab"
+ ''
+ SHELL=${pkgs.bash}/bin/bash
+ PATH=${config.system.path}/bin:${config.system.path}/sbin
+ MAILTO="${config.services.cron.mailto}"
+ NIX_CONF_DIR=/etc/nix
+ ${pkgs.lib.concatStrings (map (job: job + "\n") config.services.cron.systemCronJobs)}
+ '';
+
+ # Vixie cron requires build-time configuration for the sendmail path.
+ cronNixosPkg = pkgs.cron.override {
+ # The mail.nix nixos module, if there is any local mail system enabled,
+ # should have sendmail in this path.
+ sendmailPath = "/var/setuid-wrappers/sendmail";
+ };
+
+in
+
+{
+
+ ###### interface
+
+ options = {
+
+ services.cron = {
+
+ enable = mkOption {
+ default = true;
+ description = "Whether to enable the `vixie cron' daemon.";
+ };
+
+ mailto = mkOption {
+ default = "";
+ description = " The job output will be mailed to this email address. ";
+ };
+
+ systemCronJobs = mkOption {
+ default = [];
+ example = [
+ "* * * * * test ls -l / > /tmp/cronout 2>&1"
+ "* * * * * eelco echo Hello World > /home/eelco/cronout"
+ ];
+ description = ''
+ A list of Cron jobs to be appended to the system-wide
+ crontab. See the manual page for crontab for the expected
+ format. If you want to get the results mailed you must setuid
+ sendmail. See
security.setuidOwners
+
+ If neither /var/cron/cron.deny nor /var/cron/cron.allow exist only root
+ will is allowed to have its own crontab file. The /var/cron/cron.deny file
+ is created automatically for you. So every user can use a crontab.
+
+ Many nixos modules set systemCronJobs, so if you decide to disable vixie cron
+ and enable another cron daemon, you may want it to get its system crontab
+ based on systemCronJobs.
+ '';
+ };
+
+ };
+
+ };
+
+
+ ###### implementation
+
+ config = mkIf config.services.cron.enable {
+
+ environment.etc = singleton
+ # The system-wide crontab.
+ { source = systemCronJobsFile;
+ target = "crontab";
+ mode = "0600"; # Cron requires this.
+ };
+
+ security.setuidPrograms = [ "crontab" ];
+
+ environment.systemPackages = [ cronNixosPkg ];
+
+ jobs.cron =
+ { description = "Cron Daemon";
+
+ startOn = "startup";
+
+ path = [ cronNixosPkg ];
+
+ preStart =
+ ''
+ mkdir -m 710 -p /var/cron
+
+ # By default, allow all users to create a crontab. This
+ # is denoted by the existence of an empty cron.deny file.
+ if ! test -e /var/cron/cron.allow -o -e /var/cron/cron.deny; then
+ touch /var/cron/cron.deny
+ fi
+ '';
+
+ exec = "cron -n";
+ };
+
+ };
+
+}
diff --git a/nixos/modules/services/scheduling/fcron.nix b/nixos/modules/services/scheduling/fcron.nix
new file mode 100644
index 0000000000000000000000000000000000000000..95ff918eb6d797e9aff7d1e2ce2a7f4a46567cb3
--- /dev/null
+++ b/nixos/modules/services/scheduling/fcron.nix
@@ -0,0 +1,126 @@
+{ config, pkgs, ... }:
+
+with pkgs.lib;
+
+let
+
+ cfg = config.services.fcron;
+
+ queuelen = if cfg.queuelen == "" then "" else "-q ${toString cfg.queuelen}";
+
+ systemCronJobs =
+ ''
+ SHELL=${pkgs.bash}/bin/bash
+ PATH=${config.system.path}/bin:${config.system.path}/sbin
+ MAILTO="${config.services.cron.mailto}"
+ NIX_CONF_DIR=/etc/nix
+ ${pkgs.lib.concatStrings (map (job: job + "\n") config.services.cron.systemCronJobs)}
+ '';
+
+ allowdeny = target: users:
+ { source = pkgs.writeText "fcron.${target}" (concatStringsSep "\n" users);
+ target = "fcron.${target}";
+ mode = "600"; # fcron has some security issues.. So I guess this is most safe
+ };
+
+in
+
+{
+
+ ###### interface
+
+ options = {
+
+ services.fcron = {
+
+ enable = mkOption {
+ default = false;
+ description = "Whether to enable the `fcron' daemon.";
+ };
+
+ allow = mkOption {
+ default = [ "all" ];
+ description = ''
+ Users allowed to use fcrontab and fcrondyn (one name per line, "all" for everyone).
+ '';
+ };
+
+ deny = mkOption {
+ default = [];
+ description = "Users forbidden from using fcron.";
+ };
+
+ maxSerialJobs = mkOption {
+ default = 1;
+ description = "Maximum number of serial jobs which can run simultaneously.";
+ };
+
+ queuelen = mkOption {
+ default = "";
+ description = "Number of jobs the serial queue and the lavg queue can contain - empty to net set this number (-q)";
+ };
+
+ systab = mkOption {
+ default = "";
+ description = ''The "system" crontab contents.'';
+ };
+ };
+
+ };
+
+
+ ###### implementation
+
+ config = mkIf cfg.enable {
+
+ services.fcron.systab = systemCronJobs;
+
+ environment.etc =
+ [ (allowdeny "allow" (cfg.allow))
+ (allowdeny "deny" cfg.deny)
+ # see man 5 fcron.conf
+ { source = pkgs.writeText "fcon.conf" ''
+ fcrontabs = /var/spool/fcron
+ pidfile = /var/run/fcron.pid
+ fifofile = /var/run/fcron.fifo
+ fcronallow = /etc/fcron.allow
+ fcrondeny = /etc/fcron.deny
+ shell = /bin/sh
+ sendmail = /var/setuid-wrappers/sendmail
+ editor = /run/current-system/sw/bin/vi
+ '';
+ target = "fcron.conf";
+ mode = "0600"; # max allowed is 644
+ }
+ ];
+
+ environment.systemPackages = [ pkgs.fcron ];
+
+ security.setuidPrograms = [ "fcrontab" ];
+
+ jobs.fcron =
+ { description = "fcron daemon";
+
+ startOn = "startup";
+
+ after = [ "local-fs.target" ];
+
+ environment =
+ { PATH = "/run/current-system/sw/bin";
+ };
+
+ preStart =
+ ''
+ ${pkgs.coreutils}/bin/mkdir -m 0700 -p /var/spool/fcron
+ # load system crontab file
+ ${pkgs.fcron}/bin/fcrontab -u systab ${pkgs.writeText "systab" cfg.systab}
+ '';
+
+ daemonType = "fork";
+
+ exec = "${pkgs.fcron}/sbin/fcron -m ${toString cfg.maxSerialJobs} ${queuelen}";
+ };
+
+ };
+
+}
diff --git a/nixos/modules/services/search/elasticsearch.nix b/nixos/modules/services/search/elasticsearch.nix
new file mode 100644
index 0000000000000000000000000000000000000000..3c27c1400f9303bf5fa597879527b65a7c30616a
--- /dev/null
+++ b/nixos/modules/services/search/elasticsearch.nix
@@ -0,0 +1,115 @@
+{ config, pkgs, ... }:
+
+with pkgs.lib;
+
+let
+ cfg = config.services.elasticsearch;
+
+ es_home = "/var/lib/elasticsearch";
+
+ configFile = pkgs.writeText "elasticsearch.yml" ''
+ network.host: ${cfg.host}
+ network.port: ${cfg.port}
+ network.tcp.port: ${cfg.tcp_port}
+ cluster.name: ${cfg.cluster_name}
+ ${cfg.extraConf}
+ '';
+
+in {
+
+ ###### interface
+
+ options.services.elasticsearch = {
+ enable = mkOption {
+ description = "Whether to enable elasticsearch";
+ default = false;
+ type = types.uniq types.bool;
+ };
+
+ host = mkOption {
+ description = "Elasticsearch listen address";
+ default = "127.0.0.1";
+ types = type.uniq types.string;
+ };
+
+ port = mkOption {
+ description = "Elasticsearch port to listen for HTTP traffic";
+ default = "9200";
+ types = type.uniq types.string;
+ };
+
+ tcp_port = mkOption {
+ description = "Elasticsearch port for the node to node communication";
+ default = "9300";
+ types = type.uniq types.string;
+ };
+
+ cluster_name = mkOption {
+ description = "Elasticsearch name that identifies your cluster for auto-discovery";
+ default = "elasticsearch";
+ types = type.uniq types.string;
+ };
+
+ extraConf = mkOption {
+ description = "Extra configuration for elasticsearch";
+ default = "";
+ types = type.uniq types.string;
+ example = ''
+ node.name: "elasticsearch"
+ node.master: true
+ node.data: false
+ index.number_of_shards: 5
+ index.number_of_replicas: 1
+ '';
+ };
+
+ logging = mkOption {
+ description = "Elasticsearch logging configuration";
+ default = ''
+ rootLogger: INFO, console
+ logger:
+ action: INFO
+ com.amazonaws: WARN
+ appender:
+ console:
+ type: console
+ layout:
+ type: consolePattern
+ conversionPattern: "[%d{ISO8601}][%-5p][%-25c] %m%n"
+ '';
+ types = type.uniq types.string;
+ };
+ };
+
+ ###### implementation
+
+ config = mkIf cfg.enable {
+ environment.etc = [
+ { source = configFile;
+ target = "elasticsearch/elasticsearch.yml"; }
+ { source = pkgs.writeText "logging.yml" cfg.logging;
+ target = "elasticsearch/logging.yml"; }
+ ];
+
+ systemd.services.elasticsearch = mkIf cfg.enable {
+ description = "Elasticsearch daemon";
+ wantedBy = [ "multi-user.target" ];
+ after = [ "network-interfaces.target" ];
+ environment = { ES_HOME = es_home; };
+ serviceConfig = {
+ ExecStart = "${pkgs.elasticsearch}/bin/elasticsearch -f -Des.path.conf=/etc/elasticsearch";
+ User = "elasticsearch";
+ };
+ };
+
+ environment.systemPackages = [ pkgs.elasticsearch ];
+
+ users.extraUsers = singleton {
+ name = "elasticsearch";
+ uid = config.ids.uids.elasticsearch;
+ description = "Elasticsearch daemon user";
+ home = es_home;
+ createHome = true;
+ };
+ };
+}
diff --git a/nixos/modules/services/security/clamav.nix b/nixos/modules/services/security/clamav.nix
new file mode 100644
index 0000000000000000000000000000000000000000..5ccb4927fcb7b0e94bc4a2a5a49f0e6feaffdf8a
--- /dev/null
+++ b/nixos/modules/services/security/clamav.nix
@@ -0,0 +1,80 @@
+{ config, pkgs, ... }:
+with pkgs.lib;
+let
+ clamavUser = "clamav";
+ stateDir = "/var/lib/clamav";
+ clamavGroup = clamavUser;
+ cfg = config.services.clamav;
+in
+{
+ ###### interface
+
+ options = {
+
+ services.clamav = {
+ updater = {
+ enable = mkOption {
+ default = false;
+ description = ''
+ Whether to enable automatic ClamAV virus definitions database updates.
+ '';
+ };
+
+ frequency = mkOption {
+ default = 12;
+ description = ''
+ Number of database checks per day.
+ '';
+ };
+
+ config = mkOption {
+ default = "";
+ description = ''
+ Extra configuration for freshclam. Contents will be added verbatim to the
+ configuration file.
+ '';
+ };
+ };
+ };
+ };
+
+ ###### implementation
+
+ config = mkIf cfg.updater.enable {
+ environment.systemPackages = [ pkgs.clamav ];
+ users.extraUsers = singleton
+ { name = clamavUser;
+ uid = config.ids.uids.clamav;
+ description = "ClamAV daemon user";
+ home = stateDir;
+ };
+
+ users.extraGroups = singleton
+ { name = clamavGroup;
+ gid = config.ids.gids.clamav;
+ };
+
+ services.clamav.updater.config = ''
+ DatabaseDirectory ${stateDir}
+ Foreground yes
+ Checks ${toString cfg.updater.frequency}
+ DatabaseMirror database.clamav.net
+ '';
+
+ jobs = {
+ clamav_updater = {
+ name = "clamav-updater";
+ startOn = "started network-interfaces";
+ stopOn = "stopping network-interfaces";
+
+ preStart = ''
+ mkdir -m 0755 -p ${stateDir}
+ chown ${clamavUser}:${clamavGroup} ${stateDir}
+ '';
+ exec = "${pkgs.clamav}/bin/freshclam --config-file=${pkgs.writeText "freshclam.conf" cfg.updater.config}";
+ };
+ };
+
+ };
+
+}
\ No newline at end of file
diff --git a/nixos/modules/services/security/fail2ban.nix b/nixos/modules/services/security/fail2ban.nix
new file mode 100644
index 0000000000000000000000000000000000000000..395a5df8af0739a6bcf7b414665463fe3667ef8c
--- /dev/null
+++ b/nixos/modules/services/security/fail2ban.nix
@@ -0,0 +1,148 @@
+{ config, pkgs, ... }:
+
+with pkgs.lib;
+
+let
+
+ cfg = config.services.fail2ban;
+
+ fail2banConf = pkgs.writeText "fail2ban.conf" cfg.daemonConfig;
+
+ jailConf = pkgs.writeText "jail.conf"
+ (concatStringsSep "\n" (attrValues (flip mapAttrs cfg.jails (name: def:
+ optionalString (def != "")
+ ''
+ [${name}]
+ ${def}
+ ''))));
+
+in
+
+{
+
+ ###### interface
+
+ options = {
+
+ services.fail2ban = {
+
+ daemonConfig = mkOption {
+ default =
+ ''
+ [Definition]
+ loglevel = 3
+ logtarget = SYSLOG
+ socket = /run/fail2ban/fail2ban.sock
+ pidfile = /run/fail2ban/fail2ban.pid
+ '';
+ type = types.string;
+ description =
+ ''
+ The contents of Fail2ban's main configuration file. It's
+ generally not necessary to change it.
+ '';
+ };
+
+ jails = mkOption {
+ default = { };
+ example =
+ { "apache-nohome-iptables" =
+ ''
+ # Block an IP address if it accesses a non-existent
+ # home directory more than 5 times in 10 minutes,
+ # since that indicates that it's scanning.
+ filter = apache-nohome
+ action = iptables-multiport[name=HTTP, port="http,https"]
+ logpath = /var/log/httpd/error_log*
+ findtime = 600
+ bantime = 600
+ maxretry = 5
+ '';
+ };
+ type = types.attrsOf types.string;
+ description =
+ ''
+ The configuration of each Fail2ban “jail”. A jail
+ consists of an action (such as blocking a port using
+ iptables) that is triggered when a
+ filter applied to a log file triggers more than a certain
+ number of times in a certain time period. Actions are
+ defined in /etc/fail2ban/action.d,
+ while filters are defined in
+ /etc/fail2ban/filter.d.
+ '';
+ };
+
+ };
+
+ };
+
+
+ ###### implementation
+
+ config = {
+
+ environment.systemPackages = [ pkgs.fail2ban ];
+
+ environment.etc."fail2ban/fail2ban.conf".source = fail2banConf;
+ environment.etc."fail2ban/jail.conf".source = jailConf;
+ environment.etc."fail2ban/action.d".source = "${pkgs.fail2ban}/etc/fail2ban/action.d/*.conf";
+ environment.etc."fail2ban/filter.d".source = "${pkgs.fail2ban}/etc/fail2ban/filter.d/*.conf";
+
+ systemd.services.fail2ban =
+ { description = "Fail2ban intrusion prevention system";
+
+ wantedBy = [ "multi-user.target" ];
+ after = [ "network.target" ];
+
+ restartTriggers = [ fail2banConf jailConf ];
+ path = [ pkgs.fail2ban pkgs.iptables ];
+
+ preStart =
+ ''
+ mkdir -p /run/fail2ban -m 0755
+ '';
+
+ serviceConfig =
+ { ExecStart = "${pkgs.fail2ban}/bin/fail2ban-server -f";
+ ReadOnlyDirectories = "/";
+ ReadWriteDirectories = "/run/fail2ban /var/tmp";
+ CapabilityBoundingSet = "CAP_DAC_READ_SEARCH CAP_NET_ADMIN CAP_NET_RAW";
+ };
+
+ postStart =
+ ''
+ # Wait for the server to start listening.
+ for ((n = 0; n < 20; n++)); do
+ if fail2ban-client ping; then break; fi
+ sleep 0.5
+ done
+
+ # Reload its configuration.
+ fail2ban-client reload
+ '';
+ };
+
+ # Add some reasonable default jails. The special "DEFAULT" jail
+ # sets default values for all other jails.
+ services.fail2ban.jails.DEFAULT =
+ ''
+ ignoreip = 127.0.0.1/8
+ bantime = 600
+ findtime = 600
+ maxretry = 3
+ backend = auto
+ '';
+
+ # Block SSH if there are too many failing connection attempts.
+ services.fail2ban.jails.ssh-iptables =
+ ''
+ filter = sshd
+ action = iptables[name=SSH, port=ssh, protocol=tcp]
+ logpath = /var/log/warn
+ maxretry = 5
+ '';
+
+ };
+
+}
diff --git a/nixos/modules/services/security/fprot.nix b/nixos/modules/services/security/fprot.nix
new file mode 100644
index 0000000000000000000000000000000000000000..9f1fc4ed6d8b42fe7b86cb5487e6bb598029bbe1
--- /dev/null
+++ b/nixos/modules/services/security/fprot.nix
@@ -0,0 +1,88 @@
+{ config, pkgs, ... }:
+with pkgs.lib;
+let
+ fprotUser = "fprot";
+ stateDir = "/var/lib/fprot";
+ fprotGroup = fprotUser;
+ cfg = config.services.fprot;
+in {
+ options = {
+
+ services.fprot = {
+ updater = {
+ enable = mkOption {
+ default = false;
+ description = ''
+ Whether to enable automatic F-Prot virus definitions database updates.
+ '';
+ };
+
+ productData = mkOption {
+ default = "${pkgs.fprot}/opt/f-prot/product.data";
+ description = ''
+ product.data file. Defaults to the one supplied with installation package.
+ '';
+ };
+
+ frequency = mkOption {
+ default = 30;
+ description = ''
+ Update virus definitions every X minutes.
+ '';
+ };
+
+ licenseKeyfile = mkOption {
+ default = "${pkgs.fprot}/opt/f-prot/license.key";
+ description = ''
+ License keyfile. Defaults to the one supplied with installation package.
+ '';
+ };
+
+ };
+ };
+ };
+
+ ###### implementation
+
+ config = mkIf cfg.updater.enable {
+ environment.systemPackages = [ pkgs.fprot ];
+ environment.etc = singleton {
+ source = "${pkgs.fprot}/opt/f-prot/f-prot.conf";
+ target = "f-prot.conf";
+ };
+
+ users.extraUsers = singleton
+ { name = fprotUser;
+ uid = config.ids.uids.fprot;
+ description = "F-Prot daemon user";
+ home = stateDir;
+ };
+
+ users.extraGroups = singleton
+ { name = fprotGroup;
+ gid = config.ids.gids.fprot;
+ };
+
+ services.cron.systemCronJobs = [ "*/${toString cfg.updater.frequency} * * * * root start fprot-updater" ];
+
+ jobs = {
+ fprot_updater = {
+ name = "fprot-updater";
+ task = true;
+
+ # have to copy fpupdate executable because it insists on storing the virus database in the same dir
+ preStart = ''
+ mkdir -m 0755 -p ${stateDir}
+ chown ${fprotUser}:${fprotGroup} ${stateDir}
+ cp ${pkgs.fprot}/opt/f-prot/fpupdate ${stateDir}
+ ln -sf ${cfg.updater.productData} ${stateDir}/product.data
+ '';
+ #setuid = fprotUser;
+ #setgid = fprotGroup;
+ exec = "/var/lib/fprot/fpupdate --keyfile ${cfg.updater.licenseKeyfile}";
+ };
+ };
+
+ };
+
+}
\ No newline at end of file
diff --git a/nixos/modules/services/security/frandom.nix b/nixos/modules/services/security/frandom.nix
new file mode 100644
index 0000000000000000000000000000000000000000..9aae7b33a4304b406f223f99df9af99c1a49117f
--- /dev/null
+++ b/nixos/modules/services/security/frandom.nix
@@ -0,0 +1,31 @@
+{pkgs, config, ...}:
+
+let kernel = config.boot.kernelPackages;
+in
+
+{
+
+ ###### interface
+
+ options = {
+
+ services.frandom.enable = pkgs.lib.mkOption {
+ default = false;
+ type = pkgs.lib.types.bool;
+ description = ''
+ enable the /dev/frandom device (a very fast random number generator)
+ '';
+ };
+
+ };
+
+
+ ###### implementation
+
+ config = pkgs.lib.mkIf config.services.frandom.enable {
+ boot.kernelModules = [ "frandom" ];
+ boot.extraModulePackages = [ kernel.frandom ];
+ services.udev.packages = [ kernel.frandom ];
+ };
+
+}
diff --git a/nixos/modules/services/security/tor.nix b/nixos/modules/services/security/tor.nix
new file mode 100644
index 0000000000000000000000000000000000000000..2dafb4595c639fee646352cc0ff5359cd093d264
--- /dev/null
+++ b/nixos/modules/services/security/tor.nix
@@ -0,0 +1,321 @@
+{ config, pkgs, ... }:
+
+with pkgs.lib;
+
+let
+
+ inherit (pkgs) tor privoxy;
+
+ stateDir = "/var/lib/tor";
+ privoxyDir = stateDir+"/privoxy";
+
+ cfg = config.services.tor;
+
+ torUser = "tor";
+
+ opt = name: value: if value != "" then "${name} ${value}" else "";
+ optint = name: value: if value != 0 then "${name} ${toString value}" else "";
+
+in
+
+{
+
+ ###### interface
+
+ options = {
+
+ services.tor = {
+
+ config = mkOption {
+ default = "";
+ description = ''
+ Extra configuration. Contents will be added verbatim to the
+ configuration file.
+ '';
+ };
+
+ client = {
+
+ enable = mkOption {
+ default = false;
+ description = ''
+ Whether to enable Tor daemon to route application connections.
+ You might want to disable this if you plan running a dedicated Tor relay.
+ '';
+ };
+
+ socksListenAddress = mkOption {
+ default = "127.0.0.1:9050";
+ example = "192.168.0.1:9100";
+ description = ''
+ Bind to this address to listen for connections from Socks-speaking
+ applications.
+ '';
+ };
+
+ socksListenAddressFaster = mkOption {
+ default = "127.0.0.1:9063";
+ description = ''
+ Same as socksListenAddress but uses weaker circuit isolation to provide
+ performance suitable for a web browser.
+ '';
+ };
+
+ socksPolicy = mkOption {
+ default = "";
+ example = "accept 192.168.0.0/16, reject *";
+ description = ''
+ Entry policies to allow/deny SOCKS requests based on IP address.
+ First entry that matches wins. If no SocksPolicy is set, we accept
+ all (and only) requests from SocksListenAddress.
+ '';
+ };
+
+ privoxy = {
+
+ enable = mkOption {
+ default = true;
+ description = ''
+ Whether to enable a special instance of privoxy dedicated to Tor.
+ To have anonymity, protocols need to be scrubbed of identifying
+ information.
+ Most people using Tor want to anonymize their web traffic, so by
+ default we enable an special instance of privoxy specifically for
+ Tor.
+ However, if you are only going to use Tor only for other kinds of
+ traffic then you can disable this option.
+ '';
+ };
+
+ listenAddress = mkOption {
+ default = "127.0.0.1:8118";
+ description = ''
+ Address that Tor's instance of privoxy is listening to.
+ *This does not configure the standard NixOS instance of privoxy.*
+ This is for Tor connections only!
+ See services.privoxy.listenAddress to configure the standard NixOS
+ instace of privoxy.
+ '';
+ };
+
+ config = mkOption {
+ default = "";
+ description = ''
+ Extra configuration for Tor's instance of privoxy. Contents will be
+ added verbatim to the configuration file.
+ *This does not configure the standard NixOS instance of privoxy.*
+ This is for Tor connections only!
+ See services.privoxy.extraConfig to configure the standard NixOS
+ instace of privoxy.
+ '';
+ };
+
+ };
+
+ };
+
+ relay = {
+
+ enable = mkOption {
+ default = false;
+ description = ''
+ Whether to enable relaying TOR traffic for others.
+
+ See https://www.torproject.org/docs/tor-doc-relay for details.
+ '';
+ };
+
+ isBridge = mkOption {
+ default = false;
+ description = ''
+ Bridge relays (or "bridges" ) are Tor relays that aren't listed in the
+ main directory. Since there is no complete public list of them, even if an
+ ISP is filtering connections to all the known Tor relays, they probably
+ won't be able to block all the bridges.
+
+ A bridge relay can't be an exit relay.
+
+ You need to set relay.enable to true for this option to take effect.
+
+ The bridge is set up with an obfuscated transport proxy.
+
+ See https://www.torproject.org/bridges.html.en for more info.
+ '';
+ };
+
+ isExit = mkOption {
+ default = false;
+ description = ''
+ An exit relay allows Tor users to access regular Internet services.
+
+ Unlike running a non-exit relay, running an exit relay may expose
+ you to abuse complaints. See https://www.torproject.org/faq.html.en#ExitPolicies for more info.
+
+ You can specify which services Tor users may access via your exit relay using exitPolicy option.
+ '';
+ };
+
+ nickname = mkOption {
+ default = "anonymous";
+ description = ''
+ A unique handle for your TOR relay.
+ '';
+ };
+
+ bandwidthRate = mkOption {
+ default = 0;
+ example = 100;
+ description = ''
+ Specify this to limit the bandwidth usage of relayed (server)
+ traffic. Your own traffic is still unthrottled. Units: bytes/second.
+ '';
+ };
+
+ bandwidthBurst = mkOption {
+ default = cfg.relay.bandwidthRate;
+ example = 200;
+ description = ''
+ Specify this to allow bursts of the bandwidth usage of relayed (server)
+ traffic. The average usage will still be as specified in relayBandwidthRate.
+ Your own traffic is still unthrottled. Units: bytes/second.
+ '';
+ };
+
+ port = mkOption {
+ default = 9001;
+ description = ''
+ What port to advertise for Tor connections.
+ '';
+ };
+
+ listenAddress = mkOption {
+ default = "";
+ example = "0.0.0.0:9090";
+ description = ''
+ Set this if you need to listen on a port other than the one advertised
+ in relayPort (e.g. to advertise 443 but bind to 9090). You'll need to do
+ ipchains or other port forwsarding yourself to make this work.
+ '';
+ };
+
+ exitPolicy = mkOption {
+ default = "";
+ example = "accept *:6660-6667,reject *:*";
+ description = ''
+ A comma-separated list of exit policies. They're considered first
+ to last, and the first match wins. If you want to _replace_
+ the default exit policy, end this with either a reject *:* or an
+ accept *:*. Otherwise, you're _augmenting_ (prepending to) the
+ default exit policy. Leave commented to just use the default, which is
+ available in the man page or at https://www.torproject.org/documentation.html
+
+ Look at https://www.torproject.org/faq-abuse.html#TypicalAbuses
+ for issues you might encounter if you use the default exit policy.
+
+ If certain IPs and ports are blocked externally, e.g. by your firewall,
+ you should update your exit policy to reflect this -- otherwise Tor
+ users will be told that those destinations are down.
+ '';
+ };
+
+ };
+
+ };
+
+ };
+
+
+ ###### implementation
+
+ config = mkIf (cfg.client.enable || cfg.relay.enable) (
+ mkAssert (cfg.relay.enable -> !(cfg.relay.isBridge && cfg.relay.isExit)) "
+ Can't be both an exit and a bridge relay at the same time
+ " {
+
+ users.extraUsers = singleton
+ { name = torUser;
+ uid = config.ids.uids.tor;
+ description = "Tor daemon user";
+ home = stateDir;
+ };
+
+ jobs = {
+ tor = { name = "tor";
+
+ startOn = "started network-interfaces";
+ stopOn = "stopping network-interfaces";
+
+ preStart = ''
+ mkdir -m 0755 -p ${stateDir}
+ chown ${torUser} ${stateDir}
+ '';
+ exec = "${tor}/bin/tor -f ${pkgs.writeText "torrc" cfg.config}";
+ }; }
+ // optionalAttrs (cfg.client.privoxy.enable && cfg.client.enable) {
+ torPrivoxy = { name = "tor-privoxy";
+
+ startOn = "started network-interfaces";
+ stopOn = "stopping network-interfaces";
+
+ preStart = ''
+ mkdir -m 0755 -p ${privoxyDir}
+ chown ${torUser} ${privoxyDir}
+ '';
+ exec = "${privoxy}/sbin/privoxy --no-daemon --user ${torUser} ${pkgs.writeText "torPrivoxy.conf" cfg.client.privoxy.config}";
+ }; };
+
+ services.tor.config = ''
+ DataDirectory ${stateDir}
+ User ${torUser}
+ ''
+ + optionalString cfg.client.enable ''
+ SOCKSPort ${cfg.client.socksListenAddress} IsolateDestAddr
+ SOCKSPort ${cfg.client.socksListenAddressFaster}
+ ${opt "SocksPolicy" cfg.client.socksPolicy}
+ ''
+ + optionalString cfg.relay.enable ''
+ ORPort ${toString cfg.relay.port}
+ ${opt "ORListenAddress" cfg.relay.listenAddress }
+ ${opt "Nickname" cfg.relay.nickname}
+ ${optint "RelayBandwidthRate" cfg.relay.bandwidthRate}
+ ${optint "RelayBandwidthBurst" cfg.relay.bandwidthBurst}
+ ${if cfg.relay.isExit then opt "ExitPolicy" cfg.relay.exitPolicy else "ExitPolicy reject *:*"}
+ ${if cfg.relay.isBridge then ''
+ BridgeRelay 1
+ ServerTransportPlugin obfs2,obfs3 exec ${pkgs.pythonPackages.obfsproxy}/bin/obfsproxy managed
+ '' else ""}
+ '';
+
+ services.tor.client.privoxy.config = ''
+ # Generally, this file goes in /etc/privoxy/config
+ #
+ # Tor listens as a SOCKS4a proxy here:
+ forward-socks4a / ${cfg.client.socksListenAddressFaster} .
+ confdir ${privoxy}/etc
+ logdir ${privoxyDir}
+ # actionsfile standard # Internal purpose, recommended
+ actionsfile default.action # Main actions file
+ actionsfile user.action # User customizations
+ filterfile default.filter
+
+ # Don't log interesting things, only startup messages, warnings and errors
+ logfile logfile
+ #jarfile jarfile
+ #debug 0 # show each GET/POST/CONNECT request
+ debug 4096 # Startup banner and warnings
+ debug 8192 # Errors - *we highly recommended enabling this*
+
+ user-manual ${privoxy}/doc/privoxy/user-manual
+ listen-address ${cfg.client.privoxy.listenAddress}
+ toggle 1
+ enable-remote-toggle 0
+ enable-edit-actions 0
+ enable-remote-http-toggle 0
+ buffer-limit 4096
+
+ # Extra config goes here
+ '';
+
+ });
+
+}
diff --git a/nixos/modules/services/security/torify.nix b/nixos/modules/services/security/torify.nix
new file mode 100644
index 0000000000000000000000000000000000000000..1c158906a911cc88e843d7d37ad9a1e07c7e7f12
--- /dev/null
+++ b/nixos/modules/services/security/torify.nix
@@ -0,0 +1,69 @@
+{ config, pkgs, ... }:
+with pkgs.lib;
+let
+
+ cfg = config.services.tor;
+
+ torify = pkgs.writeTextFile {
+ name = "torify";
+ text = ''
+ #!${pkgs.stdenv.shell}
+ TSOCKS_CONF_FILE=${pkgs.writeText "tsocks.conf" cfg.torify.config} LD_PRELOAD="${pkgs.tsocks}/lib/libtsocks.so $LD_PRELOAD" "$@"
+ '';
+ executable = true;
+ destination = "/bin/torify";
+ };
+
+in
+
+{
+
+ ###### interface
+
+ options = {
+
+ services.tor.torify = {
+
+ enable = mkOption {
+ default = cfg.client.enable;
+ description = ''
+ Whether to build torify scipt to relay application traffic via TOR.
+ '';
+ };
+
+ server = mkOption {
+ default = "localhost:9050";
+ example = "192.168.0.20";
+ description = ''
+ IP address of TOR client to use.
+ '';
+ };
+
+ config = mkOption {
+ default = "";
+ description = ''
+ Extra configuration. Contents will be added verbatim to TSocks
+ configuration file.
+ '';
+ };
+
+ };
+
+ };
+
+ ###### implementation
+
+ config = mkIf cfg.torify.enable {
+
+ environment.systemPackages = [ torify ]; # expose it to the users
+
+ services.tor.torify.config = ''
+ server = ${toString(head (splitString ":" cfg.torify.server))}
+ server_port = ${toString(tail (splitString ":" cfg.torify.server))}
+
+ local = 127.0.0.0/255.128.0.0
+ local = 127.128.0.0/255.192.0.0
+ '';
+ };
+
+}
diff --git a/nixos/modules/services/security/torsocks.nix b/nixos/modules/services/security/torsocks.nix
new file mode 100644
index 0000000000000000000000000000000000000000..d6974282a6b5cc2cc9bc2031780ae7f78a3c64fa
--- /dev/null
+++ b/nixos/modules/services/security/torsocks.nix
@@ -0,0 +1,85 @@
+{ config, pkgs, ... }:
+with pkgs.lib;
+let
+
+ cfg = config.services.tor;
+
+ makeConfig = server: ''
+ server = ${toString(head (splitString ":" server))}
+ server_port = ${toString(tail (splitString ":" server))}
+
+ local = 127.0.0.0/255.128.0.0
+ local = 127.128.0.0/255.192.0.0
+ local = 169.254.0.0/255.255.0.0
+ local = 172.16.0.0/255.240.0.0
+ local = 192.168.0.0/255.255.0.0
+
+ ${cfg.torsocks.config}
+ '';
+ makeTorsocks = name: server: pkgs.writeTextFile {
+ name = name;
+ text = ''
+ #!${pkgs.stdenv.shell}
+ TORSOCKS_CONF_FILE=${pkgs.writeText "torsocks.conf" (makeConfig server)} LD_PRELOAD="${pkgs.torsocks}/lib/torsocks/libtorsocks.so $LD_PRELOAD" "$@"
+ '';
+ executable = true;
+ destination = "/bin/${name}";
+ };
+
+ torsocks = makeTorsocks "torsocks" cfg.torsocks.server;
+ torsocksFaster = makeTorsocks "torsocks-faster" cfg.torsocks.serverFaster;
+in
+
+{
+
+ ###### interface
+
+ options = {
+
+ services.tor.torsocks = {
+
+ enable = mkOption {
+ default = cfg.client.enable;
+ description = ''
+ Whether to build torsocks scipt to relay application traffic via TOR.
+ '';
+ };
+
+ server = mkOption {
+ default = cfg.client.socksListenAddress;
+ example = "192.168.0.20:9050";
+ description = ''
+ IP address of TOR client to use.
+ '';
+ };
+
+ serverFaster = mkOption {
+ default = cfg.client.socksListenAddressFaster;
+ example = "192.168.0.20:9063";
+ description = ''
+ IP address of TOR client to use for applications like web browsers which
+ need less circuit isolation to achive satisfactory performance.
+ '';
+ };
+
+ config = mkOption {
+ default = "";
+ description = ''
+ Extra configuration. Contents will be added verbatim to torsocks
+ configuration file.
+ '';
+ };
+
+ };
+
+ };
+
+ ###### implementation
+
+ config = mkIf cfg.torsocks.enable {
+
+ environment.systemPackages = [ torsocks torsocksFaster ]; # expose it to the users
+
+ };
+
+}
diff --git a/nixos/modules/services/system/dbus.nix b/nixos/modules/services/system/dbus.nix
new file mode 100644
index 0000000000000000000000000000000000000000..eab876be76d397d8ebe88b39d8c5dea8f1bd9f17
--- /dev/null
+++ b/nixos/modules/services/system/dbus.nix
@@ -0,0 +1,194 @@
+# D-Bus configuration and system bus daemon.
+
+{ config, pkgs, ... }:
+
+with pkgs.lib;
+
+let
+
+ cfg = config.services.dbus;
+
+ homeDir = "/var/run/dbus";
+
+ configDir = pkgs.stdenv.mkDerivation {
+ name = "dbus-conf";
+ preferLocalBuild = true;
+ buildCommand = ''
+ ensureDir $out
+
+ cp -v ${pkgs.dbus_daemon}/etc/dbus-1/system.conf $out/system.conf
+
+ # !!! Hm, these `sed' calls are rather error-prone...
+
+ # Tell the daemon where the setuid wrapper around
+ # dbus-daemon-launch-helper lives.
+ sed -i $out/system.conf \
+ -e 's|.*/libexec/dbus-daemon-launch-helper|${config.security.wrapperDir}/dbus-daemon-launch-helper|'
+
+ # Add the system-services and system.d directories to the system
+ # bus search path.
+ sed -i $out/system.conf \
+ -e 's||${systemServiceDirs}|' \
+ -e 's|system.d|${systemIncludeDirs}|'
+
+ cp ${pkgs.dbus_daemon}/etc/dbus-1/session.conf $out/session.conf
+
+ # Add the services and session.d directories to the session bus
+ # search path.
+ sed -i $out/session.conf \
+ -e 's||${sessionServiceDirs}&|' \
+ -e 's|session.d|${sessionIncludeDirs}|'
+ ''; # */
+ };
+
+ systemServiceDirs = concatMapStrings
+ (d: "${d}/share/dbus-1/system-services ")
+ cfg.packages;
+
+ systemIncludeDirs = concatMapStrings
+ (d: "${d}/etc/dbus-1/system.d ")
+ cfg.packages;
+
+ sessionServiceDirs = concatMapStrings
+ (d: "${d}/share/dbus-1/services ")
+ cfg.packages;
+
+ sessionIncludeDirs = concatMapStrings
+ (d: "${d}/etc/dbus-1/session.d ")
+ cfg.packages;
+
+in
+
+{
+
+ ###### interface
+
+ options = {
+
+ services.dbus = {
+
+ enable = mkOption {
+ default = true;
+ description = ''
+ Whether to start the D-Bus message bus daemon, which is
+ required by many other system services and applications.
+ '';
+ merge = pkgs.lib.mergeEnableOption;
+ };
+
+ packages = mkOption {
+ default = [];
+ description = ''
+ Packages whose D-Bus configuration files should be included in
+ the configuration of the D-Bus system-wide message bus.
+ Specifically, every file in
+ pkg/etc/dbus-1/system.d
+ is included.
+ '';
+ };
+
+ };
+
+ };
+
+
+ ###### implementation
+
+ config = mkIf cfg.enable {
+
+ environment.systemPackages = [ pkgs.dbus_daemon pkgs.dbus_tools ];
+
+ environment.etc = singleton
+ { source = configDir;
+ target = "dbus-1";
+ };
+
+ users.extraUsers.messagebus = {
+ uid = config.ids.uids.messagebus;
+ description = "D-Bus system message bus daemon user";
+ home = homeDir;
+ group = "messagebus";
+ };
+
+ users.extraGroups.messagebus.gid = config.ids.gids.messagebus;
+
+ # FIXME: these are copied verbatim from the dbus source tree. We
+ # should install and use the originals.
+ systemd.units."dbus.socket".text =
+ ''
+ [Unit]
+ Description=D-Bus System Message Bus Socket
+
+ [Socket]
+ ListenStream=/var/run/dbus/system_bus_socket
+ '';
+
+ systemd.units."dbus.service".text =
+ ''
+ [Unit]
+ Description=D-Bus System Message Bus
+ Requires=dbus.socket
+
+ [Service]
+ ExecStartPre=${pkgs.dbus_tools}/bin/dbus-uuidgen --ensure
+ ExecStartPre=-${pkgs.coreutils}/bin/rm -f /var/run/dbus/pid
+ ExecStart=${pkgs.dbus_daemon}/bin/dbus-daemon --system --address=systemd: --nofork --systemd-activation
+ ExecReload=${pkgs.dbus_tools}/bin/dbus-send --print-reply --system --type=method_call --dest=org.freedesktop.DBus / org.freedesktop.DBus.ReloadConfig
+ OOMScoreAdjust=-900
+ '';
+
+ /*
+ jobs.dbus =
+ { startOn = "started udev and started syslogd";
+
+ restartIfChanged = false;
+
+ path = [ pkgs.dbus_daemon pkgs.dbus_tools ];
+
+ preStart =
+ ''
+ mkdir -m 0755 -p ${homeDir}
+ chown messagebus ${homeDir}
+
+ mkdir -m 0755 -p /var/lib/dbus
+ dbus-uuidgen --ensure
+
+ rm -f ${homeDir}/pid
+ '';
+
+ daemonType = "fork";
+
+ exec = "dbus-daemon --system";
+
+ postStop =
+ ''
+ # !!! Hack: doesn't belong here.
+ pid=$(cat /var/run/ConsoleKit/pid || true)
+ if test -n "$pid"; then
+ kill $pid || true
+ rm -f /var/run/ConsoleKit/pid
+ fi
+ '';
+ };
+ */
+
+ security.setuidOwners = singleton
+ { program = "dbus-daemon-launch-helper";
+ source = "${pkgs.dbus_daemon}/libexec/dbus-daemon-launch-helper";
+ owner = "root";
+ group = "messagebus";
+ setuid = true;
+ setgid = false;
+ permissions = "u+rx,g+rx,o-rx";
+ };
+
+ services.dbus.packages =
+ [ "/nix/var/nix/profiles/default"
+ config.system.path
+ ];
+
+ environment.pathsToLink = [ "/etc/dbus-1" "/share/dbus-1" ];
+
+ };
+
+}
diff --git a/nixos/modules/services/system/kerberos.nix b/nixos/modules/services/system/kerberos.nix
new file mode 100644
index 0000000000000000000000000000000000000000..8fb5debd20e481d2dbab5771d33ef1cbd0e5ff2e
--- /dev/null
+++ b/nixos/modules/services/system/kerberos.nix
@@ -0,0 +1,71 @@
+{pkgs, config, ...}:
+
+let
+
+ inherit (pkgs.lib) mkOption mkIf singleton;
+
+ inherit (pkgs) heimdal;
+
+ stateDir = "/var/heimdal";
+in
+
+{
+
+ ###### interface
+
+ options = {
+
+ services.kerberos_server = {
+
+ enable = mkOption {
+ default = false;
+ description = ''
+ Enable the kerberos authentification server.
+ '';
+ };
+
+ };
+
+ };
+
+
+ ###### implementation
+
+ config = mkIf config.services.kerberos_server.enable {
+
+ environment.systemPackages = [ heimdal ];
+
+ services.xinetd.enable = true;
+ services.xinetd.services = pkgs.lib.singleton
+ { name = "kerberos-adm";
+ flags = "REUSE NAMEINARGS";
+ protocol = "tcp";
+ user = "root";
+ server = "${pkgs.tcp_wrappers}/sbin/tcpd";
+ serverArgs = "${pkgs.heimdal}/sbin/kadmind";
+ };
+
+ jobs.kdc =
+ { description = "Kerberos Domain Controller daemon";
+
+ startOn = "ip-up";
+
+ preStart =
+ ''
+ mkdir -m 0755 -p ${stateDir}
+ '';
+
+ exec = "${heimdal}/sbin/kdc";
+
+ };
+
+ jobs.kpasswdd =
+ { description = "Kerberos Domain Controller daemon";
+
+ startOn = "ip-up";
+
+ exec = "${heimdal}/sbin/kpasswdd";
+ };
+ };
+
+}
diff --git a/nixos/modules/services/system/nscd.conf b/nixos/modules/services/system/nscd.conf
new file mode 100644
index 0000000000000000000000000000000000000000..6d0dcacf97787c8d2813df0f5e04d52801e2bf77
--- /dev/null
+++ b/nixos/modules/services/system/nscd.conf
@@ -0,0 +1,28 @@
+server-user nscd
+threads 1
+paranoia no
+debug-level 0
+
+enable-cache passwd yes
+positive-time-to-live passwd 600
+negative-time-to-live passwd 20
+suggested-size passwd 211
+check-files passwd yes
+persistent passwd no
+shared passwd yes
+
+enable-cache group yes
+positive-time-to-live group 3600
+negative-time-to-live group 60
+suggested-size group 211
+check-files group yes
+persistent group no
+shared group yes
+
+enable-cache hosts yes
+positive-time-to-live hosts 600
+negative-time-to-live hosts 5
+suggested-size hosts 211
+check-files hosts yes
+persistent hosts no
+shared hosts yes
diff --git a/nixos/modules/services/system/nscd.nix b/nixos/modules/services/system/nscd.nix
new file mode 100644
index 0000000000000000000000000000000000000000..e8534b12043553a9c86953ff6287689b837882f4
--- /dev/null
+++ b/nixos/modules/services/system/nscd.nix
@@ -0,0 +1,71 @@
+{pkgs, config, ...}:
+
+with pkgs.lib;
+
+let
+
+ nssModulesPath = config.system.nssModules.path;
+
+ inherit (pkgs.lib) singleton;
+
+in
+
+{
+
+ ###### interface
+
+ options = {
+
+ services.nscd = {
+
+ enable = mkOption {
+ default = true;
+ description = "Whether to enable the Name Service Cache Daemon.";
+ };
+
+ };
+
+ };
+
+
+ ###### implementation
+
+ config = mkIf config.services.nscd.enable {
+
+ users.extraUsers = singleton
+ { name = "nscd";
+ uid = config.ids.uids.nscd;
+ description = "Name service cache daemon user";
+ };
+
+ systemd.services.nscd =
+ { description = "Name Service Cache Daemon";
+
+ wantedBy = [ "nss-lookup.target" "nss-user-lookup.target" ];
+
+ environment = { LD_LIBRARY_PATH = nssModulesPath; };
+
+ preStart =
+ ''
+ mkdir -m 0755 -p /run/nscd
+ rm -f /run/nscd/nscd.pid
+ mkdir -m 0755 -p /var/db/nscd
+ '';
+
+ restartTriggers = [ config.environment.etc.hosts.source ];
+
+ serviceConfig =
+ { ExecStart = "@${pkgs.glibc}/sbin/nscd nscd -f ${./nscd.conf}";
+ Type = "forking";
+ PIDFile = "/run/nscd/nscd.pid";
+ Restart = "always";
+ ExecReload =
+ [ "${pkgs.glibc}/sbin/nscd --invalidate passwd"
+ "${pkgs.glibc}/sbin/nscd --invalidate group"
+ "${pkgs.glibc}/sbin/nscd --invalidate hosts"
+ ];
+ };
+ };
+
+ };
+}
diff --git a/nixos/modules/services/system/uptimed.nix b/nixos/modules/services/system/uptimed.nix
new file mode 100644
index 0000000000000000000000000000000000000000..61eecd5c9ba87504d779655c405faf0df39baf81
--- /dev/null
+++ b/nixos/modules/services/system/uptimed.nix
@@ -0,0 +1,68 @@
+{pkgs, config, ...}:
+
+let
+
+ inherit (pkgs.lib) mkOption mkIf singleton;
+
+ inherit (pkgs) uptimed;
+
+ stateDir = "/var/spool/uptimed";
+
+ uptimedUser = "uptimed";
+
+in
+
+{
+
+ ###### interface
+
+ options = {
+
+ services.uptimed = {
+
+ enable = mkOption {
+ default = false;
+ description = ''
+ Uptimed allows you to track your highest uptimes.
+ '';
+ };
+
+ };
+
+ };
+
+
+ ###### implementation
+
+ config = mkIf config.services.uptimed.enable {
+
+ environment.systemPackages = [ uptimed ];
+
+ users.extraUsers = singleton
+ { name = uptimedUser;
+ uid = config.ids.uids.uptimed;
+ description = "Uptimed daemon user";
+ home = stateDir;
+ };
+
+ jobs.uptimed =
+ { description = "Uptimed daemon";
+
+ startOn = "startup";
+
+ preStart =
+ ''
+ mkdir -m 0755 -p ${stateDir}
+ chown ${uptimedUser} ${stateDir}
+
+ if ! test -f ${stateDir}/bootid ; then
+ ${uptimed}/sbin/uptimed -b
+ fi
+ '';
+
+ exec = "${uptimed}/sbin/uptimed";
+ };
+
+ };
+
+}
diff --git a/nixos/modules/services/torrent/deluge.nix b/nixos/modules/services/torrent/deluge.nix
new file mode 100644
index 0000000000000000000000000000000000000000..e0c212e5661f74f66f9e3bcf4f1af8eed1941edd
--- /dev/null
+++ b/nixos/modules/services/torrent/deluge.nix
@@ -0,0 +1,65 @@
+{ config, pkgs, ... }:
+
+with pkgs.lib;
+
+let
+ cfg = config.services.deluge;
+ cfg_web = config.services.deluge.web;
+in {
+ options = {
+ services.deluge = {
+ enable = mkOption {
+ default = false;
+ example = true;
+ description = ''
+ Start Deluge daemon.
+ '';
+ };
+ };
+
+ services.deluge.web = {
+ enable = mkOption {
+ default = false;
+ example = true;
+ description = ''
+ Start Deluge Web daemon.
+ '';
+ };
+ };
+ };
+
+ config = mkIf cfg.enable {
+
+ systemd.services.deluged = {
+ after = [ "network.target" ];
+ description = "Deluge BitTorrent Daemon";
+ wantedBy = [ "multi-user.target" ];
+ path = [ pkgs.pythonPackages.deluge ];
+ serviceConfig.ExecStart = "${pkgs.pythonPackages.deluge}/bin/deluged -d";
+ serviceConfig.User = "deluge";
+ serviceConfig.Group = "deluge";
+ };
+
+ systemd.services.delugeweb = mkIf cfg_web.enable {
+ after = [ "network.target" ];
+ description = "Deluge BitTorrent WebUI";
+ wantedBy = [ "multi-user.target" ];
+ path = [ pkgs.pythonPackages.deluge ];
+ serviceConfig.ExecStart = "${pkgs.pythonPackages.deluge}/bin/deluge --ui web";
+ serviceConfig.User = "deluge";
+ serviceConfig.Group = "deluge";
+ };
+
+ environment.systemPackages = [ pkgs.pythonPackages.deluge ];
+
+ users.extraUsers.deluge = {
+ group = "deluge";
+ uid = config.ids.uids.deluge;
+ home = "/var/lib/deluge/";
+ createHome = true;
+ description = "Deluge Daemon user";
+ };
+
+ users.extraGroups.deluge.gid = config.ids.gids.deluge;
+ };
+}
diff --git a/nixos/modules/services/torrent/transmission.nix b/nixos/modules/services/torrent/transmission.nix
new file mode 100644
index 0000000000000000000000000000000000000000..063332d486283bbe61a113b58258366dab4494e0
--- /dev/null
+++ b/nixos/modules/services/torrent/transmission.nix
@@ -0,0 +1,173 @@
+# NixOS module for Transmission BitTorrent daemon
+
+{ config, pkgs, ... }:
+
+with pkgs.lib;
+
+let
+
+ cfg = config.services.transmission;
+ homeDir = "/var/lib/transmission";
+ settingsDir = "${homeDir}/.config/transmission-daemon";
+ settingsFile = "${settingsDir}/settings.json";
+
+ # Strings must be quoted, ints and bools must not (for settings.json).
+ toOption = x:
+ if x == true then "true"
+ else if x == false then "false"
+ else if builtins.isInt x then toString x
+ else toString ''\"${x}\"'';
+
+ # All lines in settings.json end with a ',' (comma), except for the last
+ # line. This is standard JSON. But a comma can also appear *inside* some
+ # fields, notably the "rpc-whitelist" field. This is difficult to handle in
+ # sed so we simply ignore it and say that if you want to change the option at
+ # the last line of settings.json, you have to do it manually. At this time of
+ # writing, the last option is "utp-enable":true.
+ attrsToSedArgs = as:
+ concatStrings (concatLists (mapAttrsToList (name: value:
+ #map (x: '' -e 's=\(\"${name}\":\)[^,]*\(.*\)=\1 ${toOption x}\2=' '') # breaks if comma inside value field
+ map (x: '' -e 's=\(\"${name}\":\).*=\1 ${toOption x},=' '') # always append ',' (breaks last line in settings.json)
+ (if isList value then value else [value]))
+ as));
+
+in
+
+{
+
+ ### configuration
+
+ options = {
+
+ services.transmission = {
+
+ enable = mkOption {
+ type = types.uniq types.bool;
+ default = false;
+ description = ''
+ Whether or not to enable the headless Transmission BitTorrent daemon.
+
+ Transmission daemon can be controlled via the RPC interface using
+ transmission-remote or the WebUI (http://localhost:9091/ by default).
+
+ Torrents are downloaded to ${homeDir}/Downloads/ by default and are
+ accessible to users in the "transmission" group.
+ '';
+ };
+
+ settings = mkOption {
+ type = types.attrs;
+ default =
+ {
+ # for users in group "transmission" to have access to torrents
+ umask = 2;
+ }
+ ;
+ example =
+ {
+ download-dir = "/srv/torrents/";
+ incomplete-dir = "/srv/torrents/.incomplete/";
+ incomplete-dir-enabled = true;
+ rpc-whitelist = "127.0.0.1,192.168.*.*";
+ # for users in group "transmission" to have access to torrents
+ umask = 2;
+ }
+ ;
+ description = ''
+ Attribute set whos fields overwrites fields in settings.json (each
+ time the service starts). String values must be quoted, integer and
+ boolean values must not.
+
+ See https://trac.transmissionbt.com/wiki/EditConfigFiles for documentation
+ and/or look at ${settingsFile}."
+ '';
+ };
+
+ rpc_port = mkOption {
+ type = types.uniq types.int;
+ default = 9091;
+ description = "TCP port number to run the RPC/web interface.";
+ };
+
+ apparmor = mkOption {
+ type = types.uniq types.bool;
+ default = true;
+ description = "Generate apparmor profile for transmission-daemon.";
+ };
+ };
+
+ };
+
+ ### implementation
+
+ config = mkIf cfg.enable {
+
+ systemd.services.transmission = {
+ description = "Transmission BitTorrent Daemon";
+ after = [ "network.target" ] ++ optional (config.security.apparmor.enable && cfg.apparmor) "apparmor.service";
+ requires = mkIf (config.security.apparmor.enable && cfg.apparmor) [ "apparmor.service" ];
+ wantedBy = [ "multi-user.target" ];
+
+ # 1) Only the "transmission" user and group have access to torrents.
+ # 2) Optionally update/force specific fields into the configuration file.
+ serviceConfig.ExecStartPre =
+ if cfg.settings != {} then ''
+ ${pkgs.stdenv.shell} -c "chmod 770 ${homeDir} && mkdir -p ${settingsDir} && ${pkgs.transmission}/bin/transmission-daemon -d |& sed ${attrsToSedArgs cfg.settings} > ${settingsFile}.tmp && mv ${settingsFile}.tmp ${settingsFile}"
+ ''
+ else ''
+ ${pkgs.stdenv.shell} -c "chmod 770 ${homeDir}"
+ '';
+ serviceConfig.ExecStart = "${pkgs.transmission}/bin/transmission-daemon -f --port ${toString config.services.transmission.rpc_port}";
+ serviceConfig.ExecReload = "${pkgs.coreutils}/bin/kill -HUP $MAINPID";
+ serviceConfig.User = "transmission";
+ # NOTE: transmission has an internal umask that also must be set (in settings.json)
+ serviceConfig.UMask = "0002";
+ };
+
+ # It's useful to have transmission in path, e.g. for remote control
+ environment.systemPackages = [ pkgs.transmission ];
+
+ users.extraUsers.transmission = {
+ group = "transmission";
+ uid = config.ids.uids.transmission;
+ description = "Transmission BitTorrent user";
+ home = homeDir;
+ createHome = true;
+ };
+
+ users.extraGroups.transmission.gid = config.ids.gids.transmission;
+
+ # AppArmor profile
+ security.apparmor.profiles = mkIf (config.security.apparmor.enable && cfg.apparmor) [
+ (pkgs.writeText "apparmor-transmission-daemon" ''
+ #include
+
+ ${pkgs.transmission}/bin/transmission-daemon {
+ #include
+ #include
+
+ ${pkgs.glibc}/lib/*.so mr,
+ ${pkgs.libevent}/lib/libevent*.so* mr,
+ ${pkgs.curl}/lib/libcurl*.so* mr,
+ ${pkgs.openssl}/lib/libssl*.so* mr,
+ ${pkgs.openssl}/lib/libcrypto*.so* mr,
+ ${pkgs.zlib}/lib/libz*.so* mr,
+ ${pkgs.libssh2}/lib/libssh2*.so* mr,
+
+ @{PROC}/sys/kernel/random/uuid r,
+ @{PROC}/sys/vm/overcommit_memory r,
+
+ ${pkgs.transmission}/share/transmission/** r,
+
+ owner ${settingsDir}/** rw,
+
+ ${cfg.settings.download-dir}/** rw,
+ ${optionalString cfg.settings.incomplete-dir-enabled ''
+ ${cfg.settings.incomplete-dir}/** rw,
+ ''}
+ }
+ '')
+ ];
+ };
+
+}
diff --git a/nixos/modules/services/ttys/agetty.nix b/nixos/modules/services/ttys/agetty.nix
new file mode 100644
index 0000000000000000000000000000000000000000..850f558e4cb72bc54f500d40a5ec59b7c02bafe5
--- /dev/null
+++ b/nixos/modules/services/ttys/agetty.nix
@@ -0,0 +1,127 @@
+{ config, pkgs, ... }:
+
+with pkgs.lib;
+
+{
+
+ ###### interface
+
+ options = {
+
+ services.mingetty = {
+
+ greetingLine = mkOption {
+ default = ''<<< Welcome to NixOS ${config.system.nixosVersion} (\m) - \l >>>'';
+ description = ''
+ Welcome line printed by mingetty.
+ '';
+ };
+
+ helpLine = mkOption {
+ default = "";
+ description = ''
+ Help line printed by mingetty below the welcome line.
+ Used by the installation CD to give some hints on
+ how to proceed.
+ '';
+ };
+
+ };
+
+ };
+
+
+ ###### implementation
+
+ config = {
+
+ # FIXME: these are mostly copy/pasted from the systemd sources,
+ # which some small modifications, which is annoying.
+
+ # Generate a separate job for each tty.
+ systemd.units."getty@.service".text =
+ ''
+ [Unit]
+ Description=Getty on %I
+ Documentation=man:agetty(8)
+ After=systemd-user-sessions.service plymouth-quit-wait.service
+
+ # If additional gettys are spawned during boot then we should make
+ # sure that this is synchronized before getty.target, even though
+ # getty.target didn't actually pull it in.
+ Before=getty.target
+ IgnoreOnIsolate=yes
+
+ ConditionPathExists=/dev/tty0
+
+ [Service]
+ Environment=TERM=linux
+ Environment=LOCALE_ARCHIVE=/run/current-system/sw/lib/locale/locale-archive
+ ExecStart=@${pkgs.utillinux}/sbin/agetty agetty --noclear --login-program ${pkgs.shadow}/bin/login %I 38400
+ Type=idle
+ Restart=always
+ RestartSec=0
+ UtmpIdentifier=%I
+ TTYPath=/dev/%I
+ TTYReset=yes
+ TTYVHangup=yes
+ TTYVTDisallocate=yes # set to no to prevent clearing the screen
+ KillMode=process
+ IgnoreSIGPIPE=no
+
+ # Some login implementations ignore SIGTERM, so we send SIGHUP
+ # instead, to ensure that login terminates cleanly.
+ KillSignal=SIGHUP
+
+ X-RestartIfChanged=false
+ '';
+
+ systemd.units."serial-getty@.service".text =
+ ''
+ [Unit]
+ Description=Serial Getty on %I
+ Documentation=man:agetty(8) man:systemd-getty-generator(8)
+ BindsTo=dev-%i.device
+ After=dev-%i.device systemd-user-sessions.service plymouth-quit-wait.service
+
+ # If additional gettys are spawned during boot then we should make
+ # sure that this is synchronized before getty.target, even though
+ # getty.target didn't actually pull it in.
+ Before=getty.target
+ IgnoreOnIsolate=yes
+
+ [Service]
+ Environment=TERM=linux
+ Environment=LOCALE_ARCHIVE=/run/current-system/sw/lib/locale/locale-archive
+ ExecStart=@${pkgs.utillinux}/sbin/agetty agetty --login-program ${pkgs.shadow}/bin/login %I 115200,57600,38400,9600
+ Type=idle
+ Restart=always
+ RestartSec=0
+ UtmpIdentifier=%I
+ TTYPath=/dev/%I
+ TTYReset=yes
+ TTYVHangup=yes
+ KillMode=process
+ IgnoreSIGPIPE=no
+
+ # Some login implementations ignore SIGTERM, so we send SIGHUP
+ # instead, to ensure that login terminates cleanly.
+ KillSignal=SIGHUP
+
+ X-RestartIfChanged=false
+ '';
+
+ environment.etc = singleton
+ { # Friendly greeting on the virtual consoles.
+ source = pkgs.writeText "issue" ''
+
+ [1;32m${config.services.mingetty.greetingLine}[0m
+ ${config.services.mingetty.helpLine}
+
+ '';
+ target = "issue";
+ };
+
+ };
+
+}
diff --git a/nixos/modules/services/ttys/gpm.nix b/nixos/modules/services/ttys/gpm.nix
new file mode 100644
index 0000000000000000000000000000000000000000..6a425cf327f459bd748570a702cd0ab55870c4c4
--- /dev/null
+++ b/nixos/modules/services/ttys/gpm.nix
@@ -0,0 +1,51 @@
+{ config, pkgs, ... }:
+
+with pkgs.lib;
+
+let
+
+ cfg = config.services.gpm;
+
+in
+
+{
+
+ ###### interface
+
+ options = {
+
+ services.gpm = {
+
+ enable = mkOption {
+ default = false;
+ description = ''
+ Whether to enable GPM, the General Purpose Mouse daemon,
+ which enables mouse support in virtual consoles.
+ '';
+ };
+
+ protocol = mkOption {
+ default = "ps/2";
+ description = "Mouse protocol to use.";
+ };
+
+ };
+
+ };
+
+
+ ###### implementation
+
+ config = mkIf cfg.enable {
+
+ jobs.gpm =
+ { description = "General purpose mouse";
+
+ startOn = "started udev";
+
+ exec = "${pkgs.gpm}/sbin/gpm -m /dev/input/mice -t ${cfg.protocol} -D &>/dev/null";
+ };
+
+ };
+
+}
diff --git a/nixos/modules/services/web-servers/apache-httpd/default.nix b/nixos/modules/services/web-servers/apache-httpd/default.nix
new file mode 100644
index 0000000000000000000000000000000000000000..e2cfc5cdb26567dc70fb6834f3326d7143d6e5c5
--- /dev/null
+++ b/nixos/modules/services/web-servers/apache-httpd/default.nix
@@ -0,0 +1,662 @@
+{ config, pkgs, ... }:
+
+with pkgs.lib;
+
+let
+
+ mainCfg = config.services.httpd;
+
+ httpd = mainCfg.package;
+
+ version24 = !versionOlder httpd.version "2.4";
+
+ httpdConf = mainCfg.configFile;
+
+ php = pkgs.php.override { apacheHttpd = httpd; };
+
+ getPort = cfg: if cfg.port != 0 then cfg.port else if cfg.enableSSL then 443 else 80;
+
+ extraModules = attrByPath ["extraModules"] [] mainCfg;
+ extraForeignModules = filter builtins.isAttrs extraModules;
+ extraApacheModules = filter (x: !(builtins.isAttrs x)) extraModules; # I'd prefer using builtins.isString here, but doesn't exist yet
+
+
+ makeServerInfo = cfg: {
+ # Canonical name must not include a trailing slash.
+ canonicalName =
+ (if cfg.enableSSL then "https" else "http") + "://" +
+ cfg.hostName +
+ (if getPort cfg != (if cfg.enableSSL then 443 else 80) then ":${toString (getPort cfg)}" else "");
+
+ # Admin address: inherit from the main server if not specified for
+ # a virtual host.
+ adminAddr = if cfg.adminAddr != "" then cfg.adminAddr else mainCfg.adminAddr;
+
+ vhostConfig = cfg;
+ serverConfig = mainCfg;
+ fullConfig = config; # machine config
+ };
+
+
+ vhostOptions = import ./per-server-options.nix {
+ inherit mkOption;
+ forMainServer = false;
+ };
+
+ vhosts = let
+ makeVirtualHost = cfgIn:
+ let
+ # Fill in defaults for missing options.
+ cfg = addDefaultOptionValues vhostOptions cfgIn;
+ in cfg;
+ in map makeVirtualHost mainCfg.virtualHosts;
+
+
+ allHosts = [mainCfg] ++ vhosts;
+
+
+ callSubservices = serverInfo: defs:
+ let f = svc:
+ let
+ svcFunction =
+ if svc ? function then svc.function
+ else import "${./.}/${if svc ? serviceType then svc.serviceType else svc.serviceName}.nix";
+ config = addDefaultOptionValues res.options
+ (if svc ? config then svc.config else svc);
+ defaults = {
+ extraConfig = "";
+ extraModules = [];
+ extraModulesPre = [];
+ extraPath = [];
+ extraServerPath = [];
+ globalEnvVars = [];
+ robotsEntries = "";
+ startupScript = "";
+ enablePHP = false;
+ phpOptions = "";
+ options = {};
+ };
+ res = defaults // svcFunction { inherit config pkgs serverInfo php; };
+ in res;
+ in map f defs;
+
+
+ # !!! callSubservices is expensive
+ subservicesFor = cfg: callSubservices (makeServerInfo cfg) cfg.extraSubservices;
+
+ mainSubservices = subservicesFor mainCfg;
+
+ allSubservices = mainSubservices ++ concatMap subservicesFor vhosts;
+
+
+ # !!! should be in lib
+ writeTextInDir = name: text:
+ pkgs.runCommand name {inherit text;} "ensureDir $out; echo -n \"$text\" > $out/$name";
+
+
+ enableSSL = any (vhost: vhost.enableSSL) allHosts;
+
+
+ # Names of modules from ${httpd}/modules that we want to load.
+ apacheModules =
+ [ # HTTP authentication mechanisms: basic and digest.
+ "auth_basic" "auth_digest"
+
+ # Authentication: is the user who he claims to be?
+ "authn_file" "authn_dbm" "authn_anon"
+ (if version24 then "authn_core" else "authn_alias")
+
+ # Authorization: is the user allowed access?
+ "authz_user" "authz_groupfile" "authz_host"
+
+ # Other modules.
+ "ext_filter" "include" "log_config" "env" "mime_magic"
+ "cern_meta" "expires" "headers" "usertrack" /* "unique_id" */ "setenvif"
+ "mime" "dav" "status" "autoindex" "asis" "info" "dav_fs"
+ "vhost_alias" "negotiation" "dir" "imagemap" "actions" "speling"
+ "userdir" "alias" "rewrite" "proxy" "proxy_http"
+ ]
+ ++ optionals version24 [
+ "mpm_${mainCfg.multiProcessingModule}"
+ "authz_core"
+ "unixd"
+ ]
+ ++ (if mainCfg.multiProcessingModule == "prefork" then [ "cgi" ] else [ "cgid" ])
+ ++ optional enableSSL "ssl"
+ ++ extraApacheModules;
+
+
+ allDenied = if version24 then ''
+ Require all denied
+ '' else ''
+ Order deny,allow
+ Deny from all
+ '';
+
+ allGranted = if version24 then ''
+ Require all granted
+ '' else ''
+ Order allow,deny
+ Allow from all
+ '';
+
+
+ loggingConf = ''
+ ErrorLog ${mainCfg.logDir}/error_log
+
+ LogLevel notice
+
+ LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
+ LogFormat "%h %l %u %t \"%r\" %>s %b" common
+ LogFormat "%{Referer}i -> %U" referer
+ LogFormat "%{User-agent}i" agent
+
+ CustomLog ${mainCfg.logDir}/access_log ${mainCfg.logFormat}
+ '';
+
+
+ browserHacks = ''
+ BrowserMatch "Mozilla/2" nokeepalive
+ BrowserMatch "MSIE 4\.0b2;" nokeepalive downgrade-1.0 force-response-1.0
+ BrowserMatch "RealPlayer 4\.0" force-response-1.0
+ BrowserMatch "Java/1\.0" force-response-1.0
+ BrowserMatch "JDK/1\.0" force-response-1.0
+ BrowserMatch "Microsoft Data Access Internet Publishing Provider" redirect-carefully
+ BrowserMatch "^WebDrive" redirect-carefully
+ BrowserMatch "^WebDAVFS/1.[012]" redirect-carefully
+ BrowserMatch "^gnome-vfs" redirect-carefully
+ '';
+
+
+ sslConf = ''
+ SSLSessionCache shm:${mainCfg.stateDir}/ssl_scache(512000)
+
+ SSLMutex posixsem
+
+ SSLRandomSeed startup builtin
+ SSLRandomSeed connect builtin
+ '';
+
+
+ mimeConf = ''
+ TypesConfig ${httpd}/conf/mime.types
+
+ AddType application/x-x509-ca-cert .crt
+ AddType application/x-pkcs7-crl .crl
+ AddType application/x-httpd-php .php .phtml
+
+
+ MIMEMagicFile ${httpd}/conf/magic
+
+
+ AddEncoding x-compress Z
+ AddEncoding x-gzip gz tgz
+ '';
+
+
+ perServerConf = isMainServer: cfg: let
+
+ serverInfo = makeServerInfo cfg;
+
+ subservices = callSubservices serverInfo cfg.extraSubservices;
+
+ documentRoot = if cfg.documentRoot != null then cfg.documentRoot else
+ pkgs.runCommand "empty" {} "ensureDir $out";
+
+ documentRootConf = ''
+ DocumentRoot "${documentRoot}"
+
+
+ Options Indexes FollowSymLinks
+ AllowOverride None
+ ${allGranted}
+
+ '';
+
+ robotsTxt = pkgs.writeText "robots.txt" ''
+ ${# If this is a vhost, the include the entries for the main server as well.
+ if isMainServer then ""
+ else concatMapStrings (svc: svc.robotsEntries) mainSubservices}
+ ${concatMapStrings (svc: svc.robotsEntries) subservices}
+ '';
+
+ robotsConf = ''
+ Alias /robots.txt ${robotsTxt}
+ '';
+
+ in ''
+ ServerName ${serverInfo.canonicalName}
+
+ ${concatMapStrings (alias: "ServerAlias ${alias}\n") cfg.serverAliases}
+
+ ${if cfg.sslServerCert != "" then ''
+ SSLCertificateFile ${cfg.sslServerCert}
+ SSLCertificateKeyFile ${cfg.sslServerKey}
+ '' else ""}
+
+ ${if cfg.enableSSL then ''
+ SSLEngine on
+ '' else if enableSSL then /* i.e., SSL is enabled for some host, but not this one */
+ ''
+ SSLEngine off
+ '' else ""}
+
+ ${if isMainServer || cfg.adminAddr != "" then ''
+ ServerAdmin ${cfg.adminAddr}
+ '' else ""}
+
+ ${if !isMainServer && mainCfg.logPerVirtualHost then ''
+ ErrorLog ${mainCfg.logDir}/error_log-${cfg.hostName}
+ CustomLog ${mainCfg.logDir}/access_log-${cfg.hostName} ${cfg.logFormat}
+ '' else ""}
+
+ ${robotsConf}
+
+ ${if isMainServer || cfg.documentRoot != null then documentRootConf else ""}
+
+ ${if cfg.enableUserDir then ''
+
+ UserDir public_html
+ UserDir disabled root
+
+
+ AllowOverride FileInfo AuthConfig Limit Indexes
+ Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec
+
+ ${allGranted}
+
+
+ ${allDenied}
+
+
+
+ '' else ""}
+
+ ${if cfg.globalRedirect != "" then ''
+ RedirectPermanent / ${cfg.globalRedirect}
+ '' else ""}
+
+ ${
+ let makeFileConf = elem: ''
+ Alias ${elem.urlPath} ${elem.file}
+ '';
+ in concatMapStrings makeFileConf cfg.servedFiles
+ }
+
+ ${
+ let makeDirConf = elem: ''
+ Alias ${elem.urlPath} ${elem.dir}/
+
+ Options +Indexes
+ ${allGranted}
+ AllowOverride All
+
+ '';
+ in concatMapStrings makeDirConf cfg.servedDirs
+ }
+
+ ${concatMapStrings (svc: svc.extraConfig) subservices}
+
+ ${cfg.extraConfig}
+ '';
+
+
+ confFile = pkgs.writeText "httpd.conf" ''
+
+ ServerRoot ${httpd}
+
+ ${optionalString version24 ''
+ DefaultRuntimeDir ${mainCfg.stateDir}/runtime
+ ''}
+
+ PidFile ${mainCfg.stateDir}/httpd.pid
+
+ ${optionalString (mainCfg.multiProcessingModule != "prefork") ''
+ # mod_cgid requires this.
+ ScriptSock ${mainCfg.stateDir}/cgisock
+ ''}
+
+
+ MaxClients ${toString mainCfg.maxClients}
+ MaxRequestsPerChild ${toString mainCfg.maxRequestsPerChild}
+
+
+ ${let
+ ports = map getPort allHosts;
+ uniquePorts = uniqList {inputList = ports;};
+ in concatMapStrings (port: "Listen ${toString port}\n") uniquePorts
+ }
+
+ User ${mainCfg.user}
+ Group ${mainCfg.group}
+
+ ${let
+ load = {name, path}: "LoadModule ${name}_module ${path}\n";
+ allModules =
+ concatMap (svc: svc.extraModulesPre) allSubservices
+ ++ map (name: {inherit name; path = "${httpd}/modules/mod_${name}.so";}) apacheModules
+ ++ optional enablePHP { name = "php5"; path = "${php}/modules/libphp5.so"; }
+ ++ concatMap (svc: svc.extraModules) allSubservices
+ ++ extraForeignModules;
+ in concatMapStrings load allModules
+ }
+
+ AddHandler type-map var
+
+
+ ${allDenied}
+
+
+ ${mimeConf}
+ ${loggingConf}
+ ${browserHacks}
+
+ Include ${httpd}/conf/extra/httpd-default.conf
+ Include ${httpd}/conf/extra/httpd-autoindex.conf
+ Include ${httpd}/conf/extra/httpd-multilang-errordoc.conf
+ Include ${httpd}/conf/extra/httpd-languages.conf
+
+ ${if enableSSL then sslConf else ""}
+
+ # Fascist default - deny access to everything.
+
+ Options FollowSymLinks
+ AllowOverride None
+ ${allDenied}
+
+
+ # But do allow access to files in the store so that we don't have
+ # to generate clauses for every generated file that we
+ # want to serve.
+
+ ${allGranted}
+
+
+ # Generate directives for the main server.
+ ${perServerConf true mainCfg}
+
+ # Always enable virtual hosts; it doesn't seem to hurt.
+ ${let
+ ports = map getPort allHosts;
+ uniquePorts = uniqList {inputList = ports;};
+ directives = concatMapStrings (port: "NameVirtualHost *:${toString port}\n") uniquePorts;
+ in optionalString (!version24) directives
+ }
+
+ ${let
+ makeVirtualHost = vhost: ''
+
+ ${perServerConf false vhost}
+
+ '';
+ in concatMapStrings makeVirtualHost vhosts
+ }
+ '';
+
+
+ enablePHP = any (svc: svc.enablePHP) allSubservices;
+
+
+ # Generate the PHP configuration file. Should probably be factored
+ # out into a separate module.
+ phpIni = pkgs.runCommand "php.ini"
+ { options = concatStringsSep "\n"
+ ([ mainCfg.phpOptions ] ++ (map (svc: svc.phpOptions) allSubservices));
+ }
+ ''
+ cat ${php}/etc/php-recommended.ini > $out
+ echo "$options" >> $out
+ '';
+
+in
+
+
+{
+
+ ###### interface
+
+ options = {
+
+ services.httpd = {
+
+ enable = mkOption {
+ default = false;
+ description = "
+ Whether to enable the Apache httpd server.
+ ";
+ };
+
+ package = mkOption {
+ default = pkgs.apacheHttpd.override { mpm = mainCfg.multiProcessingModule; };
+ example = "pkgs.apacheHttpd_2_4";
+ description = "
+ Overridable attribute of the Apache HTTP Server package to use.
+ ";
+ };
+
+ configFile = mkOption {
+ default = confFile;
+ example = ''pkgs.writeText "httpd.conf" "# my custom config file ...";'';
+ description = "
+ Overridable config file to use for Apache. By default, use the
+ file automatically generated by nixos.
+ ";
+ };
+
+ extraConfig = mkOption {
+ default = "";
+ description = "
+ These configuration lines will be appended to the Apache config
+ file. Note that this mechanism may not work when
configFile
+ is overridden.
+ ";
+ };
+
+ extraModules = mkOption {
+ default = [];
+ example = [ "proxy_connect" { name = "php5"; path = "${php}/modules/libphp5.so"; } ];
+ description = ''
+ Specifies additional Apache modules. These can be specified
+ as a string in the case of modules distributed with Apache,
+ or as an attribute set specifying the
+ name and path of the
+ module.
+ '';
+ };
+
+ logPerVirtualHost = mkOption {
+ default = false;
+ description = "
+ If enabled, each virtual host gets its own
+ access_log and
+ error_log, namely suffixed by the
+
hostName
of the virtual host.
+ ";
+ };
+
+ user = mkOption {
+ default = "wwwrun";
+ description = "
+ User account under which httpd runs. The account is created
+ automatically if it doesn't exist.
+ ";
+ };
+
+ group = mkOption {
+ default = "wwwrun";
+ description = "
+ Group under which httpd runs. The account is created
+ automatically if it doesn't exist.
+ ";
+ };
+
+ logDir = mkOption {
+ default = "/var/log/httpd";
+ description = "
+ Directory for Apache's log files. It is created automatically.
+ ";
+ };
+
+ stateDir = mkOption {
+ default = "/var/run/httpd";
+ description = "
+ Directory for Apache's transient runtime state (such as PID
+ files). It is created automatically. Note that the default,
+ /var/run/httpd, is deleted at boot time.
+ ";
+ };
+
+ virtualHosts = mkOption {
+ default = [];
+ example = [
+ { hostName = "foo";
+ documentRoot = "/data/webroot-foo";
+ }
+ { hostName = "bar";
+ documentRoot = "/data/webroot-bar";
+ }
+ ];
+ description = ''
+ Specification of the virtual hosts served by Apache. Each
+ element should be an attribute set specifying the
+ configuration of the virtual host. The available options
+ are the non-global options permissible for the main host.
+ '';
+ };
+
+ phpOptions = mkOption {
+ default = "";
+ example =
+ ''
+ date.timezone = "CET"
+ '';
+ description =
+ "Options appended to the PHP configuration file php.ini.";
+ };
+
+ multiProcessingModule = mkOption {
+ default = "prefork";
+ example = "worker";
+ type = types.uniq types.string;
+ description =
+ ''
+ Multi-processing module to be used by Apache. Available
+ modules are prefork (the default;
+ handles each request in a separate child process),
+ worker (hybrid approach that starts a
+ number of child processes each running a number of
+ threads) and event (a recent variant of
+ worker that handles persistent
+ connections more efficiently).
+ '';
+ };
+
+ maxClients = mkOption {
+ default = 150;
+ example = 8;
+ description = "Maximum number of httpd processes (prefork)";
+ };
+
+ maxRequestsPerChild = mkOption {
+ default = 0;
+ example = 500;
+ description =
+ "Maximum number of httpd requests answered per httpd child (prefork), 0 means unlimited";
+ };
+ }
+
+ # Include the options shared between the main server and virtual hosts.
+ // (import ./per-server-options.nix {
+ inherit mkOption;
+ forMainServer = true;
+ });
+
+ };
+
+
+ ###### implementation
+
+ config = mkIf config.services.httpd.enable {
+
+ users.extraUsers = optionalAttrs (mainCfg.user == "wwwrun") singleton
+ { name = "wwwrun";
+ group = "wwwrun";
+ description = "Apache httpd user";
+ uid = config.ids.uids.wwwrun;
+ };
+
+ users.extraGroups = optionalAttrs (mainCfg.group == "wwwrun") singleton
+ { name = "wwwrun";
+ gid = config.ids.gids.wwwrun;
+ };
+
+ environment.systemPackages = [httpd] ++ concatMap (svc: svc.extraPath) allSubservices;
+
+ services.httpd.phpOptions =
+ ''
+ ; Needed for PHP's mail() function.
+ sendmail_path = sendmail -t -i
+
+ ; Apparently PHP doesn't use $TZ.
+ date.timezone = "${config.time.timeZone}"
+ '';
+
+ systemd.services.httpd =
+ { description = "Apache HTTPD";
+
+ wantedBy = [ "multi-user.target" ];
+ requires = [ "keys.target" ];
+ after = [ "network.target" "fs.target" "postgresql.service" "keys.target" ];
+
+ path =
+ [ httpd pkgs.coreutils pkgs.gnugrep ]
+ ++ # Needed for PHP's mail() function. !!! Probably the
+ # ssmtp module should export the path to sendmail in
+ # some way.
+ optional config.networking.defaultMailServer.directDelivery pkgs.ssmtp
+ ++ concatMap (svc: svc.extraServerPath) allSubservices;
+
+ environment =
+ { PHPRC = if enablePHP then phpIni else "";
+ } // (listToAttrs (concatMap (svc: svc.globalEnvVars) allSubservices));
+
+ preStart =
+ ''
+ mkdir -m 0750 -p ${mainCfg.stateDir}
+ chown root.${mainCfg.group} ${mainCfg.stateDir}
+ ${optionalString version24 ''
+ mkdir -m 0750 -p "${mainCfg.stateDir}/runtime"
+ chown root.${mainCfg.group} "${mainCfg.stateDir}/runtime"
+ ''}
+ mkdir -m 0700 -p ${mainCfg.logDir}
+
+ ${optionalString (mainCfg.documentRoot != null)
+ ''
+ # Create the document root directory if does not exists yet
+ mkdir -p ${mainCfg.documentRoot}
+ ''
+ }
+
+ # Get rid of old semaphores. These tend to accumulate across
+ # server restarts, eventually preventing it from restarting
+ # successfully.
+ for i in $(${pkgs.utillinux}/bin/ipcs -s | grep ' ${mainCfg.user} ' | cut -f2 -d ' '); do
+ ${pkgs.utillinux}/bin/ipcrm -s $i
+ done
+
+ # Run the startup hooks for the subservices.
+ for i in ${toString (map (svn: svn.startupScript) allSubservices)}; do
+ echo Running Apache startup hook $i...
+ $i
+ done
+ '';
+
+ serviceConfig.ExecStart = "@${httpd}/bin/httpd httpd -f ${httpdConf}";
+ serviceConfig.ExecStop = "${httpd}/bin/httpd -f ${httpdConf} -k graceful-stop";
+ serviceConfig.Type = "forking";
+ serviceConfig.Restart = "always";
+ };
+
+ };
+
+}
diff --git a/nixos/modules/services/web-servers/apache-httpd/mediawiki.nix b/nixos/modules/services/web-servers/apache-httpd/mediawiki.nix
new file mode 100644
index 0000000000000000000000000000000000000000..dcc05b03891b9bd95efd4efc9804fadc499e7e6b
--- /dev/null
+++ b/nixos/modules/services/web-servers/apache-httpd/mediawiki.nix
@@ -0,0 +1,303 @@
+{ config, pkgs, serverInfo, php, ... }:
+
+with pkgs.lib;
+
+let
+
+ mediawikiConfig = pkgs.writeText "LocalSettings.php"
+ ''
+
+ '';
+
+ # Unpack Mediawiki and put the config file in its root directory.
+ mediawikiRoot = pkgs.stdenv.mkDerivation rec {
+ name= "mediawiki-1.20.5";
+
+ src = pkgs.fetchurl {
+ url = "http://download.wikimedia.org/mediawiki/1.20/${name}.tar.gz";
+ sha256 = "0ix6khrilfdncjqnh41xjs0bd49i1q0rywycjaixjfpwj6vjbqbl";
+ };
+
+ skins = config.skins;
+
+ buildPhase =
+ ''
+ for skin in $skins; do
+ cp -prvd $skin/* skins/
+ done
+ ''; # */
+
+ installPhase =
+ ''
+ ensureDir $out
+ cp -r * $out
+ cp ${mediawikiConfig} $out/LocalSettings.php
+ '';
+ };
+
+ mediawikiScripts = pkgs.runCommand "mediawiki-${config.id}-scripts"
+ { buildInputs = [ pkgs.makeWrapper ]; }
+ ''
+ ensureDir $out/bin
+ for i in changePassword.php createAndPromote.php userOptions.php edit.php nukePage.php update.php; do
+ makeWrapper ${php}/bin/php $out/bin/mediawiki-${config.id}-$(basename $i .php) \
+ --add-flags ${mediawikiRoot}/maintenance/$i
+ done
+ '';
+
+in
+
+{
+
+ extraConfig =
+ ''
+ ${optionalString config.enableUploads ''
+ Alias ${config.urlPrefix}/images ${config.uploadDir}
+
+
+ Order allow,deny
+ Allow from all
+ Options -Indexes
+
+ ''}
+
+ Alias ${config.urlPrefix} ${mediawikiRoot}
+
+
+ Order allow,deny
+ Allow from all
+ DirectoryIndex index.php
+
+
+ ${optionalString (config.articleUrlPrefix != "") ''
+ Alias ${config.articleUrlPrefix} ${mediawikiRoot}/index.php
+ ''}
+ '';
+
+ enablePHP = true;
+
+ options = {
+
+ id = mkOption {
+ default = "main";
+ description = ''
+ A unique identifier necessary to keep multiple MediaWiki server
+ instances on the same machine apart. This is used to
+ disambiguate the administrative scripts, which get names like
+ mediawiki-$id-change-password.
+ '';
+ };
+
+ dbType = mkOption {
+ default = "postgres";
+ example = "mysql";
+ description = "Database type.";
+ };
+
+ dbName = mkOption {
+ default = "mediawiki";
+ description = "Name of the database that holds the MediaWiki data.";
+ };
+
+ dbServer = mkOption {
+ default = ""; # use a Unix domain socket
+ example = "10.0.2.2";
+ description = ''
+ The location of the database server. Leave empty to use a
+ database server running on the same machine through a Unix
+ domain socket.
+ '';
+ };
+
+ dbUser = mkOption {
+ default = "mediawiki";
+ description = "The user name for accessing the database.";
+ };
+
+ dbPassword = mkOption {
+ default = "";
+ example = "foobar";
+ description = ''
+ The password of the database user. Warning: this is stored in
+ cleartext in the Nix store!
+ '';
+ };
+
+ emergencyContact = mkOption {
+ default = serverInfo.serverConfig.adminAddr;
+ example = "admin@example.com";
+ description = ''
+ Emergency contact e-mail address. Defaults to the Apache
+ admin address.
+ '';
+ };
+
+ passwordSender = mkOption {
+ default = serverInfo.serverConfig.adminAddr;
+ example = "password@example.com";
+ description = ''
+ E-mail address from which password confirmations originate.
+ Defaults to the Apache admin address.
+ '';
+ };
+
+ siteName = mkOption {
+ default = "MediaWiki";
+ example = "Foobar Wiki";
+ description = "Name of the wiki";
+ };
+
+ logo = mkOption {
+ default = "";
+ example = "/images/logo.png";
+ description = "The URL of the site's logo (which should be a 135x135px image).";
+ };
+
+ urlPrefix = mkOption {
+ default = "/w";
+ description = ''
+ The URL prefix under which the Mediawiki service appears.
+ '';
+ };
+
+ articleUrlPrefix = mkOption {
+ default = "/wiki";
+ example = "";
+ description = ''
+ The URL prefix under which article pages appear,
+ e.g. http://server/wiki/Page. Leave empty to use the main URL
+ prefix, e.g. http://server/w/index.php?title=Page.
+ '';
+ };
+
+ enableUploads = mkOption {
+ default = false;
+ description = "Whether to enable file uploads.";
+ };
+
+ uploadDir = mkOption {
+ default = throw "You must specify `uploadDir'.";
+ example = "/data/mediawiki-upload";
+ description = "The directory that stores uploaded files.";
+ };
+
+ defaultSkin = mkOption {
+ default = "";
+ example = "nostalgia";
+ description = "Set this value to change the default skin used by MediaWiki.";
+ };
+
+ skins = mkOption {
+ default = [];
+ type = types.listOf types.path;
+ description =
+ ''
+ List of paths whose content is copied to the ‘skins’
+ subdirectory of the MediaWiki installation.
+ '';
+ };
+
+ extraConfig = mkOption {
+ default = "";
+ example =
+ ''
+ $wgEnableEmail = false;
+ '';
+ description = ''
+ Any additional text to be appended to MediaWiki's
+ configuration file. This is a PHP script. For configuration
+ settings, see .
+ '';
+ };
+
+ };
+
+ extraPath = [ mediawikiScripts ];
+
+ # !!! Need to specify that Apache has a dependency on PostgreSQL!
+
+ startupScript = pkgs.writeScript "mediawiki_startup.sh"
+ # Initialise the database automagically if we're using a Postgres
+ # server on localhost.
+ (optionalString (config.dbType == "postgres" && config.dbServer == "") ''
+ if ! ${pkgs.postgresql}/bin/psql -l | grep -q ' ${config.dbName} ' ; then
+ ${pkgs.postgresql}/bin/createuser --no-superuser --no-createdb --no-createrole "${config.dbUser}" || true
+ ${pkgs.postgresql}/bin/createdb "${config.dbName}" -O "${config.dbUser}"
+ ( echo 'CREATE LANGUAGE plpgsql;'
+ cat ${mediawikiRoot}/maintenance/postgres/tables.sql
+ echo 'CREATE TEXT SEARCH CONFIGURATION public.default ( COPY = pg_catalog.english );'
+ echo COMMIT
+ ) | ${pkgs.postgresql}/bin/psql -U "${config.dbUser}" "${config.dbName}"
+ fi
+ '');
+
+ robotsEntries = optionalString (config.articleUrlPrefix != "")
+ ''
+ User-agent: *
+ Disallow: ${config.urlPrefix}/
+ Disallow: ${config.articleUrlPrefix}/Special:Search
+ Disallow: ${config.articleUrlPrefix}/Special:Random
+ '';
+
+}
diff --git a/nixos/modules/services/web-servers/apache-httpd/mercurial.nix b/nixos/modules/services/web-servers/apache-httpd/mercurial.nix
new file mode 100644
index 0000000000000000000000000000000000000000..755b595c783dd3971d05e72038926ce0e2ac6820
--- /dev/null
+++ b/nixos/modules/services/web-servers/apache-httpd/mercurial.nix
@@ -0,0 +1,75 @@
+{ config, pkgs, serverInfo, ... }:
+
+let
+ inherit (pkgs) mercurial;
+ inherit (pkgs.lib) mkOption;
+
+ urlPrefix = config.urlPrefix;
+
+ cgi = pkgs.stdenv.mkDerivation {
+ name = "mercurial-cgi";
+ buildCommand = ''
+ ensureDir $out
+ cp -v ${mercurial}/share/cgi-bin/hgweb.cgi $out
+ sed -i "s|/path/to/repo/or/config|$out/hgweb.config|" $out/hgweb.cgi
+ echo "
+ [collections]
+ ${config.dataDir} = ${config.dataDir}
+ [web]
+ style = gitweb
+ allow_push = *
+ " > $out/hgweb.config
+ '';
+ };
+
+in {
+
+ extraConfig = ''
+ RewriteEngine on
+ RewriteRule /(.*) ${cgi}/hgweb.cgi/$1
+
+
+ AuthType Basic
+ AuthName "Mercurial repositories"
+ AuthUserFile ${config.dataDir}/hgusers
+
+ Require valid-user
+
+
+
+ Order allow,deny
+ Allow from all
+ AllowOverride All
+ Options ExecCGI
+ AddHandler cgi-script .cgi
+ PassEnv PYTHONPATH
+
+ '';
+
+ robotsEntries = ''
+ User-agent: *
+ Disallow: ${urlPrefix}
+ '';
+
+ extraServerPath = [ pkgs.python ];
+
+ globalEnvVars = [ { name = "PYTHONPATH"; value = "${mercurial}/lib/${pkgs.python.libPrefix}/site-packages"; } ];
+
+ options = {
+ urlPrefix = mkOption {
+ default = "/hg";
+ description = "
+ The URL prefix under which the Mercurial service appears.
+ Use the empty string to have it appear in the server root.
+ ";
+ };
+
+ dataDir = mkOption {
+ example = "/data/mercurial";
+ description = "
+ Path to the directory that holds the repositories.
+ ";
+ };
+ };
+
+}
diff --git a/nixos/modules/services/web-servers/apache-httpd/per-server-options.nix b/nixos/modules/services/web-servers/apache-httpd/per-server-options.nix
new file mode 100644
index 0000000000000000000000000000000000000000..a5227bae2d40df8f0b60349f89c5b05a03100051
--- /dev/null
+++ b/nixos/modules/services/web-servers/apache-httpd/per-server-options.nix
@@ -0,0 +1,146 @@
+# This file defines the options that can be used both for the Apache
+# main server configuration, and for the virtual hosts. (The latter
+# has additional options that affect the web server as a whole, like
+# the user/group to run under.)
+
+{forMainServer, mkOption}:
+
+{
+
+ hostName = mkOption {
+ default = "localhost";
+ description = "
+ Canonical hostname for the server.
+ ";
+ };
+
+ serverAliases = mkOption {
+ default = [];
+ example = ["www.example.org" "www.example.org:8080" "example.org"];
+ description = "
+ Additional names of virtual hosts served by this virtual host configuration.
+ ";
+ };
+
+ port = mkOption {
+ default = 0;
+ description = "
+ Port for the server. 0 means use the default port: 80 for http
+ and 443 for https (i.e. when enableSSL is set).
+ ";
+ };
+
+ enableSSL = mkOption {
+ default = false;
+ description = "
+ Whether to enable SSL (https) support.
+ ";
+ };
+
+ # Note: sslServerCert and sslServerKey can be left empty, but this
+ # only makes sense for virtual hosts (they will inherit from the
+ # main server).
+
+ sslServerCert = mkOption {
+ default = "";
+ example = "/var/host.cert";
+ description = "
+ Path to server SSL certificate.
+ ";
+ };
+
+ sslServerKey = mkOption {
+ default = "";
+ example = "/var/host.key";
+ description = "
+ Path to server SSL certificate key.
+ ";
+ };
+
+ adminAddr = mkOption ({
+ example = "admin@example.org";
+ description = "
+ E-mail address of the server administrator.
+ ";
+ } // (if forMainServer then {} else {default = "";}));
+
+ documentRoot = mkOption {
+ default = null;
+ example = "/data/webserver/docs";
+ description = "
+ The path of Apache's document root directory. If left undefined,
+ an empty directory in the Nix store will be used as root.
+ ";
+ };
+
+ servedDirs = mkOption {
+ default = [];
+ example = [
+ { urlPath = "/nix";
+ dir = "/home/eelco/Dev/nix-homepage";
+ }
+ ];
+ description = "
+ This option provides a simple way to serve static directories.
+ ";
+ };
+
+ servedFiles = mkOption {
+ default = [];
+ example = [
+ { urlPath = "/foo/bar.png";
+ dir = "/home/eelco/some-file.png";
+ }
+ ];
+ description = "
+ This option provides a simple way to serve individual, static files.
+ ";
+ };
+
+ extraConfig = mkOption {
+ default = "";
+ example = ''
+
+ Options FollowSymlinks
+ AllowOverride All
+
+ '';
+ description = "
+ These lines go to httpd.conf verbatim. They will go after
+ directories and directory aliases defined by default.
+ ";
+ };
+
+ extraSubservices = mkOption {
+ default = [];
+ description = "
+ Extra subservices to enable in the webserver.
+ ";
+ };
+
+ enableUserDir = mkOption {
+ default = false;
+ description = "
+ Whether to enable serving ~/public_html as
+ /~username.
+ ";
+ };
+
+ globalRedirect = mkOption {
+ default = "";
+ example = http://newserver.example.org/;
+ description = "
+ If set, all requests for this host are redirected permanently to
+ the given URL.
+ ";
+ };
+
+ logFormat = mkOption {
+ default = "common";
+ example = "combined";
+ description = "
+ Log format for Apache's log files. Possible values are: combined, common, referer, agent.
+ ";
+ };
+
+}
diff --git a/nixos/modules/services/web-servers/apache-httpd/tomcat-connector.nix b/nixos/modules/services/web-servers/apache-httpd/tomcat-connector.nix
new file mode 100644
index 0000000000000000000000000000000000000000..f12ae842b5874bfa32c325280ecdd4abbbdb9fbd
--- /dev/null
+++ b/nixos/modules/services/web-servers/apache-httpd/tomcat-connector.nix
@@ -0,0 +1,95 @@
+{ config, pkgs, serverInfo, ... }:
+
+let
+ extraWorkersProperties = pkgs.lib.optionalString (config ? extraWorkersProperties) config.extraWorkersProperties;
+
+ workersProperties = pkgs.writeText "workers.properties" ''
+# Define list of workers that will be used
+# for mapping requests
+# The configuration directives are valid
+# for the mod_jk version 1.2.18 and later
+#
+worker.list=loadbalancer,status
+
+# Define Node1
+# modify the host as your host IP or DNS name.
+worker.node1.port=8009
+worker.node1.host=localhost
+worker.node1.type=ajp13
+worker.node1.lbfactor=1
+
+# Load-balancing behaviour
+worker.loadbalancer.type=lb
+worker.loadbalancer.balance_workers=node1
+
+# Status worker for managing load balancer
+worker.status.type=status
+
+${extraWorkersProperties}
+ '';
+in
+{
+ extraModules = [
+ { name = "jk"; path = "${pkgs.tomcat_connectors}/modules/mod_jk.so"; }
+ ];
+
+ extraConfig = ''
+# Where to find workers.properties
+JkWorkersFile ${workersProperties}
+
+# Where to put jk logs
+JkLogFile ${config.logDir}/mod_jk.log
+
+# Set the jk log level [debug/error/info]
+JkLogLevel info
+
+# Select the log format
+JkLogStampFormat "[%a %b %d %H:%M:%S %Y]"
+
+# JkOptions indicates to send SSK KEY SIZE
+# Note: Changed from +ForwardURICompat.
+# See http://tomcat.apache.org/security-jk.html
+JkOptions +ForwardKeySize +ForwardURICompatUnparsed -ForwardDirectories
+
+# JkRequestLogFormat
+JkRequestLogFormat "%w %V %T"
+
+# Mount your applications
+JkMount /__application__/* loadbalancer
+
+# You can use external file for mount points.
+# It will be checked for updates each 60 seconds.
+# The format of the file is: /url=worker
+# /examples/*=loadbalancer
+#JkMountFile uriworkermap.properties
+
+# Add shared memory.
+# This directive is present with 1.2.10 and
+# later versions of mod_jk, and is needed for
+# for load balancing to work properly
+# Note: Replaced JkShmFile logs/jk.shm due to SELinux issues. Refer to
+# https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=225452
+JkShmFile ${config.stateDir}/jk.shm
+
+# Static files in all Tomcat webapp context directories are served by apache
+JkAutoAlias /var/tomcat/webapps
+
+# All requests go to worker by default
+JkMount /* loadbalancer
+# Serve some static files using httpd
+#JkUnMount /*.html loadbalancer
+#JkUnMount /*.jpg loadbalancer
+#JkUnMount /*.gif loadbalancer
+#JkUnMount /*.css loadbalancer
+#JkUnMount /*.png loadbalancer
+#JkUnMount /*.js loadbalancer
+
+# Add jkstatus for managing runtime data
+
+JkMount status
+Order deny,allow
+Deny from all
+Allow from 127.0.0.1
+
+ '';
+}
diff --git a/nixos/modules/services/web-servers/apache-httpd/trac.nix b/nixos/modules/services/web-servers/apache-httpd/trac.nix
new file mode 100644
index 0000000000000000000000000000000000000000..dc82fd34f2faa6386812703ba0d44c75e16bab3d
--- /dev/null
+++ b/nixos/modules/services/web-servers/apache-httpd/trac.nix
@@ -0,0 +1,121 @@
+{ config, pkgs, serverInfo, ... }:
+
+with pkgs.lib;
+
+let
+
+ # Build a Subversion instance with Apache modules and Swig/Python bindings.
+ subversion = pkgs.subversion.override (origArgs: {
+ bdbSupport = true;
+ httpServer = true;
+ sslSupport = true;
+ compressionSupport = true;
+ pythonBindings = true;
+ });
+
+ pythonLib = p: "${p}/";
+
+in
+
+{
+
+ options = {
+
+ projectsLocation = mkOption {
+ description = "URL path in which Trac projects can be accessed";
+ default = "/projects";
+ };
+
+ projects = mkOption {
+ description = "List of projects that should be provided by Trac. If they are not defined yet empty projects are created.";
+ default = [];
+ example =
+ [ { identifier = "myproject";
+ name = "My Project";
+ databaseURL="postgres://root:password@/tracdb";
+ subversionRepository="/data/subversion/myproject";
+ }
+ ];
+ };
+
+ user = mkOption {
+ default = "wwwrun";
+ description = "User account under which Trac runs.";
+ };
+
+ group = mkOption {
+ default = "wwwrun";
+ description = "Group under which Trac runs.";
+ };
+
+ ldapAuthentication = {
+ enable = mkOption {
+ default = false;
+ description = "Enable the ldap authentication in trac";
+ };
+
+ url = mkOption {
+ default = "ldap://127.0.0.1/dc=example,dc=co,dc=ke?uid?sub?(objectClass=inetOrgPerson)";
+ description = "URL of the LDAP authentication";
+ };
+
+ name = mkOption {
+ default = "Trac server";
+ description = "AuthName";
+ };
+ };
+
+ };
+
+ extraModules = singleton
+ { name = "python"; path = "${pkgs.mod_python}/modules/mod_python.so"; };
+
+ extraConfig = ''
+
+ SetHandler mod_python
+ PythonHandler trac.web.modpython_frontend
+ PythonOption TracEnvParentDir /var/trac/projects
+ PythonOption TracUriRoot ${config.projectsLocation}
+ PythonOption PYTHON_EGG_CACHE /var/trac/egg-cache
+
+ ${if config.ldapAuthentication.enable then ''
+
+ AuthType Basic
+ AuthName "${config.ldapAuthentication.name}"
+ AuthBasicProvider "ldap"
+ AuthLDAPURL "${config.ldapAuthentication.url}"
+ authzldapauthoritative Off
+ require valid-user
+
+ '' else ""}
+ '';
+
+ globalEnvVars = singleton
+ { name = "PYTHONPATH";
+ value =
+ makeSearchPath "lib/${pkgs.python.libPrefix}/site-packages"
+ [ pkgs.mod_python
+ pkgs.pythonPackages.trac
+ pkgs.setuptools
+ pkgs.pythonPackages.genshi
+ pkgs.pythonPackages.psycopg2
+ pkgs.python.modules.sqlite3
+ subversion
+ ];
+ };
+
+ startupScript = pkgs.writeScript "activateTrac" ''
+ mkdir -p /var/trac
+ chown ${config.user}:${config.group} /var/trac
+
+ ${concatMapStrings (project:
+ ''
+ if [ ! -d /var/trac/${project.identifier} ]
+ then
+ export PYTHONPATH=${pkgs.pythonPackages.psycopg2}/lib/${pkgs.python.libPrefix}/site-packages
+ ${pkgs.pythonPackages.trac}/bin/trac-admin /var/trac/${project.identifier} initenv "${project.name}" "${project.databaseURL}" svn "${project.subversionRepository}"
+ fi
+ '' ) (config.projects)}
+ '';
+
+}
diff --git a/nixos/modules/services/web-servers/apache-httpd/zabbix.nix b/nixos/modules/services/web-servers/apache-httpd/zabbix.nix
new file mode 100644
index 0000000000000000000000000000000000000000..a6e6042fdf6d9af689ed4ce11c1097930b4ba2c6
--- /dev/null
+++ b/nixos/modules/services/web-servers/apache-httpd/zabbix.nix
@@ -0,0 +1,82 @@
+{ config, pkgs, serverInfo, ... }:
+
+let
+
+ # The Zabbix PHP frontend needs to be able to write its
+ # configuration settings (the connection info to the database) to
+ # the "conf" subdirectory. So symlink $out/conf to some directory
+ # outside of the Nix store where we want to keep this stateful info.
+ # Note that different instances of the frontend will therefore end
+ # up with their own copies of the PHP sources. !!! Alternatively,
+ # we could generate zabbix.conf.php declaratively.
+ zabbixPHP = pkgs.runCommand "${pkgs.zabbix.server.name}-php" {}
+ ''
+ cp -rs ${pkgs.zabbix.server}/share/zabbix/php "$out"
+ chmod -R u+w $out
+ ln -s "${if config.configFile == null
+ then "${config.stateDir}/zabbix.conf.php"
+ else config.configFile}" "$out/conf/zabbix.conf.php"
+ '';
+
+in
+
+{
+
+ enablePHP = true;
+
+ phpOptions =
+ ''
+ post_max_size = 32M
+ max_execution_time = 300
+ max_input_time = 300
+ '';
+
+ extraConfig = ''
+ Alias ${config.urlPrefix}/ ${zabbixPHP}/
+
+
+ DirectoryIndex index.php
+ Order deny,allow
+ Allow from *
+
+ '';
+
+ startupScript = pkgs.writeScript "zabbix-startup-hook" ''
+ mkdir -p ${config.stateDir}
+ chown -R ${serverInfo.serverConfig.user} ${config.stateDir}
+ '';
+
+ # The frontend needs "ps" to find out whether zabbix_server is running.
+ extraServerPath = [ pkgs.procps ];
+
+ options = {
+
+ urlPrefix = pkgs.lib.mkOption {
+ default = "/zabbix";
+ description = "
+ The URL prefix under which the Zabbix service appears.
+ Use the empty string to have it appear in the server root.
+ ";
+ };
+
+ configFile = pkgs.lib.mkOption {
+ default = null;
+ type = with pkgs.lib.types; nullOr path;
+ description = ''
+ The configuration file (zabbix.conf.php) which contains the database
+ connection settings. If not set, the configuration settings will created
+ by the web installer.
+ '';
+ };
+
+ stateDir = pkgs.lib.mkOption {
+ default = "/var/lib/zabbix/frontend";
+ description = "
+ Directory where the dynamically generated configuration data
+ of the PHP frontend will be stored.
+ ";
+ };
+
+ };
+
+}
diff --git a/nixos/modules/services/web-servers/jboss/builder.sh b/nixos/modules/services/web-servers/jboss/builder.sh
new file mode 100644
index 0000000000000000000000000000000000000000..2eb89a90f67d50815a2eba2255851ab82ec71e28
--- /dev/null
+++ b/nixos/modules/services/web-servers/jboss/builder.sh
@@ -0,0 +1,72 @@
+set -e
+
+source $stdenv/setup
+
+mkdir -p $out/bin
+
+cat > $out/bin/control <false|true|' default/deploy/jboss-web.deployer/META-INF/jboss-service.xml
+ sed -i -e 's|||' default/deploy/jboss-web.deployer/server.xml
+ fi
+
+ # Make files accessible for the server user
+
+ chown -R $user $serverDir
+ for i in \`find $serverDir -type d\`
+ do
+ chmod 755 \$i
+ done
+ for i in \`find $serverDir -type f\`
+ do
+ chmod 644 \$i
+ done
+fi
+EOF
+
+chmod +x $out/bin/*
diff --git a/nixos/modules/services/web-servers/jboss/default.nix b/nixos/modules/services/web-servers/jboss/default.nix
new file mode 100644
index 0000000000000000000000000000000000000000..e1bcede6563cf4745647e75ec89cbe9da576f5e7
--- /dev/null
+++ b/nixos/modules/services/web-servers/jboss/default.nix
@@ -0,0 +1,83 @@
+{ config, pkgs, ... }:
+
+with pkgs.lib;
+
+let
+
+ cfg = config.services.jboss;
+
+ jbossService = pkgs.stdenv.mkDerivation {
+ name = "jboss-server";
+ builder = ./builder.sh;
+ inherit (pkgs) jboss su;
+ inherit (cfg) tempDir logDir libUrl deployDir serverDir user useJK;
+ };
+
+in
+
+{
+
+ ###### interface
+
+ options = {
+
+ services.jboss = {
+
+ enable = mkOption {
+ default = false;
+ description = "Whether to enable jboss";
+ };
+
+ tempDir = mkOption {
+ default = "/tmp";
+ description = "Location where JBoss stores its temp files";
+ };
+
+ logDir = mkOption {
+ default = "/var/log/jboss";
+ description = "Location of the logfile directory of JBoss";
+ };
+
+ serverDir = mkOption {
+ description = "Location of the server instance files";
+ default = "/var/jboss/server";
+ };
+
+ deployDir = mkOption {
+ description = "Location of the deployment files";
+ default = "/nix/var/nix/profiles/default/server/default/deploy/";
+ };
+
+ libUrl = mkOption {
+ default = "file:///nix/var/nix/profiles/default/server/default/lib";
+ description = "Location where the shared library JARs are stored";
+ };
+
+ user = mkOption {
+ default = "nobody";
+ description = "User account under which jboss runs.";
+ };
+
+ useJK = mkOption {
+ default = false;
+ description = "Whether to use to connector to the Apache HTTP server";
+ };
+
+ };
+
+ };
+
+
+ ###### implementation
+
+ config = mkIf config.services.jboss.enable {
+
+ jobs.jboss =
+ { description = "JBoss server";
+
+ exec = "${jbossService}/bin/control start";
+ };
+
+ };
+
+}
diff --git a/nixos/modules/services/web-servers/lighttpd/cgit.nix b/nixos/modules/services/web-servers/lighttpd/cgit.nix
new file mode 100644
index 0000000000000000000000000000000000000000..62264f1db452ce9aef4cf6d92e56094cf63d39c0
--- /dev/null
+++ b/nixos/modules/services/web-servers/lighttpd/cgit.nix
@@ -0,0 +1,65 @@
+{ config, pkgs, ... }:
+
+with pkgs.lib;
+
+let
+ cfg = config.services.lighttpd.cgit;
+ configFile = pkgs.writeText "cgitrc"
+ ''
+ ${cfg.configText}
+ '';
+in
+{
+
+ options.services.lighttpd.cgit = {
+
+ enable = mkOption {
+ default = false;
+ type = types.uniq types.bool;
+ description = ''
+ If true, enable cgit (fast web interface for git repositories) as a
+ sub-service in lighttpd. cgit will be accessible at
+ http://yourserver/cgit
+ '';
+ };
+
+ configText = mkOption {
+ default = "";
+ example = ''
+ cache-size=1000
+ scan-path=/srv/git
+ '';
+ type = types.string;
+ description = ''
+ Verbatim contents of the cgit runtime configuration file. Documentation
+ (with cgitrc example file) is available in "man cgitrc". Or online:
+ http://git.zx2c4.com/cgit/tree/cgitrc.5.txt
+ '';
+ };
+
+ };
+
+ config = mkIf cfg.enable {
+
+ # make the cgitrc manpage available
+ environment.systemPackages = [ pkgs.cgit ];
+
+ services.lighttpd.extraConfig = ''
+ $HTTP["url"] =~ "^/cgit" {
+ cgi.assign = (
+ "cgit.cgi" => "${pkgs.cgit}/cgit/cgit.cgi"
+ )
+ alias.url = (
+ "/cgit.css" => "${pkgs.cgit}/cgit/cgit.css",
+ "/cgit.png" => "${pkgs.cgit}/cgit/cgit.png",
+ "/cgit" => "${pkgs.cgit}/cgit/cgit.cgi"
+ )
+ setenv.add-environment = (
+ "CGIT_CONFIG" => "${configFile}"
+ )
+ }
+ '';
+
+ };
+
+}
diff --git a/nixos/modules/services/web-servers/lighttpd/default.nix b/nixos/modules/services/web-servers/lighttpd/default.nix
new file mode 100644
index 0000000000000000000000000000000000000000..f9e40fc4b5415b984863c633683d5c473ffe82aa
--- /dev/null
+++ b/nixos/modules/services/web-servers/lighttpd/default.nix
@@ -0,0 +1,178 @@
+# NixOS module for lighttpd web server
+
+{ config, pkgs, ... }:
+
+with pkgs.lib;
+
+let
+
+ cfg = config.services.lighttpd;
+
+ needModRedirect = cfg.gitweb.enable;
+ needModAlias = cfg.cgit.enable or cfg.gitweb.enable;
+ needModSetenv = cfg.cgit.enable or cfg.gitweb.enable;
+ needModCgi = cfg.cgit.enable or cfg.gitweb.enable;
+ needModStatus = cfg.mod_status;
+ needModUserdir = cfg.mod_userdir;
+
+ configFile = if cfg.configText != "" then
+ pkgs.writeText "lighttpd.conf" ''
+ ${cfg.configText}
+ ''
+ else
+ pkgs.writeText "lighttpd.conf" ''
+ server.document-root = "${cfg.document-root}"
+ server.port = ${toString cfg.port}
+ server.username = "lighttpd"
+ server.groupname = "lighttpd"
+
+ # As for why all modules are loaded here, instead of having small
+ # server.modules += () entries in each sub-service extraConfig snippet,
+ # read this:
+ #
+ # http://redmine.lighttpd.net/projects/1/wiki/Server_modulesDetails
+ # http://redmine.lighttpd.net/issues/2337
+ #
+ # Basically, lighttpd doesn't want to load (or even silently ignore) a
+ # module for a second time, and there is no way to check if a module has
+ # been loaded already. So if two services were to put the same module in
+ # server.modules += (), that would break the lighttpd configuration.
+ server.modules = (
+ ${optionalString needModRedirect ''"mod_redirect",''}
+ ${optionalString needModAlias ''"mod_alias",''}
+ ${optionalString needModSetenv ''"mod_setenv",''}
+ ${optionalString needModCgi ''"mod_cgi",''}
+ ${optionalString needModStatus ''"mod_status",''}
+ ${optionalString needModUserdir ''"mod_userdir",''}
+ "mod_accesslog"
+ )
+
+ # Logging (logs end up in systemd journal)
+ accesslog.use-syslog = "enable"
+ server.errorlog-use-syslog = "enable"
+
+ mimetype.assign = (
+ ".html" => "text/html",
+ ".htm" => "text/html",
+ ".txt" => "text/plain",
+ ".jpg" => "image/jpeg",
+ ".png" => "image/png",
+ ".css" => "text/css"
+ )
+
+ static-file.exclude-extensions = ( ".fcgi", ".php", ".rb", "~", ".inc" )
+ index-file.names = ( "index.html" )
+
+ ${if cfg.mod_userdir then ''
+ userdir.path = "public_html"
+ '' else ""}
+
+ ${if cfg.mod_status then ''
+ status.status-url = "/server-status"
+ status.statistics-url = "/server-statistics"
+ status.config-url = "/server-config"
+ '' else ""}
+
+ ${cfg.extraConfig}
+ '';
+
+in
+
+{
+
+ options = {
+
+ services.lighttpd = {
+
+ enable = mkOption {
+ default = false;
+ type = types.uniq types.bool;
+ description = ''
+ Enable the lighttpd web server.
+ '';
+ };
+
+ port = mkOption {
+ default = 80;
+ type = types.uniq types.int;
+ description = ''
+ TCP port number for lighttpd to bind to.
+ '';
+ };
+
+ document-root = mkOption {
+ default = "/srv/www";
+ type = types.uniq types.string;
+ description = ''
+ Document-root of the web server. Must be readable by the "lighttpd" user.
+ '';
+ };
+
+ mod_userdir = mkOption {
+ default = false;
+ type = types.uniq types.bool;
+ description = ''
+ If true, requests in the form /~user/page.html are rewritten to take
+ the file public_html/page.html from the home directory of the user.
+ '';
+ };
+
+ mod_status = mkOption {
+ default = false;
+ type = types.uniq types.bool;
+ description = ''
+ Show server status overview at /server-status, statistics at
+ /server-statistics and list of loaded modules at /server-config.
+ '';
+ };
+
+ configText = mkOption {
+ default = "";
+ type = types.string;
+ example = ''...verbatim config file contents...'';
+ description = ''
+ Overridable config file contents to use for lighttpd. By default, use
+ the contents automatically generated by NixOS.
+ '';
+ };
+
+ extraConfig = mkOption {
+ default = "";
+ type = types.string;
+ description = ''
+ These configuration lines will be appended to the generated lighttpd
+ config file. Note that this mechanism does not work when the manual
+
configText
option is used.
+ '';
+ };
+
+ };
+
+ };
+
+ config = mkIf cfg.enable {
+
+ systemd.services.lighttpd = {
+ description = "Lighttpd Web Server";
+ after = [ "network.target" ];
+ wantedBy = [ "multi-user.target" ];
+ preStart = ''
+ ${if cfg.cgit.enable then ''
+ mkdir -p /var/cache/cgit
+ chown lighttpd:lighttpd /var/cache/cgit
+ '' else ""}
+ '';
+ serviceConfig.ExecStart = "${pkgs.lighttpd}/sbin/lighttpd -D -f ${configFile}";
+ # SIGINT => graceful shutdown
+ serviceConfig.KillSignal = "SIGINT";
+ };
+
+ users.extraUsers.lighttpd = {
+ group = "lighttpd";
+ description = "lighttpd web server privilege separation user";
+ uid = config.ids.uids.lighttpd;
+ };
+
+ users.extraGroups.lighttpd.gid = config.ids.gids.lighttpd;
+ };
+}
diff --git a/nixos/modules/services/web-servers/lighttpd/gitweb.nix b/nixos/modules/services/web-servers/lighttpd/gitweb.nix
new file mode 100644
index 0000000000000000000000000000000000000000..d759d8144b64e4558e663a3ed6283738c27accf5
--- /dev/null
+++ b/nixos/modules/services/web-servers/lighttpd/gitweb.nix
@@ -0,0 +1,67 @@
+{ config, pkgs, ... }:
+
+with pkgs.lib;
+
+let
+ cfg = config.services.lighttpd.gitweb;
+ gitwebConfigFile = pkgs.writeText "gitweb.conf" ''
+ # path to git projects (.git)
+ $projectroot = "${cfg.projectroot}";
+ ${cfg.extraConfig}
+ '';
+
+in
+{
+
+ options.services.lighttpd.gitweb = {
+
+ enable = mkOption {
+ default = false;
+ type = types.uniq types.bool;
+ description = ''
+ If true, enable gitweb in lighttpd. Access it at http://yourserver/gitweb
+ '';
+ };
+
+ projectroot = mkOption {
+ default = "/srv/git";
+ type = types.uniq types.string;
+ description = ''
+ Path to git projects (bare repositories) that should be served by
+ gitweb. Must not end with a slash.
+ '';
+ };
+
+ extraConfig = mkOption {
+ default = "";
+ type = types.uniq types.string;
+ description = ''
+ Verbatim configuration text appended to the generated gitweb.conf file.
+ '';
+ };
+
+ };
+
+ config = mkIf cfg.enable {
+
+ services.lighttpd.extraConfig = ''
+ $HTTP["url"] =~ "^/gitweb" {
+ cgi.assign = (
+ ".cgi" => "${pkgs.perl}/bin/perl"
+ )
+ url.redirect = (
+ "^/gitweb$" => "/gitweb/"
+ )
+ alias.url = (
+ "/gitweb/static/" => "${pkgs.git}/share/gitweb/static/",
+ "/gitweb/" => "${pkgs.git}/share/gitweb/gitweb.cgi"
+ )
+ setenv.add-environment = (
+ "GITWEB_CONFIG" => "${gitwebConfigFile}"
+ )
+ }
+ '';
+
+ };
+
+}
diff --git a/nixos/modules/services/web-servers/nginx/default.nix b/nixos/modules/services/web-servers/nginx/default.nix
new file mode 100644
index 0000000000000000000000000000000000000000..b26af1aa744550fdf272304100358cb76d3fd243
--- /dev/null
+++ b/nixos/modules/services/web-servers/nginx/default.nix
@@ -0,0 +1,88 @@
+{ config, pkgs, ... }:
+
+with pkgs.lib;
+
+let
+ cfg = config.services.nginx;
+ nginx = pkgs.nginx.override { fullWebDAV = cfg.fullWebDAV; };
+ configFile = pkgs.writeText "nginx.conf" ''
+ user ${cfg.user} ${cfg.group};
+ daemon off;
+ ${cfg.config}
+ '';
+in
+
+{
+ options = {
+ services.nginx = {
+ enable = mkOption {
+ default = false;
+ description = "
+ Enable the nginx Web Server.
+ ";
+ };
+
+ config = mkOption {
+ default = "events {}";
+ description = "
+ Verbatim nginx.conf configuration.
+ ";
+ };
+
+ stateDir = mkOption {
+ default = "/var/spool/nginx";
+ description = "
+ Directory holding all state for nginx to run.
+ ";
+ };
+
+ user = mkOption {
+ default = "nginx";
+ description = "User account under which nginx runs.";
+ };
+
+ group = mkOption {
+ default = "nginx";
+ description = "Group account under which nginx runs.";
+ };
+
+ fullWebDAV = mkOption {
+ default = false;
+ description = "Compile in a third party module providing full WebDAV support";
+ };
+ };
+
+ };
+
+ config = mkIf cfg.enable {
+ environment.systemPackages = [ nginx ];
+
+ # TODO: test user supplied config file pases syntax test
+
+ systemd.services.nginx = {
+ description = "Nginx Web Server";
+ after = [ "network.target" ];
+ wantedBy = [ "multi-user.target" ];
+ path = [ nginx ];
+ preStart =
+ ''
+ mkdir -p ${cfg.stateDir}/logs
+ chown -R ${cfg.user}:${cfg.group} ${cfg.stateDir}
+ '';
+ serviceConfig = {
+ ExecStart = "${nginx}/bin/nginx -c ${configFile} -p ${cfg.stateDir}";
+ };
+ };
+
+ users.extraUsers = optionalAttrs (cfg.user == "nginx") (singleton
+ { name = "nginx";
+ group = "nginx";
+ uid = config.ids.uids.nginx;
+ });
+
+ users.extraGroups = optionalAttrs (cfg.group == "nginx") (singleton
+ { name = "nginx";
+ gid = config.ids.gids.nginx;
+ });
+ };
+}
diff --git a/nixos/modules/services/web-servers/tomcat.nix b/nixos/modules/services/web-servers/tomcat.nix
new file mode 100644
index 0000000000000000000000000000000000000000..a68828de5d8e6d877f9f863e5ac90a46897af0f0
--- /dev/null
+++ b/nixos/modules/services/web-servers/tomcat.nix
@@ -0,0 +1,344 @@
+{ config, pkgs, ... }:
+
+with pkgs.lib;
+
+let
+
+ cfg = config.services.tomcat;
+ tomcat = pkgs.tomcat6;
+in
+
+{
+
+ ###### interface
+
+ options = {
+
+ services.tomcat = {
+
+ enable = mkOption {
+ default = false;
+ description = "Whether to enable Apache Tomcat";
+ };
+
+ baseDir = mkOption {
+ default = "/var/tomcat";
+ description = "Location where Tomcat stores configuration files, webapplications and logfiles";
+ };
+
+ extraGroups = mkOption {
+ default = [];
+ example = [ "users" ];
+ description = "Defines extra groups to which the tomcat user belongs.";
+ };
+
+ user = mkOption {
+ default = "tomcat";
+ description = "User account under which Apache Tomcat runs.";
+ };
+
+ group = mkOption {
+ default = "tomcat";
+ description = "Group account under which Apache Tomcat runs.";
+ };
+
+ javaOpts = mkOption {
+ default = "";
+ description = "Parameters to pass to the Java Virtual Machine which spawns Apache Tomcat";
+ };
+
+ catalinaOpts = mkOption {
+ default = "";
+ description = "Parameters to pass to the Java Virtual Machine which spawns the Catalina servlet container";
+ };
+
+ sharedLibs = mkOption {
+ default = [];
+ description = "List containing JAR files or directories with JAR files which are libraries shared by the web applications";
+ };
+
+ commonLibs = mkOption {
+ default = [];
+ description = "List containing JAR files or directories with JAR files which are libraries shared by the web applications and the servlet container";
+ };
+
+ webapps = mkOption {
+ default = [ tomcat ];
+ description = "List containing WAR files or directories with WAR files which are web applications to be deployed on Tomcat";
+ };
+
+ virtualHosts = mkOption {
+ default = [];
+ description = "List consisting of a virtual host name and a list of web applications to deploy on each virtual host";
+ };
+
+ logPerVirtualHost = mkOption {
+ default = false;
+ description = "Whether to enable logging per virtual host.";
+ };
+
+ axis2 = {
+
+ enable = mkOption {
+ default = false;
+ description = "Whether to enable an Apache Axis2 container";
+ };
+
+ services = mkOption {
+ default = [];
+ description = "List containing AAR files or directories with AAR files which are web services to be deployed on Axis2";
+ };
+
+ };
+
+ };
+
+ };
+
+
+ ###### implementation
+
+ config = mkIf config.services.tomcat.enable {
+
+ users.extraGroups = singleton
+ { name = "tomcat";
+ gid = config.ids.gids.tomcat;
+ };
+
+ users.extraUsers = singleton
+ { name = "tomcat";
+ uid = config.ids.uids.tomcat;
+ description = "Tomcat user";
+ home = "/homeless-shelter";
+ extraGroups = cfg.extraGroups;
+ };
+
+ jobs.tomcat =
+ { description = "Apache Tomcat server";
+
+ startOn = "started network-interfaces";
+ stopOn = "stopping network-interfaces";
+
+ preStart =
+ ''
+ # Create the base directory
+ mkdir -p ${cfg.baseDir}
+
+ # Create a symlink to the bin directory of the tomcat component
+ ln -sfn ${tomcat}/bin ${cfg.baseDir}/bin
+
+ # Create a conf/ directory
+ mkdir -p ${cfg.baseDir}/conf
+ chown ${cfg.user}:${cfg.group} ${cfg.baseDir}/conf
+
+ # Symlink the config files in the conf/ directory (except for catalina.properties and server.xml)
+ for i in $(ls ${tomcat}/conf | grep -v catalina.properties | grep -v server.xml)
+ do
+ ln -sfn ${tomcat}/conf/$i ${cfg.baseDir}/conf/`basename $i`
+ done
+
+ # Create subdirectory for virtual hosts
+ mkdir -p ${cfg.baseDir}/virtualhosts
+
+ # Create a modified catalina.properties file
+ # Change all references from CATALINA_HOME to CATALINA_BASE and add support for shared libraries
+ sed -e 's|''${catalina.home}|''${catalina.base}|g' \
+ -e 's|shared.loader=|shared.loader=''${catalina.base}/shared/lib/*.jar|' \
+ ${tomcat}/conf/catalina.properties > ${cfg.baseDir}/conf/catalina.properties
+
+ # Create a modified server.xml which also includes all virtual hosts
+ sed -e "//a\ ${
+ toString (map (virtualHost: ''${if cfg.logPerVirtualHost then '''' else ""}'') cfg.virtualHosts)}" \
+ ${tomcat}/conf/server.xml > ${cfg.baseDir}/conf/server.xml
+
+ # Create a logs/ directory
+ mkdir -p ${cfg.baseDir}/logs
+ chown ${cfg.user}:${cfg.group} ${cfg.baseDir}/logs
+ ${if cfg.logPerVirtualHost then
+ toString (map (h: ''
+ mkdir -p ${cfg.baseDir}/logs/${h.name}
+ chown ${cfg.user}:${cfg.group} ${cfg.baseDir}/logs/${h.name}
+ '') cfg.virtualHosts) else ''''}
+
+ # Create a temp/ directory
+ mkdir -p ${cfg.baseDir}/temp
+ chown ${cfg.user}:${cfg.group} ${cfg.baseDir}/temp
+
+ # Create a lib/ directory
+ mkdir -p ${cfg.baseDir}/lib
+ chown ${cfg.user}:${cfg.group} ${cfg.baseDir}/lib
+
+ # Create a shared/lib directory
+ mkdir -p ${cfg.baseDir}/shared/lib
+ chown ${cfg.user}:${cfg.group} ${cfg.baseDir}/shared/lib
+
+ # Create a webapps/ directory
+ mkdir -p ${cfg.baseDir}/webapps
+ chown ${cfg.user}:${cfg.group} ${cfg.baseDir}/webapps
+
+ # Symlink all the given common libs files or paths into the lib/ directory
+ for i in ${tomcat} ${toString cfg.commonLibs}
+ do
+ if [ -f $i ]
+ then
+ # If the given web application is a file, symlink it into the common/lib/ directory
+ ln -sfn $i ${cfg.baseDir}/lib/`basename $i`
+ elif [ -d $i ]
+ then
+ # If the given web application is a directory, then iterate over the files
+ # in the special purpose directories and symlink them into the tomcat tree
+
+ for j in $i/lib/*
+ do
+ ln -sfn $j ${cfg.baseDir}/lib/`basename $j`
+ done
+ fi
+ done
+
+ # Symlink all the given shared libs files or paths into the shared/lib/ directory
+ for i in ${toString cfg.sharedLibs}
+ do
+ if [ -f $i ]
+ then
+ # If the given web application is a file, symlink it into the common/lib/ directory
+ ln -sfn $i ${cfg.baseDir}/shared/lib/`basename $i`
+ elif [ -d $i ]
+ then
+ # If the given web application is a directory, then iterate over the files
+ # in the special purpose directories and symlink them into the tomcat tree
+
+ for j in $i/shared/lib/*
+ do
+ ln -sfn $j ${cfg.baseDir}/shared/lib/`basename $j`
+ done
+ fi
+ done
+
+ # Symlink all the given web applications files or paths into the webapps/ directory
+ for i in ${toString cfg.webapps}
+ do
+ if [ -f $i ]
+ then
+ # If the given web application is a file, symlink it into the webapps/ directory
+ ln -sfn $i ${cfg.baseDir}/webapps/`basename $i`
+ elif [ -d $i ]
+ then
+ # If the given web application is a directory, then iterate over the files
+ # in the special purpose directories and symlink them into the tomcat tree
+
+ for j in $i/webapps/*
+ do
+ ln -sfn $j ${cfg.baseDir}/webapps/`basename $j`
+ done
+
+ # Also symlink the configuration files if they are included
+ if [ -d $i/conf/Catalina ]
+ then
+ for j in $i/conf/Catalina/*
+ do
+ mkdir -p ${cfg.baseDir}/conf/Catalina/localhost
+ ln -sfn $j ${cfg.baseDir}/conf/Catalina/localhost/`basename $j`
+ done
+ fi
+ fi
+ done
+
+ ${toString (map (virtualHost: ''
+ # Create webapps directory for the virtual host
+ mkdir -p ${cfg.baseDir}/virtualhosts/${virtualHost.name}/webapps
+
+ # Modify ownership
+ chown ${cfg.user}:${cfg.group} ${cfg.baseDir}/virtualhosts/${virtualHost.name}/webapps
+
+ # Symlink all the given web applications files or paths into the webapps/ directory
+ # of this virtual host
+ for i in "${if virtualHost ? webapps then toString virtualHost.webapps else ""}"
+ do
+ if [ -f $i ]
+ then
+ # If the given web application is a file, symlink it into the webapps/ directory
+ ln -sfn $i ${cfg.baseDir}/virtualhosts/${virtualHost.name}/webapps/`basename $i`
+ elif [ -d $i ]
+ then
+ # If the given web application is a directory, then iterate over the files
+ # in the special purpose directories and symlink them into the tomcat tree
+
+ for j in $i/webapps/*
+ do
+ ln -sfn $j ${cfg.baseDir}/virtualhosts/${virtualHost.name}/webapps/`basename $j`
+ done
+
+ # Also symlink the configuration files if they are included
+ if [ -d $i/conf/Catalina ]
+ then
+ for j in $i/conf/Catalina/*
+ do
+ mkdir -p ${cfg.baseDir}/conf/Catalina/${virtualHost.name}
+ ln -sfn $j ${cfg.baseDir}/conf/Catalina/${virtualHost.name}/`basename $j`
+ done
+ fi
+ fi
+ done
+
+ ''
+ ) cfg.virtualHosts) }
+
+ # Create a work/ directory
+ mkdir -p ${cfg.baseDir}/work
+ chown ${cfg.user}:${cfg.group} ${cfg.baseDir}/work
+
+ ${if cfg.axis2.enable then
+ ''
+ # Copy the Axis2 web application
+ cp -av ${pkgs.axis2}/webapps/axis2 ${cfg.baseDir}/webapps
+
+ # Turn off addressing, which causes many errors
+ sed -i -e 's%%%' ${cfg.baseDir}/webapps/axis2/WEB-INF/conf/axis2.xml
+
+ # Modify permissions on the Axis2 application
+ chown -R ${cfg.user}:${cfg.group} ${cfg.baseDir}/webapps/axis2
+
+ # Symlink all the given web service files or paths into the webapps/axis2/WEB-INF/services directory
+ for i in ${toString cfg.axis2.services}
+ do
+ if [ -f $i ]
+ then
+ # If the given web service is a file, symlink it into the webapps/axis2/WEB-INF/services
+ ln -sfn $i ${cfg.baseDir}/webapps/axis2/WEB-INF/services/`basename $i`
+ elif [ -d $i ]
+ then
+ # If the given web application is a directory, then iterate over the files
+ # in the special purpose directories and symlink them into the tomcat tree
+
+ for j in $i/webapps/axis2/WEB-INF/services/*
+ do
+ ln -sfn $j ${cfg.baseDir}/webapps/axis2/WEB-INF/services/`basename $j`
+ done
+
+ # Also symlink the configuration files if they are included
+ if [ -d $i/conf/Catalina ]
+ then
+ for j in $i/conf/Catalina/*
+ do
+ ln -sfn $j ${cfg.baseDir}/conf/Catalina/localhost/`basename $j`
+ done
+ fi
+ fi
+ done
+ ''
+ else ""}
+
+ ${pkgs.su}/bin/su -s ${pkgs.bash}/bin/sh ${cfg.user} -c 'CATALINA_BASE=${cfg.baseDir} JAVA_HOME=${pkgs.jdk} JAVA_OPTS="${cfg.javaOpts}" CATALINA_OPTS="${cfg.catalinaOpts}" ${tomcat}/bin/startup.sh'
+ '';
+
+ postStop =
+ ''
+ echo "Stopping tomcat..."
+ CATALINA_BASE=${cfg.baseDir} JAVA_HOME=${pkgs.jdk} ${pkgs.su}/bin/su -s ${pkgs.bash}/bin/sh ${cfg.user} -c ${tomcat}/bin/shutdown.sh
+ '';
+
+ };
+
+ };
+
+}
diff --git a/nixos/modules/services/web-servers/varnish/default.nix b/nixos/modules/services/web-servers/varnish/default.nix
new file mode 100644
index 0000000000000000000000000000000000000000..7e327120c3d15946b8c898a1ae87453ab8a64176
--- /dev/null
+++ b/nixos/modules/services/web-servers/varnish/default.nix
@@ -0,0 +1,63 @@
+{ config, pkgs, ...}:
+let
+ cfg = config.services.varnish;
+
+in
+with pkgs.lib;
+{
+ options = {
+ services.varnish = {
+ enable = mkOption {
+ default = false;
+ description = "
+ Enable the Varnish Server.
+ ";
+ };
+
+ http_address = mkOption {
+ default = "*:6081";
+ description = "
+ HTTP listen address and port.
+ ";
+ };
+
+ config = mkOption {
+ description = "
+ Verbatim default.vcl configuration.
+ ";
+ };
+
+ stateDir = mkOption {
+ default = "/var/spool/varnish";
+ description = "
+ Directory holding all state for Varnish to run.
+ ";
+ };
+ };
+
+ };
+
+ config = mkIf cfg.enable {
+
+ systemd.services.varnish = {
+ description = "Varnish";
+ wantedBy = [ "multi-user.target" ];
+ preStart = ''
+ mkdir -p ${cfg.stateDir}
+ chown -R varnish:varnish ${cfg.stateDir}
+ '';
+ path = [ pkgs.gcc ];
+ serviceConfig.ExecStart = "${pkgs.varnish}/sbin/varnishd -a ${cfg.http_address} -f ${pkgs.writeText "default.vcl" cfg.config} -n ${cfg.stateDir} -u varnish";
+ serviceConfig.Type = "forking";
+ };
+
+ environment.systemPackages = [ pkgs.varnish ];
+
+ users.extraUsers.varnish = {
+ group = "varnish";
+ uid = config.ids.uids.varnish;
+ };
+
+ users.extraGroups.varnish.gid = config.ids.uids.varnish;
+ };
+}
diff --git a/nixos/modules/services/web-servers/zope2.nix b/nixos/modules/services/web-servers/zope2.nix
new file mode 100644
index 0000000000000000000000000000000000000000..19afa55d7fef1796009036330380b9a2534e9a96
--- /dev/null
+++ b/nixos/modules/services/web-servers/zope2.nix
@@ -0,0 +1,249 @@
+{ pkgs, config, ... }:
+
+with pkgs.lib;
+
+let
+
+ cfg = config.services.zope2;
+
+ zope2Opts = { name, config, ... }: {
+ options = {
+
+ name = mkOption {
+ default = "${name}";
+ type = types.string;
+ description = "The name of the zope2 instance. If undefined, the name of the attribute set will be used.";
+ };
+
+ threads = mkOption {
+ default = 2;
+ type = types.int;
+ description = "Specify the number of threads that Zope's ZServer web server will use to service requests. ";
+ };
+
+ http_address = mkOption {
+ default = "localhost:8080";
+ type = types.string;
+ description = "Give a port and adress for the HTTP server.";
+ };
+
+ user = mkOption {
+ default = "zope2";
+ type = types.string;
+ description = "The name of the effective user for the Zope process.";
+ };
+
+ extra = mkOption {
+ default =
+ ''
+
+ mount-point /
+ cache-size 30000
+
+ blob-dir /var/lib/zope2/${name}/blobstorage
+
+ path /var/lib/zope2/${name}/filestorage/Data.fs
+
+
+
+ '';
+ type = types.string;
+ description = "Extra zope.conf";
+ };
+
+ packages = mkOption {
+ type = types.listOf types.package;
+ description = "The list of packages you want to make available to the zope2 instance.";
+ };
+
+ };
+ };
+
+in
+
+{
+
+ ###### interface
+
+ options = {
+
+ services.zope2.instances = mkOption {
+ default = {};
+ type = types.loaOf types.optionSet;
+ example = {
+ plone01 = {
+ http_address = "127.0.0.1:8080";
+ extra =
+ ''
+
+ mount-point /
+ cache-size 30000
+
+ blob-dir /var/lib/zope2/plone01/blobstorage
+
+ path /var/lib/zope2/plone01/filestorage/Data.fs
+
+
+
+ '';
+
+ };
+ };
+ description = "zope2 instances to be created automaticaly by the system.";
+ options = [ zope2Opts ];
+ };
+ };
+
+ ###### implementation
+
+ config = mkIf (cfg.instances != {}) {
+
+ users.extraUsers.zope2.uid = config.ids.uids.zope2;
+
+ systemd.services =
+ let
+
+ createZope2Instance = opts: name:
+ let
+ interpreter = pkgs.writeScript "interpreter"
+ ''
+import sys
+
+_interactive = True
+if len(sys.argv) > 1:
+ _options, _args = __import__("getopt").getopt(sys.argv[1:], 'ic:m:')
+ _interactive = False
+ for (_opt, _val) in _options:
+ if _opt == '-i':
+ _interactive = True
+ elif _opt == '-c':
+ exec _val
+ elif _opt == '-m':
+ sys.argv[1:] = _args
+ _args = []
+ __import__("runpy").run_module(
+ _val, {}, "__main__", alter_sys=True)
+
+ if _args:
+ sys.argv[:] = _args
+ __file__ = _args[0]
+ del _options, _args
+ execfile(__file__)
+
+if _interactive:
+ del _interactive
+ __import__("code").interact(banner="", local=globals())
+ '';
+ env = pkgs.buildEnv {
+ name = "zope2-${name}-env";
+ paths = [
+ pkgs.python27
+ pkgs.python27Packages.recursivePthLoader
+ pkgs.python27Packages."plone.recipe.zope2instance"
+ ] ++ attrValues pkgs.python27.modules
+ ++ opts.packages;
+ postBuild =
+ ''
+ echo "#!$out/bin/python" > $out/bin/interpreter
+ cat ${interpreter} >> $out/bin/interpreter
+ '';
+ };
+ conf = pkgs.writeText "zope2-${name}-conf"
+ ''%define INSTANCEHOME ${env}
+instancehome $INSTANCEHOME
+%define CLIENTHOME /var/lib/zope2/${name}
+clienthome $CLIENTHOME
+
+debug-mode off
+security-policy-implementation C
+verbose-security off
+default-zpublisher-encoding utf-8
+zserver-threads ${toString opts.threads}
+effective-user ${opts.user}
+
+pid-filename /var/lib/zope2/${name}/pid
+lock-filename /var/lib/zope2/${name}/lock
+python-check-interval 1000
+enable-product-installation off
+
+
+ zope_i18n_compile_mo_files false
+
+
+
+level INFO
+
+ path /var/log/zope2/${name}.log
+ level INFO
+
+
+
+
+level WARN
+
+ path /var/log/zope2/${name}-Z2.log
+ format %(message)s
+
+
+
+
+address ${opts.http_address}
+
+
+
+
+ name temporary storage for sessioning
+
+mount-point /temp_folder
+container-class Products.TemporaryFolder.TemporaryContainer
+
+
+${opts.extra}
+ '';
+ ctlScript = pkgs.writeScript "zope2-${name}-ctl-script"
+ ''#!${env}/bin/python
+
+import sys
+import plone.recipe.zope2instance.ctl
+
+if __name__ == '__main__':
+ sys.exit(plone.recipe.zope2instance.ctl.main(
+ ["-C", "${conf}"]
+ + sys.argv[1:]))
+ '';
+
+ ctl = pkgs.writeScript "zope2-${name}-ctl"
+ ''#!${pkgs.bash}/bin/bash -e
+export PYTHONHOME=${env}
+exec ${ctlScript} "$@"
+ '';
+ in {
+ description = "zope2 ${name} instance";
+ after = [ "network.target" ]; # with RelStorage also add "postgresql.service"
+ wantedBy = [ "multi-user.target" ];
+ path = opts.packages;
+ preStart =
+ ''
+ mkdir -p /var/log/zope2/
+ touch /var/log/zope2/${name}.log
+ touch /var/log/zope2/${name}-Z2.log
+ chown ${opts.user} /var/log/zope2/${name}.log
+ chown ${opts.user} /var/log/zope2/${name}-Z2.log
+
+ mkdir -p /var/lib/zope2/${name}/filestorage /var/lib/zope2/${name}/blobstorage
+ chown ${opts.user} /var/lib/zope2/${name} -R
+
+ ${ctl} adduser admin admin
+ '';
+
+ serviceConfig.Type = "forking";
+ serviceConfig.ExecStart = "${ctl} start";
+ serviceConfig.ExecStop = "${ctl} stop";
+ serviceConfig.ExecReload = "${ctl} restart";
+ };
+
+ in listToAttrs (map (name: { name = "zope2-${name}"; value = createZope2Instance (builtins.getAttr name cfg.instances) name; }) (builtins.attrNames cfg.instances));
+
+ };
+
+}
diff --git a/nixos/modules/services/x11/desktop-managers/default.nix b/nixos/modules/services/x11/desktop-managers/default.nix
new file mode 100644
index 0000000000000000000000000000000000000000..0fea74d5ba73140a1f969bc728e436da80a6638c
--- /dev/null
+++ b/nixos/modules/services/x11/desktop-managers/default.nix
@@ -0,0 +1,75 @@
+{ config, pkgs, ... }:
+
+with pkgs.lib;
+
+let
+
+ xcfg = config.services.xserver;
+ cfg = xcfg.desktopManager;
+
+ # Whether desktop manager `d' is capable of setting a background.
+ # If it isn't, the `feh' program is used as a fallback.
+ needBGCond = d: ! (d ? bgSupport && d.bgSupport);
+
+in
+
+{
+ # Note: the order in which desktop manager modules are imported here
+ # determines the default: later modules (if enabled) are preferred.
+ # E.g., if KDE is enabled, it supersedes xterm.
+ imports = [ ./none.nix ./xterm.nix ./xfce.nix ./gnome.nix ./kde4.nix ./e17.nix ];
+
+ options = {
+
+ services.xserver.desktopManager = {
+
+ session = mkOption {
+ default = [];
+ example = singleton
+ { name = "kde";
+ bgSupport = true;
+ start = "...";
+ };
+ description = "
+ Internal option used to add some common line to desktop manager
+ scripts before forwarding the value to the
+ displayManager.
+ ";
+ apply = list: {
+ list = map (d: d // {
+ manage = "desktop";
+ start = d.start
+ + optionalString (needBGCond d) ''
+ if test -e $HOME/.background-image; then
+ ${pkgs.feh}/bin/feh --bg-scale $HOME/.background-image
+ fi
+ '';
+ }) list;
+ needBGPackages = [] != filter needBGCond list;
+ };
+ };
+
+ default = mkOption {
+ default = "";
+ example = "none";
+ description = "Default desktop manager loaded if none have been chosen.";
+ merge = mergeOneOption;
+ apply = defaultDM:
+ if defaultDM == "" && cfg.session.list != [] then
+ (head cfg.session.list).name
+ else if any (w: w.name == defaultDM) cfg.session.list then
+ defaultDM
+ else
+ throw "Default desktop manager ($(defaultDM)) not found.";
+ };
+
+ };
+
+ };
+
+ config = {
+ services.xserver.displayManager.session = cfg.session.list;
+ environment.x11Packages =
+ mkIf cfg.session.needBGPackages [ pkgs.feh ];
+ };
+}
diff --git a/nixos/modules/services/x11/desktop-managers/e17.nix b/nixos/modules/services/x11/desktop-managers/e17.nix
new file mode 100644
index 0000000000000000000000000000000000000000..3d91617c62aa16001e18db482577c479b2f2eed2
--- /dev/null
+++ b/nixos/modules/services/x11/desktop-managers/e17.nix
@@ -0,0 +1,30 @@
+{ config, pkgs, ... }:
+
+with pkgs.lib;
+
+let
+
+ xcfg = config.services.xserver;
+ cfg = xcfg.desktopManager.e17;
+
+in
+
+{
+ options = {
+
+ services.xserver.desktopManager.e17.enable = mkOption {
+ default = false;
+ example = true;
+ description = "Enable support for the E17 desktop environment.";
+ };
+
+ };
+
+
+ config = mkIf (xcfg.enable && cfg.enable) {
+
+ services.dbus.packages = [ pkgs.e17.ethumb ];
+
+ };
+
+}
diff --git a/nixos/modules/services/x11/desktop-managers/gnome.nix b/nixos/modules/services/x11/desktop-managers/gnome.nix
new file mode 100644
index 0000000000000000000000000000000000000000..b0212446ad36e6f4a7026eb8d819164211948c25
--- /dev/null
+++ b/nixos/modules/services/x11/desktop-managers/gnome.nix
@@ -0,0 +1,42 @@
+{ config, pkgs, ... }:
+
+with pkgs.lib;
+
+let
+
+ cfg = config.services.xserver.desktopManager.gnome;
+ gnome = pkgs.gnome;
+
+in
+
+{
+
+ options = {
+
+ services.xserver.desktopManager.gnome.enable = mkOption {
+ default = false;
+ example = true;
+ description = "Enable a gnome terminal as a desktop manager.";
+ };
+
+ };
+
+ config = mkIf cfg.enable {
+
+ services.xserver.desktopManager.session = singleton
+ { name = "gnome";
+ start = ''
+ ${gnome.gnometerminal}/bin/gnome-terminal -ls &
+ waitPID=$!
+ '';
+ };
+
+ environment.systemPackages =
+ [ gnome.gnometerminal
+ gnome.GConf
+ gnome.gconfeditor
+ ];
+
+ };
+
+}
diff --git a/nixos/modules/services/x11/desktop-managers/kde4.nix b/nixos/modules/services/x11/desktop-managers/kde4.nix
new file mode 100644
index 0000000000000000000000000000000000000000..d1eb1799bc8449cbb5a5d5bf9a6fb6047b1974cc
--- /dev/null
+++ b/nixos/modules/services/x11/desktop-managers/kde4.nix
@@ -0,0 +1,169 @@
+{ config, pkgs, ... }:
+
+with pkgs.lib;
+
+let
+
+ xcfg = config.services.xserver;
+ cfg = xcfg.desktopManager.kde4;
+ xorg = pkgs.xorg;
+
+ # Disable Nepomuk and Strigi by default. As of KDE 4.7, they don't
+ # really work very well (e.g. searching files often fails to find
+ # files), segfault sometimes and consume significant resources.
+ # They can be re-enabled in the KDE System Settings under "Desktop
+ # Search".
+ nepomukConfig = pkgs.writeTextFile
+ { name = "nepomuk-config";
+ destination = "/share/config/nepomukserverrc";
+ text =
+ ''
+ [Basic Settings]
+ Start Nepomuk=false
+
+ [Service-nepomukstrigiservice]
+ autostart=false
+ '';
+ };
+
+ phononBackends = {
+ gstreamer = [
+ pkgs.phonon_backend_gstreamer
+ pkgs.gst_all.gstPluginsBase
+ pkgs.gst_all.gstPluginsGood
+ pkgs.gst_all.gstPluginsUgly
+ pkgs.gst_all.gstPluginsBad
+ pkgs.gst_all.gstFfmpeg # for mp3 playback
+ pkgs.gst_all.gstreamer # needed?
+ ];
+
+ vlc = [pkgs.phonon_backend_vlc];
+ };
+
+ phononBackendPackages = flip concatMap cfg.phononBackends
+ (name: attrByPath [name] (throw "unknown phonon backend `${name}'") phononBackends);
+
+ wantsUdisks2 = pkgs.kde4.kdelibs.wantsUdisks2 or false;
+in
+
+{
+ options = {
+
+ services.xserver.desktopManager.kde4 = {
+ enable = mkOption {
+ default = false;
+ example = true;
+ description = "Enable the KDE 4 desktop environment.";
+ };
+
+ phononBackends = mkOption {
+ type = types.listOf types.string;
+ default = ["gstreamer"];
+ example = ["gstreamer" "vlc"];
+ description = "Which phonon multimedia backend kde should use";
+ };
+ };
+
+ environment.kdePackages = mkOption {
+ default = [];
+ example = "[ pkgs.kde4.kdesdk ]";
+ type = types.listOf types.package;
+ description = "This option is obsolete. Please use
environment.systemPackages
instead.";
+ };
+
+ };
+
+
+ config = mkIf (xcfg.enable && cfg.enable) {
+
+ # If KDE 4 is enabled, make it the default desktop manager (unless
+ # overridden by the user's configuration).
+ # !!! doesn't work yet ("Multiple definitions. Only one is allowed
+ # for this option.")
+ # services.xserver.desktopManager.default = mkOverrideTemplate 900 "kde4";
+
+ services.xserver.desktopManager.session = singleton
+ { name = "kde4";
+ bgSupport = true;
+ start =
+ ''
+ # The KDE icon cache is supposed to update itself
+ # automatically, but it uses the timestamp on the icon
+ # theme directory as a trigger. Since in Nix the
+ # timestamp is always the same, this doesn't work. So as
+ # a workaround, nuke the icon cache on login. This isn't
+ # perfect, since it may require logging out after
+ # installing new applications to update the cache.
+ # See http://lists-archives.org/kde-devel/26175-what-when-will-icon-cache-refresh.html
+ rm -fv $HOME/.kde/cache-*/icon-cache.kcache
+
+ # Qt writes a weird ‘libraryPath’ line to
+ # ~/.config/Trolltech.conf that causes the KDE plugin
+ # paths of previous KDE invocations to be searched.
+ # Obviously using mismatching KDE libraries is potentially
+ # disastrous, so here we nuke references to the Nix store
+ # in Trolltech.conf. A better solution would be to stop
+ # Qt from doing this wackiness in the first place.
+ if [ -e $HOME/.config/Trolltech.conf ]; then
+ sed -e '/nix\\store\|nix\/store/ d' -i $HOME/.config/Trolltech.conf
+ fi
+
+ # Start KDE.
+ exec ${pkgs.kde4.kdebase_workspace}/bin/startkde
+ '';
+ };
+
+ security.setuidOwners = singleton
+ { program = "kcheckpass";
+ source = "${pkgs.kde4.kdebase_workspace}/lib/kde4/libexec/kcheckpass";
+ owner = "root";
+ group = "root";
+ setuid = true;
+ };
+
+ environment.systemPackages =
+ [ pkgs.kde4.kdelibs
+
+ pkgs.kde4.kde_baseapps # Splitted kdebase
+ pkgs.kde4.kde_workspace
+ pkgs.kde4.kde_runtime
+ pkgs.kde4.konsole
+ pkgs.kde4.kate
+
+ pkgs.kde4.kde_wallpapers # contains kdm's default background
+ pkgs.kde4.oxygen_icons
+ pkgs.virtuoso # to enable Nepomuk to find Virtuoso
+
+ # Starts KDE's Polkit authentication agent.
+ pkgs.kde4.polkit_kde_agent
+
+ # Miscellaneous runtime dependencies.
+ pkgs.kde4.qt4 # needed for qdbus
+ pkgs.shared_mime_info
+ xorg.xmessage # so that startkde can show error messages
+ xorg.xset # used by startkde, non-essential
+ xorg.xauth # used by kdesu
+ pkgs.shared_desktop_ontologies # used by nepomuk
+ pkgs.strigi # used by nepomuk
+ pkgs.mysql # used by akonadi
+ ]
+ ++ [ nepomukConfig ] ++ phononBackendPackages
+ ++ config.environment.kdePackages;
+
+ environment.pathsToLink = [ "/share" ];
+
+ environment.etc = singleton
+ { source = "${pkgs.xkeyboard_config}/etc/X11/xkb";
+ target = "X11/xkb";
+ };
+
+ # Enable helpful DBus services.
+ services.udisks.enable = ! wantsUdisks2;
+ services.udisks2.enable = wantsUdisks2;
+ services.upower.enable = config.powerManagement.enable;
+
+ security.pam.services.kde = { allowNullPassword = true; };
+
+ };
+
+}
diff --git a/nixos/modules/services/x11/desktop-managers/none.nix b/nixos/modules/services/x11/desktop-managers/none.nix
new file mode 100644
index 0000000000000000000000000000000000000000..af7a376ae0296b92d89f29563824d9abdf121d29
--- /dev/null
+++ b/nixos/modules/services/x11/desktop-managers/none.nix
@@ -0,0 +1,7 @@
+{
+ services.xserver.desktopManager.session =
+ [ { name = "none";
+ start = "";
+ }
+ ];
+}
diff --git a/nixos/modules/services/x11/desktop-managers/xfce.nix b/nixos/modules/services/x11/desktop-managers/xfce.nix
new file mode 100644
index 0000000000000000000000000000000000000000..f5d544ad0462dd88d57e7adea19c26bbc2f31956
--- /dev/null
+++ b/nixos/modules/services/x11/desktop-managers/xfce.nix
@@ -0,0 +1,90 @@
+{ config, pkgs, ... }:
+
+with pkgs.lib;
+
+let
+
+ xcfg = config.services.xserver;
+ cfg = xcfg.desktopManager.xfce;
+
+in
+
+{
+ options = {
+
+ services.xserver.desktopManager.xfce.enable = mkOption {
+ default = false;
+ example = true;
+ description = "Enable the Xfce desktop environment.";
+ };
+
+ };
+
+
+ config = mkIf (xcfg.enable && cfg.enable) {
+
+ services.xserver.desktopManager.session = singleton
+ { name = "xfce";
+ bgSupport = true;
+ start =
+ ''
+ # Set GTK_PATH so that GTK+ can find the theme engines.
+ export GTK_PATH=${config.system.path}/lib/gtk-2.0
+
+ # Set GTK_DATA_PREFIX so that GTK+ can find the Xfce themes.
+ export GTK_DATA_PREFIX=${config.system.path}
+
+ # Necessary to get xfce4-mixer to find GST's ALSA plugin.
+ # Ugly.
+ export GST_PLUGIN_PATH=${config.system.path}/lib
+
+ exec ${pkgs.stdenv.shell} ${pkgs.xfce.xinitrc}
+ '';
+ };
+
+ environment.systemPackages =
+ [ pkgs.gtk # To get GTK+'s themes.
+ pkgs.hicolor_icon_theme
+ pkgs.tango-icon-theme
+ pkgs.shared_mime_info
+ pkgs.which # Needed by the xfce's xinitrc script.
+ pkgs.xfce.exo
+ pkgs.xfce.gtk_xfce_engine
+ pkgs.xfce.libxfcegui4 # For the icons.
+ pkgs.xfce.mousepad
+ pkgs.xfce.ristretto
+ pkgs.xfce.terminal
+ pkgs.xfce.thunar
+ pkgs.xfce.xfce4icontheme
+ pkgs.xfce.xfce4panel
+ pkgs.xfce.xfce4session
+ pkgs.xfce.xfce4settings
+ pkgs.xfce.xfce4mixer
+ pkgs.xfce.xfceutils
+ pkgs.xfce.xfconf
+ pkgs.xfce.xfdesktop
+ pkgs.xfce.xfwm4
+ # This supplies some "abstract" icons such as
+ # "utilities-terminal" and "accessories-text-editor".
+ pkgs.gnome.gnomeicontheme
+ pkgs.desktop_file_utils
+ pkgs.xfce.libxfce4ui
+ pkgs.xfce.garcon
+ pkgs.xfce.thunar_volman
+ pkgs.xfce.gvfs
+ pkgs.xfce.xfce4_appfinder
+ ]
+ ++ optional config.powerManagement.enable pkgs.xfce.xfce4_power_manager;
+
+ environment.pathsToLink =
+ [ "/share/xfce4" "/share/themes" "/share/mime" "/share/desktop-directories" "/share/gtksourceview-2.0" ];
+
+ environment.variables.GIO_EXTRA_MODULES = "${pkgs.xfce.gvfs}/lib/gio/modules";
+
+ # Enable helpful DBus services.
+ services.udisks2.enable = true;
+ services.upower.enable = config.powerManagement.enable;
+
+ };
+
+}
diff --git a/nixos/modules/services/x11/desktop-managers/xterm.nix b/nixos/modules/services/x11/desktop-managers/xterm.nix
new file mode 100644
index 0000000000000000000000000000000000000000..edc61c103ea9fa5a6d8edac8379cd282b69844e8
--- /dev/null
+++ b/nixos/modules/services/x11/desktop-managers/xterm.nix
@@ -0,0 +1,36 @@
+{ config, pkgs, ... }:
+
+with pkgs.lib;
+
+let
+
+ cfg = config.services.xserver.desktopManager.xterm;
+
+in
+
+{
+ options = {
+
+ services.xserver.desktopManager.xterm.enable = mkOption {
+ default = true;
+ example = false;
+ description = "Enable a xterm terminal as a desktop manager.";
+ };
+
+ };
+
+ config = mkIf cfg.enable {
+
+ services.xserver.desktopManager.session = singleton
+ { name = "xterm";
+ start = ''
+ ${pkgs.xterm}/bin/xterm -ls &
+ waitPID=$!
+ '';
+ };
+
+ environment.systemPackages = [ pkgs.xterm ];
+
+ };
+
+}
diff --git a/nixos/modules/services/x11/display-managers/auto.nix b/nixos/modules/services/x11/display-managers/auto.nix
new file mode 100644
index 0000000000000000000000000000000000000000..33d97e0e07a95c321772a33bf3d3a7fa621d0dd5
--- /dev/null
+++ b/nixos/modules/services/x11/display-managers/auto.nix
@@ -0,0 +1,52 @@
+{ config, pkgs, ... }:
+
+with pkgs.lib;
+
+let
+
+ dmcfg = config.services.xserver.displayManager;
+ cfg = dmcfg.auto;
+
+in
+
+{
+
+ ###### interface
+
+ options = {
+
+ services.xserver.displayManager.auto = {
+
+ enable = mkOption {
+ default = false;
+ description = ''
+ Whether to enable the fake "auto" display manager, which
+ automatically logs in the user specified in the
+
user
option. This is mostly useful for
+ automated tests.
+ '';
+ };
+
+ user = mkOption {
+ default = "root";
+ description = "The user account to login automatically.";
+ };
+
+ };
+
+ };
+
+
+ ###### implementation
+
+ config = mkIf cfg.enable {
+
+ services.xserver.displayManager.slim = {
+ enable = true;
+ autoLogin = true;
+ defaultUser = cfg.user;
+ };
+
+ };
+
+}
diff --git a/nixos/modules/services/x11/display-managers/default.nix b/nixos/modules/services/x11/display-managers/default.nix
new file mode 100644
index 0000000000000000000000000000000000000000..91de910662f2a9fb3f5615fe70b9330dbac0ecc8
--- /dev/null
+++ b/nixos/modules/services/x11/display-managers/default.nix
@@ -0,0 +1,279 @@
+# This module declares the options to define a *display manager*, the
+# program responsible for handling X logins (such as xdm, kdm, gdb, or
+# SLiM). The display manager allows the user to select a *session
+# type*. When the user logs in, the display manager starts the
+# *session script* ("xsession" below) to launch the selected session
+# type. The session type defines two things: the *desktop manager*
+# (e.g., KDE, Gnome or a plain xterm), and optionally the *window
+# manager* (e.g. kwin or twm).
+
+{ config, pkgs, ... }:
+
+with pkgs.lib;
+
+let
+
+ cfg = config.services.xserver;
+ xorg = pkgs.xorg;
+
+ vaapiDrivers = pkgs.buildEnv {
+ name = "vaapi-drivers";
+ paths = cfg.vaapiDrivers;
+ # We only want /lib/dri, but with a single input path, we need "/" for it to work
+ pathsToLink = [ "/" ];
+ };
+
+ # file provided by services.xserver.displayManager.session.script
+ xsession = wm: dm: pkgs.writeScript "xsession"
+ ''
+ #! /bin/sh
+
+ . /etc/profile
+ cd "$HOME"
+
+ # The first argument of this script is the session type.
+ sessionType="$1"
+ if [ "$sessionType" = default ]; then sessionType=""; fi
+
+ ${optionalString (!cfg.displayManager.job.logsXsession) ''
+ exec > ~/.xsession-errors 2>&1
+ ''}
+
+ ${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
+ exec ${config.systemd.package}/bin/systemd-inhibit --what=handle-lid-switch:handle-power-key "$0" "$sessionType"
+ fi
+
+ ''}
+
+ ${optionalString cfg.startOpenSSHAgent ''
+ if test -z "$SSH_AUTH_SOCK"; then
+ # Restart this script as a child of the SSH agent. (It is
+ # also possible to start the agent as a child that prints
+ # the required environment variabled on stdout, but in
+ # that mode ssh-agent is not terminated when we log out.)
+ export SSH_ASKPASS=${pkgs.x11_ssh_askpass}/libexec/x11-ssh-askpass
+ exec ${pkgs.openssh}/bin/ssh-agent "$0" "$sessionType"
+ fi
+ ''}
+
+ ${optionalString cfg.startGnuPGAgent ''
+ if test -z "$SSH_AUTH_SOCK"; then
+ # Restart this script as a child of the GnuPG agent.
+ exec "${pkgs.gnupg}/bin/gpg-agent" \
+ --enable-ssh-support --daemon \
+ --pinentry-program "${pkgs.pinentry}/bin/pinentry-gtk-2" \
+ --write-env-file "$HOME/.gpg-agent-info" \
+ "$0" "$sessionType"
+ fi
+ ''}
+
+ # Handle being called by kdm.
+ if test "''${1:0:1}" = /; then eval exec "$1"; fi
+
+ # Start PulseAudio if enabled.
+ ${optionalString (config.hardware.pulseaudio.enable) ''
+ ${optionalString (!config.hardware.pulseaudio.systemWide)
+ "${pkgs.pulseaudio}/bin/pulseaudio --start"
+ }
+
+ # Publish access credentials in the root window.
+ ${pkgs.pulseaudio}/bin/pactl load-module module-x11-publish "display=$DISPLAY"
+
+ # Keep track of devices. Mostly useful for Phonon/KDE.
+ ${pkgs.pulseaudio}/bin/pactl load-module module-device-manager "do_routing=1"
+ ''}
+
+ # Load X defaults.
+ if test -e ~/.Xdefaults; then
+ ${xorg.xrdb}/bin/xrdb -merge ~/.Xdefaults
+ fi
+
+ export LIBVA_DRIVERS_PATH=${vaapiDrivers}/lib/dri
+
+ # Speed up application start by 50-150ms according to
+ # http://kdemonkey.blogspot.nl/2008/04/magic-trick.html
+ rm -rf $HOME/.compose-cache
+ mkdir $HOME/.compose-cache
+
+ ${cfg.displayManager.sessionCommands}
+
+ # Allow the user to setup a custom session type.
+ if test -x ~/.xsession; then
+ exec ~/.xsession
+ else
+ if test "$sessionType" = "custom"; then
+ sessionType="" # fall-thru if there is no ~/.xsession
+ fi
+ fi
+
+ # The session type is " + ", so
+ # extract those.
+ windowManager="''${sessionType##* + }"
+ : ''${windowManager:=${cfg.windowManager.default}}
+ desktopManager="''${sessionType% + *}"
+ : ''${desktopManager:=${cfg.desktopManager.default}}
+
+ # Start the window manager.
+ case $windowManager in
+ ${concatMapStrings (s: ''
+ (${s.name})
+ ${s.start}
+ ;;
+ '') wm}
+ (*) echo "$0: Window manager '$windowManager' not found.";;
+ esac
+
+ # Start the desktop manager.
+ case $desktopManager in
+ ${concatMapStrings (s: ''
+ (${s.name})
+ ${s.start}
+ ;;
+ '') dm}
+ (*) echo "$0: Desktop manager '$desktopManager' not found.";;
+ esac
+
+ test -n "$waitPID" && wait "$waitPID"
+ exit 0
+ '';
+
+ mkDesktops = names: pkgs.runCommand "desktops" {}
+ ''
+ mkdir -p $out
+ ${concatMapStrings (n: ''
+ cat - > "$out/${n}.desktop" << EODESKTOP
+ [Desktop Entry]
+ Version=1.0
+ Type=XSession
+ TryExec=${cfg.displayManager.session.script}
+ Exec=${cfg.displayManager.session.script} '${n}'
+ Name=${n}
+ Comment=
+ EODESKTOP
+ '') names}
+ '';
+
+in
+
+{
+
+ options = {
+
+ services.xserver.displayManager = {
+
+ xauthBin = mkOption {
+ default = "${xorg.xauth}/bin/xauth";
+ description = "Path to the xauth program used by display managers.";
+ };
+
+ xserverBin = mkOption {
+ default = "${xorg.xorgserver}/bin/X";
+ description = "Path to the X server used by display managers.";
+ };
+
+ xserverArgs = mkOption {
+ default = [];
+ example = [ "-ac" "-logverbose" "-nolisten tcp" ];
+ description = "List of arguments for the X server.";
+ apply = toString;
+ };
+
+ sessionCommands = mkOption {
+ default = "";
+ example =
+ ''
+ xmessage "Hello World!" &
+ '';
+ type = types.string;
+ description = "Shell commands executed just before the window or desktop manager is started.";
+ };
+
+ desktopManagerHandlesLidAndPower = mkOption {
+ default = true;
+ 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 = [
+ {
+ manage = "desktop";
+ name = "xterm";
+ start = "
+ ${pkgs.xterm}/bin/xterm -ls &
+ waitPID=$!
+ ";
+ }
+ ];
+ description = ''
+ List of sessions supported with the command used to start each
+ session. Each session script can set the
+ waitPID shell variable to make this script
+ wait until the end of the user session. Each script is used
+ to define either a windows manager or a desktop manager. These
+ can be differentiated by setting the attribute
+ manage either to "window"
+ or "desktop".
+
+ The list of desktop manager and window manager should appear
+ inside the display manager with the desktop manager name
+ followed by the window manager name.
+ '';
+ apply = list: rec {
+ wm = filter (s: s.manage == "window") list;
+ dm = filter (s: s.manage == "desktop") list;
+ names = flip concatMap dm
+ (d: map (w: d.name + optionalString (w.name != "none") (" + " + w.name))
+ (filter (w: d.name != "none" || w.name != "none") wm));
+ desktops = mkDesktops names;
+ script = xsession wm dm;
+ };
+ };
+
+ job = {
+
+ preStart = mkOption {
+ type = types.lines;
+ default = "";
+ example = "rm -f /var/log/my-display-manager.log";
+ description = "Script executed before the display manager is started.";
+ };
+
+ execCmd = mkOption {
+ type = types.uniq types.string;
+ example = "${pkgs.slim}/bin/slim";
+ description = "Command to start the display manager.";
+ };
+
+ environment = mkOption {
+ default = {};
+ example = { SLIM_CFGFILE = /etc/slim.conf; };
+ description = "Additional environment variables needed by the display manager.";
+ };
+
+ logsXsession = mkOption {
+ type = types.bool;
+ default = false;
+ description = ''
+ Whether the display manager redirects the
+ output of the session script to
+ ~/.xsession-errors.
+ '';
+ };
+
+ };
+
+ };
+
+ };
+
+}
diff --git a/nixos/modules/services/x11/display-managers/kdm.nix b/nixos/modules/services/x11/display-managers/kdm.nix
new file mode 100644
index 0000000000000000000000000000000000000000..c03f711645415082a7d59f33e094e6538506ae90
--- /dev/null
+++ b/nixos/modules/services/x11/display-managers/kdm.nix
@@ -0,0 +1,151 @@
+{ config, pkgs, ... }:
+
+with pkgs.lib;
+
+let
+
+ dmcfg = config.services.xserver.displayManager;
+ cfg = dmcfg.kdm;
+
+ inherit (pkgs.kde4) kdebase_workspace;
+
+ defaultConfig =
+ ''
+ [Shutdown]
+ HaltCmd=${config.systemd.package}/sbin/shutdown -h now
+ RebootCmd=${config.systemd.package}/sbin/shutdown -r now
+ ${optionalString (config.system.boot.loader.id == "grub") ''
+ BootManager=${if config.boot.loader.grub.version == 2 then "Grub2" else "Grub"}
+ ''}
+
+ [X-*-Core]
+ Xrdb=${pkgs.xlibs.xrdb}/bin/xrdb
+ SessionsDirs=${dmcfg.session.desktops}
+ Session=${dmcfg.session.script}
+ FailsafeClient=${pkgs.xterm}/bin/xterm
+
+ [X-:*-Core]
+ ServerCmd=${dmcfg.xserverBin} ${dmcfg.xserverArgs}
+ # KDM calls `rm' somewhere to clean up some temporary directory.
+ SystemPath=${pkgs.coreutils}/bin
+ # The default timeout (15) is too short in a heavily loaded boot process.
+ ServerTimeout=60
+ # Needed to prevent the X server from dying on logout and not coming back:
+ TerminateServer=true
+ ${optionalString (cfg.setupScript != "")
+ ''
+ Setup=${cfg.setupScript}
+ ''}
+
+ [X-*-Greeter]
+ HiddenUsers=root,nixbld1,nixbld2,nixbld3,nixbld4,nixbld5,nixbld6,nixbld7,nixbld8,nixbld9,nixbld10
+ PluginsLogin=${kdebase_workspace}/lib/kde4/kgreet_classic.so
+ ${optionalString (cfg.themeDirectory != "")
+ ''
+ UseTheme=true
+ Theme=${cfg.themeDirectory}
+ ''
+ }
+
+ ${optionalString (cfg.enableXDMCP)
+ ''
+ [Xdmcp]
+ Enable=true
+ ''}
+ '';
+
+ kdmrc = pkgs.stdenv.mkDerivation {
+ name = "kdmrc";
+ config = defaultConfig + cfg.extraConfig;
+ buildCommand =
+ ''
+ echo "$config" > $out
+
+ # The default kdmrc would add "-nolisten tcp", and we already
+ # have that managed by nixos. Hence the grep.
+ cat ${kdebase_workspace}/share/config/kdm/kdmrc | grep -v nolisten >> $out
+ '';
+ };
+
+in
+
+{
+
+ ###### interface
+
+ options = {
+
+ services.xserver.displayManager.kdm = {
+
+ enable = mkOption {
+ default = false;
+ description = ''
+ Whether to enable the KDE display manager.
+ '';
+ };
+
+ enableXDMCP = mkOption {
+ default = false;
+ description = ''
+ Whether to enable XDMCP, which allows remote logins.
+ '';
+ };
+
+ themeDirectory = mkOption {
+ default = "";
+ description = ''
+ The path to a KDM theme directory. This theme
+ will be used by the KDM greeter.
+ '';
+ };
+
+ setupScript = mkOption {
+ default = "";
+ description = ''
+ The path to a KDM setup script. This script is run as root just
+ before KDM starts. Can be used for setting up
+ monitors with xrandr, for example.
+ '';
+ };
+
+ extraConfig = mkOption {
+ default = "";
+ description = ''
+ Options appended to kdmrc, the
+ configuration file of KDM.
+ '';
+ };
+
+ };
+
+ };
+
+
+ ###### implementation
+
+ config = mkIf cfg.enable {
+
+ services.xserver.displayManager.slim.enable = false;
+
+ services.xserver.displayManager.job =
+ { execCmd = mkFixStrictness
+ ''
+ mkdir -m 0755 -p /var/lib/kdm
+ chown kdm /var/lib/kdm
+ ${(optionalString (config.system.boot.loader.id == "grub" && config.system.build.grub != null) "PATH=${config.system.build.grub}/sbin:$PATH ") +
+ "KDEDIRS=/run/current-system/sw exec ${kdebase_workspace}/bin/kdm -config ${kdmrc} -nodaemon"}
+ '';
+ logsXsession = true;
+ };
+
+ security.pam.services.kde = { allowNullPassword = true; startSession = true; };
+
+ users.extraUsers = singleton
+ { name = "kdm";
+ uid = config.ids.uids.kdm;
+ description = "KDM user";
+ };
+
+ };
+
+}
diff --git a/nixos/modules/services/x11/display-managers/lightdm.nix b/nixos/modules/services/x11/display-managers/lightdm.nix
new file mode 100644
index 0000000000000000000000000000000000000000..f4fb5ee003a933455d48eb2abe336a6c63ed8fb9
--- /dev/null
+++ b/nixos/modules/services/x11/display-managers/lightdm.nix
@@ -0,0 +1,120 @@
+{ config, pkgs, ... }:
+
+with pkgs.lib;
+
+let
+
+ dmcfg = config.services.xserver.displayManager;
+ xEnv = config.systemd.services."display-manager".environment;
+ cfg = dmcfg.lightdm;
+
+ inherit (pkgs) stdenv lightdm writeScript writeText;
+
+ # lightdm runs with clearenv(), but we need a few things in the enviornment for X to startup
+ xserverWrapper = writeScript "xserver-wrapper"
+ ''
+ #! /bin/sh
+ ${concatMapStrings (n: "export ${n}=\"${getAttr n xEnv}\"\n") (attrNames xEnv)}
+ exec ${dmcfg.xserverBin} ${dmcfg.xserverArgs}
+ '';
+
+ # The default greeter provided with this expression is the GTK greeter.
+ # Again, we need a few things in the environment for the greeter to run with
+ # fonts/icons.
+ wrappedGtkGreeter = stdenv.mkDerivation {
+ name = "lightdm-gtk-greeter";
+ buildInputs = [ pkgs.makeWrapper ];
+
+ buildCommand = ''
+ ensureDir $out/gtk-3.0/
+
+ # This wrapper ensures that we actually get fonts
+ makeWrapper ${pkgs.lightdm_gtk_greeter}/sbin/lightdm-gtk-greeter \
+ $out/greeter \
+ --set XDG_DATA_DIRS ${pkgs.gnome2.gnome_icon_theme}/share \
+ --set FONTCONFIG_FILE /etc/fonts/fonts.conf \
+ --set XDG_CONFIG_HOME $out/
+
+ # We need this to ensure that it actually tries to find icons from gnome-icon-theme
+ cat - > $out/gtk-3.0/settings.ini << EOF
+ [Settings]
+ gtk-icon-theme-name=gnome
+ EOF
+
+ cat - > $out/lightdm-gtk-greeter.desktop << EOF
+ [Desktop Entry]
+ Name=LightDM Greeter
+ Comment=This runs the LightDM Greeter
+ Exec=$out/greeter
+ Type=Application
+ EOF
+ '';
+ };
+
+ lightdmConf = writeText "lightdm.conf"
+ ''
+ [LightDM]
+ greeter-user = ${config.users.extraUsers.lightdm.name}
+ xgreeters-directory = ${cfg.greeter.package}
+ xsessions-directory = ${dmcfg.session.desktops}
+
+ [SeatDefaults]
+ xserver-command = ${xserverWrapper}
+ session-wrapper = ${dmcfg.session.script}
+ greeter-session = ${cfg.greeter.name}
+ '';
+
+in
+{
+ options = {
+ services.xserver.displayManager.lightdm = {
+ enable = mkOption {
+ default = false;
+ description = ''
+ Whether to enable lightdm as the display manager.
+ '';
+ };
+
+ greeter = mkOption {
+ description = ''
+ The LightDM greeter to login via. The package should be a directory
+ containing a .desktop file matching the name in the 'name' option.
+ '';
+ default = {
+ name = "lightdm-gtk-greeter";
+ package = wrappedGtkGreeter;
+ };
+ };
+ };
+ };
+
+ config = mkIf cfg.enable {
+
+ services.xserver.displayManager.slim.enable = false;
+
+ services.xserver.displayManager.job = {
+ logsXsession = true;
+
+ # lightdm relaunches itself via just `lightdm`, so needs to be on the PATH
+ execCmd = mkFixStrictness ''
+ export PATH=${lightdm}/sbin:$PATH
+ ${lightdm}/sbin/lightdm --log-dir=/var/log --run-dir=/run --config=${lightdmConf}
+ '';
+ };
+
+ services.dbus.enable = true;
+ services.dbus.packages = [ lightdm ];
+
+ security.pam.services.lightdm = { allowNullPassword = true; startSession = true; };
+ security.pam.services.lightdm-greeter = { allowNullPassword = true; startSession = true; };
+
+ users.extraUsers.lightdm = {
+ createHome = true;
+ home = "/var/lib/lightdm";
+ group = "lightdm";
+ uid = config.ids.uids.lightdm;
+ };
+
+ users.extraGroups.lightdm.gid = config.ids.gids.lightdm;
+ };
+}
diff --git a/nixos/modules/services/x11/display-managers/slim.nix b/nixos/modules/services/x11/display-managers/slim.nix
new file mode 100644
index 0000000000000000000000000000000000000000..01c9fa96c8c8f389e674d0968ce47bc7aaaba4c2
--- /dev/null
+++ b/nixos/modules/services/x11/display-managers/slim.nix
@@ -0,0 +1,118 @@
+{ config, pkgs, ... }:
+
+with pkgs.lib;
+
+let
+
+ dmcfg = config.services.xserver.displayManager;
+ cfg = dmcfg.slim;
+
+ slimConfig = pkgs.writeText "slim.cfg"
+ ''
+ xauth_path ${dmcfg.xauthBin}
+ default_xserver ${dmcfg.xserverBin}
+ xserver_arguments ${dmcfg.xserverArgs}
+ sessiondir ${dmcfg.session.desktops}
+ login_cmd exec ${pkgs.stdenv.shell} ${dmcfg.session.script} "%session"
+ halt_cmd ${config.systemd.package}/sbin/shutdown -h now
+ reboot_cmd ${config.systemd.package}/sbin/shutdown -r now
+ ${optionalString (cfg.defaultUser != "") ("default_user " + cfg.defaultUser)}
+ ${optionalString cfg.autoLogin "auto_login yes"}
+ '';
+
+ # Unpack the SLiM theme, or use the default.
+ slimThemesDir =
+ let
+ unpackedTheme = pkgs.stdenv.mkDerivation {
+ name = "slim-theme";
+ buildCommand = ''
+ ensureDir $out
+ cd $out
+ unpackFile ${cfg.theme}
+ ln -s * default
+ '';
+ };
+ in if cfg.theme == null then "${pkgs.slim}/share/slim/themes" else unpackedTheme;
+
+in
+
+{
+
+ ###### interface
+
+ options = {
+
+ services.xserver.displayManager.slim = {
+
+ enable = mkOption {
+ default = config.services.xserver.enable;
+ description = ''
+ Whether to enable SLiM as the display manager.
+ '';
+ };
+
+ theme = mkOption {
+ default = null;
+ example = pkgs.fetchurl {
+ url = http://download.berlios.de/slim/slim-wave.tar.gz;
+ sha256 = "0ndr419i5myzcylvxb89m9grl2xyq6fbnyc3lkd711mzlmnnfxdy";
+ };
+ description = ''
+ The theme for the SLiM login manager. If not specified, SLiM's
+ default theme is used. See for a
+ collection of themes.
+ '';
+ };
+
+ defaultUser = mkOption {
+ default = "";
+ example = "login";
+ description = ''
+ The default user to load. If you put a username here you
+ get it automatically loaded into the username field, and
+ the focus is placed on the password.
+ '';
+ };
+
+ autoLogin = mkOption {
+ default = false;
+ example = true;
+ description = ''
+ Automatically log in as the default user.
+ '';
+ };
+
+ };
+
+ };
+
+
+ ###### implementation
+
+ config = mkIf cfg.enable {
+
+ services.xserver.displayManager.job =
+ { preStart =
+ ''
+ rm -f /var/log/slim.log
+ '';
+ environment =
+ { SLIM_CFGFILE = slimConfig;
+ SLIM_THEMESDIR = slimThemesDir;
+ };
+ execCmd = "exec ${pkgs.slim}/bin/slim";
+ };
+
+ # Allow null passwords so that the user can login as root on the
+ # installation CD.
+ security.pam.services.slim = { allowNullPassword = true; startSession = true; };
+
+ # Allow slimlock to work.
+ security.pam.services.slimlock = {};
+
+ environment.systemPackages = [ pkgs.slim ];
+
+ };
+
+}
diff --git a/nixos/modules/services/x11/hardware/multitouch.nix b/nixos/modules/services/x11/hardware/multitouch.nix
new file mode 100644
index 0000000000000000000000000000000000000000..4f9048bfd910be7d1b7610a953587086bcb7a596
--- /dev/null
+++ b/nixos/modules/services/x11/hardware/multitouch.nix
@@ -0,0 +1,60 @@
+{ config, pkgs, ... }:
+
+with pkgs.lib;
+
+let cfg = config.services.xserver.multitouch; in
+
+{
+
+ options = {
+
+ services.xserver.multitouch = {
+
+ enable = mkOption {
+ default = false;
+ example = true;
+ description = "Whether to enable multitouch touchpad support.";
+ };
+
+ invertScroll = mkOption {
+ default = false;
+ example = true;
+ type = types.bool;
+ description = "Whether to invert scrolling direction à la OSX Lion";
+ };
+
+ ignorePalm = mkOption {
+ default = false;
+ example = true;
+ type = types.bool;
+ description = "Whether to ignore touches detected as being the palm (i.e when typing)";
+ };
+
+ };
+
+ };
+
+ config = mkIf cfg.enable {
+
+ services.xserver.modules = [ pkgs.xf86_input_mtrack ];
+
+ services.xserver.config =
+ ''
+ # Automatically enable the multitouch driver
+ Section "InputClass"
+ MatchIsTouchpad "on"
+ Identifier "Touchpads"
+ Driver "mtrack"
+ Option "IgnorePalm" "${if cfg.ignorePalm then "true" else "false"}"
+ ${optionalString cfg.invertScroll ''
+ Option "ScrollUpButton" "5"
+ Option "ScrollDownButton" "4"
+ Option "ScrollLeftButton" "7"
+ Option "ScrollRightButton" "6"
+ ''}
+ EndSection
+ '';
+
+ };
+
+}
diff --git a/nixos/modules/services/x11/hardware/synaptics.nix b/nixos/modules/services/x11/hardware/synaptics.nix
new file mode 100644
index 0000000000000000000000000000000000000000..d16142a5fdf3c70e61b17949f7087b586465e94a
--- /dev/null
+++ b/nixos/modules/services/x11/hardware/synaptics.nix
@@ -0,0 +1,122 @@
+{ config, pkgs, ... }:
+
+with pkgs.lib;
+
+let cfg = config.services.xserver.synaptics; in
+
+{
+
+ options = {
+
+ services.xserver.synaptics = {
+
+ enable = mkOption {
+ default = false;
+ example = true;
+ description = "Whether to enable touchpad support.";
+ };
+
+ dev = mkOption {
+ default = null;
+ example = "/dev/input/event0";
+ description =
+ ''
+ Path for touchpad device. Set to null to apply to any
+ auto-detected touchpad.
+ '';
+ };
+
+ accelFactor = mkOption {
+ default = "0.001";
+ description = "Cursor acceleration (how fast speed increases from minSpeed to maxSpeed).";
+ };
+
+ minSpeed = mkOption {
+ default = "0.6";
+ description = "Cursor speed factor for precision finger motion.";
+ };
+
+ maxSpeed = mkOption {
+ default = "1.0";
+ description = "Cursor speed factor for highest-speed finger motion.";
+ };
+
+ twoFingerScroll = mkOption {
+ default = false;
+ description = "Whether to enable two-finger drag-scrolling.";
+ };
+
+ vertEdgeScroll = mkOption {
+ default = ! cfg.twoFingerScroll;
+ description = "Whether to enable vertical edge drag-scrolling.";
+ };
+
+ tapButtons = mkOption {
+ default = true;
+ example = false;
+ description = "Whether to enable tap buttons.";
+ };
+
+ palmDetect = mkOption {
+ default = false;
+ example = true;
+ description = "Whether to enable palm detection (hardware support required)";
+ };
+
+ horizontalScroll = mkOption {
+ default = true;
+ example = false;
+ description = "Whether to enable horizontal scrolling (on touchpad)";
+ };
+
+ additionalOptions = mkOption {
+ default = "";
+ example = ''
+ Option "RTCornerButton" "2"
+ Option "RBCornerButton" "3"
+ '';
+ description = ''
+ Additional options for synaptics touchpad driver.
+ '';
+ };
+
+ };
+
+ };
+
+
+ config = mkIf cfg.enable {
+
+ services.xserver.modules = [ pkgs.xorg.xf86inputsynaptics ];
+
+ environment.systemPackages = [ pkgs.xorg.xf86inputsynaptics ];
+
+ services.xserver.config =
+ ''
+ # Automatically enable the synaptics driver for all touchpads.
+ Section "InputClass"
+ Identifier "synaptics touchpad catchall"
+ MatchIsTouchpad "on"
+ ${optionalString (cfg.dev != null) ''MatchDevicePath "${cfg.dev}"''}
+ Driver "synaptics"
+ Option "MaxTapTime" "180"
+ Option "MaxTapMove" "220"
+ Option "MinSpeed" "${cfg.minSpeed}"
+ Option "MaxSpeed" "${cfg.maxSpeed}"
+ Option "AccelFactor" "${cfg.accelFactor}"
+ Option "TapButton1" "${if cfg.tapButtons then "1" else "0"}"
+ Option "TapButton2" "${if cfg.tapButtons then "2" else "0"}"
+ Option "TapButton3" "${if cfg.tapButtons then "3" else "0"}"
+ ${if cfg.tapButtons then "" else ''Option "MaxTapTime" "0"''}
+ Option "VertTwoFingerScroll" "${if cfg.twoFingerScroll then "1" else "0"}"
+ Option "HorizTwoFingerScroll" "${if cfg.twoFingerScroll then "1" else "0"}"
+ Option "VertEdgeScroll" "${if cfg.vertEdgeScroll then "1" else "0"}"
+ ${if cfg.palmDetect then ''Option "PalmDetect" "1"'' else ""}
+ ${if cfg.horizontalScroll then "" else ''Option "HorizScrollDelta" "0"''}
+ ${cfg.additionalOptions}
+ EndSection
+ '';
+
+ };
+
+}
diff --git a/nixos/modules/services/x11/hardware/wacom.nix b/nixos/modules/services/x11/hardware/wacom.nix
new file mode 100644
index 0000000000000000000000000000000000000000..dfc588cd21322c3fff538e786ce601f3f281493c
--- /dev/null
+++ b/nixos/modules/services/x11/hardware/wacom.nix
@@ -0,0 +1,47 @@
+{ config, pkgs, ... }:
+
+with pkgs.lib;
+
+let
+
+ cfg = config.services.xserver.wacom;
+
+in
+
+{
+
+ options = {
+
+ services.xserver.wacom = {
+
+ enable = mkOption {
+ default = false;
+ description = ''
+ Whether to enable the Wacom touchscreen/digitizer/tablet.
+ If you ever have any issues such as, try switching to terminal (ctrl-alt-F1) and back
+ which will make Xorg reconfigure the device ?
+
+ If you're not satisfied by the default behaviour you can override
+
environment.etc."X11/xorg.conf.d/50-wacom.conf"
in
+ configuration.nix easily.
+ '';
+ };
+
+ };
+
+ };
+
+
+ config = mkIf cfg.enable {
+
+ environment.systemPackages = [ pkgs.xf86_input_wacom ]; # provides xsetwacom
+
+ services.xserver.modules = [ pkgs.xf86_input_wacom ];
+
+ services.udev.packages = [ pkgs.xf86_input_wacom ];
+
+ environment.etc."X11/xorg.conf.d/50-wacom.conf".source = "${pkgs.xf86_input_wacom}/share/X11/xorg.conf.d/50-wacom.conf";
+
+ };
+
+}
diff --git a/nixos/modules/services/x11/terminal-server.nix b/nixos/modules/services/x11/terminal-server.nix
new file mode 100644
index 0000000000000000000000000000000000000000..ab05639aeca6b8445e6f6fe8eda15da74721992f
--- /dev/null
+++ b/nixos/modules/services/x11/terminal-server.nix
@@ -0,0 +1,66 @@
+# This module implements a terminal service based on ‘x11vnc’. It
+# listens on port 5900 for VNC connections. It then presents a login
+# screen to the user. If the user successfully authenticates, x11vnc
+# checks to see if a X server is already running for that user. If
+# not, a X server (Xvfb) is started for that user. The Xvfb instances
+# persist across VNC sessions.
+
+{ config, pkgs, ... }:
+
+with pkgs.lib;
+
+let
+
+ # Wrap Xvfb to set some flags/variables.
+ xvfbWrapper = pkgs.writeScriptBin "Xvfb"
+ ''
+ #! ${pkgs.stdenv.shell}
+ export XKB_BINDIR=${pkgs.xorg.xkbcomp}/bin
+ export XORG_DRI_DRIVER_PATH=${pkgs.mesa}/lib/dri
+ exec ${pkgs.xorg.xorgserver}/bin/Xvfb "$@" -xkbdir "${pkgs.xkeyboard_config}/etc/X11/xkb"
+ '';
+
+ # ‘xinetd’ is insanely braindamaged in that it sends stderr to
+ # stdout. Thus requires just about any xinetd program to be
+ # wrapped to redirect its stderr. Sigh.
+ x11vncWrapper = pkgs.writeScriptBin "x11vnc-wrapper"
+ ''
+ #! ${pkgs.stdenv.shell}
+ export PATH=${makeSearchPath "bin" [ xvfbWrapper pkgs.gawk pkgs.which pkgs.openssl pkgs.xorg.xauth pkgs.nettools pkgs.shadow pkgs.procps pkgs.utillinux pkgs.bash ]}:$PATH
+ export FD_GEOM=1024x786x24
+ exec ${pkgs.x11vnc}/bin/x11vnc -inetd -display WAIT:1024x786:cmd=FINDCREATEDISPLAY-Xvfb.xdmcp -unixpw -ssl SAVE 2> /var/log/x11vnc.log
+ '';
+
+in
+
+{
+
+ config = {
+
+ services.xserver.enable = true;
+
+ # Enable KDM. Any display manager will do as long as it supports XDMCP.
+ services.xserver.displayManager.kdm.enable = true;
+ services.xserver.displayManager.kdm.enableXDMCP = true;
+ services.xserver.displayManager.kdm.extraConfig =
+ ''
+ [General]
+ # We're headless, so don't bother starting an X server.
+ StaticServers=
+
+ [Xdmcp]
+ Xaccess=${pkgs.writeText "Xaccess" "localhost"}
+ '';
+
+ services.xinetd.enable = true;
+ services.xinetd.services = singleton
+ { name = "x11vnc";
+ port = 5900;
+ unlisted = true;
+ user = "root";
+ server = "${x11vncWrapper}/bin/x11vnc-wrapper";
+ };
+
+ };
+
+}
diff --git a/nixos/modules/services/x11/window-managers/awesome.nix b/nixos/modules/services/x11/window-managers/awesome.nix
new file mode 100644
index 0000000000000000000000000000000000000000..880ebf1eca6a0210ffdd0a2e7daca24076dc449e
--- /dev/null
+++ b/nixos/modules/services/x11/window-managers/awesome.nix
@@ -0,0 +1,42 @@
+{ config, pkgs, ... }:
+
+with pkgs.lib;
+
+let
+
+ cfg = config.services.xserver.windowManager.awesome;
+
+in
+
+{
+
+ ###### interface
+
+ options = {
+
+ services.xserver.windowManager.awesome.enable = mkOption {
+ default = false;
+ description = "Enable the Awesome window manager.";
+ };
+
+ };
+
+
+ ###### implementation
+
+ config = mkIf cfg.enable {
+
+ services.xserver.windowManager.session = singleton
+ { name = "awesome";
+ start =
+ ''
+ ${pkgs.awesome}/bin/awesome &
+ waitPID=$!
+ '';
+ };
+
+ environment.x11Packages = [ pkgs.awesome ];
+
+ };
+
+}
diff --git a/nixos/modules/services/x11/window-managers/compiz.nix b/nixos/modules/services/x11/window-managers/compiz.nix
new file mode 100644
index 0000000000000000000000000000000000000000..209401f26468b9c7d5d8461a23f2a777d06e4c3a
--- /dev/null
+++ b/nixos/modules/services/x11/window-managers/compiz.nix
@@ -0,0 +1,63 @@
+{ config, pkgs, ... }:
+
+with pkgs.lib;
+
+let
+
+ cfg = config.services.xserver.windowManager.compiz;
+ xorg = config.services.xserver.package;
+
+in
+
+{
+
+ options = {
+
+ services.xserver.windowManager.compiz = {
+
+ enable = mkOption {
+ default = false;
+ description = "Enable the Compiz window manager.";
+ };
+
+ renderingFlag = mkOption {
+ default = "";
+ example = "--indirect-rendering";
+ description = "Pass the
--indirect-rendering
flag to Compiz.";
+ };
+
+ };
+
+ };
+
+
+ config = mkIf cfg.enable {
+
+ services.xserver.windowManager.session = singleton
+ { name = "compiz";
+ start =
+ ''
+ # Start Compiz using the flat-file configuration backend
+ # (ccp).
+ export COMPIZ_PLUGINDIR=${config.system.path}/lib/compiz
+ export COMPIZ_METADATADIR=${config.system.path}/share/compiz
+ ${pkgs.compiz}/bin/compiz ccp ${cfg.renderingFlag} &
+
+ # Start GTK-style window decorator.
+ ${pkgs.compiz}/bin/gtk-window-decorator &
+ '';
+ };
+
+ environment.systemPackages =
+ [ pkgs.compiz
+ pkgs.compiz_ccsm
+ pkgs.compiz_plugins_main
+ pkgs.compiz_plugins_extra
+ pkgs.libcompizconfig # for the "ccp" plugin
+ ];
+
+ environment.pathsToLink = [ "/lib/compiz" "/share/compiz" ];
+
+ };
+
+}
diff --git a/nixos/modules/services/x11/window-managers/default.nix b/nixos/modules/services/x11/window-managers/default.nix
new file mode 100644
index 0000000000000000000000000000000000000000..c201b789ae48d511831160179c9a48d4a996d45a
--- /dev/null
+++ b/nixos/modules/services/x11/window-managers/default.nix
@@ -0,0 +1,61 @@
+{ config, pkgs, ... }:
+
+with pkgs.lib;
+
+let
+ cfg = config.services.xserver.windowManager;
+in
+
+{
+ imports =
+ [ ./compiz.nix
+ ./openbox.nix
+ ./metacity.nix
+ ./none.nix
+ ./twm.nix
+ ./wmii.nix
+ ./xmonad.nix
+ ./i3.nix
+ ./xbmc.nix
+ ];
+
+ options = {
+
+ services.xserver.windowManager = {
+
+ session = mkOption {
+ default = [];
+ example = [{
+ name = "wmii";
+ start = "...";
+ }];
+ description = ''
+ Internal option used to add some common line to window manager
+ scripts before forwarding the value to the
+ displayManager.
+ '';
+ apply = map (d: d // {
+ manage = "window";
+ });
+ };
+
+ default = mkOption {
+ default = "none";
+ example = "wmii";
+ description = "Default window manager loaded if none have been chosen.";
+ merge = mergeOneOption;
+ apply = defaultWM:
+ if any (w: w.name == defaultWM) cfg.session then
+ defaultWM
+ else
+ throw "Default window manager (${defaultWM}) not found.";
+ };
+
+ };
+
+ };
+
+ config = {
+ services.xserver.displayManager.session = cfg.session;
+ };
+}
diff --git a/nixos/modules/services/x11/window-managers/i3.nix b/nixos/modules/services/x11/window-managers/i3.nix
new file mode 100644
index 0000000000000000000000000000000000000000..6777a95ddc8ca0f1ce74cb7c9bea62c0480916bf
--- /dev/null
+++ b/nixos/modules/services/x11/window-managers/i3.nix
@@ -0,0 +1,43 @@
+{ pkgs, config, ... }:
+
+with pkgs.lib;
+
+let
+ cfg = config.services.xserver.windowManager.i3;
+in
+
+{
+ options = {
+ services.xserver.windowManager.i3 = {
+ enable = mkOption {
+ default = false;
+ example = true;
+ description = "Enable the i3 tiling window manager.";
+ };
+
+ configFile = mkOption {
+ default = null;
+ type = types.nullOr types.path;
+ description = ''
+ Path to the i3 configuration file.
+ If left at the default value, $HOME/.i3/config will be used.
+ '';
+ };
+ };
+ };
+
+ config = mkIf cfg.enable {
+ services.xserver.windowManager = {
+ session = [{
+ name = "i3";
+ start = "
+ ${pkgs.i3}/bin/i3 ${optionalString (cfg.configFile != null)
+ "-c \"${cfg.configFile}\""
+ } &
+ waitPID=$!
+ ";
+ }];
+ };
+ environment.x11Packages = [ pkgs.i3 ];
+ };
+}
diff --git a/nixos/modules/services/x11/window-managers/icewm.nix b/nixos/modules/services/x11/window-managers/icewm.nix
new file mode 100644
index 0000000000000000000000000000000000000000..9da4a415fad1a7ac0f81e2fda77f4406424cb0cd
--- /dev/null
+++ b/nixos/modules/services/x11/window-managers/icewm.nix
@@ -0,0 +1,42 @@
+{ config, pkgs, ... }:
+
+with pkgs.lib;
+
+let
+
+ cfg = config.services.xserver.windowManager.icewm;
+
+in
+
+{
+
+ ###### interface
+
+ options = {
+
+ services.xserver.windowManager.icewm.enable = mkOption {
+ default = false;
+ description = "Enable the IceWM window manager.";
+ };
+
+ };
+
+
+ ###### implementation
+
+ config = mkIf cfg.enable {
+
+ services.xserver.windowManager.session = singleton
+ { name = "icewm";
+ start =
+ ''
+ ${pkgs.icewm}/bin/icewm &
+ waitPID=$!
+ '';
+ };
+
+ environment.x11Packages = [ pkgs.icewm ];
+
+ };
+
+}
diff --git a/nixos/modules/services/x11/window-managers/metacity.nix b/nixos/modules/services/x11/window-managers/metacity.nix
new file mode 100644
index 0000000000000000000000000000000000000000..712e2038594ebd0e8ee626d3f13221fe42e9a861
--- /dev/null
+++ b/nixos/modules/services/x11/window-managers/metacity.nix
@@ -0,0 +1,42 @@
+{ config, pkgs, ... }:
+
+with pkgs.lib;
+
+let
+
+ cfg = config.services.xserver.windowManager.metacity;
+ xorg = config.services.xserver.package;
+ gnome = pkgs.gnome;
+
+in
+
+{
+ options = {
+
+ services.xserver.windowManager.metacity.enable = mkOption {
+ default = false;
+ example = true;
+ description = "Enable the metacity window manager.";
+ };
+
+ };
+
+ config = mkIf cfg.enable {
+
+ services.xserver.windowManager.session = singleton
+ { name = "metacity";
+ start = ''
+ env LD_LIBRARY_PATH=${xorg.libX11}/lib:${xorg.libXext}/lib:/usr/lib/
+ # !!! Hack: load the schemas for Metacity.
+ GCONF_CONFIG_SOURCE=xml::~/.gconf ${gnome.GConf}/bin/gconftool-2 \
+ --makefile-install-rule ${gnome.metacity}/etc/gconf/schemas/*.schemas # */
+ ${gnome.metacity}/bin/metacity &
+ waitPID=$!
+ '';
+ };
+
+ environment.systemPackages = [ gnome.metacity ];
+
+ };
+
+}
diff --git a/nixos/modules/services/x11/window-managers/none.nix b/nixos/modules/services/x11/window-managers/none.nix
new file mode 100644
index 0000000000000000000000000000000000000000..84cf1d770776838682327f03362a72d2130db965
--- /dev/null
+++ b/nixos/modules/services/x11/window-managers/none.nix
@@ -0,0 +1,12 @@
+{
+ services = {
+ xserver = {
+ windowManager = {
+ session = [{
+ name = "none";
+ start = "";
+ }];
+ };
+ };
+ };
+}
diff --git a/nixos/modules/services/x11/window-managers/openbox.nix b/nixos/modules/services/x11/window-managers/openbox.nix
new file mode 100644
index 0000000000000000000000000000000000000000..ae34a938c4a04434127862dd6241b7a6426ef88c
--- /dev/null
+++ b/nixos/modules/services/x11/window-managers/openbox.nix
@@ -0,0 +1,30 @@
+{pkgs, config, ...}:
+
+let
+ inherit (pkgs.lib) mkOption mkIf;
+ cfg = config.services.xserver.windowManager.openbox;
+in
+
+{
+ options = {
+ services.xserver.windowManager.openbox = {
+ enable = mkOption {
+ default = false;
+ example = true;
+ description = "Enable the Openbox window manager.";
+ };
+ };
+ };
+
+ config = mkIf cfg.enable {
+ services.xserver.windowManager = {
+ session = [{
+ name = "openbox";
+ start = "
+ ${pkgs.openbox}/bin/openbox-session
+ ";
+ }];
+ };
+ environment.x11Packages = [ pkgs.openbox ];
+ };
+}
diff --git a/nixos/modules/services/x11/window-managers/twm.nix b/nixos/modules/services/x11/window-managers/twm.nix
new file mode 100644
index 0000000000000000000000000000000000000000..c1a99b97566f9b22ad43450ec3deed7bcdd75cca
--- /dev/null
+++ b/nixos/modules/services/x11/window-managers/twm.nix
@@ -0,0 +1,42 @@
+{ config, pkgs, ... }:
+
+with pkgs.lib;
+
+let
+
+ cfg = config.services.xserver.windowManager.twm;
+
+in
+
+{
+
+ ###### interface
+
+ options = {
+
+ services.xserver.windowManager.twm.enable = mkOption {
+ default = false;
+ description = "Enable the twm window manager.";
+ };
+
+ };
+
+
+ ###### implementation
+
+ config = mkIf cfg.enable {
+
+ services.xserver.windowManager.session = singleton
+ { name = "twm";
+ start =
+ ''
+ ${pkgs.xorg.twm}/bin/twm &
+ waitPID=$!
+ '';
+ };
+
+ environment.x11Packages = [ pkgs.xorg.twm ];
+
+ };
+
+}
diff --git a/nixos/modules/services/x11/window-managers/wmii.nix b/nixos/modules/services/x11/window-managers/wmii.nix
new file mode 100644
index 0000000000000000000000000000000000000000..b61521274fbaffbd41676289117ede0dfa203665
--- /dev/null
+++ b/nixos/modules/services/x11/window-managers/wmii.nix
@@ -0,0 +1,47 @@
+{ config, pkgs, ... }:
+
+with pkgs.lib;
+
+let
+
+ cfg = config.services.xserver.windowManager.wmii;
+
+in
+
+{
+ options = {
+
+ services.xserver.windowManager.wmii.enable = mkOption {
+ default = false;
+ example = true;
+ description = "Enable the wmii window manager.";
+ };
+
+ };
+
+ config = mkIf cfg.enable {
+
+ services.xserver.windowManager.session = singleton
+ # stop wmii by
+ # $wmiir xwrite /ctl quit
+ # this will cause wmii exiting with exit code 0
+ #
+ # why this loop?
+ # wmii crashes once a month here. That doesn't matter that much
+ # wmii can recover very well. However without loop the x session terminates and then your workspace setup is
+ # lost and all applications running on X will terminate.
+ # Another use case is kill -9 wmii; after rotating screen.
+ # Note: we don't like kill for that purpose. But it works (-> subject "wmii and xrandr" on mailinglist)
+ { name = "wmii";
+ start = ''
+ while :; do
+ ${pkgs.wmiiSnap}/bin/wmii && break
+ done
+ '';
+ };
+
+ environment.systemPackages = [ pkgs.wmiiSnap ];
+
+ };
+
+}
diff --git a/nixos/modules/services/x11/window-managers/xbmc.nix b/nixos/modules/services/x11/window-managers/xbmc.nix
new file mode 100644
index 0000000000000000000000000000000000000000..46494202b404bf5f6f665db4f4f94fdd442cc1f0
--- /dev/null
+++ b/nixos/modules/services/x11/window-managers/xbmc.nix
@@ -0,0 +1,31 @@
+{pkgs, config, ...}:
+
+let
+ inherit (pkgs.lib) mkOption mkIf;
+ cfg = config.services.xserver.windowManager.xbmc;
+in
+
+{
+ options = {
+ services.xserver.windowManager.xbmc = {
+ enable = mkOption {
+ default = false;
+ example = true;
+ description = "Enable the xbmc multimedia center.";
+ };
+ };
+ };
+
+ config = mkIf cfg.enable {
+ services.xserver.windowManager = {
+ session = [{
+ name = "xbmc";
+ start = "
+ ${pkgs.xbmc}/bin/xbmc --lircdev /var/run/lirc/lircd --standalone &
+ waitPID=$!
+ ";
+ }];
+ };
+ environment.systemPackages = [ pkgs.xbmc ];
+ };
+}
diff --git a/nixos/modules/services/x11/window-managers/xmonad.nix b/nixos/modules/services/x11/window-managers/xmonad.nix
new file mode 100644
index 0000000000000000000000000000000000000000..2cbb5002d6cf7c98de68b0c8a5e71d0dbf6ec79c
--- /dev/null
+++ b/nixos/modules/services/x11/window-managers/xmonad.nix
@@ -0,0 +1,30 @@
+{pkgs, config, ...}:
+
+let
+ inherit (pkgs.lib) mkOption mkIf;
+ cfg = config.services.xserver.windowManager.xmonad;
+in
+
+{
+ options = {
+ services.xserver.windowManager.xmonad = {
+ enable = mkOption {
+ default = false;
+ example = true;
+ description = "Enable the xmonad window manager.";
+ };
+ };
+ };
+
+ config = {
+ services.xserver.windowManager = {
+ session = mkIf cfg.enable [{
+ name = "xmonad";
+ start = "
+ ${pkgs.haskellPackages.xmonad}/bin/xmonad &
+ waitPID=$!
+ ";
+ }];
+ };
+ };
+}
diff --git a/nixos/modules/services/x11/xfs.conf b/nixos/modules/services/x11/xfs.conf
new file mode 100644
index 0000000000000000000000000000000000000000..13dcf803db2945dca7d219970ef44310d5dd5033
--- /dev/null
+++ b/nixos/modules/services/x11/xfs.conf
@@ -0,0 +1,15 @@
+# font server configuration file
+# $Xorg: config.cpp,v 1.3 2000/08/17 19:54:19 cpqbld Exp $
+
+clone-self = on
+use-syslog = off
+error-file = /var/log/xfs.log
+# in decipoints
+default-point-size = 120
+default-resolutions = 75,75,100,100
+
+# font cache control, specified in KB
+cache-hi-mark = 2048
+cache-low-mark = 1433
+cache-balance = 70
+catalogue = /run/current-system/sw/share/X11-fonts/
diff --git a/nixos/modules/services/x11/xfs.nix b/nixos/modules/services/x11/xfs.nix
new file mode 100644
index 0000000000000000000000000000000000000000..f4a40dbb08fd957cf5f542ef821b6f85cc74d944
--- /dev/null
+++ b/nixos/modules/services/x11/xfs.nix
@@ -0,0 +1,46 @@
+{ config, pkgs, ... }:
+
+with pkgs.lib;
+
+let
+
+ configFile = ./xfs.conf;
+
+in
+
+{
+
+ ###### interface
+
+ options = {
+
+ services.xfs = {
+
+ enable = mkOption {
+ default = false;
+ description = "Whether to enable the X Font Server.";
+ };
+
+ };
+
+ };
+
+
+ ###### implementation
+
+ config = mkIf config.services.xfs.enable (
+ mkAssert config.fonts.enableFontDir "
+ Please enable fontDir (fonts.enableFontDir) to use xfs.
+ " {
+
+ jobs.xfs =
+ { description = "X Font Server";
+
+ startOn = "started networking";
+
+ exec = "${pkgs.xorg.xfs}/bin/xfs -config ${configFile}";
+ };
+
+ });
+
+}
diff --git a/nixos/modules/services/x11/xserver.nix b/nixos/modules/services/x11/xserver.nix
new file mode 100644
index 0000000000000000000000000000000000000000..6e470e65e3511212cf77501a525a728d7cb7801c
--- /dev/null
+++ b/nixos/modules/services/x11/xserver.nix
@@ -0,0 +1,646 @@
+{ config, pkgs, pkgs_i686, ... }:
+
+with pkgs.lib;
+
+let
+
+ kernelPackages = config.boot.kernelPackages;
+
+ # Abbreviations.
+ cfg = config.services.xserver;
+ xorg = pkgs.xorg;
+
+
+ # Map video driver names to driver packages.
+ knownVideoDrivers = {
+ ati_unfree = { modules = [ kernelPackages.ati_drivers_x11 ]; driverName = "fglrx"; };
+ nouveau = { modules = [ pkgs.xf86_video_nouveau ]; };
+ nvidia = { modules = [ kernelPackages.nvidia_x11 ]; };
+ nvidiaLegacy96 = { modules = [ kernelPackages.nvidia_x11_legacy96 ]; driverName = "nvidia"; };
+ nvidiaLegacy173 = { modules = [ kernelPackages.nvidia_x11_legacy173 ]; driverName = "nvidia"; };
+ nvidiaLegacy304 = { modules = [ kernelPackages.nvidia_x11_legacy304 ]; driverName = "nvidia"; };
+ unichrome = { modules = [ pkgs.xorgVideoUnichrome ]; };
+ virtualbox = { modules = [ kernelPackages.virtualboxGuestAdditions ]; driverName = "vboxvideo"; };
+ };
+
+ driverNames =
+ optional (cfg.videoDriver != null) cfg.videoDriver ++ cfg.videoDrivers;
+
+ drivers = flip map driverNames
+ (name: { inherit name; driverName = name; } //
+ attrByPath [name] (if (hasAttr ("xf86video" + name) xorg) then { modules = [(getAttr ("xf86video" + name) xorg) ]; } else throw "unknown video driver `${name}'") knownVideoDrivers);
+
+ fontsForXServer =
+ config.fonts.fonts ++
+ # We don't want these fonts in fonts.conf, because then modern,
+ # fontconfig-based applications will get horrible bitmapped
+ # Helvetica fonts. It's better to get a substitution (like Nimbus
+ # Sans) than that horror. But we do need the Adobe fonts for some
+ # old non-fontconfig applications. (Possibly this could be done
+ # better using a fontconfig rule.)
+ [ pkgs.xorg.fontadobe100dpi
+ pkgs.xorg.fontadobe75dpi
+ ];
+
+
+ # Just enumerate all heads without discarding XRandR output information.
+ xrandrHeads = let
+ mkHead = num: output: {
+ name = "multihead${toString num}";
+ inherit output;
+ };
+ in imap mkHead cfg.xrandrHeads;
+
+ xrandrDeviceSection = flip concatMapStrings xrandrHeads (h: ''
+ Option "monitor-${h.output}" "${h.name}"
+ '');
+
+ # Here we chain every monitor from the left to right, so we have:
+ # m4 right of m3 right of m2 right of m1 .----.----.----.----.
+ # Which will end up in reverse ----------> | m1 | m2 | m3 | m4 |
+ # `----^----^----^----'
+ xrandrMonitorSections = let
+ mkMonitor = previous: current: previous ++ singleton {
+ inherit (current) name;
+ value = ''
+ Section "Monitor"
+ Identifier "${current.name}"
+ ${optionalString (previous != []) ''
+ Option "RightOf" "${(head previous).name}"
+ ''}
+ EndSection
+ '';
+ };
+ monitors = foldl mkMonitor [] xrandrHeads;
+ in concatMapStrings (getAttr "value") monitors;
+
+
+ configFile = pkgs.stdenv.mkDerivation {
+ name = "xserver.conf";
+
+ xfs = optionalString (cfg.useXFS != false)
+ ''FontPath "${toString cfg.useXFS}"'';
+
+ inherit (cfg) config;
+
+ buildCommand =
+ ''
+ echo 'Section "Files"' >> $out
+ echo $xfs >> $out
+
+ for i in ${toString fontsForXServer}; do
+ if test "''${i:0:''${#NIX_STORE}}" == "$NIX_STORE"; then
+ for j in $(find $i -name fonts.dir); do
+ echo " FontPath \"$(dirname $j)\"" >> $out
+ done
+ fi
+ done
+
+ for i in $(find ${toString cfg.modules} -type d); do
+ if test $(echo $i/*.so* | wc -w) -ne 0; then
+ echo " ModulePath \"$i\"" >> $out
+ fi
+ done
+
+ echo 'EndSection' >> $out
+
+ echo "$config" >> $out
+ ''; # */
+ };
+
+
+ checkAgent = mkAssert (!(cfg.startOpenSSHAgent && cfg.startGnuPGAgent))
+ ''
+ The OpenSSH agent and GnuPG agent cannot be started both.
+ Choose between `startOpenSSHAgent' and `startGnuPGAgent'.
+ '';
+
+ checkPolkit = mkAssert config.security.polkit.enable
+ "X11 requires Polkit to be enabled (‘security.polkit.enable = true’).";
+
+
+in
+
+{
+
+ imports =
+ [ ./display-managers/default.nix
+ ./window-managers/default.nix
+ ./desktop-managers/default.nix
+ ];
+
+
+ ###### interface
+
+ options = {
+
+ services.xserver = {
+
+ enable = mkOption {
+ default = false;
+ description = ''
+ Whether to enable the X server.
+ '';
+ };
+
+ autorun = mkOption {
+ default = true;
+ description = ''
+ Whether to start the X server automatically.
+ '';
+ };
+
+ exportConfiguration = mkOption {
+ default = false;
+ description = ''
+ Whether to symlink the X server configuration under
+ /etc/X11/xorg.conf.
+ '';
+ };
+
+ enableTCP = mkOption {
+ default = false;
+ description = ''
+ Whether to allow the X server to accept TCP connections.
+ '';
+ };
+
+ modules = mkOption {
+ default = [];
+ example = [ pkgs.xf86_input_wacom ];
+ description = "Packages to be added to the module search path of the X server.";
+ };
+
+ resolutions = mkOption {
+ default = [];
+ example = [ { x = 1600; y = 1200; } { x = 1024; y = 786; } ];
+ description = ''
+ The screen resolutions for the X server. The first element
+ is the default resolution. If this list is empty, the X
+ server will automatically configure the resolution.
+ '';
+ };
+
+ videoDriver = mkOption {
+ default = null;
+ example = "i810";
+ description = ''
+ The name of the video driver for your graphics card. This
+ option is obsolete; please set the
+
videoDrivers
instead.
+ '';
+ };
+
+ videoDrivers = mkOption {
+ # !!! We'd like "nv" here, but it segfaults the X server.
+ default = [ "ati" "cirrus" "intel" "vesa" "vmware" ];
+ example = [ "vesa" ];
+ description = ''
+ The names of the video drivers that the X server should
+ support. The X server will try all of the drivers listed
+ here until it finds one that supports your video card.
+ '';
+ };
+
+ vaapiDrivers = mkOption {
+ default = [ ];
+ defaultText = "[ pkgs.vaapiIntel pkgs.vaapiVdpau ]";
+ example = "[ pkgs.vaapiIntel pkgs.vaapiVdpau ]";
+ description = ''
+ Packages providing libva acceleration drivers.
+ '';
+ };
+
+ driSupport = mkOption {
+ default = true;
+ description = ''
+ Whether to enable accelerated OpenGL rendering through the
+ Direct Rendering Interface (DRI).
+ '';
+ };
+
+ driSupport32Bit = mkOption {
+ default = false;
+ description = ''
+ On 64-bit systems, whether to support Direct Rendering for
+ 32-bit applications (such as Wine). This is currently only
+ supported for the nvidia driver and for
+ mesa.
+ '';
+ };
+
+ startOpenSSHAgent = mkOption {
+ default = true;
+ description = ''
+ Whether to start the OpenSSH agent when you log in. The OpenSSH agent
+ remembers private keys for you so that you don't have to type in
+ passphrases every time you make an SSH connection. Use
+ ssh-add to add a key to the agent.
+ '';
+ };
+
+ startGnuPGAgent = mkOption {
+ default = false;
+ description = ''
+ Whether to start the GnuPG agent when you log in. The GnuPG agent
+ remembers private keys for you so that you don't have to type in
+ passphrases every time you make an SSH connection or sign/encrypt
+ data. Use ssh-add to add a key to the agent.
+ '';
+ };
+
+ layout = mkOption {
+ default = "us";
+ description = ''
+ Keyboard layout.
+ '';
+ };
+
+ xkbModel = mkOption {
+ default = "pc104";
+ example = "presario";
+ description = ''
+ Keyboard model.
+ '';
+ };
+
+ xkbOptions = mkOption {
+ default = "terminate:ctrl_alt_bksp";
+ example = "grp:caps_toggle, grp_led:scroll";
+ description = ''
+ X keyboard options; layout switching goes here.
+ '';
+ };
+
+ xkbVariant = mkOption {
+ default = "";
+ example = "colemak";
+ description = ''
+ X keyboard variant.
+ '';
+ };
+
+ config = mkOption {
+ description = ''
+ The contents of the configuration file of the X server
+ (xorg.conf).
+ '';
+ };
+
+ deviceSection = mkOption {
+ default = "";
+ example = "VideoRAM 131072";
+ description = "Contents of the first Device section of the X server configuration file.";
+ };
+
+ screenSection = mkOption {
+ default = "";
+ example = ''
+ Option "RandRRotation" "on"
+ '';
+ description = "Contents of the first Screen section of the X server configuration file.";
+ };
+
+ monitorSection = mkOption {
+ default = "";
+ example = "HorizSync 28-49";
+ description = "Contents of the first Monitor section of the X server configuration file.";
+ };
+
+ xrandrHeads = mkOption {
+ default = [];
+ example = [ "HDMI-0" "DVI-0" ];
+ type = with types; listOf string;
+ description = ''
+ Simple multiple monitor configuration, just specify a list of XRandR
+ outputs which will be mapped from left to right in the order of the
+ list.
+
+ Be careful using this option with multiple graphic adapters or with
+ drivers that have poor support for XRandR, unexpected things might
+ happen with those.
+ '';
+ };
+
+ moduleSection = mkOption {
+ default = "";
+ example =
+ ''
+ SubSection "extmod"
+ EndSubsection
+ '';
+ description = "Contents of the Module section of the X server configuration file.";
+ };
+
+ serverLayoutSection = mkOption {
+ default = "";
+ example =
+ ''
+ Option "AIGLX" "true"
+ '';
+ description = "Contents of the ServerLayout section of the X server configuration file.";
+ };
+
+ extraDisplaySettings = mkOption {
+ default = "";
+ example = "Virtual 2048 2048";
+ description = "Lines to be added to every Display subsection of the Screen section.";
+ };
+
+ defaultDepth = mkOption {
+ default = 0;
+ example = 8;
+ description = "Default colour depth.";
+ };
+
+ useXFS = mkOption {
+ default = false;
+ example = "unix/:7100";
+ description = "Determines how to connect to the X Font Server.";
+ };
+
+ tty = mkOption {
+ default = 7;
+ example = 9;
+ description = "Virtual console for the X server.";
+ };
+
+ display = mkOption {
+ default = 0;
+ example = 1;
+ description = "Display number for the X server.";
+ };
+
+ virtualScreen = mkOption {
+ default = null;
+ example = { x = 2048; y = 2048; };
+ description = ''
+ Virtual screen size for Xrandr.
+ '';
+ };
+
+ };
+
+ environment.x11Packages = mkOption {
+ default = [];
+ type = types.listOf types.package;
+ description = ''
+ List of packages added to the system when the X server is
+ activated (
services.xserver.enable
).
+ '';
+ };
+
+ };
+
+
+
+ ###### implementation
+
+ config = mkIf cfg.enable (checkAgent (checkPolkit {
+
+ boot.extraModulePackages =
+ optional (elem "nvidia" driverNames) kernelPackages.nvidia_x11 ++
+ optional (elem "nvidiaLegacy96" driverNames) kernelPackages.nvidia_x11_legacy96 ++
+ optional (elem "nvidiaLegacy173" driverNames) kernelPackages.nvidia_x11_legacy173 ++
+ optional (elem "nvidiaLegacy304" driverNames) kernelPackages.nvidia_x11_legacy304 ++
+ optional (elem "virtualbox" driverNames) kernelPackages.virtualboxGuestAdditions ++
+ optional (elem "ati_unfree" driverNames) kernelPackages.ati_drivers_x11;
+
+ boot.blacklistedKernelModules =
+ optionals (elem "nvidia" driverNames) [ "nouveau" "nvidiafb" ];
+
+ environment.variables.LD_LIBRARY_PATH =
+ [ "/run/opengl-driver/lib" "/run/opengl-driver-32/lib" ];
+
+ environment.etc =
+ (optionals cfg.exportConfiguration
+ [ { source = "${configFile}";
+ target = "X11/xorg.conf";
+ }
+ # -xkbdir command line option does not seems to be passed to xkbcomp.
+ { source = "${pkgs.xkeyboard_config}/etc/X11/xkb";
+ target = "X11/xkb";
+ }
+ ])
+ ++ (optionals (elem "ati_unfree" driverNames) [
+
+ # according toiive on #ati you don't need the pcs, it is like registry... keeps old stuff to make your
+ # life harder ;) Still it seems to be required
+ { source = "${kernelPackages.ati_drivers_x11}/etc/ati";
+ target = "ati";
+ }
+ ])
+ ++ (optionals (elem "nvidia" driverNames) [
+
+ { source = "${kernelPackages.nvidia_x11}/lib/vendors/nvidia.icd";
+ target = "OpenCL/vendors/nvidia.icd";
+ }
+ ]);
+
+ environment.x11Packages =
+ [ xorg.xorgserver
+ xorg.xrandr
+ xorg.xrdb
+ xorg.setxkbmap
+ xorg.iceauth # required for KDE applications (it's called by dcopserver)
+ xorg.xlsclients
+ xorg.xset
+ xorg.xsetroot
+ xorg.xinput
+ xorg.xprop
+ pkgs.xterm
+ pkgs.xdg_utils
+ ]
+ ++ optional (elem "nvidia" driverNames) kernelPackages.nvidia_x11
+ ++ optional (elem "nvidiaLegacy96" driverNames) kernelPackages.nvidia_x11_legacy96
+ ++ optional (elem "nvidiaLegacy173" driverNames) kernelPackages.nvidia_x11_legacy173
+ ++ optional (elem "nvidiaLegacy304" driverNames) kernelPackages.nvidia_x11_legacy304
+ ++ optional (elem "virtualbox" driverNames) xorg.xrefresh
+ ++ optional (elem "ati_unfree" driverNames) kernelPackages.ati_drivers_x11;
+
+ environment.systemPackages = config.environment.x11Packages;
+
+ environment.pathsToLink =
+ [ "/etc/xdg" "/share/xdg" "/share/applications" "/share/icons" "/share/pixmaps" ];
+
+ systemd.defaultUnit = mkIf cfg.autorun "graphical.target";
+
+ systemd.services."display-manager" =
+ { description = "X11 Server";
+
+ after = [ "systemd-udev-settle.service" "local-fs.target" ];
+
+ restartIfChanged = false;
+
+ environment =
+ { FONTCONFIG_FILE = "/etc/fonts/fonts.conf"; # !!! cleanup
+ XKB_BINDIR = "${xorg.xkbcomp}/bin"; # Needed for the Xkb extension.
+ XORG_DRI_DRIVER_PATH = "/run/opengl-driver/lib/dri"; # !!! Depends on the driver selected at runtime.
+ } // optionalAttrs (elem "nvidia" driverNames) {
+ LD_LIBRARY_PATH = "${xorg.libX11}/lib:${xorg.libXext}/lib:${kernelPackages.nvidia_x11}/lib";
+ } // optionalAttrs (elem "nvidiaLegacy96" driverNames) {
+ LD_LIBRARY_PATH = "${xorg.libX11}/lib:${xorg.libXext}/lib:${kernelPackages.nvidia_x11_legacy96}/lib";
+ } // optionalAttrs (elem "nvidiaLegacy173" driverNames) {
+ LD_LIBRARY_PATH = "${xorg.libX11}/lib:${xorg.libXext}/lib:${kernelPackages.nvidia_x11_legacy173}/lib";
+ } // optionalAttrs (elem "nvidiaLegacy304" driverNames) {
+ LD_LIBRARY_PATH = "${xorg.libX11}/lib:${xorg.libXext}/lib:${kernelPackages.nvidia_x11_legacy304}/lib";
+ } // optionalAttrs (elem "ati_unfree" driverNames) {
+ LD_LIBRARY_PATH = "${xorg.libX11}/lib:${xorg.libXext}/lib:${kernelPackages.ati_drivers_x11}/lib:${kernelPackages.ati_drivers_x11}/X11R6/lib64/modules/linux";
+ #XORG_DRI_DRIVER_PATH = "${kernelPackages.ati_drivers_x11}/lib/dri"; # is ignored because ati drivers ship their own unpatched libglx.so !
+ } // cfg.displayManager.job.environment;
+
+ preStart =
+ ''
+ rm -f /run/opengl-driver{,-32}
+ ${optionalString (!cfg.driSupport32Bit) "ln -sf opengl-driver /run/opengl-driver-32"}
+
+ ${# !!! The OpenGL driver depends on what's detected at runtime.
+ if elem "nvidia" driverNames then
+ ''
+ ln -sf ${kernelPackages.nvidia_x11} /run/opengl-driver
+ ${optionalString cfg.driSupport32Bit
+ "ln -sf ${pkgs_i686.linuxPackages.nvidia_x11.override { libsOnly = true; kernelDev = null; } } /run/opengl-driver-32"}
+ ''
+ else if elem "nvidiaLegacy96" driverNames then
+ "ln -sf ${kernelPackages.nvidia_x11_legacy96} /run/opengl-driver"
+ else if elem "nvidiaLegacy173" driverNames then
+ "ln -sf ${kernelPackages.nvidia_x11_legacy173} /run/opengl-driver"
+ else if elem "nvidiaLegacy304" driverNames then
+ ''
+ ln -sf ${kernelPackages.nvidia_x11_legacy304} /run/opengl-driver
+ ${optionalString cfg.driSupport32Bit
+ "ln -sf ${pkgs_i686.linuxPackages.nvidia_x11_legacy304.override { libsOnly = true; kernelDev = null; } } /run/opengl-driver-32"}
+ ''
+ else if elem "ati_unfree" driverNames then
+ "ln -sf ${kernelPackages.ati_drivers_x11} /run/opengl-driver"
+ else
+ ''
+ ${optionalString cfg.driSupport "ln -sf ${pkgs.mesa_drivers} /run/opengl-driver"}
+ ${optionalString cfg.driSupport32Bit
+ "ln -sf ${pkgs_i686.mesa_drivers} /run/opengl-driver-32"}
+ ''
+ }
+
+ ${cfg.displayManager.job.preStart}
+
+ rm -f /tmp/.X0-lock
+ '';
+
+ script = "${cfg.displayManager.job.execCmd}";
+
+ serviceConfig = {
+ Restart = "always";
+ RestartSec = "200ms";
+ };
+ };
+
+ services.xserver.displayManager.xserverArgs =
+ [ "-ac"
+ "-logverbose"
+ "-verbose"
+ "-terminate"
+ "-logfile" "/var/log/X.${toString cfg.display}.log"
+ "-config ${configFile}"
+ ":${toString cfg.display}" "vt${toString cfg.tty}"
+ "-xkbdir" "${pkgs.xkeyboard_config}/etc/X11/xkb"
+ ] ++ optional (!cfg.enableTCP) "-nolisten tcp";
+
+ services.xserver.modules =
+ concatLists (catAttrs "modules" drivers) ++
+ [ xorg.xorgserver
+ xorg.xf86inputevdev
+ ];
+
+ services.xserver.config =
+ ''
+ Section "ServerFlags"
+ Option "AllowMouseOpenFail" "on"
+ EndSection
+
+ Section "Module"
+ ${cfg.moduleSection}
+ EndSection
+
+ Section "Monitor"
+ Identifier "Monitor[0]"
+ ${cfg.monitorSection}
+ EndSection
+
+ Section "InputClass"
+ Identifier "Keyboard catchall"
+ MatchIsKeyboard "on"
+ Option "XkbRules" "base"
+ Option "XkbModel" "${cfg.xkbModel}"
+ Option "XkbLayout" "${cfg.layout}"
+ Option "XkbOptions" "${cfg.xkbOptions}"
+ Option "XkbVariant" "${cfg.xkbVariant}"
+ EndSection
+
+ Section "ServerLayout"
+ Identifier "Layout[all]"
+ ${cfg.serverLayoutSection}
+ # Reference the Screen sections for each driver. This will
+ # cause the X server to try each in turn.
+ ${flip concatMapStrings drivers (d: ''
+ Screen "Screen-${d.name}[0]"
+ '')}
+ EndSection
+
+ # For each supported driver, add a "Device" and "Screen"
+ # section.
+ ${flip concatMapStrings drivers (driver: ''
+
+ Section "Device"
+ Identifier "Device-${driver.name}[0]"
+ Driver "${driver.driverName}"
+ ${cfg.deviceSection}
+ ${xrandrDeviceSection}
+ EndSection
+
+ Section "Screen"
+ Identifier "Screen-${driver.name}[0]"
+ Device "Device-${driver.name}[0]"
+ ${optionalString (cfg.monitorSection != "") ''
+ Monitor "Monitor[0]"
+ ''}
+
+ ${cfg.screenSection}
+
+ ${optionalString (cfg.defaultDepth != 0) ''
+ DefaultDepth ${toString cfg.defaultDepth}
+ ''}
+
+ ${optionalString (driver.name == "nvidia") ''
+ Option "RandRRotation" "on"
+ ''}
+
+ ${optionalString
+ (driver.name != "virtualbox" &&
+ (cfg.resolutions != [] ||
+ cfg.extraDisplaySettings != "" ||
+ cfg.virtualScreen != null))
+ (let
+ f = depth:
+ ''
+ SubSection "Display"
+ Depth ${toString depth}
+ ${optionalString (cfg.resolutions != [])
+ "Modes ${concatMapStrings (res: ''"${toString res.x}x${toString res.y}"'') cfg.resolutions}"}
+ ${cfg.extraDisplaySettings}
+ ${optionalString (cfg.virtualScreen != null)
+ "Virtual ${toString cfg.virtualScreen.x} ${toString cfg.virtualScreen.y}"}
+ EndSubSection
+ '';
+ in concatMapStrings f [8 16 24]
+ )}
+
+ EndSection
+ '')}
+
+ ${xrandrMonitorSections}
+ '';
+
+ }));
+
+}
+
diff --git a/nixos/modules/system/activation/activation-script.nix b/nixos/modules/system/activation/activation-script.nix
new file mode 100644
index 0000000000000000000000000000000000000000..dc0175632174a2d45fd90761e73d273ffb238c0b
--- /dev/null
+++ b/nixos/modules/system/activation/activation-script.nix
@@ -0,0 +1,155 @@
+# generate the script used to activate the configuration.
+{ config, pkgs, ... }:
+
+with pkgs.lib;
+
+let
+
+ addAttributeName = mapAttrs (a: v: v // {
+ text = ''
+ #### Activation script snippet ${a}:
+ ${v.text}
+ '';
+ });
+
+ path =
+ [ pkgs.coreutils pkgs.gnugrep pkgs.findutils
+ pkgs.glibc # needed for getent
+ pkgs.shadow
+ pkgs.nettools # needed for hostname
+ ];
+
+in
+
+{
+
+ ###### interface
+
+ options = {
+
+ system.activationScripts = mkOption {
+ default = {};
+
+ example = {
+ stdio = {
+ text = ''
+ # Needed by some programs.
+ ln -sfn /proc/self/fd /dev/fd
+ ln -sfn /proc/self/fd/0 /dev/stdin
+ ln -sfn /proc/self/fd/1 /dev/stdout
+ ln -sfn /proc/self/fd/2 /dev/stderr
+ '';
+ deps = [];
+ };
+ };
+
+ description = ''
+ Activate the new configuration (i.e., update /etc, make accounts,
+ and so on).
+ '';
+
+ merge = mergeTypedOption "script" builtins.isAttrs (fold mergeAttrs {});
+
+ apply = set: {
+ script =
+ ''
+ #! ${pkgs.stdenv.shell}
+
+ systemConfig=@out@
+
+ export PATH=/empty
+ for i in ${toString path}; do
+ PATH=$PATH:$i/bin:$i/sbin
+ done
+
+ # Ensure a consistent umask.
+ umask 0022
+
+ ${
+ let
+ set' = mapAttrs (n: v: if builtins.isString v then noDepEntry v else v) set;
+ withHeadlines = addAttributeName set';
+ in textClosureMap id (withHeadlines) (attrNames withHeadlines)
+ }
+
+ # Make this configuration the current configuration.
+ # The readlink is there to ensure that when $systemConfig = /system
+ # (which is a symlink to the store), /run/current-system is still
+ # used as a garbage collection root.
+ ln -sfn "$(readlink -f "$systemConfig")" /run/current-system
+
+ # Prevent the current configuration from being garbage-collected.
+ ln -sfn /run/current-system /nix/var/nix/gcroots/current-system
+ '';
+ };
+
+ };
+
+ };
+
+
+ ###### implementation
+
+ config = {
+
+ system.activationScripts.stdio =
+ ''
+ # Needed by some programs.
+ ln -sfn /proc/self/fd /dev/fd
+ ln -sfn /proc/self/fd/0 /dev/stdin
+ ln -sfn /proc/self/fd/1 /dev/stdout
+ ln -sfn /proc/self/fd/2 /dev/stderr
+ '';
+
+ system.activationScripts.var =
+ ''
+ # Various log/runtime directories.
+
+ touch /var/run/utmp # must exist
+ chgrp ${toString config.ids.gids.utmp} /var/run/utmp
+ chmod 664 /var/run/utmp
+
+ mkdir -m 0755 -p /var/run/nix/current-load # for distributed builds
+ mkdir -m 0700 -p /var/run/nix/remote-stores
+
+ # Directory holding symlinks to currently running Upstart
+ # jobs. Used to determine which jobs need to be restarted
+ # when switching to a new configuration.
+ mkdir -m 0700 -p /var/run/upstart-jobs
+
+ mkdir -m 0755 -p /var/log
+
+ touch /var/log/wtmp # must exist
+ chmod 644 /var/log/wtmp
+
+ touch /var/log/lastlog
+ chmod 644 /var/log/lastlog
+
+ mkdir -m 1777 -p /var/tmp
+
+ # Empty, read-only home directory of many system accounts.
+ mkdir -m 0555 -p /var/empty
+ '';
+
+ system.activationScripts.media =
+ ''
+ mkdir -m 0755 -p /media
+ '';
+
+ system.activationScripts.usrbinenv =
+ ''
+ mkdir -m 0755 -p /usr/bin
+ ln -sfn ${pkgs.coreutils}/bin/env /usr/bin/.env.tmp
+ mv /usr/bin/.env.tmp /usr/bin/env # atomically replace /usr/bin/env
+ '';
+
+ system.activationScripts.tmpfs =
+ ''
+ ${pkgs.utillinux}/bin/mount -o "remount,size=${config.boot.devSize}" none /dev
+ ${pkgs.utillinux}/bin/mount -o "remount,size=${config.boot.devShmSize}" none /dev/shm
+ ${pkgs.utillinux}/bin/mount -o "remount,size=${config.boot.runSize}" none /run
+ '';
+
+ };
+
+}
diff --git a/nixos/modules/system/activation/no-clone.nix b/nixos/modules/system/activation/no-clone.nix
new file mode 100644
index 0000000000000000000000000000000000000000..f15809e4d8b0c8f42c205c35b4453bd08828739b
--- /dev/null
+++ b/nixos/modules/system/activation/no-clone.nix
@@ -0,0 +1,11 @@
+# This configuration is not made to figure inside the module-list.nix to
+# allow clone of the first level.
+{pkgs, ...}:
+
+with pkgs.lib;
+
+{
+ boot.loader.grub.device = mkOverrideTemplate 0 {} "nodev";
+ nesting.children = mkOverrideTemplate 0 {} [];
+ nesting.clone = mkOverrideTemplate 0 {} [];
+}
diff --git a/nixos/modules/system/activation/switch-to-configuration.pl b/nixos/modules/system/activation/switch-to-configuration.pl
new file mode 100644
index 0000000000000000000000000000000000000000..33ae3aef9fca134adf711c4a9cab9ae432164ec8
--- /dev/null
+++ b/nixos/modules/system/activation/switch-to-configuration.pl
@@ -0,0 +1,362 @@
+#! @perl@
+
+use strict;
+use warnings;
+use File::Basename;
+use File::Slurp;
+use Sys::Syslog qw(:standard :macros);
+use Cwd 'abs_path';
+
+my $out = "@out@";
+
+my $startListFile = "/run/systemd/start-list";
+my $restartListFile = "/run/systemd/restart-list";
+my $reloadListFile = "/run/systemd/reload-list";
+
+my $action = shift @ARGV;
+
+if (!defined $action || ($action ne "switch" && $action ne "boot" && $action ne "test")) {
+ print STDERR < 'quiet') // "";
+my $newVersion = read_file("$out/init-interface-version");
+
+if ($newVersion ne $oldVersion) {
+ print STDERR <{$1} = { load => $2, state => $3, substate => $4 };
+ }
+ return $res;
+}
+
+sub parseFstab {
+ my ($filename) = @_;
+ my ($fss, $swaps);
+ foreach my $line (read_file($filename, err_mode => 'quiet')) {
+ chomp $line;
+ $line =~ s/^\s*#.*//;
+ next if $line =~ /^\s*$/;
+ my @xs = split / /, $line;
+ if ($xs[2] eq "swap") {
+ $swaps->{$xs[0]} = { options => $xs[3] // "" };
+ } else {
+ $fss->{$xs[1]} = { device => $xs[0], fsType => $xs[2], options => $xs[3] // "" };
+ }
+ }
+ return ($fss, $swaps);
+}
+
+sub parseUnit {
+ my ($filename) = @_;
+ my $info = {};
+ foreach my $line (read_file($filename)) {
+ # FIXME: not quite correct.
+ $line =~ /^([^=]+)=(.*)$/ or next;
+ $info->{$1} = $2;
+ }
+ return $info;
+}
+
+sub boolIsTrue {
+ my ($s) = @_;
+ return $s eq "yes" || $s eq "true";
+}
+
+# Stop all services that no longer exist or have changed in the new
+# configuration.
+my (@unitsToStop, @unitsToSkip);
+my $activePrev = getActiveUnits;
+while (my ($unit, $state) = each %{$activePrev}) {
+ my $baseUnit = $unit;
+
+ # Recognise template instances.
+ $baseUnit = "$1\@.$2" if $unit =~ /^(.*)@[^\.]*\.(.*)$/;
+ my $prevUnitFile = "/etc/systemd/system/$baseUnit";
+ my $newUnitFile = "$out/etc/systemd/system/$baseUnit";
+
+ my $baseName = $baseUnit;
+ $baseName =~ s/\.[a-z]*$//;
+
+ if (-e $prevUnitFile && ($state->{state} eq "active" || $state->{state} eq "activating")) {
+ if (! -e $newUnitFile) {
+ push @unitsToStop, $unit;
+ }
+
+ elsif ($unit =~ /\.target$/) {
+ my $unitInfo = parseUnit($newUnitFile);
+
+ # Cause all active target units to be restarted below.
+ # This should start most changed units we stop here as
+ # well as any new dependencies (including new mounts and
+ # swap devices). FIXME: the suspend target is sometimes
+ # active after the system has resumed, which probably
+ # should not be the case. Just ignore it.
+ if ($unit ne "suspend.target" && $unit ne "hibernate.target" && $unit ne "hybrid-sleep.target") {
+ unless (boolIsTrue($unitInfo->{'RefuseManualStart'} // "no")) {
+ write_file($startListFile, { append => 1 }, "$unit\n");
+ }
+ }
+
+ # Stop targets that have X-StopOnReconfiguration set.
+ # This is necessary to respect dependency orderings
+ # involving targets: if unit X starts after target Y and
+ # target Y starts after unit Z, then if X and Z have both
+ # changed, then X should be restarted after Z. However,
+ # if target Y is in the "active" state, X and Z will be
+ # restarted at the same time because X's dependency on Y
+ # is already satisfied. Thus, we need to stop Y first.
+ # Stopping a target generally has no effect on other units
+ # (unless there is a PartOf dependency), so this is just a
+ # bookkeeping thing to get systemd to do the right thing.
+ if (boolIsTrue($unitInfo->{'X-StopOnReconfiguration'} // "no")) {
+ push @unitsToStop, $unit;
+ }
+ }
+
+ elsif (abs_path($prevUnitFile) ne abs_path($newUnitFile)) {
+ if ($unit eq "sysinit.target" || $unit eq "basic.target" || $unit eq "multi-user.target" || $unit eq "graphical.target") {
+ # Do nothing. These cannot be restarted directly.
+ } elsif ($unit =~ /\.mount$/) {
+ # Reload the changed mount unit to force a remount.
+ write_file($reloadListFile, { append => 1 }, "$unit\n");
+ } elsif ($unit =~ /\.socket$/ || $unit =~ /\.path$/) {
+ # FIXME: do something?
+ } else {
+ my $unitInfo = parseUnit($newUnitFile);
+ if (!boolIsTrue($unitInfo->{'X-RestartIfChanged'} // "yes")) {
+ push @unitsToSkip, $unit;
+ } else {
+ # If this unit is socket-activated, then stop the
+ # socket unit(s) as well, and restart the
+ # socket(s) instead of the service.
+ my $socketActivated = 0;
+ if ($unit =~ /\.service$/) {
+ my @sockets = split / /, ($unitInfo->{Sockets} // "");
+ if (scalar @sockets == 0) {
+ @sockets = ("$baseName.socket");
+ }
+ foreach my $socket (@sockets) {
+ if (defined $activePrev->{$socket}) {
+ push @unitsToStop, $socket;
+ write_file($startListFile, { append => 1 }, "$socket\n");
+ $socketActivated = 1;
+ }
+ }
+ }
+
+ if (!boolIsTrue($unitInfo->{'X-StopIfChanged'} // "yes")) {
+
+ # This unit should be restarted instead of
+ # stopped and started.
+ write_file($restartListFile, { append => 1 }, "$unit\n");
+
+ } else {
+
+ # If the unit is not socket-activated, record
+ # that this unit needs to be started below.
+ # We write this to a file to ensure that the
+ # service gets restarted if we're interrupted.
+ if (!$socketActivated) {
+ write_file($startListFile, { append => 1 }, "$unit\n");
+ }
+
+ push @unitsToStop, $unit;
+
+ }
+ }
+ }
+ }
+ }
+}
+
+sub pathToUnitName {
+ my ($path) = @_;
+ die unless substr($path, 0, 1) eq "/";
+ return "-" if $path eq "/";
+ $path = substr($path, 1);
+ $path =~ s/\//-/g;
+ # FIXME: handle - and unprintable characters.
+ return $path;
+}
+
+sub unique {
+ my %seen;
+ my @res;
+ foreach my $name (@_) {
+ next if $seen{$name};
+ $seen{$name} = 1;
+ push @res, $name;
+ }
+ return @res;
+}
+
+# Compare the previous and new fstab to figure out which filesystems
+# need a remount or need to be unmounted. New filesystems are mounted
+# automatically by starting local-fs.target. FIXME: might be nicer if
+# we generated units for all mounts; then we could unify this with the
+# unit checking code above.
+my ($prevFss, $prevSwaps) = parseFstab "/etc/fstab";
+my ($newFss, $newSwaps) = parseFstab "$out/etc/fstab";
+foreach my $mountPoint (keys %$prevFss) {
+ my $prev = $prevFss->{$mountPoint};
+ my $new = $newFss->{$mountPoint};
+ my $unit = pathToUnitName($mountPoint) . ".mount";
+ if (!defined $new) {
+ # Filesystem entry disappeared, so unmount it.
+ push @unitsToStop, $unit;
+ } elsif ($prev->{fsType} ne $new->{fsType} || $prev->{device} ne $new->{device}) {
+ # Filesystem type or device changed, so unmount and mount it.
+ write_file($startListFile, { append => 1 }, "$unit\n");
+ push @unitsToStop, $unit;
+ } elsif ($prev->{options} ne $new->{options}) {
+ # Mount options changes, so remount it.
+ write_file($reloadListFile, { append => 1 }, "$unit\n");
+ }
+}
+
+# Also handles swap devices.
+foreach my $device (keys %$prevSwaps) {
+ my $prev = $prevSwaps->{$device};
+ my $new = $newSwaps->{$device};
+ if (!defined $new) {
+ # Swap entry disappeared, so turn it off. Can't use
+ # "systemctl stop" here because systemd has lots of alias
+ # units that prevent a stop from actually calling
+ # "swapoff".
+ print STDERR "stopping swap device: $device\n";
+ system("@utillinux@/sbin/swapoff", $device);
+ }
+ # FIXME: update swap options (i.e. its priority).
+}
+
+if (scalar @unitsToStop > 0) {
+ @unitsToStop = unique(@unitsToStop);
+ print STDERR "stopping the following units: ", join(", ", sort(@unitsToStop)), "\n";
+ system("@systemd@/bin/systemctl", "stop", "--", @unitsToStop); # FIXME: ignore errors?
+}
+
+print STDERR "NOT restarting the following units: ", join(", ", sort(@unitsToSkip)), "\n"
+ if scalar @unitsToSkip > 0;
+
+# Activate the new configuration (i.e., update /etc, make accounts,
+# and so on).
+my $res = 0;
+print STDERR "activating the configuration...\n";
+system("$out/activate", "$out") == 0 or $res = 2;
+
+# Restart systemd if necessary.
+if (abs_path("/proc/1/exe") ne abs_path("@systemd@/lib/systemd/systemd")) {
+ print STDERR "restarting systemd...\n";
+ system("@systemd@/bin/systemctl", "daemon-reexec") == 0 or $res = 2;
+}
+
+# Forget about previously failed services.
+system("@systemd@/bin/systemctl", "reset-failed");
+
+# Make systemd reload its units.
+system("@systemd@/bin/systemctl", "daemon-reload") == 0 or $res = 3;
+
+# Restart changed services (those that have to be restarted rather
+# than stopped and started).
+my @restart = unique(split('\n', read_file($restartListFile, err_mode => 'quiet') // ""));
+if (scalar @restart > 0) {
+ print STDERR "restarting the following units: ", join(", ", sort(@restart)), "\n";
+ system("@systemd@/bin/systemctl", "restart", "--", @restart) == 0 or $res = 4;
+ unlink($restartListFile);
+}
+
+# Start all active targets, as well as changed units we stopped above.
+# The latter is necessary because some may not be dependencies of the
+# targets (i.e., they were manually started). FIXME: detect units
+# that are symlinks to other units. We shouldn't start both at the
+# same time because we'll get a "Failed to add path to set" error from
+# systemd.
+my @start = unique("default.target", "timers.target", split('\n', read_file($startListFile, err_mode => 'quiet') // ""));
+print STDERR "starting the following units: ", join(", ", sort(@start)), "\n";
+system("@systemd@/bin/systemctl", "start", "--", @start) == 0 or $res = 4;
+unlink($startListFile);
+
+# Reload units that need it. This includes remounting changed mount
+# units.
+my @reload = unique(split '\n', read_file($reloadListFile, err_mode => 'quiet') // "");
+if (scalar @reload > 0) {
+ print STDERR "reloading the following units: ", join(", ", sort(@reload)), "\n";
+ system("@systemd@/bin/systemctl", "reload", "--", @reload) == 0 or $res = 4;
+ unlink($reloadListFile);
+}
+
+# Signal dbus to reload its configuration.
+system("@systemd@/bin/systemctl", "reload", "dbus.service");
+
+# Print failed and new units.
+my (@failed, @new, @restarting);
+my $activeNew = getActiveUnits;
+while (my ($unit, $state) = each %{$activeNew}) {
+ push @failed, $unit if $state->{state} eq "failed" || $state->{substate} eq "auto-restart";
+ push @new, $unit if $state->{state} ne "failed" && !defined $activePrev->{$unit};
+}
+
+print STDERR "the following new units were started: ", join(", ", sort(@new)), "\n"
+ if scalar @new > 0;
+
+if (scalar @failed > 0) {
+ print STDERR "warning: the following units failed: ", join(", ", sort(@failed)), "\n";
+ foreach my $unit (@failed) {
+ print STDERR "\n";
+ system("COLUMNS=1000 @systemd@/bin/systemctl status --no-pager '$unit' >&2");
+ }
+ $res = 4;
+}
+
+if ($res == 0) {
+ syslog(LOG_NOTICE, "finished switching to system configuration $out");
+} else {
+ syslog(LOG_ERR, "switching to system configuration $out failed (status $res)");
+}
+
+exit $res;
diff --git a/nixos/modules/system/activation/top-level.nix b/nixos/modules/system/activation/top-level.nix
new file mode 100644
index 0000000000000000000000000000000000000000..32157e4198560a8b078e9dd1ce12906e5c792285
--- /dev/null
+++ b/nixos/modules/system/activation/top-level.nix
@@ -0,0 +1,194 @@
+{ config, pkgs, modules, baseModules, ... }:
+
+with pkgs.lib;
+
+let
+
+
+ # This attribute is responsible for creating boot entries for
+ # child configuration. They are only (directly) accessible
+ # when the parent configuration is boot default. For example,
+ # you can provide an easy way to boot the same configuration
+ # as you use, but with another kernel
+ # !!! fix this
+ cloner = inheritParent: list: with pkgs.lib;
+ map (childConfig:
+ (import ../../../lib/eval-config.nix {
+ inherit baseModules;
+ modules =
+ (optionals inheritParent modules)
+ ++ [ ./no-clone.nix ]
+ ++ [ childConfig ];
+ }).config.system.build.toplevel
+ ) list;
+
+ children =
+ cloner false config.nesting.children
+ ++ cloner true config.nesting.clone;
+
+
+ systemBuilder =
+ let
+ kernelPath = "${config.boot.kernelPackages.kernel}/" +
+ "${config.system.boot.loader.kernelFile}";
+ in ''
+ mkdir $out
+
+ if [ ! -f ${kernelPath} ]; then
+ echo "The bootloader cannot find the proper kernel image."
+ echo "(Expecting ${kernelPath})"
+ false
+ fi
+
+ ln -s ${kernelPath} $out/kernel
+ ln -s ${config.system.modulesTree} $out/kernel-modules
+
+ ln -s ${config.system.build.initialRamdisk}/initrd $out/initrd
+
+ echo "$activationScript" > $out/activate
+ substituteInPlace $out/activate --subst-var out
+ chmod u+x $out/activate
+ unset activationScript
+
+ cp ${config.system.build.bootStage2} $out/init
+ substituteInPlace $out/init --subst-var-by systemConfig $out
+
+ ln -s ${config.system.build.etc}/etc $out/etc
+ ln -s ${config.system.path} $out/sw
+ ln -s "$systemd" $out/systemd
+ ln -s ${config.hardware.firmware} $out/firmware
+
+ echo -n "$kernelParams" > $out/kernel-params
+ echo -n "$configurationName" > $out/configuration-name
+ echo -n "systemd ${toString config.systemd.package.interfaceVersion}" > $out/init-interface-version
+ echo -n "$nixosVersion" > $out/nixos-version
+
+ mkdir $out/fine-tune
+ childCount=0
+ for i in $children; do
+ childCount=$(( childCount + 1 ))
+ ln -s $i $out/fine-tune/child-$childCount
+ done
+
+ mkdir $out/bin
+ substituteAll ${./switch-to-configuration.pl} $out/bin/switch-to-configuration
+ chmod +x $out/bin/switch-to-configuration
+
+ ${config.system.extraSystemBuilderCmds}
+ '';
+
+
+ # Putting it all together. This builds a store path containing
+ # symlinks to the various parts of the built configuration (the
+ # kernel, the Upstart services, the init scripts, etc.) as well as a
+ # script `switch-to-configuration' that activates the configuration
+ # and makes it bootable.
+ system = pkgs.stdenv.mkDerivation {
+ name = "nixos-${config.system.nixosVersion}";
+ preferLocalBuild = true;
+ buildCommand = systemBuilder;
+
+ inherit (pkgs) utillinux coreutils;
+ systemd = config.systemd.package;
+
+ inherit children;
+ kernelParams =
+ config.boot.kernelParams ++ config.boot.extraKernelParams;
+ installBootLoader =
+ config.system.build.installBootLoader
+ or "echo 'Warning: do not know how to make this configuration bootable; please enable a boot loader.' 1>&2; true";
+ activationScript = config.system.activationScripts.script;
+ nixosVersion = config.system.nixosVersion;
+
+ jobs = map (j: j.name) (attrValues config.jobs);
+
+ # Pass the names of all Upstart tasks to the activation script.
+ tasks = attrValues (mapAttrs (n: v: if v.task then ["[${v.name}]=1"] else []) config.jobs);
+
+ # Pass the names of all Upstart jobs that shouldn't be restarted
+ # to the activation script.
+ noRestartIfChanged = attrValues (mapAttrs (n: v: if v.restartIfChanged then [] else ["[${v.name}]=1"]) config.jobs);
+
+ configurationName = config.boot.loader.grub.configurationName;
+
+ # Needed by switch-to-configuration.
+ perl = "${pkgs.perl}/bin/perl -I${pkgs.perlPackages.FileSlurp}/lib/perl5/site_perl";
+ };
+
+
+in
+
+{
+ options = {
+
+ system.build = mkOption {
+ default = {};
+ description = ''
+ Attribute set of derivations used to setup the system.
+ '';
+ };
+
+ nesting.children = mkOption {
+ default = [];
+ description = ''
+ Additional configurations to build.
+ '';
+ };
+
+ nesting.clone = mkOption {
+ default = [];
+ description = ''
+ Additional configurations to build based on the current
+ configuration which is has a lower priority.
+ '';
+ };
+
+ system.boot.loader.id = mkOption {
+ default = "";
+ description = ''
+ Id string of the used bootloader.
+ '';
+ };
+
+ system.boot.loader.kernelFile = mkOption {
+ default = pkgs.stdenv.platform.kernelTarget;
+ type = types.uniq types.string;
+ description = ''
+ Name of the kernel file to be passed to the bootloader.
+ '';
+ };
+
+ system.copySystemConfiguration = mkOption {
+ default = false;
+ description = ''
+ If enabled, copies the NixOS configuration file
+ $NIXOS_CONFIG (usually
+ /etc/nixos/configuration.nix)
+ to the system store path.
+ '';
+ };
+
+ system.extraSystemBuilderCmds = mkOption {
+ default = "";
+ internal = true;
+ merge = concatStringsSep "\n";
+ description = ''
+ This code will be added to the builder creating the system store path.
+ '';
+ };
+
+ };
+
+
+ config = {
+
+ system.extraSystemBuilderCmds =
+ optionalString
+ config.system.copySystemConfiguration
+ "cp ${maybeEnv "NIXOS_CONFIG" "/etc/nixos/configuration.nix"} $out";
+
+ system.build.toplevel = system;
+
+ };
+
+}
diff --git a/nixos/modules/system/boot/kernel.nix b/nixos/modules/system/boot/kernel.nix
new file mode 100644
index 0000000000000000000000000000000000000000..4ceabb20df50418a1fd7b0ed95122c3b47fd2424
--- /dev/null
+++ b/nixos/modules/system/boot/kernel.nix
@@ -0,0 +1,304 @@
+{ config, pkgs, ... }:
+
+with pkgs.lib;
+
+let
+
+ kernel = config.boot.kernelPackages.kernel;
+
+ kernelModulesConf = pkgs.writeText "nixos.conf"
+ ''
+ ${concatStringsSep "\n" config.boot.kernelModules}
+ '';
+
+in
+
+{
+
+ ###### interface
+
+ options = {
+
+ boot.kernelPackages = mkOption {
+ default = pkgs.linuxPackages;
+ # We don't want to evaluate all of linuxPackages for the manual
+ # - some of it might not even evaluate correctly.
+ defaultText = "pkgs.linuxPackages";
+ example = "pkgs.linuxPackages_2_6_25";
+ description = ''
+ This option allows you to override the Linux kernel used by
+ NixOS. Since things like external kernel module packages are
+ tied to the kernel you're using, it also overrides those.
+ This option is a function that takes Nixpkgs as an argument
+ (as a convenience), and returns an attribute set containing at
+ the very least an attribute kernel.
+ Additional attributes may be needed depending on your
+ configuration. For instance, if you use the NVIDIA X driver,
+ then it also needs to contain an attribute
+ nvidia_x11.
+ '';
+ };
+
+ boot.kernelParams = mkOption {
+ default = [ ];
+ description = ''
+ The kernel parameters. If you want to add additional
+ parameters, it's best to set
+
boot.extraKernelParams
.
+ '';
+ };
+
+ boot.extraKernelParams = mkOption {
+ default = [ ];
+ example = [ "boot.trace" ];
+ description = "Additional user-defined kernel parameters.";
+ };
+
+ boot.consoleLogLevel = mkOption {
+ type = types.int;
+ default = 4;
+ description = ''
+ The kernel console log level. Only log messages with a
+ priority numerically less than this will appear on the
+ console.
+ '';
+ };
+
+ boot.vesa = mkOption {
+ default = false;
+ description = ''
+ Whether to activate VESA video mode on boot.
+ '';
+ };
+
+ boot.extraModulePackages = mkOption {
+ default = [];
+ # !!! example = [pkgs.nvidia_x11];
+ description = "A list of additional packages supplying kernel modules.";
+ };
+
+ boot.kernelModules = mkOption {
+ default = [];
+ description = ''
+ The set of kernel modules to be loaded in the second stage of
+ the boot process. Note that modules that are needed to
+ mount the root file system should be added to
+
boot.initrd.availableKernelModules
or
+
boot.initrd.kernelModules
.
+ '';
+ };
+
+ boot.initrd.availableKernelModules = mkOption {
+ default = [];
+ example = [ "sata_nv" "ext3" ];
+ description = ''
+ The set of kernel modules in the initial ramdisk used during the
+ boot process. This set must include all modules necessary for
+ mounting the root device. That is, it should include modules
+ for the physical device (e.g., SCSI drivers) and for the file
+ system (e.g., ext3). The set specified here is automatically
+ closed under the module dependency relation, i.e., all
+ dependencies of the modules list here are included
+ automatically. The modules listed here are available in the
+ initrd, but are only loaded on demand (e.g., the ext3 module is
+ loaded automatically when an ext3 filesystem is mounted, and
+ modules for PCI devices are loaded when they match the PCI ID
+ of a device in your system). To force a module to be loaded,
+ include it in
boot.initrd.kernelModules
.
+ '';
+ };
+
+ boot.initrd.kernelModules = mkOption {
+ default = [];
+ description = "List of modules that are always loaded by the initrd.";
+ };
+
+ system.modulesTree = mkOption {
+ internal = true;
+ default = [];
+ description = ''
+ Tree of kernel modules. This includes the kernel, plus modules
+ built outside of the kernel. Combine these into a single tree of
+ symlinks because modprobe only supports one directory.
+ '';
+ merge = mergeListOption;
+ # Convert the list of path to only one path.
+ apply = pkgs.aggregateModules;
+ };
+
+ system.requiredKernelConfig = mkOption {
+ default = [];
+ example = literalExample ''
+ with config.lib.kernelConfig; [
+ (isYes "MODULES")
+ (isEnabled "FB_CON_DECOR")
+ (isEnabled "BLK_DEV_INITRD")
+ ]
+ '';
+ internal = true;
+ type = types.listOf types.attrs;
+ description = ''
+ This option allows modules to specify the kernel config options that
+ must be set (or unset) for the module to work. Please use the
+ lib.kernelConfig functions to build list elements.
+ '';
+ };
+
+ };
+
+
+ ###### implementation
+
+ config = {
+
+ system.build = { inherit kernel; };
+
+ system.modulesTree = [ kernel ] ++ config.boot.extraModulePackages;
+
+ # Implement consoleLogLevel both in early boot and using sysctl
+ # (so you don't need to reboot to have changes take effect).
+ boot.kernelParams =
+ [ "loglevel=${toString config.boot.consoleLogLevel}" ] ++
+ optionals config.boot.vesa [ "vga=0x317" ];
+
+ boot.kernel.sysctl."kernel.printk" = config.boot.consoleLogLevel;
+
+ boot.kernelModules = [ "loop" ];
+
+ boot.initrd.availableKernelModules =
+ [ # Note: most of these (especially the SATA/PATA modules)
+ # shouldn't be included by default since nixos-hardware-scan
+ # detects them, but I'm keeping them for now for backwards
+ # compatibility.
+
+ # Some SATA/PATA stuff.
+ "ahci"
+ "sata_nv"
+ "sata_via"
+ "sata_sis"
+ "sata_uli"
+ "ata_piix"
+ "pata_marvell"
+
+ # Standard SCSI stuff.
+ "sd_mod"
+ "sr_mod"
+
+ # Standard IDE stuff.
+ "ide_cd"
+ "ide_disk"
+ "ide_generic"
+
+ # Support USB keyboards, in case the boot fails and we only have
+ # a USB keyboard.
+ "uhci_hcd"
+ "ehci_hcd"
+ "ehci_pci"
+ "ohci_hcd"
+ "xhci_hcd"
+ "usbhid"
+ "hid_generic"
+
+ # Unix domain sockets (needed by udev).
+ "unix"
+
+ # Misc. stuff.
+ "pcips2" "xtkbd"
+
+ # To wait for SCSI devices to appear.
+ "scsi_wait_scan"
+ ];
+
+ boot.initrd.kernelModules =
+ [ # For LVM.
+ "dm_mod"
+ ];
+
+ # The Linux kernel >= 2.6.27 provides firmware.
+ hardware.firmware = [ "${kernel}/lib/firmware" ];
+
+ # Create /etc/modules-load.d/nixos.conf, which is read by
+ # systemd-modules-load.service to load required kernel modules.
+ # FIXME: ensure that systemd-modules-load.service is restarted if
+ # this file changes.
+ environment.etc = singleton
+ { target = "modules-load.d/nixos.conf";
+ source = kernelModulesConf;
+ };
+
+ # Sigh. This overrides systemd's systemd-modules-load.service
+ # just so we can set a restart trigger. Also make
+ # multi-user.target pull it in so that it gets started if it
+ # failed earlier.
+ systemd.services."systemd-modules-load" =
+ { description = "Load Kernel Modules";
+ wantedBy = [ "sysinit.target" "multi-user.target" ];
+ before = [ "sysinit.target" "shutdown.target" ];
+ unitConfig =
+ { DefaultDependencies = "no";
+ Conflicts = "shutdown.target";
+ };
+ serviceConfig =
+ { Type = "oneshot";
+ RemainAfterExit = true;
+ ExecStart = "${config.systemd.package}/lib/systemd/systemd-modules-load";
+ # Ignore failed module loads. Typically some of the
+ # modules in ‘boot.kernelModules’ are "nice to have but
+ # not required" (e.g. acpi-cpufreq), so we don't want to
+ # barf on those.
+ SuccessExitStatus = "0 1";
+ };
+ restartTriggers = [ kernelModulesConf ];
+ };
+
+ lib.kernelConfig = {
+ isYes = option: {
+ assertion = config: config.isYes option;
+ message = "CONFIG_${option} is not yes!";
+ configLine = "CONFIG_${option}=y";
+ };
+
+ isNo = option: {
+ assertion = config: config.isNo option;
+ message = "CONFIG_${option} is not no!";
+ configLine = "CONFIG_${option}=n";
+ };
+
+ isModule = option: {
+ assertion = config: config.isModule option;
+ message = "CONFIG_${option} is not built as a module!";
+ configLine = "CONFIG_${option}=m";
+ };
+
+ ### Usually you will just want to use these two
+ # True if yes or module
+ isEnabled = option: {
+ assertion = config: config.isEnabled option;
+ message = "CONFIG_${option} is not enabled!";
+ configLine = "CONFIG_${option}=y";
+ };
+
+ # True if no or omitted
+ isDisabled = option: {
+ assertion = config: config.isDisabled option;
+ message = "CONFIG_${option} is not disabled!";
+ configLine = "CONFIG_${option}=n";
+ };
+ };
+
+ # The config options that all modules can depend upon
+ system.requiredKernelConfig = with config.lib.kernelConfig; [
+ # !!! Should this really be needed?
+ (isYes "MODULES")
+ (isYes "BINFMT_ELF")
+ ];
+
+ # nixpkgs kernels are assumed to have all required features
+ assertions = if config.boot.kernelPackages.kernel ? features then [] else
+ let cfg = config.boot.kernelPackages.kernel.config; in map (attrs:
+ { assertion = attrs.assertion cfg; inherit (attrs) message; }
+ ) config.system.requiredKernelConfig;
+
+ };
+
+}
diff --git a/nixos/modules/system/boot/kexec.nix b/nixos/modules/system/boot/kexec.nix
new file mode 100644
index 0000000000000000000000000000000000000000..b7821f9509f12bba10dd3dfc92d2c683c5308026
--- /dev/null
+++ b/nixos/modules/system/boot/kexec.nix
@@ -0,0 +1,21 @@
+{ config, pkgs, ... }:
+
+{
+ environment.systemPackages = [ pkgs.kexectools ];
+
+ systemd.services."prepare-kexec" =
+ { description = "Preparation for kexec";
+ wantedBy = [ "kexec.target" ];
+ before = [ "systemd-kexec.service" ];
+ unitConfig.DefaultDependencies = false;
+ serviceConfig.Type = "oneshot";
+ path = [ pkgs.kexectools ];
+ script =
+ ''
+ p=$(readlink -f /nix/var/nix/profiles/system)
+ if ! [ -d $p ]; then exit 1; fi
+ exec kexec --load $p/kernel --initrd=$p/initrd --append="$(cat $p/kernel-params) init=$p/init"
+ '';
+ };
+
+}
\ No newline at end of file
diff --git a/nixos/modules/system/boot/loader/efi.nix b/nixos/modules/system/boot/loader/efi.nix
new file mode 100644
index 0000000000000000000000000000000000000000..7e739173f9a3006a4bfbf5b10d17e180014cf11e
--- /dev/null
+++ b/nixos/modules/system/boot/loader/efi.nix
@@ -0,0 +1,23 @@
+{ pkgs, ... }:
+
+with pkgs.lib;
+
+{
+ options.boot.loader.efi = {
+ canTouchEfiVariables = mkOption {
+ default = false;
+
+ type = types.bool;
+
+ description = "Whether or not the installation process should modify efi boot variables.";
+ };
+
+ efiSysMountPoint = mkOption {
+ default = "/boot";
+
+ type = types.string;
+
+ description = "Where the EFI System Partition is mounted.";
+ };
+ };
+}
diff --git a/nixos/modules/system/boot/loader/generations-dir/generations-dir-builder.sh b/nixos/modules/system/boot/loader/generations-dir/generations-dir-builder.sh
new file mode 100644
index 0000000000000000000000000000000000000000..e723b9eb7cb31864e2ddd30b7f79b57e748ab5ec
--- /dev/null
+++ b/nixos/modules/system/boot/loader/generations-dir/generations-dir-builder.sh
@@ -0,0 +1,106 @@
+#! @bash@/bin/sh -e
+
+shopt -s nullglob
+
+export PATH=/empty
+for i in @path@; do PATH=$PATH:$i/bin; done
+
+default=$1
+if test -z "$1"; then
+ echo "Syntax: generations-dir-builder.sh "
+ exit 1
+fi
+
+echo "updating the boot generations directory..."
+
+mkdir -p /boot
+
+rm -Rf /boot/system* || true
+
+target=/boot/grub/menu.lst
+tmp=$target.tmp
+
+# Convert a path to a file in the Nix store such as
+# /nix/store/-/file to --.
+cleanName() {
+ local path="$1"
+ echo "$path" | sed 's|^/nix/store/||' | sed 's|/|-|g'
+}
+
+# Copy a file from the Nix store to /boot/kernels.
+declare -A filesCopied
+
+copyToKernelsDir() {
+ local src="$1"
+ local dst="/boot/kernels/$(cleanName $src)"
+ # Don't copy the file if $dst already exists. This means that we
+ # have to create $dst atomically to prevent partially copied
+ # kernels or initrd if this script is ever interrupted.
+ if ! test -e $dst; then
+ local dstTmp=$dst.tmp.$$
+ cp $src $dstTmp
+ mv $dstTmp $dst
+ fi
+ filesCopied[$dst]=1
+ result=$dst
+}
+
+
+# Copy its kernel and initrd to /boot/kernels.
+addEntry() {
+ local path="$1"
+ local generation="$2"
+ local outdir=/boot/system-$generation
+
+ if ! test -e $path/kernel -a -e $path/initrd; then
+ return
+ fi
+
+ local kernel=$(readlink -f $path/kernel)
+ local initrd=$(readlink -f $path/initrd)
+
+ if test -n "@copyKernels@"; then
+ copyToKernelsDir $kernel; kernel=$result
+ copyToKernelsDir $initrd; initrd=$result
+ fi
+
+ mkdir -p $outdir
+ ln -sf $(readlink -f $path) $outdir/system
+ ln -sf $(readlink -f $path/init) $outdir/init
+ ln -sf $initrd $outdir/initrd
+ ln -sf $kernel $outdir/kernel
+
+ if test $(readlink -f "$path") = "$default"; then
+ cp "$kernel" /boot/nixos-kernel
+ cp "$initrd" /boot/nixos-initrd
+ cp "$(readlink -f "$path/init")" /boot/nixos-init
+
+ mkdir -p /boot/default
+ # ln -sfT: overrides target even if it exists.
+ ln -sfT $(readlink -f $path) /boot/default/system
+ ln -sfT $(readlink -f $path/init) /boot/default/init
+ ln -sfT $initrd /boot/default/initrd
+ ln -sfT $kernel /boot/default/kernel
+ fi
+}
+
+if test -n "@copyKernels@"; then
+ mkdir -p /boot/kernels
+fi
+
+# Add all generations of the system profile to the menu, in reverse
+# (most recent to least recent) order.
+for generation in $(
+ (cd /nix/var/nix/profiles && ls -d system-*-link) \
+ | sed 's/system-\([0-9]\+\)-link/\1/' \
+ | sort -n -r); do
+ link=/nix/var/nix/profiles/system-$generation-link
+ addEntry $link $generation
+done
+
+# Remove obsolete files from /boot/kernels.
+for fn in /boot/kernels/*; do
+ if ! test "${filesCopied[$fn]}" = 1; then
+ rm -vf -- "$fn"
+ fi
+done
diff --git a/nixos/modules/system/boot/loader/generations-dir/generations-dir.nix b/nixos/modules/system/boot/loader/generations-dir/generations-dir.nix
new file mode 100644
index 0000000000000000000000000000000000000000..9855c8c19dd0b896f940fb8547c0cda587b2c1c4
--- /dev/null
+++ b/nixos/modules/system/boot/loader/generations-dir/generations-dir.nix
@@ -0,0 +1,63 @@
+{ config, pkgs, ... }:
+
+with pkgs.lib;
+
+let
+
+ generationsDirBuilder = pkgs.substituteAll {
+ src = ./generations-dir-builder.sh;
+ isExecutable = true;
+ inherit (pkgs) bash;
+ path = [pkgs.coreutils pkgs.gnused pkgs.gnugrep];
+ inherit (config.boot.loader.generationsDir) copyKernels;
+ };
+
+ # Temporary check, for nixos to cope both with nixpkgs stdenv-updates and trunk
+ platform = pkgs.stdenv.platform;
+
+in
+
+{
+ options = {
+
+ boot.loader.generationsDir = {
+
+ enable = mkOption {
+ default = false;
+ description = ''
+ Whether to create symlinks to the system generations under
+ /boot. When enabled,
+ /boot/default/kernel,
+ /boot/default/initrd, etc., are updated to
+ point to the current generation's kernel image, initial RAM
+ disk, and other bootstrap files.
+
+ This optional is not necessary with boot loaders such as GNU GRUB
+ for which the menu is updated to point to the latest bootstrap
+ files. However, it is needed for U-Boot on platforms where the
+ boot command line is stored in flash memory rather than in a
+ menu file.
+ '';
+ };
+
+ copyKernels = mkOption {
+ default = false;
+ description = "
+ Whether copy the necessary boot files into /boot, so
+ /nix/store is not needed by the boot loader.
+ ";
+ };
+
+ };
+
+ };
+
+
+ config = mkIf config.boot.loader.generationsDir.enable {
+
+ system.build.installBootLoader = generationsDirBuilder;
+ system.boot.loader.id = "generationsDir";
+ system.boot.loader.kernelFile = platform.kernelTarget;
+
+ };
+}
diff --git a/nixos/modules/system/boot/loader/grub/grub.nix b/nixos/modules/system/boot/loader/grub/grub.nix
new file mode 100644
index 0000000000000000000000000000000000000000..c7c1f675c7787539023bff722c009b77830adeed
--- /dev/null
+++ b/nixos/modules/system/boot/loader/grub/grub.nix
@@ -0,0 +1,262 @@
+{ config, pkgs, ... }:
+
+with pkgs.lib;
+
+let
+
+ cfg = config.boot.loader.grub;
+
+ realGrub = if cfg.version == 1 then pkgs.grub else pkgs.grub2;
+
+ grub =
+ # Don't include GRUB if we're only generating a GRUB menu (e.g.,
+ # in EC2 instances).
+ if cfg.devices == ["nodev"]
+ then null
+ else realGrub;
+
+ f = x: if x == null then "" else "" + x;
+
+ grubConfig = pkgs.writeText "grub-config.xml" (builtins.toXML
+ { splashImage = f config.boot.loader.grub.splashImage;
+ grub = f grub;
+ shell = "${pkgs.stdenv.shell}";
+ fullVersion = (builtins.parseDrvName realGrub.name).version;
+ inherit (cfg)
+ version extraConfig extraPerEntryConfig extraEntries
+ extraEntriesBeforeNixOS extraPrepareConfig configurationLimit copyKernels timeout
+ default devices;
+ path = (makeSearchPath "bin" [
+ pkgs.coreutils pkgs.gnused pkgs.gnugrep pkgs.findutils pkgs.diffutils
+ ]) + ":" + (makeSearchPath "sbin" [
+ pkgs.mdadm
+ ]);
+ });
+
+in
+
+{
+
+ ###### interface
+
+ options = {
+
+ boot.loader.grub = {
+
+ enable = mkOption {
+ default = true;
+ type = types.bool;
+ description = ''
+ Whether to enable the GNU GRUB boot loader.
+ '';
+ };
+
+ version = mkOption {
+ default = 2;
+ example = 1;
+ type = types.int;
+ description = ''
+ The version of GRUB to use: 1 for GRUB
+ Legacy (versions 0.9x), or 2 (the
+ default) for GRUB 2.
+ '';
+ };
+
+ device = mkOption {
+ default = "";
+ example = "/dev/hda";
+ type = types.uniq types.string;
+ description = ''
+ The device on which the GRUB boot loader will be installed.
+ The special value nodev means that a GRUB
+ boot menu will be generated, but GRUB itself will not
+ actually be installed. To install GRUB on multiple devices,
+ use boot.loader.grub.devices.
+ '';
+ };
+
+ devices = mkOption {
+ default = [];
+ example = [ "/dev/hda" ];
+ type = types.listOf types.string;
+ description = ''
+ The devices on which the boot loader, GRUB, will be
+ installed. Can be used instead of device to
+ install grub into multiple devices (e.g., if as softraid arrays holding /boot).
+ '';
+ };
+
+ # !!! How can we mark options as obsolete?
+ bootDevice = mkOption {
+ default = "";
+ description = "Obsolete.";
+ };
+
+ configurationName = mkOption {
+ default = "";
+ example = "Stable 2.6.21";
+ type = types.uniq types.string;
+ description = ''
+ GRUB entry name instead of default.
+ '';
+ };
+
+ extraPrepareConfig = mkOption {
+ default = "";
+ type = types.lines;
+ description = ''
+ Additional bash commands to be run at the script that
+ prepares the grub menu entries.
+ '';
+ };
+
+ extraConfig = mkOption {
+ default = "";
+ example = "serial; terminal_output.serial";
+ type = types.lines;
+ description = ''
+ Additional GRUB commands inserted in the configuration file
+ just before the menu entries.
+ '';
+ };
+
+ extraPerEntryConfig = mkOption {
+ default = "";
+ example = "root (hd0)";
+ type = types.lines;
+ description = ''
+ Additional GRUB commands inserted in the configuration file
+ at the start of each NixOS menu entry.
+ '';
+ };
+
+ extraEntries = mkOption {
+ default = "";
+ type = types.lines;
+ example = ''
+ # GRUB 1 example (not GRUB 2 compatible)
+ title Windows
+ chainloader (hd0,1)+1
+
+ # GRUB 2 example
+ menuentry "Windows7" {
+ title Windows7
+ insmod ntfs
+ set root='(hd1,1)'
+ chainloader +1
+ }
+ '';
+ description = ''
+ Any additional entries you want added to the GRUB boot menu.
+ '';
+ };
+
+ extraEntriesBeforeNixOS = mkOption {
+ default = false;
+ type = types.bool;
+ description = ''
+ Whether extraEntries are included before the default option.
+ '';
+ };
+
+ extraFiles = mkOption {
+ default = {};
+ example = literalExample ''
+ { "memtest.bin" = "${pkgs.memtest86plus}/memtest.bin"; }
+ '';
+ description = ''
+ A set of files to be copied to /boot.
+ Each attribute name denotes the destination file name in
+ /boot, while the corresponding
+ attribute value specifies the source file.
+ '';
+ };
+
+ splashImage = mkOption {
+ default =
+ if cfg.version == 1
+ then pkgs.fetchurl {
+ url = http://www.gnome-look.org/CONTENT/content-files/36909-soft-tux.xpm.gz;
+ sha256 = "14kqdx2lfqvh40h6fjjzqgff1mwk74dmbjvmqphi6azzra7z8d59";
+ }
+ # GRUB 1.97 doesn't support gzipped XPMs.
+ else ./winkler-gnu-blue-640x480.png;
+ example = null;
+ description = ''
+ Background image used for GRUB. It must be a 640x480,
+ 14-colour image in XPM format, optionally compressed with
+ gzip or bzip2. Set to
+ null to run GRUB in text mode.
+ '';
+ };
+
+ configurationLimit = mkOption {
+ default = 100;
+ example = 120;
+ type = types.int;
+ description = ''
+ Maximum of configurations in boot menu. GRUB has problems when
+ there are too many entries.
+ '';
+ };
+
+ copyKernels = mkOption {
+ default = false;
+ type = types.bool;
+ description = ''
+ Whether the GRUB menu builder should copy kernels and initial
+ ramdisks to /boot. This is done automatically if /boot is
+ on a different partition than /.
+ '';
+ };
+
+ timeout = mkOption {
+ default = 5;
+ type = types.int;
+ description = ''
+ Timeout (in seconds) until GRUB boots the default menu item.
+ '';
+ };
+
+ default = mkOption {
+ default = 0;
+ type = types.int;
+ description = ''
+ Index of the default menu item to be booted.
+ '';
+ };
+
+ };
+
+ };
+
+
+ ###### implementation
+
+ config = mkIf cfg.enable {
+
+ boot.loader.grub.devices = optional (cfg.device != "") cfg.device;
+
+ system.build.installBootLoader =
+ if cfg.devices == [] then
+ throw "You must set the ‘boot.loader.grub.device’ option to make the system bootable."
+ else
+ "PERL5LIB=${makePerlPath [ pkgs.perlPackages.XMLLibXML pkgs.perlPackages.XMLSAX ]} " +
+ "${pkgs.perl}/bin/perl ${./install-grub.pl} ${grubConfig}";
+
+ system.build.grub = grub;
+
+ # Common attribute for boot loaders so only one of them can be
+ # set at once.
+ system.boot.loader.id = "grub";
+
+ environment.systemPackages = [ grub ];
+
+ boot.loader.grub.extraPrepareConfig =
+ concatStrings (mapAttrsToList (n: v: ''
+ ${pkgs.coreutils}/bin/cp -pf "${v}" "/boot/${n}"
+ '') config.boot.loader.grub.extraFiles);
+
+ };
+
+}
diff --git a/nixos/modules/system/boot/loader/grub/install-grub.pl b/nixos/modules/system/boot/loader/grub/install-grub.pl
new file mode 100644
index 0000000000000000000000000000000000000000..a83733db63b0cc3af429319fd8444ffbf7cc2666
--- /dev/null
+++ b/nixos/modules/system/boot/loader/grub/install-grub.pl
@@ -0,0 +1,265 @@
+use strict;
+use warnings;
+use XML::LibXML;
+use File::Basename;
+use File::Path;
+use File::stat;
+use File::Copy;
+use POSIX;
+use Cwd;
+
+my $defaultConfig = $ARGV[1] or die;
+
+my $dom = XML::LibXML->load_xml(location => $ARGV[0]);
+
+sub get { my ($name) = @_; return $dom->findvalue("/expr/attrs/attr[\@name = '$name']/*/\@value"); }
+
+sub readFile {
+ my ($fn) = @_; local $/ = undef;
+ open FILE, "<$fn" or return undef; my $s = ; close FILE;
+ local $/ = "\n"; chomp $s; return $s;
+}
+
+sub writeFile {
+ my ($fn, $s) = @_;
+ open FILE, ">$fn" or die "cannot create $fn: $!\n";
+ print FILE $s or die;
+ close FILE or die;
+}
+
+my $grub = get("grub");
+my $grubVersion = int(get("version"));
+my $extraConfig = get("extraConfig");
+my $extraPrepareConfig = get("extraPrepareConfig");
+my $extraPerEntryConfig = get("extraPerEntryConfig");
+my $extraEntries = get("extraEntries");
+my $extraEntriesBeforeNixOS = get("extraEntriesBeforeNixOS") eq "true";
+my $splashImage = get("splashImage");
+my $configurationLimit = int(get("configurationLimit"));
+my $copyKernels = get("copyKernels") eq "true";
+my $timeout = int(get("timeout"));
+my $defaultEntry = int(get("default"));
+$ENV{'PATH'} = get("path");
+
+die "unsupported GRUB version\n" if $grubVersion != 1 && $grubVersion != 2;
+
+print STDERR "updating GRUB $grubVersion menu...\n";
+
+mkpath("/boot/grub", 0, 0700);
+
+
+# Discover whether /boot is on the same filesystem as / and
+# /nix/store. If not, then all kernels and initrds must be copied to
+# /boot, and all paths in the GRUB config file must be relative to the
+# root of the /boot filesystem. `$bootRoot' is the path to be
+# prepended to paths under /boot.
+my $bootRoot = "/boot";
+if (stat("/")->dev != stat("/boot")->dev) {
+ $bootRoot = "";
+ $copyKernels = 1;
+} elsif (stat("/boot")->dev != stat("/nix/store")->dev) {
+ $copyKernels = 1;
+}
+
+
+# Generate the header.
+my $conf .= "# Automatically generated. DO NOT EDIT THIS FILE!\n";
+
+if ($grubVersion == 1) {
+ $conf .= "
+ default $defaultEntry
+ timeout $timeout
+ ";
+ if ($splashImage) {
+ copy $splashImage, "/boot/background.xpm.gz" or die "cannot copy $splashImage to /boot\n";
+ $conf .= "splashimage $bootRoot/background.xpm.gz\n";
+ }
+}
+
+else {
+ $conf .= "
+ if [ -s \$prefix/grubenv ]; then
+ load_env
+ fi
+
+ # ‘grub-reboot’ sets a one-time saved entry, which we process here and
+ # then delete.
+ if [ \"\${saved_entry}\" ]; then
+ # The next line *has* to look exactly like this, otherwise KDM's
+ # reboot feature won't work properly with GRUB 2.
+ set default=\"\${saved_entry}\"
+ set saved_entry=
+ set prev_saved_entry=
+ save_env saved_entry
+ save_env prev_saved_entry
+ set timeout=1
+ else
+ set default=$defaultEntry
+ set timeout=$timeout
+ fi
+
+ if loadfont $bootRoot/grub/fonts/unicode.pf2; then
+ set gfxmode=640x480
+ insmod gfxterm
+ insmod vbe
+ terminal_output gfxterm
+ fi
+ ";
+
+ if ($splashImage) {
+ # FIXME: GRUB 1.97 doesn't resize the background image if it
+ # doesn't match the video resolution.
+ copy $splashImage, "/boot/background.png" or die "cannot copy $splashImage to /boot\n";
+ $conf .= "
+ insmod png
+ if background_image $bootRoot/background.png; then
+ set color_normal=white/black
+ set color_highlight=black/white
+ else
+ set menu_color_normal=cyan/blue
+ set menu_color_highlight=white/blue
+ fi
+ ";
+ }
+}
+
+$conf .= "$extraConfig\n";
+
+
+# Generate the menu entries.
+$conf .= "\n";
+
+my %copied;
+mkpath("/boot/kernels", 0, 0755) if $copyKernels;
+
+sub copyToKernelsDir {
+ my ($path) = @_;
+ return $path unless $copyKernels;
+ $path =~ /\/nix\/store\/(.*)/ or die;
+ my $name = $1; $name =~ s/\//-/g;
+ my $dst = "/boot/kernels/$name";
+ # Don't copy the file if $dst already exists. This means that we
+ # have to create $dst atomically to prevent partially copied
+ # kernels or initrd if this script is ever interrupted.
+ if (! -e $dst) {
+ my $tmp = "$dst.tmp";
+ copy $path, $tmp or die "cannot copy $path to $tmp\n";
+ rename $tmp, $dst or die "cannot rename $tmp to $dst\n";
+ }
+ $copied{$dst} = 1;
+ return "$bootRoot/kernels/$name";
+}
+
+sub addEntry {
+ my ($name, $path) = @_;
+ return unless -e "$path/kernel" && -e "$path/initrd";
+
+ my $kernel = copyToKernelsDir(Cwd::abs_path("$path/kernel"));
+ my $initrd = copyToKernelsDir(Cwd::abs_path("$path/initrd"));
+ my $xen = -e "$path/xen.gz" ? copyToKernelsDir(Cwd::abs_path("$path/xen.gz")) : undef;
+
+ # FIXME: $confName
+
+ my $kernelParams =
+ "systemConfig=" . Cwd::abs_path($path) . " " .
+ "init=" . Cwd::abs_path("$path/init") . " " .
+ readFile("$path/kernel-params");
+ my $xenParams = $xen && -e "$path/xen-params" ? readFile("$path/xen-params") : "";
+
+ if ($grubVersion == 1) {
+ $conf .= "title $name\n";
+ $conf .= " $extraPerEntryConfig\n" if $extraPerEntryConfig;
+ $conf .= " kernel $xen $xenParams\n" if $xen;
+ $conf .= " " . ($xen ? "module" : "kernel") . " $kernel $kernelParams\n";
+ $conf .= " " . ($xen ? "module" : "initrd") . " $initrd\n\n";
+ } else {
+ $conf .= "menuentry \"$name\" {\n";
+ $conf .= " $extraPerEntryConfig\n" if $extraPerEntryConfig;
+ $conf .= " multiboot $xen $xenParams\n" if $xen;
+ $conf .= " " . ($xen ? "module" : "linux") . " $kernel $kernelParams\n";
+ $conf .= " " . ($xen ? "module" : "initrd") . " $initrd\n";
+ $conf .= "}\n\n";
+ }
+}
+
+
+# Add default entries.
+$conf .= "$extraEntries\n" if $extraEntriesBeforeNixOS;
+
+addEntry("NixOS - Default", $defaultConfig);
+
+$conf .= "$extraEntries\n" unless $extraEntriesBeforeNixOS;
+
+# extraEntries could refer to @bootRoot@, which we have to substitute
+$conf =~ s/\@bootRoot\@/$bootRoot/g;
+
+# Emit submenus for all system profiles.
+sub addProfile {
+ my ($profile, $description) = @_;
+
+ # Add entries for all generations of this profile.
+ $conf .= "submenu \"$description\" {\n" if $grubVersion == 2;
+
+ sub nrFromGen { my ($x) = @_; $x =~ /\/\w+-(\d+)-link/; return $1; }
+
+ my @links = sort
+ { nrFromGen($b) <=> nrFromGen($a) }
+ (glob "$profile-*-link");
+
+ my $curEntry = 0;
+ foreach my $link (@links) {
+ last if $curEntry++ >= $configurationLimit;
+ my $date = strftime("%F", localtime(lstat($link)->mtime));
+ my $version =
+ -e "$link/nixos-version"
+ ? readFile("$link/nixos-version")
+ : basename((glob(dirname(Cwd::abs_path("$link/kernel")) . "/lib/modules/*"))[0]);
+ addEntry("NixOS - Configuration " . nrFromGen($link) . " ($date - $version)", $link);
+ }
+
+ $conf .= "}\n" if $grubVersion == 2;
+}
+
+addProfile "/nix/var/nix/profiles/system", "NixOS - All configurations";
+
+if ($grubVersion == 2) {
+ for my $profile (glob "/nix/var/nix/profiles/system-profiles/*") {
+ my $name = basename($profile);
+ next unless $name =~ /^\w+$/;
+ addProfile $profile, "NixOS - Profile '$name'";
+ }
+}
+
+# Run extraPrepareConfig in sh
+if ($extraPrepareConfig ne "") {
+ system((get("shell"), "-c", $extraPrepareConfig));
+}
+
+# Atomically update the GRUB config.
+my $confFile = $grubVersion == 1 ? "/boot/grub/menu.lst" : "/boot/grub/grub.cfg";
+my $tmpFile = $confFile . ".tmp";
+writeFile($tmpFile, $conf);
+rename $tmpFile, $confFile or die "cannot rename $tmpFile to $confFile\n";
+
+
+# Remove obsolete files from /boot/kernels.
+foreach my $fn (glob "/boot/kernels/*") {
+ next if defined $copied{$fn};
+ print STDERR "removing obsolete file $fn\n";
+ unlink $fn;
+}
+
+
+# Install GRUB if the version changed from the last time we installed
+# it. FIXME: shouldn't we reinstall if ‘devices’ changed?
+my $prevVersion = readFile("/boot/grub/version") // "";
+if (($ENV{'NIXOS_INSTALL_GRUB'} // "") eq "1" || get("fullVersion") ne $prevVersion) {
+ foreach my $dev ($dom->findnodes('/expr/attrs/attr[@name = "devices"]/list/string/@value')) {
+ $dev = $dev->findvalue(".") or die;
+ next if $dev eq "nodev";
+ print STDERR "installing the GRUB $grubVersion boot loader on $dev...\n";
+ system("$grub/sbin/grub-install", "--recheck", Cwd::abs_path($dev)) == 0
+ or die "$0: installation of GRUB on $dev failed\n";
+ }
+ writeFile("/boot/grub/version", get("fullVersion"));
+}
diff --git a/nixos/modules/system/boot/loader/grub/memtest.nix b/nixos/modules/system/boot/loader/grub/memtest.nix
new file mode 100644
index 0000000000000000000000000000000000000000..a0726c01e204343bb7df51b3b97d18fe52a372d5
--- /dev/null
+++ b/nixos/modules/system/boot/loader/grub/memtest.nix
@@ -0,0 +1,39 @@
+# This module adds Memtest86+ to the GRUB boot menu.
+
+{ config, pkgs, ... }:
+
+with pkgs.lib;
+
+let
+ memtest86 = pkgs.memtest86plus;
+in
+
+{
+ options = {
+
+ boot.loader.grub.memtest86 = mkOption {
+ default = false;
+ type = types.bool;
+ description = ''
+ Make Memtest86+, a memory testing program, available from the
+ GRUB boot menu.
+ '';
+ };
+ };
+
+ config = mkIf config.boot.loader.grub.memtest86 {
+
+ boot.loader.grub.extraEntries = mkFixStrictness (
+ if config.boot.loader.grub.version == 2 then
+ ''
+ menuentry "Memtest86+" {
+ linux16 @bootRoot@/memtest.bin
+ }
+ ''
+ else
+ throw "Memtest86+ is not supported with GRUB 1.");
+
+ boot.loader.grub.extraFiles."memtest.bin" = "${memtest86}/memtest.bin";
+
+ };
+}
diff --git a/nixos/modules/system/boot/loader/grub/winkler-gnu-blue-640x480.png b/nixos/modules/system/boot/loader/grub/winkler-gnu-blue-640x480.png
new file mode 100644
index 0000000000000000000000000000000000000000..35bbb57b51ee147cb3dc32747ee31d7fb3cba3bf
Binary files /dev/null and b/nixos/modules/system/boot/loader/grub/winkler-gnu-blue-640x480.png differ
diff --git a/nixos/modules/system/boot/loader/grub/winkler-gnu-blue.README b/nixos/modules/system/boot/loader/grub/winkler-gnu-blue.README
new file mode 100644
index 0000000000000000000000000000000000000000..9616362dce2a884347da076c6ccf59387c7af10f
--- /dev/null
+++ b/nixos/modules/system/boot/loader/grub/winkler-gnu-blue.README
@@ -0,0 +1,6 @@
+This is a resized version of
+
+ http://www.gnu.org/graphics/winkler-gnu-blue.png
+
+by Kyle Winkler and released under the Free Art License
+(http://artlibre.org/licence.php/lalgb.html).
diff --git a/nixos/modules/system/boot/loader/gummiboot/gummiboot-builder.py b/nixos/modules/system/boot/loader/gummiboot/gummiboot-builder.py
new file mode 100644
index 0000000000000000000000000000000000000000..9ea224b51f63339d70f4e1fc3d5b2c215666d08a
--- /dev/null
+++ b/nixos/modules/system/boot/loader/gummiboot/gummiboot-builder.py
@@ -0,0 +1,114 @@
+#! @python@/bin/python
+import argparse
+import shutil
+import os
+import errno
+import subprocess
+import glob
+import tempfile
+import errno
+
+def copy_if_not_exists(source, dest):
+ known_paths.append(dest)
+ if not os.path.exists(dest):
+ shutil.copyfile(source, dest)
+
+system_dir = lambda generation: "/nix/var/nix/profiles/system-%d-link" % (generation)
+
+def write_entry(generation, kernel, initrd):
+ entry_file = "@efiSysMountPoint@/loader/entries/nixos-generation-%d.conf" % (generation)
+ generation_dir = os.readlink(system_dir(generation))
+ tmp_path = "%s.tmp" % (entry_file)
+ kernel_params = "systemConfig=%s init=%s/init " % (generation_dir, generation_dir)
+ with open("%s/kernel-params" % (generation_dir)) as params_file:
+ kernel_params = kernel_params + params_file.read()
+ with open(tmp_path, 'w') as f:
+ print >> f, "title NixOS"
+ print >> f, "version Generation %d" % (generation)
+ if machine_id is not None: print >> f, "machine-id %s" % (machine_id)
+ print >> f, "linux %s" % (kernel)
+ print >> f, "initrd %s" % (initrd)
+ print >> f, "options %s" % (kernel_params)
+ os.rename(tmp_path, entry_file)
+
+def write_loader_conf(generation):
+ with open("@efiSysMountPoint@/loader/loader.conf.tmp", 'w') as f:
+ if "@timeout@" != "":
+ print >> f, "timeout @timeout@"
+ print >> f, "default nixos-generation-%d" % (generation)
+ os.rename("@efiSysMountPoint@/loader/loader.conf.tmp", "@efiSysMountPoint@/loader/loader.conf")
+
+def copy_from_profile(generation, name):
+ store_file_path = os.readlink("%s/%s" % (system_dir(generation), name))
+ suffix = os.path.basename(store_file_path)
+ store_dir = os.path.basename(os.path.dirname(store_file_path))
+ efi_file_path = "/efi/nixos/%s-%s.efi" % (store_dir, suffix)
+ copy_if_not_exists(store_file_path, "@efiSysMountPoint@%s" % (efi_file_path))
+ return efi_file_path
+
+def add_entry(generation):
+ efi_kernel_path = copy_from_profile(generation, "kernel")
+ efi_initrd_path = copy_from_profile(generation, "initrd")
+ write_entry(generation, efi_kernel_path, efi_initrd_path)
+
+def mkdir_p(path):
+ try:
+ os.makedirs(path)
+ except OSError as e:
+ if e.errno != errno.EEXIST or not os.path.isdir(path):
+ raise
+
+def get_generations(profile):
+ gen_list = subprocess.check_output([
+ "@nix@/bin/nix-env",
+ "--list-generations",
+ "-p",
+ "/nix/var/nix/profiles/%s" % (profile)
+ ])
+ gen_lines = gen_list.split('\n')
+ gen_lines.pop()
+ return [ int(line.split()[0]) for line in gen_lines ]
+
+def remove_old_entries(gens):
+ slice_start = len("@efiSysMountPoint@/loader/entries/nixos-generation-")
+ slice_end = -1 * len(".conf")
+ for path in glob.iglob("@efiSysMountPoint@/loader/entries/nixos-generation-[1-9]*.conf"):
+ try:
+ gen = int(path[slice_start:slice_end])
+ if not gen in gens:
+ os.unlink(path)
+ except ValueError:
+ pass
+ for path in glob.iglob("@efiSysMountPoint@/efi/nixos/*"):
+ if not path in known_paths:
+ os.unlink(path)
+
+parser = argparse.ArgumentParser(description='Update NixOS-related gummiboot files')
+parser.add_argument('default_config', metavar='DEFAULT-CONFIG', help='The default NixOS config to boot')
+args = parser.parse_args()
+
+# We deserve our own env var!
+if os.getenv("NIXOS_INSTALL_GRUB") == "1":
+ if "@canTouchEfiVariables@" == "1":
+ subprocess.check_call(["@gummiboot@/bin/gummiboot", "--path=@efiSysMountPoint@", "install"])
+ else:
+ subprocess.check_call(["@gummiboot@/bin/gummiboot", "--path=@efiSysMountPoint@", "--no-variables", "install"])
+
+known_paths = []
+mkdir_p("@efiSysMountPoint@/efi/nixos")
+mkdir_p("@efiSysMountPoint@/loader/entries")
+try:
+ with open("/etc/machine-id") as machine_file:
+ machine_id = machine_file.readlines()[0]
+except IOError as e:
+ if e.errno != errno.ENOENT:
+ raise
+ machine_id = None
+
+gens = get_generations("system")
+for gen in gens:
+ add_entry(gen)
+ if os.readlink(system_dir(gen)) == args.default_config:
+ write_loader_conf(gen)
+
+remove_old_entries(gens)
diff --git a/nixos/modules/system/boot/loader/gummiboot/gummiboot.nix b/nixos/modules/system/boot/loader/gummiboot/gummiboot.nix
new file mode 100644
index 0000000000000000000000000000000000000000..9193cd3bc533bc2bb65cbb27a5996b102fa4e889
--- /dev/null
+++ b/nixos/modules/system/boot/loader/gummiboot/gummiboot.nix
@@ -0,0 +1,67 @@
+{ config, pkgs, ... }:
+
+with pkgs.lib;
+
+let
+ cfg = config.boot.loader.gummiboot;
+
+ efi = config.boot.loader.efi;
+
+ gummibootBuilder = pkgs.substituteAll {
+ src = ./gummiboot-builder.py;
+
+ isExecutable = true;
+
+ inherit (pkgs) python gummiboot;
+
+ inherit (config.environment) nix;
+
+ inherit (cfg) timeout;
+
+ inherit (efi) efiSysMountPoint canTouchEfiVariables;
+ };
+in {
+ options.boot.loader.gummiboot = {
+ enable = mkOption {
+ default = false;
+
+ type = types.bool;
+
+ description = "Whether to enable the gummiboot UEFI boot manager";
+ };
+
+ timeout = mkOption {
+ default = null;
+
+ example = 4;
+
+ type = types.nullOr types.int;
+
+ description = ''
+ Timeout (in seconds) for how long to show the menu (null if none).
+ Note that even with no timeout the menu can be forced if the space
+ key is pressed during bootup
+ '';
+ };
+ };
+
+ config = mkIf cfg.enable {
+ assertions = [
+ {
+ assertion = (config.boot.kernelPackages.kernel.features or { efiBootStub = true; }) ? efiBootStub;
+
+ message = "This kernel does not support the EFI boot stub";
+ }
+ ];
+
+ system = {
+ build.installBootLoader = gummibootBuilder;
+
+ boot.loader.id = "gummiboot";
+
+ requiredKernelConfig = with config.lib.kernelConfig; [
+ (isYes "EFI_STUB")
+ ];
+ };
+ };
+}
diff --git a/nixos/modules/system/boot/loader/init-script/init-script-builder.sh b/nixos/modules/system/boot/loader/init-script/init-script-builder.sh
new file mode 100644
index 0000000000000000000000000000000000000000..502b3b63af2f84afeec80df96faf8a0d1abe02fe
--- /dev/null
+++ b/nixos/modules/system/boot/loader/init-script/init-script-builder.sh
@@ -0,0 +1,88 @@
+#! @bash@/bin/sh -e
+
+shopt -s nullglob
+
+export PATH=/empty
+for i in @path@; do PATH=$PATH:$i/bin; done
+
+if test $# -ne 1; then
+ echo "Usage: init-script-builder.sh DEFAULT-CONFIG"
+ exit 1
+fi
+
+defaultConfig="$1"
+
+
+[ "$(stat -f -c '%i' /)" = "$(stat -f -c '%i' /boot)" ] || {
+ # see grub-menu-builder.sh
+ echo "WARNING: /boot being on a different filesystem not supported by init-script-builder.sh"
+}
+
+
+
+target="/sbin/init"
+targetOther="/boot/init-other-configurations-contents.txt"
+
+tmp="$target.tmp"
+tmpOther="$targetOther.tmp"
+
+
+configurationCounter=0
+numAlienEntries=`cat < $tmp
+ echo "# older configurations: $targetOther" >> $tmp
+ chmod +x $tmp
+ }
+
+ echo -e "$content\n\n" >> $tmpOther
+}
+
+
+mkdir -p /boot /sbin
+
+addEntry "NixOS - Default" $defaultConfig ""
+
+# Add all generations of the system profile to the menu, in reverse
+# (most recent to least recent) order.
+for link in $((ls -d $defaultConfig/fine-tune/* ) | sort -n); do
+ date=$(stat --printf="%y\n" $link | sed 's/\..*//')
+ addEntry "NixOS - variation" $link ""
+done
+
+for generation in $(
+ (cd /nix/var/nix/profiles && ls -d system-*-link) \
+ | sed 's/system-\([0-9]\+\)-link/\1/' \
+ | sort -n -r); do
+ link=/nix/var/nix/profiles/system-$generation-link
+ date=$(stat --printf="%y\n" $link | sed 's/\..*//')
+ kernelVersion=$(cd $(dirname $(readlink -f $link/kernel))/lib/modules && echo *)
+ addEntry "NixOS - Configuration $generation ($date - $kernelVersion)" $link "$generation ($date)"
+done
+
+mv $tmpOther $targetOther
+mv $tmp $target
diff --git a/nixos/modules/system/boot/loader/init-script/init-script.nix b/nixos/modules/system/boot/loader/init-script/init-script.nix
new file mode 100644
index 0000000000000000000000000000000000000000..4b0fcd85b4b5a3fc0c4860899f1b0a6756f47f96
--- /dev/null
+++ b/nixos/modules/system/boot/loader/init-script/init-script.nix
@@ -0,0 +1,50 @@
+{ config, pkgs, ... }:
+
+with pkgs.lib;
+
+let
+
+ initScriptBuilder = pkgs.substituteAll {
+ src = ./init-script-builder.sh;
+ isExecutable = true;
+ inherit (pkgs) bash;
+ path = [pkgs.coreutils pkgs.gnused pkgs.gnugrep];
+ };
+
+in
+
+{
+
+ ###### interface
+
+ options = {
+
+ boot.loader.initScript = {
+
+ enable = mkOption {
+ default = false;
+ description = ''
+ Some systems require a /sbin/init script which is started.
+ Or having it makes starting NixOS easier.
+ This applies to some kind of hosting services and user mode linux.
+
+ Additionally this script will create
+ /boot/init-other-configurations-contents.txt containing
+ contents of remaining configurations. You can copy paste them into
+ /sbin/init manually running a rescue system or such.
+ '';
+ };
+ };
+
+ };
+
+
+ ###### implementation
+
+ config = mkIf config.boot.loader.initScript.enable {
+
+ system.build.installBootLoader = initScriptBuilder;
+
+ };
+
+}
diff --git a/nixos/modules/system/boot/loader/raspberrypi/builder.sh b/nixos/modules/system/boot/loader/raspberrypi/builder.sh
new file mode 100644
index 0000000000000000000000000000000000000000..f6ccfe493d8a9435947ac35283e89a65f8ac0f75
--- /dev/null
+++ b/nixos/modules/system/boot/loader/raspberrypi/builder.sh
@@ -0,0 +1,109 @@
+#! @bash@/bin/sh -e
+
+shopt -s nullglob
+
+export PATH=/empty
+for i in @path@; do PATH=$PATH:$i/bin; done
+
+default=$1
+if test -z "$1"; then
+ echo "Syntax: builder.sh "
+ exit 1
+fi
+
+echo "updating the boot generations directory..."
+
+mkdir -p /boot/old
+
+# Convert a path to a file in the Nix store such as
+# /nix/store/-/file to --.
+cleanName() {
+ local path="$1"
+ echo "$path" | sed 's|^/nix/store/||' | sed 's|/|-|g'
+}
+
+# Copy a file from the Nix store to /boot/kernels.
+declare -A filesCopied
+
+copyToKernelsDir() {
+ local src="$1"
+ local dst="/boot/old/$(cleanName $src)"
+ # Don't copy the file if $dst already exists. This means that we
+ # have to create $dst atomically to prevent partially copied
+ # kernels or initrd if this script is ever interrupted.
+ if ! test -e $dst; then
+ local dstTmp=$dst.tmp.$$
+ cp $src $dstTmp
+ mv $dstTmp $dst
+ fi
+ filesCopied[$dst]=1
+ result=$dst
+}
+
+copyForced() {
+ local src="$1"
+ local dst="$2"
+ cp $src $dst.tmp
+ mv $dst.tmp $dst
+}
+
+outdir=/boot/old
+mkdir -p $outdir || true
+
+# Copy its kernel and initrd to /boot/kernels.
+addEntry() {
+ local path="$1"
+ local generation="$2"
+
+ if ! test -e $path/kernel -a -e $path/initrd; then
+ return
+ fi
+
+ local kernel=$(readlink -f $path/kernel)
+ # local initrd=$(readlink -f $path/initrd)
+
+ if test -n "@copyKernels@"; then
+ copyToKernelsDir $kernel; kernel=$result
+ # copyToKernelsDir $initrd; initrd=$result
+ fi
+
+ echo $(readlink -f $path) > $outdir/$generation-system
+ echo $(readlink -f $path/init) > $outdir/$generation-init
+ cp $path/kernel-params $outdir/$generation-cmdline.txt
+ # echo $initrd > $outdir/$generation-initrd
+ echo $kernel > $outdir/$generation-kernel
+
+ if test $(readlink -f "$path") = "$default"; then
+ copyForced $kernel /boot/kernel.img
+ # copyForced $initrd /boot/initrd
+ cp "$(readlink -f "$path/init")" /boot/nixos-init
+ echo "`cat $path/kernel-params` init=$path/init" >/boot/cmdline.txt
+
+ echo "$2" > /boot/defaultgeneration
+ fi
+}
+
+# Add all generations of the system profile to the menu, in reverse
+# (most recent to least recent) order.
+for generation in $(
+ (cd /nix/var/nix/profiles && ls -d system-*-link) \
+ | sed 's/system-\([0-9]\+\)-link/\1/' \
+ | sort -n -r); do
+ link=/nix/var/nix/profiles/system-$generation-link
+ addEntry $link $generation
+done
+
+# Add the firmware files
+fwdir=@firmware@/share/raspberrypi/boot/
+copyForced $fwdir/bootcode.bin /boot/bootcode.bin
+copyForced $fwdir/fixup.dat /boot/fixup.dat
+copyForced $fwdir/fixup_cd.dat /boot/fixup_cd.dat
+copyForced $fwdir/start.elf /boot/start.elf
+copyForced $fwdir/start_cd.elf /boot/start_cd.elf
+
+# Remove obsolete files from /boot/old.
+for fn in /boot/old/*linux* /boot/old/*initrd*; do
+ if ! test "${filesCopied[$fn]}" = 1; then
+ rm -vf -- "$fn"
+ fi
+done
diff --git a/nixos/modules/system/boot/loader/raspberrypi/raspberrypi.nix b/nixos/modules/system/boot/loader/raspberrypi/raspberrypi.nix
new file mode 100644
index 0000000000000000000000000000000000000000..5bc856c3df0ba2db6b6aff65ece9935dfbb75aad
--- /dev/null
+++ b/nixos/modules/system/boot/loader/raspberrypi/raspberrypi.nix
@@ -0,0 +1,38 @@
+{ config, pkgs, ... }:
+
+with pkgs.lib;
+
+let
+
+ builder = pkgs.substituteAll {
+ src = ./builder.sh;
+ isExecutable = true;
+ inherit (pkgs) bash;
+ path = [pkgs.coreutils pkgs.gnused pkgs.gnugrep];
+ firmware = pkgs.raspberrypifw;
+ };
+
+ platform = pkgs.stdenv.platform;
+
+in
+
+{
+ options = {
+
+ boot.loader.raspberryPi.enable = mkOption {
+ default = false;
+ description = ''
+ Whether to create files with the system generations in
+ /boot.
+ /boot/old will hold files from old generations.
+ '';
+ };
+
+ };
+
+ config = mkIf config.boot.loader.raspberryPi.enable {
+ system.build.installBootLoader = builder;
+ system.boot.loader.id = "raspberrypi";
+ system.boot.loader.kernelFile = platform.kernelTarget;
+ };
+}
diff --git a/nixos/modules/system/boot/luksroot.nix b/nixos/modules/system/boot/luksroot.nix
new file mode 100644
index 0000000000000000000000000000000000000000..29f5eb4fd771eaf78c6c4ac5e786f98acfc825de
--- /dev/null
+++ b/nixos/modules/system/boot/luksroot.nix
@@ -0,0 +1,176 @@
+{ config, pkgs, ... }:
+
+with pkgs.lib;
+
+let
+ luks = config.boot.initrd.luks;
+
+ openCommand = { name, device, keyFile, keyFileSize, allowDiscards, ... }: ''
+ # Wait for luksRoot to appear, e.g. if on a usb drive.
+ # XXX: copied and adapted from stage-1-init.sh - should be
+ # available as a function.
+ if ! test -e ${device}; then
+ echo -n "waiting 10 seconds for device ${device} to appear..."
+ for try in $(seq 10); do
+ sleep 1
+ if test -e ${device}; then break; fi
+ echo -n .
+ done
+ echo "ok"
+ fi
+
+ ${optionalString (keyFile != null) ''
+ if ! test -e ${keyFile}; then
+ echo -n "waiting 10 seconds for key file ${keyFile} to appear..."
+ for try in $(seq 10); do
+ sleep 1
+ if test -e ${keyFile}; then break; fi
+ echo -n .
+ done
+ echo "ok"
+ fi
+ ''}
+
+ # open luksRoot and scan for logical volumes
+ cryptsetup luksOpen ${device} ${name} ${optionalString allowDiscards "--allow-discards"} \
+ ${optionalString (keyFile != null) "--key-file=${keyFile} ${optionalString (keyFileSize != null) "--keyfile-size=${toString keyFileSize}"}"}
+ '';
+
+ isPreLVM = f: f.preLVM;
+ preLVM = filter isPreLVM luks.devices;
+ postLVM = filter (f: !(isPreLVM f)) luks.devices;
+
+in
+{
+
+ options = {
+ boot.initrd.luks.enable = mkOption {
+ default = false;
+ description = "Obsolete.";
+ };
+
+ boot.initrd.luks.mitigateDMAAttacks = mkOption {
+ default = true;
+ description = ''
+ Unless enabled, encryption keys can be easily recovered by an attacker with physical
+ access to any machine with PCMCIA, ExpressCard, ThunderBolt or FireWire port.
+ More information: http://en.wikipedia.org/wiki/DMA_attack
+
+ This option blacklists FireWire drivers, but doesn't remove them. You can manually
+ load the drivers if you need to use a FireWire device, but don't forget to unload them!
+ '';
+ };
+
+ boot.initrd.luks.cryptoModules = mkOption {
+ default =
+ [ "aes" "aes_generic" "blowfish" "twofish"
+ "serpent" "cbc" "xts" "lrw" "sha1" "sha256" "sha512"
+ (if pkgs.stdenv.system == "x86_64-linux" then "aes_x86_64" else "aes_i586")
+ ];
+ description = ''
+ A list of cryptographic kernel modules needed to decrypt the root device(s).
+ The default includes all common modules.
+ '';
+ };
+
+ boot.initrd.luks.devices = mkOption {
+ default = [ ];
+ example = [ { name = "luksroot"; device = "/dev/sda3"; preLVM = true; } ];
+ description = ''
+ The list of devices that should be decrypted using LUKS before trying to mount the
+ root partition. This works for both LVM-over-LUKS and LUKS-over-LVM setups.
+
+ The devices are decrypted to the device mapper names defined.
+
+ Make sure that initrd has the crypto modules needed for decryption.
+ '';
+
+ type = types.listOf types.optionSet;
+
+ options = {
+
+ name = mkOption {
+ example = "luksroot";
+ type = types.string;
+ description = "Named to be used for the generated device in /dev/mapper.";
+ };
+
+ device = mkOption {
+ example = "/dev/sda2";
+ type = types.string;
+ description = "Path of the underlying block device.";
+ };
+
+ keyFile = mkOption {
+ default = null;
+ example = "/dev/sdb1";
+ type = types.nullOr types.string;
+ description = ''
+ The name of the file (can be a raw device or a partition) that
+ should be used as the decryption key for the encrypted device. If
+ not specified, you will be prompted for a passphrase instead.
+ '';
+ };
+
+ keyFileSize = mkOption {
+ default = null;
+ example = 4096;
+ type = types.nullOr types.int;
+ description = ''
+ The size of the key file. Use this if only the beginning of the
+ key file should be used as a key (often the case if a raw device
+ or partition is used as key file). If not specified, the whole
+ keyFile will be used decryption, instead of just
+ the first keyFileSize bytes.
+ '';
+ };
+
+ preLVM = mkOption {
+ default = true;
+ type = types.bool;
+ description = "Whether the luksOpen will be attempted before LVM scan or after it.";
+ };
+
+ allowDiscards = mkOption {
+ default = false;
+ type = types.bool;
+ description = ''
+ Whether to allow TRIM requests to the underlying device. This option
+ has security implications, please read the LUKS documentation before
+ activating in.
+ '';
+ };
+
+ };
+ };
+ };
+
+ config = mkIf (luks.devices != []) {
+
+ # actually, sbp2 driver is the one enabling the DMA attack, but this needs to be tested
+ boot.blacklistedKernelModules = optionals luks.mitigateDMAAttacks
+ ["firewire_ohci" "firewire_core" "firewire_sbp2"];
+
+ # Some modules that may be needed for mounting anything ciphered
+ boot.initrd.availableKernelModules = [ "dm_mod" "dm_crypt" "cryptd" ] ++ luks.cryptoModules;
+
+ # copy the cryptsetup binary and it's dependencies
+ boot.initrd.extraUtilsCommands = ''
+ cp -pdv ${pkgs.cryptsetup}/sbin/cryptsetup $out/bin
+ # XXX: do we have a function that does this?
+ for lib in $(ldd $out/bin/cryptsetup |grep '=>' |grep /nix/store/ |cut -d' ' -f3); do
+ cp -pdvn $lib $out/lib
+ cp -pvn $(readlink -f $lib) $out/lib
+ done
+ '';
+
+ boot.initrd.extraUtilsCommandsTest = ''
+ $out/bin/cryptsetup --version
+ '';
+
+ boot.initrd.preLVMCommands = concatMapStrings openCommand preLVM;
+ boot.initrd.postDeviceCommands = concatMapStrings openCommand postLVM;
+
+ environment.systemPackages = [ pkgs.cryptsetup ];
+ };
+}
diff --git a/nixos/modules/system/boot/modprobe.nix b/nixos/modules/system/boot/modprobe.nix
new file mode 100644
index 0000000000000000000000000000000000000000..8b2762e2526dd551b69637cff0c5bb0c77909696
--- /dev/null
+++ b/nixos/modules/system/boot/modprobe.nix
@@ -0,0 +1,112 @@
+{ config, pkgs, ... }:
+
+with pkgs.lib;
+
+{
+
+ ###### interface
+
+ options = {
+
+ system.sbin.modprobe = mkOption {
+ internal = true;
+ default = pkgs.writeTextFile {
+ name = "modprobe";
+ destination = "/sbin/modprobe";
+ executable = true;
+ text =
+ ''
+ #! ${pkgs.stdenv.shell}
+ export MODULE_DIR=/run/current-system/kernel-modules/lib/modules
+
+ # Fall back to the kernel modules used at boot time if the
+ # modules in the current configuration don't match the
+ # running kernel.
+ if [ ! -d "$MODULE_DIR/$(${pkgs.coreutils}/bin/uname -r)" ]; then
+ MODULE_DIR=/run/booted-system/kernel-modules/lib/modules/
+ fi
+
+ exec ${pkgs.kmod}/sbin/modprobe "$@"
+ '';
+ };
+ description = ''
+ Wrapper around modprobe that sets the path to the modules
+ tree.
+ '';
+ };
+
+ boot.blacklistedKernelModules = mkOption {
+ default = [];
+ example = [ "cirrusfb" "i2c_piix4" ];
+ description = ''
+ List of names of kernel modules that should not be loaded
+ automatically by the hardware probing code.
+ '';
+ };
+
+ boot.extraModprobeConfig = mkOption {
+ default = "";
+ example =
+ ''
+ options parport_pc io=0x378 irq=7 dma=1
+ '';
+ description = ''
+ Any additional configuration to be appended to the generated
+ modprobe.conf. This is typically used to
+ specify module options. See
+ modprobe.conf
+ 5 for details.
+ '';
+ type = types.lines;
+ };
+
+ };
+
+
+ ###### implementation
+
+ config = {
+
+ environment.etc = singleton
+ { source = pkgs.writeText "modprobe.conf"
+ ''
+ ${flip concatMapStrings config.boot.blacklistedKernelModules (name: ''
+ blacklist ${name}
+ '')}
+ ${config.boot.extraModprobeConfig}
+ '';
+ target = "modprobe.d/nixos.conf";
+ };
+
+ environment.systemPackages = [ config.system.sbin.modprobe pkgs.kmod ];
+
+ boot.blacklistedKernelModules =
+ [ # This module is for debugging and generates gigantic amounts
+ # of log output, so it should never be loaded automatically.
+ "evbug"
+
+ # This module causes ALSA to occassionally select the wrong
+ # default sound device, and is little more than an annoyance
+ # on modern machines.
+ "snd_pcsp"
+
+ # The cirrusfb module prevents X11 from starting. FIXME:
+ # Ubuntu blacklists all framebuffer devices because they're
+ # "buggy" and cause suspend problems. Maybe we should too?
+ "cirrusfb"
+ ];
+
+ system.activationScripts.modprobe =
+ ''
+ # Allow the kernel to find our wrapped modprobe (which searches
+ # in the right location in the Nix store for kernel modules).
+ # We need this when the kernel (or some module) auto-loads a
+ # module.
+ echo ${config.system.sbin.modprobe}/sbin/modprobe > /proc/sys/kernel/modprobe
+ '';
+
+ environment.variables.MODULE_DIR = "/run/current-system/kernel-modules/lib/modules";
+
+ };
+
+}
diff --git a/nixos/modules/system/boot/readonly-mountpoint.c b/nixos/modules/system/boot/readonly-mountpoint.c
new file mode 100644
index 0000000000000000000000000000000000000000..27b666873821a67c6199f34f9525c18e0ee5ef6a
--- /dev/null
+++ b/nixos/modules/system/boot/readonly-mountpoint.c
@@ -0,0 +1,20 @@
+#include
+#include
+#include
+
+int main(int argc, char ** argv) {
+ struct statvfs stat;
+ if (argc != 2) {
+ fprintf(stderr, "Usage: %s PATH", argv[0]);
+ exit(2);
+ }
+ if (statvfs(argv[1], &stat) != 0) {
+ perror("statvfs");
+ exit(3);
+ }
+ if (stat.f_flag & ST_RDONLY)
+ exit(0);
+ else
+ exit(1);
+}
+
diff --git a/nixos/modules/system/boot/shutdown.nix b/nixos/modules/system/boot/shutdown.nix
new file mode 100644
index 0000000000000000000000000000000000000000..ad71a2e816e3c29a1470a1a6afbc688e951a85fc
--- /dev/null
+++ b/nixos/modules/system/boot/shutdown.nix
@@ -0,0 +1,27 @@
+{ config, pkgs, ... }:
+
+with pkgs.lib;
+
+{
+
+ # This unit saves the value of the system clock to the hardware
+ # clock on shutdown.
+ systemd.units."save-hwclock.service" =
+ { wantedBy = [ "shutdown.target" ];
+
+ text =
+ ''
+ [Unit]
+ Description=Save Hardware Clock
+ DefaultDependencies=no
+ Before=shutdown.target
+
+ [Service]
+ Type=oneshot
+ ExecStart=${pkgs.utillinux}/sbin/hwclock --systohc ${if config.time.hardwareClockInLocalTime then "--localtime" else "--utc"}
+ '';
+ };
+
+ boot.kernel.sysctl."kernel.poweroff_cmd" = "${config.systemd.package}/sbin/poweroff";
+
+}
diff --git a/nixos/modules/system/boot/stage-1-init.sh b/nixos/modules/system/boot/stage-1-init.sh
new file mode 100644
index 0000000000000000000000000000000000000000..e3e07c0858085ba118beb0829866fc837a09f96d
--- /dev/null
+++ b/nixos/modules/system/boot/stage-1-init.sh
@@ -0,0 +1,374 @@
+#! @shell@
+
+targetRoot=/mnt-root
+console=tty1
+
+export LD_LIBRARY_PATH=@extraUtils@/lib
+export PATH=@extraUtils@/bin:@extraUtils@/sbin
+
+
+fail() {
+ if [ -n "$panicOnFail" ]; then exit 1; fi
+
+ # If starting stage 2 failed, allow the user to repair the problem
+ # in an interactive shell.
+ cat </dev/$console 2>/dev/$console"
+ elif [ -n "$allowShell" -a "$reply" = i ]; then
+ echo "Starting interactive shell..."
+ setsid @shell@ -c "@shell@ < /dev/$console >/dev/$console 2>/dev/$console" || fail
+ elif [ "$reply" = r ]; then
+ echo "Rebooting..."
+ reboot -f
+ else
+ echo "Continuing..."
+ fi
+}
+
+trap 'fail' 0
+
+
+# Print a greeting.
+echo
+echo "[1;32m<<< NixOS Stage 1 >>>[0m"
+echo
+
+
+# Mount special file systems.
+mkdir -p /etc
+touch /etc/fstab # to shut up mount
+touch /etc/mtab # to shut up mke2fs
+mkdir -p /proc
+mount -t proc none /proc
+mkdir -p /sys
+mount -t sysfs none /sys
+mount -t devtmpfs -o "size=@devSize@" none /dev
+mkdir -p /run
+mount -t tmpfs -o "mode=0755,size=@runSize@" none /run
+
+
+# Process the kernel command line.
+export stage2Init=/init
+for o in $(cat /proc/cmdline); do
+ case $o in
+ console=*)
+ set -- $(IFS==; echo $o)
+ params=$2
+ set -- $(IFS=,; echo $params)
+ console=$1
+ ;;
+ init=*)
+ set -- $(IFS==; echo $o)
+ stage2Init=$2
+ ;;
+ boot.trace|debugtrace)
+ # Show each command.
+ set -x
+ ;;
+ boot.shell_on_fail)
+ allowShell=1
+ ;;
+ boot.debug1|debug1) # stop right away
+ allowShell=1
+ fail
+ ;;
+ boot.debug1devices) # stop after loading modules and creating device nodes
+ allowShell=1
+ debug1devices=1
+ ;;
+ boot.debug1mounts) # stop after mounting file systems
+ allowShell=1
+ debug1mounts=1
+ ;;
+ boot.panic_on_fail|stage1panic=1)
+ panicOnFail=1
+ ;;
+ root=*)
+ # If a root device is specified on the kernel command
+ # line, make it available through the symlink /dev/root.
+ # Recognise LABEL= and UUID= to support UNetbootin.
+ set -- $(IFS==; echo $o)
+ if [ $2 = "LABEL" ]; then
+ root="/dev/disk/by-label/$3"
+ elif [ $2 = "UUID" ]; then
+ root="/dev/disk/by-uuid/$3"
+ else
+ root=$2
+ fi
+ ln -s "$root" /dev/root
+ ;;
+ esac
+done
+
+
+# Load the required kernel modules.
+mkdir -p /lib
+ln -s @modulesClosure@/lib/modules /lib/modules
+echo @extraUtils@/bin/modprobe > /proc/sys/kernel/modprobe
+for i in @kernelModules@; do
+ echo "loading module $(basename $i)..."
+ modprobe $i || true
+done
+
+
+# Create device nodes in /dev.
+echo "running udev..."
+mkdir -p /etc/udev
+ln -sfn @udevRules@ /etc/udev/rules.d
+mkdir -p /dev/.mdadm
+systemd-udevd --daemon
+udevadm trigger --action=add
+udevadm settle || true
+modprobe scsi_wait_scan || true
+udevadm settle || true
+
+
+# Load boot-time keymap before any LVM/LUKS initialization
+@extraUtils@/bin/busybox loadkmap < "@busyboxKeymap@"
+
+
+# XXX: Use case usb->lvm will still fail, usb->luks->lvm is covered
+@preLVMCommands@
+
+
+echo "starting device mapper and LVM..."
+lvm vgchange -ay
+
+if test -n "$debug1devices"; then fail; fi
+
+
+@postDeviceCommands@
+
+
+# Try to resume - all modules are loaded now, and devices exist
+if test -e /sys/power/tuxonice/resume; then
+ if test -n "$(cat /sys/power/tuxonice/resume)"; then
+ echo 0 > /sys/power/tuxonice/user_interface/enabled
+ echo 1 > /sys/power/tuxonice/do_resume || echo "failed to resume..."
+ fi
+fi
+
+if test -e /sys/power/resume -a -e /sys/power/disk; then
+ echo "@resumeDevice@" > /sys/power/resume 2> /dev/null || echo "failed to resume..."
+ echo shutdown > /sys/power/disk
+fi
+
+
+# Return true if the machine is on AC power, or if we can't determine
+# whether it's on AC power.
+onACPower() {
+ ! test -d "/proc/acpi/battery" ||
+ ! ls /proc/acpi/battery/BAT[0-9]* > /dev/null 2>&1 ||
+ ! cat /proc/acpi/battery/BAT*/state | grep "^charging state" | grep -q "discharg"
+}
+
+
+# Check the specified file system, if appropriate.
+checkFS() {
+ local device="$1"
+ local fsType="$2"
+
+ # Only check block devices.
+ if [ ! -b "$device" ]; then return 0; fi
+
+ # Don't check ROM filesystems.
+ if [ "$fsType" = iso9660 -o "$fsType" = udf ]; then return 0; fi
+
+ # If we couldn't figure out the FS type, then skip fsck.
+ if [ "$fsType" = auto ]; then
+ echo 'cannot check filesystem with type "auto"!'
+ return 0
+ fi
+
+ # Optionally, skip fsck on journaling filesystems. This option is
+ # a hack - it's mostly because e2fsck on ext3 takes much longer to
+ # recover the journal than the ext3 implementation in the kernel
+ # does (minutes versus seconds).
+ if test -z "@checkJournalingFS@" -a \
+ \( "$fsType" = ext3 -o "$fsType" = ext4 -o "$fsType" = reiserfs \
+ -o "$fsType" = xfs -o "$fsType" = jfs \)
+ then
+ return 0
+ fi
+
+ # Don't run `fsck' if the machine is on battery power. !!! Is
+ # this a good idea?
+ if ! onACPower; then
+ echo "on battery power, so no \`fsck' will be performed on \`$device'"
+ return 0
+ fi
+
+ echo "checking $device..."
+
+ fsckFlags=
+ if test "$fsType" != "btrfs"; then
+ fsckFlags="-V -a"
+ fi
+ fsck $fsckFlags "$device"
+ fsckResult=$?
+
+ if test $(($fsckResult | 2)) = $fsckResult; then
+ echo "fsck finished, rebooting..."
+ sleep 3
+ reboot -f
+ fi
+
+ if test $(($fsckResult | 4)) = $fsckResult; then
+ echo "$device has unrepaired errors, please fix them manually."
+ fail
+ fi
+
+ if test $fsckResult -ge 8; then
+ echo "fsck on $device failed."
+ fail
+ fi
+
+ return 0
+}
+
+
+# Function for mounting a file system.
+mountFS() {
+ local device="$1"
+ local mountPoint="$2"
+ local options="$3"
+ local fsType="$4"
+
+ if [ "$fsType" = auto ]; then
+ fsType=$(blkid -o value -s TYPE "$device")
+ if [ -z "$fsType" ]; then fsType=auto; fi
+ fi
+
+ echo "$device /mnt-root$mountPoint $fsType $options" >> /etc/fstab
+
+ checkFS "$device" "$fsType"
+
+ echo "mounting $device on $mountPoint..."
+
+ mkdir -p "/mnt-root$mountPoint" || true
+
+ # For CIFS mounts, retry a few times before giving up.
+ local n=0
+ while true; do
+ mount "/mnt-root$mountPoint" && break
+ if [ "$fsType" != cifs -o "$n" -ge 10 ]; then fail; break; fi
+ echo "retrying..."
+ n=$((n + 1))
+ done
+}
+
+
+# Try to find and mount the root device.
+mkdir /mnt-root
+
+exec 3< @fsInfo@
+
+while read -u 3 mountPoint; do
+ read -u 3 device
+ read -u 3 fsType
+ read -u 3 options
+
+ # !!! Really quick hack to support bind mounts, i.e., where the
+ # "device" should be taken relative to /mnt-root, not /. Assume
+ # that every device that starts with / but doesn't start with /dev
+ # is a bind mount.
+ pseudoDevice=
+ case $device in
+ /dev/*)
+ ;;
+ //*)
+ # Don't touch SMB/CIFS paths.
+ pseudoDevice=1
+ ;;
+ /*)
+ device=/mnt-root$device
+ ;;
+ *)
+ # Not an absolute path; assume that it's a pseudo-device
+ # like an NFS path (e.g. "server:/path").
+ pseudoDevice=1
+ ;;
+ esac
+
+ # USB storage devices tend to appear with some delay. It would be
+ # great if we had a way to synchronously wait for them, but
+ # alas... So just wait for a few seconds for the device to
+ # appear. If it doesn't appear, try to mount it anyway (and
+ # probably fail). This is a fallback for non-device "devices"
+ # that we don't properly recognise.
+ if test -z "$pseudoDevice" -a ! -e $device; then
+ echo -n "waiting for device $device to appear..."
+ for try in $(seq 1 20); do
+ sleep 1
+ if test -e $device; then break; fi
+ echo -n "."
+ done
+ echo
+ fi
+
+ # Wait once more for the udev queue to empty, just in case it's
+ # doing something with $device right now.
+ udevadm settle || true
+
+ mountFS "$device" "$mountPoint" "$options" "$fsType"
+done
+
+exec 3>&-
+
+
+@postMountCommands@
+
+
+# Stop udevd.
+udevadm control --exit || true
+
+# Kill any remaining processes, just to be sure we're not taking any
+# with us into stage 2. unionfs-fuse mounts require the unionfs process.
+pkill -9 -v '(1|unionfs)'
+
+
+if test -n "$debug1mounts"; then fail; fi
+
+
+# Restore /proc/sys/kernel/modprobe to its original value.
+echo /sbin/modprobe > /proc/sys/kernel/modprobe
+
+
+# Start stage 2. `switch_root' deletes all files in the ramfs on the
+# current root. Note that $stage2Init might be an absolute symlink,
+# in which case "-e" won't work because we're not in the chroot yet.
+if ! test -e "$targetRoot/$stage2Init" -o -L "$targetRoot/$stage2Init"; then
+ echo "stage 2 init script ($targetRoot/$stage2Init) not found"
+ fail
+fi
+
+mkdir -m 0755 -p $targetRoot/proc $targetRoot/sys $targetRoot/dev $targetRoot/run
+
+mount --move /proc $targetRoot/proc
+mount --move /sys $targetRoot/sys
+mount --move /dev $targetRoot/dev
+mount --move /run $targetRoot/run
+
+exec env -i $(type -P switch_root) "$targetRoot" "$stage2Init"
+
+fail # should never be reached
diff --git a/nixos/modules/system/boot/stage-1.nix b/nixos/modules/system/boot/stage-1.nix
new file mode 100644
index 0000000000000000000000000000000000000000..3836d639513eabff5d734b9fdde7e243698d0497
--- /dev/null
+++ b/nixos/modules/system/boot/stage-1.nix
@@ -0,0 +1,343 @@
+# This module builds the initial ramdisk, which contains an init
+# script that performs the first stage of booting the system: it loads
+# the modules necessary to mount the root file system, then calls the
+# init in the root file system to start the second boot stage.
+
+{ config, pkgs, ... }:
+
+with pkgs.lib;
+
+let
+
+ udev = config.systemd.package;
+
+ kernelPackages = config.boot.kernelPackages;
+ modulesTree = config.system.modulesTree;
+
+
+ # Determine the set of modules that we need to mount the root FS.
+ modulesClosure = pkgs.makeModulesClosure {
+ rootModules = config.boot.initrd.availableKernelModules ++ config.boot.initrd.kernelModules;
+ kernel = modulesTree;
+ allowMissing = true;
+ };
+
+
+ needsCifsUtils = kernelPackages.kernel ? features
+ && kernelPackages.kernel.features ? needsCifsUtils
+ && kernelPackages.kernel.features.needsCifsUtils
+ && any (fs: fs.fsType == "cifs") fileSystems;
+
+ busybox =
+ if needsCifsUtils
+ then pkgs.busybox.override {
+ extraConfig = ''
+ CONFIG_FEATURE_MOUNT_CIFS n
+ CONFIG_FEATURE_MOUNT_HELPERS y
+ '';
+ }
+ else pkgs.busybox;
+
+
+ # Some additional utilities needed in stage 1, like mount, lvm, fsck
+ # etc. We don't want to bring in all of those packages, so we just
+ # copy what we need. Instead of using statically linked binaries,
+ # we just copy what we need from Glibc and use patchelf to make it
+ # work.
+ extraUtils = pkgs.runCommand "extra-utils"
+ { buildInputs = [pkgs.nukeReferences];
+ allowedReferences = [ "out" ]; # prevent accidents like glibc being included in the initrd
+ doublePatchelf = pkgs.stdenv.isArm;
+ }
+ ''
+ mkdir -p $out/bin $out/lib
+
+ # Copy what we need from Glibc.
+ cp -pv ${pkgs.glibc}/lib/ld*.so.? $out/lib
+ cp -pv ${pkgs.glibc}/lib/libc.so.* $out/lib
+ cp -pv ${pkgs.glibc}/lib/libm.so.* $out/lib
+ cp -pv ${pkgs.glibc}/lib/libpthread.so.* $out/lib
+ cp -pv ${pkgs.glibc}/lib/librt.so.* $out/lib
+ cp -pv ${pkgs.glibc}/lib/libdl.so.* $out/lib
+ cp -pv ${pkgs.gcc.gcc}/lib*/libgcc_s.so.* $out/lib
+
+ # Copy BusyBox.
+ cp -rvd ${busybox}/{bin,sbin} $out/
+ chmod -R u+w $out
+
+ # Copy some utillinux stuff.
+ cp -v ${pkgs.utillinux}/sbin/blkid $out/bin
+ cp -pdv ${pkgs.utillinux}/lib/libblkid*.so.* $out/lib
+ cp -pdv ${pkgs.utillinux}/lib/libuuid*.so.* $out/lib
+
+ # Copy dmsetup and lvm.
+ cp -v ${pkgs.lvm2}/sbin/dmsetup $out/bin/dmsetup
+ cp -v ${pkgs.lvm2}/sbin/lvm $out/bin/lvm
+ cp -v ${pkgs.lvm2}/lib/libdevmapper.so.*.* $out/lib
+ cp -v ${pkgs.systemd}/lib/libsystemd-daemon.so.* $out/lib
+
+ # Add RAID mdadm tool.
+ cp -v ${pkgs.mdadm}/sbin/mdadm $out/bin/mdadm
+
+ # Copy udev.
+ cp -v ${udev}/lib/systemd/systemd-udevd ${udev}/bin/udevadm $out/bin
+ cp -v ${udev}/lib/udev/*_id $out/bin
+ cp -pdv ${udev}/lib/libudev.so.* $out/lib
+ cp -v ${pkgs.kmod}/lib/libkmod.so.* $out/lib
+ cp -v ${pkgs.acl}/lib/libacl.so.* $out/lib
+ cp -v ${pkgs.attr}/lib/libattr.so.* $out/lib
+
+ # Copy modprobe.
+ cp -v ${pkgs.kmod}/bin/kmod $out/bin/
+ ln -s kmod $out/bin/modprobe
+
+ # Maybe copy cifs utils
+ ${optionalString needsCifsUtils ''
+ cp -v ${pkgs.cifs_utils}/sbin/mount.cifs $out/bin
+ ''}
+
+ ${config.boot.initrd.extraUtilsCommands}
+
+ # Strip binaries further than normal.
+ chmod -R u+w $out
+ stripDirs "lib bin" "-s"
+
+ # Run patchelf to make the programs refer to the copied libraries.
+ for i in $out/bin/* $out/lib/*; do if ! test -L $i; then nuke-refs $i; fi; done
+
+ for i in $out/bin/*; do
+ if ! test -L $i; then
+ echo "patching $i..."
+ patchelf --set-interpreter $out/lib/ld*.so.? --set-rpath $out/lib $i || true
+ if [ -n "$doublePatchelf" ]; then
+ patchelf --set-interpreter $out/lib/ld*.so.? --set-rpath $out/lib $i || true
+ fi
+ fi
+ done
+
+ # Make sure that the patchelf'ed binaries still work.
+ echo "testing patched programs..."
+ $out/bin/ash -c 'echo hello world' | grep "hello world"
+ export LD_LIBRARY_PATH=$out/lib
+ $out/bin/mount --help 2>&1 | grep "BusyBox"
+ $out/bin/udevadm --version
+ $out/bin/dmsetup --version 2>&1 | tee -a log | grep "version:"
+ LVM_SYSTEM_DIR=$out $out/bin/lvm version 2>&1 | tee -a log | grep "LVM"
+ $out/bin/mdadm --version
+
+ ${config.boot.initrd.extraUtilsCommandsTest}
+ ''; # */
+
+
+ # The initrd only has to mount / or any FS marked as necessary for
+ # booting (such as the FS containing /nix/store, or an FS needed for
+ # mounting /, like / on a loopback).
+ fileSystems = filter
+ (fs: fs.neededForBoot || elem fs.mountPoint [ "/" "/nix" "/nix/store" "/var" "/var/log" "/var/lib" "/etc" ])
+ (attrValues config.fileSystems);
+
+
+ udevRules = pkgs.stdenv.mkDerivation {
+ name = "udev-rules";
+ buildCommand = ''
+ ensureDir $out
+
+ echo 'ENV{LD_LIBRARY_PATH}="${extraUtils}/lib"' > $out/00-env.rules
+
+ cp -v ${udev}/lib/udev/rules.d/60-cdrom_id.rules $out/
+ cp -v ${udev}/lib/udev/rules.d/60-persistent-storage.rules $out/
+ cp -v ${udev}/lib/udev/rules.d/80-drivers.rules $out/
+ cp -v ${pkgs.lvm2}/lib/udev/rules.d/*.rules $out/
+ cp -v ${pkgs.mdadm}/lib/udev/rules.d/*.rules $out/
+
+ for i in $out/*.rules; do
+ substituteInPlace $i \
+ --replace ata_id ${extraUtils}/bin/ata_id \
+ --replace scsi_id ${extraUtils}/bin/scsi_id \
+ --replace cdrom_id ${extraUtils}/bin/cdrom_id \
+ --replace ${pkgs.utillinux}/sbin/blkid ${extraUtils}/bin/blkid \
+ --replace /sbin/blkid ${extraUtils}/bin/blkid \
+ --replace ${pkgs.lvm2}/sbin ${extraUtils}/bin \
+ --replace /sbin/mdadm ${extraUtils}/bin/mdadm
+ done
+
+ # Work around a bug in QEMU, which doesn't implement the "READ
+ # DISC INFORMATION" SCSI command:
+ # https://bugzilla.redhat.com/show_bug.cgi?id=609049
+ # As a result, `cdrom_id' doesn't print
+ # ID_CDROM_MEDIA_TRACK_COUNT_DATA, which in turn prevents the
+ # /dev/disk/by-label symlinks from being created. We need these
+ # in the NixOS installation CD, so use ID_CDROM_MEDIA in the
+ # corresponding udev rules for now. This was the behaviour in
+ # udev <= 154. See also
+ # http://www.spinics.net/lists/hotplug/msg03935.html
+ substituteInPlace $out/60-persistent-storage.rules \
+ --replace ID_CDROM_MEDIA_TRACK_COUNT_DATA ID_CDROM_MEDIA
+ ''; # */
+ };
+
+
+ # The binary keymap for busybox to load at boot.
+ busyboxKeymap = pkgs.runCommand "boottime-keymap"
+ { preferLocalBuild = true; }
+ ''
+ ${pkgs.kbd}/bin/loadkeys -qb "${config.i18n.consoleKeyMap}" > $out ||
+ ${pkgs.kbd}/bin/loadkeys -qbu "${config.i18n.consoleKeyMap}" > $out
+ '';
+
+
+ # The init script of boot stage 1 (loading kernel modules for
+ # mounting the root FS).
+ bootStage1 = pkgs.substituteAll {
+ src = ./stage-1-init.sh;
+
+ shell = "${extraUtils}/bin/ash";
+
+ isExecutable = true;
+
+ inherit udevRules extraUtils modulesClosure busyboxKeymap;
+
+ inherit (config.boot) resumeDevice devSize runSize;
+
+ inherit (config.boot.initrd) checkJournalingFS
+ preLVMCommands postDeviceCommands postMountCommands kernelModules;
+
+ fsInfo =
+ let f = fs: [ fs.mountPoint (if fs.device != null then fs.device else "/dev/disk/by-label/${fs.label}") fs.fsType fs.options ];
+ in pkgs.writeText "initrd-fsinfo" (concatStringsSep "\n" (concatMap f fileSystems));
+ };
+
+
+ # The closure of the init script of boot stage 1 is what we put in
+ # the initial RAM disk.
+ initialRamdisk = pkgs.makeInitrd {
+ inherit (config.boot.initrd) compressor;
+
+ contents =
+ [ { object = bootStage1;
+ symlink = "/init";
+ }
+ { object = pkgs.writeText "mdadm.conf" config.boot.initrd.mdadmConf;
+ symlink = "/etc/mdadm.conf";
+ }
+ ];
+ };
+
+in
+
+{
+ options = {
+
+ boot.resumeDevice = mkOption {
+ default = "";
+ example = "0:0";
+ description = "
+ Device for manual resume attempt during boot. Looks like
+ major:minor. ls -l /dev/SWAP_PARTION shows them.
+ ";
+ };
+
+ boot.initrd.checkJournalingFS = mkOption {
+ default = true;
+ type = types.bool;
+ description = ''
+ Whether to run fsck on journaling filesystems such as ext3.
+ '';
+ };
+
+ boot.initrd.mdadmConf = mkOption {
+ default = "";
+ type = with types; string;
+ description = ''
+ Contents of /etc/mdadm.conf at initrd.
+ '';
+ };
+
+ boot.initrd.preLVMCommands = mkOption {
+ default = "";
+ type = with types; string;
+ description = ''
+ Shell commands to be executed immediately before lvm discovery.
+ '';
+ };
+
+ boot.initrd.postDeviceCommands = mkOption {
+ default = "";
+ type = with types; string;
+ description = ''
+ Shell commands to be executed immediately after stage 1 of the
+ boot has loaded kernel modules and created device nodes in
+ /dev.
+ '';
+ };
+
+ boot.initrd.postMountCommands = mkOption {
+ default = "";
+ type = with types; string;
+ description = ''
+ Shell commands to be executed immediately after the stage 1
+ filesystems have been mounted.
+ '';
+ };
+
+ boot.initrd.extraUtilsCommands = mkOption {
+ internal = true;
+ default = "";
+ type = with types; string;
+ description = ''
+ Shell commands to be executed in the builder of the
+ extra-utils derivation. This can be used to provide
+ additional utilities in the initial ramdisk.
+ '';
+ };
+
+ boot.initrd.extraUtilsCommandsTest = mkOption {
+ internal = true;
+ default = "";
+ type = with types; string;
+ description = ''
+ Shell commands to be executed in the builder of the
+ extra-utils derivation after patchelf has done its
+ job. This can be used to test additional utilities
+ copied in extraUtilsCommands.
+ '';
+ };
+
+ boot.initrd.compressor = mkOption {
+ default = "gzip -9";
+
+ type = types.string;
+
+ description = "The compressor to use on the initrd";
+
+ example = "xz";
+ };
+
+ fileSystems = mkOption {
+ options.neededForBoot = mkOption {
+ default = false;
+ type = types.bool;
+ description = ''
+ If set, this file system will be mounted in the initial
+ ramdisk. By default, this applies to the root file system
+ and to the file system containing
+ /nix/store.
+ '';
+ };
+ };
+
+ };
+
+ config = {
+
+ system.build.bootStage1 = bootStage1;
+ system.build.initialRamdisk = initialRamdisk;
+ system.build.extraUtils = extraUtils;
+
+ system.requiredKernelConfig = with config.lib.kernelConfig; [
+ (isYes "TMPFS")
+ (isYes "BLK_DEV_INITRD")
+ ];
+
+ };
+}
diff --git a/nixos/modules/system/boot/stage-2-init.sh b/nixos/modules/system/boot/stage-2-init.sh
new file mode 100644
index 0000000000000000000000000000000000000000..2fadd3de1f0f6beb971d759aaa490d34ac5281c8
--- /dev/null
+++ b/nixos/modules/system/boot/stage-2-init.sh
@@ -0,0 +1,173 @@
+#! @shell@
+
+systemConfig=@systemConfig@
+
+export HOME=/root
+
+
+# Print a greeting.
+echo
+echo -e "\e[1;32m<<< NixOS Stage 2 >>>\e[0m"
+echo
+
+
+# Set the PATH.
+setPath() {
+ local dirs="$1"
+ export PATH=/empty
+ for i in $dirs; do
+ PATH=$PATH:$i/bin
+ if test -e $i/sbin; then
+ PATH=$PATH:$i/sbin
+ fi
+ done
+}
+
+setPath "@path@"
+
+
+# Normally, stage 1 mounts the root filesystem read/writable.
+# However, in some environments, stage 2 is executed directly, and the
+# root is read-only. So make it writable here.
+mount -n -o remount,rw /
+
+
+# Likewise, stage 1 mounts /proc, /dev and /sys, so if we don't have a
+# stage 1, we need to do that here.
+if [ ! -e /proc/1 ]; then
+ mkdir -m 0755 -p /proc
+ mount -n -t proc none /proc
+ mkdir -m 0755 -p /dev
+ mount -t devtmpfs none /dev
+fi
+
+
+echo "booting system configuration $systemConfig" > /dev/kmsg
+
+
+# Make /nix/store a read-only bind mount to enforce immutability of
+# the Nix store. Note that we can't use "chown root:nixbld" here
+# because users/groups might not exist yet.
+chown 0:30000 /nix/store
+chmod 1775 /nix/store
+if [ -n "@readOnlyStore@" ]; then
+ if ! readonly-mountpoint /nix/store; then
+ mount --bind /nix/store /nix/store
+ mount -o remount,ro,bind /nix/store
+ fi
+fi
+
+
+# Provide a /etc/mtab.
+mkdir -m 0755 -p /etc
+test -e /etc/fstab || touch /etc/fstab # to shut up mount
+rm -f /etc/mtab* # not that we care about stale locks
+ln -s /proc/mounts /etc/mtab
+
+
+# Process the kernel command line.
+for o in $(cat /proc/cmdline); do
+ case $o in
+ boot.debugtrace)
+ # Show each command.
+ set -x
+ ;;
+ resume=*)
+ set -- $(IFS==; echo $o)
+ resumeDevice=$2
+ ;;
+ esac
+done
+
+
+# More special file systems, initialise required directories.
+mkdir -m 0755 /dev/shm
+mount -t tmpfs -o "rw,nosuid,nodev,size=@devShmSize@" tmpfs /dev/shm
+mkdir -m 0755 -p /dev/pts
+[ -e /proc/bus/usb ] && mount -t usbfs none /proc/bus/usb # UML doesn't have USB by default
+mkdir -m 01777 -p /tmp
+mkdir -m 0755 -p /var /var/log /var/lib /var/db
+mkdir -m 0755 -p /nix/var
+mkdir -m 0700 -p /root
+mkdir -m 0755 -p /bin # for the /bin/sh symlink
+mkdir -m 0755 -p /home
+mkdir -m 0755 -p /etc/nixos
+
+
+# Miscellaneous boot time cleanup.
+rm -rf /var/run /var/lock
+rm -f /etc/resolv.conf
+touch /etc/resolv.conf
+rm -f /etc/{group,passwd,shadow}.lock
+
+if test -n "@cleanTmpDir@"; then
+ echo -n "cleaning \`/tmp'..."
+ find /tmp -maxdepth 1 -mindepth 1 -print0 | xargs -0r rm -rf --one-file-system
+ echo " done"
+else
+ # Get rid of ICE locks...
+ rm -rf /tmp/.ICE-unix
+fi
+
+# ... and ensure that it's owned by root.
+mkdir -m 1777 /tmp/.ICE-unix
+
+# This is a good time to clean up /nix/var/nix/chroots. Doing an `rm
+# -rf' on it isn't safe in general because it can contain bind mounts
+# to /nix/store and other places. But after rebooting these are all
+# gone, of course.
+rm -rf /nix/var/nix/chroots # recreated in activate-configuration.sh
+
+
+# Also get rid of temporary GC roots.
+rm -rf /nix/var/nix/gcroots/tmp /nix/var/nix/temproots
+
+
+# Create a tmpfs on /run to hold runtime state for programs such as
+# udev (if stage 1 hasn't already done so).
+if ! mountpoint -q /run; then
+ rm -rf /run
+ mkdir -m 0755 -p /run
+ mount -t tmpfs -o "mode=0755,size=@runSize@" none /run
+fi
+
+mkdir -m 0755 -p /run/lock
+
+
+# For backwards compatibility, symlink /var/run to /run, and /var/lock
+# to /run/lock.
+ln -s /run /var/run
+ln -s /run/lock /var/lock
+
+
+# Clear the resume device.
+if test -n "$resumeDevice"; then
+ mkswap "$resumeDevice" || echo 'Failed to clear saved image.'
+fi
+
+
+# Run the script that performs all configuration activation that does
+# not have to be done at boot time.
+echo "running activation script..."
+$systemConfig/activate
+
+
+# Record the boot configuration.
+ln -sfn "$systemConfig" /run/booted-system
+
+# Prevent the booted system form being garbage-collected If it weren't
+# a gcroot, if we were running a different kernel, switched system,
+# and garbage collected all, we could not load kernel modules anymore.
+ln -sfn /run/booted-system /nix/var/nix/gcroots/booted-system
+
+
+# Run any user-specified commands.
+@shell@ @postBootCommands@
+
+
+# Start systemd.
+echo "starting systemd..."
+PATH=/run/current-system/systemd/lib/systemd \
+ MODULE_DIR=/run/booted-system/kernel-modules/lib/modules \
+ LOCALE_ARCHIVE=/run/current-system/sw/lib/locale/locale-archive \
+ exec systemd --log-target=journal # --log-level=debug --log-target=console --crash-shell
diff --git a/nixos/modules/system/boot/stage-2.nix b/nixos/modules/system/boot/stage-2.nix
new file mode 100644
index 0000000000000000000000000000000000000000..ff17535e418efb5411cc0bd150749745cf846af5
--- /dev/null
+++ b/nixos/modules/system/boot/stage-2.nix
@@ -0,0 +1,100 @@
+{ config, pkgs, ... }:
+
+with pkgs.lib;
+
+let
+
+ kernel = config.boot.kernelPackages.kernel;
+ activateConfiguration = config.system.activationScripts.script;
+
+ readonlyMountpoint = pkgs.runCommand "readonly-mountpoint" {} ''
+ mkdir -p $out/bin
+ cc -O3 ${./readonly-mountpoint.c} -o $out/bin/readonly-mountpoint
+ strip -s $out/bin/readonly-mountpoint
+ '';
+
+ bootStage2 = pkgs.substituteAll {
+ src = ./stage-2-init.sh;
+ shellDebug = "${pkgs.bashInteractive}/bin/bash";
+ isExecutable = true;
+ inherit (config.boot) devShmSize runSize cleanTmpDir;
+ inherit (config.nix) readOnlyStore;
+ ttyGid = config.ids.gids.tty;
+ path =
+ [ pkgs.coreutils
+ pkgs.utillinux
+ pkgs.sysvtools
+ ] ++ (optional config.boot.cleanTmpDir pkgs.findutils)
+ ++ optional config.nix.readOnlyStore readonlyMountpoint;
+ postBootCommands = pkgs.writeText "local-cmds"
+ ''
+ ${config.boot.postBootCommands}
+ ${config.powerManagement.powerUpCommands}
+ '';
+ };
+
+in
+
+{
+ options = {
+
+ boot = {
+
+ postBootCommands = mkOption {
+ default = "";
+ example = "rm -f /var/log/messages";
+ type = types.string;
+ description = ''
+ Shell commands to be executed just before systemd is started.
+ '';
+ };
+
+ devSize = mkOption {
+ default = "5%";
+ example = "32m";
+ type = types.uniq types.string;
+ description = ''
+ Size limit for the /dev tmpfs. Look at mount(8), tmpfs size option,
+ for the accepted syntax.
+ '';
+ };
+
+ devShmSize = mkOption {
+ default = "50%";
+ example = "256m";
+ type = types.uniq types.string;
+ description = ''
+ Size limit for the /dev/shm tmpfs. Look at mount(8), tmpfs size option,
+ for the accepted syntax.
+ '';
+ };
+
+ runSize = mkOption {
+ default = "25%";
+ example = "256m";
+ type = types.uniq types.string;
+ description = ''
+ Size limit for the /run tmpfs. Look at mount(8), tmpfs size option,
+ for the accepted syntax.
+ '';
+ };
+
+ cleanTmpDir = mkOption {
+ default = false;
+ example = true;
+ description = ''
+ Delete all files in /tmp/ during boot.
+ '';
+ };
+
+ };
+
+ };
+
+
+ config = {
+
+ system.build.bootStage2 = bootStage2;
+
+ };
+}
diff --git a/nixos/modules/system/boot/systemd-unit-options.nix b/nixos/modules/system/boot/systemd-unit-options.nix
new file mode 100644
index 0000000000000000000000000000000000000000..dfb9036ab4df43138a796fe513e1a154c56cda83
--- /dev/null
+++ b/nixos/modules/system/boot/systemd-unit-options.nix
@@ -0,0 +1,364 @@
+{ config, pkgs }:
+
+with pkgs.lib;
+
+rec {
+
+ unitOptions = {
+
+ enable = mkOption {
+ default = true;
+ types = types.bool;
+ description = ''
+ If set to false, this unit will be a symlink to
+ /dev/null. This is primarily useful to prevent specific
+ template instances (e.g. serial-getty@ttyS0)
+ from being started.
+ '';
+ };
+
+ description = mkOption {
+ default = "";
+ types = types.uniq types.string;
+ description = "Description of this unit used in systemd messages and progress indicators.";
+ };
+
+ requires = mkOption {
+ default = [];
+ types = types.listOf types.string;
+ description = ''
+ Start the specified units when this unit is started, and stop
+ this unit when the specified units are stopped or fail.
+ '';
+ };
+
+ wants = mkOption {
+ default = [];
+ types = types.listOf types.string;
+ description = ''
+ Start the specified units when this unit is started.
+ '';
+ };
+
+ after = mkOption {
+ default = [];
+ types = types.listOf types.string;
+ description = ''
+ If the specified units are started at the same time as
+ this unit, delay this unit until they have started.
+ '';
+ };
+
+ before = mkOption {
+ default = [];
+ types = types.listOf types.string;
+ description = ''
+ If the specified units are started at the same time as
+ this unit, delay them until this unit has started.
+ '';
+ };
+
+ bindsTo = mkOption {
+ default = [];
+ types = types.listOf types.string;
+ description = ''
+ Like ‘requires’, but in addition, if the specified units
+ unexpectedly disappear, this unit will be stopped as well.
+ '';
+ };
+
+ partOf = mkOption {
+ default = [];
+ types = types.listOf types.string;
+ description = ''
+ If the specified units are stopped or restarted, then this
+ unit is stopped or restarted as well.
+ '';
+ };
+
+ conflicts = mkOption {
+ default = [];
+ types = types.listOf types.string;
+ description = ''
+ If the specified units are started, then this unit is stopped
+ and vice versa.
+ '';
+ };
+
+ requiredBy = mkOption {
+ default = [];
+ types = types.listOf types.string;
+ description = "Units that require (i.e. depend on and need to go down with) this unit.";
+ };
+
+ wantedBy = mkOption {
+ default = [];
+ types = types.listOf types.string;
+ description = "Units that want (i.e. depend on) this unit.";
+ };
+
+ unitConfig = mkOption {
+ default = {};
+ example = { RequiresMountsFor = "/data"; };
+ type = types.attrs;
+ description = ''
+ Each attribute in this set specifies an option in the
+ [Unit] section of the unit. See
+ systemd.unit
+ 5 for details.
+ '';
+ };
+
+ restartTriggers = mkOption {
+ default = [];
+ description = ''
+ An arbitrary list of items such as derivations. If any item
+ in the list changes between reconfigurations, the service will
+ be restarted.
+ '';
+ };
+
+ };
+
+
+ serviceOptions = unitOptions // {
+
+ environment = mkOption {
+ default = {};
+ type = types.attrs;
+ example = { PATH = "/foo/bar/bin"; LANG = "nl_NL.UTF-8"; };
+ description = "Environment variables passed to the service's processes.";
+ };
+
+ path = mkOption {
+ default = [];
+ apply = ps: "${makeSearchPath "bin" ps}:${makeSearchPath "sbin" ps}";
+ description = ''
+ Packages added to the service's PATH
+ environment variable. Both the bin
+ and sbin subdirectories of each
+ package are added.
+ '';
+ };
+
+ serviceConfig = mkOption {
+ default = {};
+ example =
+ { StartLimitInterval = 10;
+ RestartSec = 5;
+ };
+ type = types.attrs;
+ description = ''
+ Each attribute in this set specifies an option in the
+ [Service] section of the unit. See
+ systemd.service
+ 5 for details.
+ '';
+
+ check = v:
+ let assertValueOneOf = name: values: attr:
+ let val = getAttr name attr;
+ in optional ( hasAttr name attr && !elem val values) "${name} ${val} not known to systemd";
+ checkType = assertValueOneOf "Type" ["simple" "forking" "oneshot" "dbus" "notify" "idle"];
+ checkRestart = assertValueOneOf "Restart" ["no" "on-success" "on-failure" "on-abort" "always"];
+ errors = concatMap (c: c v) [checkType checkRestart];
+ in if errors == [] then true
+ else builtins.trace (concatStringsSep "\n" errors) false;
+ };
+
+ script = mkOption {
+ type = types.uniq types.string;
+ default = "";
+ description = "Shell commands executed as the service's main process.";
+ };
+
+ scriptArgs = mkOption {
+ type = types.uniq types.string;
+ default = "";
+ description = "Arguments passed to the main process script.";
+ };
+
+ preStart = mkOption {
+ type = types.string;
+ default = "";
+ description = ''
+ Shell commands executed before the service's main process
+ is started.
+ '';
+ };
+
+ postStart = mkOption {
+ type = types.string;
+ default = "";
+ description = ''
+ Shell commands executed after the service's main process
+ is started.
+ '';
+ };
+
+ postStop = mkOption {
+ type = types.string;
+ default = "";
+ description = ''
+ Shell commands executed after the service's main process
+ has exited.
+ '';
+ };
+
+ restartIfChanged = mkOption {
+ type = types.bool;
+ default = true;
+ description = ''
+ Whether the service should be restarted during a NixOS
+ configuration switch if its definition has changed.
+ '';
+ };
+
+ stopIfChanged = mkOption {
+ type = types.bool;
+ default = true;
+ description = ''
+ If set, a changed unit is restarted by calling
+ systemctl stop in the old configuration,
+ then systemctl start in the new one.
+ Otherwise, it is restarted in a single step using
+ systemctl restart in the new configuration.
+ The latter is less correct because it runs the
+ ExecStop commands from the new
+ configuration.
+ '';
+ };
+
+ startAt = mkOption {
+ type = types.uniq types.string;
+ default = "";
+ example = "Sun 14:00:00";
+ description = ''
+ Automatically start this unit at the given date/time, which
+ must be in the format described in
+ systemd.time
+ 5. This is equivalent
+ to adding a corresponding timer unit with
+
OnCalendar
set to the value given here.
+ '';
+ };
+
+ };
+
+
+ socketOptions = unitOptions // {
+
+ listenStreams = mkOption {
+ default = [];
+ types = types.listOf types.string;
+ example = [ "0.0.0.0:993" "/run/my-socket" ];
+ description = ''
+ For each item in this list, a ListenStream
+ option in the [Socket] section will be created.
+ '';
+ };
+
+ socketConfig = mkOption {
+ default = {};
+ example = { ListenStream = "/run/my-socket"; };
+ type = types.attrs;
+ description = ''
+ Each attribute in this set specifies an option in the
+ [Socket] section of the unit. See
+ systemd.socket
+ 5 for details.
+ '';
+ };
+
+ };
+
+
+ timerOptions = unitOptions // {
+
+ timerConfig = mkOption {
+ default = {};
+ example = { OnCalendar = "Sun 14:00:00"; Unit = "foo.service"; };
+ type = types.attrs;
+ description = ''
+ Each attribute in this set specifies an option in the
+ [Timer] section of the unit. See
+ systemd.timer
+ 5 and
+ systemd.time
+ 5 for details.
+ '';
+ };
+
+ };
+
+
+ mountOptions = unitOptions // {
+
+ what = mkOption {
+ example = "/dev/sda1";
+ type = types.uniq types.string;
+ description = "Absolute path of device node, file or other resource. (Mandatory)";
+ };
+
+ where = mkOption {
+ example = "/mnt";
+ type = types.uniq types.string;
+ description = ''
+ Absolute path of a directory of the mount point.
+ Will be created if it doesn't exist. (Mandatory)
+ '';
+ };
+
+ type = mkOption {
+ default = "";
+ example = "ext4";
+ type = types.uniq types.string;
+ description = "File system type.";
+ };
+
+ options = mkOption {
+ default = "";
+ example = "noatime";
+ type = types.string;
+ merge = concatStringsSep ",";
+ description = "Options used to mount the file system.";
+ };
+
+ mountConfig = mkOption {
+ default = {};
+ example = { DirectoryMode = "0775"; };
+ type = types.attrs;
+ description = ''
+ Each attribute in this set specifies an option in the
+ [Mount] section of the unit. See
+ systemd.mount
+ 5 for details.
+ '';
+ };
+ };
+
+ automountOptions = unitOptions // {
+
+ where = mkOption {
+ example = "/mnt";
+ type = types.uniq types.string;
+ description = ''
+ Absolute path of a directory of the mount point.
+ Will be created if it doesn't exist. (Mandatory)
+ '';
+ };
+
+ automountConfig = mkOption {
+ default = {};
+ example = { DirectoryMode = "0775"; };
+ type = types.attrs;
+ description = ''
+ Each attribute in this set specifies an option in the
+ [Automount] section of the unit. See
+ systemd.automount
+ 5 for details.
+ '';
+ };
+ };
+
+}
diff --git a/nixos/modules/system/boot/systemd.nix b/nixos/modules/system/boot/systemd.nix
new file mode 100644
index 0000000000000000000000000000000000000000..a5e1165574c512af50c8ad1fb45b68702d20357e
--- /dev/null
+++ b/nixos/modules/system/boot/systemd.nix
@@ -0,0 +1,678 @@
+{ config, pkgs, utils, ... }:
+
+with pkgs.lib;
+with utils;
+with import ./systemd-unit-options.nix { inherit config pkgs; };
+
+let
+
+ cfg = config.systemd;
+
+ systemd = cfg.package;
+
+ makeUnit = name: unit:
+ pkgs.runCommand "unit" { inherit (unit) text; preferLocalBuild = true; }
+ (if unit.enable then ''
+ mkdir -p $out
+ echo -n "$text" > $out/${name}
+ '' else ''
+ mkdir -p $out
+ ln -s /dev/null $out/${name}
+ '');
+
+ upstreamUnits =
+ [ # Targets.
+ "basic.target"
+ "sysinit.target"
+ "sockets.target"
+ "graphical.target"
+ "multi-user.target"
+ "getty.target"
+ "network.target"
+ "network-online.target"
+ "nss-lookup.target"
+ "nss-user-lookup.target"
+ "time-sync.target"
+ #"cryptsetup.target"
+ "sigpwr.target"
+ "timers.target"
+ "paths.target"
+
+ # Rescue mode.
+ "rescue.target"
+ "rescue.service"
+
+ # Udev.
+ "systemd-udevd-control.socket"
+ "systemd-udevd-kernel.socket"
+ "systemd-udevd.service"
+ "systemd-udev-settle.service"
+ "systemd-udev-trigger.service"
+
+ # Hardware (started by udev when a relevant device is plugged in).
+ "sound.target"
+ "bluetooth.target"
+ "printer.target"
+ "smartcard.target"
+
+ # Login stuff.
+ "systemd-logind.service"
+ "autovt@.service"
+ #"systemd-vconsole-setup.service"
+ "systemd-user-sessions.service"
+ "dbus-org.freedesktop.login1.service"
+ "user@.service"
+
+ # Journal.
+ "systemd-journald.socket"
+ "systemd-journald.service"
+ "systemd-journal-flush.service"
+ "syslog.socket"
+
+ # SysV init compatibility.
+ "systemd-initctl.socket"
+ "systemd-initctl.service"
+
+ # Kernel module loading.
+ #"systemd-modules-load.service"
+
+ # Filesystems.
+ "systemd-fsck@.service"
+ "systemd-fsck-root.service"
+ "systemd-remount-fs.service"
+ "local-fs.target"
+ "local-fs-pre.target"
+ "remote-fs.target"
+ "remote-fs-pre.target"
+ "swap.target"
+ "dev-hugepages.mount"
+ "dev-mqueue.mount"
+ "sys-fs-fuse-connections.mount"
+ "sys-kernel-config.mount"
+ "sys-kernel-debug.mount"
+
+ # Hibernate / suspend.
+ "hibernate.target"
+ "suspend.target"
+ "sleep.target"
+ "hybrid-sleep.target"
+ "systemd-hibernate.service"
+ "systemd-suspend.service"
+ "systemd-hybrid-sleep.service"
+ "systemd-shutdownd.socket"
+ "systemd-shutdownd.service"
+
+ # Reboot stuff.
+ "reboot.target"
+ "systemd-reboot.service"
+ "poweroff.target"
+ "systemd-poweroff.service"
+ "halt.target"
+ "systemd-halt.service"
+ "ctrl-alt-del.target"
+ "shutdown.target"
+ "umount.target"
+ "final.target"
+ "kexec.target"
+ "systemd-kexec.service"
+
+ # Password entry.
+ "systemd-ask-password-console.path"
+ "systemd-ask-password-console.service"
+ "systemd-ask-password-wall.path"
+ "systemd-ask-password-wall.service"
+ ]
+
+ ++ optionals cfg.enableEmergencyMode [
+ "emergency.target"
+ "emergency.service"
+ ];
+
+ upstreamWants =
+ [ #"basic.target.wants"
+ "sysinit.target.wants"
+ "sockets.target.wants"
+ "local-fs.target.wants"
+ "multi-user.target.wants"
+ "shutdown.target.wants"
+ "timers.target.wants"
+ ];
+
+ makeJobScript = name: text:
+ let x = pkgs.writeTextFile { name = "unit-script"; executable = true; destination = "/bin/${name}"; inherit text; };
+ in "${x}/bin/${name}";
+
+ unitConfig = { name, config, ... }: {
+ config = {
+ unitConfig =
+ { Requires = concatStringsSep " " config.requires;
+ Wants = concatStringsSep " " config.wants;
+ After = concatStringsSep " " config.after;
+ Before = concatStringsSep " " config.before;
+ BindsTo = concatStringsSep " " config.bindsTo;
+ PartOf = concatStringsSep " " config.partOf;
+ Conflicts = concatStringsSep " " config.conflicts;
+ "X-Restart-Triggers" = toString config.restartTriggers;
+ } // optionalAttrs (config.description != "") {
+ Description = config.description;
+ };
+ };
+ };
+
+ serviceConfig = { name, config, ... }: {
+ config = {
+ # Default path for systemd services. Should be quite minimal.
+ path =
+ [ pkgs.coreutils
+ pkgs.findutils
+ pkgs.gnugrep
+ pkgs.gnused
+ systemd
+ ];
+ };
+ };
+
+ mountConfig = { name, config, ... }: {
+ config = {
+ mountConfig =
+ { What = config.what;
+ Where = config.where;
+ } // optionalAttrs (config.type != "") {
+ Type = config.type;
+ } // optionalAttrs (config.options != "") {
+ Options = config.options;
+ };
+ };
+ };
+
+ automountConfig = { name, config, ... }: {
+ config = {
+ automountConfig =
+ { Where = config.where;
+ };
+ };
+ };
+
+ toOption = x:
+ if x == true then "true"
+ else if x == false then "false"
+ else toString x;
+
+ attrsToSection = as:
+ concatStrings (concatLists (mapAttrsToList (name: value:
+ map (x: ''
+ ${name}=${toOption x}
+ '')
+ (if isList value then value else [value]))
+ as));
+
+ targetToUnit = name: def:
+ { inherit (def) wantedBy requiredBy enable;
+ text =
+ ''
+ [Unit]
+ ${attrsToSection def.unitConfig}
+ '';
+ };
+
+ serviceToUnit = name: def:
+ { inherit (def) wantedBy requiredBy enable;
+ text =
+ ''
+ [Unit]
+ ${attrsToSection def.unitConfig}
+
+ [Service]
+ Environment=PATH=${def.path}
+ Environment=LD_LIBRARY_PATH=
+ ${let env = cfg.globalEnvironment // def.environment;
+ in concatMapStrings (n: "Environment=\"${n}=${getAttr n env}\"\n") (attrNames env)}
+ ${optionalString (!def.restartIfChanged) "X-RestartIfChanged=false"}
+ ${optionalString (!def.stopIfChanged) "X-StopIfChanged=false"}
+
+ ${optionalString (def.preStart != "") ''
+ ExecStartPre=${makeJobScript "${name}-pre-start" ''
+ #! ${pkgs.stdenv.shell} -e
+ ${def.preStart}
+ ''}
+ ''}
+
+ ${optionalString (def.script != "") ''
+ ExecStart=${makeJobScript "${name}-start" ''
+ #! ${pkgs.stdenv.shell} -e
+ ${def.script}
+ ''} ${def.scriptArgs}
+ ''}
+
+ ${optionalString (def.postStart != "") ''
+ ExecStartPost=${makeJobScript "${name}-post-start" ''
+ #! ${pkgs.stdenv.shell} -e
+ ${def.postStart}
+ ''}
+ ''}
+
+ ${optionalString (def.postStop != "") ''
+ ExecStopPost=${makeJobScript "${name}-post-stop" ''
+ #! ${pkgs.stdenv.shell} -e
+ ${def.postStop}
+ ''}
+ ''}
+
+ ${attrsToSection def.serviceConfig}
+ '';
+ };
+
+ socketToUnit = name: def:
+ { inherit (def) wantedBy requiredBy enable;
+ text =
+ ''
+ [Unit]
+ ${attrsToSection def.unitConfig}
+
+ [Socket]
+ ${attrsToSection def.socketConfig}
+ ${concatStringsSep "\n" (map (s: "ListenStream=${s}") def.listenStreams)}
+ '';
+ };
+
+ timerToUnit = name: def:
+ { inherit (def) wantedBy requiredBy enable;
+ text =
+ ''
+ [Unit]
+ ${attrsToSection def.unitConfig}
+
+ [Timer]
+ ${attrsToSection def.timerConfig}
+ '';
+ };
+
+ mountToUnit = name: def:
+ { inherit (def) wantedBy requiredBy enable;
+ text =
+ ''
+ [Unit]
+ ${attrsToSection def.unitConfig}
+
+ [Mount]
+ ${attrsToSection def.mountConfig}
+ '';
+ };
+
+ automountToUnit = name: def:
+ { inherit (def) wantedBy requiredBy enable;
+ text =
+ ''
+ [Unit]
+ ${attrsToSection def.unitConfig}
+
+ [Automount]
+ ${attrsToSection def.automountConfig}
+ '';
+ };
+
+ nixosUnits = mapAttrsToList makeUnit cfg.units;
+
+ units = pkgs.runCommand "units" { preferLocalBuild = true; }
+ ''
+ mkdir -p $out
+ for i in ${toString upstreamUnits}; do
+ fn=${systemd}/example/systemd/system/$i
+ if ! [ -e $fn ]; then echo "missing $fn"; false; fi
+ if [ -L $fn ]; then
+ cp -pd $fn $out/
+ else
+ ln -s $fn $out/
+ fi
+ done
+
+ for i in ${toString upstreamWants}; do
+ fn=${systemd}/example/systemd/system/$i
+ if ! [ -e $fn ]; then echo "missing $fn"; false; fi
+ x=$out/$(basename $fn)
+ mkdir $x
+ for i in $fn/*; do
+ y=$x/$(basename $i)
+ cp -pd $i $y
+ if ! [ -e $y ]; then rm -v $y; fi
+ done
+ done
+
+ for i in ${toString nixosUnits}; do
+ ln -s $i/* $out/
+ done
+
+ for i in ${toString cfg.packages}; do
+ ln -s $i/etc/systemd/system/* $out/
+ done
+
+ ${concatStrings (mapAttrsToList (name: unit:
+ concatMapStrings (name2: ''
+ mkdir -p $out/${name2}.wants
+ ln -sfn ../${name} $out/${name2}.wants/
+ '') unit.wantedBy) cfg.units)}
+
+ ${concatStrings (mapAttrsToList (name: unit:
+ concatMapStrings (name2: ''
+ mkdir -p $out/${name2}.requires
+ ln -sfn ../${name} $out/${name2}.requires/
+ '') unit.requiredBy) cfg.units)}
+
+ ln -s ${cfg.defaultUnit} $out/default.target
+
+ ln -s rescue.target $out/kbrequest.target
+
+ mkdir -p $out/getty.target.wants/
+ ln -s ../getty@tty1.service $out/getty.target.wants/
+
+ ln -s ../local-fs.target ../remote-fs.target ../network.target ../nss-lookup.target \
+ ../nss-user-lookup.target ../swap.target $out/multi-user.target.wants/
+ ''; # */
+
+in
+
+{
+
+ ###### interface
+
+ options = {
+
+ systemd.package = mkOption {
+ default = pkgs.systemd;
+ type = types.package;
+ description = "The systemd package.";
+ };
+
+ systemd.units = mkOption {
+ description = "Definition of systemd units.";
+ default = {};
+ type = types.attrsOf types.optionSet;
+ options = {
+ text = mkOption {
+ types = types.uniq types.string;
+ description = "Text of this systemd unit.";
+ };
+ enable = mkOption {
+ default = true;
+ types = types.bool;
+ description = ''
+ If set to false, this unit will be a symlink to
+ /dev/null. This is primarily useful to prevent specific
+ template instances (e.g. serial-getty@ttyS0)
+ from being started.
+ '';
+ };
+ requiredBy = mkOption {
+ default = [];
+ types = types.listOf types.string;
+ description = "Units that require (i.e. depend on and need to go down with) this unit.";
+ };
+ wantedBy = mkOption {
+ default = [];
+ types = types.listOf types.string;
+ description = "Units that want (i.e. depend on) this unit.";
+ };
+ };
+ };
+
+ systemd.packages = mkOption {
+ default = [];
+ type = types.listOf types.package;
+ description = "Packages providing systemd units.";
+ };
+
+ systemd.targets = mkOption {
+ default = {};
+ type = types.attrsOf types.optionSet;
+ options = [ unitOptions unitConfig ];
+ description = "Definition of systemd target units.";
+ };
+
+ systemd.services = mkOption {
+ default = {};
+ type = types.attrsOf types.optionSet;
+ options = [ serviceOptions unitConfig serviceConfig ];
+ description = "Definition of systemd service units.";
+ };
+
+ systemd.sockets = mkOption {
+ default = {};
+ type = types.attrsOf types.optionSet;
+ options = [ socketOptions unitConfig ];
+ description = "Definition of systemd socket units.";
+ };
+
+ systemd.timers = mkOption {
+ default = {};
+ type = types.attrsOf types.optionSet;
+ options = [ timerOptions unitConfig ];
+ description = "Definition of systemd timer units.";
+ };
+
+ systemd.mounts = mkOption {
+ default = [];
+ type = types.listOf types.optionSet;
+ options = [ mountOptions unitConfig mountConfig ];
+ description = ''
+ Definition of systemd mount units.
+ This is a list instead of an attrSet, because systemd mandates the names to be derived from
+ the 'where' attribute.
+ '';
+ };
+
+ systemd.automounts = mkOption {
+ default = [];
+ type = types.listOf types.optionSet;
+ options = [ automountOptions unitConfig automountConfig ];
+ description = ''
+ Definition of systemd automount units.
+ This is a list instead of an attrSet, because systemd mandates the names to be derived from
+ the 'where' attribute.
+ '';
+ };
+
+ systemd.defaultUnit = mkOption {
+ default = "multi-user.target";
+ type = types.uniq types.string;
+ description = "Default unit started when the system boots.";
+ };
+
+ systemd.globalEnvironment = mkOption {
+ type = types.attrs;
+ default = {};
+ example = { TZ = "CET"; };
+ description = ''
+ Environment variables passed to all systemd units.
+ '';
+ };
+
+ services.journald.console = mkOption {
+ default = "";
+ type = types.uniq types.string;
+ description = "If non-empty, write log messages to the specified TTY device.";
+ };
+
+ services.journald.rateLimitInterval = mkOption {
+ default = "10s";
+ type = types.uniq types.string;
+ description = ''
+ Configures the rate limiting interval that is applied to all
+ messages generated on the system. This rate limiting is applied
+ per-service, so that two services which log do not interfere with
+ each other's limit. The value may be specified in the following
+ units: s, min, h, ms, us. To turn off any kind of rate limiting,
+ set either value to 0.
+ '';
+ };
+
+ services.journald.rateLimitBurst = mkOption {
+ default = 100;
+ type = types.uniq types.int;
+ description = ''
+ Configures the rate limiting burst limit (number of messages per
+ interval) that is applied to all messages generated on the system.
+ This rate limiting is applied per-service, so that two services
+ which log do not interfere with each other's limit.
+ '';
+ };
+
+ services.logind.extraConfig = mkOption {
+ default = "";
+ type = types.uniq types.string;
+ example = "HandleLidSwitch=ignore";
+ description = ''
+ Extra config options for systemd-logind. See man logind.conf for
+ available options.
+ '';
+ };
+
+ systemd.enableEmergencyMode = mkOption {
+ default = true;
+ type = types.bool;
+ description = ''
+ Whether to enable emergency mode, which is an
+ sulogin shell started on the console if
+ mounting a filesystem fails. Since some machines (like EC2
+ instances) have no console of any kind, emergency mode doesn't
+ make sense, and it's better to continue with the boot insofar
+ as possible.
+ '';
+ };
+
+ };
+
+
+ ###### implementation
+
+ config = {
+
+ system.build.units = units;
+
+ environment.systemPackages = [ systemd ];
+
+ environment.etc."systemd/system".source = units;
+
+ environment.etc."systemd/system.conf".text =
+ ''
+ [Manager]
+ '';
+
+ environment.etc."systemd/journald.conf".text =
+ ''
+ [Journal]
+ RateLimitInterval=${config.services.journald.rateLimitInterval}
+ RateLimitBurst=${toString config.services.journald.rateLimitBurst}
+ ${optionalString (config.services.journald.console != "") ''
+ ForwardToConsole=yes
+ TTYPath=${config.services.journald.console}
+ ''}
+ '';
+
+ environment.etc."systemd/logind.conf".text =
+ ''
+ [Login]
+ ${config.services.logind.extraConfig}
+ '';
+
+ environment.etc."systemd/sleep.conf".text =
+ ''
+ [Sleep]
+ '';
+
+ system.activationScripts.systemd = stringAfter [ "groups" ]
+ ''
+ mkdir -m 0755 -p /var/lib/udev
+ mkdir -p /var/log/journal
+ chmod 0755 /var/log/journal
+
+ # Regenerate the hardware database /var/lib/udev/hwdb.bin
+ # whenever systemd changes.
+ if [ ! -e /var/lib/udev/prev-systemd -o "$(readlink /var/lib/udev/prev-systemd)" != ${systemd} ]; then
+ echo "regenerating udev hardware database..."
+ ${systemd}/bin/udevadm hwdb --update && ln -sfn ${systemd} /var/lib/udev/prev-systemd
+ fi
+
+ # Make all journals readable to users in the wheel and adm
+ # groups, in addition to those in the systemd-journal group.
+ # Users can always read their own journals.
+ ${pkgs.acl}/bin/setfacl -nm g:wheel:rx,d:g:wheel:rx,g:adm:rx,d:g:adm:rx /var/log/journal
+ '';
+
+ # Target for ‘charon send-keys’ to hook into.
+ systemd.targets.keys =
+ { description = "Security Keys";
+ };
+
+ systemd.units =
+ mapAttrs' (n: v: nameValuePair "${n}.target" (targetToUnit n v)) cfg.targets
+ // mapAttrs' (n: v: nameValuePair "${n}.service" (serviceToUnit n v)) cfg.services
+ // mapAttrs' (n: v: nameValuePair "${n}.socket" (socketToUnit n v)) cfg.sockets
+ // mapAttrs' (n: v: nameValuePair "${n}.timer" (timerToUnit n v)) cfg.timers
+ // listToAttrs (map
+ (v: let n = escapeSystemdPath v.where;
+ in nameValuePair "${n}.mount" (mountToUnit n v)) cfg.mounts)
+ // listToAttrs (map
+ (v: let n = escapeSystemdPath v.where;
+ in nameValuePair "${n}.automount" (automountToUnit n v)) cfg.automounts);
+
+ system.requiredKernelConfig = map config.lib.kernelConfig.isEnabled [
+ "CGROUPS" "AUTOFS4_FS" "DEVTMPFS"
+ ];
+
+ environment.shellAliases =
+ { start = "systemctl start";
+ stop = "systemctl stop";
+ restart = "systemctl restart";
+ status = "systemctl status";
+ };
+
+ users.extraGroups.systemd-journal.gid = config.ids.gids.systemd-journal;
+
+ # Generate timer units for all services that have a ‘startAt’ value.
+ systemd.timers =
+ mapAttrs (name: service:
+ { wantedBy = [ "timers.target" ];
+ timerConfig.OnCalendar = service.startAt;
+ })
+ (filterAttrs (name: service: service.startAt != "") cfg.services);
+
+ # FIXME: These are borrowed from upstream systemd.
+ systemd.services."systemd-update-utmp" =
+ { description = "Update UTMP about System Reboot/Shutdown";
+ wantedBy = [ "sysinit.target" ];
+ after = [ "systemd-remount-fs.service" ];
+ before = [ "sysinit.target" "shutdown.target" ];
+ conflicts = [ "shutdown.target" ];
+ unitConfig = {
+ DefaultDependencies = false;
+ RequiresMountsFor = "/var/log";
+ };
+ serviceConfig = {
+ Type = "oneshot";
+ RemainAfterExit = true;
+ ExecStart = "${systemd}/lib/systemd/systemd-update-utmp reboot";
+ ExecStop = "${systemd}/lib/systemd/systemd-update-utmp shutdown";
+ };
+ restartIfChanged = false;
+ };
+
+ systemd.services."systemd-random-seed" =
+ { description = "Load/Save Random Seed";
+ wantedBy = [ "sysinit.target" "multi-user.target" ];
+ after = [ "systemd-remount-fs.service" ];
+ before = [ "sysinit.target" "shutdown.target" ];
+ conflicts = [ "shutdown.target" ];
+ unitConfig = {
+ DefaultDependencies = false;
+ RequiresMountsFor = "/var/lib";
+ };
+ serviceConfig = {
+ Type = "oneshot";
+ RemainAfterExit = true;
+ ExecStart = "${systemd}/lib/systemd/systemd-random-seed load";
+ ExecStop = "${systemd}/lib/systemd/systemd-random-seed save";
+ };
+ };
+
+ };
+}
diff --git a/nixos/modules/system/etc/etc.nix b/nixos/modules/system/etc/etc.nix
new file mode 100644
index 0000000000000000000000000000000000000000..91fcdcf2435fb840a12f89882bdb1b5d17c08c91
--- /dev/null
+++ b/nixos/modules/system/etc/etc.nix
@@ -0,0 +1,117 @@
+# Management of static files in /etc.
+
+{ config, pkgs, ... }:
+
+with pkgs.lib;
+
+let
+
+ etc' = filter (f: f.enable) (attrValues config.environment.etc);
+
+ etc = pkgs.stdenv.mkDerivation {
+ name = "etc";
+
+ builder = ./make-etc.sh;
+
+ preferLocalBuild = true;
+
+ /* !!! Use toXML. */
+ sources = map (x: x.source) etc';
+ targets = map (x: x.target) etc';
+ modes = map (x: x.mode) etc';
+ };
+
+in
+
+{
+
+ ###### interface
+
+ options = {
+
+ environment.etc = mkOption {
+ type = types.loaOf types.optionSet;
+ default = {};
+ example =
+ { hosts =
+ { source = "/nix/store/.../etc/dir/file.conf.example";
+ mode = "0440";
+ };
+ "default/useradd".text = "GROUP=100 ...";
+ };
+ description = ''
+ Set of files that have to be linked in /etc.
+ '';
+
+ options = singleton ({ name, config, ... }:
+ { options = {
+
+ enable = mkOption {
+ type = types.bool;
+ default = true;
+ description = ''
+ Whether this /etc file should be generated. This
+ option allows specific /etc files to be disabled.
+ '';
+ };
+
+ target = mkOption {
+ description = ''
+ Name of symlink (relative to
+ /etc). Defaults to the attribute
+ name.
+ '';
+ };
+
+ text = mkOption {
+ default = null;
+ type = types.nullOr types.string;
+ description = "Text of the file.";
+ };
+
+ source = mkOption {
+ types = types.path;
+ description = "Path of the source file.";
+ };
+
+ mode = mkOption {
+ default = "symlink";
+ example = "0600";
+ description = ''
+ If set to something else than symlink,
+ the file is copied instead of symlinked, with the given
+ file mode.
+ '';
+ };
+
+ };
+
+ config = {
+ target = mkDefault name;
+ source = mkIf (config.text != null)
+ (mkDefault (pkgs.writeText "etc-file" config.text));
+ };
+
+ });
+
+ };
+
+ };
+
+
+ ###### implementation
+
+ config = {
+
+ system.build.etc = etc;
+
+ system.activationScripts.etc = stringAfter [ "stdio" ]
+ ''
+ # Set up the statically computed bits of /etc.
+ echo "setting up /etc..."
+ ${pkgs.perl}/bin/perl ${./setup-etc.pl} ${etc}/etc
+ '';
+
+ };
+
+}
diff --git a/nixos/modules/system/etc/make-etc.sh b/nixos/modules/system/etc/make-etc.sh
new file mode 100644
index 0000000000000000000000000000000000000000..7cf68db9ddce546089777f47fc56b5a4a318765e
--- /dev/null
+++ b/nixos/modules/system/etc/make-etc.sh
@@ -0,0 +1,42 @@
+source $stdenv/setup
+
+mkdir -p $out/etc
+
+set -f
+sources_=($sources)
+targets_=($targets)
+modes_=($modes)
+set +f
+
+for ((i = 0; i < ${#targets_[@]}; i++)); do
+ source="${sources_[$i]}"
+ target="${targets_[$i]}"
+
+ if [[ "$source" =~ '*' ]]; then
+
+ # If the source name contains '*', perform globbing.
+ mkdir -p $out/etc/$target
+ for fn in $source; do
+ ln -s "$fn" $out/etc/$target/
+ done
+
+ else
+
+ mkdir -p $out/etc/$(dirname $target)
+ if ! [ -e $out/etc/$target ]; then
+ ln -s $source $out/etc/$target
+ else
+ echo "duplicate entry $target -> $source"
+ if test "$(readlink $out/etc/$target)" != "$source"; then
+ echo "mismatched duplicate entry $(readlink $out/etc/$target) <-> $source"
+ exit 1
+ fi
+ fi
+
+ if test "${modes_[$i]}" != symlink; then
+ echo "${modes_[$i]}" > $out/etc/$target.mode
+ fi
+
+ fi
+done
+
diff --git a/nixos/modules/system/etc/setup-etc.pl b/nixos/modules/system/etc/setup-etc.pl
new file mode 100644
index 0000000000000000000000000000000000000000..7cb6d2a6a45edf8aa85df089be2242ba2722a7b1
--- /dev/null
+++ b/nixos/modules/system/etc/setup-etc.pl
@@ -0,0 +1,68 @@
+use strict;
+use File::Find;
+use File::Copy;
+use File::Path;
+use File::Basename;
+
+my $etc = $ARGV[0] or die;
+my $static = "/etc/static";
+
+sub atomicSymlink {
+ my ($source, $target) = @_;
+ my $tmp = "$target.tmp";
+ unlink $tmp;
+ symlink $source, $tmp or return 1;
+ rename $tmp, $target or return 1;
+ return 1;
+}
+
+
+# Atomically update /etc/static to point at the etc files of the
+# current configuration.
+atomicSymlink $etc, $static or die;
+
+
+# Remove dangling symlinks that point to /etc/static. These are
+# configuration files that existed in a previous configuration but not
+# in the current one. For efficiency, don't look under /etc/nixos
+# (where all the NixOS sources live).
+sub cleanup {
+ if ($File::Find::name eq "/etc/nixos") {
+ $File::Find::prune = 1;
+ return;
+ }
+ if (-l $_) {
+ my $target = readlink $_;
+ if (substr($target, 0, length $static) eq $static) {
+ my $x = "/etc/static/" . substr($File::Find::name, length "/etc/");
+ unless (-l $x) {
+ print STDERR "removing obsolete symlink ‘$File::Find::name’...\n";
+ unlink "$_";
+ }
+ }
+ }
+}
+
+find(\&cleanup, "/etc");
+
+
+# For every file in the etc tree, create a corresponding symlink in
+# /etc to /etc/static. The indirection through /etc/static is to make
+# switching to a new configuration somewhat more atomic.
+sub link {
+ my $fn = substr $File::Find::name, length($etc) + 1 or next;
+ my $target = "/etc/$fn";
+ File::Path::make_path(dirname $target);
+ if (-e "$_.mode") {
+ open MODE, "<$_.mode";
+ my $mode = ; chomp $mode;
+ close MODE;
+ copy "$static/$fn", "$target.tmp" or warn;
+ chmod oct($mode), "$target.tmp" or warn;
+ rename "$target.tmp", $target or warn;
+ } elsif (-l "$_") {
+ atomicSymlink "$static/$fn", $target or warn;
+ }
+}
+
+find(\&link, $etc);
diff --git a/nixos/modules/system/upstart/upstart.nix b/nixos/modules/system/upstart/upstart.nix
new file mode 100644
index 0000000000000000000000000000000000000000..5d5139b7a57e02272a8d196423c029b0ae4a126f
--- /dev/null
+++ b/nixos/modules/system/upstart/upstart.nix
@@ -0,0 +1,286 @@
+{ config, pkgs, ... }:
+
+with pkgs.lib;
+with import ../boot/systemd-unit-options.nix { inherit config pkgs; };
+
+let
+
+ userExists = u:
+ (u == "") || any (uu: uu.name == u) (attrValues config.users.extraUsers);
+
+ groupExists = g:
+ (g == "") || any (gg: gg.name == g) (attrValues config.users.extraGroups);
+
+ makeJobScript = name: content: "${pkgs.writeScriptBin name content}/bin/${name}";
+
+ # From a job description, generate an systemd unit file.
+ makeUnit = job:
+
+ let
+ hasMain = job.script != "" || job.exec != "";
+
+ env = job.environment;
+
+ preStartScript = makeJobScript "${job.name}-pre-start"
+ ''
+ #! ${pkgs.stdenv.shell} -e
+ ${job.preStart}
+ '';
+
+ startScript = makeJobScript "${job.name}-start"
+ ''
+ #! ${pkgs.stdenv.shell} -e
+ ${if job.script != "" then job.script else ''
+ exec ${job.exec}
+ ''}
+ '';
+
+ postStartScript = makeJobScript "${job.name}-post-start"
+ ''
+ #! ${pkgs.stdenv.shell} -e
+ ${job.postStart}
+ '';
+
+ preStopScript = makeJobScript "${job.name}-pre-stop"
+ ''
+ #! ${pkgs.stdenv.shell} -e
+ ${job.preStop}
+ '';
+
+ postStopScript = makeJobScript "${job.name}-post-stop"
+ ''
+ #! ${pkgs.stdenv.shell} -e
+ ${job.postStop}
+ '';
+ in {
+
+ inherit (job) description requires before partOf environment path restartIfChanged unitConfig;
+
+ after =
+ (if job.startOn == "stopped udevtrigger" then [ "systemd-udev-settle.service" ] else
+ if job.startOn == "started udev" then [ "systemd-udev.service" ] else
+ if job.startOn == "started network-interfaces" then [ "network-interfaces.target" ] else
+ if job.startOn == "started networking" then [ "network.target" ] else
+ if job.startOn == "ip-up" then [] else
+ if job.startOn == "" || job.startOn == "startup" then [] else
+ builtins.trace "Warning: job ‘${job.name}’ has unknown startOn value ‘${job.startOn}’." []
+ ) ++ job.after;
+
+ wants =
+ (if job.startOn == "stopped udevtrigger" then [ "systemd-udev-settle.service" ] else []
+ ) ++ job.wants;
+
+ wantedBy =
+ (if job.startOn == "" then [] else
+ if job.startOn == "ip-up" then [ "ip-up.target" ] else
+ [ "multi-user.target" ]) ++ job.wantedBy;
+
+ serviceConfig =
+ job.serviceConfig
+ // optionalAttrs (job.preStart != "" && (job.script != "" || job.exec != ""))
+ { ExecStartPre = preStartScript; }
+ // optionalAttrs (job.preStart != "" && job.script == "" && job.exec == "")
+ { ExecStart = preStartScript; }
+ // optionalAttrs (job.script != "" || job.exec != "")
+ { ExecStart = startScript; }
+ // optionalAttrs (job.postStart != "")
+ { ExecStartPost = postStartScript; }
+ // optionalAttrs (job.preStop != "")
+ { ExecStop = preStopScript; }
+ // optionalAttrs (job.postStop != "")
+ { ExecStopPost = postStopScript; }
+ // (if job.script == "" && job.exec == "" then { Type = "oneshot"; RemainAfterExit = true; } else
+ if job.daemonType == "fork" || job.daemonType == "daemon" then { Type = "forking"; GuessMainPID = true; } else
+ if job.daemonType == "none" then { } else
+ throw "invalid daemon type `${job.daemonType}'")
+ // optionalAttrs (!job.task && job.respawn)
+ { Restart = "always"; }
+ // optionalAttrs job.task
+ { Type = "oneshot"; RemainAfterExit = false; };
+ };
+
+
+ jobOptions = serviceOptions // {
+
+ name = mkOption {
+ # !!! The type should ensure that this could be a filename.
+ type = types.string;
+ example = "sshd";
+ description = ''
+ Name of the Upstart job.
+ '';
+ };
+
+ startOn = mkOption {
+ # !!! Re-enable this once we're on Upstart >= 0.6.
+ #type = types.string;
+ default = "";
+ description = ''
+ The Upstart event that triggers this job to be started.
+ If empty, the job will not start automatically.
+ '';
+ };
+
+ stopOn = mkOption {
+ type = types.string;
+ default = "starting shutdown";
+ description = ''
+ The Upstart event that triggers this job to be stopped.
+ '';
+ };
+
+ postStart = mkOption {
+ type = types.string;
+ default = "";
+ description = ''
+ Shell commands executed after the job is started (i.e. after
+ the job's main process is started), but before the job is
+ considered “running”.
+ '';
+ };
+
+ preStop = mkOption {
+ type = types.string;
+ default = "";
+ description = ''
+ Shell commands executed before the job is stopped
+ (i.e. before Upstart kills the job's main process). This can
+ be used to cleanly shut down a daemon.
+ '';
+ };
+
+ postStop = mkOption {
+ type = types.string;
+ default = "";
+ description = ''
+ Shell commands executed after the job has stopped
+ (i.e. after the job's main process has terminated).
+ '';
+ };
+
+ exec = mkOption {
+ type = types.string;
+ default = "";
+ description = ''
+ Command to start the job's main process. If empty, the
+ job has no main process, but can still have pre/post-start
+ and pre/post-stop scripts, and is considered “running”
+ until it is stopped.
+ '';
+ };
+
+ respawn = mkOption {
+ type = types.bool;
+ default = true;
+ description = ''
+ Whether to restart the job automatically if its process
+ ends unexpectedly.
+ '';
+ };
+
+ task = mkOption {
+ type = types.bool;
+ default = false;
+ description = ''
+ Whether this job is a task rather than a service. Tasks
+ are executed only once, while services are restarted when
+ they exit.
+ '';
+ };
+
+ daemonType = mkOption {
+ type = types.string;
+ default = "none";
+ description = ''
+ Determines how Upstart detects when a daemon should be
+ considered “running”. The value none means
+ that the daemon is considered ready immediately. The value
+ fork means that the daemon will fork once.
+ The value daemon means that the daemon will
+ fork twice. The value stop means that the
+ daemon will raise the SIGSTOP signal to indicate readiness.
+ '';
+ };
+
+ setuid = mkOption {
+ type = types.string;
+ check = userExists;
+ default = "";
+ description = ''
+ Run the daemon as a different user.
+ '';
+ };
+
+ setgid = mkOption {
+ type = types.string;
+ check = groupExists;
+ default = "";
+ description = ''
+ Run the daemon as a different group.
+ '';
+ };
+
+ path = mkOption {
+ default = [];
+ description = ''
+ Packages added to the job's PATH environment variable.
+ Both the bin and sbin
+ subdirectories of each package are added.
+ '';
+ };
+
+ };
+
+
+ upstartJob = { name, config, ... }: {
+
+ options = {
+
+ unit = mkOption {
+ default = makeUnit config;
+ description = "Generated definition of the systemd unit corresponding to this job.";
+ };
+
+ };
+
+ config = {
+
+ # The default name is the name extracted from the attribute path.
+ name = mkDefaultValue name;
+
+ };
+
+ };
+
+in
+
+{
+
+ ###### interface
+
+ options = {
+
+ jobs = mkOption {
+ default = {};
+ description = ''
+ This option defines the system jobs started and managed by the
+ Upstart daemon.
+ '';
+ type = types.loaOf types.optionSet;
+ options = [ jobOptions upstartJob ];
+ };
+
+ };
+
+
+ ###### implementation
+
+ config = {
+
+ systemd.services =
+ flip mapAttrs' config.jobs (name: job:
+ nameValuePair job.name job.unit);
+
+ };
+
+}
diff --git a/nixos/modules/tasks/cpu-freq.nix b/nixos/modules/tasks/cpu-freq.nix
new file mode 100644
index 0000000000000000000000000000000000000000..3b21d831087123e0a298fdf8a1cd9616e99d78cc
--- /dev/null
+++ b/nixos/modules/tasks/cpu-freq.nix
@@ -0,0 +1,51 @@
+{ config, pkgs, ... }:
+
+with pkgs.lib;
+
+{
+ ###### interface
+
+ options = {
+
+ powerManagement.cpuFreqGovernor = mkOption {
+ default = "";
+ example = "ondemand";
+ type = types.uniq types.string;
+ description = ''
+ Configure the governor used to regulate the frequence of the
+ available CPUs. By default, the kernel configures the
+ on-demand governor.
+ '';
+ };
+
+ };
+
+
+ ###### implementation
+
+ config = mkIf (config.powerManagement.cpuFreqGovernor != "") {
+
+ environment.systemPackages = [ pkgs.cpufrequtils ];
+
+ jobs.cpufreq =
+ { description = "CPU Frequency Governor Setup";
+
+ after = [ "systemd-modules-load.service" ];
+ wantedBy = [ "multi-user.target" ];
+
+ path = [ pkgs.cpufrequtils ];
+
+ preStart = ''
+ for i in $(seq 0 $(($(nproc) - 1))); do
+ for gov in $(cpufreq-info -c $i -g); do
+ if [ "$gov" = ${config.powerManagement.cpuFreqGovernor} ]; then
+ echo "<6>setting governor on CPU $i to ‘$gov’"
+ cpufreq-set -c $i -g $gov
+ fi
+ done
+ done
+ '';
+ };
+ };
+
+}
diff --git a/nixos/modules/tasks/filesystems.nix b/nixos/modules/tasks/filesystems.nix
new file mode 100644
index 0000000000000000000000000000000000000000..4ca309f5a108ed1e88b0a58d12ceb91b2dd92c14
--- /dev/null
+++ b/nixos/modules/tasks/filesystems.nix
@@ -0,0 +1,216 @@
+{ config, pkgs, utils, ... }:
+
+with pkgs.lib;
+with utils;
+
+let
+
+ fileSystems = attrValues config.fileSystems;
+
+ prioOption = prio: optionalString (prio !=null) " pri=${toString prio}";
+
+ fileSystemOpts = { name, ... }: {
+
+ options = {
+
+ mountPoint = mkOption {
+ example = "/mnt/usb";
+ type = types.uniq types.string;
+ description = "Location of the mounted the file system.";
+ };
+
+ device = mkOption {
+ default = null;
+ example = "/dev/sda";
+ type = types.uniq (types.nullOr types.string);
+ description = "Location of the device.";
+ };
+
+ label = mkOption {
+ default = null;
+ example = "root-partition";
+ type = types.uniq (types.nullOr types.string);
+ description = "Label of the device (if any).";
+ };
+
+ fsType = mkOption {
+ default = "auto";
+ example = "ext3";
+ type = types.uniq types.string;
+ description = "Type of the file system.";
+ };
+
+ options = mkOption {
+ default = "defaults,relatime";
+ example = "data=journal";
+ type = types.string;
+ merge = pkgs.lib.concatStringsSep ",";
+ description = "Options used to mount the file system.";
+ };
+
+ autoFormat = mkOption {
+ default = false;
+ type = types.bool;
+ description = ''
+ If the device does not currently contain a filesystem (as
+ determined by blkid, then automatically
+ format it with the filesystem type specified in
+
fsType
. Use with caution.
+ '';
+ };
+
+ noCheck = mkOption {
+ default = false;
+ type = types.bool;
+ description = "Disable running fsck on this filesystem.";
+ };
+
+ };
+
+ config = {
+ mountPoint = mkDefault name;
+ };
+
+ };
+
+in
+
+{
+
+ ###### interface
+
+ options = {
+
+ fileSystems = mkOption {
+ example = {
+ "/".device = "/dev/hda1";
+ "/data" = {
+ device = "/dev/hda2";
+ fsType = "ext3";
+ options = "data=journal";
+ };
+ "/bigdisk".label = "bigdisk";
+ };
+ type = types.loaOf types.optionSet;
+ options = [ fileSystemOpts ];
+ description = ''
+ The file systems to be mounted. It must include an entry for
+ the root directory (mountPoint = \"/\"). Each
+ entry in the list is an attribute set with the following fields:
+ mountPoint, device,
+ fsType (a file system type recognised by
+ mount; defaults to
+ \"auto\"), and options
+ (the mount options passed to mount using the
+
to ["tty7"].
+ '';
+ };
+
+ };
+
+
+ ###### implementation
+
+ config = {
+
+ environment.systemPackages = [ pkgs.kbd ];
+
+ # Let systemd-vconsole-setup.service do the work of setting up the
+ # virtual consoles. FIXME: trigger a restart of
+ # systemd-vconsole-setup.service if /etc/vconsole.conf changes.
+ environment.etc."vconsole.conf".source = vconsoleConf;
+
+ # This is identical to the systemd-vconsole-setup.service unit
+ # shipped with systemd, except that it uses /dev/tty1 instead of
+ # /dev/tty0 to prevent putting the X server in non-raw mode, and
+ # it has a restart trigger.
+ systemd.services."systemd-vconsole-setup" =
+ { description = "Setup Virtual Console";
+ wantedBy = [ "sysinit.target" "multi-user.target" ];
+ before = [ "sysinit.target" "shutdown.target" ];
+ unitConfig =
+ { DefaultDependencies = "no";
+ Conflicts = "shutdown.target";
+ ConditionPathExists = "/dev/tty1";
+ };
+ serviceConfig =
+ { Type = "oneshot";
+ RemainAfterExit = true;
+ ExecStart = "${config.systemd.package}/lib/systemd/systemd-vconsole-setup /dev/tty1";
+ };
+ restartTriggers = [ vconsoleConf ];
+ };
+
+ };
+
+}
diff --git a/nixos/modules/tasks/lvm.nix b/nixos/modules/tasks/lvm.nix
new file mode 100644
index 0000000000000000000000000000000000000000..0e0272388c76a714f044a8077353a032f7890fc2
--- /dev/null
+++ b/nixos/modules/tasks/lvm.nix
@@ -0,0 +1,15 @@
+{ config, pkgs, ... }:
+
+{
+
+ ###### implementation
+
+ config = {
+
+ environment.systemPackages = [ pkgs.lvm2 ];
+
+ services.udev.packages = [ pkgs.lvm2 ];
+
+ };
+
+}
diff --git a/nixos/modules/tasks/network-interfaces.nix b/nixos/modules/tasks/network-interfaces.nix
new file mode 100644
index 0000000000000000000000000000000000000000..0177d6396dfac7715c4e6c5d1a01e53c1f4a7db0
--- /dev/null
+++ b/nixos/modules/tasks/network-interfaces.nix
@@ -0,0 +1,447 @@
+{ config, pkgs, ... }:
+
+with pkgs.lib;
+
+let
+
+ cfg = config.networking;
+ interfaces = attrValues cfg.interfaces;
+ hasVirtuals = any (i: i.virtual) interfaces;
+
+ interfaceOpts = { name, ... }: {
+
+ options = {
+
+ name = mkOption {
+ example = "eth0";
+ type = types.string;
+ description = "Name of the interface.";
+ };
+
+ ipAddress = mkOption {
+ default = null;
+ example = "10.0.0.1";
+ type = types.nullOr types.string;
+ description = ''
+ IP address of the interface. Leave empty to configure the
+ interface using DHCP.
+ '';
+ };
+
+ prefixLength = mkOption {
+ default = null;
+ example = 24;
+ type = types.nullOr types.int;
+ description = ''
+ Subnet mask of the interface, specified as the number of
+ bits in the prefix (24).
+ '';
+ };
+
+ subnetMask = mkOption {
+ default = "";
+ example = "255.255.255.0";
+ type = types.string;
+ description = ''
+ Subnet mask of the interface, specified as a bitmask.
+ This is deprecated; use
prefixLength
+ instead.
+ '';
+ };
+
+ macAddress = mkOption {
+ default = null;
+ example = "00:11:22:33:44:55";
+ type = types.nullOr types.string;
+ description = ''
+ MAC address of the interface. Leave empty to use the default.
+ '';
+ };
+
+ virtual = mkOption {
+ default = false;
+ type = types.bool;
+ description = ''
+ Whether this interface is virtual and should be created by tunctl.
+ This is mainly useful for creating bridges between a host a virtual
+ network such as VPN or a virtual machine.
+
+ Defaults to tap device, unless interface contains "tun" in its name.
+ '';
+ };
+
+ virtualOwner = mkOption {
+ default = "root";
+ type = types.uniq types.string;
+ description = ''
+ In case of a virtual device, the user who owns it.
+ '';
+ };
+
+ proxyARP = mkOption {
+ default = false;
+ type = types.bool;
+ description = ''
+ Turn on proxy_arp for this device (and proxy_ndp for ipv6).
+ This is mainly useful for creating pseudo-bridges between a real
+ interface and a virtual network such as VPN or a virtual machine for
+ interfaces that don't support real bridging (most wlan interfaces).
+ As ARP proxying acts slightly above the link-layer, below-ip traffic
+ isn't bridged, so things like DHCP won't work. The advantage above
+ using NAT lies in the fact that no IP addresses are shared, so all
+ hosts are reachable/routeable.
+
+ WARNING: turns on ip-routing, so if you have multiple interfaces, you
+ should think of the consequence and setup firewall rules to limit this.
+ '';
+ };
+
+ };
+
+ config = {
+ name = mkDefault name;
+ };
+
+ };
+
+in
+
+{
+
+ ###### interface
+
+ options = {
+
+ networking.hostName = mkOption {
+ default = "nixos";
+ description = ''
+ The name of the machine. Leave it empty if you want to obtain
+ it from a DHCP server (if using DHCP).
+ '';
+ };
+
+ networking.enableIPv6 = mkOption {
+ default = true;
+ description = ''
+ Whether to enable support for IPv6.
+ '';
+ };
+
+ networking.defaultGateway = mkOption {
+ default = "";
+ example = "131.211.84.1";
+ description = ''
+ The default gateway. It can be left empty if it is auto-detected through DHCP.
+ '';
+ };
+
+ networking.defaultGatewayWindowSize = mkOption {
+ default = null;
+ example = 524288;
+ type = types.nullOr types.int;
+ description = ''
+ The window size of the default gateway. It limits maximal data bursts that TCP peers
+ are allowed to send to us.
+ '';
+ };
+
+ networking.nameservers = mkOption {
+ default = [];
+ example = ["130.161.158.4" "130.161.33.17"];
+ description = ''
+ The list of nameservers. It can be left empty if it is auto-detected through DHCP.
+ '';
+ };
+
+ networking.domain = mkOption {
+ default = "";
+ example = "home";
+ description = ''
+ The domain. It can be left empty if it is auto-detected through DHCP.
+ '';
+ };
+
+ networking.localCommands = mkOption {
+ default = "";
+ example = "text=anything; echo You can put $text here.";
+ description = ''
+ Shell commands to be executed at the end of the
+ network-setup systemd service. Note that if
+ you are using DHCP to obtain the network configuration,
+ interfaces may not be fully configured yet.
+ '';
+ };
+
+ networking.interfaces = mkOption {
+ default = {};
+ example =
+ { eth0 = {
+ ipAddress = "131.211.84.78";
+ subnetMask = "255.255.255.128";
+ };
+ };
+ description = ''
+ The configuration for each network interface. If
+
networking.useDHCP
is true, then every
+ interface not listed here will be configured using DHCP.
+ '';
+ type = types.loaOf types.optionSet;
+ options = [ interfaceOpts ];
+ };
+
+ networking.bridges = mkOption {
+ default = { };
+ example =
+ { br0.interfaces = [ "eth0" "eth1" ];
+ br1.interfaces = [ "eth2" "wlan0" ];
+ };
+ description =
+ ''
+ This option allows you to define Ethernet bridge devices
+ that connect physical networks together. The value of this
+ option is an attribute set. Each attribute specifies a
+ bridge, with the attribute name specifying the name of the
+ bridge's network interface.
+ '';
+
+ type = types.attrsOf types.optionSet;
+
+ options = {
+
+ interfaces = mkOption {
+ example = [ "eth0" "eth1" ];
+ type = types.listOf types.string;
+ description =
+ "The physical network interfaces connected by the bridge.";
+ };
+
+ };
+
+ };
+
+ networking.useDHCP = mkOption {
+ default = true;
+ merge = mergeEnableOption;
+ description = ''
+ Whether to use DHCP to obtain an IP address and other
+ configuration for all network interfaces that are not manually
+ configured.
+ '';
+ };
+
+ };
+
+
+ ###### implementation
+
+ config = {
+
+ boot.kernelModules = optional cfg.enableIPv6 "ipv6" ++ optional hasVirtuals "tun";
+
+ environment.systemPackages =
+ [ pkgs.host
+ pkgs.iproute
+ pkgs.iputils
+ pkgs.nettools
+ pkgs.wirelesstools
+ pkgs.iw
+ pkgs.rfkill
+ pkgs.openresolv
+ ]
+ ++ optional (cfg.bridges != {}) pkgs.bridge_utils
+ ++ optional hasVirtuals pkgs.tunctl
+ ++ optional cfg.enableIPv6 pkgs.ndisc6;
+
+ security.setuidPrograms = [ "ping" "ping6" ];
+
+ systemd.targets."network-interfaces" =
+ { description = "All Network Interfaces";
+ wantedBy = [ "network.target" ];
+ unitConfig.X-StopOnReconfiguration = true;
+ };
+
+ systemd.services =
+ let
+
+ networkSetup =
+ { description = "Networking Setup";
+
+ after = [ "network-interfaces.target" ];
+ before = [ "network.target" ];
+ wantedBy = [ "network.target" ];
+
+ path = [ pkgs.iproute ];
+
+ serviceConfig.Type = "oneshot";
+ serviceConfig.RemainAfterExit = true;
+
+ script =
+ ''
+ # Set the static DNS configuration, if given.
+ ${pkgs.openresolv}/sbin/resolvconf -m 1 -a static < /proc/sys/net/ipv6/conf/all/disable_ipv6
+ fi
+
+ # Set the default gateway.
+ ${optionalString (cfg.defaultGateway != "") ''
+ # FIXME: get rid of "|| true" (necessary to make it idempotent).
+ ip route add default via "${cfg.defaultGateway}" ${
+ optionalString (cfg.defaultGatewayWindowSize != null)
+ "window ${cfg.defaultGatewayWindowSize}"} || true
+ ''}
+
+ # Turn on forwarding if any interface has enabled proxy_arp.
+ ${optionalString (any (i: i.proxyARP) interfaces) ''
+ echo 1 > /proc/sys/net/ipv4/ip_forward
+ ''}
+
+ # Run any user-specified commands.
+ ${cfg.localCommands}
+ '';
+ };
+
+ # For each interface , create a job ‘-cfg.service"
+ # that performs static configuration. It has a "wants"
+ # dependency on ‘.service’, which is supposed to create
+ # the interface and need not exist (i.e. for hardware
+ # interfaces). It has a binds-to dependency on the actual
+ # network device, so it only gets started after the interface
+ # has appeared, and it's stopped when the interface
+ # disappears.
+ configureInterface = i: nameValuePair "${i.name}-cfg"
+ (let mask =
+ if i.prefixLength != null then toString i.prefixLength else
+ if i.subnetMask != "" then i.subnetMask else "32";
+ in
+ { description = "Configuration of ${i.name}";
+ wantedBy = [ "network-interfaces.target" ];
+ bindsTo = [ "sys-subsystem-net-devices-${i.name}.device" ];
+ after = [ "sys-subsystem-net-devices-${i.name}.device" ];
+ serviceConfig.Type = "oneshot";
+ serviceConfig.RemainAfterExit = true;
+ path = [ pkgs.iproute pkgs.gawk ];
+ script =
+ ''
+ echo "bringing up interface..."
+ ip link set "${i.name}" up
+ ''
+ + optionalString (i.macAddress != null)
+ ''
+ echo "setting MAC address to ${i.macAddress}..."
+ ip link set "${i.name}" address "${i.macAddress}"
+ ''
+ + optionalString (i.ipAddress != null)
+ ''
+ cur=$(ip -4 -o a show dev "${i.name}" | awk '{print $4}')
+ # Only do a flush/add if it's necessary. This is
+ # useful when the Nix store is accessed via this
+ # interface (e.g. in a QEMU VM test).
+ if [ "$cur" != "${i.ipAddress}/${mask}" ]; then
+ echo "configuring interface..."
+ ip -4 addr flush dev "${i.name}"
+ ip -4 addr add "${i.ipAddress}/${mask}" dev "${i.name}"
+ # Ensure that the default gateway remains set.
+ # (Flushing this interface may have removed it.)
+ ${config.systemd.package}/bin/systemctl try-restart --no-block network-setup.service
+ else
+ echo "skipping configuring interface"
+ fi
+ ${config.systemd.package}/bin/systemctl start ip-up.target
+ ''
+ + optionalString i.proxyARP
+ ''
+ echo 1 > /proc/sys/net/ipv4/conf/${i.name}/proxy_arp
+ ''
+ + optionalString (i.proxyARP && cfg.enableIPv6)
+ ''
+ echo 1 > /proc/sys/net/ipv6/conf/${i.name}/proxy_ndp
+ '';
+ });
+
+ createTunDevice = i: nameValuePair "${i.name}"
+ { description = "Virtual Network Interface ${i.name}";
+ requires = [ "dev-net-tun.device" ];
+ after = [ "dev-net-tun.device" ];
+ wantedBy = [ "network.target" ];
+ requiredBy = [ "sys-subsystem-net-devices-${i.name}.device" ];
+ serviceConfig =
+ { Type = "oneshot";
+ RemainAfterExit = true;
+ ExecStart = "${pkgs.tunctl}/bin/tunctl -t '${i.name}' -u '${i.virtualOwner}'";
+ ExecStop = "${pkgs.tunctl}/bin/tunctl -d '${i.name}'";
+ };
+ };
+
+ createBridgeDevice = n: v:
+ let
+ deps = map (i: "sys-subsystem-net-devices-${i}.device") v.interfaces;
+ in
+ { description = "Bridge Interface ${n}";
+ wantedBy = [ "network.target" "sys-subsystem-net-devices-${n}.device" ];
+ bindsTo = deps;
+ after = deps;
+ serviceConfig.Type = "oneshot";
+ serviceConfig.RemainAfterExit = true;
+ path = [ pkgs.bridge_utils pkgs.iproute ];
+ script =
+ ''
+ brctl addbr "${n}"
+
+ # Set bridge's hello time to 0 to avoid startup delays.
+ brctl setfd "${n}" 0
+
+ ${flip concatMapStrings v.interfaces (i: ''
+ brctl addif "${n}" "${i}"
+ ip link set "${i}" up
+ ip addr flush dev "${i}"
+
+ echo "bringing up network device ${n}..."
+ ip link set "${n}" up
+ '')}
+
+ # !!! Should delete (brctl delif) any interfaces that
+ # no longer belong to the bridge.
+ '';
+ postStop =
+ ''
+ ip link set "${n}" down
+ brctl delbr "${n}"
+ '';
+ };
+
+ in listToAttrs (
+ map configureInterface interfaces ++
+ map createTunDevice (filter (i: i.virtual) interfaces))
+ // mapAttrs createBridgeDevice cfg.bridges
+ // { "network-setup" = networkSetup; };
+
+ # Set the host and domain names in the activation script. Don't
+ # clear it if it's not configured in the NixOS configuration,
+ # since it may have been set by dhclient in the meantime.
+ system.activationScripts.hostname =
+ optionalString (config.networking.hostName != "") ''
+ hostname "${config.networking.hostName}"
+ '';
+ system.activationScripts.domain =
+ optionalString (config.networking.domain != "") ''
+ domainname "${config.networking.domain}"
+ '';
+
+ services.udev.extraRules =
+ ''
+ KERNEL=="tun", TAG+="systemd"
+ '';
+
+ };
+
+}
diff --git a/nixos/modules/tasks/scsi-link-power-management.nix b/nixos/modules/tasks/scsi-link-power-management.nix
new file mode 100644
index 0000000000000000000000000000000000000000..4ab67aee395639b7c5b38b613c7f7b3bdf8de7ae
--- /dev/null
+++ b/nixos/modules/tasks/scsi-link-power-management.nix
@@ -0,0 +1,44 @@
+{ config, pkgs, ... }:
+
+with pkgs.lib;
+
+{
+ ###### interface
+
+ options = {
+
+ powerManagement.scsiLinkPolicy = mkOption {
+ default = "";
+ example = "min_power";
+ type = types.uniq types.string;
+ description = ''
+ Configure the SCSI link power management policy. By default,
+ the kernel configures "max_performance".
+ '';
+ };
+
+ };
+
+
+ ###### implementation
+
+ config = mkIf (config.powerManagement.scsiLinkPolicy != "") {
+
+ jobs."scsi-link-pm" =
+ { description = "SCSI Link Power Management Policy";
+
+ startOn = "stopped udevtrigger";
+
+ task = true;
+
+ script = ''
+ shopt -s nullglob
+ for x in /sys/class/scsi_host/host*/link_power_management_policy; do
+ echo ${config.powerManagement.scsiLinkPolicy} > $x
+ done
+ '';
+ };
+
+ };
+
+}
diff --git a/nixos/modules/tasks/swraid.nix b/nixos/modules/tasks/swraid.nix
new file mode 100644
index 0000000000000000000000000000000000000000..3b4aa9875f263c212eaa3677c7dd1bd5ad0d94ce
--- /dev/null
+++ b/nixos/modules/tasks/swraid.nix
@@ -0,0 +1,11 @@
+{ config, pkgs, ... }:
+
+{
+
+ environment.systemPackages = [ pkgs.mdadm ];
+
+ services.udev.packages = [ pkgs.mdadm ];
+
+ boot.initrd.availableKernelModules = [ "md_mod" "raid0" "raid1" "raid456" ];
+
+}
diff --git a/nixos/modules/tasks/tty-backgrounds-combine.sh b/nixos/modules/tasks/tty-backgrounds-combine.sh
new file mode 100644
index 0000000000000000000000000000000000000000..1e0d8758a6ee3d2cef72ebbcc1cb0e80ed594129
--- /dev/null
+++ b/nixos/modules/tasks/tty-backgrounds-combine.sh
@@ -0,0 +1,32 @@
+source $stdenv/setup
+
+ttys=($ttys)
+themes=($themes)
+
+ensureDir $out
+
+defaultName=$(cd $default && ls | grep -v default)
+echo $defaultName
+ln -s $default/$defaultName $out/$defaultName
+ln -s $defaultName $out/default
+
+for ((n = 0; n < ${#ttys[*]}; n++)); do
+ tty=${ttys[$n]}
+ theme=${themes[$n]}
+
+ echo "TTY $tty -> $theme"
+
+ if [ "$theme" != default ]; then
+ themeName=$(cd $theme && ls | grep -v default)
+ ln -sfn $theme/$themeName $out/$themeName
+ else
+ themeName=default
+ fi
+
+ if test -e $out/$tty; then
+ echo "Multiple themes defined for the same TTY!"
+ exit 1
+ fi
+
+ ln -sfn $themeName $out/$tty
+done
diff --git a/nixos/modules/testing/minimal-kernel.nix b/nixos/modules/testing/minimal-kernel.nix
new file mode 100644
index 0000000000000000000000000000000000000000..0418de800c8d3d81d95ee8a79eebbb9835230282
--- /dev/null
+++ b/nixos/modules/testing/minimal-kernel.nix
@@ -0,0 +1,28 @@
+{ config, pkgs, ... }:
+
+let
+ configfile = builtins.storePath (builtins.toFile "config" (pkgs.lib.concatStringsSep "\n"
+ (map (builtins.getAttr "configLine") config.system.requiredKernelConfig))
+ );
+
+ origKernel = pkgs.linuxManualConfig {
+ inherit (pkgs.linux) src version;
+ inherit configfile;
+ allowImportFromDerivation = true;
+ kernelPatches = [ pkgs.kernelPatches.cifs_timeout_2_6_38 ];
+ };
+
+ kernel = origKernel // (derivation (origKernel.drvAttrs // {
+ configurePhase = ''
+ runHook preConfigure
+ mkdir ../build
+ make $makeFlags "''${makeFlagsArray[@]}" mrproper
+ make $makeFlags "''${makeFlagsArray[@]}" KCONFIG_ALLCONFIG=${configfile} allnoconfig
+ runHook postConfigure
+ '';
+ }));
+
+ kernelPackages = pkgs.linuxPackagesFor kernel;
+in {
+ boot.kernelPackages = kernelPackages;
+}
diff --git a/nixos/modules/testing/test-instrumentation.nix b/nixos/modules/testing/test-instrumentation.nix
new file mode 100644
index 0000000000000000000000000000000000000000..28494e1c7b2a8d16e7d3c25135486208a876b0e7
--- /dev/null
+++ b/nixos/modules/testing/test-instrumentation.nix
@@ -0,0 +1,91 @@
+# This module allows the test driver to connect to the virtual machine
+# via a root shell attached to port 514.
+
+{ config, pkgs, ... }:
+
+with pkgs.lib;
+
+let kernel = config.boot.kernelPackages.kernel; in
+
+{
+
+ config = {
+
+ systemd.services.backdoor =
+ { wantedBy = [ "multi-user.target" ];
+ requires = [ "dev-hvc0.device" "dev-ttyS0.device" ];
+ after = [ "dev-hvc0.device" "dev-ttyS0.device" ];
+ script =
+ ''
+ export USER=root
+ export HOME=/root
+ export DISPLAY=:0.0
+ source /etc/profile
+ cd /tmp
+ exec < /dev/hvc0 > /dev/hvc0
+ while ! exec 2> /dev/ttyS0; do sleep 0.1; done
+ echo "connecting to host..." >&2
+ stty -F /dev/hvc0 raw -echo # prevent nl -> cr/nl conversion
+ echo
+ PS1= exec /bin/sh
+ '';
+ serviceConfig.KillSignal = "SIGHUP";
+ };
+
+ # Prevent agetty from being instantiated on ttyS0, since it
+ # interferes with the backdoor (writes to ttyS0 will randomly fail
+ # with EIO). Likewise for hvc0.
+ systemd.services."serial-getty@ttyS0".enable = false;
+ systemd.services."serial-getty@hvc0".enable = false;
+
+ boot.initrd.postDeviceCommands =
+ ''
+ # Using acpi_pm as a clock source causes the guest clock to
+ # slow down under high host load. This is usually a bad
+ # thing, but for VM tests it should provide a bit more
+ # determinism (e.g. if the VM runs at lower speed, then
+ # timeouts in the VM should also be delayed).
+ echo acpi_pm > /sys/devices/system/clocksource/clocksource0/current_clocksource
+ '';
+
+ boot.postBootCommands =
+ ''
+ # Panic on out-of-memory conditions rather than letting the
+ # OOM killer randomly get rid of processes, since this leads
+ # to failures that are hard to diagnose.
+ echo 2 > /proc/sys/vm/panic_on_oom
+
+ # Coverage data is written into /tmp/coverage-data.
+ mkdir -p /tmp/xchg/coverage-data
+ '';
+
+ # If the kernel has been built with coverage instrumentation, make
+ # it available under /proc/gcov.
+ boot.kernelModules = [ "gcov-proc" ];
+
+ # Panic if an error occurs in stage 1 (rather than waiting for
+ # user intervention).
+ boot.kernelParams =
+ [ "console=tty1" "console=ttyS0" "panic=1" "boot.panic_on_fail" ];
+
+ # `xwininfo' is used by the test driver to query open windows.
+ environment.systemPackages = [ pkgs.xorg.xwininfo ];
+
+ # Log everything to the serial console.
+ services.journald.console = "/dev/console";
+
+ # Prevent tests from accessing the Internet.
+ networking.defaultGateway = mkOverride 150 "";
+ networking.nameservers = mkOverride 150 [ ];
+
+ systemd.globalEnvironment.GCOV_PREFIX = "/tmp/xchg/coverage-data";
+
+ system.requiredKernelConfig = with config.lib.kernelConfig; [
+ (isYes "SERIAL_8250_CONSOLE")
+ (isYes "SERIAL_8250")
+ (isEnabled "VIRTIO_CONSOLE")
+ ];
+
+ };
+
+}
diff --git a/nixos/modules/virtualisation/amazon-config.nix b/nixos/modules/virtualisation/amazon-config.nix
new file mode 100644
index 0000000000000000000000000000000000000000..e816ed2d183aa14bd58de5f491af2c53a2613a18
--- /dev/null
+++ b/nixos/modules/virtualisation/amazon-config.nix
@@ -0,0 +1,5 @@
+{ config, pkgs, modulesPath, ... }:
+
+{
+ imports = [ "${modulesPath}/virtualisation/amazon-image.nix" ];
+}
diff --git a/nixos/modules/virtualisation/amazon-image.nix b/nixos/modules/virtualisation/amazon-image.nix
new file mode 100644
index 0000000000000000000000000000000000000000..7e04f0d29114e0811510c0f66ad6a949c22dfa19
--- /dev/null
+++ b/nixos/modules/virtualisation/amazon-image.nix
@@ -0,0 +1,163 @@
+{ config, pkgs, ... }:
+
+with pkgs.lib;
+
+{
+ imports = [ ../profiles/headless.nix ./ec2-data.nix ];
+
+ system.build.amazonImage =
+ pkgs.vmTools.runInLinuxVM (
+ pkgs.runCommand "amazon-image"
+ { preVM =
+ ''
+ mkdir $out
+ diskImage=$out/nixos.img
+ ${pkgs.vmTools.qemu}/bin/qemu-img create -f raw $diskImage "4G"
+ mv closure xchg/
+ '';
+ buildInputs = [ pkgs.utillinux pkgs.perl ];
+ exportReferencesGraph =
+ [ "closure" config.system.build.toplevel ];
+ }
+ ''
+ # Create an empty filesystem and mount it.
+ ${pkgs.e2fsprogs}/sbin/mkfs.ext4 -L nixos /dev/vda
+ ${pkgs.e2fsprogs}/sbin/tune2fs -c 0 -i 0 /dev/vda
+ mkdir /mnt
+ mount /dev/vda /mnt
+
+ # The initrd expects these directories to exist.
+ mkdir /mnt/dev /mnt/proc /mnt/sys
+
+ mount -o bind /proc /mnt/proc
+
+ # Copy all paths in the closure to the filesystem.
+ storePaths=$(perl ${pkgs.pathsFromGraph} /tmp/xchg/closure)
+
+ mkdir -p /mnt/nix/store
+ echo "copying everything (will take a while)..."
+ cp -prd $storePaths /mnt/nix/store/
+
+ # Register the paths in the Nix database.
+ printRegistration=1 perl ${pkgs.pathsFromGraph} /tmp/xchg/closure | \
+ chroot /mnt ${config.environment.nix}/bin/nix-store --load-db
+
+ # Create the system profile to allow nixos-rebuild to work.
+ chroot /mnt ${config.environment.nix}/bin/nix-env \
+ -p /nix/var/nix/profiles/system --set ${config.system.build.toplevel}
+
+ # `nixos-rebuild' requires an /etc/NIXOS.
+ mkdir -p /mnt/etc
+ touch /mnt/etc/NIXOS
+
+ # `switch-to-configuration' requires a /bin/sh
+ mkdir -p /mnt/bin
+ ln -s ${config.system.build.binsh}/bin/sh /mnt/bin/sh
+
+ # Install a configuration.nix.
+ mkdir -p /mnt/etc/nixos
+ cp ${./amazon-config.nix} /mnt/etc/nixos/configuration.nix
+
+ # Generate the GRUB menu.
+ chroot /mnt ${config.system.build.toplevel}/bin/switch-to-configuration boot
+
+ umount /mnt/proc
+ umount /mnt
+ ''
+ );
+
+ fileSystems."/".device = "/dev/disk/by-label/nixos";
+
+ boot.initrd.kernelModules = [ "xen-blkfront" ];
+ boot.kernelModules = [ "xen-netfront" ];
+
+ # Generate a GRUB menu. Amazon's pv-grub uses this to boot our kernel/initrd.
+ boot.loader.grub.version = 1;
+ boot.loader.grub.device = "nodev";
+ boot.loader.grub.timeout = 0;
+ boot.loader.grub.extraPerEntryConfig = "root (hd0)";
+
+ boot.initrd.postDeviceCommands =
+ ''
+ # Force udev to exit to prevent random "Device or resource busy
+ # while trying to open /dev/xvda" errors from fsck.
+ udevadm control --exit || true
+ kill -9 -1
+ '';
+
+ # Mount all formatted ephemeral disks and activate all swap devices.
+ # We cannot do this with the ‘fileSystems’ and ‘swapDevices’ options
+ # because the set of devices is dependent on the instance type
+ # (e.g. "m1.large" has one ephemeral filesystem and one swap device,
+ # while "m1.large" has two ephemeral filesystems and no swap
+ # devices). Also, put /tmp and /var on /disk0, since it has a lot
+ # more space than the root device. Similarly, "move" /nix to /disk0
+ # by layering a unionfs-fuse mount on top of it so we have a lot more space for
+ # Nix operations.
+ boot.initrd.postMountCommands =
+ ''
+ diskNr=0
+ diskForUnionfs=
+ for device in /dev/xvd[abcde]*; do
+ if [ "$device" = /dev/xvda -o "$device" = /dev/xvda1 ]; then continue; fi
+ fsType=$(blkid -o value -s TYPE "$device" || true)
+ if [ "$fsType" = swap ]; then
+ echo "activating swap device $device..."
+ swapon "$device" || true
+ elif [ "$fsType" = ext3 ]; then
+ mp="/disk$diskNr"
+ diskNr=$((diskNr + 1))
+ echo "mounting $device on $mp..."
+ if mountFS "$device" "$mp" "" ext3; then
+ if [ -z "$diskForUnionfs" ]; then diskForUnionfs="$mp"; fi
+ fi
+ else
+ echo "skipping unknown device type $device"
+ fi
+ done
+
+ if [ -n "$diskForUnionfs" ]; then
+ mkdir -m 755 -p $targetRoot/$diskForUnionfs/root
+
+ mkdir -m 1777 -p $targetRoot/$diskForUnionfs/root/tmp $targetRoot/tmp
+ mount --bind $targetRoot/$diskForUnionfs/root/tmp $targetRoot/tmp
+
+ if [ ! -e $targetRoot/.ebs ]; then
+ mkdir -m 755 -p $targetRoot/$diskForUnionfs/root/var $targetRoot/var
+ mount --bind $targetRoot/$diskForUnionfs/root/var $targetRoot/var
+
+ mkdir -p /unionfs-chroot/ro-nix
+ mount --rbind $targetRoot/nix /unionfs-chroot/ro-nix
+
+ mkdir -m 755 -p $targetRoot/$diskForUnionfs/root/nix
+ mkdir -p /unionfs-chroot/rw-nix
+ mount --rbind $targetRoot/$diskForUnionfs/root/nix /unionfs-chroot/rw-nix
+
+ unionfs -o allow_other,cow,nonempty,chroot=/unionfs-chroot,max_files=32768 /rw-nix=RW:/ro-nix=RO $targetRoot/nix
+ fi
+ fi
+ '';
+
+ boot.initrd.extraUtilsCommands =
+ ''
+ # We need swapon in the initrd.
+ cp ${pkgs.utillinux}/sbin/swapon $out/bin
+ '';
+
+ # Don't put old configurations in the GRUB menu. The user has no
+ # way to select them anyway.
+ boot.loader.grub.configurationLimit = 0;
+
+ # Allow root logins only using the SSH key that the user specified
+ # at instance creation time.
+ services.openssh.enable = true;
+ services.openssh.permitRootLogin = "without-password";
+
+ # Force getting the hostname from EC2.
+ networking.hostName = mkDefault "";
+
+ # Always include cryptsetup so that Charon can use it.
+ environment.systemPackages = [ pkgs.cryptsetup ];
+
+ boot.initrd.supportedFilesystems = [ "unionfs-fuse" ];
+}
diff --git a/nixos/modules/virtualisation/ec2-data.nix b/nixos/modules/virtualisation/ec2-data.nix
new file mode 100644
index 0000000000000000000000000000000000000000..fccf45e0e193bac8816a5177f29510b5cd29d715
--- /dev/null
+++ b/nixos/modules/virtualisation/ec2-data.nix
@@ -0,0 +1,99 @@
+# This module defines an Upstart job that obtains the SSH key and host
+# name of virtual machines running on Amazon EC2, Eucalyptus and
+# OpenStack Compute (Nova).
+
+{ config, pkgs, ... }:
+
+with pkgs.lib;
+
+{
+ options = {
+ ec2.metadata = mkOption {
+ type = types.bool;
+ default = false;
+ description = ''
+ Whether to allow access to EC2 metadata.
+ '';
+ };
+ };
+
+ config = {
+
+ systemd.services."fetch-ec2-data" =
+ { description = "Fetch EC2 Data";
+
+ wantedBy = [ "multi-user.target" ];
+ before = [ "sshd.service" ];
+ after = [ "network.target" ];
+
+ path = [ pkgs.curl pkgs.iproute ];
+
+ script =
+ ''
+ ip route del blackhole 169.254.169.254/32 || true
+
+ curl="curl --retry 3 --retry-delay 0 --fail"
+
+ echo "setting host name..."
+ ${optionalString (config.networking.hostName == "") ''
+ ${pkgs.nettools}/bin/hostname $($curl http://169.254.169.254/1.0/meta-data/hostname)
+ ''}
+
+ # Don't download the SSH key if it has already been injected
+ # into the image (a Nova feature).
+ if ! [ -e /root/.ssh/authorized_keys ]; then
+ echo "obtaining SSH key..."
+ mkdir -p /root/.ssh
+ $curl -o /root/key.pub http://169.254.169.254/1.0/meta-data/public-keys/0/openssh-key
+ if [ $? -eq 0 -a -e /root/key.pub ]; then
+ if ! grep -q -f /root/key.pub /root/.ssh/authorized_keys; then
+ cat /root/key.pub >> /root/.ssh/authorized_keys
+ echo "new key added to authorized_keys"
+ fi
+ chmod 600 /root/.ssh/authorized_keys
+ rm -f /root/key.pub
+ fi
+ fi
+
+ # Extract the intended SSH host key for this machine from
+ # the supplied user data, if available. Otherwise sshd will
+ # generate one normally.
+ $curl http://169.254.169.254/2011-01-01/user-data > /root/user-data || true
+ key="$(sed 's/|/\n/g; s/SSH_HOST_DSA_KEY://; t; d' /root/user-data)"
+ key_pub="$(sed 's/SSH_HOST_DSA_KEY_PUB://; t; d' /root/user-data)"
+ if [ -n "$key" -a -n "$key_pub" -a ! -e /etc/ssh/ssh_host_dsa_key ]; then
+ mkdir -m 0755 -p /etc/ssh
+ (umask 077; echo "$key" > /etc/ssh/ssh_host_dsa_key)
+ echo "$key_pub" > /etc/ssh/ssh_host_dsa_key.pub
+ fi
+
+ ${optionalString (! config.ec2.metadata) ''
+ # Since the user data is sensitive, prevent it from being
+ # accessed from now on.
+ ip route add blackhole 169.254.169.254/32
+ ''}
+ '';
+
+ serviceConfig.Type = "oneshot";
+ serviceConfig.RemainAfterExit = true;
+ };
+
+ systemd.services."print-host-key" =
+ { description = "Print SSH Host Key";
+ wantedBy = [ "multi-user.target" ];
+ after = [ "sshd.service" ];
+ script =
+ ''
+ # Print the host public key on the console so that the user
+ # can obtain it securely by parsing the output of
+ # ec2-get-console-output.
+ echo "-----BEGIN SSH HOST KEY FINGERPRINTS-----" > /dev/console
+ ${pkgs.openssh}/bin/ssh-keygen -l -f /etc/ssh/ssh_host_dsa_key.pub > /dev/console
+ echo "-----END SSH HOST KEY FINGERPRINTS-----" > /dev/console
+ '';
+ serviceConfig.Type = "oneshot";
+ serviceConfig.RemainAfterExit = true;
+ };
+
+ };
+}
diff --git a/nixos/modules/virtualisation/libvirtd.nix b/nixos/modules/virtualisation/libvirtd.nix
new file mode 100644
index 0000000000000000000000000000000000000000..52dab153094dd660ee642d50ec90a2a4e6ab196a
--- /dev/null
+++ b/nixos/modules/virtualisation/libvirtd.nix
@@ -0,0 +1,148 @@
+# Upstart jobs for libvirtd.
+
+{ config, pkgs, ... }:
+
+with pkgs.lib;
+
+let
+
+ cfg = config.virtualisation.libvirtd;
+ configFile = pkgs.writeText "libvirtd.conf" ''
+ unix_sock_group = "libvirtd"
+ unix_sock_rw_perms = "0770"
+ auth_unix_ro = "none"
+ auth_unix_rw = "none"
+ ${cfg.extraConfig}
+ '';
+
+in
+
+{
+ ###### interface
+
+ options = {
+
+ virtualisation.libvirtd.enable =
+ mkOption {
+ default = false;
+ description =
+ ''
+ This option enables libvirtd, a daemon that manages
+ virtual machines. Users in the "libvirtd" group can interact with
+ the daemon (e.g. to start or stop VMs) using the
+ virsh command line tool, among others.
+ '';
+ };
+
+ virtualisation.libvirtd.enableKVM =
+ mkOption {
+ default = true;
+ description =
+ ''
+ This option enables support for QEMU/KVM in libvirtd.
+ '';
+ };
+
+ virtualisation.libvirtd.extraConfig =
+ mkOption {
+ default = "";
+ description =
+ ''
+ Extra contents appended to the libvirtd configuration file,
+ libvirtd.conf.
+ '';
+ };
+
+ };
+
+
+ ###### implementation
+
+ config = mkIf cfg.enable {
+
+ environment.systemPackages =
+ [ pkgs.libvirt ]
+ ++ optional cfg.enableKVM pkgs.qemu_kvm;
+
+ boot.kernelModules = [ "tun" ];
+
+ systemd.services.libvirtd =
+ { description = "Libvirt Virtual Machine Management Daemon";
+
+ wantedBy = [ "multi-user.target" ];
+ after = [ "systemd-udev-settle.service" ];
+
+ path =
+ [ pkgs.bridge_utils pkgs.dmidecode pkgs.dnsmasq
+ pkgs.ebtables
+ ] ++ optional cfg.enableKVM pkgs.qemu_kvm;
+
+ preStart =
+ ''
+ mkdir -p /var/log/libvirt/qemu -m 755
+ rm -f /var/run/libvirtd.pid
+
+ mkdir -p /var/lib/libvirt -m 700
+ mkdir -p /var/lib/libvirt/dnsmasq -m 700
+
+ # Libvirt unfortunately writes mutable state (such as
+ # runtime changes to VM, network or filter configurations)
+ # to /etc. So we can't use environment.etc to make the
+ # default network and filter definitions available, since
+ # libvirt will then modify the originals in the Nix store.
+ # So here we copy them instead. Ugly.
+ for i in $(cd ${pkgs.libvirt}/etc && echo \
+ libvirt/qemu/networks/*.xml libvirt/qemu/networks/autostart/*.xml \
+ libvirt/nwfilter/*.xml );
+ do
+ mkdir -p /etc/$(dirname $i) -m 755
+ cp -fpd ${pkgs.libvirt}/etc/$i /etc/$i
+ done
+ ''; # */
+
+ serviceConfig.ExecStart = ''@${pkgs.libvirt}/sbin/libvirtd libvirtd --config "${configFile}" --daemon --verbose'';
+ serviceConfig.Type = "forking";
+ serviceConfig.KillMode = "process"; # when stopping, leave the VMs alone
+
+ # Wait until libvirtd is ready to accept requests.
+ postStart =
+ ''
+ for ((i = 0; i < 60; i++)); do
+ if ${pkgs.libvirt}/bin/virsh list > /dev/null; then exit 0; fi
+ sleep 1
+ done
+ exit 1 # !!! seems to be ignored
+ '';
+ };
+
+ jobs."libvirt-guests" =
+ { description = "Libvirt Virtual Machines";
+
+ wantedBy = [ "multi-user.target" ];
+ wants = [ "libvirtd.service" ];
+ after = [ "libvirtd.service" ];
+
+ # We want to suspend VMs only on shutdown, but Upstart is broken.
+ #stopOn = "";
+
+ restartIfChanged = false;
+
+ path = [ pkgs.gettext pkgs.libvirt pkgs.gawk ];
+
+ preStart =
+ ''
+ mkdir -p /var/lock/subsys -m 755
+ ${pkgs.libvirt}/etc/rc.d/init.d/libvirt-guests start || true
+ '';
+
+ postStop = "${pkgs.libvirt}/etc/rc.d/init.d/libvirt-guests stop";
+
+ serviceConfig.Type = "oneshot";
+ serviceConfig.RemainAfterExit = true;
+ };
+
+ users.extraGroups.libvirtd.gid = config.ids.gids.libvirtd;
+
+ };
+
+}
diff --git a/nixos/modules/virtualisation/nova-config.nix b/nixos/modules/virtualisation/nova-config.nix
new file mode 100644
index 0000000000000000000000000000000000000000..f8239cdec51997097ee54dcfdbeb06c7c5b5617c
--- /dev/null
+++ b/nixos/modules/virtualisation/nova-config.nix
@@ -0,0 +1,5 @@
+{ config, pkgs, modulesPath, ... }:
+
+{
+ imports = [ "${modulesPath}/virtualisation/nova-image.nix" ];
+}
diff --git a/nixos/modules/virtualisation/nova-image.nix b/nixos/modules/virtualisation/nova-image.nix
new file mode 100644
index 0000000000000000000000000000000000000000..ab625dba11d36cd13755140f241192a977f6850b
--- /dev/null
+++ b/nixos/modules/virtualisation/nova-image.nix
@@ -0,0 +1,115 @@
+{ config, pkgs, ... }:
+
+with pkgs.lib;
+
+{
+ imports = [ ../profiles/qemu-guest.nix ../profiles/headless.nix ./ec2-data.nix ];
+
+ system.build.novaImage =
+ pkgs.vmTools.runInLinuxVM (
+ pkgs.runCommand "nova-image"
+ { preVM =
+ ''
+ mkdir $out
+ diskImage=$out/image
+ ${pkgs.vmTools.qemu}/bin/qemu-img create -f raw $diskImage "4G"
+ mv closure xchg/
+ '';
+ buildInputs = [ pkgs.utillinux pkgs.perl ];
+ exportReferencesGraph =
+ [ "closure" config.system.build.toplevel ];
+ }
+ ''
+ # Create a single / partition.
+ ${pkgs.parted}/sbin/parted /dev/vda mklabel msdos
+ ${pkgs.parted}/sbin/parted /dev/vda -- mkpart primary ext2 1M -1s
+ . /sys/class/block/vda1/uevent
+ mknod /dev/vda1 b $MAJOR $MINOR
+
+ # Create an empty filesystem and mount it.
+ ${pkgs.e2fsprogs}/sbin/mkfs.ext3 -L nixos /dev/vda1
+ ${pkgs.e2fsprogs}/sbin/tune2fs -c 0 -i 0 /dev/vda1
+ mkdir /mnt
+ mount /dev/vda1 /mnt
+
+ # The initrd expects these directories to exist.
+ mkdir /mnt/dev /mnt/proc /mnt/sys
+ mount --bind /proc /mnt/proc
+ mount --bind /dev /mnt/dev
+ mount --bind /sys /mnt/sys
+
+ # Copy all paths in the closure to the filesystem.
+ storePaths=$(perl ${pkgs.pathsFromGraph} /tmp/xchg/closure)
+
+ mkdir -p /mnt/nix/store
+ ${pkgs.rsync}/bin/rsync -av $storePaths /mnt/nix/store/
+
+ # Register the paths in the Nix database.
+ printRegistration=1 perl ${pkgs.pathsFromGraph} /tmp/xchg/closure | \
+ chroot /mnt ${config.environment.nix}/bin/nix-store --load-db
+
+ # Create the system profile to allow nixos-rebuild to work.
+ chroot /mnt ${config.environment.nix}/bin/nix-env \
+ -p /nix/var/nix/profiles/system --set ${config.system.build.toplevel}
+
+ # `nixos-rebuild' requires an /etc/NIXOS.
+ mkdir -p /mnt/etc
+ touch /mnt/etc/NIXOS
+
+ # Install a configuration.nix.
+ mkdir -p /mnt/etc/nixos
+ cp ${./nova-config.nix} /mnt/etc/nixos/configuration.nix
+
+ # Generate the GRUB menu.
+ chroot /mnt ${config.system.build.toplevel}/bin/switch-to-configuration boot
+
+ umount /mnt/proc /mnt/dev /mnt/sys
+ umount /mnt
+ ''
+ );
+
+ fileSystems."/".device = "/dev/disk/by-label/nixos";
+
+ boot.kernelParams = [ "console=ttyS0" ];
+
+ boot.loader.grub.version = 2;
+ boot.loader.grub.device = "/dev/vda";
+ boot.loader.grub.timeout = 0;
+
+ # Put /tmp and /var on /ephemeral0, which has a lot more space.
+ # Unfortunately we can't do this with the `fileSystems' option
+ # because it has no support for creating the source of a bind
+ # mount. Also, "move" /nix to /ephemeral0 by layering a unionfs-fuse
+ # mount on top of it so we have a lot more space for Nix operations.
+ /*
+ boot.initrd.postMountCommands =
+ ''
+ mkdir -m 1777 -p $targetRoot/ephemeral0/tmp
+ mkdir -m 1777 -p $targetRoot/tmp
+ mount --bind $targetRoot/ephemeral0/tmp $targetRoot/tmp
+
+ mkdir -m 755 -p $targetRoot/ephemeral0/var
+ mkdir -m 755 -p $targetRoot/var
+ mount --bind $targetRoot/ephemeral0/var $targetRoot/var
+
+ mkdir -p /unionfs-chroot/ro-nix
+ mount --rbind $targetRoot/nix /unionfs-chroot/ro-nix
+
+ mkdir -p /unionfs-chroot/rw-nix
+ mkdir -m 755 -p $targetRoot/ephemeral0/nix
+ mount --rbind $targetRoot/ephemeral0/nix /unionfs-chroot/rw-nix
+ unionfs -o allow_other,cow,nonempty,chroot=/unionfs-chroot,max_files=32768 /rw-nix=RW:/ro-nix=RO $targetRoot/nix
+ '';
+
+ boot.initrd.supportedFilesystems = [ "unionfs-fuse" ];
+ */
+
+ # Since Nova allows VNC access to instances, it's nice to start to
+ # start a few virtual consoles.
+ services.mingetty.ttys = [ "tty1" "tty2" ];
+
+ # Allow root logins only using the SSH key that the user specified
+ # at instance creation time.
+ services.openssh.enable = true;
+ services.openssh.permitRootLogin = "without-password";
+}
diff --git a/nixos/modules/virtualisation/nova.nix b/nixos/modules/virtualisation/nova.nix
new file mode 100644
index 0000000000000000000000000000000000000000..05c68e2bbff9770ea24a13ed569be73f5db49780
--- /dev/null
+++ b/nixos/modules/virtualisation/nova.nix
@@ -0,0 +1,174 @@
+# Module for Nova, a.k.a. OpenStack Compute.
+
+{ config, pkgs, ... }:
+
+with pkgs.lib;
+
+let
+
+ cfg = config.virtualisation.nova;
+
+ nova = pkgs.nova;
+
+ novaConf = pkgs.writeText "nova.conf"
+ ''
+ --nodaemon
+ --verbose
+ ${cfg.extraConfig}
+ '';
+
+in
+
+{
+
+ ###### interface
+
+ options = {
+
+ virtualisation.nova.enableSingleNode =
+ mkOption {
+ default = false;
+ description =
+ ''
+ This option enables Nova, also known as OpenStack Compute,
+ a cloud computing system, as a single-machine
+ installation. That is, all of Nova's components are
+ enabled on this machine, using SQLite as Nova's database.
+ This is useful for evaluating and experimenting with Nova.
+ However, for a real cloud computing environment, you'll
+ want to enable some of Nova's services on other machines,
+ and use a database such as MySQL.
+ '';
+ };
+
+ virtualisation.nova.extraConfig =
+ mkOption {
+ default = "";
+ description =
+ ''
+ Additional text appended to nova.conf,
+ the main Nova configuration file.
+ '';
+ };
+
+ };
+
+
+ ###### implementation
+
+ config = mkIf cfg.enableSingleNode {
+
+ environment.systemPackages = [ nova pkgs.euca2ools pkgs.novaclient ];
+
+ environment.etc =
+ [ { source = novaConf;
+ target = "nova/nova.conf";
+ }
+ ];
+
+ # Nova requires libvirtd and RabbitMQ.
+ virtualisation.libvirtd.enable = true;
+ services.rabbitmq.enable = true;
+
+ # `qemu-nbd' required the `nbd' kernel module.
+ boot.kernelModules = [ "nbd" ];
+
+ system.activationScripts.nova =
+ ''
+ mkdir -m 755 -p /var/lib/nova
+ mkdir -m 755 -p /var/lib/nova/networks
+ mkdir -m 700 -p /var/lib/nova/instances
+ mkdir -m 700 -p /var/lib/nova/keys
+
+ # Allow the CA certificate generation script (called by
+ # nova-api) to work.
+ mkdir -m 700 -p /var/lib/nova/CA /var/lib/nova/CA/private
+
+ # Initialise the SQLite database.
+ ${nova}/bin/nova-manage db sync
+ '';
+
+ # `nova-api' receives and executes external client requests from
+ # tools such as euca2ools. It listens on port 8773 (XML) and 8774
+ # (JSON).
+ jobs.nova_api =
+ { name = "nova-api";
+
+ description = "Nova API service";
+
+ startOn = "ip-up";
+
+ # `openssl' is required to generate the CA. `openssh' is
+ # required to generate key pairs.
+ path = [ pkgs.openssl pkgs.openssh pkgs.bash ];
+
+ respawn = false;
+
+ exec = "${nova}/bin/nova-api --flagfile=${novaConf} --api_paste_config=${nova}/etc/nova/api-paste.ini";
+ };
+
+ # `nova-objectstore' is a simple image server. Useful if you're
+ # not running the OpenStack Imaging Service (Swift). It serves
+ # images placed in /var/lib/nova/images/.
+ jobs.nova_objectstore =
+ { name = "nova-objectstore";
+
+ description = "Nova simple object store service";
+
+ startOn = "ip-up";
+
+ preStart =
+ ''
+ mkdir -m 700 -p /var/lib/nova/images
+ '';
+
+ exec = "${nova}/bin/nova-objectstore --flagfile=${novaConf}";
+ };
+
+ # `nova-scheduler' schedules VM execution requests.
+ jobs.nova_scheduler =
+ { name = "nova-scheduler";
+
+ description = "Nova scheduler service";
+
+ startOn = "ip-up";
+
+ exec = "${nova}/bin/nova-scheduler --flagfile=${novaConf}";
+ };
+
+ # `nova-compute' starts and manages virtual machines.
+ jobs.nova_compute =
+ { name = "nova-compute";
+
+ description = "Nova compute service";
+
+ startOn = "ip-up";
+
+ path =
+ [ pkgs.sudo pkgs.vlan pkgs.nettools pkgs.iptables pkgs.qemu_kvm
+ pkgs.e2fsprogs pkgs.utillinux pkgs.multipath_tools pkgs.iproute
+ pkgs.bridge_utils
+ ];
+
+ exec = "${nova}/bin/nova-compute --flagfile=${novaConf}";
+ };
+
+ # `nova-network' manages networks and allocates IP addresses.
+ jobs.nova_network =
+ { name = "nova-network";
+
+ description = "Nova network service";
+
+ startOn = "ip-up";
+
+ path =
+ [ pkgs.sudo pkgs.vlan pkgs.dnsmasq pkgs.nettools pkgs.iptables
+ pkgs.iproute pkgs.bridge_utils pkgs.radvd
+ ];
+
+ exec = "${nova}/bin/nova-network --flagfile=${novaConf}";
+ };
+
+ };
+
+}
diff --git a/nixos/modules/virtualisation/qemu-opts b/nixos/modules/virtualisation/qemu-opts
new file mode 100644
index 0000000000000000000000000000000000000000..f06a5136608ae1d81d4e57a34aab9fc3484375bd
--- /dev/null
+++ b/nixos/modules/virtualisation/qemu-opts
@@ -0,0 +1,4 @@
+ -device virtio-serial \
+ -chardev socket,id=charconsole0,path=/tmp/nixos-socket,server,nowait \
+ #-device virtconsole,chardev=charconsole0,id=console0 \
+ -device virtserialport,chardev=chardev=charconsole0,id=serial0
diff --git a/nixos/modules/virtualisation/qemu-vm.nix b/nixos/modules/virtualisation/qemu-vm.nix
new file mode 100644
index 0000000000000000000000000000000000000000..708b462e0e5da2b9de49a463422035854ac5d6ab
--- /dev/null
+++ b/nixos/modules/virtualisation/qemu-vm.nix
@@ -0,0 +1,420 @@
+# This module creates a virtual machine from the NixOS configuration.
+# Building the `config.system.build.vm' attribute gives you a command
+# that starts a KVM/QEMU VM running the NixOS configuration defined in
+# `config'. The Nix store is shared read-only with the host, which
+# makes (re)building VMs very efficient. However, it also means you
+# can't reconfigure the guest inside the guest - you need to rebuild
+# the VM in the host. On the other hand, the root filesystem is a
+# read/writable disk image persistent across VM reboots.
+
+{ config, pkgs, ... }:
+
+with pkgs.lib;
+
+let
+
+ vmName =
+ if config.networking.hostName == ""
+ then "noname"
+ else config.networking.hostName;
+
+ cfg = config.virtualisation;
+
+ qemuGraphics = if cfg.graphics then "" else "-nographic";
+ kernelConsole = if cfg.graphics then "" else "console=ttyS0";
+ ttys = [ "tty1" "tty2" "tty3" "tty4" "tty5" "tty6" ];
+
+ # Shell script to start the VM.
+ startVM =
+ ''
+ #! ${pkgs.stdenv.shell}
+
+ NIX_DISK_IMAGE=$(readlink -f ''${NIX_DISK_IMAGE:-${config.virtualisation.diskImage}})
+
+ if ! test -e "$NIX_DISK_IMAGE"; then
+ ${pkgs.qemu_kvm}/bin/qemu-img create -f qcow2 "$NIX_DISK_IMAGE" \
+ ${toString config.virtualisation.diskSize}M || exit 1
+ fi
+
+ # Create a directory for exchanging data with the VM.
+ if [ -z "$TMPDIR" -o -z "$USE_TMPDIR" ]; then
+ TMPDIR=$(mktemp -d nix-vm.XXXXXXXXXX --tmpdir)
+ fi
+ cd $TMPDIR
+ mkdir -p $TMPDIR/xchg
+
+ idx=2
+ extraDisks=""
+ ${flip concatMapStrings cfg.emptyDiskImages (size: ''
+ ${pkgs.qemu_kvm}/bin/qemu-img create -f raw "empty$idx" "${toString size}M"
+ extraDisks="$extraDisks -drive index=$idx,file=$(pwd)/empty$idx,if=virtio,werror=report"
+ idx=$((idx + 1))
+ '')}
+
+ # Start QEMU.
+ # "-boot menu=on" is there, because I don't know how to make qemu boot from 2nd hd.
+ exec ${pkgs.qemu_kvm}/bin/qemu-kvm \
+ -name ${vmName} \
+ -m ${toString config.virtualisation.memorySize} \
+ ${optionalString (pkgs.stdenv.system == "x86_64-linux") "-cpu kvm64"} \
+ -net nic,vlan=0,model=virtio \
+ -net user,vlan=0''${QEMU_NET_OPTS:+,$QEMU_NET_OPTS} \
+ -virtfs local,path=/nix/store,security_model=none,mount_tag=store \
+ -virtfs local,path=$TMPDIR/xchg,security_model=none,mount_tag=xchg \
+ -virtfs local,path=''${SHARED_DIR:-$TMPDIR/xchg},security_model=none,mount_tag=shared \
+ ${if cfg.useBootLoader then ''
+ -drive index=0,id=drive1,file=$NIX_DISK_IMAGE,if=virtio,cache=writeback,werror=report \
+ -drive index=1,id=drive2,file=${bootDisk}/disk.img,if=virtio,readonly \
+ -boot menu=on
+ '' else ''
+ -drive file=$NIX_DISK_IMAGE,if=virtio,cache=writeback,werror=report \
+ -kernel ${config.system.build.toplevel}/kernel \
+ -initrd ${config.system.build.toplevel}/initrd \
+ -append "$(cat ${config.system.build.toplevel}/kernel-params) init=${config.system.build.toplevel}/init regInfo=${regInfo} ${kernelConsole} $QEMU_KERNEL_PARAMS" \
+ ''} \
+ $extraDisks \
+ ${qemuGraphics} \
+ ${toString config.virtualisation.qemu.options} \
+ $QEMU_OPTS
+ '';
+
+
+ regInfo = pkgs.runCommand "reginfo"
+ { exportReferencesGraph =
+ map (x: [("closure-" + baseNameOf x) x]) config.virtualisation.pathsInNixDB;
+ buildInputs = [ pkgs.perl ];
+ preferLocalBuild = true;
+ }
+ ''
+ printRegistration=1 perl ${pkgs.pathsFromGraph} closure-* > $out
+ '';
+
+
+ # Generate a hard disk image containing a /boot partition and GRUB
+ # in the MBR. Used when the `useBootLoader' option is set.
+ bootDisk =
+ pkgs.vmTools.runInLinuxVM (
+ pkgs.runCommand "nixos-boot-disk"
+ { preVM =
+ ''
+ mkdir $out
+ diskImage=$out/disk.img
+ ${pkgs.qemu_kvm}/bin/qemu-img create -f qcow2 $diskImage "32M"
+ '';
+ buildInputs = [ pkgs.utillinux ];
+ }
+ ''
+ # Create a single /boot partition.
+ ${pkgs.parted}/sbin/parted /dev/vda mklabel msdos
+ ${pkgs.parted}/sbin/parted /dev/vda -- mkpart primary ext2 1M -1s
+ . /sys/class/block/vda1/uevent
+ mknod /dev/vda1 b $MAJOR $MINOR
+ . /sys/class/block/vda/uevent
+ ${pkgs.e2fsprogs}/sbin/mkfs.ext4 -L boot /dev/vda1
+ ${pkgs.e2fsprogs}/sbin/tune2fs -c 0 -i 0 /dev/vda1
+
+ # Mount /boot.
+ mkdir /boot
+ mount /dev/vda1 /boot
+
+ # This is needed for GRUB 0.97, which doesn't know about virtio devices.
+ mkdir /boot/grub
+ echo '(hd0) /dev/vda' > /boot/grub/device.map
+
+ # Install GRUB and generate the GRUB boot menu.
+ touch /etc/NIXOS
+ mkdir -p /nix/var/nix/profiles
+ ${config.system.build.toplevel}/bin/switch-to-configuration boot
+
+ umount /boot
+ ''
+ );
+
+in
+
+{
+ imports = [ ../profiles/qemu-guest.nix ];
+
+ options = {
+
+ virtualisation.memorySize =
+ mkOption {
+ default = 384;
+ description =
+ ''
+ Memory size (M) of virtual machine.
+ '';
+ };
+
+ virtualisation.diskSize =
+ mkOption {
+ default = 512;
+ description =
+ ''
+ Disk size (M) of virtual machine.
+ '';
+ };
+
+ virtualisation.diskImage =
+ mkOption {
+ default = "./${vmName}.qcow2";
+ description =
+ ''
+ Path to the disk image containing the root filesystem.
+ The image will be created on startup if it does not
+ exist.
+ '';
+ };
+
+ virtualisation.emptyDiskImages =
+ mkOption {
+ default = [];
+ type = types.listOf types.int;
+ description =
+ ''
+ Additional disk images to provide to the VM, the value is a list of
+ sizes in megabytes the empty disk should be.
+
+ These disks are writeable by the VM and will be thrown away
+ afterwards.
+ '';
+ };
+
+ virtualisation.graphics =
+ mkOption {
+ default = true;
+ description =
+ ''
+ Whether to run QEMU with a graphics window, or access
+ the guest computer serial port through the host tty.
+ '';
+ };
+
+ virtualisation.pathsInNixDB =
+ mkOption {
+ default = [];
+ description =
+ ''
+ The list of paths whose closure is registered in the Nix
+ database in the VM. All other paths in the host Nix store
+ appear in the guest Nix store as well, but are considered
+ garbage (because they are not registered in the Nix
+ database in the guest).
+ '';
+ };
+
+ virtualisation.vlans =
+ mkOption {
+ default = [ 1 ];
+ example = [ 1 2 ];
+ description =
+ ''
+ Virtual networks to which the VM is connected. Each
+ number N in this list causes
+ the VM to have a virtual Ethernet interface attached to a
+ separate virtual network on which it will be assigned IP
+ address
+ 192.168.N.M,
+ where M is the index of this VM
+ in the list of VMs.
+ '';
+ };
+
+ virtualisation.writableStore =
+ mkOption {
+ default = false;
+ description =
+ ''
+ If enabled, the Nix store in the VM is made writable by
+ layering a unionfs-fuse/tmpfs filesystem on top of the host's Nix
+ store.
+ '';
+ };
+
+ virtualisation.writableStoreUseTmpfs =
+ mkOption {
+ default = true;
+ description =
+ ''
+ Use a tmpfs for the writable store instead of writing to the VM's
+ own filesystem.
+ '';
+ };
+
+ networking.primaryIPAddress =
+ mkOption {
+ default = "";
+ internal = true;
+ description = "Primary IP address used in /etc/hosts.";
+ };
+
+ virtualisation.qemu.options =
+ mkOption {
+ default = [];
+ example = [ "-vga std" ];
+ description = "Options passed to QEMU.";
+ };
+
+ virtualisation.useBootLoader =
+ mkOption {
+ default = false;
+ description =
+ ''
+ If enabled, the virtual machine will be booted using the
+ regular boot loader (i.e., GRUB 1 or 2). This allows
+ testing of the boot loader. If
+ disabled (the default), the VM directly boots the NixOS
+ kernel and initial ramdisk, bypassing the boot loader
+ altogether.
+ '';
+ };
+
+ };
+
+ config = {
+
+ boot.loader.grub.device = mkOverride 50 "/dev/vda";
+
+ boot.initrd.supportedFilesystems = optional cfg.writableStore "unionfs-fuse";
+
+ boot.initrd.extraUtilsCommands =
+ ''
+ # We need mke2fs in the initrd.
+ cp ${pkgs.e2fsprogs}/sbin/mke2fs $out/bin
+ '';
+
+ boot.initrd.postDeviceCommands =
+ ''
+ # If the disk image appears to be empty, run mke2fs to
+ # initialise.
+ FSTYPE=$(blkid -o value -s TYPE /dev/vda || true)
+ if test -z "$FSTYPE"; then
+ mke2fs -t ext4 /dev/vda
+ fi
+ '';
+
+ boot.initrd.postMountCommands =
+ ''
+ # Mark this as a NixOS machine.
+ mkdir -p $targetRoot/etc
+ echo -n > $targetRoot/etc/NIXOS
+
+ # Fix the permissions on /tmp.
+ chmod 1777 $targetRoot/tmp
+
+ mkdir -p $targetRoot/boot
+ ${optionalString cfg.writableStore ''
+ mkdir -p /unionfs-chroot/ro-store
+ mount --rbind $targetRoot/nix/store /unionfs-chroot/ro-store
+
+ mkdir /unionfs-chroot/rw-store
+ ${if cfg.writableStoreUseTmpfs then ''
+ mount -t tmpfs -o "mode=755" none /unionfs-chroot/rw-store
+ '' else ''
+ mkdir $targetRoot/.nix-rw-store
+ mount --bind $targetRoot/.nix-rw-store /unionfs-chroot/rw-store
+ ''}
+
+ unionfs -o allow_other,cow,nonempty,chroot=/unionfs-chroot,max_files=32768,hide_meta_files /rw-store=RW:/ro-store=RO $targetRoot/nix/store
+ ''}
+ '';
+
+ # After booting, register the closure of the paths in
+ # `virtualisation.pathsInNixDB' in the Nix database in the VM. This
+ # allows Nix operations to work in the VM. The path to the
+ # registration file is passed through the kernel command line to
+ # allow `system.build.toplevel' to be included. (If we had a direct
+ # reference to ${regInfo} here, then we would get a cyclic
+ # dependency.)
+ boot.postBootCommands =
+ ''
+ if [[ "$(cat /proc/cmdline)" =~ regInfo=([^ ]*) ]]; then
+ ${config.environment.nix}/bin/nix-store --load-db < ''${BASH_REMATCH[1]}
+ fi
+ '';
+
+ virtualisation.pathsInNixDB = [ config.system.build.toplevel ];
+
+ virtualisation.qemu.options = [ "-vga std" "-usbdevice tablet" ];
+
+ # Mount the host filesystem via 9P, and bind-mount the Nix store of
+ # the host into our own filesystem. We use mkOverride to allow this
+ # module to be applied to "normal" NixOS system configuration, where
+ # the regular value for the `fileSystems' attribute should be
+ # disregarded for the purpose of building a VM test image (since
+ # those filesystems don't exist in the VM).
+ fileSystems = mkOverride 10
+ { "/".device = "/dev/vda";
+ "/nix/store" =
+ { device = "store";
+ fsType = "9p";
+ options = "trans=virtio,version=9p2000.L,msize=1048576,cache=loose";
+ };
+ "/tmp/xchg" =
+ { device = "xchg";
+ fsType = "9p";
+ options = "trans=virtio,version=9p2000.L,msize=1048576,cache=loose";
+ neededForBoot = true;
+ };
+ "/tmp/shared" =
+ { device = "shared";
+ fsType = "9p";
+ options = "trans=virtio,version=9p2000.L,msize=1048576";
+ neededForBoot = true;
+ };
+ } // optionalAttrs cfg.useBootLoader
+ { "/boot" =
+ { device = "/dev/disk/by-label/boot";
+ fsType = "ext4";
+ options = "ro";
+ noCheck = true; # fsck fails on a r/o filesystem
+ };
+ };
+
+ swapDevices = mkOverride 50 [ ];
+
+ # Don't run ntpd in the guest. It should get the correct time from KVM.
+ services.ntp.enable = false;
+
+ system.build.vm = pkgs.runCommand "nixos-vm" { preferLocalBuild = true; }
+ ''
+ ensureDir $out/bin
+ ln -s ${config.system.build.toplevel} $out/system
+ ln -s ${pkgs.writeScript "run-nixos-vm" startVM} $out/bin/run-${vmName}-vm
+ '';
+
+ # When building a regular system configuration, override whatever
+ # video driver the host uses.
+ services.xserver.videoDriver = mkOverride 50 null;
+ services.xserver.videoDrivers = mkOverride 50 [ "vesa" ];
+ services.xserver.defaultDepth = mkOverride 50 0;
+ services.xserver.resolutions = mkOverride 50 [ { x = 1024; y = 768; } ];
+ services.xserver.monitorSection =
+ ''
+ # Set a higher refresh rate so that resolutions > 800x600 work.
+ HorizSync 30-140
+ VertRefresh 50-160
+ '';
+
+ # Wireless won't work in the VM.
+ networking.wireless.enable = mkOverride 50 false;
+
+ system.requiredKernelConfig = with config.lib.kernelConfig;
+ [ (isEnabled "VIRTIO_BLK")
+ (isEnabled "VIRTIO_PCI")
+ (isEnabled "VIRTIO_NET")
+ (isEnabled "EXT4_FS")
+ (isYes "BLK_DEV")
+ (isYes "PCI")
+ (isYes "EXPERIMENTAL")
+ (isYes "NETDEVICES")
+ (isYes "NET_CORE")
+ (isYes "INET")
+ (isYes "NETWORK_FILESYSTEMS")
+ ] ++ optional (!cfg.graphics) [
+ (isYes "SERIAL_8250_CONSOLE")
+ (isYes "SERIAL_8250")
+ ];
+
+ };
+}
diff --git a/nixos/modules/virtualisation/virtualbox-guest.nix b/nixos/modules/virtualisation/virtualbox-guest.nix
new file mode 100644
index 0000000000000000000000000000000000000000..664fd21781cd0a0d63eb59e737dba5e92a6b07b5
--- /dev/null
+++ b/nixos/modules/virtualisation/virtualbox-guest.nix
@@ -0,0 +1,87 @@
+# Module for VirtualBox guests.
+
+{ config, pkgs, ... }:
+
+with pkgs.lib;
+
+let
+
+ cfg = config.services.virtualbox;
+ kernel = config.boot.kernelPackages;
+
+in
+
+optionalAttrs (pkgs.stdenv.isi686 || pkgs.stdenv.isx86_64) # ugly...
+{
+
+ ###### interface
+
+ options = {
+
+ services.virtualbox = {
+
+ enable = mkOption {
+ default = false;
+ description = "Whether to enable the VirtualBox service and other guest additions.";
+ };
+
+ };
+
+ };
+
+
+ ###### implementation
+
+ config = mkIf cfg.enable {
+
+ environment.systemPackages = [ kernel.virtualboxGuestAdditions ];
+
+ boot.extraModulePackages = [ kernel.virtualboxGuestAdditions ];
+
+ users.extraGroups.vboxsf.gid = config.ids.gids.vboxsf;
+
+ systemd.services.virtualbox =
+ { description = "VirtualBox Guest Services";
+
+ wantedBy = [ "multi-user.target" ];
+ requires = [ "dev-vboxguest.device" ];
+ after = [ "dev-vboxguest.device" ];
+
+ unitConfig.ConditionVirtualization = "oracle";
+
+ serviceConfig.ExecStart = "@${kernel.virtualboxGuestAdditions}/sbin/VBoxService VBoxService --foreground";
+ };
+
+ services.xserver.videoDrivers = mkOverride 50 [ "virtualbox" ];
+
+ services.xserver.config =
+ ''
+ Section "InputDevice"
+ Identifier "VBoxMouse"
+ Driver "vboxmouse"
+ EndSection
+ '';
+
+ services.xserver.serverLayoutSection =
+ ''
+ InputDevice "VBoxMouse"
+ '';
+
+ services.xserver.displayManager.sessionCommands =
+ ''
+ PATH=${makeSearchPath "bin" [ pkgs.gnugrep pkgs.which pkgs.xorg.xorgserver ]}:$PATH \
+ ${kernel.virtualboxGuestAdditions}/bin/VBoxClient-all
+ '';
+
+ services.udev.extraRules =
+ ''
+ # /dev/vboxuser is necessary for VBoxClient to work. Maybe we
+ # should restrict this to logged-in users.
+ KERNEL=="vboxuser", OWNER="root", GROUP="root", MODE="0666"
+
+ # Allow systemd dependencies on vboxguest.
+ KERNEL=="vboxguest", TAG+="systemd"
+ '';
+ };
+
+}
diff --git a/nixos/modules/virtualisation/virtualbox-image.nix b/nixos/modules/virtualisation/virtualbox-image.nix
new file mode 100644
index 0000000000000000000000000000000000000000..e1b6def8edb3aa5206c4b90912826183ba5acf14
--- /dev/null
+++ b/nixos/modules/virtualisation/virtualbox-image.nix
@@ -0,0 +1,110 @@
+{ config, pkgs, ... }:
+
+with pkgs.lib;
+
+{
+ system.build.virtualBoxImage =
+ pkgs.vmTools.runInLinuxVM (
+ pkgs.runCommand "virtualbox-image"
+ { memSize = 768;
+ preVM =
+ ''
+ mkdir $out
+ diskImage=$out/image
+ ${pkgs.vmTools.qemu}/bin/qemu-img create -f raw $diskImage "10G"
+ mv closure xchg/
+ '';
+ postVM =
+ ''
+ echo "creating VirtualBox disk image..."
+ ${pkgs.vmTools.qemu}/bin/qemu-img convert -f raw -O vdi $diskImage $out/disk.vdi
+ rm $diskImage
+ '';
+ buildInputs = [ pkgs.utillinux pkgs.perl ];
+ exportReferencesGraph =
+ [ "closure" config.system.build.toplevel ];
+ }
+ ''
+ # Create a single / partition.
+ ${pkgs.parted}/sbin/parted /dev/vda mklabel msdos
+ ${pkgs.parted}/sbin/parted /dev/vda -- mkpart primary ext2 1M -1s
+ . /sys/class/block/vda1/uevent
+ mknod /dev/vda1 b $MAJOR $MINOR
+
+ # Create an empty filesystem and mount it.
+ ${pkgs.e2fsprogs}/sbin/mkfs.ext4 -L nixos /dev/vda1
+ ${pkgs.e2fsprogs}/sbin/tune2fs -c 0 -i 0 /dev/vda1
+ mkdir /mnt
+ mount /dev/vda1 /mnt
+
+ # The initrd expects these directories to exist.
+ mkdir /mnt/dev /mnt/proc /mnt/sys
+ mount --bind /proc /mnt/proc
+ mount --bind /dev /mnt/dev
+ mount --bind /sys /mnt/sys
+
+ # Copy all paths in the closure to the filesystem.
+ storePaths=$(perl ${pkgs.pathsFromGraph} /tmp/xchg/closure)
+
+ echo "filling Nix store..."
+ mkdir -p /mnt/nix/store
+ set -f
+ cp -prvd $storePaths /mnt/nix/store/
+
+ # Register the paths in the Nix database.
+ printRegistration=1 perl ${pkgs.pathsFromGraph} /tmp/xchg/closure | \
+ chroot /mnt ${config.environment.nix}/bin/nix-store --load-db
+
+ # Create the system profile to allow nixos-rebuild to work.
+ chroot /mnt ${config.environment.nix}/bin/nix-env \
+ -p /nix/var/nix/profiles/system --set ${config.system.build.toplevel}
+
+ # `nixos-rebuild' requires an /etc/NIXOS.
+ mkdir -p /mnt/etc/nixos
+ touch /mnt/etc/NIXOS
+
+ # `switch-to-configuration' requires a /bin/sh
+ mkdir -p /mnt/bin
+ ln -s ${config.system.build.binsh}/bin/sh /mnt/bin/sh
+
+ # Generate the GRUB menu.
+ ln -s vda /dev/sda
+ chroot /mnt ${config.system.build.toplevel}/bin/switch-to-configuration boot
+
+ umount /mnt/proc /mnt/dev /mnt/sys
+ umount /mnt
+ ''
+ );
+
+ system.build.virtualBoxOVA = pkgs.runCommand "virtualbox-ova"
+ { buildInputs = [ pkgs.linuxPackages.virtualbox ];
+ vmName = "NixOS ${config.system.nixosVersion} (${pkgs.stdenv.system})";
+ fileName = "nixos-${config.system.nixosVersion}-${pkgs.stdenv.system}.ova";
+ }
+ ''
+ echo "creating VirtualBox VM..."
+ export HOME=$PWD
+ VBoxManage createvm --name "$vmName" --register \
+ --ostype ${if pkgs.stdenv.system == "x86_64-linux" then "Linux26_64" else "Linux26"}
+ VBoxManage modifyvm "$vmName" \
+ --memory 1536 --acpi on --vram 10 \
+ --nictype1 virtio --nic1 nat \
+ --audiocontroller ac97 --audio alsa \
+ --rtcuseutc on \
+ --usb on --mouse usbtablet
+ VBoxManage storagectl "$vmName" --name SATA --add sata --sataportcount 4 --bootable on --hostiocache on
+ VBoxManage storageattach "$vmName" --storagectl SATA --port 0 --device 0 --type hdd \
+ --medium ${config.system.build.virtualBoxImage}/disk.vdi
+
+ echo "exporting VirtualBox VM..."
+ mkdir -p $out
+ VBoxManage export "$vmName" --output "$out/$fileName"
+ '';
+
+ fileSystems."/".device = "/dev/disk/by-label/nixos";
+
+ boot.loader.grub.version = 2;
+ boot.loader.grub.device = "/dev/sda";
+
+ services.virtualbox.enable = true;
+}
diff --git a/nixos/modules/virtualisation/xen-dom0.nix b/nixos/modules/virtualisation/xen-dom0.nix
new file mode 100644
index 0000000000000000000000000000000000000000..4c24c6a7826ac373326d4098dac9cd0a9796c393
--- /dev/null
+++ b/nixos/modules/virtualisation/xen-dom0.nix
@@ -0,0 +1,179 @@
+# Xen hypervisor (Dom0) support.
+
+{ config, pkgs, ... }:
+
+with pkgs.lib;
+
+let
+
+ cfg = config.virtualisation.xen;
+
+ xen = pkgs.xen;
+
+ xendConfig = pkgs.writeText "xend-config.sxp"
+ ''
+ (loglevel DEBUG)
+ (network-script network-bridge)
+ (vif-script vif-bridge)
+ '';
+
+in
+
+{
+ ###### interface
+
+ options = {
+
+ virtualisation.xen.enable =
+ mkOption {
+ default = false;
+ description =
+ ''
+ Setting this option enables the Xen hypervisor, a
+ virtualisation technology that allows multiple virtual
+ machines, known as domains, to run
+ concurrently on the physical machine. NixOS runs as the
+ privileged Domain 0. This option
+ requires a reboot to take effect.
+ '';
+ };
+
+ virtualisation.xen.bootParams =
+ mkOption {
+ default = "";
+ description =
+ ''
+ Parameters passed to the Xen hypervisor at boot time.
+ '';
+ };
+
+ virtualisation.xen.domain0MemorySize =
+ mkOption {
+ default = 0;
+ example = 512;
+ description =
+ ''
+ Amount of memory (in MiB) allocated to Domain 0 on boot.
+ If set to 0, all memory is assigned to Domain 0.
+ '';
+ };
+
+ };
+
+
+ ###### implementation
+
+ config = mkIf cfg.enable {
+
+ environment.systemPackages = [ xen ];
+
+ # Domain 0 requires a pvops-enabled kernel.
+ boot.kernelPackages = pkgs.linuxPackages_3_2_xen;
+
+ boot.kernelModules =
+ [ "xen_evtchn" "xen_gntdev" "xen_blkback" "xen_netback" "xen_pciback"
+ "blktap" "tun"
+ ];
+
+ # The radeonfb kernel module causes the screen to go black as soon
+ # as it's loaded, so don't load it.
+ boot.blacklistedKernelModules = [ "radeonfb" ];
+
+ # Increase the number of loopback devices from the default (8),
+ # which is way too small because every VM virtual disk requires a
+ # loopback device.
+ boot.extraModprobeConfig =
+ ''
+ options loop max_loop=64
+ '';
+
+ virtualisation.xen.bootParams =
+ [ "loglvl=all" "guest_loglvl=all" ] ++
+ optional (cfg.domain0MemorySize != 0) "dom0_mem=${toString cfg.domain0MemorySize}M";
+
+ system.extraSystemBuilderCmds =
+ ''
+ ln -s ${xen}/boot/xen.gz $out/xen.gz
+ echo "${toString cfg.bootParams}" > $out/xen-params
+ '';
+
+ # Mount the /proc/xen pseudo-filesystem.
+ system.activationScripts.xen =
+ ''
+ if [ -d /proc/xen ]; then
+ ${pkgs.sysvtools}/bin/mountpoint -q /proc/xen || \
+ ${pkgs.utillinux}/bin/mount -t xenfs none /proc/xen
+ fi
+ '';
+
+ jobs.xend =
+ { description = "Xen control daemon";
+
+ startOn = "stopped udevtrigger";
+
+ path =
+ [ pkgs.bridge_utils pkgs.gawk pkgs.iproute pkgs.nettools
+ pkgs.utillinux pkgs.bash xen pkgs.pciutils pkgs.procps
+ ];
+
+ environment.XENCONSOLED_TRACE = "hv";
+
+ preStart =
+ ''
+ mkdir -p /var/log/xen/console -m 0700
+
+ ${xen}/sbin/xend start
+
+ # Wait until Xend is running.
+ for ((i = 0; i < 60; i++)); do echo "waiting for xend..."; ${xen}/sbin/xend status && break; done
+
+ ${xen}/sbin/xend status || exit 1
+ '';
+
+ postStop = "${xen}/sbin/xend stop";
+ };
+
+ jobs.xendomains =
+ { description = "Automatically starts, saves and restores Xen domains on startup/shutdown";
+
+ startOn = "started xend";
+
+ stopOn = "starting shutdown and stopping xend";
+
+ restartIfChanged = false;
+
+ path = [ pkgs.xen ];
+
+ environment.XENDOM_CONFIG = "${xen}/etc/sysconfig/xendomains";
+
+ preStart =
+ ''
+ mkdir -p /var/lock/subsys -m 755
+ ${xen}/etc/init.d/xendomains start
+ '';
+
+ postStop = "${xen}/etc/init.d/xendomains stop";
+ };
+
+ # To prevent a race between dhcpcd and xend's bridge setup script
+ # (which renames eth* to peth* and recreates eth* as a virtual
+ # device), start dhcpcd after xend.
+ jobs.dhcpcd.startOn = mkOverride 50 "started xend";
+
+ environment.etc =
+ [ { source = xendConfig;
+ target = "xen/xend-config.sxp";
+ }
+ { source = "${xen}/etc/xen/scripts";
+ target = "xen/scripts";
+ }
+ ];
+
+ # Xen provides udev rules.
+ services.udev.packages = [ xen ];
+
+ services.udev.path = [ pkgs.bridge_utils pkgs.iproute ];
+
+ };
+
+}
diff --git a/nixos/modules/virtualisation/xen-domU.nix b/nixos/modules/virtualisation/xen-domU.nix
new file mode 100644
index 0000000000000000000000000000000000000000..4835896693456bda59051ebe22fd57bc68670895
--- /dev/null
+++ b/nixos/modules/virtualisation/xen-domU.nix
@@ -0,0 +1,19 @@
+# Common configuration for Xen DomU NixOS virtual machines.
+
+{ config, pkgs, ... }:
+
+{
+ # We're being booted using pv-grub, which means that we need to
+ # generate a GRUB 1 menu without actually installing GRUB.
+ boot.loader.grub.version = 1;
+ boot.loader.grub.device = "nodev";
+ boot.loader.grub.extraPerEntryConfig = "root (hd0)";
+
+ boot.initrd.kernelModules = [ "xen-blkfront" ];
+
+ # Send syslog messages to the Xen console.
+ services.syslogd.tty = "hvc0";
+
+ # Don't run ntpd, since we should get the correct time from Dom0.
+ services.ntp.enable = false;
+}
diff --git a/nixos/release-combined.nix b/nixos/release-combined.nix
new file mode 100644
index 0000000000000000000000000000000000000000..6866c709dd4c7fd1cd40c1b31e8d5a8417a2cbdb
--- /dev/null
+++ b/nixos/release-combined.nix
@@ -0,0 +1,69 @@
+{ nixpkgs ? { outPath = ./..; revCount = 5678; shortRev = "gfedcba"; }
+, officialRelease ? false
+}:
+
+let
+
+ nixpkgsSrc = nixpkgs; # urgh
+
+ pkgs = import ./.. {};
+
+ removeMaintainers = set: if builtins.isAttrs set
+ then if (set.type or "") == "derivation"
+ then set // { meta = builtins.removeAttrs (set.meta or {}) [ "maintainers" ]; }
+ else pkgs.lib.mapAttrs (n: v: removeMaintainers v) set
+ else set;
+
+in rec {
+
+ nixos = removeMaintainers (import ./release.nix {
+ inherit officialRelease;
+ nixpkgs = nixpkgsSrc;
+ });
+
+ nixpkgs = builtins.removeAttrs (removeMaintainers (import ../pkgs/top-level/release.nix {
+ inherit officialRelease;
+ nixpkgs = nixpkgsSrc;
+ # Only do Linux builds.
+ supportedSystems = [ "x86_64-linux" "i686-linux" ];
+ })) [ "unstable" ];
+
+ tested = pkgs.releaseTools.aggregate {
+ name = "nixos-${nixos.channel.version}";
+ meta = {
+ description = "Release-critical builds for the NixOS unstable channel";
+ maintainers = [ pkgs.lib.maintainers.eelco pkgs.lib.maintainers.shlevy ];
+ };
+ constituents =
+ let all = x: [ x.x86_64-linux x.i686-linux ]; in
+ [ nixos.channel
+ nixos.manual
+
+ (all nixos.iso_minimal)
+ (all nixos.iso_graphical)
+ (all nixos.ova)
+
+ (all nixos.tests.efi-installer.simple)
+ (all nixos.tests.firefox)
+ (all nixos.tests.firewall)
+ (all nixos.tests.installer.grub1)
+ (all nixos.tests.installer.lvm)
+ (all nixos.tests.installer.separateBoot)
+ (all nixos.tests.installer.simple)
+ (all nixos.tests.ipv6)
+ (all nixos.tests.kde4)
+ (all nixos.tests.login)
+ (all nixos.tests.misc)
+ (all nixos.tests.nat)
+ (all nixos.tests.nfs3)
+ (all nixos.tests.openssh)
+ (all nixos.tests.printing)
+ (all nixos.tests.proxy)
+ (all nixos.tests.xfce)
+
+ nixpkgs.tarball
+ (all nixpkgs.emacs)
+ ];
+ };
+
+}
diff --git a/nixos/release.nix b/nixos/release.nix
new file mode 100644
index 0000000000000000000000000000000000000000..e19403eccb66cda7f2f4c74ebb779f2402a3f617
--- /dev/null
+++ b/nixos/release.nix
@@ -0,0 +1,227 @@
+{ nixpkgs ? { outPath = ./..; revCount = 5678; shortRev = "gfedcba"; }
+, officialRelease ? false
+, stableBranch ? false
+}:
+
+let
+
+ version = builtins.readFile ../.version;
+ versionSuffix =
+ if officialRelease then ""
+ else (if stableBranch then "." else "pre") + "${toString nixpkgs.revCount}.${nixpkgs.shortRev}";
+
+ systems = [ "x86_64-linux" "i686-linux" ];
+
+ pkgs = import nixpkgs { system = "x86_64-linux"; };
+
+
+ versionModule =
+ { system.nixosVersionSuffix = versionSuffix; };
+
+
+ makeIso =
+ { module, type, description ? type, maintainers ? ["eelco"], system }:
+
+ with import nixpkgs { inherit system; };
+
+ let
+
+ config = (import lib/eval-config.nix {
+ inherit system;
+ modules = [ module versionModule { isoImage.isoBaseName = "nixos-${type}"; } ];
+ }).config;
+
+ iso = config.system.build.isoImage;
+
+ in
+ # Declare the ISO as a build product so that it shows up in Hydra.
+ runCommand "nixos-iso-${config.system.nixosVersion}"
+ { meta = {
+ description = "NixOS installation CD (${description}) - ISO image for ${system}";
+ maintainers = map (x: lib.getAttr x lib.maintainers) maintainers;
+ };
+ inherit iso;
+ passthru = { inherit config; };
+ }
+ ''
+ mkdir -p $out/nix-support
+ echo "file iso" $iso/iso/*.iso* >> $out/nix-support/hydra-build-products
+ ''; # */
+
+
+ makeSystemTarball =
+ { module, maintainers ? ["viric"], system }:
+
+ with import nixpkgs { inherit system; };
+
+ let
+
+ config = (import lib/eval-config.nix {
+ inherit system;
+ modules = [ module versionModule ];
+ }).config;
+
+ tarball = config.system.build.tarball;
+
+ in
+ tarball //
+ { meta = {
+ description = "NixOS system tarball for ${system} - ${stdenv.platform.name}";
+ maintainers = map (x: lib.getAttr x lib.maintainers) maintainers;
+ };
+ inherit config;
+ };
+
+
+in {
+
+ channel =
+ pkgs.releaseTools.makeSourceTarball {
+ name = "nixos-channel";
+
+ src = nixpkgs;
+
+ officialRelease = false; # FIXME: fix this in makeSourceTarball
+ inherit version versionSuffix;
+
+ buildInputs = [ pkgs.nixUnstable ];
+
+ expr = builtins.readFile lib/channel-expr.nix;
+
+ distPhase = ''
+ rm -rf .git
+ echo -n $VERSION_SUFFIX > .version-suffix
+ releaseName=nixos-$VERSION$VERSION_SUFFIX
+ mkdir -p $out/tarballs
+ mkdir ../$releaseName
+ cp -prd . ../$releaseName/nixpkgs
+ chmod -R u+w ../$releaseName
+ ln -s nixpkgs/nixos ../$releaseName/nixos
+ echo "$expr" > ../$releaseName/default.nix
+ NIX_STATE_DIR=$TMPDIR nix-env -f ../$releaseName/default.nix -qaP --meta --xml \* > /dev/null
+ cd ..
+ chmod -R u+w $releaseName
+ tar cfJ $out/tarballs/$releaseName.tar.xz $releaseName
+ ''; # */
+ };
+
+
+ manual =
+ (import ./doc/manual {
+ inherit pkgs;
+ options =
+ (import lib/eval-config.nix {
+ modules = [
+ { fileSystems = [];
+ boot.loader.grub.device = "/dev/sda";
+ } ];
+ }).options;
+ revision = toString (nixpkgs.rev or nixpkgs.shortRev);
+ }).manual;
+
+
+ iso_minimal = pkgs.lib.genAttrs systems (system: makeIso {
+ module = ./modules/installer/cd-dvd/installation-cd-minimal.nix;
+ type = "minimal";
+ inherit system;
+ });
+
+ iso_minimal_new_kernel = pkgs.lib.genAttrs systems (system: makeIso {
+ module = ./modules/installer/cd-dvd/installation-cd-minimal-new-kernel.nix;
+ type = "minimal-new-kernel";
+ inherit system;
+ });
+
+ iso_graphical = pkgs.lib.genAttrs systems (system: makeIso {
+ module = ./modules/installer/cd-dvd/installation-cd-graphical.nix;
+ type = "graphical";
+ inherit system;
+ });
+
+ # A variant with a more recent (but possibly less stable) kernel
+ # that might support more hardware.
+ iso_new_kernel = pkgs.lib.genAttrs systems (system: makeIso {
+ module = ./modules/installer/cd-dvd/installation-cd-new-kernel.nix;
+ type = "new-kernel";
+ inherit system;
+ });
+
+ # A variant with efi booting support. Once cd-minimal has a newer kernel,
+ # this should be enabled by default.
+ iso_efi = pkgs.lib.genAttrs systems (system: makeIso {
+ module = ./modules/installer/cd-dvd/installation-cd-efi.nix;
+ type = "efi";
+ maintainers = [ "shlevy" ];
+ inherit system;
+ });
+
+
+ # A bootable VirtualBox virtual appliance as an OVA file (i.e. packaged OVF).
+ ova = pkgs.lib.genAttrs systems (system:
+
+ with import nixpkgs { inherit system; };
+
+ let
+
+ config = (import lib/eval-config.nix {
+ inherit system;
+ modules =
+ [ versionModule
+ ./modules/installer/virtualbox-demo.nix
+ ];
+ }).config;
+
+ in
+ # Declare the OVA as a build product so that it shows up in Hydra.
+ runCommand "nixos-ova-${config.system.nixosVersion}-${system}"
+ { meta = {
+ description = "NixOS VirtualBox appliance (${system})";
+ maintainers = lib.maintainers.eelco;
+ };
+ ova = config.system.build.virtualBoxOVA;
+ }
+ ''
+ mkdir -p $out/nix-support
+ fn=$(echo $ova/*.ova)
+ echo "file ova $fn" >> $out/nix-support/hydra-build-products
+ '' # */
+
+ );
+
+
+ # Provide a tarball that can be unpacked into an SD card, and easily
+ # boot that system from uboot (like for the sheevaplug).
+ # The pc variant helps preparing the expression for the system tarball
+ # in a machine faster than the sheevpalug
+ system_tarball_pc = pkgs.lib.genAttrs systems (system: makeSystemTarball {
+ module = ./modules/installer/cd-dvd/system-tarball-pc.nix;
+ inherit system;
+ });
+
+ /*
+ system_tarball_fuloong2f =
+ assert builtins.currentSystem == "mips64-linux";
+ makeSystemTarball {
+ module = ./modules/installer/cd-dvd/system-tarball-fuloong2f.nix;
+ system = "mips64-linux";
+ };
+
+ system_tarball_sheevaplug =
+ assert builtins.currentSystem == "armv5tel-linux";
+ makeSystemTarball {
+ module = ./modules/installer/cd-dvd/system-tarball-sheevaplug.nix;
+ system = "armv5tel-linux";
+ };
+ */
+
+
+ # Run the tests in ./tests/default.nix for each platform. You can
+ # run a test by doing e.g. "nix-build -A tests.login.x86_64-linux".
+ tests =
+ with pkgs.lib;
+ let
+ testsFor = system:
+ mapAttrsRecursiveCond (x: !x ? test) (n: v: listToAttrs [(nameValuePair system v.test)])
+ (import ./tests { inherit nixpkgs system; });
+ in fold recursiveUpdate {} (map testsFor systems);
+}
diff --git a/nixos/tests/avahi.nix b/nixos/tests/avahi.nix
new file mode 100644
index 0000000000000000000000000000000000000000..d95361dcd83d4249890e438ac5da03e25b851df7
--- /dev/null
+++ b/nixos/tests/avahi.nix
@@ -0,0 +1,55 @@
+{ pkgs, ... }:
+
+with pkgs;
+
+{
+ nodes = {
+ one =
+ { config, pkgs, ... }: {
+ services.avahi.enable = true;
+ services.avahi.nssmdns = true;
+ };
+
+ two =
+ { config, pkgs, ... }: {
+ services.avahi.enable = true;
+ services.avahi.nssmdns = true;
+ };
+ };
+
+ # Test whether `avahi-daemon' and `libnss-mdns' work as expected.
+ testScript =
+ '' startAll;
+
+ # mDNS.
+ $one->waitForUnit("network.target");
+ $one->succeed("avahi-resolve-host-name one.local | tee out >&2");
+ $one->succeed("test \"`cut -f1 < out`\" = one.local");
+ $one->succeed("avahi-resolve-host-name two.local | tee out >&2");
+ $one->succeed("test \"`cut -f1 < out`\" = two.local");
+
+ $two->waitForUnit("network.target");
+ $two->succeed("avahi-resolve-host-name one.local | tee out >&2");
+ $two->succeed("test \"`cut -f1 < out`\" = one.local");
+ $two->succeed("avahi-resolve-host-name two.local | tee out >&2");
+ $two->succeed("test \"`cut -f1 < out`\" = two.local");
+
+ # Basic DNS-SD.
+ $one->succeed("avahi-browse -r -t _workstation._tcp | tee out >&2");
+ $one->succeed("test `wc -l < out` -gt 0");
+ $two->succeed("avahi-browse -r -t _workstation._tcp | tee out >&2");
+ $two->succeed("test `wc -l < out` -gt 0");
+
+ # More DNS-SD.
+ $one->execute("avahi-publish -s \"This is a test\" _test._tcp 123 one=1 &");
+ $one->sleep(5);
+ $two->succeed("avahi-browse -r -t _test._tcp | tee out >&2");
+ $two->succeed("test `wc -l < out` -gt 0");
+
+ # NSS-mDNS.
+ $one->succeed("getent hosts one.local >&2");
+ $one->succeed("getent hosts two.local >&2");
+ $two->succeed("getent hosts one.local >&2");
+ $two->succeed("getent hosts two.local >&2");
+ '';
+}
diff --git a/nixos/tests/bittorrent.nix b/nixos/tests/bittorrent.nix
new file mode 100644
index 0000000000000000000000000000000000000000..180da8267e0f71871791c78e0834801c42a333f5
--- /dev/null
+++ b/nixos/tests/bittorrent.nix
@@ -0,0 +1,107 @@
+# This test runs a Bittorrent tracker on one machine, and verifies
+# that two client machines can download the torrent using
+# `transmission'. The first client (behind a NAT router) downloads
+# from the initial seeder running on the tracker. Then we kill the
+# initial seeder. The second client downloads from the first client,
+# which only works if the first client successfully uses the UPnP-IGD
+# protocol to poke a hole in the NAT.
+
+{ pkgs, ... }:
+
+let
+
+ # Some random file to serve.
+ file = pkgs.nixUnstable.src;
+
+ miniupnpdConf = nodes: pkgs.writeText "miniupnpd.conf"
+ ''
+ ext_ifname=eth1
+ listening_ip=${nodes.router.config.networking.interfaces.eth2.ipAddress}/24
+ allow 1024-65535 192.168.2.0/24 1024-65535
+ '';
+
+in
+
+{
+
+ nodes =
+ { tracker =
+ { config, pkgs, ... }:
+ { environment.systemPackages = [ pkgs.transmission pkgs.bittorrent ];
+
+ # We need Apache on the tracker to serve the torrents.
+ services.httpd.enable = true;
+ services.httpd.adminAddr = "foo@example.org";
+ services.httpd.documentRoot = "/tmp";
+ };
+
+ router =
+ { config, pkgs, ... }:
+ { environment.systemPackages = [ pkgs.miniupnpd ];
+ virtualisation.vlans = [ 1 2 ];
+ networking.nat.enable = true;
+ networking.nat.internalIPs = "192.168.2.0/24";
+ networking.nat.externalInterface = "eth1";
+ };
+
+ client1 =
+ { config, pkgs, nodes, ... }:
+ { environment.systemPackages = [ pkgs.transmission ];
+ virtualisation.vlans = [ 2 ];
+ networking.defaultGateway =
+ nodes.router.config.networking.interfaces.eth2.ipAddress;
+ };
+
+ client2 =
+ { config, pkgs, ... }:
+ { environment.systemPackages = [ pkgs.transmission ];
+ };
+ };
+
+ testScript =
+ { nodes, ... }:
+ ''
+ startAll;
+
+ # Enable NAT on the router and start miniupnpd.
+ $router->waitForUnit("nat");
+ $router->succeed(
+ "iptables -t nat -N MINIUPNPD",
+ "iptables -t nat -A PREROUTING -i eth1 -j MINIUPNPD",
+ "echo 1 > /proc/sys/net/ipv4/ip_forward",
+ "miniupnpd -f ${miniupnpdConf nodes}"
+ );
+
+ # Create the torrent.
+ $tracker->succeed("mkdir /tmp/data");
+ $tracker->succeed("cp ${file} /tmp/data/test.tar.bz2");
+ $tracker->succeed("transmission-create /tmp/data/test.tar.bz2 -t http://tracker:6969/announce -o /tmp/test.torrent");
+ $tracker->succeed("chmod 644 /tmp/test.torrent");
+
+ # Start the tracker. !!! use a less crappy tracker
+ $tracker->waitForUnit("network.target");
+ $tracker->succeed("bittorrent-tracker --port 6969 --dfile /tmp/dstate >&2 &");
+ $tracker->waitForOpenPort(6969);
+
+ # Start the initial seeder.
+ my $pid = $tracker->succeed("transmission-cli /tmp/test.torrent -M -w /tmp/data >&2 & echo \$!");
+
+ # Now we should be able to download from the client behind the NAT.
+ $tracker->waitForUnit("httpd");
+ $client1->waitForUnit("network.target");
+ $client1->succeed("transmission-cli http://tracker/test.torrent -w /tmp >&2 &");
+ $client1->waitForFile("/tmp/test.tar.bz2");
+ $client1->succeed("cmp /tmp/test.tar.bz2 ${file}");
+
+ # Bring down the initial seeder.
+ $tracker->succeed("kill -9 $pid");
+
+ # Now download from the second client. This can only succeed if
+ # the first client created a NAT hole in the router.
+ $client2->waitForUnit("network.target");
+ $client2->succeed("transmission-cli http://tracker/test.torrent -M -w /tmp >&2 &");
+ $client2->waitForFile("/tmp/test.tar.bz2");
+ $client2->succeed("cmp /tmp/test.tar.bz2 ${file}");
+ '';
+
+}
diff --git a/nixos/tests/check-filesystems.nix b/nixos/tests/check-filesystems.nix
new file mode 100644
index 0000000000000000000000000000000000000000..39e8883ee598f02fa9021663604c287c2245e3cb
--- /dev/null
+++ b/nixos/tests/check-filesystems.nix
@@ -0,0 +1,80 @@
+{ nixos ? ./..
+, nixpkgs ? /etc/nixos/nixpkgs
+, system ? builtins.currentSystem
+}:
+
+with import ../lib/build-vms.nix { inherit nixos nixpkgs system; };
+
+rec {
+ nodes = {
+ share = {pkgs, config, ...}: {
+ services.nfs.server.enable = true;
+ services.nfs.server.exports = ''
+ /repos1 192.168.1.0/255.255.255.0(rw,no_root_squash)
+ /repos2 192.168.1.0/255.255.255.0(rw,no_root_squash)
+ '';
+ services.nfs.server.createMountPoints = true;
+
+ jobs.checkable = {
+ startOn = [
+ config.jobs.nfs_kernel_exports.name
+ config.jobs.nfs_kernel_nfsd.name
+ ];
+ respawn = true;
+ };
+ };
+
+ fsCheck = {pkgs, config, ...}: {
+ fileSystems =
+ let
+ repos1 = {
+ mountPoint = "/repos1";
+ autocreate = true;
+ device = "share:/repos1";
+ fsType = "nfs";
+ };
+
+ repos2 = {
+ mountPoint = "/repos2";
+ autocreate = true;
+ device = "share:/repos2";
+ fsType = "nfs";
+ };
+ in pkgs.lib.mkOverrideTemplate 50 {} [
+ repos1
+ repos1 # check remount
+ repos2 # check after remount
+ ];
+
+ jobs.checkable = {
+ startOn = "stopped ${config.jobs.filesystems.name}";
+ respawn = true;
+ };
+ };
+ };
+
+ vms = buildVirtualNetwork { inherit nodes; };
+
+ test = runTests vms
+ ''
+ startAll;
+
+ $share->waitForUnit("checkable");
+ $fsCheck->waitForUnit("checkable");
+
+ # check repos1
+ $fsCheck->succeed("test -d /repos1");
+ $share->succeed("touch /repos1/test1");
+ $fsCheck->succeed("test -e /repos1/test1");
+
+ # check repos2 (check after remount)
+ $fsCheck->succeed("test -d /repos2");
+ $share->succeed("touch /repos2/test2");
+ $fsCheck->succeed("test -e /repos2/test2");
+
+ # check without network
+ $share->block();
+ $fsCheck->fail("test -e /repos1/test1");
+ $fsCheck->fail("test -e /repos2/test2");
+ '';
+}
diff --git a/nixos/tests/common/user-account.nix b/nixos/tests/common/user-account.nix
new file mode 100644
index 0000000000000000000000000000000000000000..8157cf8d263e836bea1ec374c2f3a6102517ce31
--- /dev/null
+++ b/nixos/tests/common/user-account.nix
@@ -0,0 +1,11 @@
+{ pkgs, ... }:
+
+{ users.extraUsers = pkgs.lib.singleton
+ { name = "alice";
+ description = "Alice Foobar";
+ home = "/home/alice";
+ createHome = true;
+ useDefaultShell = true;
+ password = "foobar";
+ };
+}
diff --git a/nixos/tests/common/x11.nix b/nixos/tests/common/x11.nix
new file mode 100644
index 0000000000000000000000000000000000000000..c5a7c165d12681e3ccd7fa0cd1b3fe9eb2f145c2
--- /dev/null
+++ b/nixos/tests/common/x11.nix
@@ -0,0 +1,12 @@
+{ services.xserver.enable = true;
+
+ # Automatically log in.
+ services.xserver.displayManager.auto.enable = true;
+
+ # Use IceWM as the window manager.
+ services.xserver.windowManager.default = "icewm";
+ services.xserver.windowManager.icewm.enable = true;
+
+ # Don't use a desktop manager.
+ services.xserver.desktopManager.default = "none";
+}
diff --git a/nixos/tests/default.nix b/nixos/tests/default.nix
new file mode 100644
index 0000000000000000000000000000000000000000..16d45126de13bb3cbbedab642b26195469c089d4
--- /dev/null
+++ b/nixos/tests/default.nix
@@ -0,0 +1,38 @@
+{ nixpkgs ?
+, system ? builtins.currentSystem
+, minimal ? false
+}:
+
+with import ../lib/testing.nix { inherit system minimal; };
+
+{
+ avahi = makeTest (import ./avahi.nix);
+ bittorrent = makeTest (import ./bittorrent.nix);
+ firefox = makeTest (import ./firefox.nix);
+ firewall = makeTest (import ./firewall.nix);
+ installer = makeTests (import ./installer.nix);
+ efi-installer = makeTests (import ./efi-installer.nix);
+ ipv6 = makeTest (import ./ipv6.nix);
+ kde4 = makeTest (import ./kde4.nix);
+ #kexec = makeTest (import ./kexec.nix);
+ login = makeTest (import ./login.nix {});
+ latestKernel.login = makeTest (import ./login.nix ({ config, pkgs, ... }: { boot.kernelPackages = pkgs.linuxPackages_latest; }));
+ misc = makeTest (import ./misc.nix);
+ #mpich = makeTest (import ./mpich.nix);
+ mysql = makeTest (import ./mysql.nix);
+ mysql_replication = makeTest (import ./mysql-replication.nix);
+ nat = makeTest (import ./nat.nix);
+ nfs3 = makeTest (import ./nfs.nix { version = 3; });
+ #nfs4 = makeTest (import ./nfs.nix { version = 4; });
+ openssh = makeTest (import ./openssh.nix);
+ partition = makeTest (import ./partition.nix);
+ printing = makeTest (import ./printing.nix);
+ proxy = makeTest (import ./proxy.nix);
+ quake3 = makeTest (import ./quake3.nix);
+ simple = makeTest (import ./simple.nix);
+ #subversion = makeTest (import ./subversion.nix);
+ tomcat = makeTest (import ./tomcat.nix);
+ #trac = makeTest (import ./trac.nix);
+ xfce = makeTest (import ./xfce.nix);
+ runInMachine.test = import ./run-in-machine.nix { inherit system; };
+}
diff --git a/nixos/tests/efi-installer.nix b/nixos/tests/efi-installer.nix
new file mode 100644
index 0000000000000000000000000000000000000000..8a05dbf2a610b7c9d9b84f10631c4fa86edc253b
--- /dev/null
+++ b/nixos/tests/efi-installer.nix
@@ -0,0 +1,127 @@
+# !!! Merge into normal install tests once all livecds are EFIable
+{ pkgs, system, ... }:
+
+with pkgs.lib;
+with import ../lib/qemu-flags.nix;
+
+let
+
+ # Build the ISO. This is the regular installation CD but with test
+ # instrumentation.
+ iso =
+ (import ../lib/eval-config.nix {
+ inherit system;
+ modules =
+ [ ../modules/installer/cd-dvd/installation-cd-efi.nix
+ ../modules/testing/test-instrumentation.nix
+ { key = "serial";
+
+ # The test cannot access the network, so any sources we
+ # need must be included in the ISO.
+ isoImage.storeContents =
+ [ pkgs.glibcLocales
+ pkgs.sudo
+ pkgs.docbook5
+ pkgs.docbook5_xsl
+ pkgs.grub
+ pkgs.perlPackages.XMLLibXML
+ pkgs.unionfs-fuse
+ pkgs.gummiboot
+ pkgs.libxslt
+ ];
+ }
+ ];
+ }).config.system.build.isoImage;
+
+
+ # The config to install
+ config = builtins.toFile "configuration.nix" ''
+ { pkgs, ... }: {
+ imports = [ ./hardware-configuration.nix ];
+ boot.kernelPackages = pkgs.linuxPackages_3_10;
+ boot.loader.grub.enable = false;
+ boot.loader.efi.canTouchEfiVariables = true;
+ boot.loader.gummiboot.enable = true;
+ fonts.enableFontConfig = false;
+ }
+ '';
+
+ biosDir = pkgs.runCommand "ovmf-bios" {} ''
+ mkdir $out
+ ln -s ${pkgs.OVMF}/FV/OVMF.fd $out/bios.bin
+ '';
+
+in {
+ simple = {
+ inherit iso;
+ nodes = {};
+ testScript = ''
+ createDisk("harddisk", 4 * 1024);
+
+ my $machine = createMachine({ hda => "harddisk",
+ hdaInterface => "scsi",
+ cdrom => glob("${iso}/iso/*.iso"),
+ qemuFlags => '-L ${biosDir} ${optionalString (pkgs.stdenv.system == "x86_64-linux") "-cpu kvm64"}'});
+ $machine->start;
+
+ # Make sure that we get a login prompt etc.
+ $machine->succeed("echo hello");
+ $machine->waitForUnit("rogue");
+ $machine->waitForUnit("nixos-manual");
+
+ # Partition the disk.
+ $machine->succeed(
+ "sgdisk -Z /dev/sda",
+ "sgdisk -n 1:0:+256M -N 2 -t 1:ef00 -t 2:8300 -c 1:boot -c 2:root /dev/sda",
+ "mkfs.vfat -n BOOT /dev/sda1",
+ "mkfs.ext3 -L nixos /dev/sda2",
+ "mount LABEL=nixos /mnt",
+ "mkdir /mnt/boot",
+ "mount LABEL=BOOT /mnt/boot",
+ );
+
+ # Create the NixOS configuration.
+ $machine->succeed(
+ "nixos-generate-config --root /mnt",
+ );
+
+ $machine->succeed("cat /mnt/etc/nixos/hardware-configuration.nix >&2");
+
+ $machine->copyFileFromHost(
+ "${config}",
+ "/mnt/etc/nixos/configuration.nix");
+
+ # Perform the installation.
+ $machine->succeed("nixos-install >&2");
+
+ # Do it again to make sure it's idempotent.
+ $machine->succeed("nixos-install >&2");
+
+ $machine->shutdown;
+
+ # Now see if we can boot the installation.
+ my $machine = createMachine({ #hda => "harddisk",
+# hdaInterface => "virtio",
+# !!! OVMF doesn't boot from virtio http://www.mail-archive.com/edk2-devel@lists.sourceforge.net/msg01501.html
+ qemuFlags => '-L ${biosDir} ${optionalString (pkgs.stdenv.system == "x86_64-linux") "-cpu kvm64"} -m 512 -hda ' . Cwd::abs_path('harddisk')});
+
+ # Did /boot get mounted, if appropriate?
+ $machine->waitForUnit("local-fs.target");
+ $machine->succeed("test -e /boot/efi");
+
+ $machine->succeed("nix-env -i coreutils >&2");
+ $machine->succeed("type -tP ls | tee /dev/stderr") =~ /.nix-profile/
+ or die "nix-env failed";
+
+ $machine->succeed("nixos-rebuild switch >&2");
+
+ $machine->shutdown;
+
+ my $machine = createMachine({ #hda => "harddisk",
+# hdaInterface => "virtio",
+ qemuFlags => '-L ${biosDir} ${optionalString (pkgs.stdenv.system == "x86_64-linux") "-cpu kvm64"} -hda ' . Cwd::abs_path('harddisk')});
+ $machine->waitForUnit("network.target");
+ $machine->shutdown;
+ '';
+ };
+}
diff --git a/nixos/tests/firefox.nix b/nixos/tests/firefox.nix
new file mode 100644
index 0000000000000000000000000000000000000000..d6599be13c9eeae38a3294d050b351b4ae091416
--- /dev/null
+++ b/nixos/tests/firefox.nix
@@ -0,0 +1,21 @@
+{ pkgs, ... }:
+
+{
+
+ machine =
+ { config, pkgs, ... }:
+
+ { imports = [ ./common/x11.nix ];
+ environment.systemPackages = [ pkgs.firefox ];
+ };
+
+ testScript =
+ ''
+ $machine->waitForX;
+ $machine->execute("firefox file://${pkgs.valgrind}/share/doc/valgrind/html/index.html &");
+ $machine->waitForWindow(qr/Valgrind/);
+ $machine->sleep(40); # wait until Firefox has finished loading the page
+ $machine->screenshot("screen");
+ '';
+
+}
diff --git a/nixos/tests/firewall.nix b/nixos/tests/firewall.nix
new file mode 100644
index 0000000000000000000000000000000000000000..de32b98e5d2f71ad7a503497c7825db1e4c61f4d
--- /dev/null
+++ b/nixos/tests/firewall.nix
@@ -0,0 +1,48 @@
+# Test the firewall module.
+
+{ pkgs, ... }:
+
+{
+
+ nodes =
+ { walled =
+ { config, pkgs, nodes, ... }:
+ { networking.firewall.enable = true;
+ networking.firewall.logRefusedPackets = true;
+ services.httpd.enable = true;
+ services.httpd.adminAddr = "foo@example.org";
+ };
+
+ attacker =
+ { config, pkgs, ... }:
+ { services.httpd.enable = true;
+ services.httpd.adminAddr = "foo@example.org";
+ };
+ };
+
+ testScript =
+ { nodes, ... }:
+ ''
+ startAll;
+
+ $walled->waitForUnit("firewall");
+ $walled->waitForUnit("httpd");
+ $attacker->waitForUnit("network.target");
+
+ # Local connections should still work.
+ $walled->succeed("curl -v http://localhost/ >&2");
+
+ # Connections to the firewalled machine should fail.
+ $attacker->fail("curl -v http://walled/ >&2");
+ $attacker->fail("ping -c 1 walled >&2");
+
+ # Outgoing connections/pings should still work.
+ $walled->succeed("curl -v http://attacker/ >&2");
+ $walled->succeed("ping -c 1 attacker >&2");
+
+ # If we stop the firewall, then connections should succeed.
+ $walled->stopJob("firewall");
+ $attacker->succeed("curl -v http://walled/ >&2");
+ '';
+
+}
diff --git a/nixos/tests/installer.nix b/nixos/tests/installer.nix
new file mode 100644
index 0000000000000000000000000000000000000000..bebd6c04374b4a46edd9cff37bd763329c584e30
--- /dev/null
+++ b/nixos/tests/installer.nix
@@ -0,0 +1,354 @@
+{ pkgs, system, ... }:
+
+with pkgs.lib;
+with import ../lib/qemu-flags.nix;
+
+let
+
+ # Build the ISO. This is the regular installation CD but with test
+ # instrumentation.
+ iso =
+ (import ../lib/eval-config.nix {
+ inherit system;
+ modules =
+ [ ../modules/installer/cd-dvd/installation-cd-graphical.nix
+ ../modules/testing/test-instrumentation.nix
+ { key = "serial";
+ boot.loader.grub.timeout = mkOverrideTemplate 0 {} 0;
+
+ # The test cannot access the network, so any sources we
+ # need must be included in the ISO.
+ isoImage.storeContents =
+ [ pkgs.glibcLocales
+ pkgs.sudo
+ pkgs.docbook5
+ pkgs.docbook5_xsl
+ pkgs.grub
+ pkgs.perlPackages.XMLLibXML
+ pkgs.unionfs-fuse
+ ];
+ }
+ ];
+ }).config.system.build.isoImage;
+
+
+ # The configuration to install.
+ config = { fileSystems, testChannel, grubVersion, grubDevice }: pkgs.writeText "configuration.nix"
+ ''
+ { config, pkgs, modulesPath, ... }:
+
+ { imports =
+ [ ./hardware-configuration.nix
+ "''${modulesPath}/testing/test-instrumentation.nix"
+ ];
+
+ boot.loader.grub.version = ${toString grubVersion};
+ ${optionalString (grubVersion == 1) ''
+ boot.loader.grub.splashImage = null;
+ ''}
+ boot.loader.grub.device = "${grubDevice}";
+ boot.loader.grub.extraConfig = "serial; terminal_output.serial";
+ boot.initrd.kernelModules = [ "virtio_console" ];
+
+ environment.systemPackages = [ ${optionalString testChannel "pkgs.rlwrap"} ];
+ }
+ '';
+
+ rootFS =
+ ''
+ fileSystems."/".device = "/dev/disk/by-label/nixos";
+ '';
+
+ bootFS =
+ ''
+ fileSystems."/boot".device = "/dev/disk/by-label/boot";
+ '';
+
+
+ # Configuration of a web server that simulates the Nixpkgs channel
+ # distribution server.
+ webserver =
+ { config, pkgs, ... }:
+
+ { services.httpd.enable = true;
+ services.httpd.adminAddr = "foo@example.org";
+ services.httpd.servedDirs = singleton
+ { urlPath = "/";
+ dir = "/tmp/channel";
+ };
+
+ virtualisation.writableStore = true;
+ virtualisation.pathsInNixDB = channelContents ++ [ pkgs.hello.src ];
+ virtualisation.memorySize = 768;
+ };
+
+ channelContents = [ pkgs.rlwrap ];
+
+
+ # The test script boots the CD, installs NixOS on an empty hard
+ # disk, and then reboot from the hard disk. It's parameterized with
+ # a test script fragment `createPartitions', which must create
+ # partitions and filesystems, and a configuration.nix fragment
+ # `fileSystems'.
+ testScriptFun = { createPartitions, fileSystems, testChannel, grubVersion, grubDevice }:
+ let iface = if grubVersion == 1 then "scsi" else "virtio"; in
+ ''
+ createDisk("harddisk", 4 * 1024);
+
+ my $machine = createMachine({ hda => "harddisk",
+ hdaInterface => "${iface}",
+ cdrom => glob("${iso}/iso/*.iso"),
+ qemuFlags => '${optionalString testChannel (toString (qemuNICFlags 1 1 2))} ${optionalString (pkgs.stdenv.system == "x86_64-linux") "-cpu kvm64"}'});
+ $machine->start;
+
+ ${optionalString testChannel ''
+ # Create a channel on the web server containing a few packages
+ # to simulate the Nixpkgs channel.
+ $webserver->start;
+ $webserver->waitForUnit("httpd");
+ $webserver->succeed(
+ "nix-push --bzip2 --dest /tmp/channel --manifest --url-prefix http://nixos.org/channels/nixos-unstable " .
+ "${toString channelContents} >&2");
+ $webserver->succeed("mkdir /tmp/channel/sha256");
+ $webserver->succeed("cp ${pkgs.hello.src} /tmp/channel/sha256/${pkgs.hello.src.outputHash}");
+ ''}
+
+ # Make sure that we get a login prompt etc.
+ $machine->succeed("echo hello");
+ #$machine->waitForUnit('getty@tty2');
+ $machine->waitForUnit("rogue");
+ $machine->waitForUnit("nixos-manual");
+ $machine->waitForUnit("dhcpcd");
+
+ ${optionalString testChannel ''
+ # Allow the machine to talk to the fake nixos.org.
+ $machine->succeed(
+ "rm /etc/hosts",
+ "echo 192.168.1.1 nixos.org cache.nixos.org tarballs.nixos.org > /etc/hosts",
+ "ifconfig eth1 up 192.168.1.2",
+ );
+
+ # Test nix-env.
+ $machine->fail("hello");
+ $machine->succeed("nix-env -i hello");
+ $machine->succeed("hello") =~ /Hello, world/
+ or die "bad `hello' output";
+ ''}
+
+ # Partition the disk.
+ ${createPartitions}
+
+ # Create the NixOS configuration.
+ $machine->succeed(
+ "nixos-generate-config --root /mnt",
+ );
+
+ $machine->succeed("cat /mnt/etc/nixos/hardware-configuration.nix >&2");
+
+ $machine->copyFileFromHost(
+ "${ config { inherit fileSystems testChannel grubVersion grubDevice; } }",
+ "/mnt/etc/nixos/configuration.nix");
+
+ # Perform the installation.
+ $machine->succeed("nixos-install >&2");
+
+ # Do it again to make sure it's idempotent.
+ $machine->succeed("nixos-install >&2");
+
+ $machine->shutdown;
+
+ # Now see if we can boot the installation.
+ my $machine = createMachine({ hda => "harddisk", hdaInterface => "${iface}" });
+
+ # Did /boot get mounted, if appropriate?
+ $machine->waitForUnit("local-fs.target");
+ $machine->succeed("test -e /boot/grub");
+
+ # Did the swap device get activated?
+ $machine->waitForUnit("swap.target");
+ $machine->succeed("cat /proc/swaps | grep -q /dev");
+
+ $machine->succeed("nix-env -i coreutils >&2");
+ $machine->succeed("type -tP ls | tee /dev/stderr") =~ /.nix-profile/
+ or die "nix-env failed";
+
+ $machine->succeed("nixos-rebuild switch >&2");
+
+ # Test nixos-option.
+ $machine->succeed("nixos-option boot.initrd.kernelModules | grep virtio_console");
+ $machine->succeed("nixos-option -d boot.initrd.kernelModules | grep 'List of modules'");
+ $machine->succeed("nixos-option -l boot.initrd.kernelModules | grep /etc/nixos/configuration.nix");
+
+ $machine->shutdown;
+
+ # And just to be sure, check that the machine still boots after
+ # "nixos-rebuild switch".
+ my $machine = createMachine({ hda => "harddisk", hdaInterface => "${iface}" });
+ $machine->waitForUnit("network.target");
+ $machine->shutdown;
+ '';
+
+
+ makeTest = { createPartitions, fileSystems, testChannel ? false, grubVersion ? 2, grubDevice ? "/dev/vda" }:
+ { inherit iso;
+ nodes = if testChannel then { inherit webserver; } else { };
+ testScript = testScriptFun {
+ inherit createPartitions fileSystems testChannel grubVersion grubDevice;
+ };
+ };
+
+
+in {
+
+ # !!! `parted mkpart' seems to silently create overlapping partitions.
+
+
+ # The (almost) simplest partitioning scheme: a swap partition and
+ # one big filesystem partition.
+ simple = makeTest
+ { createPartitions =
+ ''
+ $machine->succeed(
+ "parted /dev/vda mklabel msdos",
+ "parted /dev/vda -- mkpart primary linux-swap 1M 1024M",
+ "parted /dev/vda -- mkpart primary ext2 1024M -1s",
+ "udevadm settle",
+ "mkswap /dev/vda1 -L swap",
+ "swapon -L swap",
+ "mkfs.ext3 -L nixos /dev/vda2",
+ "mount LABEL=nixos /mnt",
+ );
+ '';
+ fileSystems = rootFS;
+ testChannel = true;
+ };
+
+ # Same as the previous, but now with a separate /boot partition.
+ separateBoot = makeTest
+ { createPartitions =
+ ''
+ $machine->succeed(
+ "parted /dev/vda mklabel msdos",
+ "parted /dev/vda -- mkpart primary ext2 1M 50MB", # /boot
+ "parted /dev/vda -- mkpart primary linux-swap 50MB 1024M",
+ "parted /dev/vda -- mkpart primary ext2 1024M -1s", # /
+ "udevadm settle",
+ "mkswap /dev/vda2 -L swap",
+ "swapon -L swap",
+ "mkfs.ext3 -L nixos /dev/vda3",
+ "mount LABEL=nixos /mnt",
+ "mkfs.ext3 -L boot /dev/vda1",
+ "mkdir /mnt/boot",
+ "mount LABEL=boot /mnt/boot",
+ );
+ '';
+ fileSystems = rootFS + bootFS;
+ };
+
+ # Create two physical LVM partitions combined into one volume group
+ # that contains the logical swap and root partitions.
+ lvm = makeTest
+ { createPartitions =
+ ''
+ $machine->succeed(
+ "parted /dev/vda mklabel msdos",
+ "parted /dev/vda -- mkpart primary 1M 2048M", # first PV
+ "parted /dev/vda -- set 1 lvm on",
+ "parted /dev/vda -- mkpart primary 2048M -1s", # second PV
+ "parted /dev/vda -- set 2 lvm on",
+ "udevadm settle",
+ "pvcreate /dev/vda1 /dev/vda2",
+ "vgcreate MyVolGroup /dev/vda1 /dev/vda2",
+ "lvcreate --size 1G --name swap MyVolGroup",
+ "lvcreate --size 2G --name nixos MyVolGroup",
+ "mkswap -f /dev/MyVolGroup/swap -L swap",
+ "swapon -L swap",
+ "mkfs.xfs -L nixos /dev/MyVolGroup/nixos",
+ "mount LABEL=nixos /mnt",
+ );
+ '';
+ fileSystems = rootFS;
+ };
+
+ /*
+ swraid = makeTest
+ { createPartitions =
+ ''
+ $machine->succeed(
+ "parted /dev/vda --"
+ . " mklabel msdos"
+ . " mkpart primary ext2 1M 30MB" # /boot
+ . " mkpart extended 30M -1s"
+ . " mkpart logical 31M 1531M" # md0 (root), first device
+ . " mkpart logical 1540M 3040M" # md0 (root), second device
+ . " mkpart logical 3050M 3306M" # md1 (swap), first device
+ . " mkpart logical 3320M 3576M", # md1 (swap), second device
+ "udevadm settle",
+ "ls -l /dev/vda* >&2",
+ "cat /proc/partitions >&2",
+ "mdadm --create --force /dev/md0 --metadata 1.2 --level=raid1 --raid-devices=2 /dev/vda5 /dev/vda6",
+ "mdadm --create --force /dev/md1 --metadata 1.2 --level=raid1 --raid-devices=2 /dev/vda7 /dev/vda8",
+ "udevadm settle",
+ "mkswap -f /dev/md1 -L swap",
+ "swapon -L swap",
+ "mkfs.ext3 -L nixos /dev/md0",
+ "mount LABEL=nixos /mnt",
+ "mkfs.ext3 -L boot /dev/vda1",
+ "mkdir /mnt/boot",
+ "mount LABEL=boot /mnt/boot",
+ "udevadm settle",
+ "mdadm -W /dev/md0", # wait for sync to finish; booting off an unsynced device tends to fail
+ "mdadm -W /dev/md1",
+ );
+ '';
+ fileSystems = rootFS + bootFS;
+ };
+ */
+
+ # Test a basic install using GRUB 1.
+ grub1 = makeTest
+ { createPartitions =
+ ''
+ $machine->succeed(
+ "parted /dev/sda mklabel msdos",
+ "parted /dev/sda -- mkpart primary linux-swap 1M 1024M",
+ "parted /dev/sda -- mkpart primary ext2 1024M -1s",
+ "udevadm settle",
+ "mkswap /dev/sda1 -L swap",
+ "swapon -L swap",
+ "mkfs.ext3 -L nixos /dev/sda2",
+ "mount LABEL=nixos /mnt",
+ );
+ '';
+ fileSystems = rootFS;
+ grubVersion = 1;
+ grubDevice = "/dev/sda";
+ };
+
+ # Rebuild the CD configuration with a little modification.
+ rebuildCD =
+ { inherit iso;
+ nodes = { };
+ testScript =
+ ''
+ my $machine = createMachine({ cdrom => glob("${iso}/iso/*.iso"), qemuFlags => '-m 768' });
+ $machine->start;
+
+ # Enable sshd service.
+ $machine->succeed(
+ "sed -i 's,^}\$,systemd.services.sshd.wantedBy = pkgs.lib.mkOverride 0 [\"multi-user.target\"]; },' /etc/nixos/configuration.nix"
+ );
+
+ $machine->succeed("cat /etc/nixos/configuration.nix >&2");
+
+ # Apply the new CD configuration.
+ $machine->succeed("nixos-rebuild test");
+
+ # Connect to it-self.
+ $machine->waitForUnit("sshd");
+ $machine->waitForOpenPort(22);
+
+ $machine->shutdown;
+ '';
+ };
+}
diff --git a/nixos/tests/ipv6.nix b/nixos/tests/ipv6.nix
new file mode 100644
index 0000000000000000000000000000000000000000..29d675e180a3f691363f70a90908554284e7fd0f
--- /dev/null
+++ b/nixos/tests/ipv6.nix
@@ -0,0 +1,76 @@
+# Test of IPv6 functionality in NixOS, including whether router
+# solicication/advertisement using radvd works.
+
+{ pkgs, ... }:
+
+{
+
+ nodes =
+ { client = { config, pkgs, ... }: { };
+
+ server =
+ { config, pkgs, ... }:
+ { services.httpd.enable = true;
+ services.httpd.adminAddr = "foo@example.org";
+ };
+
+ router =
+ { config, pkgs, ... }:
+ { services.radvd.enable = true;
+ services.radvd.config =
+ ''
+ interface eth1 {
+ AdvSendAdvert on;
+ # ULA prefix (RFC 4193).
+ prefix fd60:cc69:b537:1::/64 { };
+ };
+ '';
+ };
+ };
+
+ testScript =
+ ''
+ # Start the router first so that it respond to router solicitations.
+ $router->waitForUnit("radvd");
+
+ startAll;
+
+ $client->waitForUnit("network.target");
+ $server->waitForUnit("network.target");
+
+ # Wait until the given interface has a non-tentative address of
+ # the desired scope (i.e. has completed Duplicate Address
+ # Detection).
+ sub waitForAddress {
+ my ($machine, $iface, $scope) = @_;
+ $machine->waitUntilSucceeds("[ `ip -o -6 addr show dev $iface scope $scope | grep -v tentative | wc -l` -eq 1 ]");
+ my $ip = (split /[ \/]+/, $machine->succeed("ip -o -6 addr show dev $iface scope $scope"))[3];
+ $machine->log("$scope address on $iface is $ip");
+ return $ip;
+ }
+
+ subtest "loopback address", sub {
+ $client->succeed("ping6 -c 1 ::1 >&2");
+ $client->fail("ping6 -c 1 ::2 >&2");
+ };
+
+ subtest "local link addressing", sub {
+ my $clientIp = waitForAddress $client, "eth1", "link";
+ my $serverIp = waitForAddress $server, "eth1", "link";
+ $client->succeed("ping6 -c 1 -I eth1 $clientIp >&2");
+ $client->succeed("ping6 -c 1 -I eth1 $serverIp >&2");
+ };
+
+ subtest "global addressing", sub {
+ my $clientIp = waitForAddress $client, "eth1", "global";
+ my $serverIp = waitForAddress $server, "eth1", "global";
+ $client->succeed("ping6 -c 1 $clientIp >&2");
+ $client->succeed("ping6 -c 1 $serverIp >&2");
+ $client->succeed("curl --fail -g http://[$serverIp]");
+ $client->fail("curl --fail -g http://[$clientIp]");
+ };
+
+ # TODO: test reachability of a machine on another network.
+ '';
+
+}
diff --git a/nixos/tests/kde4.nix b/nixos/tests/kde4.nix
new file mode 100644
index 0000000000000000000000000000000000000000..3fb35bbab09850213bf7a11c7f15aab7aa8c1e2d
--- /dev/null
+++ b/nixos/tests/kde4.nix
@@ -0,0 +1,67 @@
+{ pkgs, ... }:
+
+{
+
+ machine =
+ { config, pkgs, ... }:
+
+ { imports = [ ./common/user-account.nix ];
+
+ virtualisation.memorySize = 768;
+
+ services.xserver.enable = true;
+
+ services.httpd.enable = true;
+ services.httpd.adminAddr = "foo@example.org";
+ services.httpd.documentRoot = "${pkgs.valgrind}/share/doc/valgrind/html";
+
+ services.xserver.displayManager.kdm.enable = true;
+ services.xserver.displayManager.kdm.extraConfig =
+ ''
+ [X-:0-Core]
+ AutoLoginEnable=true
+ AutoLoginUser=alice
+ AutoLoginPass=foobar
+ '';
+
+ services.xserver.desktopManager.kde4.enable = true;
+
+ # Include most of KDE. We don't really test these here, but at
+ # least they should build.
+ environment.systemPackages =
+ [ pkgs.kde4.kdemultimedia
+ pkgs.kde4.kdegraphics
+ pkgs.kde4.kdeutils
+ pkgs.kde4.kdegames
+ pkgs.kde4.kdeedu
+ pkgs.kde4.kdeaccessibility
+ pkgs.kde4.kdeadmin
+ pkgs.kde4.kdenetwork
+ pkgs.kde4.kdetoys
+ pkgs.kde4.kdewebdev
+ ];
+ };
+
+ testScript =
+ ''
+ $machine->waitUntilSucceeds("pgrep plasma-desktop");
+ $machine->waitForWindow(qr/plasma-desktop/);
+
+ # Check that logging in has given the user ownership of devices.
+ $machine->succeed("getfacl /dev/snd/timer | grep -q alice");
+
+ $machine->execute("su - alice -c 'DISPLAY=:0.0 kwrite /var/log/messages &'");
+ $machine->waitForWindow(qr/messages.*KWrite/);
+
+ $machine->execute("su - alice -c 'DISPLAY=:0.0 konqueror http://localhost/ &'");
+ $machine->waitForWindow(qr/Valgrind.*Konqueror/);
+
+ $machine->execute("su - alice -c 'DISPLAY=:0.0 gwenview ${pkgs.kde4.kde_wallpapers}/share/wallpapers/Hanami/contents/images/1280x1024.jpg &'");
+ $machine->waitForWindow(qr/Gwenview/);
+
+ $machine->sleep(10);
+
+ $machine->screenshot("screen");
+ '';
+
+}
diff --git a/nixos/tests/kexec.nix b/nixos/tests/kexec.nix
new file mode 100644
index 0000000000000000000000000000000000000000..b8da332b919b453c9f12a5a5b4f2f9568200a82e
--- /dev/null
+++ b/nixos/tests/kexec.nix
@@ -0,0 +1,18 @@
+# Test whether fast reboots via kexec work.
+
+{ pkgs, ... }:
+
+{
+
+ machine = { config, pkgs, ... }:
+ { virtualisation.vlans = [ ]; };
+
+ testScript =
+ ''
+ $machine->waitForUnit("multi-user.target");
+ $machine->execute("systemctl kexec &");
+ $machine->{connected} = 0;
+ $machine->waitForUnit("multi-user.target");
+ '';
+
+}
diff --git a/nixos/tests/login.nix b/nixos/tests/login.nix
new file mode 100644
index 0000000000000000000000000000000000000000..ed7d978671798b10e04603d7152010988fd1d480
--- /dev/null
+++ b/nixos/tests/login.nix
@@ -0,0 +1,61 @@
+config: { pkgs, ... }:
+
+{
+
+ machine = config;
+
+ testScript =
+ ''
+ $machine->waitForUnit("default.target");
+ $machine->screenshot("postboot");
+
+ subtest "create user", sub {
+ $machine->succeed("useradd -m alice");
+ $machine->succeed("(echo foobar; echo foobar) | passwd alice");
+ };
+
+ # Check whether switching VTs works.
+ subtest "virtual console switching", sub {
+ $machine->sendKeys("alt-f2");
+ $machine->waitUntilSucceeds("[ \$(fgconsole) = 2 ]");
+ $machine->waitForUnit('getty@tty2.service');
+ };
+
+ # Log in as alice on a virtual console.
+ subtest "virtual console login", sub {
+ $machine->sleep(2); # urgh: wait for username prompt
+ $machine->sendChars("alice\n");
+ $machine->waitUntilSucceeds("pgrep login");
+ $machine->sleep(2); # urgh: wait for `Password:'
+ $machine->sendChars("foobar\n");
+ $machine->waitUntilSucceeds("pgrep -u alice bash");
+ $machine->sendChars("touch done\n");
+ $machine->waitForFile("/home/alice/done");
+ };
+
+ # Check whether systemd gives and removes device ownership as
+ # needed.
+ subtest "device permissions", sub {
+ $machine->succeed("getfacl /dev/snd/timer | grep -q alice");
+ $machine->sendKeys("alt-f1");
+ $machine->waitUntilSucceeds("[ \$(fgconsole) = 1 ]");
+ $machine->fail("getfacl /dev/snd/timer | grep -q alice");
+ $machine->succeed("chvt 2");
+ $machine->waitUntilSucceeds("getfacl /dev/snd/timer | grep -q alice");
+ };
+
+ # Log out.
+ subtest "virtual console logout", sub {
+ $machine->sendChars("exit\n");
+ $machine->waitUntilFails("pgrep -u alice bash");
+ $machine->screenshot("mingetty");
+ };
+
+ # Check whether ctrl-alt-delete works.
+ subtest "ctrl-alt-delete", sub {
+ $machine->sendKeys("ctrl-alt-delete");
+ $machine->waitForShutdown;
+ };
+ '';
+
+}
diff --git a/nixos/tests/misc.nix b/nixos/tests/misc.nix
new file mode 100644
index 0000000000000000000000000000000000000000..12ac6f6f9a670c4f9a2ae1f99784016e24fe0981
--- /dev/null
+++ b/nixos/tests/misc.nix
@@ -0,0 +1,64 @@
+# Miscellaneous small tests that don't warrant their own VM run.
+
+{ pkgs, ... }:
+
+{
+
+ machine =
+ { config, pkgs, ... }:
+ { swapDevices = pkgs.lib.mkOverride 0
+ [ { device = "/root/swapfile"; size = 128; } ];
+ environment.variables.EDITOR = pkgs.lib.mkOverride 0 "emacs";
+ services.nixosManual.enable = pkgs.lib.mkOverride 0 true;
+ };
+
+ testScript =
+ ''
+ subtest "nixos-version", sub {
+ $machine->succeed("[ `nixos-version | wc -w` = 2 ]");
+ };
+
+ subtest "nixos-rebuild", sub {
+ $machine->succeed("nixos-rebuild --help | grep SYNOPSIS");
+ };
+
+ # Sanity check for uid/gid assignment.
+ subtest "users-groups", sub {
+ $machine->succeed("[ `id -u messagebus` = 4 ]");
+ $machine->succeed("[ `id -g messagebus` = 4 ]");
+ $machine->succeed("[ `getent group users` = 'users:x:100:' ]");
+ };
+
+ # Regression test for GMP aborts on QEMU.
+ subtest "gmp", sub {
+ $machine->succeed("expr 1 + 2");
+ };
+
+ # Test that the swap file got created.
+ subtest "swapfile", sub {
+ $machine->waitForUnit("root-swapfile.swap");
+ $machine->succeed("ls -l /root/swapfile | grep 134217728");
+ };
+
+ # Test whether kernel.poweroff_cmd is set.
+ subtest "poweroff_cmd", sub {
+ $machine->succeed("[ -x \"\$(cat /proc/sys/kernel/poweroff_cmd)\" ]")
+ };
+
+ # Test whether the blkio controller is properly enabled.
+ subtest "blkio-cgroup", sub {
+ $machine->succeed("[ -n \"\$(cat /sys/fs/cgroup/blkio/blkio.sectors)\" ]")
+ };
+
+ # Test whether we have a reboot record in wtmp.
+ subtest "reboot-wtmp", sub {
+ $machine->succeed("last | grep reboot >&2");
+ };
+
+ # Test whether we can override environment variables.
+ subtest "override-env-var", sub {
+ $machine->succeed('[ "$EDITOR" = emacs ]');
+ };
+ '';
+
+}
diff --git a/nixos/tests/mpich-example.c b/nixos/tests/mpich-example.c
new file mode 100644
index 0000000000000000000000000000000000000000..c48e3c45b72eb2046408f7561c96d53e79478961
--- /dev/null
+++ b/nixos/tests/mpich-example.c
@@ -0,0 +1,21 @@
+#include
+#include
+#include
+
+int
+main (int argc, char *argv[])
+{
+ int rank, size, length;
+ char name[BUFSIZ];
+
+ MPI_Init (&argc, &argv);
+ MPI_Comm_rank (MPI_COMM_WORLD, &rank);
+ MPI_Comm_size (MPI_COMM_WORLD, &size);
+ MPI_Get_processor_name (name, &length);
+
+ printf ("%s: hello world from process %d of %d\n", name, rank, size);
+
+ MPI_Finalize ();
+
+ return EXIT_SUCCESS;
+}
diff --git a/nixos/tests/mpich.nix b/nixos/tests/mpich.nix
new file mode 100644
index 0000000000000000000000000000000000000000..d57512ebdfedd4b113a5159e3e09c6038cecb76f
--- /dev/null
+++ b/nixos/tests/mpich.nix
@@ -0,0 +1,40 @@
+# Simple example to showcase distributed tests using NixOS VMs.
+
+{ pkgs, ... }:
+
+with pkgs;
+
+{
+ nodes = {
+ master =
+ { config, pkgs, ... }: {
+ environment.systemPackages = [ gcc mpich2 ];
+ #boot.kernelPackages = pkgs.kernelPackages_2_6_29;
+ };
+
+ slave =
+ { config, pkgs, ... }: {
+ environment.systemPackages = [ gcc mpich2 ];
+ };
+ };
+
+ # Start master/slave MPI daemons and compile/run a program that uses both
+ # nodes.
+ testScript =
+ ''
+ startAll;
+
+ $master->succeed("echo 'MPD_SECRETWORD=secret' > /etc/mpd.conf");
+ $master->succeed("chmod 600 /etc/mpd.conf");
+ $master->succeed("mpd --daemon --ifhn=master --listenport=4444");
+
+ $slave->succeed("echo 'MPD_SECRETWORD=secret' > /etc/mpd.conf");
+ $slave->succeed("chmod 600 /etc/mpd.conf");
+ $slave->succeed("mpd --daemon --host=master --port=4444");
+
+ $master->succeed("mpicc -o example -Wall ${./mpich-example.c}");
+ $slave->succeed("mpicc -o example -Wall ${./mpich-example.c}");
+
+ $master->succeed("mpiexec -n 2 ./example >&2");
+ '';
+}
diff --git a/nixos/tests/mysql-replication.nix b/nixos/tests/mysql-replication.nix
new file mode 100644
index 0000000000000000000000000000000000000000..28a1187dd184c431310cf88071e5c2076c3d1342
--- /dev/null
+++ b/nixos/tests/mysql-replication.nix
@@ -0,0 +1,57 @@
+{ pkgs, ... }:
+
+let
+ replicateUser = "replicate";
+ replicatePassword = "secret";
+in
+{
+ nodes = {
+ master =
+ { pkgs, config, ... }:
+
+ {
+ services.mysql.enable = true;
+ services.mysql.replication.role = "master";
+ services.mysql.initialDatabases = [ { name = "testdb"; schema = ./testdb.sql; } ];
+ services.mysql.initialScript = pkgs.writeText "initmysql"
+ ''
+ create user '${replicateUser}'@'%' identified by '${replicatePassword}';
+ grant replication slave on *.* to '${replicateUser}'@'%';
+ '';
+ };
+
+ slave1 =
+ { pkgs, config, nodes, ... }:
+
+ {
+ services.mysql.enable = true;
+ services.mysql.replication.role = "slave";
+ services.mysql.replication.serverId = 2;
+ services.mysql.replication.masterHost = nodes.master.config.networking.hostName;
+ services.mysql.replication.masterUser = replicateUser;
+ services.mysql.replication.masterPassword = replicatePassword;
+ };
+
+ slave2 =
+ { pkgs, config, nodes, ... }:
+
+ {
+ services.mysql.enable = true;
+ services.mysql.replication.role = "slave";
+ services.mysql.replication.serverId = 3;
+ services.mysql.replication.masterHost = nodes.master.config.networking.hostName;
+ services.mysql.replication.masterUser = replicateUser;
+ services.mysql.replication.masterPassword = replicatePassword;
+ };
+ };
+
+ testScript = ''
+ startAll;
+
+ $master->waitForUnit("mysql");
+ $master->waitForUnit("mysql");
+ $slave2->waitForUnit("mysql");
+ $slave2->sleep(100); # Hopefully this is long enough!!
+ $slave2->succeed("echo 'use testdb; select * from tests' | mysql -u root -N | grep 4");
+ '';
+}
diff --git a/nixos/tests/mysql.nix b/nixos/tests/mysql.nix
new file mode 100644
index 0000000000000000000000000000000000000000..b48850738b72250cae6bfbd3f4e39e9162368b53
--- /dev/null
+++ b/nixos/tests/mysql.nix
@@ -0,0 +1,22 @@
+{ pkgs, ... }:
+
+{
+ nodes = {
+ master =
+ { pkgs, config, ... }:
+
+ {
+ services.mysql.enable = true;
+ services.mysql.replication.role = "master";
+ services.mysql.initialDatabases = [ { name = "testdb"; schema = ./testdb.sql; } ];
+ };
+ };
+
+ testScript = ''
+ startAll;
+
+ $master->waitForUnit("mysql");
+ $master->sleep(10); # Hopefully this is long enough!!
+ $master->succeed("echo 'use testdb; select * from tests' | mysql -u root -N | grep 4");
+ '';
+}
diff --git a/nixos/tests/nat.nix b/nixos/tests/nat.nix
new file mode 100644
index 0000000000000000000000000000000000000000..55d87ed4fa14dc770b57f840f4f1166ebe4c2dc4
--- /dev/null
+++ b/nixos/tests/nat.nix
@@ -0,0 +1,77 @@
+# This is a simple distributed test involving a topology with two
+# separate virtual networks - the "inside" and the "outside" - with a
+# client on the inside network, a server on the outside network, and a
+# router connected to both that performs Network Address Translation
+# for the client.
+
+{ pkgs, ... }:
+
+{
+
+ nodes =
+ { client =
+ { config, pkgs, nodes, ... }:
+ { virtualisation.vlans = [ 1 ];
+ networking.defaultGateway =
+ nodes.router.config.networking.interfaces.eth2.ipAddress;
+ };
+
+ router =
+ { config, pkgs, ... }:
+ { virtualisation.vlans = [ 2 1 ];
+ networking.nat.enable = true;
+ networking.nat.internalIPs = "192.168.1.0/24";
+ networking.nat.externalInterface = "eth1";
+ };
+
+ server =
+ { config, pkgs, ... }:
+ { virtualisation.vlans = [ 2 ];
+ services.httpd.enable = true;
+ services.httpd.adminAddr = "foo@example.org";
+ services.vsftpd.enable = true;
+ services.vsftpd.anonymousUser = true;
+ };
+ };
+
+ testScript =
+ { nodes, ... }:
+ ''
+ startAll;
+
+ # The router should have access to the server.
+ $server->waitForUnit("network.target");
+ $server->waitForUnit("httpd");
+ $router->waitForUnit("network.target");
+ $router->succeed("curl --fail http://server/ >&2");
+
+ # The client should be also able to connect via the NAT router.
+ $router->waitForUnit("nat");
+ $client->waitForUnit("network.target");
+ $client->succeed("curl --fail http://server/ >&2");
+ $client->succeed("ping -c 1 server >&2");
+
+ # Test whether passive FTP works.
+ $server->waitForUnit("vsftpd");
+ $server->succeed("echo Hello World > /home/ftp/foo.txt");
+ $client->succeed("curl -v ftp://server/foo.txt >&2");
+
+ # Test whether active FTP works.
+ $client->succeed("curl -v -P - ftp://server/foo.txt >&2");
+
+ # Test ICMP.
+ $client->succeed("ping -c 1 router >&2");
+ $router->succeed("ping -c 1 client >&2");
+
+ # If we turn off NAT, the client shouldn't be able to reach the server.
+ $router->stopJob("nat");
+ $client->fail("curl --fail --connect-timeout 5 http://server/ >&2");
+ $client->fail("ping -c 1 server >&2");
+
+ # And make sure that restarting the NAT job works.
+ $router->succeed("systemctl start nat");
+ $client->succeed("curl --fail http://server/ >&2");
+ $client->succeed("ping -c 1 server >&2");
+ '';
+
+}
diff --git a/nixos/tests/nfs.nix b/nixos/tests/nfs.nix
new file mode 100644
index 0000000000000000000000000000000000000000..ee65c298dd00f10a11a55407db587df072e5b32a
--- /dev/null
+++ b/nixos/tests/nfs.nix
@@ -0,0 +1,85 @@
+{ version }:
+
+{ pkgs, ... }:
+
+let
+
+ client =
+ { config, pkgs, ... }:
+ { fileSystems = pkgs.lib.mkOverride 50
+ [ { mountPoint = "/data";
+ device = "server:${if version == 4 then "/" else "/data"}";
+ fsType = "nfs";
+ options = "vers=${toString version}";
+ }
+ ];
+ };
+
+in
+
+{
+
+ nodes =
+ { client1 = client;
+ client2 = client;
+
+ server =
+ { config, pkgs, ... }:
+ { services.nfs.server.enable = true;
+ services.nfs.server.exports =
+ ''
+ /data 192.168.1.0/255.255.255.0(rw,no_root_squash,no_subtree_check,fsid=0)
+ '';
+ services.nfs.server.createMountPoints = true;
+ };
+ };
+
+ testScript =
+ ''
+ $server->waitForUnit("nfsd");
+ $server->waitForUnit("network.target");
+
+ startAll;
+
+ $client1->waitForUnit("data.mount");
+ $client1->succeed("echo bla > /data/foo");
+ $server->succeed("test -e /data/foo");
+
+ $client2->waitForUnit("data.mount");
+ $client2->succeed("echo bla > /data/bar");
+ $server->succeed("test -e /data/bar");
+
+ # Test whether restarting ‘nfsd’ works correctly.
+ $server->succeed("systemctl restart nfsd");
+ $client2->succeed("echo bla >> /data/bar"); # will take 90 seconds due to the NFS grace period
+
+ # Test whether we can get a lock.
+ $client2->succeed("time flock -n -s /data/lock true");
+
+ # Test locking: client 1 acquires an exclusive lock, so client 2
+ # should then fail to acquire a shared lock.
+ $client1->succeed("flock -x /data/lock -c 'touch locked; sleep 100000' &");
+ $client1->waitForFile("locked");
+ $client2->fail("flock -n -s /data/lock true");
+
+ # Test whether client 2 obtains the lock if we reset client 1.
+ $client2->succeed("flock -x /data/lock -c 'echo acquired; touch locked; sleep 100000' >&2 &");
+ $client1->crash;
+ $client1->start;
+ $client2->waitForFile("locked");
+
+ # Test whether locks survive a reboot of the server.
+ $client1->waitForUnit("data.mount");
+ $server->shutdown;
+ $server->start;
+ $client1->succeed("touch /data/xyzzy");
+ $client1->fail("time flock -n -s /data/lock true");
+
+ # Test whether unmounting during shutdown happens quickly.
+ my $t1 = time;
+ $client1->shutdown;
+ my $duration = time - $t1;
+ die "shutdown took too long ($duration seconds)" if $duration > 30;
+ '';
+
+}
diff --git a/nixos/tests/openssh.nix b/nixos/tests/openssh.nix
new file mode 100644
index 0000000000000000000000000000000000000000..49d92fbde908e052a388b588765855746a05b681
--- /dev/null
+++ b/nixos/tests/openssh.nix
@@ -0,0 +1,38 @@
+{ pkgs, ... }:
+
+{
+ nodes = {
+
+ server =
+ { config, pkgs, ... }:
+
+ {
+ services.openssh.enable = true;
+ security.pam.services.sshd.limits =
+ [ { domain = "*"; item = "memlock"; type = "-"; value = 1024; } ];
+ };
+
+ client =
+ { config, pkgs, ... }: { };
+
+ };
+
+ testScript = ''
+ startAll;
+
+ my $key=`${pkgs.openssh}/bin/ssh-keygen -t dsa -f key -N ""`;
+
+ $server->waitForUnit("sshd");
+
+ $server->succeed("mkdir -m 700 /root/.ssh");
+ $server->copyFileFromHost("key.pub", "/root/.ssh/authorized_keys");
+
+ $client->succeed("mkdir -m 700 /root/.ssh");
+ $client->copyFileFromHost("key", "/root/.ssh/id_dsa");
+ $client->succeed("chmod 600 /root/.ssh/id_dsa");
+
+ $client->waitForUnit("network.target");
+ $client->succeed("ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no server 'echo hello world' >&2");
+ $client->succeed("ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no server 'ulimit -l' | grep 1024");
+ '';
+}
diff --git a/nixos/tests/partition.nix b/nixos/tests/partition.nix
new file mode 100644
index 0000000000000000000000000000000000000000..7126e7255ef45e22dda6f19e39f59e9d94ea1c64
--- /dev/null
+++ b/nixos/tests/partition.nix
@@ -0,0 +1,227 @@
+{ pkgs, system, ... }:
+
+with pkgs.lib;
+
+let
+ ksExt = pkgs.writeText "ks-ext4" ''
+ clearpart --all --initlabel --drives=vdb
+
+ part /boot --recommended --label=boot --fstype=ext2 --ondisk=vdb
+ part swap --recommended --label=swap --fstype=swap --ondisk=vdb
+ part /nix --size=500 --label=nix --fstype=ext3 --ondisk=vdb
+ part / --recommended --label=root --fstype=ext4 --ondisk=vdb
+ '';
+
+ ksBtrfs = pkgs.writeText "ks-btrfs" ''
+ clearpart --all --initlabel --drives=vdb,vdc
+
+ part swap1 --recommended --label=swap1 --fstype=swap --ondisk=vdb
+ part swap2 --recommended --label=swap2 --fstype=swap --ondisk=vdc
+
+ part btrfs.1 --grow --ondisk=vdb
+ part btrfs.2 --grow --ondisk=vdc
+
+ btrfs / --data=0 --metadata=1 --label=root btrfs.1 btrfs.2
+ '';
+
+ ksRaid = pkgs.writeText "ks-raid" ''
+ clearpart --all --initlabel --drives=vdb,vdc
+
+ part raid.01 --size=200 --ondisk=vdb
+ part raid.02 --size=200 --ondisk=vdc
+
+ part swap1 --size=500 --label=swap1 --fstype=swap --ondisk=vdb
+ part swap2 --size=500 --label=swap2 --fstype=swap --ondisk=vdc
+
+ part raid.11 --grow --ondisk=vdb
+ part raid.12 --grow --ondisk=vdc
+
+ raid /boot --level=1 --fstype=ext3 --device=md0 raid.01 raid.02
+ raid / --level=1 --fstype=xfs --device=md1 raid.11 raid.12
+ '';
+
+ ksRaidLvmCrypt = pkgs.writeText "ks-lvm-crypt" ''
+ clearpart --all --initlabel --drives=vdb,vdc
+
+ part raid.1 --grow --ondisk=vdb
+ part raid.2 --grow --ondisk=vdc
+
+ raid pv.0 --level=1 --encrypted --passphrase=x --device=md0 raid.1 raid.2
+
+ volgroup nixos pv.0
+
+ logvol /boot --size=200 --fstype=ext3 --name=boot --vgname=nixos
+ logvol swap --size=500 --fstype=swap --name=swap --vgname=nixos
+ logvol / --size=1000 --grow --fstype=ext4 --name=root --vgname=nixos
+ '';
+in {
+ machine = { config, pkgs, ... }: {
+ environment.systemPackages = [
+ pkgs.pythonPackages.nixpart
+ pkgs.file pkgs.btrfsProgs pkgs.xfsprogs pkgs.lvm2
+ ];
+ virtualisation.emptyDiskImages = [ 4096 4096 ];
+ };
+
+ testScript = ''
+ my $diskStart;
+ my @mtab;
+
+ sub getMtab {
+ my $mounts = $machine->succeed("cat /proc/mounts");
+ chomp $mounts;
+ return map [split], split /\n/, $mounts;
+ }
+
+ sub parttest {
+ my ($desc, $code) = @_;
+ $machine->start;
+ $machine->waitForUnit("default.target");
+
+ # Gather mounts and superblock
+ @mtab = getMtab;
+ $diskStart = $machine->succeed("dd if=/dev/vda bs=512 count=1");
+
+ subtest($desc, $code);
+ $machine->shutdown;
+ }
+
+ sub ensureSanity {
+ # Check whether the filesystem in /dev/vda is still intact
+ my $newDiskStart = $machine->succeed("dd if=/dev/vda bs=512 count=1");
+ if ($diskStart ne $newDiskStart) {
+ $machine->log("Something went wrong, the partitioner wrote " .
+ "something into the first 512 bytes of /dev/vda!");
+ die;
+ }
+
+ # Check whether nixpart has unmounted anything
+ my @currentMtab = getMtab;
+ for my $mount (@mtab) {
+ my $path = $mount->[1];
+ unless (grep { $_->[1] eq $path } @currentMtab) {
+ $machine->log("The partitioner seems to have unmounted $path.");
+ die;
+ }
+ }
+ }
+
+ sub checkMount {
+ my $mounts = $machine->succeed("cat /proc/mounts");
+
+ }
+
+ sub kickstart {
+ $machine->copyFileFromHost($_[0], "/kickstart");
+ $machine->succeed("nixpart -v /kickstart");
+ ensureSanity;
+ }
+
+ sub ensurePartition {
+ my ($name, $match) = @_;
+ my $path = $name =~ /^\// ? $name : "/dev/disk/by-label/$name";
+ my $out = $machine->succeed("file -Ls $path");
+ my @matches = grep(/^$path: .*$match/i, $out);
+ if (!@matches) {
+ $machine->log("Partition on $path was expected to have a " .
+ "file system that matches $match, but instead has: $out");
+ die;
+ }
+ }
+
+ sub ensureNoPartition {
+ $machine->succeed("test ! -e /dev/$_[0]");
+ }
+
+ sub ensureMountPoint {
+ $machine->succeed("mountpoint $_[0]");
+ }
+
+ sub remountAndCheck {
+ $machine->nest("Remounting partitions:", sub {
+ # XXX: "findmnt -ARunl -oTARGET /mnt" seems to NOT print all mounts!
+ my $getmounts_cmd = "cat /proc/mounts | cut -d' ' -f2 | grep '^/mnt'";
+ # Insert canaries first
+ my $canaries = $machine->succeed($getmounts_cmd . " | while read p;" .
+ " do touch \"\$p/canary\";" .
+ " echo \"\$p/canary\"; done");
+ # Now unmount manually
+ $machine->succeed($getmounts_cmd . " | tac | xargs -r umount");
+ # /mnt should be empty or non-existing
+ my $found = $machine->succeed("find /mnt -mindepth 1");
+ chomp $found;
+ if ($found) {
+ $machine->log("Cruft found in /mnt:\n$found");
+ die;
+ }
+ # Try to remount with nixpart
+ $machine->succeed("nixpart -vm /kickstart");
+ ensureMountPoint("/mnt");
+ # Check if our beloved canaries are dead
+ chomp $canaries;
+ $machine->nest("Checking canaries:", sub {
+ for my $canary (split /\n/, $canaries) {
+ $machine->succeed("test -e '$canary'");
+ }
+ });
+ });
+ }
+
+ parttest "ext2, ext3 and ext4 filesystems", sub {
+ kickstart("${ksExt}");
+ ensurePartition("boot", "ext2");
+ ensurePartition("swap", "swap");
+ ensurePartition("nix", "ext3");
+ ensurePartition("root", "ext4");
+ ensurePartition("/dev/vdb4", "boot sector");
+ ensureNoPartition("vdb6");
+ ensureNoPartition("vdc1");
+ remountAndCheck;
+ ensureMountPoint("/mnt/boot");
+ ensureMountPoint("/mnt/nix");
+ };
+
+ parttest "btrfs filesystem", sub {
+ $machine->succeed("modprobe btrfs");
+ kickstart("${ksBtrfs}");
+ ensurePartition("swap1", "swap");
+ ensurePartition("swap2", "swap");
+ ensurePartition("/dev/vdb2", "btrfs");
+ ensurePartition("/dev/vdc2", "btrfs");
+ ensureNoPartition("vdb3");
+ ensureNoPartition("vdc3");
+ remountAndCheck;
+ };
+
+ parttest "RAID1 with XFS", sub {
+ kickstart("${ksRaid}");
+ ensurePartition("swap1", "swap");
+ ensurePartition("swap2", "swap");
+ ensurePartition("/dev/md0", "ext3");
+ ensurePartition("/dev/md1", "xfs");
+ ensureNoPartition("vdb4");
+ ensureNoPartition("vdc4");
+ ensureNoPartition("md2");
+ remountAndCheck;
+ ensureMountPoint("/mnt/boot");
+ };
+
+ parttest "RAID1 with LUKS and LVM", sub {
+ kickstart("${ksRaidLvmCrypt}");
+ ensurePartition("/dev/vdb1", "data");
+ ensureNoPartition("vdb2");
+ ensurePartition("/dev/vdc1", "data");
+ ensureNoPartition("vdc2");
+
+ ensurePartition("/dev/md0", "luks");
+ ensureNoPartition("md1");
+
+ ensurePartition("/dev/nixos/boot", "ext3");
+ ensurePartition("/dev/nixos/swap", "swap");
+ ensurePartition("/dev/nixos/root", "ext4");
+
+ remountAndCheck;
+ ensureMountPoint("/mnt/boot");
+ };
+ '';
+}
diff --git a/nixos/tests/printing.nix b/nixos/tests/printing.nix
new file mode 100644
index 0000000000000000000000000000000000000000..13cc3115d50e6af0b2105a5e266561c2e0f4e576
--- /dev/null
+++ b/nixos/tests/printing.nix
@@ -0,0 +1,90 @@
+# Test printing via CUPS.
+
+{ pkgs, ... }:
+
+{
+
+ nodes = {
+
+ server =
+ { config, pkgs, ... }:
+ { services.printing.enable = true;
+ services.printing.cupsdConf =
+ ''
+ Listen server:631
+
+ Order allow,deny
+ Allow from all
+
+ '';
+ };
+
+ client =
+ { config, pkgs, nodes, ... }:
+ { services.printing.enable = true;
+ };
+
+ };
+
+ testScript =
+ ''
+ startAll;
+
+ # Make sure that cups is up on both sides.
+ $server->waitForUnit("cupsd.service");
+ $client->waitForUnit("cupsd.service");
+ $client->succeed("lpstat -r") =~ /scheduler is running/ or die;
+ $client->succeed("lpstat -H") =~ "/var/run/cups/cups.sock" or die;
+ $client->succeed("curl --fail http://localhost:631/");
+ $client->succeed("curl --fail http://server:631/");
+ $server->fail("curl --fail http://client:631/");
+
+ # Add a HP Deskjet printer connected via USB to the server.
+ $server->succeed("lpadmin -p DeskjetLocal -v usb://HP/Deskjet%205400%20series?serial=TH93I152S123XY -m 'drv:///sample.drv/deskjet.ppd' -E");
+
+ # Add it to the client as well via IPP.
+ $client->succeed("lpadmin -p DeskjetRemote -v ipp://server/printers/DeskjetLocal -m 'drv:///sample.drv/deskjet.ppd' -E");
+ $client->succeed("lpadmin -d DeskjetRemote");
+
+ # Do some status checks.
+ $client->succeed("lpstat -a") =~ /DeskjetRemote accepting requests/ or die;
+ $client->succeed("lpstat -h server -a") =~ /DeskjetLocal accepting requests/ or die;
+ $client->succeed("cupsdisable DeskjetRemote");
+ $client->succeed("lpq") =~ /DeskjetRemote is not ready.*no entries/s or die;
+ $client->succeed("cupsenable DeskjetRemote");
+ $client->succeed("lpq") =~ /DeskjetRemote is ready.*no entries/s or die;
+
+ # Test printing various file types.
+ foreach my $file ("${pkgs.groff}/share/doc/*/examples/mom/typesetting.pdf",
+ "${pkgs.groff}/share/doc/*/meref.ps",
+ "${pkgs.cups}/share/doc/cups/images/cups.png",
+ "${pkgs.xz}/share/doc/xz/faq.txt")
+ {
+ $file =~ /([^\/]*)$/; my $fn = $1;
+
+ subtest "print $fn", sub {
+
+ # Print the file on the client.
+ $client->succeed("lp $file");
+ $client->succeed("lpq") =~ /active.*root.*$fn/ or die;
+
+ # Ensure that a raw PCL file appeared in the server's queue
+ # (showing that the right filters have been applied). Of
+ # course, since there is no actual USB printer attached, the
+ # file will stay in the queue forever.
+ $server->waitForFile("/var/spool/cups/d*-*");
+ $server->succeed("lpq -a") =~ /remroot.*$fn/ or die;
+ $server->succeed("hexdump -C -n2 /var/spool/cups/d*-*") =~ /1b 45/ or die; # 1b 45 = printer reset
+
+ # Delete the job on the client. It should disappear on the
+ # server as well.
+ $client->succeed("lprm");
+ $client->succeed("lpq -a") =~ /no entries/;
+ Machine::retry sub {
+ return 1 if $server->succeed("lpq -a") =~ /no entries/;
+ };
+ };
+ }
+ '';
+
+}
diff --git a/nixos/tests/proxy.nix b/nixos/tests/proxy.nix
new file mode 100644
index 0000000000000000000000000000000000000000..3b79c16ea2c4271fe10fe0e0f2a09381275d6906
--- /dev/null
+++ b/nixos/tests/proxy.nix
@@ -0,0 +1,94 @@
+{ pkgs, ... }:
+
+let
+
+ backend =
+ { config, pkgs, ... }:
+
+ {
+ services.openssh.enable = true;
+
+ services.httpd.enable = true;
+ services.httpd.adminAddr = "foo@example.org";
+ services.httpd.documentRoot = "${pkgs.valgrind}/share/doc/valgrind/html";
+ };
+
+in
+
+{
+
+ nodes =
+ { proxy =
+ { config, pkgs, nodes, ... }:
+
+ {
+ services.httpd.enable = true;
+ services.httpd.adminAddr = "bar@example.org";
+ services.httpd.extraModules = ["proxy_balancer"];
+
+ services.httpd.extraConfig =
+ ''
+ ExtendedStatus on
+
+
+ Order deny,allow
+ Allow from all
+ SetHandler server-status
+
+
+
+ Allow from all
+ BalancerMember http://${nodes.backend1.config.networking.hostName} retry=0
+ BalancerMember http://${nodes.backend2.config.networking.hostName} retry=0
+
+
+ ProxyStatus full
+ ProxyPass /server-status !
+ ProxyPass / balancer://cluster/
+ ProxyPassReverse / balancer://cluster/
+
+ # For testing; don't want to wait forever for dead backend servers.
+ ProxyTimeout 5
+ '';
+ };
+
+ backend1 = backend;
+ backend2 = backend;
+
+ client = { config, pkgs, ... }: { };
+ };
+
+ testScript =
+ ''
+ startAll;
+
+ $proxy->waitForUnit("httpd");
+ $backend1->waitForUnit("httpd");
+ $backend2->waitForUnit("httpd");
+
+ # With the back-ends up, the proxy should work.
+ $client->succeed("curl --fail http://proxy/");
+
+ $client->succeed("curl --fail http://proxy/server-status");
+
+ # Block the first back-end.
+ $backend1->block;
+
+ # The proxy should still work.
+ $client->succeed("curl --fail http://proxy/");
+
+ $client->succeed("curl --fail http://proxy/");
+
+ # Block the second back-end.
+ $backend2->block;
+
+ # Now the proxy should fail as well.
+ $client->fail("curl --fail http://proxy/");
+
+ # But if the second back-end comes back, the proxy should start
+ # working again.
+ $backend2->unblock;
+ $client->succeed("curl --fail http://proxy/");
+ '';
+
+}
diff --git a/nixos/tests/quake3.nix b/nixos/tests/quake3.nix
new file mode 100644
index 0000000000000000000000000000000000000000..925011077805b0ac3e839e1992704f3d273bbbc7
--- /dev/null
+++ b/nixos/tests/quake3.nix
@@ -0,0 +1,79 @@
+{ pkgs, ... }:
+
+let
+
+ # Build Quake with coverage instrumentation.
+ overrides = pkgs:
+ rec {
+ quake3game = pkgs.quake3game.override (args: {
+ stdenv = pkgs.stdenvAdapters.addCoverageInstrumentation args.stdenv;
+ });
+ };
+
+in
+
+rec {
+
+ client =
+ { config, pkgs, ... }:
+
+ { imports = [ ./common/x11.nix ];
+ services.xserver.driSupport = true;
+ services.xserver.defaultDepth = pkgs.lib.mkOverride 0 16;
+ environment.systemPackages = [ pkgs.quake3demo ];
+ nixpkgs.config.packageOverrides = overrides;
+ };
+
+ nodes =
+ { server =
+ { config, pkgs, ... }:
+
+ { jobs."quake3-server" =
+ { startOn = "startup";
+ exec =
+ "${pkgs.quake3demo}/bin/quake3-server '+set g_gametype 0' " +
+ "'+map q3dm7' '+addbot grunt' '+addbot daemia' 2> /tmp/log";
+ };
+ nixpkgs.config.packageOverrides = overrides;
+ };
+
+ client1 = client;
+ client2 = client;
+ };
+
+ testScript =
+ ''
+ startAll;
+
+ $server->waitForUnit("quake3-server");
+ $client1->waitForX;
+ $client2->waitForX;
+
+ $client1->execute("quake3 '+set r_fullscreen 0' '+set name Foo' '+connect server' &");
+ $client2->execute("quake3 '+set r_fullscreen 0' '+set name Bar' '+connect server' &");
+
+ $server->waitUntilSucceeds("grep -q 'Foo.*entered the game' /tmp/log");
+ $server->waitUntilSucceeds("grep -q 'Bar.*entered the game' /tmp/log");
+
+ $server->sleep(10); # wait for a while to get a nice screenshot
+
+ $client1->block();
+
+ $server->sleep(20);
+
+ $client1->screenshot("screen1");
+ $client2->screenshot("screen2");
+
+ $client1->unblock();
+
+ $server->sleep(10);
+
+ $client1->screenshot("screen3");
+ $client2->screenshot("screen4");
+
+ $client1->shutdown();
+ $client2->shutdown();
+ $server->stopJob("quake3-server");
+ '';
+
+}
diff --git a/nixos/tests/run-in-machine.nix b/nixos/tests/run-in-machine.nix
new file mode 100644
index 0000000000000000000000000000000000000000..8efe26c170826eea66f04d5159624447b54c2f9a
--- /dev/null
+++ b/nixos/tests/run-in-machine.nix
@@ -0,0 +1,8 @@
+{ system ? builtins.currentSystem }:
+
+with import ../lib/testing.nix { inherit system; };
+
+runInMachine {
+ drv = pkgs.patchelf;
+ machine = { config, pkgs, ... }: { services.sshd.enable = true; };
+}
diff --git a/nixos/tests/simple.nix b/nixos/tests/simple.nix
new file mode 100644
index 0000000000000000000000000000000000000000..eee13a10133458c65702e22af8ce6df58cff4478
--- /dev/null
+++ b/nixos/tests/simple.nix
@@ -0,0 +1,11 @@
+{ pkgs, ... }:
+
+{
+ machine = { config, pkgs, ... }: { };
+
+ testScript =
+ ''
+ startAll;
+ $machine->shutdown;
+ '';
+}
diff --git a/nixos/tests/subversion.nix b/nixos/tests/subversion.nix
new file mode 100644
index 0000000000000000000000000000000000000000..309da90c5df133482c9bbb827188f445b42072b5
--- /dev/null
+++ b/nixos/tests/subversion.nix
@@ -0,0 +1,117 @@
+{ pkgs, ... }:
+
+let
+
+ # Build some packages with coverage instrumentation.
+ overrides = pkgs:
+ with pkgs.stdenvAdapters;
+ let
+ do = pkg: pkg.override (args: {
+ stdenv = addCoverageInstrumentation args.stdenv;
+ });
+ in
+ rec {
+ apr = do pkgs.apr;
+ aprutil = do pkgs.aprutil;
+ apacheHttpd = do pkgs.apacheHttpd;
+ mod_python = do pkgs.mod_python;
+ subversion = do pkgs.subversion;
+
+ # To build the kernel with coverage instrumentation, we need a
+ # special patch to make coverage data available under /proc.
+ linux = pkgs.linux.override (orig: {
+ stdenv = cleanupBuildTree (keepBuildTree orig.stdenv);
+ extraConfig =
+ ''
+ GCOV_KERNEL y
+ GCOV_PROFILE_ALL y
+ '';
+ });
+ };
+
+in
+
+{
+
+ nodes =
+ { webserver =
+ { config, pkgs, ... }:
+
+ {
+ services.httpd.enable = true;
+ services.httpd.adminAddr = "e.dolstra@tudelft.nl";
+ services.httpd.extraSubservices =
+ [ { function = import ;
+ urlPrefix = "";
+ dataDir = "/data/subversion";
+ userCreationDomain = "192.168.0.0/16";
+ }
+ ];
+ nixpkgs.config.packageOverrides = overrides;
+ };
+
+ client =
+ { config, pkgs, ... }:
+
+ {
+ environment.systemPackages = [ pkgs.subversion ];
+ nixpkgs.config.packageOverrides = overrides;
+ };
+
+ };
+
+ testScript =
+ ''
+ startAll;
+
+ $webserver->waitForOpenPort(80);
+
+ print STDERR $client->succeed("svn --version");
+
+ print STDERR $client->succeed("curl --fail http://webserver/");
+
+ # Create a new user through the web interface.
+ $client->succeed("curl --fail -F username=alice -F fullname='Alice Lastname' -F address=alice\@example.org -F password=foobar -F password_again=foobar http://webserver/repoman/adduser");
+
+ # Let Alice create a new repository.
+ $client->succeed("curl --fail -u alice:foobar --form repo=xyzzy --form description=Xyzzy http://webserver/repoman/create");
+
+ $client->succeed("curl --fail http://webserver/") =~ /alice/ or die;
+
+ # Let Alice do a checkout.
+ my $svnFlags = "--non-interactive --username alice --password foobar";
+ $client->succeed("svn co $svnFlags http://webserver/repos/xyzzy wc");
+ $client->succeed("echo hello > wc/world");
+ $client->succeed("svn add wc/world");
+ $client->succeed("svn ci $svnFlags -m 'Added world.' wc/world");
+
+ # Create a new user on the server through the create-user.pl script.
+ $webserver->execute("svn-server-create-user.pl bob bob\@example.org Bob");
+ $webserver->succeed("svn-server-resetpw.pl bob fnord");
+ $client->succeed("curl --fail http://webserver/") =~ /bob/ or die;
+
+ # Bob should not have access to the repo.
+ my $svnFlagsBob = "--non-interactive --username bob --password fnord";
+ $client->fail("svn co $svnFlagsBob http://webserver/repos/xyzzy wc2");
+
+ # Bob should not be able change the ACLs of the repo.
+ # !!! Repoman should really return a 403 here.
+ $client->succeed("curl --fail -u bob:fnord -F description=Xyzzy -F readers=alice,bob -F writers=alice -F watchers= -F tardirs= http://webserver/repoman/update/xyzzy")
+ =~ /not authorised/ or die;
+
+ # Give Bob access.
+ $client->succeed("curl --fail -u alice:foobar -F description=Xyzzy -F readers=alice,bob -F writers=alice -F watchers= -F tardirs= http://webserver/repoman/update/xyzzy");
+
+ # So now his checkout should succeed.
+ $client->succeed("svn co $svnFlagsBob http://webserver/repos/xyzzy wc2");
+
+ # Test ViewVC and WebSVN
+ $client->succeed("curl --fail -u alice:foobar http://webserver/viewvc/xyzzy");
+ $client->succeed("curl --fail -u alice:foobar http://webserver/websvn/xyzzy");
+ $client->succeed("curl --fail -u alice:foobar http://webserver/repos-xml/xyzzy");
+
+ # Stop Apache to gather all the coverage data.
+ $webserver->stopJob("httpd");
+ '';
+
+}
diff --git a/nixos/tests/test-config-examples.sh b/nixos/tests/test-config-examples.sh
new file mode 100755
index 0000000000000000000000000000000000000000..1ba2f841c41d9f482a91120266598b8f4e466445
--- /dev/null
+++ b/nixos/tests/test-config-examples.sh
@@ -0,0 +1,14 @@
+#!/bin/sh
+
+# This script try to evaluate all configurations which are stored in
+# doc/config-examples. This script is useful to ensure that examples are
+# working with the current system.
+
+pwd=$(pwd)
+set -xe
+for i in ../doc/config-examples/*.nix; do
+ NIXOS_CONFIG="$pwd/$i" nix-instantiate \
+ --eval-only --xml --strict > /dev/null 2>&1 \
+ ../default.nix -A system
+done
+set +xe
diff --git a/nixos/tests/testdb.sql b/nixos/tests/testdb.sql
new file mode 100644
index 0000000000000000000000000000000000000000..4fb28fea3df9e90a5e1cd8ef62960c3fe32d837c
--- /dev/null
+++ b/nixos/tests/testdb.sql
@@ -0,0 +1,10 @@
+create table tests
+( Id INTEGER NOT NULL,
+ Name VARCHAR(255) NOT NULL,
+ primary key(Id)
+);
+
+insert into tests values (1, 'a');
+insert into tests values (2, 'b');
+insert into tests values (3, 'c');
+insert into tests values (4, 'd');
diff --git a/nixos/tests/tomcat.nix b/nixos/tests/tomcat.nix
new file mode 100644
index 0000000000000000000000000000000000000000..c25276aa424e5911a8195dc9770bec04e21106d6
--- /dev/null
+++ b/nixos/tests/tomcat.nix
@@ -0,0 +1,32 @@
+{ pkgs, ... }:
+
+{
+ nodes = {
+ server =
+ { pkgs, config, ... }:
+
+ {
+ services.tomcat.enable = true;
+ services.httpd.enable = true;
+ services.httpd.adminAddr = "foo@bar.com";
+ services.httpd.extraSubservices = [
+ { serviceType = "tomcat-connector";
+ stateDir = "/var/run/httpd";
+ logDir = "/var/log/httpd";
+ }
+ ];
+ };
+
+ client = { };
+ };
+
+ testScript = ''
+ startAll;
+
+ $server->waitForUnit("tomcat");
+ $server->sleep(30); # Dirty, but it takes a while before Tomcat handles to requests properly
+ $client->waitForUnit("network.target");
+ $client->succeed("curl --fail http://server/examples/servlets/servlet/HelloWorldExample");
+ $client->succeed("curl --fail http://server/examples/jsp/jsp2/simpletag/hello.jsp");
+ '';
+}
diff --git a/nixos/tests/trac.nix b/nixos/tests/trac.nix
new file mode 100644
index 0000000000000000000000000000000000000000..72442c885acecf0757d39f901cafa972faa3cd92
--- /dev/null
+++ b/nixos/tests/trac.nix
@@ -0,0 +1,71 @@
+{ pkgs, ... }:
+
+{
+ nodes = {
+ storage =
+ { config, pkgs, ... }:
+ { services.nfs.server.enable = true;
+ services.nfs.server.exports = ''
+ /repos 192.168.1.0/255.255.255.0(rw,no_root_squash)
+ '';
+ services.nfs.server.createMountPoints = true;
+ };
+
+ postgresql =
+ { config, pkgs, ... }:
+ { services.postgresql.enable = true;
+ services.postgresql.package = pkgs.postgresql92;
+ services.postgresql.enableTCPIP = true;
+ services.postgresql.authentication = ''
+ # Generated file; do not edit!
+ local all all trust
+ host all all 127.0.0.1/32 trust
+ host all all ::1/128 trust
+ host all all 192.168.1.0/24 trust
+ '';
+ };
+
+ webserver =
+ { config, pkgs, ... }:
+ { fileSystems = pkgs.lib.mkOverride 50
+ [ { mountPoint = "/repos";
+ device = "storage:/repos";
+ fsType = "nfs";
+ }
+ ];
+ services.httpd.enable = true;
+ services.httpd.adminAddr = "root@localhost";
+ services.httpd.extraSubservices = [ { serviceType = "trac"; } ];
+ environment.systemPackages = [ pkgs.pythonPackages.trac pkgs.subversion ];
+ };
+
+ client =
+ { config, pkgs, ... }:
+ { imports = [ ./common/x11.nix ];
+ services.xserver.desktopManager.kde4.enable = true;
+ };
+ };
+
+ testScript =
+ ''
+ startAll;
+
+ $postgresql->waitForUnit("postgresql");
+ $postgresql->succeed("createdb trac");
+
+ $webserver->succeed("mkdir -p /repos/trac");
+ $webserver->succeed("svnadmin create /repos/trac");
+
+ $webserver->waitForUnit("httpd");
+ $webserver->waitForFile("/var/trac");
+ $webserver->succeed("mkdir -p /var/trac/projects/test");
+ $webserver->succeed("PYTHONPATH=${pkgs.pythonPackages.psycopg2}/lib/${pkgs.python.libPrefix}/site-packages trac-admin /var/trac/projects/test initenv Test postgres://root\@postgresql/trac svn /repos/trac");
+
+ $client->waitForX;
+ $client->execute("konqueror http://webserver/projects/test &");
+ $client->waitForWindow(qr/Test.*Konqueror/);
+ $client->sleep(30); # loading takes a long time
+
+ $client->screenshot("screen");
+ '';
+}
diff --git a/nixos/tests/xfce.nix b/nixos/tests/xfce.nix
new file mode 100644
index 0000000000000000000000000000000000000000..9f9692f8a014d115a29456ad6bb09dc3429e8aad
--- /dev/null
+++ b/nixos/tests/xfce.nix
@@ -0,0 +1,32 @@
+{ pkgs, ... }:
+
+{
+
+ machine =
+ { config, pkgs, ... }:
+
+ { imports = [ ./common/user-account.nix ];
+
+ services.xserver.enable = true;
+
+ services.xserver.displayManager.auto.enable = true;
+ services.xserver.displayManager.auto.user = "alice";
+
+ services.xserver.desktopManager.xfce.enable = true;
+ };
+
+ testScript =
+ ''
+ $machine->waitForWindow(qr/xfce4-panel/);
+ $machine->sleep(10);
+
+ # Check that logging in has given the user ownership of devices.
+ $machine->succeed("getfacl /dev/snd/timer | grep -q alice");
+
+ $machine->succeed("su - alice -c 'DISPLAY=:0.0 xfce4-terminal &'");
+ $machine->waitForWindow(qr/Terminal/);
+ $machine->sleep(10);
+ $machine->screenshot("screen");
+ '';
+
+}
diff --git a/pkgs/applications/audio/a2jmidid/default.nix b/pkgs/applications/audio/a2jmidid/default.nix
index ca8565ac3238e19ddac63295e4cd886302923ab8..f6c17e6d8ed544aa4cd7374a65a4d215c27aba99 100644
--- a/pkgs/applications/audio/a2jmidid/default.nix
+++ b/pkgs/applications/audio/a2jmidid/default.nix
@@ -19,7 +19,7 @@ stdenv.mkDerivation rec {
meta = with stdenv.lib; {
homepage = http://home.gna.org/a2jmidid;
- description = "daemon for exposing legacy ALSA sequencer applications in JACK MIDI system";
+ description = "Daemon for exposing legacy ALSA sequencer applications in JACK MIDI system";
license = licenses.gpl2;
maintainers = [ maintainers.goibhniu ];
diff --git a/pkgs/applications/audio/abcde/default.nix b/pkgs/applications/audio/abcde/default.nix
index c6b5e9da0dd73286c2f15fc1a94a954aa8cb360d..031b0fe93b5976b08c9cb5aa68b0ed6d7b83cc9a 100644
--- a/pkgs/applications/audio/abcde/default.nix
+++ b/pkgs/applications/audio/abcde/default.nix
@@ -62,7 +62,7 @@ in
meta = {
homepage = "http://lly.org/~rcw/abcde/page/";
license = "GPLv2+";
- description = "A Better CD Encoder (ABCDE)";
+ description = "Command-line audio CD ripper";
longDescription = ''
abcde is a front-end command-line utility (actually, a shell
diff --git a/pkgs/applications/audio/audacious/default.nix b/pkgs/applications/audio/audacious/default.nix
index 9ae2fcdd20edf05c6e0cec2c82fbf9d371d6f3c7..6846607d61db20d1dfd8dd90e20dbe8fbaed6ecd 100644
--- a/pkgs/applications/audio/audacious/default.nix
+++ b/pkgs/applications/audio/audacious/default.nix
@@ -49,7 +49,7 @@ stdenv.mkDerivation {
enableParallelBuilding = true;
meta = {
- description = "Audacious, a media player forked from the Beep Media Player, which was itself an XMMS fork";
+ description = "Audio player";
homepage = http://audacious-media-player.org/;
maintainers = with stdenv.lib.maintainers; [ eelco simons ];
platforms = stdenv.lib.platforms.linux;
diff --git a/pkgs/applications/audio/aumix/default.nix b/pkgs/applications/audio/aumix/default.nix
index d69d9d471336976af796a5850f29e0fd2b6fc271..1e19a3ac5c39de5a5a6ec64a4043244c90251136 100644
--- a/pkgs/applications/audio/aumix/default.nix
+++ b/pkgs/applications/audio/aumix/default.nix
@@ -16,7 +16,7 @@ stdenv.mkDerivation rec {
++ (if gtkGUI then [pkgconfig gtk] else []);
meta = {
- description = "Aumix, an audio mixer for X and the console";
+ description = "Audio mixer for X and the console";
longDescription = ''
Aumix adjusts an audio mixer from X, the console, a terminal,
the command line or a script.
diff --git a/pkgs/applications/audio/mopidy/default.nix b/pkgs/applications/audio/mopidy/default.nix
index 089751947cc44625c3fb86fe738572ec587e591e..611d9f4226ddabadb242cfd643996c78558f0b9d 100644
--- a/pkgs/applications/audio/mopidy/default.nix
+++ b/pkgs/applications/audio/mopidy/default.nix
@@ -39,5 +39,6 @@ pythonPackages.buildPythonPackage rec {
local hard drive.
'';
maintainers = [ stdenv.lib.maintainers.rickynils ];
+ platforms = [];
};
}
diff --git a/pkgs/applications/audio/quodlibet/default.nix b/pkgs/applications/audio/quodlibet/default.nix
index d9554d5f7249aba2db8d3a6266450fcab4b86615..9f4859d6e0704e0a113d9464391d3d5d00856a8e 100644
--- a/pkgs/applications/audio/quodlibet/default.nix
+++ b/pkgs/applications/audio/quodlibet/default.nix
@@ -46,7 +46,7 @@ buildPythonPackage {
'';
meta = {
- description = "Quod Libet is a GTK+-based audio player written in Python, using the Mutagen tagging library.";
+ description = "GTK+-based audio player written in Python, using the Mutagen tagging library";
longDescription = ''
Quod Libet is a GTK+-based audio player written in Python, using
diff --git a/pkgs/applications/audio/snd/default.nix b/pkgs/applications/audio/snd/default.nix
index fe32aca029bc81f3356a9bf1a705275afe81524a..a49bfd9cccf4b725ba454cf4ecc0b9c41d5abbbd 100644
--- a/pkgs/applications/audio/snd/default.nix
+++ b/pkgs/applications/audio/snd/default.nix
@@ -51,7 +51,7 @@ rec {
name = "snd-" + version;
meta = {
- description = "Snd sound editor.";
+ description = "Sound editor";
homepage = http://ccrma.stanford.edu/software/snd;
inherit src;
};
diff --git a/pkgs/applications/display-managers/slim/default.nix b/pkgs/applications/display-managers/slim/default.nix
index 9d5c728de2621df032e939e5d33c7db43817cd2b..0b5bcccfb21a06467fd614f31d2a41253db7dd08 100644
--- a/pkgs/applications/display-managers/slim/default.nix
+++ b/pkgs/applications/display-managers/slim/default.nix
@@ -1,29 +1,37 @@
-{ stdenv, fetchurl, cmake, pkgconfig, x11, libjpeg, libpng, libXmu
+{ stdenv, fetchurl, cmake, pkgconfig, xorg, libjpeg, libpng
, fontconfig, freetype, pam, dbus_libs }:
stdenv.mkDerivation rec {
- name = "slim-1.3.4";
+ name = "slim-1.3.6";
src = fetchurl {
url = "http://download.berlios.de/slim/${name}.tar.gz";
- sha256 = "00fmrg2v41jnqhx0yc1kv97xxh5gai18n0i4as9g1fcq1i32cp0m";
+ sha256 = "1pqhk22jb4aja4hkrm7rjgbgzjyh7i4zswdgf5nw862l2znzxpi1";
};
- patches = [
- # Allow the paths of the configuration file and theme directory to
- # be set at runtime.
- ./runtime-paths.patch
- ];
+ patches =
+ [ # Allow the paths of the configuration file and theme directory to
+ # be set at runtime.
+ ./runtime-paths.patch
- buildInputs =
- [ cmake pkgconfig x11 libjpeg libpng libXmu fontconfig freetype
- pam dbus_libs
+ # Exit after the user's session has finished. This works around
+ # slim's broken PAM session handling (see
+ # http://developer.berlios.de/bugs/?func=detailbug&bug_id=19102&group_id=2663).
+ ./run-once.patch
];
- preConfigure = "substituteInPlace CMakeLists.txt --replace /etc $out/etc";
+ preConfigure = "substituteInPlace CMakeLists.txt --replace /etc $out/etc --replace /lib $out/lib";
cmakeFlags = [ "-DUSE_PAM=1" ];
+ enableParallelBuilding = true;
+
+ buildInputs =
+ [ cmake pkgconfig libjpeg libpng fontconfig freetype
+ pam dbus_libs
+ xorg.libX11 xorg.libXext xorg.libXrandr xorg.libXrender xorg.libXmu xorg.libXft
+ ];
+
NIX_CFLAGS_LINK = "-lXmu";
meta = {
diff --git a/pkgs/applications/display-managers/slim/run-once.patch b/pkgs/applications/display-managers/slim/run-once.patch
new file mode 100644
index 0000000000000000000000000000000000000000..78f1454a883e0bf871bf197863b7dcd0a14eb8d3
--- /dev/null
+++ b/pkgs/applications/display-managers/slim/run-once.patch
@@ -0,0 +1,12 @@
+diff -ru -x '*~' slim-1.3.6-orig/app.cpp slim-1.3.6/app.cpp
+--- slim-1.3.6-orig/app.cpp 2013-10-15 11:02:55.629263422 +0200
++++ slim-1.3.6/app.cpp 2013-10-15 13:00:10.141210784 +0200
+@@ -816,7 +822,7 @@
+ StopServer();
+ RemoveLock();
+ while (waitpid(-1, NULL, WNOHANG) > 0); /* Collects all dead childrens */
+- Run();
++ exit(OK_EXIT);
+ }
+
+ void App::KillAllClients(Bool top) {
diff --git a/pkgs/applications/display-managers/slim/runtime-paths.patch b/pkgs/applications/display-managers/slim/runtime-paths.patch
index b59b32f3111429368d1a57247b140d3e10ae97a6..f6811dbe668266b6ef21dce6f193adbe303fe9be 100644
--- a/pkgs/applications/display-managers/slim/runtime-paths.patch
+++ b/pkgs/applications/display-managers/slim/runtime-paths.patch
@@ -1,41 +1,25 @@
-diff -rc slim-1.2.6-orig/app.cpp slim-1.2.6/app.cpp
-*** slim-1.2.6-orig/app.cpp Fri Sep 15 23:00:37 2006
---- slim-1.2.6/app.cpp Sun Feb 25 17:30:50 2007
-***************
-*** 113,119 ****
-
- // Read configuration and theme
- cfg = new Cfg;
-! cfg->readConf(CFGFILE);
- string themebase = "";
- string themefile = "";
- string themedir = "";
---- 113,121 ----
-
- // Read configuration and theme
- cfg = new Cfg;
-! char *cfgfile = getenv("SLIM_CFGFILE");
-! if (!cfgfile) cfgfile = CFGFILE;
-! cfg->readConf(cfgfile);
- string themebase = "";
- string themefile = "";
- string themedir = "";
-***************
-*** 121,127 ****
- if (testing) {
- themeName = testtheme;
- } else {
-! themebase = string(THEMESDIR) + "/";
- themeName = cfg->getOption("current_theme");
- string::size_type pos;
- if ((pos = themeName.find(",")) != string::npos) {
---- 123,131 ----
- if (testing) {
- themeName = testtheme;
- } else {
-! char *themesdir = getenv("SLIM_THEMESDIR");
-! if (!themesdir) themesdir = THEMESDIR;
-! themebase = string(themesdir) + "/";
- themeName = cfg->getOption("current_theme");
- string::size_type pos;
- if ((pos = themeName.find(",")) != string::npos) {
+diff -ru -x '*~' slim-1.3.6-orig/app.cpp slim-1.3.6/app.cpp
+--- slim-1.3.6-orig/app.cpp 2013-10-02 00:38:05.000000000 +0200
++++ slim-1.3.6/app.cpp 2013-10-15 11:02:55.629263422 +0200
+@@ -200,7 +200,9 @@
+
+ /* Read configuration and theme */
+ cfg = new Cfg;
+- cfg->readConf(CFGFILE);
++ char *cfgfile = getenv("SLIM_CFGFILE");
++ if (!cfgfile) cfgfile = CFGFILE;
++ cfg->readConf(cfgfile);
+ string themebase = "";
+ string themefile = "";
+ string themedir = "";
+@@ -208,7 +210,9 @@
+ if (testing) {
+ themeName = testtheme;
+ } else {
+- themebase = string(THEMESDIR) + "/";
++ char *themesdir = getenv("SLIM_THEMESDIR");
++ if (!themesdir) themesdir = THEMESDIR;
++ themebase = string(themesdir) + "/";
+ themeName = cfg->getOption("current_theme");
+ string::size_type pos;
+ if ((pos = themeName.find(",")) != string::npos) {
diff --git a/pkgs/applications/editors/eclipse/default.nix b/pkgs/applications/editors/eclipse/default.nix
index 21dad42ea46d0cc5bf92f6777ed4cb0aa05231ae..fe3c742490729b2b35cc0dad51c1c73162df6d4b 100644
--- a/pkgs/applications/editors/eclipse/default.nix
+++ b/pkgs/applications/editors/eclipse/default.nix
@@ -32,8 +32,9 @@ let
# Patch binaries.
interpreter=$(echo ${stdenv.glibc}/lib/ld-linux*.so.2)
+ libCairo=$out/eclipse/libcairo-swt.so
patchelf --set-interpreter $interpreter $out/eclipse/eclipse
- patchelf --set-rpath ${freetype}/lib:${fontconfig}/lib:${libX11}/lib:${libXrender}/lib:${zlib}/lib $out/eclipse/libcairo-swt.so
+ [ -f $libCairo ] && patchelf --set-rpath ${freetype}/lib:${fontconfig}/lib:${libX11}/lib:${libXrender}/lib:${zlib}/lib $libCairo
# Create wrapper script. Pass -configuration to store
# settings in ~/.eclipse/org.eclipse.platform_ rather
@@ -205,4 +206,20 @@ in {
};
};
};
+
+ eclipse_sdk_431 = buildEclipse {
+ name = "eclipse-sdk-4.3.1";
+ description = "Eclipse Classic";
+ sources = {
+ "x86_64-linux" = fetchurl {
+ url = http://download.eclipse.org/eclipse/downloads/drops4/R-4.3.1-201309111000/eclipse-SDK-4.3.1-linux-gtk-x86_64.tar.gz;
+ sha256 = "0ncm56ylwxw9z8rk8ccgva68c2yr9yrf1kcr1zkgw6p87xh1yczd";
+ };
+ "i686-linux" = fetchurl {
+ url = http://download.eclipse.org/eclipse/downloads/drops4/R-4.3.1-201309111000/eclipse-SDK-4.3.1-linux-gtk.tar.gz;
+ sha256 = "1zxsh838khny7mvl01h28xna6xdh01yi4mvls28zj22v0340lgsg";
+ };
+ };
+ };
+
}
diff --git a/pkgs/applications/editors/emacs-modes/coffee/default.nix b/pkgs/applications/editors/emacs-modes/coffee/default.nix
index c40b3d4cd650d13c8b463da6c5cab9c95248762b..a0ba61431655c9decfe230e6421811d3dea7e6f9 100644
--- a/pkgs/applications/editors/emacs-modes/coffee/default.nix
+++ b/pkgs/applications/editors/emacs-modes/coffee/default.nix
@@ -21,7 +21,7 @@ stdenv.mkDerivation rec {
'';
meta = {
- description = "An Emacs major mode for CoffeeScript, unfancy JavaScript.";
+ description = "Emacs major mode for CoffeeScript, unfancy JavaScript";
homepage = https://github.com/defunkt/coffee-mode;
license = "GPLv2+";
diff --git a/pkgs/applications/editors/emacs-modes/color-theme/default.nix b/pkgs/applications/editors/emacs-modes/color-theme/default.nix
index 327e11bf08624464cad4644f2bc76283fdfcfcd9..bad277d61ce3ccb7fde119964caa71679c65a3ea 100644
--- a/pkgs/applications/editors/emacs-modes/color-theme/default.nix
+++ b/pkgs/applications/editors/emacs-modes/color-theme/default.nix
@@ -17,7 +17,7 @@ stdenv.mkDerivation rec {
installTargets = "install-bin";
meta = {
- description = "An emacs-lisp mode for skinning your emacs.";
+ description = "Emacs-lisp mode for skinning your Emacs";
homepage = http://www.nongnu.org/color-theme;
license = "GPLv2+";
diff --git a/pkgs/applications/editors/emacs-modes/flymake-cursor/default.nix b/pkgs/applications/editors/emacs-modes/flymake-cursor/default.nix
index 0a26e8fd43df898248cd5c67800d2bf04a0be046..4b2692a5e22a402f2221eb359298a683279a7023 100644
--- a/pkgs/applications/editors/emacs-modes/flymake-cursor/default.nix
+++ b/pkgs/applications/editors/emacs-modes/flymake-cursor/default.nix
@@ -23,7 +23,7 @@ stdenv.mkDerivation rec {
'';
meta = {
- description = "Displays flymake error msg in minibuffer after delay.";
+ description = "Displays flymake error msg in minibuffer after delay";
homepage = http://www.emacswiki.org/emacs/flymake-cursor.el;
license = stdenv.lib.licenses.publicDomain;
diff --git a/pkgs/applications/editors/emacs-modes/htmlize/default.nix b/pkgs/applications/editors/emacs-modes/htmlize/default.nix
index d4c428e5a1e5a7aa87935e28c7eda7021ee4f022..96cc4e040c4f92145aa2f6f0d72cf0c1d112eb6a 100644
--- a/pkgs/applications/editors/emacs-modes/htmlize/default.nix
+++ b/pkgs/applications/editors/emacs-modes/htmlize/default.nix
@@ -11,6 +11,6 @@ stdenv.mkDerivation {
};
meta = {
- description = "Convert buffer text and decorations to HTML.";
+ description = "Convert buffer text and decorations to HTML";
};
}
diff --git a/pkgs/applications/editors/emacs-modes/jade/default.nix b/pkgs/applications/editors/emacs-modes/jade/default.nix
index 0c99ceaca22bdaaad1afc7a8e65b8916f1efee23..ab0e3512ef286c1a7dec05e4a39af64ba73e8fe0 100644
--- a/pkgs/applications/editors/emacs-modes/jade/default.nix
+++ b/pkgs/applications/editors/emacs-modes/jade/default.nix
@@ -21,7 +21,7 @@ stdenv.mkDerivation {
'';
meta = {
- description = "Emacs major mode for jade and stylus.";
+ description = "Emacs major mode for jade and stylus";
homepage = https://github.com/brianc/jade-mode;
license = "GPLv2+";
diff --git a/pkgs/applications/editors/emacs-modes/lorem-ipsum/default.nix b/pkgs/applications/editors/emacs-modes/lorem-ipsum/default.nix
index 94427537003b597db2459e2f92ae70eb0ac60d9e..72086e54feced8c7d17dcf843728142ada9b1bd5 100644
--- a/pkgs/applications/editors/emacs-modes/lorem-ipsum/default.nix
+++ b/pkgs/applications/editors/emacs-modes/lorem-ipsum/default.nix
@@ -23,7 +23,7 @@ stdenv.mkDerivation rec {
'';
meta = {
- description = "Insert dummy pseudo Latin text for emacs.";
+ description = "Insert dummy pseudo Latin text for Emacs";
homepage = http://www.emacswiki.org/emacs/LoremIpsum;
license = "GPLv2+";
diff --git a/pkgs/applications/editors/emacs-modes/org/default.nix b/pkgs/applications/editors/emacs-modes/org/default.nix
index df78be6adacc0692a954290d6bf0e0ad9e7748b1..ad2bd2f0ba6af70d766574ebd58459fd7155ebb5 100644
--- a/pkgs/applications/editors/emacs-modes/org/default.nix
+++ b/pkgs/applications/editors/emacs-modes/org/default.nix
@@ -2,7 +2,7 @@
stdenv.mkDerivation rec {
name = "org-8.2.1";
-
+
src = fetchurl {
url = "http://orgmode.org/${name}.tar.gz";
sha256 = "625e2b6786158bcf6c43194075f7638ab8048c68a60025289a051c407e467823";
@@ -13,7 +13,7 @@ stdenv.mkDerivation rec {
configurePhase =
'' sed -i mk/default.mk \
- -e "s|^prefix\t=.*$|prefix=$out|g"
+ -e "s|^prefix\t=.*$|prefix=$out/share|g"
'';
postBuild =
diff --git a/pkgs/applications/editors/emacs-modes/org2blog/default.nix b/pkgs/applications/editors/emacs-modes/org2blog/default.nix
index c8c538c5cb7c39e21abb6cc9e51f7f2d45672139..e72560be8f44efbe09944c56adf1b04cd1f7814f 100644
--- a/pkgs/applications/editors/emacs-modes/org2blog/default.nix
+++ b/pkgs/applications/editors/emacs-modes/org2blog/default.nix
@@ -22,7 +22,7 @@ stdenv.mkDerivation rec {
'';
meta = {
- description = "A tool to publish directly from Emacs’ org-mode to WordPress blogs.";
+ description = "Publish directly from Emacs’ org-mode to WordPress blogs";
homepage = https://github.com/punchagan/org2blog;
license = "GPLv3+";
diff --git a/pkgs/applications/editors/emacs-modes/rect-mark/default.nix b/pkgs/applications/editors/emacs-modes/rect-mark/default.nix
index ac01e02b43348f9a65cdb66418fc86fdb2e6bc80..896dbdac71be8c654195d0a83f65249938c4b2dd 100644
--- a/pkgs/applications/editors/emacs-modes/rect-mark/default.nix
+++ b/pkgs/applications/editors/emacs-modes/rect-mark/default.nix
@@ -23,7 +23,7 @@ stdenv.mkDerivation rec {
'';
meta = {
- description = "Mark a rectangle of text with highlighting.";
+ description = "Mark a rectangle of text with highlighting";
homepage = http://emacswiki.org/emacs/RectangleMark;
license = "GPLv2+";
diff --git a/pkgs/applications/editors/emacs-modes/sunrise-commander/default.nix b/pkgs/applications/editors/emacs-modes/sunrise-commander/default.nix
index a253e25cad452cf81b5f25ffee53c000a84b39f6..e942189714ea6fecf37cf5cacdffc03e5470f70e 100644
--- a/pkgs/applications/editors/emacs-modes/sunrise-commander/default.nix
+++ b/pkgs/applications/editors/emacs-modes/sunrise-commander/default.nix
@@ -21,7 +21,7 @@ stdenv.mkDerivation rec {
'';
meta = {
- description = "Two-pane file manager for Emacs based on Dired and inspired by MC.";
+ description = "Two-pane file manager for Emacs based on Dired and inspired by MC";
homepage = http://www.emacswiki.org/emacs/Sunrise_Commander;
license = "GPLv3+";
diff --git a/pkgs/applications/editors/emacs-modes/xml-rpc/default.nix b/pkgs/applications/editors/emacs-modes/xml-rpc/default.nix
index 87a732b5b4ca3a0e9af68caeb84980a92156edfe..cee0f0ca5534071a531c587f9188801940f11e7b 100644
--- a/pkgs/applications/editors/emacs-modes/xml-rpc/default.nix
+++ b/pkgs/applications/editors/emacs-modes/xml-rpc/default.nix
@@ -23,7 +23,7 @@ stdenv.mkDerivation rec {
'';
meta = {
- description = "An elisp implementation of clientside XML-RPC.";
+ description = "Elisp implementation of clientside XML-RPC";
homepage = https://launchpad.net/xml-rpc-el;
license = "GPLv3+";
diff --git a/pkgs/applications/editors/flpsed/default.nix b/pkgs/applications/editors/flpsed/default.nix
index ca481f1081d3b2bae4c9c9552d53f75b6594269b..15605218b741f9103769953973a1b2ca9bb81e59 100644
--- a/pkgs/applications/editors/flpsed/default.nix
+++ b/pkgs/applications/editors/flpsed/default.nix
@@ -11,10 +11,9 @@ stdenv.mkDerivation {
buildInputs = [ fltk13 ghostscript ];
meta = {
- description = "A WYSIWYG PostScript annotator.";
+ description = "WYSIWYG PostScript annotator";
homepage = "http://http://flpsed.org/flpsed.html";
license = "GPLv3";
- platforms = stdenv.lib.platforms.all;
+ platforms = stdenv.lib.platforms.mesaPlatforms;
};
-
}
diff --git a/pkgs/applications/editors/geany/default.nix b/pkgs/applications/editors/geany/default.nix
index 6d43cc279975083dcf28a8a646de5cd0bb1d73ff..e7c8e276d27b79456567cf41b0ff8e24e07b9df5 100644
--- a/pkgs/applications/editors/geany/default.nix
+++ b/pkgs/applications/editors/geany/default.nix
@@ -23,7 +23,7 @@ stdenv.mkDerivation rec {
postInstall = "rm $out/share/icons/hicolor/icon-theme.cache";
meta = {
- description = "A GTK2 small and ligthweight IDE.";
+ description = "Small and lightweight IDE";
longDescription = ''
Geany is a small and lightweight Integrated Development Environment.
It was developed to provide a small and fast IDE, which has only a few dependencies from other packages.
diff --git a/pkgs/applications/editors/mg/default.nix b/pkgs/applications/editors/mg/default.nix
index ce69b5c0b5aecaa7b1d4c81c25673201136a9990..058a54c45a71752922cda4b7909b7a9c32a15f3a 100644
--- a/pkgs/applications/editors/mg/default.nix
+++ b/pkgs/applications/editors/mg/default.nix
@@ -23,7 +23,7 @@ stdenv.mkDerivation rec {
meta = {
homepage = http://homepage.boetes.org/software/mg/;
- description = "mg is Micro GNU/emacs, this is a portable version of the mg maintained by the OpenBSD team.";
+ description = "mg is Micro GNU/emacs, this is a portable version of the mg maintained by the OpenBSD team";
license = "public domain";
platforms = stdenv.lib.platforms.all;
};
diff --git a/pkgs/applications/editors/sublime/default.nix b/pkgs/applications/editors/sublime/default.nix
index 6aa0b34314acd512a590cf17c849f052ff2e81da..cfa44d9285cc327e5c10244ec7323977b5c03d32 100644
--- a/pkgs/applications/editors/sublime/default.nix
+++ b/pkgs/applications/editors/sublime/default.nix
@@ -33,7 +33,7 @@ stdenv.mkDerivation rec {
'';
meta = {
- description = "Sublime Text is a sophisticated text editor for code, markup and prose.";
+ description = "Sophisticated text editor for code, markup and prose";
license = "unfree";
};
}
diff --git a/pkgs/applications/graphics/jbrout/default.nix b/pkgs/applications/graphics/jbrout/default.nix
index dc397a614d3d5a3f47dbb6e7fbff6132e848c052..2207e8884f0cc25f2095892410dd8880c7b5f4ae 100644
--- a/pkgs/applications/graphics/jbrout/default.nix
+++ b/pkgs/applications/graphics/jbrout/default.nix
@@ -34,5 +34,6 @@ buildPythonPackage {
meta = {
homepage = "http://code.google.com/p/jbrout";
description = "jBrout is a photo manager";
+ platforms = stdenv.lib.platforms.linux;
};
}
diff --git a/pkgs/applications/graphics/paraview/default.nix b/pkgs/applications/graphics/paraview/default.nix
index b647c07368ef221de23c2d510e53f897c0650f01..cc42e1c40466f63537825accab56394f3cd4832d 100644
--- a/pkgs/applications/graphics/paraview/default.nix
+++ b/pkgs/applications/graphics/paraview/default.nix
@@ -7,10 +7,10 @@
}:
stdenv.mkDerivation rec {
- name = "paraview-3.98.1";
+ name = "paraview-4.0.1";
src = fetchurl {
- url = "http://paraview.org/files/v3.98/ParaView-3.98.1-source.tar.gz";
- sha256 = "0i7q3jc4lc40l1zw3fdzv108rpxxfmg3dmmq855fpqyp2g2w9nxp";
+ url = "http://paraview.org/files/v4.0/ParaView-v4.0.1-source.tgz";
+ sha256 = "1qj8dq8gqpsw75sv4sdc7xm1xcpv0ilsddnrcfhha0zfhp0gq10y";
};
# [ 5%] Generating vtkGLSLShaderLibrary.h
diff --git a/pkgs/applications/misc/abook/default.nix b/pkgs/applications/misc/abook/default.nix
index 09345576487eea00aa09b71d89c3d8ef384fa0f1..3d187d92f5c6f6d89caa3cf5ec54127fc3a151a9 100644
--- a/pkgs/applications/misc/abook/default.nix
+++ b/pkgs/applications/misc/abook/default.nix
@@ -13,7 +13,7 @@ stdenv.mkDerivation rec {
meta = {
homepage = "http://abook.sourceforge.net/";
- description = "Abook is a text-based addressbook program designed to use with mutt mail client.";
+ description = "Text-based addressbook program designed to use with mutt mail client";
license = "GPLv2";
maintainers = [ stdenv.lib.maintainers.edwtjo ];
platforms = with stdenv.lib.platforms; linux;
diff --git a/pkgs/applications/misc/bitcoin/default.nix b/pkgs/applications/misc/bitcoin/default.nix
index a4048e6f40b26a5bc21bbea4278633d902b17de9..a6a289168c4a7b355aa8ee0a22cec865ed80d1a6 100644
--- a/pkgs/applications/misc/bitcoin/default.nix
+++ b/pkgs/applications/misc/bitcoin/default.nix
@@ -1,12 +1,12 @@
{ fetchurl, stdenv, openssl, db4, boost, zlib, miniupnpc, qt4 }:
stdenv.mkDerivation rec {
- version = "0.8.1";
+ version = "0.8.5";
name = "bitcoin-${version}";
src = fetchurl {
url = "mirror://sourceforge/bitcoin/${name}-linux.tar.gz";
- sha256 = "161arfkzpya5anh6vh5i9ydvwqpia7bpqgz83p2kd97iklx04zvd";
+ sha256 = "0qqzwx1lihlrj7r08alsyznjfqvwncfm0nnxi1pcx0jyvq83ym44";
};
buildInputs = [ openssl db4 boost zlib miniupnpc qt4 ];
diff --git a/pkgs/applications/misc/calibre/default.nix b/pkgs/applications/misc/calibre/default.nix
index 780c96d9ec8ea4256f383955443479b04b0ee34f..769306463103910e974b03c578533f0636f6967e 100644
--- a/pkgs/applications/misc/calibre/default.nix
+++ b/pkgs/applications/misc/calibre/default.nix
@@ -4,11 +4,11 @@
}:
stdenv.mkDerivation rec {
- name = "calibre-1.4.0";
+ name = "calibre-1.5.0";
src = fetchurl {
url = "mirror://sourceforge/calibre/${name}.tar.xz";
- sha256 = "0hszxjyvw75b75pzr8w5xfgchx3ksw7ziwa3skrjdj500bypmy3y";
+ sha256 = "17jpzj47120ghm584hxl526jdkh9whxrrqfdyn0gv0pb9kag1spn";
};
inherit python;
diff --git a/pkgs/applications/misc/freicoin/default.nix b/pkgs/applications/misc/freicoin/default.nix
index bce6d1f639cb9b7d0739f67d7ef9ed433394b5d0..d5ed057f56b8b3a3e9533c0778f726261a56b028 100644
--- a/pkgs/applications/misc/freicoin/default.nix
+++ b/pkgs/applications/misc/freicoin/default.nix
@@ -1,12 +1,12 @@
{ fetchurl, stdenv, db4, boost, gmp, mpfr, miniupnpc, qt4, unzip }:
stdenv.mkDerivation rec {
- version = "0.0.2";
+ version = "0.8.3-1";
name = "freicoin-${version}";
src = fetchurl {
url = "https://github.com/freicoin/freicoin/archive/v${version}.zip";
- sha256 = "09izmm85rb64d5hd0hz9hkfvv3qag55sb3mdyp8z4103icqwd6d7";
+ sha256 = "0v3mh8a96nnb86mkyaylyjj7qfdrl7i9gvybh7f8w2hrl9paszfh";
};
# I think that openssl and zlib are required, but come through other
diff --git a/pkgs/applications/misc/gkrellm/default.nix b/pkgs/applications/misc/gkrellm/default.nix
index f1c26b27262d0869ff80802195be67ab0c016f49..af10ca9800d06add282f41e06ca6c2e2f31a99c6 100644
--- a/pkgs/applications/misc/gkrellm/default.nix
+++ b/pkgs/applications/misc/gkrellm/default.nix
@@ -24,7 +24,7 @@ stdenv.mkDerivation rec {
make install PREFIX="$out" '';
meta = {
- description = "GKrellM, a themeable process stack of system monitors.";
+ description = "Themeable process stack of system monitors";
longDescription =
'' GKrellM is a single process stack of system monitors which supports
applying themes to match its appearance to your window manager, Gtk,
diff --git a/pkgs/applications/misc/gmrun/default.nix b/pkgs/applications/misc/gmrun/default.nix
index 0b19eef3c8caf71e89bbd4e6347eb8f0e31fc6ef..dbff65d365188aa791fea3385824034eae653131 100644
--- a/pkgs/applications/misc/gmrun/default.nix
+++ b/pkgs/applications/misc/gmrun/default.nix
@@ -24,7 +24,7 @@ stdenv.mkDerivation rec {
];
meta = {
- description = "Gnome Completion-Run Utility.";
+ description = "Gnome Completion-Run Utility";
longDescription = ''
A simple program which provides a "run program" window, featuring a bash-like TAB completion.
It uses GTK+ interface.
diff --git a/pkgs/applications/misc/gnome_terminator/default.nix b/pkgs/applications/misc/gnome_terminator/default.nix
index cbd0819e240103d1fec3b4e199a3828d259b2ddf..b394719611de397666d22ddae33c8822f1ebcea7 100644
--- a/pkgs/applications/misc/gnome_terminator/default.nix
+++ b/pkgs/applications/misc/gnome_terminator/default.nix
@@ -23,7 +23,7 @@ stdenv.mkDerivation rec {
'';
meta = {
- description = "Gnome terminal emulator with support for tiling and tabs.";
+ description = "Gnome terminal emulator with support for tiling and tabs";
homepage = http://www.tenshu.net/p/terminator.html;
license = "GPLv2";
};
diff --git a/pkgs/applications/misc/lyx/default.nix b/pkgs/applications/misc/lyx/default.nix
index 31c00626847b282b578374c4aed1be2c7c677146..fd2e7c3ac42660c8f4f397adf9103e5c8bf73be2 100644
--- a/pkgs/applications/misc/lyx/default.nix
+++ b/pkgs/applications/misc/lyx/default.nix
@@ -26,7 +26,7 @@ stdenv.mkDerivation rec {
doCheck = true;
meta = {
- description = "WYSIWYM frontend for LaTeX, DocBook, etc.";
+ description = "WYSIWYM frontend for LaTeX, DocBook";
homepage = "http://www.lyx.org";
license = "GPL2";
maintainers = [ stdenv.lib.maintainers.vcunat ];
diff --git a/pkgs/applications/misc/mysql-workbench/default.nix b/pkgs/applications/misc/mysql-workbench/default.nix
index c2f80570673b7b0889548a99bf189df5c7e9d6c2..91fd1da1014998b7c936ed9472e2f65adbefa8a9 100644
--- a/pkgs/applications/misc/mysql-workbench/default.nix
+++ b/pkgs/applications/misc/mysql-workbench/default.nix
@@ -66,7 +66,7 @@ exec 19> $FIFOCTL
'';
meta = with stdenv.lib; {
- description = "A MySQL visual database modeling, administration and querying tool.";
+ description = "Visual MySQL database modeling, administration and querying tool";
longDescription = ''
MySQL Workbench is a modeling tool that allows you to design
and generate MySQL databases graphically. It also has administration
diff --git a/pkgs/applications/misc/rxvt_unicode/default.nix b/pkgs/applications/misc/rxvt_unicode/default.nix
index 8c16d290f86ebab671b0954a8f51ea11f69fca05..c05dd028eb348ae430f914caee22d32c2e711044 100644
--- a/pkgs/applications/misc/rxvt_unicode/default.nix
+++ b/pkgs/applications/misc/rxvt_unicode/default.nix
@@ -22,10 +22,13 @@ stdenv.mkDerivation (rec {
++ stdenv.lib.optional perlSupport perl
++ stdenv.lib.optional gdkPixbufSupport gdk_pixbuf;
+ outputs = [ "out" "terminfo" ];
+
preConfigure =
''
- configureFlags="--with-terminfo=$out/share/terminfo --enable-256-color ${if perlSupport then "--enable-perl" else "--disable-perl"}";
- export TERMINFO=$out/share/terminfo # without this the terminfo won't be compiled by tic, see man tic
+ mkdir -p $terminfo/share/terminfo
+ configureFlags="--with-terminfo=$terminfo/share/terminfo --enable-256-color ${if perlSupport then "--enable-perl" else "--disable-perl"}";
+ export TERMINFO=$terminfo/share/terminfo # without this the terminfo won't be compiled by tic, see man tic
NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I${freetype}/include/freetype2"
NIX_LDFLAGS="$NIX_LDFLAGS -lfontconfig -lXrender "
''
@@ -35,6 +38,13 @@ stdenv.mkDerivation (rec {
ln -s $out/{lib/urxvt,lib/perl5/site_perl}
'';
+ # we link the separate terminfo output to the main output
+ # as I don't think there's a usecase for wanting urxvt without its terminfo files
+ # and we don't want users to install them separately
+ postInstall = ''
+ ln -s $terminfo/share/terminfo $out/share
+ '';
+
meta = {
description = "A clone of the well-known terminal emulator rxvt";
homepage = "http://software.schmorp.de/pkg/rxvt-unicode.html";
diff --git a/pkgs/applications/misc/surf/default.nix b/pkgs/applications/misc/surf/default.nix
index d6083da5ce40b1339accc88de900d82900b1b42a..42792ba8f91d6cc204b7909fa277cc2bf7b7a267 100644
--- a/pkgs/applications/misc/surf/default.nix
+++ b/pkgs/applications/misc/surf/default.nix
@@ -27,9 +27,15 @@ stdenv.mkDerivation rec {
'';
meta = {
- description = "surf is a simple web browser based on WebKit/GTK+. It is able to display websites and follow links. It supports the XEmbed protocol which makes it possible to embed it in another application. Furthermore, one can point surf to another URI by setting its XProperties.";
- homepage = http://surf.suckless.org;
- license = "MIT";
- platforms = stdenv.lib.platforms.linux;
+ description = "Simple web browser";
+ longDescription = ''
+ Surf is a simple web browser based on WebKit/GTK+. It is able to display
+ websites and follow links. It supports the XEmbed protocol which makes it
+ possible to embed it in another application. Furthermore, one can point
+ surf to another URI by setting its XProperties.
+ '';
+ homepage = http://surf.suckless.org;
+ license = "MIT";
+ platforms = stdenv.lib.platforms.linux;
};
}
diff --git a/pkgs/applications/misc/taskjuggler/default.nix b/pkgs/applications/misc/taskjuggler/default.nix
index b8edd93455dd5a0e8f8d6ad5ec95e2f5e0c39f78..77acc511fe4206aab79844e2e1d1387118deb84d 100644
--- a/pkgs/applications/misc/taskjuggler/default.nix
+++ b/pkgs/applications/misc/taskjuggler/default.nix
@@ -63,7 +63,7 @@ stdenv.mkDerivation rec {
meta = {
homepage = "http://www.taskjuggler.org";
license = "GPLv2";
- description = "Project management tool.";
+ description = "Project management tool";
longDescription = ''
TaskJuggler is a modern and powerful, Open Source project management
tool. Its new approach to project planing and tracking is more
diff --git a/pkgs/applications/misc/xca/default.nix b/pkgs/applications/misc/xca/default.nix
new file mode 100644
index 0000000000000000000000000000000000000000..fb6b011f30a429142107ed90eed22690fe9e663f
--- /dev/null
+++ b/pkgs/applications/misc/xca/default.nix
@@ -0,0 +1,27 @@
+{ stdenv, fetchurl, pkgconfig, which, openssl, qt4, libtool }:
+
+stdenv.mkDerivation rec {
+ name = "xca-${version}";
+ version = "0.9.3";
+
+ src = fetchurl {
+ url = "mirror://sourceforge/xca/${name}.tar.gz";
+ sha256 = "1fn6kh8mdy65rrgjif7j9wn3mxg1mrrcnhzpi86hfy24ic6bahk8";
+ };
+
+ configurePhase = ''
+ export PATH=$PATH:${which}/bin
+ export QTDIR=${qt4}
+ prefix=$out ./configure ${openssl} ${libtool}
+ '';
+
+ buildInputs = [ openssl qt4 libtool ];
+ nativeBuildInputs = [ pkgconfig ];
+
+ meta = with stdenv.lib; {
+ description = "Interface for managing asymetric keys like RSA or DSA";
+ homepage = http://xca.sourceforge.net/;
+ platforms = platforms.all;
+ license = licenses.bsd3;
+ };
+}
diff --git a/pkgs/applications/misc/xfe/default.nix b/pkgs/applications/misc/xfe/default.nix
index bd00d91e23d3682e5fd3e4ea9694281f515d3dee..9b1385d9d6ad157057d7af58e05c17a7b0b42d4a 100644
--- a/pkgs/applications/misc/xfe/default.nix
+++ b/pkgs/applications/misc/xfe/default.nix
@@ -17,7 +17,7 @@ stdenv.mkDerivation rec {
enableParallelBuilding = true;
meta = {
- description = "X File Explorer (Xfe) is an MS-Explorer like file manager for X.";
+ description = "X File Explorer (Xfe) is an MS-Explorer like file manager for X";
longDescription = ''
X File Explorer (Xfe) is an MS-Explorer like file manager for X.
It is based on the popular, but discontinued, X Win Commander, which was developed by Maxim Baranov.
@@ -26,6 +26,6 @@ stdenv.mkDerivation rec {
homepage = "http://sourceforge.net/projects/xfe/";
license = "GPLv2";
maintainers = [ stdenv.lib.maintainers.bbenoist ];
- platforms = stdenv.lib.platforms.all;
+ platforms = stdenv.lib.platforms.mesaPlatforms;
};
}
diff --git a/pkgs/applications/networking/bittorrentsync/default.nix b/pkgs/applications/networking/bittorrentsync/default.nix
index 25a23b019d8447fc3050ee7c6b2e8a03563c2166..c2d2f28751a727ac8d4873036eb38fa2380fda0f 100644
--- a/pkgs/applications/networking/bittorrentsync/default.nix
+++ b/pkgs/applications/networking/bittorrentsync/default.nix
@@ -40,7 +40,7 @@ in stdenv.mkDerivation {
meta = {
homepage = "http://labs.bittorrent.com/experiments/sync.html";
- description = "Automatically sync files via secure, distributed technology.";
+ description = "Automatically sync files via secure, distributed technology";
license = stdenv.lib.licenses.unfree;
maintainers = [ stdenv.lib.maintainers.iElectric ];
};
diff --git a/pkgs/applications/networking/browsers/dwb/default.nix b/pkgs/applications/networking/browsers/dwb/default.nix
new file mode 100644
index 0000000000000000000000000000000000000000..b120ebcac54ebdad3a3b0440ea8beea6df14cf32
--- /dev/null
+++ b/pkgs/applications/networking/browsers/dwb/default.nix
@@ -0,0 +1,33 @@
+{ stdenv, fetchgit, pkgconfig, makeWrapper, libsoup, webkit, gtk3, gnutls, json_c,
+ m4, glib_networking, gsettings_desktop_schemas }:
+
+stdenv.mkDerivation {
+ name = "dwb-0.1";
+
+ src = fetchgit {
+ url = "https://bitbucket.org/portix/dwb.git";
+ rev = "4a4c3adb8fbc680a0a2b8c9d3d3a4105c07c2514";
+ sha256 = "93e8f2c82609447d54a3c139c153cc66d37d3c6aa8922cd09717caa95fd8b1d5";
+ };
+
+ buildInputs = [ pkgconfig makeWrapper libsoup webkit gtk3 gnutls json_c m4 ];
+
+ # There are Xlib and gtk warnings therefore I have set Wno-error
+ preBuild=''
+ makeFlagsArray=(CPPFLAGS="-Wno-error" GTK=3 PREFIX=$out);
+ '';
+
+ postInstall=''
+ wrapProgram "$out/bin/dwb" \
+ --prefix GIO_EXTRA_MODULES : "${glib_networking}/lib/gio/modules" \
+ --prefix XDG_DATA_DIRS : "${gsettings_desktop_schemas}/share:$out/share"
+ '';
+
+ meta = {
+ homepage = http://portix.bitbucket.org/dwb/;
+ description = "A lightweight web browser based on the webkit web browser engine and the gtk toolkit";
+ platforms = stdenv.lib.platforms.mesaPlatforms;
+ maintainers = [ stdenv.lib.maintainers.pSub ];
+ license = "GPL";
+ };
+}
diff --git a/pkgs/applications/networking/browsers/firefox/default.nix b/pkgs/applications/networking/browsers/firefox/default.nix
index 7b0f2a3679732a195ab2490aa8a1ba8cd4ebf41b..8375bcdad3df2a88666af0f6faab9e54472e0e91 100644
--- a/pkgs/applications/networking/browsers/firefox/default.nix
+++ b/pkgs/applications/networking/browsers/firefox/default.nix
@@ -4,6 +4,7 @@
, yasm, mesa, sqlite, unzip, makeWrapper, pysqlite
, hunspell, libevent, libstartup_notification, libvpx
, cairo, gstreamer, gst_plugins_base
+, debugBuild ? false
, # If you want the resulting program to call itself "Firefox" instead
# of "Shiretoko" or whatever, enable this option. However, those
# binaries may not be distributed without permission from the
@@ -35,7 +36,7 @@ in rec {
commonConfigureFlags =
[ "--enable-optimize"
#"--enable-profiling"
- "--disable-debug"
+ (if debugBuild then "--enable-debug" else "--disable-debug")
"--enable-strip"
"--with-system-jpeg"
"--with-system-zlib"
diff --git a/pkgs/applications/networking/browsers/firefox/wrapper.nix b/pkgs/applications/networking/browsers/firefox/wrapper.nix
index f8d2c2d0e8cdbe3e0687fc74ffe5229a6553f8b7..bf4c7f3e7d222ea3e48e1f67d4f647df68f3e5d7 100644
--- a/pkgs/applications/networking/browsers/firefox/wrapper.nix
+++ b/pkgs/applications/networking/browsers/firefox/wrapper.nix
@@ -1,4 +1,4 @@
-{ stdenv, browser, makeDesktopItem, makeWrapper, plugins, libs, gtk_modules
+{ stdenv, lib, browser, makeDesktopItem, makeWrapper, plugins, libs, gtk_modules
, browserName, desktopName, nameSuffix, icon
}:
@@ -50,8 +50,7 @@ stdenv.mkDerivation {
description =
browser.meta.description
+ " (with plugins: "
- + (let lib = import ../../../../lib;
- in lib.concatStrings (lib.intersperse ", " (map (x: x.name) plugins)))
+ + lib.concatStrings (lib.intersperse ", " (map (x: x.name) plugins))
+ ")";
};
}
diff --git a/pkgs/applications/networking/browsers/midori/default.nix b/pkgs/applications/networking/browsers/midori/default.nix
index 4d561737d276c3e8cb06e8d55fe39bb8253fe76a..e39e377147a379c70291cbbdf2683250684ad512 100644
--- a/pkgs/applications/networking/browsers/midori/default.nix
+++ b/pkgs/applications/networking/browsers/midori/default.nix
@@ -43,7 +43,7 @@ rec {
name = "midori-${version}.${release}";
meta = {
- description = "Light WebKit-based web browser with GTK GUI.";
+ description = "Light WebKit-based web browser with GTK GUI";
maintainers = [args.lib.maintainers.raskin];
platforms = with args.lib.platforms;
linux;
diff --git a/pkgs/applications/networking/ids/bro/default.nix b/pkgs/applications/networking/ids/bro/default.nix
index 6e70e106d26e96e0a34bfeb17e25544b9fa9c3c9..d60d39ac028d3016fce9a40cc01d332035646f09 100644
--- a/pkgs/applications/networking/ids/bro/default.nix
+++ b/pkgs/applications/networking/ids/bro/default.nix
@@ -15,7 +15,7 @@ stdenv.mkDerivation rec {
enableParallelBuilding = true;
meta = {
- description = "Bro is a powerful network analysis framework that is much different from the typical IDS you may know.";
+ description = "Powerful network analysis framework that is much different from the typical IDS you may know";
homepage = http://www.bro.org/;
license = "BSD";
};
diff --git a/pkgs/applications/networking/instant-messengers/amsn/default.nix b/pkgs/applications/networking/instant-messengers/amsn/default.nix
index 07aa20ff1f319ab44684015fedd0648acc1e0258..fc7906b3e4026bc309e4b925334da25b660c1db1 100644
--- a/pkgs/applications/networking/instant-messengers/amsn/default.nix
+++ b/pkgs/applications/networking/instant-messengers/amsn/default.nix
@@ -16,6 +16,7 @@ stdenv.mkDerivation {
'';
meta = {
+ description = "Instant messaging (MSN Messenger clone)";
homepage = http://amsn-project.net;
};
}
diff --git a/pkgs/applications/networking/instant-messengers/oneteam/default.nix b/pkgs/applications/networking/instant-messengers/oneteam/default.nix
index 3549d7f149962ccef2b18d25b441cf8132f69ab2..14d01de32458a8f7f71c9a719634e365258a5317 100644
--- a/pkgs/applications/networking/instant-messengers/oneteam/default.nix
+++ b/pkgs/applications/networking/instant-messengers/oneteam/default.nix
@@ -76,8 +76,6 @@ rec {
[
raskin
];
- platforms = with a.lib.platforms;
- linux;
license = a.lib.licenses.gpl2;
homepage="http://oneteam.im";
};
diff --git a/pkgs/applications/networking/instant-messengers/pidgin-plugins/msn-pecan/default.nix b/pkgs/applications/networking/instant-messengers/pidgin-plugins/msn-pecan/default.nix
index cdbf63dbd9f137ca67869bc0ce1d752acaa75097..2e1b745790a44098c04fd9be14d8c7557a120323 100644
--- a/pkgs/applications/networking/instant-messengers/pidgin-plugins/msn-pecan/default.nix
+++ b/pkgs/applications/networking/instant-messengers/pidgin-plugins/msn-pecan/default.nix
@@ -8,7 +8,7 @@ stdenv.mkDerivation {
};
meta = {
- description = "Alternative MSN protocol plug-in for Pidgin IM.";
+ description = "Alternative MSN protocol plug-in for Pidgin IM";
homepage = http://code.google.com/p/msn-pecan/;
};
diff --git a/pkgs/applications/networking/instant-messengers/pidgin-plugins/sipe/default.nix b/pkgs/applications/networking/instant-messengers/pidgin-plugins/sipe/default.nix
index e8afdb37cbc4aab4cf449be4bd9b431a39af0e88..9c787867e5a11c68c2ea0de055610e8a98fc80db 100644
--- a/pkgs/applications/networking/instant-messengers/pidgin-plugins/sipe/default.nix
+++ b/pkgs/applications/networking/instant-messengers/pidgin-plugins/sipe/default.nix
@@ -11,7 +11,7 @@ stdenv.mkDerivation {
};
meta = {
- description = "SIPE plugin for Pidgin IM.";
+ description = "SIPE plugin for Pidgin IM";
homepage = http://sipe.sourceforge.net/;
license = "GPLv2";
};
diff --git a/pkgs/applications/networking/instant-messengers/pidgin-plugins/tox-prpl/default.nix b/pkgs/applications/networking/instant-messengers/pidgin-plugins/tox-prpl/default.nix
new file mode 100644
index 0000000000000000000000000000000000000000..b87db662f45e2b9e12fbc4a334fa6f3cb755d91e
--- /dev/null
+++ b/pkgs/applications/networking/instant-messengers/pidgin-plugins/tox-prpl/default.nix
@@ -0,0 +1,29 @@
+{ stdenv, fetchurl, libtoxcore, pidgin, autoconf, automake, libtool, libsodium } :
+
+let
+ version = "17a3fd9199";
+ date = "20131012";
+in
+stdenv.mkDerivation rec {
+ name = "tox-prpl-${date}-${version}";
+
+ src = fetchurl {
+ url = "https://github.com/jin-eld/tox-prpl/tarball/${version}";
+ name = "${name}.tar.gz";
+ sha256 = "0sz5wkyfwmhaj652xpsxq4p252cmmfa1vy6mp3jfyn145c758v9n";
+ };
+
+ NIX_LDFLAGS = "-lssp -lsodium";
+
+ preConfigure = "autoreconf -vfi";
+
+ postInstall = "mv $out/lib/purple-2 $out/lib/pidgin";
+
+ buildInputs = [ libtoxcore pidgin autoconf automake libtool libsodium ];
+
+ meta = {
+ homepage = http://tox.dhs.org/;
+ description = "Tox plugin for Pidgin / libpurple";
+ license = "GPLv3";
+ };
+}
diff --git a/pkgs/applications/networking/instant-messengers/pidgin/default.nix b/pkgs/applications/networking/instant-messengers/pidgin/default.nix
index 00fba657d8a4e1ec6a595994de515db21b6e9c53..d0652adcb0d6b8a03a85afc89e34206b8dcb7545 100644
--- a/pkgs/applications/networking/instant-messengers/pidgin/default.nix
+++ b/pkgs/applications/networking/instant-messengers/pidgin/default.nix
@@ -52,7 +52,7 @@ stdenv.mkDerivation rec {
+ (lib.optionalString (gnutls != null) " --enable-gnutls=yes --enable-nss=no")
;
meta = {
- description = "Pidgin IM - XMPP(Jabber), AIM/ICQ, IRC, SIP etc client.";
+ description = "Pidgin IM - XMPP(Jabber), AIM/ICQ, IRC, SIP etc client";
homepage = http://pidgin.im;
};
}
diff --git a/pkgs/applications/networking/instant-messengers/skype/default.nix b/pkgs/applications/networking/instant-messengers/skype/default.nix
index aa90c8e7026172efb9f4f288418fe34e99e25b52..ebd84ff47b89bfaadcc456cbc6eaf8d18fced31e 100644
--- a/pkgs/applications/networking/instant-messengers/skype/default.nix
+++ b/pkgs/applications/networking/instant-messengers/skype/default.nix
@@ -48,6 +48,7 @@ stdenv.mkDerivation rec {
cat > $out/bin/skype << EOF
#!${stdenv.shell}
+ export PULSE_LATENCY_MSEC=60 # workaround for pulseaudio glitches
export LD_LIBRARY_PATH=$fullPath:$LD_LIBRARY_PATH
$dynlinker $out/libexec/skype/skype --resources=$out/libexec/skype "\$@"
EOF
diff --git a/pkgs/applications/networking/instant-messengers/torchat/default.nix b/pkgs/applications/networking/instant-messengers/torchat/default.nix
index 5a82cf9d6407e09533235b004f907351121f52d8..06bcd7a0400ecb4eea44c86aeeb45b561964602a 100644
--- a/pkgs/applications/networking/instant-messengers/torchat/default.nix
+++ b/pkgs/applications/networking/instant-messengers/torchat/default.nix
@@ -2,18 +2,17 @@
stdenv.mkDerivation rec {
name = "torchat-${version}";
- version = "0.9.9.550";
+ version = "0.9.9.553";
src = fetchurl {
- url = "http://torchat.googlecode.com/files/torchat-source-${version}.zip";
- sha256 = "01z0vrmflcmb146m04b66zihkd22aqnxz2vr4x23z1q5mlwylmq2";
+ url = "https://github.com/prof7bit/TorChat/archive/${version}.tar.gz";
+ sha256 = "0rb4lvv40pz6ab5kxq40ycvh7kh1yxn7swzgv2ff2nbhi62xnzp0";
};
buildInputs = [ python unzip wxPython wrapPython ];
pythonPath = [ wxPython ];
- preConfigure = "rm portable.txt";
- preUnpack = "sourceRoot=`pwd`/src";
+ preConfigure = "cd torchat/src; rm portable.txt";
installPhase = ''
substituteInPlace "Tor/tor.sh" --replace "tor -f" "${tor}/bin/tor -f"
@@ -29,8 +28,8 @@ stdenv.mkDerivation rec {
'';
meta = with stdenv.lib; {
- homepage = http://code.google.com/p/torchat/;
- description = "instant messaging application on top of the Tor network and it's location hidden services";
+ homepage = https://github.com/prof7bit/TorChat;
+ description = "Instant messaging application on top of the Tor network and it's location hidden services";
license = licenses.gpl3;
maintainers = [ maintainers.phreedom ];
platforms = platforms.unix;
diff --git a/pkgs/applications/networking/instant-messengers/toxic/default.nix b/pkgs/applications/networking/instant-messengers/toxic/default.nix
new file mode 100644
index 0000000000000000000000000000000000000000..c2af1274a24c98569602457ae4c5235ee41759c0
--- /dev/null
+++ b/pkgs/applications/networking/instant-messengers/toxic/default.nix
@@ -0,0 +1,40 @@
+{ stdenv, fetchurl, autoconf, libtool, automake, libsodium, ncurses
+, libtoxcore, pkgconfig }:
+
+let
+ version = "75d356e52a";
+ date = "20131011";
+in
+stdenv.mkDerivation rec {
+ name = "toxic-${date}-${version}";
+
+ src = fetchurl {
+ url = "https://github.com/Tox/toxic/tarball/${version}";
+ name = "${name}.tar.gz";
+ sha256 = "14wyvms8l07sl88g8y6g2jv95sq7cnhbaqf4n32xxilch8rymq47";
+ };
+
+ preConfigure = ''
+ autoreconf -i
+ '';
+
+ NIX_LDFLAGS = "-lsodium";
+
+ configureFlags = [
+ "--with-libtoxcore-headers=${libtoxcore}/include"
+ "--with-libtoxcore-libs=${libtoxcore}/lib"
+ "--with-libsodium-headers=${libtoxcore}/include"
+ "--with-libsodium-libs=${libtoxcore}/lib"
+ ];
+
+ buildInputs = [ autoconf libtool automake libtoxcore libsodium ncurses pkgconfig ];
+
+ doCheck = true;
+
+ meta = {
+ description = "Reference CLI for Tox";
+ license = "GPLv3+";
+ maintainers = with stdenv.lib.maintainers; [ viric ];
+ platforms = stdenv.lib.platforms.all;
+ };
+}
diff --git a/pkgs/applications/networking/irc/quassel/default.nix b/pkgs/applications/networking/irc/quassel/default.nix
index f7dc270251c9a87e44c31ded99969cdd49bd8fbb..67ff1ca02c43daea9e6ab18807779b4d80d17809 100644
--- a/pkgs/applications/networking/irc/quassel/default.nix
+++ b/pkgs/applications/networking/irc/quassel/default.nix
@@ -1,7 +1,7 @@
{ monolithic ? true # build monolithic Quassel
, daemon ? false # build Quassel daemon
, client ? false # build Quassel client
-, withKDE ? true # enable KDE integration
+, withKDE ? stdenv.isLinux # enable KDE integration
, ssl ? true # enable SSL support
, previews ? false # enable webpage previews on hovering over URLs
, stdenv, fetchurl, cmake, qt4, kdelibs, automoc4, phonon }:
diff --git a/pkgs/applications/networking/irc/weechat/default.nix b/pkgs/applications/networking/irc/weechat/default.nix
index a523089e0ed1a75b88af8042d94e8ecf026e35e4..01ba8c97d988a29b3ac101189ecf106b8963b900 100644
--- a/pkgs/applications/networking/irc/weechat/default.nix
+++ b/pkgs/applications/networking/irc/weechat/default.nix
@@ -3,12 +3,12 @@
, pythonPackages, cacert, cmake, makeWrapper }:
stdenv.mkDerivation rec {
- version = "0.4.1";
+ version = "0.4.2";
name = "weechat-${version}";
src = fetchurl {
url = "http://weechat.org/files/src/${name}.tar.gz";
- sha256 = "0gsn0mp921j7jpvrxc74h0gs0bn0w808j2zqghm1w7xbjw9hl49w";
+ sha256 = "03ypji34kb5yrxqyn8dbrjm3j00pc8v7wfsip7d3l63nyx79df9v";
};
buildInputs =
@@ -18,17 +18,16 @@ stdenv.mkDerivation rec {
];
postInstall = ''
- wrapProgram "$out/bin/weechat-curses" \
+ wrapProgram "$out/bin/weechat" \
--prefix PYTHONPATH : "$PYTHONPATH" \
--prefix PYTHONPATH : "$out/lib/${python.libPrefix}/site-packages"
'';
meta = {
- homepage = http://http://www.weechat.org/;
+ homepage = http://www.weechat.org/;
description = "A fast, light and extensible chat client";
license = stdenv.lib.licenses.gpl3;
- maintainers = [ stdenv.lib.maintainers.garbas ];
+ maintainers = with stdenv.lib.maintainers; [ garbas the-kenny ];
platforms = stdenv.lib.platforms.linux;
};
}
-
diff --git a/pkgs/applications/networking/jmeter/default.nix b/pkgs/applications/networking/jmeter/default.nix
new file mode 100644
index 0000000000000000000000000000000000000000..c3212f6aa5604732c712edf4c23e5b6c0ce1f367
--- /dev/null
+++ b/pkgs/applications/networking/jmeter/default.nix
@@ -0,0 +1,27 @@
+{ fetchurl, stdenv, ant }:
+
+stdenv.mkDerivation rec {
+ name = "jmeter-2.9";
+ src = fetchurl {
+ url = "http://ftp.unicamp.br/pub/apache//jmeter/binaries/apache-jmeter-2.9.tgz";
+ sha256 = "14r3zn910m97jqrf6k5c4lwy214snaap2242qg76h65zk9qr20ni";
+ };
+
+ installPhase = ''
+ mkdir $out
+ cp ./* $out/ -R
+ '';
+
+ meta = {
+ description = "Apache JMeter is a 100% pure Java desktop application designed to load test functional behavior and measure performance.";
+ longDescription = ''
+ The Apache JMeter desktop application is open source software, a 100%
+ pure Java application designed to load test functional behavior and
+ measure performance. It was originally designed for testing Web
+ Applications but has since expanded to other test functions.
+ '';
+ license = stdenv.lib.licenses.asl20;
+ maintainers = [ stdenv.lib.maintainers.garbas ];
+ priority = 1;
+ };
+}
diff --git a/pkgs/applications/networking/p2p/gnunet/svn.nix b/pkgs/applications/networking/p2p/gnunet/svn.nix
index b6b9db99f907d5f807dd02b289d6f27667eb4aae..ed6c348706b97943bb7e0cd166443018df6547c8 100644
--- a/pkgs/applications/networking/p2p/gnunet/svn.nix
+++ b/pkgs/applications/networking/p2p/gnunet/svn.nix
@@ -1,10 +1,11 @@
{ stdenv, fetchsvn, libextractor, libmicrohttpd, libgcrypt
, zlib, gmp, curl, libtool, adns, sqlite, pkgconfig
, libxml2, ncurses, gettext, libunistring, libidn
-, makeWrapper, autoconf, automake }:
+, makeWrapper, autoconf, automake
+, withVerbose ? false }:
let
- rev = "27775";
+ rev = "27840";
in
stdenv.mkDerivation rec {
name = "gnunet-svn-${rev}";
@@ -12,7 +13,7 @@ stdenv.mkDerivation rec {
src = fetchsvn {
url = https://gnunet.org/svn/gnunet;
inherit rev;
- sha256 = "1fa2g63rrn0mmim9v62gnm2hqr556mbcafb7cs7afycbinix4spf";
+ sha256 = "0zhxvvj5rbhca2ykfx3g93dv94xyhqsnj011a6gql7zd5vfhaf6v";
};
buildInputs = [
@@ -22,6 +23,8 @@ stdenv.mkDerivation rec {
autoconf automake
];
+ configureFlags = stdenv.lib.optional withVerbose "--enable-logging=verbose ";
+
preConfigure = ''
# Brute force: since nix-worker chroots don't provide
# /etc/{resolv.conf,hosts}, replace all references to `localhost'
diff --git a/pkgs/applications/networking/p2p/transmission/2.60.nix b/pkgs/applications/networking/p2p/transmission/2.60.nix
deleted file mode 100644
index c59fddf6364bbe2cf2dac64d3ca4297216e1a076..0000000000000000000000000000000000000000
--- a/pkgs/applications/networking/p2p/transmission/2.60.nix
+++ /dev/null
@@ -1,41 +0,0 @@
-{ stdenv, fetchurl, pkgconfig, openssl, curl, intltool, libevent,
- file, inotifyTools, gtk ? null }:
-
-stdenv.mkDerivation rec {
- name = "transmission-2.60"; # transmission >= 2.61 requires gtk3
-
- src = fetchurl {
- url = "http://download.transmissionbt.com/files/${name}.tar.xz";
- sha256 = "1ramdliyy8j7qqpkxg643lda11ynxwfhq6qcs31fr3h9x72l0rg4";
- };
-
- buildInputs = [ pkgconfig openssl curl intltool libevent
- file inotifyTools gtk ];
-
- preConfigure = ''
- sed -i -e 's|/usr/bin/file|${file}/bin/file|g' configure
- '';
-
- postInstall = ''
- rm -f $out/share/icons/hicolor/icon-theme.cache
- '';
-
- meta = {
- description = "A fast, easy and free BitTorrent client";
- longDescription = ''
- Transmission is a BitTorrent client which features a simple interface
- on top of a cross-platform back-end.
- Feature spotlight:
- * Uses fewer resources than other clients
- * Native Mac, GTK+ and Qt GUI clients
- * Daemon ideal for servers, embedded systems, and headless use
- * All these can be remote controlled by Web and Terminal clients
- * Bluetack (PeerGuardian) blocklists with automatic updates
- * Full encryption, DHT, and PEX support
- '';
- homepage = http://www.transmissionbt.com/;
- license = [ "GPLv2" ];
- maintainers = [ stdenv.lib.maintainers.astsmtl ];
- platforms = stdenv.lib.platforms.linux;
- };
-}
diff --git a/pkgs/applications/networking/p2p/transmission/default.nix b/pkgs/applications/networking/p2p/transmission/default.nix
index 2c6106d13040bd2b6e8b4a254bf0247fe1f76cfc..cb439ddb4624426b78d5b3be27e962c34eeabe0b 100644
--- a/pkgs/applications/networking/p2p/transmission/default.nix
+++ b/pkgs/applications/networking/p2p/transmission/default.nix
@@ -1,32 +1,39 @@
-{ stdenv, fetchurl, pkgconfig, openssl, curl, intltool, libevent
-, file, inotifyTools
-, enableGtk ? false, gtk ? null }:
+{ stdenv, fetchurl, pkgconfig, intltool, file, makeWrapper
+, openssl, curl, libevent, inotifyTools
+, enableGTK3 ? false, gtk3
+}:
-assert enableGtk -> gtk != null;
+let
+ version = "2.82";
+in
+
+with { inherit (stdenv.lib) optional optionals optionalString; };
stdenv.mkDerivation rec {
- name = "transmission-2.77"; # transmission >= 2.61 requires gtk3
+ name = "transmission-" + optionalString enableGTK3 "gtk-" + version;
src = fetchurl {
- url = "http://download.transmissionbt.com/files/${name}.tar.xz";
- sha256 = "1phzhj4wds6r2ziclva1b5l6l9xjsx5ji7s3m4xia44aq4znbcam";
+ url = "http://download.transmissionbt.com/files/transmission-${version}.tar.xz";
+ sha256 = "08imy28hpjxwdzgvhm66hkfyzp8qnnqr4jhv3rgshryzhw86b5ir";
};
- buildInputs = [ pkgconfig openssl curl intltool libevent
- file inotifyTools ]
- ++ stdenv.lib.optional enableGtk gtk;
+ buildInputs = [ pkgconfig intltool file openssl curl libevent inotifyTools ]
+ ++ optionals enableGTK3 [ gtk3 makeWrapper ];
preConfigure = ''
sed -i -e 's|/usr/bin/file|${file}/bin/file|g' configure
'';
- configureFlags = stdenv.lib.optionalString enableGtk "--with-gtk";
+ configureFlags = [ "--with-systemd-daemon" ]
+ ++ optional enableGTK3 "--with-gtk";
- postInstall = ''
- rm -f $out/share/icons/hicolor/icon-theme.cache
+ postInstall = optionalString enableGTK3 /* gsettings schemas for file dialogues */ ''
+ rm "$out/share/icons/hicolor/icon-theme.cache"
+ wrapProgram "$out/bin/transmission-gtk" \
+ --prefix XDG_DATA_DIRS : "${gtk3}/share"
'';
- meta = {
+ meta = with stdenv.lib; {
description = "A fast, easy and free BitTorrent client";
longDescription = ''
Transmission is a BitTorrent client which features a simple interface
@@ -40,8 +47,9 @@ stdenv.mkDerivation rec {
* Full encryption, DHT, and PEX support
'';
homepage = http://www.transmissionbt.com/;
- license = [ "GPLv2" ];
- maintainers = [ stdenv.lib.maintainers.astsmtl ];
- platforms = stdenv.lib.platforms.linux;
+ license = licenses.gpl2; # parts are under MIT
+ maintainers = with maintainers; [ astsmtl vcunat ];
+ platforms = platforms.linux;
};
}
+
diff --git a/pkgs/applications/networking/sniffers/ettercap/default.nix b/pkgs/applications/networking/sniffers/ettercap/default.nix
new file mode 100644
index 0000000000000000000000000000000000000000..3994563cf3eba16dd9d5a81f2b069c599c2df244
--- /dev/null
+++ b/pkgs/applications/networking/sniffers/ettercap/default.nix
@@ -0,0 +1,33 @@
+{ stdenv, fetchurl, cmake, libpcap, libnet, zlib, curl, pcre,
+ openssl, ncurses, glib, gtk, atk, pango, flex, bison }:
+
+stdenv.mkDerivation rec {
+ name = "ettercap-${version}";
+ version = "0.8.0";
+
+ src = fetchurl {
+ url = "https://github.com/Ettercap/ettercap/archive/v${version}.tar.gz";
+ sha256 = "1g69782wk2hag8h76jqy81szw5jhvqqnn3m4v0wjkbv9zjxy44w0";
+ };
+
+ buildInputs = [
+ cmake libpcap libnet zlib curl pcre openssl ncurses
+ glib gtk atk pango flex bison
+ ];
+
+ preConfigure = ''
+ substituteInPlace CMakeLists.txt --replace /etc \$\{INSTALL_PREFIX\}/etc
+ '';
+
+ cmakeFlags = [
+ "-DGTK2_GLIBCONFIG_INCLUDE_DIR=${glib}/lib/glib-2.0/include"
+ "-DGTK2_GDKCONFIG_INCLUDE_DIR=${gtk}/lib/gtk-2.0/include"
+ ];
+
+ meta = {
+ description = "Comprehensive suite for man in the middle attacks";
+ homepage = http://ettercap.github.io/ettercap/;
+ license = stdenv.lib.licenses.gpl2;
+ platforms = stdenv.lib.platforms.unix;
+ };
+}
diff --git a/pkgs/applications/office/abiword/default.nix b/pkgs/applications/office/abiword/default.nix
index a500bbaa240b11b0981fdc3d09abc22d5448773f..0e5a6afcdc5f87fbdfd66fb757f8131ed2f33776 100644
--- a/pkgs/applications/office/abiword/default.nix
+++ b/pkgs/applications/office/abiword/default.nix
@@ -26,4 +26,8 @@ stdenv.mkDerivation {
[ pkgconfig gtk libglade librsvg bzip2 libgnomecanvas fribidi libpng popt
libgsf enchant wv libjpeg
];
+
+ meta = {
+ description = "Word processing program, similar to Microsof Word";
+ };
}
diff --git a/pkgs/applications/office/antiword/default.nix b/pkgs/applications/office/antiword/default.nix
index c4da2b609ce769b7cb564e9e8ff98d6283d46a14..f889490a862c43ac4c09e597a0a189cd40da03ca 100644
--- a/pkgs/applications/office/antiword/default.nix
+++ b/pkgs/applications/office/antiword/default.nix
@@ -19,7 +19,7 @@ stdenv.mkDerivation {
meta = {
homepage = "http://www.winfield.demon.nl/";
- description = "convert MS Word documents to plain text or PostScript";
+ description = "Convert MS Word documents to plain text or PostScript";
license = stdenv.lib.licenses.gpl2;
maintainers = [ stdenv.lib.maintainers.simons ];
diff --git a/pkgs/applications/office/eventlist/default.nix b/pkgs/applications/office/eventlist/default.nix
new file mode 100644
index 0000000000000000000000000000000000000000..f126d6bfba659a6382ee48bc541cbc7247c9501f
--- /dev/null
+++ b/pkgs/applications/office/eventlist/default.nix
@@ -0,0 +1,28 @@
+{ stdenv, fetchurl, kdelibs, kdepimlibs, akonadi, gettext, boost }:
+
+stdenv.mkDerivation rec {
+ name = "plasmoid-eventlist-0.6.96";
+
+ src = fetchurl {
+ url = "http://kde-look.org/CONTENT/content-files/107779-plasmoid-eventlist-0.6.96.tar.bz2";
+ sha256 = "26cc7bd1c465bf1379fd0ba1fa8592eaa62f2553734d1b283e17359103908eea";
+ };
+
+ buildInputs = [ kdelibs kdepimlibs akonadi gettext boost ];
+
+ meta = {
+ inherit (kdelibs.meta) platforms;
+ description = "KDE Plasmoid to show events and todos on the desktop";
+ longDescription = ''
+ This is a plasmoid to show the events and todos from Akonadi resources (KOrganizer, Birthdays etc.).
+ With a google resource also Google calendar items can be shown.
+ Also possible with a CalDAV resource.
+ A facebook resource is also available.
+
+ Incidences can be filtered, added, edited, deleted via context menu.
+ '';
+ homepage = "http://kde-look.org/content/show.php/Eventlist?content=107779";
+ license = "GPLv3+";
+
+ };
+}
diff --git a/pkgs/applications/science/biology/arb/default.nix b/pkgs/applications/science/biology/arb/default.nix
index 1b4563555c468921ac46583e0ecad0b4fb5a3748..279091f21bd24665a78a91085bac5abcfa7d4d49 100644
--- a/pkgs/applications/science/biology/arb/default.nix
+++ b/pkgs/applications/science/biology/arb/default.nix
@@ -75,7 +75,7 @@ stdenv.mkDerivation {
'';
meta = {
- description = "ARB software for sequence database handling and analysis";
+ description = "Software for sequence database handling and analysis";
longDescription = ''The ARB software is a graphically oriented package comprising various tools for sequence database handling and data analysis. A central database of processed (aligned) sequences and any type of additional data linked to the respective sequence entries is structured according to phylogeny or other user defined criteria. Note that this package includes its own older versions of clustal etc.'';
license = "non-free";
pkgMaintainer = "http://BioLib.open-bio.org/";
diff --git a/pkgs/applications/science/chemistry/avogadro/default.nix b/pkgs/applications/science/chemistry/avogadro/default.nix
index f4b353296fdc53de301d635be0b83e74a94041c4..e45f5b645fd9d6d5ddc570e5e273db8b07f44208 100644
--- a/pkgs/applications/science/chemistry/avogadro/default.nix
+++ b/pkgs/applications/science/chemistry/avogadro/default.nix
@@ -15,7 +15,8 @@ stdenv.mkDerivation rec {
NIX_CFLAGS_COMPILE = "-include ${mesa}/include/GL/glu.h";
meta = {
+ description = "Molecule editor and visualizer";
maintainers = [ stdenv.lib.maintainers.urkud ];
- inherit (qt4.meta) platforms;
+ platforms = stdenv.lib.platforms.mesaPlatforms;
};
}
diff --git a/pkgs/applications/science/electronics/alliance/default.nix b/pkgs/applications/science/electronics/alliance/default.nix
index 90fd5901cac7fb423ae020107a8d6e682bf6f28b..ee22c66dfec0d604ff13f25120bc9b22431a6790 100644
--- a/pkgs/applications/science/electronics/alliance/default.nix
+++ b/pkgs/applications/science/electronics/alliance/default.nix
@@ -17,7 +17,7 @@ stdenv.mkDerivation {
'';
meta = {
- description = "Complete set of free CAD tools and portable libraries for VLSI design.";
+ description = "Complete set of free CAD tools and portable libraries for VLSI design";
homepage = http://www-asim.lip6.fr/recherche/alliance/;
};
}
diff --git a/pkgs/applications/science/electronics/ngspice/default.nix b/pkgs/applications/science/electronics/ngspice/default.nix
index 70153eee61b46841e12a779d53b001d92c8c9f06..579492248ea39ecdbcd153d7490234a89e53e06b 100644
--- a/pkgs/applications/science/electronics/ngspice/default.nix
+++ b/pkgs/applications/science/electronics/ngspice/default.nix
@@ -13,7 +13,7 @@ stdenv.mkDerivation {
configureFlags = [ "--enable-x" "--with-x" "--with-readline" ];
meta = {
- description = "The Next Generation Spice (Electronic Circuit Simulator).";
+ description = "The Next Generation Spice (Electronic Circuit Simulator)";
homepage = "http://ngspice.sourceforge.net";
license = ["BSD" "GPLv2"];
maintainers = with stdenv.lib.maintainers; [viric];
diff --git a/pkgs/applications/science/logic/hol/default.nix b/pkgs/applications/science/logic/hol/default.nix
index 18a16114c507bb182899d385d5046608724c031e..2e1647b6c71d9bf4b574805cd08608b7a0bb923e 100644
--- a/pkgs/applications/science/logic/hol/default.nix
+++ b/pkgs/applications/science/logic/hol/default.nix
@@ -1,8 +1,10 @@
-{stdenv, fetchurl, polyml, experimentalKernel ? false}:
+{stdenv, fetchurl, polyml, graphviz, fontconfig, liberation_ttf,
+ experimentalKernel ? true}:
let
pname = "hol4";
- version = "k.7";
+ version = "k.8";
+ holsubdir = "hol-kananaskis-8";
kernelFlag = if experimentalKernel then "-expk" else "-stdknl";
in
@@ -10,38 +12,51 @@ stdenv.mkDerivation {
name = "${pname}-${version}";
src = fetchurl {
- url = mirror://sourceforge/hol/hol/kananaskis-7/kananaskis-7.tar.gz;
- sha256 = "0gs1nmjvsjhnndama9v7gids2g86iip53v7d7dm3sfq6jxmqkwkl";
+ url = mirror://sourceforge/hol/hol/kananaskis-8/kananaskis-8.tar.gz;
+ sha256 = "5ce4c1e37301dbc38772694e98f1c7eabf69255908de204b280d8b2b1709e9d0";
};
- buildInputs = [polyml];
+ buildInputs = [polyml graphviz fontconfig liberation_ttf];
buildCommand = ''
+
+ mkdir chroot-fontconfig
+ cat ${fontconfig}/etc/fonts/fonts.conf > chroot-fontconfig/fonts.conf
+ sed -e 's@@@' -i chroot-fontconfig/fonts.conf
+ echo "${liberation_ttf}" >> chroot-fontconfig/fonts.conf
+ echo "" >> chroot-fontconfig/fonts.conf
+
+ export FONTCONFIG_FILE=$(pwd)/chroot-fontconfig/fonts.conf
+
mkdir -p "$out/src"
cd "$out/src"
tar -xzf "$src"
- cd hol4.${version}
+ cd ${holsubdir}
substituteInPlace tools/Holmake/Holmake_types.sml \
--replace "\"/bin/mv\"" "\"mv\"" \
--replace "\"/bin/cp\"" "\"cp\""
+ for f in tools/buildutils.sml help/src-sml/DOT;
+ do
+ substituteInPlace $f --replace "\"/usr/bin/dot\"" "\"${graphviz}/bin/dot\""
+ done
+
#sed -ie "/compute/,999 d" tools/build-sequence # for testing
poly < tools/smart-configure.sml
-
+
bin/build ${kernelFlag} -symlink
mkdir -p "$out/bin"
- ln -st $out/bin $out/src/hol4.${version}/bin/*
+ ln -st $out/bin "$out/src/${holsubdir}/bin/"*
# ln -s $out/src/hol4.${version}/bin $out/bin
'';
meta = {
- description = "HOL4, an interactive theorem prover based on Higher-Order Logic.";
+ description = "Interactive theorem prover based on Higher-Order Logic";
longDescription = ''
-
HOL4 is the latest version of the HOL interactive proof
assistant for higher order logic: a programming environment in
which theorems can be proved and proof tools
@@ -52,7 +67,6 @@ stdenv.mkDerivation {
engines. HOL4 is particularly suitable as a platform for
implementing combinations of deduction, execution and property
checking.
-
'';
homepage = "http://hol.sourceforge.net/";
license = "BSD";
diff --git a/pkgs/applications/science/logic/hol_light/default.nix b/pkgs/applications/science/logic/hol_light/default.nix
index f9549241a45c7d992ad262b2475bb6ca5dd00dcd..d6c1c0c18781b1009dfd4114e61734533719d212 100644
--- a/pkgs/applications/science/logic/hol_light/default.nix
+++ b/pkgs/applications/science/logic/hol_light/default.nix
@@ -26,15 +26,15 @@ stdenv.mkDerivation {
'';
meta = {
- description = "An interactive theorem prover based on Higher-Order Logic.";
+ description = "Interactive theorem prover based on Higher-Order Logic";
longDescription = ''
-HOL Light is a computer program to help users prove interesting mathematical
-theorems completely formally in Higher-Order Logic. It sets a very exacting
-standard of correctness, but provides a number of automated tools and
-pre-proved mathematical theorems (e.g., about arithmetic, basic set theory and
-real analysis) to save the user work. It is also fully programmable, so users
-can extend it with new theorems and inference rules without compromising its
-soundness.
+ HOL Light is a computer program to help users prove interesting
+ mathematical theorems completely formally in Higher-Order Logic. It sets
+ a very exacting standard of correctness, but provides a number of
+ automated tools and pre-proved mathematical theorems (e.g., about
+ arithmetic, basic set theory and real analysis) to save the user work.
+ It is also fully programmable, so users can extend it with new theorems
+ and inference rules without compromising its soundness.
'';
homepage = http://www.cl.cam.ac.uk/~jrh13/hol-light/;
license = stdenv.lib.licenses.bsd2;
diff --git a/pkgs/applications/science/logic/logisim/default.nix b/pkgs/applications/science/logic/logisim/default.nix
index 009bed3ffe2a41d13e8dc2017b532774ff84ef2c..ab46efa9a9612273d7e256d16c4f5af1042c9c50 100644
--- a/pkgs/applications/science/logic/logisim/default.nix
+++ b/pkgs/applications/science/logic/logisim/default.nix
@@ -26,7 +26,7 @@ stdenv.mkDerivation {
meta = {
homepage = "http://ozark.hendrix.edu/~burch/logisim";
- description = "Logisim is an educational tool for designing and simulating digital logic circuits.";
+ description = "Educational tool for designing and simulating digital logic circuits";
license = "GPLv2+";
};
}
diff --git a/pkgs/applications/science/logic/prover9/default.nix b/pkgs/applications/science/logic/prover9/default.nix
index 93b1657aa14a47db069edb08dbf3c25fd7bd776d..d92c7887210ef265d6b1516d4fa6708e4aad0ef3 100644
--- a/pkgs/applications/science/logic/prover9/default.nix
+++ b/pkgs/applications/science/logic/prover9/default.nix
@@ -31,14 +31,12 @@ stdenv.mkDerivation {
meta = {
homepage = "http://www.cs.unm.edu/~mccune/mace4/";
license = "GPL";
- description = "Prover9 is an automated theorem prover for first-order and equational logic.";
-
+ description = "Automated theorem prover for first-order and equational logic";
longDescription = ''
Prover9 is a resolution/paramodulation automated theorem prover
for first-order and equational logic. Prover9 is a successor of
the Otter Prover. This is the LADR command-line version.
'';
-
platforms = stdenv.lib.platforms.unix;
maintainers = [];
};
diff --git a/pkgs/applications/science/math/R/default.nix b/pkgs/applications/science/math/R/default.nix
index 51505d61439939ebaf6612b2f1c374f76b9178ae..6c8ec9e68c53b74fd12f77de4e2423e9c56887ec 100644
--- a/pkgs/applications/science/math/R/default.nix
+++ b/pkgs/applications/science/math/R/default.nix
@@ -59,7 +59,7 @@ stdenv.mkDerivation rec {
meta = {
homepage = "http://www.r-project.org/";
- description = "a free software environment for statistical computing and graphics";
+ description = "Free software environment for statistical computing and graphics";
license = stdenv.lib.licenses.gpl2Plus;
longDescription = ''
diff --git a/pkgs/applications/science/math/maxima/default.nix b/pkgs/applications/science/math/maxima/default.nix
index f5fec36756d3afd640db49b9645c1ca848678b59..b8f7f2e65b66dac1c332d54662f059f8d03691c2 100644
--- a/pkgs/applications/science/math/maxima/default.nix
+++ b/pkgs/applications/science/math/maxima/default.nix
@@ -2,7 +2,7 @@
let
name = "maxima";
- version = "5.30.0";
+ version = "5.31.2";
searchPath =
stdenv.lib.makeSearchPath "bin"
@@ -13,7 +13,7 @@ stdenv.mkDerivation {
src = fetchurl {
url = "mirror://sourceforge/${name}/${name}-${version}.tar.gz";
- sha256 = "1mhx7g0kzpiagg97s2zhaplsq1li9ya2764mhwl7jgfw2vp3jlm0";
+ sha256 = "12j5irwfckl5583h7lwh0wrp0c65q7mqzcsri2v086j50xvvv398";
};
buildInputs = [sbcl texinfo perl makeWrapper];
diff --git a/pkgs/applications/science/math/wxmaxima/default.nix b/pkgs/applications/science/math/wxmaxima/default.nix
index e9e6ca7bead75ae122e8f54b5359ed48f31d1802..01be4ba7e6c6376ecab0b53bdcea6c91d975a545 100644
--- a/pkgs/applications/science/math/wxmaxima/default.nix
+++ b/pkgs/applications/science/math/wxmaxima/default.nix
@@ -2,14 +2,14 @@
let
name = "wxmaxima";
- version = "13.04.1";
+ version = "13.04.2";
in
stdenv.mkDerivation {
name = "${name}-${version}";
src = fetchurl {
url = "mirror://sourceforge/${name}/wxMaxima/${version}/wxMaxima-${version}.tar.gz";
- sha256 = "0irp1m9vr50ym7wfj1c1vbrzd2pip1vmvn9ykqsdf04afkkwkran";
+ sha256 = "1sylvr0kfdzxxc3qsb0c6ff3lg0bzm1ib5xh78wjgzykbnvjsd99";
};
buildInputs = [wxGTK maxima makeWrapper];
@@ -26,7 +26,7 @@ stdenv.mkDerivation {
enableParallelBuilding = true;
meta = {
- description = "Cross platform GUI for the computer algebra system Maxima.";
+ description = "Cross platform GUI for the computer algebra system Maxima";
license = "GPL2";
homepage = http://wxmaxima.sourceforge.net;
platforms = stdenv.lib.platforms.linux;
diff --git a/pkgs/applications/version-management/bazaar/tools.nix b/pkgs/applications/version-management/bazaar/tools.nix
index 5a4b706f418ab191c9d615efd99649ae4d08acc3..19a00d2b8415da4c2d6c0b28a8cd97e0d55d30fc 100644
--- a/pkgs/applications/version-management/bazaar/tools.nix
+++ b/pkgs/applications/version-management/bazaar/tools.nix
@@ -15,6 +15,6 @@ rec {
name = "bzr-tools-${version}";
meta = {
- description = "Bazaar plugins.";
+ description = "Bazaar plugins";
};
}
diff --git a/pkgs/applications/version-management/codeville/0.8.0.nix b/pkgs/applications/version-management/codeville/0.8.0.nix
index d72f753a26e087f3c03a6095c433a83960319b3a..5c1910d6c6f6ce824d926b07c24bb86239fa1aa5 100644
--- a/pkgs/applications/version-management/codeville/0.8.0.nix
+++ b/pkgs/applications/version-management/codeville/0.8.0.nix
@@ -18,6 +18,6 @@ rec {
name = "codeville-0.8.0";
meta = {
- description = "Codeville - RCS with powerful merge.";
+ description = "RCS with powerful merge";
};
}
diff --git a/pkgs/applications/version-management/fossil/default.nix b/pkgs/applications/version-management/fossil/default.nix
index 368557e3c2cee5a6bda3c689273dd8f867672938..a1959eedba2f8b1ef1184bd31d2640ed0aa1a5cd 100644
--- a/pkgs/applications/version-management/fossil/default.nix
+++ b/pkgs/applications/version-management/fossil/default.nix
@@ -30,7 +30,7 @@ stdenv.mkDerivation {
};
meta = {
- description = "Simple, high-reliability, distributed software configuration management.";
+ description = "Simple, high-reliability, distributed software configuration management";
longDescription = ''
Fossil is a software configuration management system. Fossil is
software that is designed to control and track the development of a
diff --git a/pkgs/applications/version-management/git-and-tools/git-annex/default.nix b/pkgs/applications/version-management/git-and-tools/git-annex/default.nix
index d71c1dff209e837e129f5b398162d8d0947b99a2..f67fc8553c0b9d06ad0c027997c0d982d79d0e6f 100644
--- a/pkgs/applications/version-management/git-and-tools/git-annex/default.nix
+++ b/pkgs/applications/version-management/git-and-tools/git-annex/default.nix
@@ -14,8 +14,8 @@
cabal.mkDerivation (self: {
pname = "git-annex";
- version = "4.20130927";
- sha256 = "0ycfdwqicmqfj5ygrk11z7cz2b28ccvb45ny8h5i0wr6mg3apj38";
+ version = "4.20131002";
+ sha256 = "00pjb0ivcggpx4qdihrarss68c1q5viwfz4jgg7rqjnhslwvk440";
isLibrary = false;
isExecutable = true;
buildDepends = [
@@ -42,6 +42,7 @@ cabal.mkDerivation (self: {
-fProduction
-fTDFA";
preConfigure = "patchShebangs .";
+ installPhase = "./Setup install";
checkPhase = ''
export HOME="$NIX_BUILD_TOP/tmp"
mkdir "$HOME"
diff --git a/pkgs/applications/version-management/git-and-tools/github-backup/default.nix b/pkgs/applications/version-management/git-and-tools/github-backup/default.nix
index 5f0df6c8ead1cbb24a74abe609bb3f276fc1ed1a..557886a4deb11d8e4899b57f3e4e75499300e542 100644
--- a/pkgs/applications/version-management/git-and-tools/github-backup/default.nix
+++ b/pkgs/applications/version-management/git-and-tools/github-backup/default.nix
@@ -1,17 +1,18 @@
-{ cabal, extensibleExceptions, filepath, github, hslogger, IfElse
-, MissingH, mtl, network, prettyShow, text
+{ cabal, extensibleExceptions, filepath, git, github, hslogger
+, IfElse, MissingH, mtl, network, prettyShow, text, unixCompat
}:
cabal.mkDerivation (self: {
pname = "github-backup";
- version = "1.20130414";
- sha256 = "1s8s1kv4kj086kzq8iq28zyrlg65hrzg3563fw3dazfik73cmlcp";
+ version = "1.20131006";
+ sha256 = "0yc2hszi509mc0d6245dc8cq20mjjmr8mgrd8571dy9sgda532pf";
isLibrary = false;
isExecutable = true;
buildDepends = [
extensibleExceptions filepath github hslogger IfElse MissingH mtl
- network prettyShow text
+ network prettyShow text unixCompat
];
+ buildTools = [ git ];
meta = {
homepage = "https://github.com/joeyh/github-backup";
description = "backs up everything github knows about a repository, to the repository";
diff --git a/pkgs/applications/video/ogmtools/default.nix b/pkgs/applications/video/ogmtools/default.nix
index 1a6bc6629993119741a9efce0f56fb4040920b8b..11a16e3a79d2f9a645c270ed3667612b6b7d6349 100644
--- a/pkgs/applications/video/ogmtools/default.nix
+++ b/pkgs/applications/video/ogmtools/default.nix
@@ -11,11 +11,14 @@ stdenv.mkDerivation rec {
buildInputs = [libogg libvorbis libdvdread];
meta = {
- description = "Tools for modifying and inspecting OGG media streams. Includes dvdxchap tool for extracting chapter information from DVD.";
- longDescription = "These tools allow information about (ogminfo) or extraction from (ogmdemux) or creation of (ogmmerge) OGG media streams.";
+ description = "Tools for modifying and inspecting OGG media streams";
+ longDescription = ''
+ These tools allow information about (ogminfo) or extraction from
+ (ogmdemux) or creation of (ogmmerge) OGG media streams. Includes dvdxchap
+ tool for extracting chapter information from DVD.
+ '';
homepage = http://www.bunkus.org/videotools/ogmtools/;
license = "GPLv2";
-
platforms = stdenv.lib.platforms.all;
};
}
diff --git a/pkgs/applications/video/quvi/library.nix b/pkgs/applications/video/quvi/library.nix
index bef755afed46e38277ded65b01259e865017206c..49207ad066158eddf69ade692b465140d72dfc75 100644
--- a/pkgs/applications/video/quvi/library.nix
+++ b/pkgs/applications/video/quvi/library.nix
@@ -12,7 +12,7 @@ stdenv.mkDerivation rec {
buildInputs = [ pkgconfig lua5 curl quvi_scripts ];
meta = {
- description = "Quvi is a web video downloader.";
+ description = "Web video downloader";
homepage = http://quvi.sf.net;
license = "LGPLv2.1+";
platforms = stdenv.lib.platforms.linux;
diff --git a/pkgs/applications/video/quvi/scripts.nix b/pkgs/applications/video/quvi/scripts.nix
index 9c6cd9d31377abe97ee46b21ac68a0fd13dae53a..cc82158ae829d593144ff1cf1a011af8d6ed02c8 100644
--- a/pkgs/applications/video/quvi/scripts.nix
+++ b/pkgs/applications/video/quvi/scripts.nix
@@ -12,7 +12,7 @@ stdenv.mkDerivation rec {
buildInputs = [ pkgconfig ];
meta = {
- description = "Quvi is a web video downloader.";
+ description = "Web video downloader";
homepage = http://quvi.sf.net;
license = "LGPLv2.1+";
platforms = stdenv.lib.platforms.linux;
diff --git a/pkgs/applications/video/quvi/tool.nix b/pkgs/applications/video/quvi/tool.nix
index b2ddabfa6a8d2f95c7610d8682857aae200be125..f8b6aad43106fe5bf10414969d2339181a100744 100644
--- a/pkgs/applications/video/quvi/tool.nix
+++ b/pkgs/applications/video/quvi/tool.nix
@@ -12,7 +12,7 @@ stdenv.mkDerivation rec {
buildInputs = [ pkgconfig lua5 curl quvi_scripts libquvi ];
meta = {
- description = "Quvi is a web video downloader.";
+ description = "Web video downloader";
homepage = http://quvi.sf.net;
license = "LGPLv2.1+";
platforms = stdenv.lib.platforms.linux;
diff --git a/pkgs/applications/virtualization/OVMF/default.nix b/pkgs/applications/virtualization/OVMF/default.nix
index 7d101aac790bd609f1dffd23229a9030e2b1f053..e6d0b7cb40dd46b09465c59c9c4db11b182233dc 100644
--- a/pkgs/applications/virtualization/OVMF/default.nix
+++ b/pkgs/applications/virtualization/OVMF/default.nix
@@ -12,7 +12,7 @@ let
in
stdenv.mkDerivation (edk2.setup "OvmfPkg/OvmfPkg${targetArch}.dsc" {
- name = "OVMF-2012-03-13";
+ name = "OVMF-2012-10-09";
unpackPhase = ''
for file in \
diff --git a/pkgs/applications/virtualization/virt-manager/default.nix b/pkgs/applications/virtualization/virt-manager/default.nix
index 195ee5d45c01ac55d03bbc0dd27e4fb53a950318..d1e2a8b7883d02818e2f2189d5e1c800de2fd2c5 100644
--- a/pkgs/applications/virtualization/virt-manager/default.nix
+++ b/pkgs/applications/virtualization/virt-manager/default.nix
@@ -78,7 +78,12 @@ stdenv.mkDerivation rec {
meta = {
homepage = http://virt-manager.org;
- description = "The 'Virtual Machine Manager' application (virt-manager for short package name) is a desktop user interface for managing virtual machines.";
+ description = "Desktop user interface for managing virtual machines";
+ longDescription = ''
+ The virt-manager application is a desktop user interface for managing
+ virtual machines through libvirt. It primarily targets KVM VMs, but also
+ manages Xen and LXC (linux containers).
+ '';
license = "GPLv2";
maintainers = with stdenv.lib.maintainers; [qknight];
};
diff --git a/pkgs/applications/virtualization/virtinst/default.nix b/pkgs/applications/virtualization/virtinst/default.nix
index 26b16375e659551daccba4b17f570e106b06dbd4..bb8b7a1d0d99bbf21160c6a17946c44813564e65 100644
--- a/pkgs/applications/virtualization/virtinst/default.nix
+++ b/pkgs/applications/virtualization/virtinst/default.nix
@@ -40,6 +40,6 @@ stdenv.mkDerivation rec {
homepage = http://virt-manager.org;
license = "GPLv2+";
maintainers = with stdenv.lib.maintainers; [qknight];
- description = "The Virt Install tool (virt-install for short command name, virtinst for package name) is a command line tool which provides an easy way to provision operating systems into virtual machines.";
+ description = "Command line tool which provides an easy way to provision operating systems into virtual machines";
};
}
diff --git a/pkgs/applications/window-managers/ion-3/default.nix b/pkgs/applications/window-managers/ion-3/default.nix
index b4dabb300c191c1adab6366e501a5fd1c35bf495..7a467b1fcdb9410893a9e0f769a7e592d82762e0 100644
--- a/pkgs/applications/window-managers/ion-3/default.nix
+++ b/pkgs/applications/window-managers/ion-3/default.nix
@@ -3,7 +3,7 @@
stdenv.mkDerivation {
name = "ion-3-20090110";
meta = {
- description = "Ion is a tiling tabbed window manager designed with keyboard users in mind.";
+ description = "Tiling tabbed window manager designed with keyboard users in mind";
homepage = http://modeemi.fi/~tuomov/ion;
};
src = fetchurl {
diff --git a/pkgs/applications/window-managers/stumpwm/default.nix b/pkgs/applications/window-managers/stumpwm/default.nix
deleted file mode 100644
index ab261a78fb015a616bb9c52584be946f826c6501..0000000000000000000000000000000000000000
--- a/pkgs/applications/window-managers/stumpwm/default.nix
+++ /dev/null
@@ -1,61 +0,0 @@
-args :
-let
- lib = args.lib;
- fetchurl = args.fetchurl;
- noDepEntry = args.noDepEntry;
- fullDepEntry = args.fullDepEntry;
-
- buildInputs = lib.attrVals ["clisp" "texinfo"] args;
- version = lib.attrByPath ["version"] "0.9.7" args;
-
- pkgName = "stumpwm";
-in
-rec {
- src = fetchurl {
- url = "mirror://savannah/stumpwm/${pkgName}-${version}.tgz";
- sha256 = "a0793d22ef90731d34f84e51deafb4bc2095a357c70b9505dc57516f481cdf78";
- };
-
- inherit buildInputs;
- configureFlags = ["--with-lisp=clisp"];
- envVars = noDepEntry (''
- export HOME="$NIX_BUILD_TOP";
- '');
-
- installation = fullDepEntry (''
- mkdir -p $out/bin
- mkdir -p $out/share/stumpwm/doc
- mkdir -p $out/share/info
- mkdir -p $out/share/stumpwm/lisp
-
- cp stumpwm $out/bin
- cp contrib/stumpish $out/bin || true
- cp sample-stumpwmrc.lisp $out/share/stumpwm/doc
- cp stumpwm.info $out/share/info
-
- cp -r {.,cl-ppcre}/*.{lisp,fas,lib,asd} contrib $out/share/stumpwm/lisp
- cd $out/share/stumpwm/lisp
- cat << EOF >init-stumpwm.lisp
- (require "asdf")
- (asdf:operate 'asdf:load-op :cl-ppcre)
- (asdf:operate 'asdf:load-op :stumpwm)
- EOF
- clisp -K full -i init-stumpwm.lisp
- cat << EOF >init-stumpwm.lisp
- (require "asdf")
- (asdf:operate 'asdf:load-source-op :cl-ppcre)
- (asdf:operate 'asdf:load-source-op :stumpwm)
- EOF
- '') ["minInit" "defEnsureDir" "addInputs" "doMake"];
-
- /* doConfigure should be specified separately */
- phaseNames = ["envVars" "doConfigure" "doMake" "installation"];
-
- name = "${pkgName}-" + version;
- meta = {
- description = "Common Lisp-based ratpoison-like window manager.";
- maintainers = [args.lib.maintainers.raskin];
- platforms = with args.lib.platforms;
- linux ++ freebsd;
- };
-}
diff --git a/pkgs/applications/window-managers/wmii31/default.nix b/pkgs/applications/window-managers/wmii31/default.nix
index 50655a851e2a0b5f35e98cc59b181548d77cb063..dd49cf5ec43ea1626bda464b855f2b5bc262dd1c 100644
--- a/pkgs/applications/window-managers/wmii31/default.nix
+++ b/pkgs/applications/window-managers/wmii31/default.nix
@@ -29,7 +29,7 @@ args: with args; stdenv.mkDerivation {
cp cmd/wmiimenu \$out/bin
";
meta = { homepage = "www.suckless.org";
- description = "one small tool of the wmii window manger to let the user select an item from a list by filtering..";
+ description = "One small tool of the wmii window manger to let the user select an item from a list by filtering";
license="MIT";
};
}
diff --git a/pkgs/build-support/builder-defs/builder-defs.nix b/pkgs/build-support/builder-defs/builder-defs.nix
index 3c5d7af621c887dc9ab8728469c75a0b17ab4e55..e22aa6bc66efcfa6ec340f59f845f9e07fe4691b 100644
--- a/pkgs/build-support/builder-defs/builder-defs.nix
+++ b/pkgs/build-support/builder-defs/builder-defs.nix
@@ -565,13 +565,15 @@ let inherit (builtins) head tail trace; in
# Interpreters that are already in the store are left untouched.
echo "patching script interpreter paths"
local f
- for f in $(find "${dir}" -type f -perm +0100); do
+ for f in $(find "${dir}" -xtype f -perm +0100); do
local oldPath=$(sed -ne '1 s,^#![ ]*\([^ ]*\).*$,\1,p' "$f")
if test -n "$oldPath" -a "''${oldPath:0:''${#NIX_STORE}}" != "$NIX_STORE"; then
local newPath=$(type -P $(basename $oldPath) || true)
if test -n "$newPath" -a "$newPath" != "$oldPath"; then
echo "$f: interpreter changed from $oldPath to $newPath"
sed -i "1 s,$oldPath,$newPath," "$f"
+ else
+ echo "$f: not changing interpreter from $oldPath"
fi
fi
done
diff --git a/pkgs/data/fonts/anonymous-pro/default.nix b/pkgs/data/fonts/anonymous-pro/default.nix
index df98d8197f5d542bd644f168e10b4d3fe9aa9cc1..21a1c9bf5c8578c4c96bd08c81705784c656a920 100644
--- a/pkgs/data/fonts/anonymous-pro/default.nix
+++ b/pkgs/data/fonts/anonymous-pro/default.nix
@@ -33,7 +33,7 @@ rec {
'') ["addInputs"];
meta = {
- description = "A TrueType font set intended for source code";
+ description = "TrueType font set intended for source code";
maintainers = with a.lib.maintainers;
[
raskin
diff --git a/pkgs/data/fonts/arkpandora/default.nix b/pkgs/data/fonts/arkpandora/default.nix
index be1292204ad77e84f9e9e2a4b40fb012e8e3be96..7394dce551bae27b1e3a825db35b620526e30dd8 100644
--- a/pkgs/data/fonts/arkpandora/default.nix
+++ b/pkgs/data/fonts/arkpandora/default.nix
@@ -17,6 +17,6 @@ rec {
name = "arkpandora-" + version;
meta = {
- description = "ArkPandora fonts, metrically identical to Arial and Times New Roman.";
+ description = "Font, metrically identical to Arial and Times New Roman";
};
}
diff --git a/pkgs/data/fonts/lmodern/default.nix b/pkgs/data/fonts/lmodern/default.nix
index 831a3ddbd09ccd806eec0bf25e5d1284b0c17f90..1368537c2a1ba5dfc4b83eaf0e661712cad207ac 100644
--- a/pkgs/data/fonts/lmodern/default.nix
+++ b/pkgs/data/fonts/lmodern/default.nix
@@ -9,10 +9,10 @@ stdenv.mkDerivation {
};
installPhase = ''
- mkdir -p $out/texmf/
+ mkdir -p $out/texmf-dist/
mkdir -p $out/share/fonts/
- cp -r ./* $out/texmf/
+ cp -r ./* $out/texmf-dist/
cp -r fonts/{opentype,type1} $out/share/fonts/
ln -s $out/texmf* $out/share/
diff --git a/pkgs/data/fonts/redhat-liberation-fonts/default.nix b/pkgs/data/fonts/redhat-liberation-fonts/default.nix
index c331b85029d931aca539b44971b5f5480df6a985..08faeafc619cfcd17e3bb8adecdeacd54e99dde5 100644
--- a/pkgs/data/fonts/redhat-liberation-fonts/default.nix
+++ b/pkgs/data/fonts/redhat-liberation-fonts/default.nix
@@ -16,7 +16,7 @@ stdenv.mkDerivation rec {
'';
meta = {
- description = "Liberation Fonts, replacements for Times New Roman, Arial, and Courier New.";
+ description = "Liberation Fonts, replacements for Times New Roman, Arial, and Courier New";
longDescription = ''
The Liberation Fonts are intended to be replacements for the three most
diff --git a/pkgs/data/fonts/tipa/default.nix b/pkgs/data/fonts/tipa/default.nix
index 47e98f7c53aac98c2d12812008b2008308be16dc..1049e6924bd0c7f3e64e488b12c42357e6d864e7 100644
--- a/pkgs/data/fonts/tipa/default.nix
+++ b/pkgs/data/fonts/tipa/default.nix
@@ -9,7 +9,7 @@ stdenv.mkDerivation {
};
installPhase = ''
- export PREFIX="$out/texmf"
+ export PREFIX="$out/texmf-dist"
mkdir -p "$PREFIX" "$out/share"
make install PREFIX="$PREFIX"
diff --git a/pkgs/data/fonts/unifont/default.nix b/pkgs/data/fonts/unifont/default.nix
index 79d1a0909058c45d7d506fc1fbbcb5dfd8f8c56e..893659bc763ec66b016b2e873fb03401ba5e096a 100644
--- a/pkgs/data/fonts/unifont/default.nix
+++ b/pkgs/data/fonts/unifont/default.nix
@@ -32,6 +32,6 @@ stdenv.mkDerivation {
'';
meta = {
- description = "Unicode font for Base Multilingual Plane.";
+ description = "Unicode font for Base Multilingual Plane";
};
}
diff --git a/pkgs/data/misc/tzdata/default.nix b/pkgs/data/misc/tzdata/default.nix
index c49430935aeba2b7f665cf81a0cdb94ff0ce08df..da043da09678b6c309334b426b0cd0bc645bb670 100644
--- a/pkgs/data/misc/tzdata/default.nix
+++ b/pkgs/data/misc/tzdata/default.nix
@@ -1,6 +1,6 @@
{ stdenv, fetchurl }:
-let version = "2012f"; in
+let version = "2013g"; in
stdenv.mkDerivation rec {
name = "tzdata-${version}";
@@ -8,11 +8,11 @@ stdenv.mkDerivation rec {
srcs =
[ (fetchurl {
url = "http://www.iana.org/time-zones/repository/releases/tzdata${version}.tar.gz";
- sha256 = "1k165i8g23rr0z26k02x1l4immp69g6yqjrd3lwmbvj5li4mmsdg";
+ sha256 = "0krsgncjnk64g3xshj5xd3znskcx9wwy20g1wmm2lwycincx7kdn";
})
(fetchurl {
url = "http://www.iana.org/time-zones/repository/releases/tzcode${version}.tar.gz";
- sha256 = "1m6rg9003mkjyvpv5gg5lcia9fzhy7ndwgs68qlpbipnw5p0k2pk";
+ sha256 = "0ysqm72xm9vcykqg9zgry69w6gr3i6b6mpbvgfmwyrdvb6s5ihy7";
})
];
diff --git a/pkgs/desktops/gnome-2/platform/libgnome/default.nix b/pkgs/desktops/gnome-2/platform/libgnome/default.nix
index 5ab6d5e813d6acd7c7a2c3f9fffb0e96f8a0474a..c190b9578e962db226eccf6c0331a99c594cc685 100644
--- a/pkgs/desktops/gnome-2/platform/libgnome/default.nix
+++ b/pkgs/desktops/gnome-2/platform/libgnome/default.nix
@@ -3,7 +3,7 @@
stdenv.mkDerivation rec {
name = src.pkgname;
-
+
src = fetchurl_gnome {
project = "libgnome";
major = "2"; minor = "32"; patchlevel = "1";
diff --git a/pkgs/desktops/kde-4.11/default.nix b/pkgs/desktops/kde-4.11/default.nix
index b1cd9e919fbbd99ef8f344d86564c8a5d5c87bd3..d3840120a657da234b95222e2e0b1c5f064c9c14 100644
--- a/pkgs/desktops/kde-4.11/default.nix
+++ b/pkgs/desktops/kde-4.11/default.nix
@@ -1,4 +1,4 @@
-{ callPackage, callPackageOrig, stdenv, qt48, release ? "4.11.0" }:
+{ callPackage, callPackageOrig, stdenv, qt48, release ? "4.11.2" }:
let
# Need callPackageOrig to avoid infinite cycle
diff --git a/pkgs/desktops/kde-4.11/kde-package/4.11.2.nix b/pkgs/desktops/kde-4.11/kde-package/4.11.2.nix
new file mode 100644
index 0000000000000000000000000000000000000000..04a65cc08c64353321adf6ab7786ec3232e5ce49
--- /dev/null
+++ b/pkgs/desktops/kde-4.11/kde-package/4.11.2.nix
@@ -0,0 +1,444 @@
+{stable=true;
+hashes=builtins.listToAttrs[
+ {name="amor";value="1p31vayk12pfgrx5bi0c7kiwzyk1j84b9cssrir63amfxa0gfqm5";}
+ {name="analitza";value="11bwyfqah01riilrl73b9aymd8jqkprch60fi7ya5jvz385ngxzk";}
+ {name="ark";value="0cygijr642xhrrd1a74nzgidqlb244xnp9na3ry7n49rxni3bm1n";}
+ {name="audiocd-kio";value="0a52wp0hfnw24asyy6akfnyyb1hfkkzfiy2fml7zs9pqr1knxbq1";}
+ {name="blinken";value="0wc72gx141id6h35z2lhc762yp2mi4j3bdrhlsg05f42cz0dyzv6";}
+ {name="bomber";value="1zszxy94gbzdq1jddfglxcpk3d7ly3cn2hmllblhqywx9d2s8app";}
+ {name="bovo";value="1fr1hwpcqazh5y39wgahydr91fnd0rbrnwv2ajaq8zzaqbqqkgqv";}
+ {name="cantor";value="01i2w42x606yrcrr4zacalw8rhwjczij0vfdmkqsr27dvnpl64fa";}
+ {name="cervisia";value="1iln0p690kd40anpq26snyhb1d2ql3kz89y05lbgq14n9v4iriij";}
+ {name="dolphin-plugins";value="0d386hfynxqgmcizqqspzi7lzhlm2nwz0agm7iaw6xl26xm0h5bg";}
+ {name="dragon";value="0jnqnskf4g93fd6mw5b11mp5006yk7p0lshbnglrsnybznh6q2k5";}
+ {name="ffmpegthumbs";value="15hcsglcwqmwhdnp0i8d3slr4k0j94m57baiv7axn4wpbsss5k5n";}
+ {name="filelight";value="1npwgsngqk01akzyny2x7f9c7j092c4vjfmdnm2g7hm36q2gy823";}
+ {name="granatier";value="0bclrsi6999xcsmksbg280mvhszxdsr3f5cyzsn5yahs3k6isf2j";}
+ {name="gwenview";value="1qq827b1dfqx5xybr8bjs9ch7407ix6w47iryrbs8vs3k08qw8jw";}
+ {name="jovie";value="1fq8vihh7v19wmwfgxg3m6qi4730wj12m9sv41c7nwdqz3c0gzs2";}
+ {name="juk";value="18lyw6w7z2f72j9madg9rksafj1dpz8pdc09fby9gvkwacd7qsab";}
+ {name="kaccessible";value="0swzpk3kfrc4a3bf9gf40kh8y6nyd2qhvnxxsv6m00m701cj73ar";}
+ {name="kactivities";value="13iz2d2l7rn2d9q5c3mg4836mxgnds83cy2ll18r82bpp59qj4nx";}
+ {name="kajongg";value="0wvdf9lkkiy07dhwvmamz4gginq6ljy57swp4j4z2mm8m3x9i071";}
+ {name="kalgebra";value="0p2k1c710j5nsvb218h3mkbymsd48y0yw09ijx16cbdwvka7mpag";}
+ {name="kalzium";value="0mflvnb3nrrgh6h172lkhh0mxwrpdwcji74f8g6kb7xpr45ms21k";}
+ {name="kamera";value="1rybwccq3q6q0xk9p7f4clx1gf73fqzl69dx99q19wfc5y23pmg9";}
+ {name="kanagram";value="10vdkva83kb8rk6xaxcv5lgdil5wnz6i2bphz2c029s4vm8d2i2n";}
+ {name="kapman";value="0m5mawy3bjp2zd3jkylxsw4ccwzqg8lqd2v9i07zzf6f9ihjqs6r";}
+ {name="kapptemplate";value="16w8lrq2an4iwrss81fp0jisd52v2lwbvyam93cwxfcp4bsbzs9y";}
+ {name="kate";value="0n6jnfwprd5xjyja1dmja785swxgxnpz769xbg5aylnr1rsldzv2";}
+ {name="katomic";value="14rrnm6qf5lf05lj9d2zalrv5npj4hkng4i68y1svkgjl8p98j52";}
+ {name="kblackbox";value="00n3n011cnspdh606aa3scxj388vs3j1bamhk6bxnhmc26gbi54b";}
+ {name="kblocks";value="0l080dqdkqqqn1927gnjzbp3jqwladw1qmkx171291qxa0x364x0";}
+ {name="kbounce";value="10q1821wcnh4xggrndgvsm4dx6hyx4nll3f7blz77cga8fvz8lbw";}
+ {name="kbreakout";value="1xhnmlp2f8a0pmsabsw0yc53i5hcxf1bgid1ffbbgsr014xgqmmi";}
+ {name="kbruch";value="1rridi7lv1izmq68ymjmmm7mvyl3bdnkxj84dxg97yv91yqjx6ys";}
+ {name="kcachegrind";value="0crsb236nay9c0r49hgmiysa9bqwy89aj1avh3sxh82b7dsqmplp";}
+ {name="kcalc";value="0mw77vw8py0xnvkx43lvfzkghwd974chiszxck78iks2m12vgnpz";}
+ {name="kcharselect";value="1ys31fx7g85xmhia05s0i30k1jf1in83hnwc568lsbzvw37adbim";}
+ {name="kcolorchooser";value="0cn9n82kk08c55sy1hncpg5pjzlinkgvmii2p5gyp28fx4yphh45";}
+ {name="kcron";value="05bgwijfcpk56fkmnfjgcrmvkr50j1p524xg8s7zjxsdgib4p9xs";}
+ {name="kdeartwork";value="166fm27iby4gjk8f8zbdamwzkjh5wbvhfj9wn0pkp2dm8l9h8lq2";}
+ {name="kde-baseapps";value="1kgwgrn73x89zipkhq1irs09ka9wi8hk22daf16c4a6hbpinl24x";}
+ {name="kde-base-artwork";value="076h9sl1gyn6c2lmslig9p7w7m049bna9l8wv5jllwssm8i83ccg";}
+ {name="kde-dev-scripts";value="0dpdpc24kcyihgqqypqrxhmfwsmhl9ffim80n2rsdp3aka4y10vv";}
+ {name="kde-dev-utils";value="1j77v0d706ic9m008apqwc1287ma47qmpbv07xv770i0wjh90pl6";}
+ {name="kdegraphics-mobipocket";value="02dzr5lm75p6rw7k30aj5m296h8whxg1shrv8s1pm7ari2660d50";}
+ {name="kdegraphics-strigi-analyzer";value="09cnwvmkjyxagpb5sqgcj69fr496wb0pn4xns65yzynv0540hkkd";}
+ {name="kdegraphics-thumbnailers";value="1fs69zih92dlm8l60br0c0nwy095hsnszdyspdkmz52ycznmzk28";}
+ {name="kdelibs";value="01nzkrmvv8pa4x7mq5nw0z6dasm668q37mhdgvkg1hk7i57w98z5";}
+ {name="kdenetwork-filesharing";value="0ah9v7vvpg8v8nn59h168zn2gaajf39ha2617dyicknc4gn9rsgk";}
+ {name="kdenetwork-strigi-analyzers";value="1iwhr1ckn06z50j1fq9ah15gni3am91gyhyi0f21jaqdigxpi3my";}
+ {name="kdepim";value="0gs06h182m74fgdp20z3w4h8ib5xm1h0i1asnwy1s61gvpkcm63h";}
+ {name="kdepimlibs";value="0kxnczl97wavm3c75wmy4yjw3vbq4x0jdkbk611jn8hqj32c3fl7";}
+ {name="kdepim-runtime";value="13j39qbb6vgsfhypby994pgwlmmyimmqvfri92m15l0ir7rqgfwm";}
+ {name="kdeplasma-addons";value="1dy3gw8z18acs3dmw375jv9qnxjrdwzzgj2p164icid7l2041n8l";}
+ {name="kde-runtime";value="1w4xav8abgqfj943iz2gjzfdmlnk25r5xj3g79sw1ip1bcvkhpq4";}
+ {name="kdesdk-kioslaves";value="1npqa9wwbgjwlnr24dgprdndygmvsixf19hjbplcnp41dn2q14nz";}
+ {name="kdesdk-strigi-analyzers";value="1b4anyzl3xd8pfhia8s0mbrhlyr086gic1as766ynddjpr6a4a94";}
+ {name="kdesdk-thumbnailers";value="0jmkgmabbip7ymjmvyxdrji7xbplrhcrq4vlq8z0jbnyh9b9yngx";}
+ {name="kde-wallpapers";value="1l4hr5nxvf10yv2n76znrz1s0v7xqppipisc1ffbfdnf2l4wrw11";}
+ {name="kdewebdev";value="0gp1vm905p0a0j4h1lakj2zxfm4c78898rl05yf04g9x25yj3mbg";}
+ {name="kde-workspace";value="05yr52xq6w1j2kc4n5wan5f5c7xbcnaad7sdhfns3alg1grlc3i6";}
+ {name="kdf";value="0nblxiav3rw9zggqxpawvknadxbr601m55535k3gzpg3a4slk7nc";}
+ {name="kdiamond";value="0w0fzlpvj98ykvvgyzp8hhkn20pyhxc1c8krlagaqxncv1b7mhcf";}
+ {name="kdnssd";value="0q74myd7shrp43ny2vm7hadr2aix1v35v0hg6i99z7rif9ai8yjh";}
+ {name="kfloppy";value="1w1qiplcnbq10qv4lyjx521adkcg9w7z372w7fi18hjv93ryliis";}
+ {name="kfourinline";value="0irghbp7hsrl7bhi2ggf6rb0p62vck47rmmy6zb30wv32xk9gz9k";}
+ {name="kgamma";value="1cbdxbh57jcz9anawvwybi1s4skcyq84f2r5mjs1xyg2s2fv1l8b";}
+ {name="kgeography";value="00g544kc7hkabk5xbkl07k3h515ac84l4a49853pj2ryrdrikmvx";}
+ {name="kget";value="1mdfrwdf6lm94vcc5m4l7q14b70x2pkd0ham194acd60np8bk5s4";}
+ {name="kgoldrunner";value="0dbhvqxryilixv7ak0b79g8d8a2mbgkp440sxkl31xjak05c1qmv";}
+ {name="kgpg";value="10py9c1z8i1p0acp2lbi6c95gsfhfv1cw5544xp31v5iccrv2izn";}
+ {name="khangman";value="0j13zzplvrgrq8gsn7xfbf19xclc6kvsrzbnbgp83ji1dg168z6c";}
+ {name="kig";value="0ld9g522n361q0h7yvb3zljllbddyglxiamw2hs2svsm7k98klz9";}
+ {name="kigo";value="1rn8pw4jw7ia3dhwx3jwfzylfd4l067qp1kp01lixddfd0ivh42r";}
+ {name="killbots";value="0c0hx61by8n10j3wcpwi6pzbq7bnmpylamj0c1r5pbxm69ljsaiv";}
+ {name="kimono";value="1p40q61p98vz9s4dkwm51p36yk2qx2s00fpiyi1pi73qg4klbc4j";}
+ {name="kiriki";value="0f01zdlpzwlkriv48p13wlg7j2b0dwzhd7hrq35kyb3jzwx1pc5n";}
+ {name="kiten";value="0kk5s3idg5vz59drc65w53fd1l2x4vh593crc7by2dgzsf6x40sd";}
+ {name="kjumpingcube";value="1gdbjv42dryyap3dln7wy3pysbyy9d10vbpb1asxbpn1kzlzlf96";}
+ {name="klettres";value="08h3b70nj4d4cb71fvm3wkgy27vm1aqx8xzkqdgzs2snzb8ra983";}
+ {name="klickety";value="1vmnbfjd620g2xibxfpb18cfdfcksny7rjah4j90cvadcsbg8x3x";}
+ {name="klines";value="10sk0fn6aavdf0df1xw3p0nbwv22ccpdg00xv7h8m4fk43j04dvp";}
+ {name="kmag";value="062kl6j150f579npfkv7jm2b9zih0ahfpzbpl635fz2av2aimm8j";}
+ {name="kmahjongg";value="1xikbz840dh57rf83af0jnmjb9q4ggd5801kiqkq6lkp413iij23";}
+ {name="kmines";value="0ijibp21f6s5l55m2zrcdz2a8xqjk22na79rc0wsdps7pmvf5sfj";}
+ {name="kmix";value="0md4fqv047g3s9bhr8jz2fcwq1vsld2jfi8j7cg8b8bh73kd2fbq";}
+ {name="kmousetool";value="1x8vb0hjmx6xac2602iaab93ha2nfk8i0y67z48p6i7s2n3zni06";}
+ {name="kmouth";value="10ibhgz7mv4kaiyl779h0qlpwgx4s8flsh0850if06mhdxjxld2y";}
+ {name="kmplot";value="1cy9qi53ivb3zy1lcb35ivh42yvj0gikr8m7j4nlrg4xy93gjrhd";}
+ {name="knavalbattle";value="1nd2z8ylmqcj515l3llbq2crdlds7qidni8ja24nk1wf5h4k9amp";}
+ {name="knetwalk";value="01jjal03srn55mlb11vkimgh1mixdwxqi0vh1s56hd894ssn0hgh";}
+ {name="kolf";value="0nsy2wp3fwing3hkwspjm4d8swhzamaaj5x7k0jyvcqcj93sgp1g";}
+ {name="kollision";value="1vz313lr1bp7crfnkdfvz5c7dynsyaqhv1pm6fyjv6ribv3dh48q";}
+ {name="kolourpaint";value="1k8kggx9ljkms4q70m38xd8a364nkynhkqiz2h1znr779sfqy5vp";}
+ {name="kompare";value="0kp6xzgbbhxxspmlx86f7vhn34iknvspjpniaxqvadrfi6xn4801";}
+ {name="konquest";value="072nvaxa1yjaq16095xkla3lndyfq2p801wc0r0m2imc62f30cbd";}
+ {name="konsole";value="17m68zq97whybvixgjdaz45d91x48aw7ijkzfapml7fldpf32bqw";}
+ {name="kopete";value="1q3825fl5pbim3rfi9s8k5sscvbwdacy00rkww4jdw8z3xxsriqj";}
+ {name="korundum";value="1iam31q7cf7a9yxx1i0gnqhnm0262ns8qpr6h2n7cmzkns8bckal";}
+ {name="kpat";value="00mlmqbm0f3yjm89vs91l0rc4r9lsvh0qq59za43rkg8j2rg5nmz";}
+ {name="kppp";value="0gxnd0p48waz0nz4inalyk52xvbhyd3w5m08p1q2a7ssczvza2wp";}
+ {name="krdc";value="1s8qm8s6gxfpdgvh4zi7svs48fnrngj7hxkyp1fjmksaczffrfx1";}
+ {name="kremotecontrol";value="1zjpagr0kcmqsjg4sswqhannc1rix242zbikwzs7jsbq34qy9fg2";}
+ {name="kreversi";value="1ylimga3wqdam1207c6zp1r0aqmqnndldd6y2pazqgk7wcr5z8lf";}
+ {name="krfb";value="0gq6rnkprk98ylnrispd66101jb040p8m9fcab9n5v2g4lvxzcia";}
+ {name="kross-interpreters";value="1njhlscnsd0v7jzzdknsc8nljc2xz7mbxscymhdafbpmjd655sdg";}
+ {name="kruler";value="0z8krqp9gy1n6kqk5slig9f4f07ddqrsbn6p7xqadrrs5a7g4baa";}
+ {name="ksaneplugin";value="1crry96ca3pk25xwnpm73004srf85yq3xpbwc1rr3a7xmniqglr7";}
+ {name="kscd";value="1ix0zdqk2bfmb05j3cwf55kz4sp4krx75wpfzsz2yf3dz047ylqp";}
+ {name="kshisen";value="1hmv7w2mb6v9rqhifns0js592m2m7ys9fsnrdxiv1nzkcbl3xll7";}
+ {name="ksirk";value="1pjrq3v1c0sk5r5hdk4rlbs47wwmsrds43ascp6p4rxvbagki99w";}
+ {name="ksnakeduel";value="09rl2j6pwdhc8lcb2dxh5l3zb0l0iz29b76svb727sga2y7b85qk";}
+ {name="ksnapshot";value="0n2xbqkm34bq8mgpycfyda82v3c4h07lcqvs747aw95kkydb71yk";}
+ {name="kspaceduel";value="01dshprsrwjgb7pgxz2razyxi8yi1cmnalyxflwxqh2zd4xx300y";}
+ {name="ksquares";value="195c1wywm70zwd4z5cqv4xk315xrpkkbwq2myiyxa0wshhiz31bb";}
+ {name="kstars";value="0xl2vpkxa66gd3ycl092lvnk07fw3phlcp4jmpcby650xvp7h6bn";}
+ {name="ksudoku";value="1gi5xr0x9w13skvs8dj4lflib7w9xqn2xr6h90mbncg5c54wmlqc";}
+ {name="ksystemlog";value="148i90y6gc1bw2128xmb56lprmx80s0024dsd4xknm7fw8mpycdm";}
+ {name="kteatime";value="0cgqz9py80grv7sf8k5mixfl5vzx58g93flv409f7nbpia3fjr26";}
+ {name="ktimer";value="1ph38xw1yhqg65y9dhgpgzls4yx1y025v1wv5wflmcranx68a589";}
+ {name="ktouch";value="0n70611cccp09dy8r0q4n7k3l68938hz0xkvp9ik58bnfkn57fvh";}
+ {name="ktuberling";value="0zfp8ynxxdys819gw7dnq6rl9l62dpfz0hvcm2fd8bvjwxrqzxrm";}
+ {name="kturtle";value="1ciwmgd7x0223d22jzqgr7ginaf8c9hi4zlcsl3s7i87hd46878g";}
+ {name="ktux";value="0njz3icalh644kfcnlr4nmdsavkvsp492ig6w0ryr43namqbi0fw";}
+ {name="kubrick";value="07rkhb4ms8wdcny163z0ffavx3i1z13kxmj8xfbv3jx3nbcr33p5";}
+ {name="kuser";value="0avxd71zw0v8qirflpws1g7dqvs6hkpqxi89zfrvcsb8fgcqqvx2";}
+ {name="kwallet";value="0lnv7yd1ig18dmkxanmkwnz6w28p8ak8sg1rxic07g50qni4yk8g";}
+ {name="kwordquiz";value="03qxjm445jynw41wva8b86kigda2q828p0vkz58ymk8ibds74jfm";}
+ {name="libkcddb";value="0hz4300q0hhmrjd2ackaxbvdg9j51bc2fkcndw2d7wwvqz4a1am6";}
+ {name="libkcompactdisc";value="1jf0ivcy7mv3p7xcbigffmx2sby37ainjw29cp8yv0qgdwws5pm3";}
+ {name="libkdcraw";value="1y75rm55s8407q4qglndf28gix0niq0ypa9g1jwf2c8fpmf7ffph";}
+ {name="libkdeedu";value="1gd0jp85qnml2nlnf554mm9yszjkxgs9jqyi77vrhhp50bxkwdbv";}
+ {name="libkdegames";value="12590b023cjjix7mbd6flhm419w4j4zbs83ar9sihlwj6l3fzs9z";}
+ {name="libkexiv2";value="16jsd5ip4179cs2hvwqvb1cbrl5z06zyr9prr269rg11i8rjfjai";}
+ {name="libkipi";value="1wsmci2rfrg8jw3scl14cjx4q616lbmvlzjs6lv2dza4cya4jqvy";}
+ {name="libkmahjongg";value="1s4gzdygrpzjg4rxkn9ndgaj0gzj4ss0ywpd1rv5nv8iaig42cah";}
+ {name="libksane";value="1hylj10pqr82drw9b9r10rwbjf85fx225az2ha7zcm9j1k170n8d";}
+ {name="lokalize";value="0d3sym5waf1nivwksqpclwj9hxl1fva3h0hzgsmgg39qbnanqg4d";}
+ {name="lskat";value="0m47kb9l830d5798xkx9h6fx3ng59zlbji8pnaj6m53q0yj7n5am";}
+ {name="marble";value="0r27nmbvgxx4w00ii926gkxz2ilaa1sja02q62jhxvm01rp1kvka";}
+ {name="mplayerthumbs";value="1a58f66mpzngd558336h13vzl0paj3pbl4fna1vk34fzjz0ldsrm";}
+ {name="nepomuk-core";value="1l14a7hdbz7ap3lidj8acjvkxiycld4wspcw5xnd85pjhks8fcil";}
+ {name="nepomuk-widgets";value="19g752h1f4gz3208ynprxp7nxnbjgis99016lik8f9179n6mjygb";}
+ {name="okteta";value="1hwpyb9g1fwcsl713g84za62qjissmjfjhw2jvd2x08lrjablvvk";}
+ {name="okular";value="03jw7c3h6708aisk301nvfnp0vih3c5wz928zmh54h1aslfi4c3k";}
+ {name="oxygen-icons";value="01f9xkpk8fgj2ccmbrbjx9z1gxqnj4rrvasxh575lcvknnbsf6vz";}
+ {name="pairs";value="1zp89sp5qmllbm9qqzcwf90cy5vqvywki2yjgz0gn2svp1629mmg";}
+ {name="palapeli";value="0kbi61jxxyg2zzjxhjr0m14p1k04jfv212gkj6ic81hrwzjfffzc";}
+ {name="parley";value="1f266kvb0fzy3gxv9fzq59aikz0g540ydbzvr51hlvlra88sjj47";}
+ {name="perlkde";value="0gm9wim2llyglnzxqbgy0jzj9ji3p683zbrhlglpxpd6wh3ady1w";}
+ {name="perlqt";value="0qxad4m6iqc26yn8nsa3g24xr84ncrmhwhz95i2jzzrbqawwas3m";}
+ {name="picmi";value="0nlw3lqfck3fp77n56qmvlj3p6rr60drsq5qxyrrl3scw2dlipq7";}
+ {name="poxml";value="0vjmd1r90l85xs9sv2wzd1vdml6a6fh0ipzz7zyixy600lqgxy13";}
+ {name="print-manager";value="1bw5w8n4wwggib1yrgai2723fwnjrr3wbnnxn85j7bpy3b84cqfh";}
+ {name="pykde4";value="1ziq3nms0bvpnsl21pw37bkimi817jx0mmqsvf5xkxppx7f622cy";}
+ {name="qtruby";value="1pyz2zimw9qz8b5nfmzvp0kzsq6rvbwv0s9kxgh7i2xxnh2mj4gp";}
+ {name="qyoto";value="0jnchp7kdskm9nc533p7bk8shy0i57dcivrmprnwyiy4sfhd4ldj";}
+ {name="rocs";value="0markia51c5a8ggxaiy6vccpdzlamy7md5jfx4jb79qp8hlv2dlc";}
+ {name="smokegen";value="1fgh5z2gwyjkgk8290nx747bj1iaj7224nx3ad8qra9v8y6d0w3d";}
+ {name="smokekde";value="15ci2bs141nbkk2f209rbdacxfdxx6ncp5cc9gv7if8sm708vjy1";}
+ {name="smokeqt";value="0wmzrr4fslam8mxvl90iyikyyipqlqf7zdynxyqr7zxlc421clyz";}
+ {name="step";value="1a2v99k3v0ry5iwvl4cza5g7sqhib78nx0p5r369fqvcbn9mn0wz";}
+ {name="superkaramba";value="1mwa1ggagl8z2422gyilcvb85sgw5db58k0fkv3jcgfi6mx3sv3a";}
+ {name="svgpart";value="1ma4msnky3civhnx0by6hy4ysi8nhzssrsabnj6hg96d7mpnjvqw";}
+ {name="sweeper";value="1vgg21ndqbba0il96x01kcy8z242g0f0lwfqgzs9cd17qx05056s";}
+ {name="umbrello";value="10q4lar55ad58cl4wnmmvmyywm5xi7gcggrfblll8j76mw4dkyda";}
+];
+modules=[
+{
+ module="kdemultimedia";
+ split=true;
+ pkgs=[
+ { name="audiocd-kio"; sane="audiocd_kio"; }
+ { name="dragon"; }
+ { name="ffmpegthumbs"; }
+ { name="juk"; }
+ { name="kmix"; }
+ { name="kscd"; }
+ { name="libkcddb"; }
+ { name="libkcompactdisc"; }
+ { name="mplayerthumbs"; }
+ ];
+}
+{
+ module="kdegraphics";
+ split=true;
+ pkgs=[
+ { name="gwenview"; }
+ { name="kamera"; }
+ { name="kcolorchooser"; }
+ { name="kdegraphics-mobipocket"; sane="kdegraphics_mobipocket"; }
+ { name="kdegraphics-strigi-analyzer"; sane="kdegraphics_strigi_analyzer"; }
+ { name="kdegraphics-thumbnailers"; sane="kdegraphics_thumbnailers"; }
+ { name="kgamma"; }
+ { name="kolourpaint"; }
+ { name="kruler"; }
+ { name="ksaneplugin"; }
+ { name="ksnapshot"; }
+ { name="libkdcraw"; }
+ { name="libkexiv2"; }
+ { name="libkipi"; }
+ { name="libksane"; }
+ { name="okular"; }
+ { name="svgpart"; }
+ ];
+}
+{
+ module="kdelibs";
+ split=true;
+ pkgs=[
+ { name="kdelibs"; }
+ { name="nepomuk-core"; sane="nepomuk_core"; }
+ { name="nepomuk-widgets"; sane="nepomuk_widgets"; }
+ ];
+}
+{
+ module="kdenetwork";
+ split=true;
+ pkgs=[
+ { name="kdenetwork-filesharing"; sane="kdenetwork_filesharing"; }
+ { name="kdenetwork-strigi-analyzers"; sane="kdenetwork_strigi_analyzers"; }
+ { name="kdnssd"; }
+ { name="kget"; }
+ { name="kopete"; }
+ { name="kppp"; }
+ { name="krdc"; }
+ { name="krfb"; }
+ ];
+}
+{
+ module="kdeutils";
+ split=true;
+ pkgs=[
+ { name="ark"; }
+ { name="filelight"; }
+ { name="kcalc"; }
+ { name="kcharselect"; }
+ { name="kdf"; }
+ { name="kfloppy"; }
+ { name="kgpg"; }
+ { name="kremotecontrol"; }
+ { name="ktimer"; }
+ { name="kwallet"; }
+ { name="print-manager"; sane="print_manager"; }
+ { name="superkaramba"; }
+ { name="sweeper"; }
+ ];
+}
+{
+ module="applications";
+ split=true;
+ pkgs=[
+ { name="kate"; }
+ { name="konsole"; }
+ ];
+}
+{
+ module="kdetoys";
+ split=true;
+ pkgs=[
+ { name="amor"; }
+ { name="kteatime"; }
+ { name="ktux"; }
+ ];
+}
+{
+ module="kdesdk";
+ split=true;
+ pkgs=[
+ { name="cervisia"; }
+ { name="dolphin-plugins"; sane="dolphin_plugins"; }
+ { name="kapptemplate"; }
+ { name="kcachegrind"; }
+ { name="kde-dev-scripts"; sane="kde_dev_scripts"; }
+ { name="kde-dev-utils"; sane="kde_dev_utils"; }
+ { name="kdesdk-kioslaves"; sane="kdesdk_kioslaves"; }
+ { name="kdesdk-strigi-analyzers"; sane="kdesdk_strigi_analyzers"; }
+ { name="kdesdk-thumbnailers"; sane="kdesdk_thumbnailers"; }
+ { name="kompare"; }
+ { name="lokalize"; }
+ { name="okteta"; }
+ { name="poxml"; }
+ { name="umbrello"; }
+ ];
+}
+{
+ module="kdegames";
+ split=true;
+ pkgs=[
+ { name="bomber"; }
+ { name="bovo"; }
+ { name="granatier"; }
+ { name="kajongg"; }
+ { name="kapman"; }
+ { name="katomic"; }
+ { name="kblackbox"; }
+ { name="kblocks"; }
+ { name="kbounce"; }
+ { name="kbreakout"; }
+ { name="kdiamond"; }
+ { name="kfourinline"; }
+ { name="kgoldrunner"; }
+ { name="kigo"; }
+ { name="killbots"; }
+ { name="kiriki"; }
+ { name="kjumpingcube"; }
+ { name="klickety"; }
+ { name="klines"; }
+ { name="kmahjongg"; }
+ { name="kmines"; }
+ { name="knavalbattle"; }
+ { name="knetwalk"; }
+ { name="kolf"; }
+ { name="kollision"; }
+ { name="konquest"; }
+ { name="kpat"; }
+ { name="kreversi"; }
+ { name="kshisen"; }
+ { name="ksirk"; }
+ { name="ksnakeduel"; }
+ { name="kspaceduel"; }
+ { name="ksquares"; }
+ { name="ksudoku"; }
+ { name="ktuberling"; }
+ { name="kubrick"; }
+ { name="libkdegames"; }
+ { name="libkmahjongg"; }
+ { name="lskat"; }
+ { name="palapeli"; }
+ { name="picmi"; }
+ ];
+}
+{
+ module="kdeedu";
+ split=true;
+ pkgs=[
+ { name="analitza"; }
+ { name="blinken"; }
+ { name="cantor"; }
+ { name="kalgebra"; }
+ { name="kalzium"; }
+ { name="kanagram"; }
+ { name="kbruch"; }
+ { name="kgeography"; }
+ { name="khangman"; }
+ { name="kig"; }
+ { name="kiten"; }
+ { name="klettres"; }
+ { name="kmplot"; }
+ { name="kstars"; }
+ { name="ktouch"; }
+ { name="kturtle"; }
+ { name="kwordquiz"; }
+ { name="libkdeedu"; }
+ { name="marble"; }
+ { name="pairs"; }
+ { name="parley"; }
+ { name="rocs"; }
+ { name="step"; }
+ ];
+}
+{
+ module="kdeadmin";
+ split=true;
+ pkgs=[
+ { name="kcron"; }
+ { name="ksystemlog"; }
+ { name="kuser"; }
+ ];
+}
+{
+ module="kdebindings";
+ split=true;
+ pkgs=[
+ { name="kimono"; }
+ { name="korundum"; }
+ { name="kross-interpreters"; sane="kross_interpreters"; }
+ { name="perlkde"; }
+ { name="perlqt"; }
+ { name="pykde4"; }
+ { name="qtruby"; }
+ { name="qyoto"; }
+ { name="smokegen"; }
+ { name="smokekde"; }
+ { name="smokeqt"; }
+ ];
+}
+{
+ module="kdeaccessibility";
+ split=true;
+ pkgs=[
+ { name="jovie"; }
+ { name="kaccessible"; }
+ { name="kmag"; }
+ { name="kmousetool"; }
+ { name="kmouth"; }
+ ];
+}
+{
+ module="kde-baseapps";
+sane="kde_baseapps"; split=true;
+ pkgs=[
+ { name="kde-baseapps"; sane="kde_baseapps"; }
+ ];
+}
+{ module="kactivities"; split=false;}
+{ module="kdeartwork"; split=false;
+ pkgs=[
+ { name="ColorSchemes"; }
+ { name="IconThemes"; }
+ { name="emoticons"; }
+ { name="kscreensaver"; }
+ { name="kwin-styles"; sane="kwin_styles";}
+ { name="sounds"; }
+ { name="styles"; }
+ { name="wallpapers"; }
+ { name="HighResolutionWallpapers"; }
+ { name="WeatherWallpapers"; }
+ { name="desktopthemes"; }
+ ];
+
+}
+{ module="kde-base-artwork"; sane="kde_base_artwork"; split=false;}
+{ module="kdelibs"; split=false;}
+{ module="kdepim"; split=false;}
+{ module="kdepimlibs"; split=false;}
+{ module="kdepim-runtime"; sane="kdepim_runtime"; split=false;}
+{ module="kdeplasma-addons"; sane="kdeplasma_addons"; split=false;}
+{ module="kde-runtime"; sane="kde_runtime"; split=false;}
+{ module="kde-wallpapers"; sane="kde_wallpapers"; split=false;}
+{ module="kdewebdev"; split=false;
+ pkgs=[
+ { name="klinkstatus"; }
+ { name="kfilereplace"; }
+ { name="kimagemapeditor"; }
+ { name="kommander"; }
+ ];
+
+}
+{ module="kde-workspace"; sane="kde_workspace"; split=false;}
+{ module="oxygen-icons"; sane="oxygen_icons"; split=false;}
+];
+}
diff --git a/pkgs/desktops/kde-4.8/kde-package/kde-submodules.xslt b/pkgs/desktops/kde-4.11/kde-package/kde-submodules.xslt
similarity index 100%
rename from pkgs/desktops/kde-4.8/kde-package/kde-submodules.xslt
rename to pkgs/desktops/kde-4.11/kde-package/kde-submodules.xslt
diff --git a/pkgs/desktops/kde-4.11/l10n/manifest-4.11.2.nix b/pkgs/desktops/kde-4.11/l10n/manifest-4.11.2.nix
new file mode 100644
index 0000000000000000000000000000000000000000..42591369aea19dbe6a01cab85514aab5caba0d16
--- /dev/null
+++ b/pkgs/desktops/kde-4.11/l10n/manifest-4.11.2.nix
@@ -0,0 +1,272 @@
+[
+{
+ lang = "ar";
+ saneName = "ar";
+ sha256 = "0w0p0ahh6xjk3i545vmkkaxb92s1liv8z0cgnpdh13y0i8gislzs";
+}
+{
+ lang = "bg";
+ saneName = "bg";
+ sha256 = "0wghv6q8mgj5cd2n56137zfxjw1jfy4y1d6x3wi0cjjjf61al4yj";
+}
+{
+ lang = "bs";
+ saneName = "bs";
+ sha256 = "0g14kvfbzf9p9w5279ny1ziygn2zw0z4rpsm8b6msia9afa3vscp";
+}
+{
+ lang = "ca";
+ saneName = "ca";
+ sha256 = "0kcbzwmk9dy0nwfjhrpmp97aqnpdrmy7lya16sikj98fwbd2d7i0";
+}
+{
+ lang = "ca@valencia";
+ saneName = "ca_valencia";
+ sha256 = "0p3g5bwqwvr7mmwz583km498cb9jl4yr6s4v3jdx2w1pv0iqfbfx";
+}
+{
+ lang = "cs";
+ saneName = "cs";
+ sha256 = "03310xg8v5hdydi5najijni4nmkycarz2n7764vdl8h3wjlxs101";
+}
+{
+ lang = "da";
+ saneName = "da";
+ sha256 = "06h19xbbkhmmaicmkjzpa6w1hp5gq3bfblvdjdb4qwm3jbp09kz0";
+}
+{
+ lang = "de";
+ saneName = "de";
+ sha256 = "08wbgb4brgihpa7sk29lzihaqg8zv024cdd4fr6s5zvrpchx3s8s";
+}
+{
+ lang = "el";
+ saneName = "el";
+ sha256 = "0a3cakngqampvczhgn52y942d131cqd68yjsr71adcgmm5r5iv7s";
+}
+{
+ lang = "en_GB";
+ saneName = "en_GB";
+ sha256 = "12pl1sm44bi2d07qliaazniy1a9h9jp7slvwn8l11pgfh7ygiyxn";
+}
+{
+ lang = "es";
+ saneName = "es";
+ sha256 = "1b7jd6clbwjyivpy94wz148gapdzvlggg38lv0a9zl6fkfpa6xbi";
+}
+{
+ lang = "et";
+ saneName = "et";
+ sha256 = "133wf25qhnls7a2i3s99kk8va21d2cg7v3khvgscpm1im8gi81nz";
+}
+{
+ lang = "eu";
+ saneName = "eu";
+ sha256 = "11szsx11vnwi3l41nsvk013nwx0gs8vdilr1jm8qz3zfbm14v7a7";
+}
+{
+ lang = "fa";
+ saneName = "fa";
+ sha256 = "0fi443pcrjvnivi76llfssw52nzddvxrabqcqxr0czfak2r6nlf5";
+}
+{
+ lang = "fi";
+ saneName = "fi";
+ sha256 = "0lqzaprzd7az7aslaswhdriwhcdsx9abxq90jwkpq2vliz7gxjp5";
+}
+{
+ lang = "fr";
+ saneName = "fr";
+ sha256 = "0c32hmg7ns4z585bysq8iqjhbfp33a5wi6r0p1hqrh5y1sc3wjj9";
+}
+{
+ lang = "ga";
+ saneName = "ga";
+ sha256 = "060lk2l1q9p39z90qajhiqdsiiwk1qf221087mx5xny1z5ngnnim";
+}
+{
+ lang = "gl";
+ saneName = "gl";
+ sha256 = "17a9xpqbqgnhlfhr85v4n3ll88dzn3z4jk6nilq149c7dg8ilnma";
+}
+{
+ lang = "he";
+ saneName = "he";
+ sha256 = "0k97r2j0iv017qrn9yh08cqji2pkrx5vy51jypr305ffmxy1dgn9";
+}
+{
+ lang = "hi";
+ saneName = "hi";
+ sha256 = "15vgih10aa11d048cazh1zjr6s08w34hp4xxp8cgcmpm11px460g";
+}
+{
+ lang = "hr";
+ saneName = "hr";
+ sha256 = "05x0bjn6dfn0k2v822sc6f45jk196sf1xj7ikn7ws7rm3nkc3sgp";
+}
+{
+ lang = "hu";
+ saneName = "hu";
+ sha256 = "00g7x922zxkscrkk8n9xc123qfzbmf7kkyavdsnz4jkx4msrlav3";
+}
+{
+ lang = "ia";
+ saneName = "ia";
+ sha256 = "0zaxa42sgscbnb8zbp878qk9d5lwdm08szr9xda287jpvzw3asss";
+}
+{
+ lang = "is";
+ saneName = "is";
+ sha256 = "00l1rh7z8fapmb3ngxnp91xz1qz110r995jk42gw77hvmf0gabb6";
+}
+{
+ lang = "it";
+ saneName = "it";
+ sha256 = "0d0b44vmiaazjsc4d7wlwg36n3ig87xj3m89hlhkhvwrisg5ccv8";
+}
+{
+ lang = "ja";
+ saneName = "ja";
+ sha256 = "04qrj66qd65yqv1zrwi1pspmwdj129m9kkmpa3rdfgml37ign7q8";
+}
+{
+ lang = "kk";
+ saneName = "kk";
+ sha256 = "1zywlhg1yr2llr8cvn4gm4ap7kqgc2lff6yi75dd782whsphqm67";
+}
+{
+ lang = "km";
+ saneName = "km";
+ sha256 = "16s126qw8kvsvidrhh02y12y8wln3skg0cn6ri658mz2ld9iicvd";
+}
+{
+ lang = "ko";
+ saneName = "ko";
+ sha256 = "1lrh3bly0hvzxa0zxibb45v2711fvv81i3ca9d628m68mzxim13q";
+}
+{
+ lang = "lt";
+ saneName = "lt";
+ sha256 = "0hf9156vi0y17hlvrn18fsdfzpaq5ylprvv55i42idxfdjr1plmq";
+}
+{
+ lang = "lv";
+ saneName = "lv";
+ sha256 = "1zrwwglpyw8qlqw9xyhz6pwjyrasdgfclaz2hicsgv1300nxjv4h";
+}
+{
+ lang = "mr";
+ saneName = "mr";
+ sha256 = "0nagjxn4pmmcz6762jz9dx42sarkjm7fpkblw9w42znx8zvn5nmw";
+}
+{
+ lang = "nb";
+ saneName = "nb";
+ sha256 = "0lb58d2vhpcnnnqnplq2i2fapkygyb47yq0rc7c93rsf10cw9n0v";
+}
+{
+ lang = "nds";
+ saneName = "nds";
+ sha256 = "08l4s3gwnz84sg5mlrj52wdclkm4yhj0a03jxwcfpgfypi3v0n84";
+}
+{
+ lang = "nl";
+ saneName = "nl";
+ sha256 = "0m6c9dxcdqgcxlx4k160nra0g11im0c2f0hf1fyk1hkb6fdq2li9";
+}
+{
+ lang = "nn";
+ saneName = "nn";
+ sha256 = "1kp8m2cc131arkhj7z6dsq69mh6abws7963avszbkf0zq31nnxp4";
+}
+{
+ lang = "pa";
+ saneName = "pa";
+ sha256 = "01ay3q7swf1vh72wrjlhpi0id7sa2a8pj8n79xn583mlzwcbmzwv";
+}
+{
+ lang = "pl";
+ saneName = "pl";
+ sha256 = "1rf288q1c412y161sk2y3yvy3pq159avih4d90k0laphfhhisjnv";
+}
+{
+ lang = "pt";
+ saneName = "pt";
+ sha256 = "0mld9dmvj9c8xay587hm7dvrbx964zdhysyi4fldad54imc61rdc";
+}
+{
+ lang = "pt_BR";
+ saneName = "pt_BR";
+ sha256 = "18c3bws8fakii5qjm0vpni6fmzw6118ndmjz4v83nk6nmy6ww0i1";
+}
+{
+ lang = "ro";
+ saneName = "ro";
+ sha256 = "16q3jahvpw3lpxlwqxhhd8xc9qfra2chc6g5cik8dw011sqg0zaa";
+}
+{
+ lang = "ru";
+ saneName = "ru";
+ sha256 = "0c62msjf34hz5f0il3x7wk4flpjk2w5f4vdpz43vr245qds2vxrl";
+}
+{
+ lang = "sk";
+ saneName = "sk";
+ sha256 = "0vl8y4z60nxgkgkxkzqkak7gcyc2295nxm6hghmrhfn5zyfpp99k";
+}
+{
+ lang = "sl";
+ saneName = "sl";
+ sha256 = "0wdv1lya8s4b97933dv72cvq7qa19ndp1knb0270pg5y74y2vq2s";
+}
+{
+ lang = "sr";
+ saneName = "sr";
+ sha256 = "1lafrmz16j8kzs9nvrn6j84c7wyxzwpvnn0z6ic22bzg646m276y";
+}
+{
+ lang = "sv";
+ saneName = "sv";
+ sha256 = "1cxy79ya3i2fm7b6w0ilpri0qrhm4bgkx3qwvgqz13lgw1p716qv";
+}
+{
+ lang = "tg";
+ saneName = "tg";
+ sha256 = "1jww7nfz8ssgqrldc11agnwv4plcr9vr4fv5q7bspa33hgm94r47";
+}
+{
+ lang = "tr";
+ saneName = "tr";
+ sha256 = "0kflzm80pg8l5ing3xzp1g0n9hm1sky8201s2z05aahj2rcw4bws";
+}
+{
+ lang = "ug";
+ saneName = "ug";
+ sha256 = "15szx7r75d0iw21hwggp96zm9s5i7svsvmqfncvd79mdmnhr2x5i";
+}
+{
+ lang = "uk";
+ saneName = "uk";
+ sha256 = "16l7rkxw5am90dqrkjjdvih1dvchgkggf5rinv7bpfk5z65f0ccy";
+}
+{
+ lang = "vi";
+ saneName = "vi";
+ sha256 = "08phva4y5982qvrb050n4pl7gnr2yg4zvazfg9lh38ba63l6d2g8";
+}
+{
+ lang = "wa";
+ saneName = "wa";
+ sha256 = "0byfyav76m7igwix5vj69bvl2rpaxmv8ncz1xc2azyrdxjba9ggd";
+}
+{
+ lang = "zh_CN";
+ saneName = "zh_CN";
+ sha256 = "176xnyxl7in1b3igy7vh6g2pz8ch32g0n6kddkkj0a13h69s5vyz";
+}
+{
+ lang = "zh_TW";
+ saneName = "zh_TW";
+ sha256 = "0i71xxxpb6p95pa69frhxqb27i935bb1vxjb3i51yms95x3gbpjs";
+}
+]
diff --git a/pkgs/desktops/kde-4.11/oxygen-icons.nix b/pkgs/desktops/kde-4.11/oxygen-icons.nix
index bdc3c581371682dd51b22815ffe576eab4b6cea3..d7679cc3d0157eabb607d743d203996a69d6921f 100644
--- a/pkgs/desktops/kde-4.11/oxygen-icons.nix
+++ b/pkgs/desktops/kde-4.11/oxygen-icons.nix
@@ -3,7 +3,7 @@
kde {
outputHashAlgo = "sha256";
outputHashMode = "recursive";
- outputHash = "03wzq5b9yn7x7qjl6vypsa4jh2km0vz122wyg0pfk6nfl1frgnjf";
+ outputHash = "1y765lfsy63kc4h1g1f3fc42aqlhn7svmidrkxm12nia4jazj6db";
nativeBuildInputs = [ cmake ];
diff --git a/pkgs/desktops/kde-4.8/default.nix b/pkgs/desktops/kde-4.8/default.nix
deleted file mode 100644
index b77a9e4bfecfbdd5b60df3b0056f87b7d57ce37a..0000000000000000000000000000000000000000
--- a/pkgs/desktops/kde-4.8/default.nix
+++ /dev/null
@@ -1,60 +0,0 @@
-{ callPackage, callPackageOrig, stdenv, qt48 }:
-
-let
- release = "4.8.4";
-
- # Need callPackageOrig to avoid infinite cycle
- kde = callPackageOrig ./kde-package {
- inherit release ignoreList extraSubpkgs callPackage;
- };
-
- # The list of igored individual modules
- ignoreList = {
- # Doesn't work yet
- kdeutils = [ "ksecrets" ];
- # kdeadmin/strigi-analyzer has no real code
- kdeadmin = [ "strigi-analyzer" ];
- # kdesdk/kioslave is splitted into kioslave-svn and kioslave-git
- kdesdk = [ "kioslave" ];
- # Most of kdebindings do not compile due to a bug in the buildsystem
- kdebindings = [ "kimono" "korundum" "kross-interpreters" "perlkde" "qyoto" ];
- };
-
- # Extra subpackages in the manifest format
- extraSubpkgs = {
- kdesdk =
- [
- {
- name = "kioslave-svn";
- sane = "kioslave_svn";
- subdir = "kioslave";
- }
- {
- name = "kioslave-perldoc";
- sane = "kioslave_perldoc";
- subdir = "kioslave";
- }
- ];
- };
-
-in
-
-kde.modules // kde.individual //
-{
- inherit (kde) manifest modules individual splittedModuleList;
-
- akonadi = callPackage ./support/akonadi { };
-
- qt4 = qt48;
-
- kdebase_workspace = kde.modules.kde_workspace;
-
- inherit release;
-
- full = stdenv.lib.attrValues kde.modules;
-
- l10n = callPackage ./l10n {
- inherit release;
- inherit (kde.manifest) stable;
- };
-}
diff --git a/pkgs/desktops/kde-4.8/files/kde-wallpapers-buildsystem.patch b/pkgs/desktops/kde-4.8/files/kde-wallpapers-buildsystem.patch
deleted file mode 100644
index 378cdb64694004115dcb55e8bb779a3776011758..0000000000000000000000000000000000000000
--- a/pkgs/desktops/kde-4.8/files/kde-wallpapers-buildsystem.patch
+++ /dev/null
@@ -1,17 +0,0 @@
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 3d3e247..f78db67 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -1,5 +1,10 @@
--find_package(KDE4 REQUIRED)
--include(KDE4Defaults)
-+project(kde-wallpapers NONE)
-+if( WALLPAPER_INSTALL_DIR )
-+ message(STATUS "Installing wallpapers to user-supplied directory ${WALLPAPER_INSTALL_DIR}")
-+else()
-+ find_package(KDE4 REQUIRED)
-+ include(KDE4Defaults)
-+endif()
-
- install(DIRECTORY Air DESTINATION ${WALLPAPER_INSTALL_DIR} PATTERN .svn EXCLUDE)
-
diff --git a/pkgs/desktops/kde-4.8/files/polkit-install.patch b/pkgs/desktops/kde-4.8/files/polkit-install.patch
deleted file mode 100644
index d2ecac663ec5f055620eca5b0af9f3a5f69e8cf5..0000000000000000000000000000000000000000
--- a/pkgs/desktops/kde-4.8/files/polkit-install.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-diff -ru -x '*~' kdelibs-4.6.90-orig/kdecore/auth/ConfigureChecks.cmake kdelibs-4.6.90/kdecore/auth/ConfigureChecks.cmake
---- kdelibs-4.6.90-orig/kdecore/auth/ConfigureChecks.cmake 2011-05-20 22:24:54.000000000 +0200
-+++ kdelibs-4.6.90/kdecore/auth/ConfigureChecks.cmake 2011-07-12 14:03:00.000000000 +0200
-@@ -139,7 +139,7 @@
- ${CMAKE_INSTALL_PREFIX} _KDE4_AUTH_POLICY_FILES_INSTALL_DIR
- ${POLKITQT-1_POLICY_FILES_INSTALL_DIR})
-
-- set(KDE4_AUTH_POLICY_FILES_INSTALL_DIR ${_KDE4_AUTH_POLICY_FILES_INSTALL_DIR} CACHE STRING
-+ set(KDE4_AUTH_POLICY_FILES_INSTALL_DIR "\${CMAKE_INSTALL_PREFIX}/share/polkit-1/actions" CACHE STRING
- "Where policy files generated by KAuth will be installed" FORCE)
- elseif(KDE4_AUTH_BACKEND_NAME STREQUAL "FAKE")
- set (KAUTH_COMPILING_FAKE_BACKEND TRUE)
diff --git a/pkgs/desktops/kde-4.8/kactivities.nix b/pkgs/desktops/kde-4.8/kactivities.nix
deleted file mode 100644
index 8f726577ef89c3dac972bd58559da75c6a3f6376..0000000000000000000000000000000000000000
--- a/pkgs/desktops/kde-4.8/kactivities.nix
+++ /dev/null
@@ -1,9 +0,0 @@
-{ kde, kdelibs, shared_desktop_ontologies }:
-
-kde {
- propagatedBuildInputs = [ kdelibs shared_desktop_ontologies ];
-
- meta = {
- description = "KDE activities library and daemon";
- };
-}
diff --git a/pkgs/desktops/kde-4.8/kde-baseapps/kate.nix b/pkgs/desktops/kde-4.8/kde-baseapps/kate.nix
deleted file mode 100644
index 1ffbcf9ebf989a749d2c33e26a4cd4a36a1792c0..0000000000000000000000000000000000000000
--- a/pkgs/desktops/kde-4.8/kde-baseapps/kate.nix
+++ /dev/null
@@ -1,10 +0,0 @@
-{ kde, kdelibs }:
-
-kde {
- buildInputs = [ kdelibs ];
-
- meta = {
- description = "Kate, the KDE Advanced Text Editor, as well as KWrite";
- license = "GPLv2";
- };
-}
diff --git a/pkgs/desktops/kde-4.8/kde-baseapps/kde-baseapps.nix b/pkgs/desktops/kde-4.8/kde-baseapps/kde-baseapps.nix
deleted file mode 100644
index 45192e0c46001ae66060597438bd28bffec8c6a1..0000000000000000000000000000000000000000
--- a/pkgs/desktops/kde-4.8/kde-baseapps/kde-baseapps.nix
+++ /dev/null
@@ -1,10 +0,0 @@
-{ kde, kdelibs, shared_desktop_ontologies, glib, htmlTidy }:
-
-kde {
- buildInputs = [ kdelibs shared_desktop_ontologies glib htmlTidy ];
-
- meta = {
- description = "Base KDE applications, including the Dolphin file manager and Konqueror web browser";
- license = "GPLv2";
- };
-}
diff --git a/pkgs/desktops/kde-4.8/kde-baseapps/konsole.nix b/pkgs/desktops/kde-4.8/kde-baseapps/konsole.nix
deleted file mode 100644
index 0db47fb2d7c4761501f2577c0a23d40165541cfc..0000000000000000000000000000000000000000
--- a/pkgs/desktops/kde-4.8/kde-baseapps/konsole.nix
+++ /dev/null
@@ -1,11 +0,0 @@
-{ kde, kdelibs, kde_baseapps }:
-
-kde {
-
- buildInputs = [ kdelibs kde_baseapps ];
-
- meta = {
- description = "Konsole, the KDE terminal emulator";
- license = "GPLv2";
- };
-}
diff --git a/pkgs/desktops/kde-4.8/kde-package/4.8.4.nix b/pkgs/desktops/kde-4.8/kde-package/4.8.4.nix
deleted file mode 100644
index 6fbaf097be09f709e2862914a3e1ebb7d895f654..0000000000000000000000000000000000000000
--- a/pkgs/desktops/kde-4.8/kde-package/4.8.4.nix
+++ /dev/null
@@ -1,299 +0,0 @@
-{stable=true;
-hashes=builtins.listToAttrs[
- {name="analitza";value="0g3k6i9ncl8m8xr85wz6k0vbmjq7jwmygm0353jq2lj2hy5i2ipg";}
- {name="ark";value="10m6bmiz4ylgbmxx03q0zfayy1zinxx696jczmllxn557z75nzn5";}
- {name="blinken";value="1n0m70by3wd5d4nqlgqrm6bg0nplc3b92cn74xq5adi1dfi63ggr";}
- {name="cantor";value="1grjxbzyshc9jlmx9gvxfsxdhcgrn391s3bh0mmprnk0kcsi4s5i";}
- {name="filelight";value="1fpkwyz74nqm0szfylbjqfxwv25rgfdg03ghq5mncs2ys8mh4rn1";}
- {name="gwenview";value="1xxkhq4psl3zq0ah6fp42s5ih1xik0kxq4sb2r2mhkimrsj11rvz";}
- {name="jovie";value="103d7c1h3qfqsh6phyxm4g712kykkpd1vls26kypn3d6linc9p1s";}
- {name="kaccessible";value="0s772i8nc1lx6c8sjsy3m928dcyackd8pay44b8nlp8k8hzh5x62";}
- {name="kactivities";value="0kxpg0bwr9ph3bzndc5vqgfqkxy443chyg3rbrdvgbgb0xm54r5f";}
- {name="kalgebra";value="0p5qhxwd6h8kvfd8n81ah0pszaa550z7y2zlzvrgypmfcgx8a802";}
- {name="kalzium";value="17sxslsg5pi1xh7l0h6y0rmjhb6nshq9psjjjqwhfl7id6ansb24";}
- {name="kamera";value="0r8rr4lq3jrvfz2fw4in83vsxqjm02x16h842r4hnn3k5svaqs49";}
- {name="kanagram";value="02wp2rkm5m6920rvs6iyalvv4xczgh21w1mrf4a694j14fna4m1n";}
- {name="kate";value="0530rq6pfrim2mfjkvpl9qxv56fykml7aq3awchyda3xbkq7vk3y";}
- {name="kbruch";value="1znm2dmsib7svyfqpyhblip5ic4y2xdylax1kxx7ssmjgsi3bw54";}
- {name="kcalc";value="1dv3d833ksz9bqrwhq9pbsqk0a8hv3jlqlxbqccwgkx840hmpclz";}
- {name="kcharselect";value="015pj1zmlnjr8ys3arks3b1yqf8rh9fc02p0xfq1fkp11ing0lfg";}
- {name="kcolorchooser";value="04360b4pjsdl0ckdwipn3y407fmsx2bimkzqqm01hz4vdyb41d9k";}
- {name="kdeadmin";value="0qvynvim50xsv060598bhv6pwxd578sg25g1z2dzdi4ih021nlr0";}
- {name="kdeartwork";value="1v5an8385d9zjb29ps94xgvpazpvqffxnlvfp4940pj5imdg98nm";}
- {name="kde-baseapps";value="0z2jasna2d8i3iy8w4grylfml9a510imhl0bxnsw6whar409rzki";}
- {name="kdegames";value="1jji5dw9qllhv7zh7a456iwwsb5vqrvjd0p871s2qi8lcd54fs1a";}
- {name="kdegraphics-mobipocket";value="1ya4jzj864ikw6ysp9ip1ha2n6a8im380k4yhmca9agp5f21zvva";}
- {name="kdegraphics-strigi-analyzer";value="1cwvaszjawzdbvggxzzaxvxdjpxmr9x4p4fqy4wq38qzx06lnsd1";}
- {name="kdegraphics-thumbnailers";value="1zxvqzadmcsy5ydxx617gpfh3vswcrnyjwn19scy1cv7nwdpxnqj";}
- {name="kdelibs";value="1wr0kadmc33kqbr93h05g6yxqwp66cgs9ab32danvqbfns0qgb15";}
- {name="kdemultimedia";value="0h56vy27kb1s4p3vpa42gj3xjbpwl38n97bbjq7g1vj8dq2k0pl4";}
- {name="kdenetwork";value="10lyrygi3avfiyaqxgw9g6dc3pmsbggawjvnkxhm8f2j2gy7sbbc";}
- {name="kdepim";value="0q4fq26gg3hfmvxzfbizsa1ffk88a994k31ybbv72b7xcdjz68ff";}
- {name="kdepimlibs";value="1wqi7dh1w3cinkd8sgc0zx9qf7fyvizli4asbimxh5faal1b10bb";}
- {name="kdepim-runtime";value="1v1klgcfa0hwi7bxqn0nphd7hlbxwh3v6apghra0b8f7qqnzxysp";}
- {name="kdeplasma-addons";value="1f4bpgrjqa9c1ikngc9wn3a0y0hw39icswc77ys4j04b9zazg8qn";}
- {name="kde-runtime";value="0g2jlxfxm4flx1pr920hbmqaq433y8bdglk08vnhycychppkacmc";}
- {name="kdesdk";value="15zg649sm851ig7yxcsv9cx54x36k94y83q1wvm1kf84jb1vl1yg";}
- {name="kdetoys";value="038h6fmqfy7mh2i7kg3510w0jwji9hac94dpzfmfgk36i461dbnn";}
- {name="kde-wallpapers";value="18hbd9d19yf48vs4vmxrrxvr87baxxlf3z417f69kgvjpvmpl905";}
- {name="kdewebdev";value="1mv5nq8ayz5np1vmgk58dsai6wmqdl1kvq96pvi5awmhxxla2f5x";}
- {name="kde-workspace";value="12vn117nbqxipvb58v7swc4prfddijz7m0c03xn5wi1kbzq5xj9n";}
- {name="kdf";value="0alc9a7x75f8dx5gbhdqwn0xfx7kr5q7dl9qfmcmrgm9vn6agxpw";}
- {name="kfloppy";value="0ajc3yq86n4q7hxjgibvkrbbagg7xnlbd6g7mx3cvmq9l7na105b";}
- {name="kgamma";value="1yviy8xz8cqlbpvjj7sp9jylq4lk98r3mpp6lxl95ypkjqbjx8w3";}
- {name="kgeography";value="0wklqqprg7d7mxjlwfyv4n5d2igkr6b2i174vxzdhj9dbsh9r67f";}
- {name="kgpg";value="034mg0s5v0vqq59x1fwddslg6r2dx3v70icka6j2r9lhi8635j5m";}
- {name="khangman";value="0b64pqywvxdxrbp3xcscimdlsn44hwlvm6ydxiwx2salm2rn9xxa";}
- {name="kig";value="0cblkm71j78dq4r90r9fladn8nxq3xq75w40f85jl9dkmm1y3yiv";}
- {name="kimono";value="1ij7bcvxv8zkfzcrmjasq6x0nf41104x5bj6ksfc8mibml182bq7";}
- {name="kiten";value="1c3rdagddk0xd0j6vnp0bj16in78879niakvq1s35s7grgxh31ia";}
- {name="klettres";value="0sxd3hwpzyzvjrvly0w2fwrssg4a9rs35fp9yi6in19x7x8rbsxl";}
- {name="kmag";value="0fgddhsf9f5n4crzp4z2ii5p1asyvpbmsiqgb61kswqbpsr96mv8";}
- {name="kmousetool";value="0f4ym6dihq9wmwaassap0ixam46lqjvf6jqkr6ib0y87myj3h9mi";}
- {name="kmouth";value="1hpphlav8ip4kx3787p3dkfddkzpgg4mj25ripjcpy0xpbfvc2lw";}
- {name="kmplot";value="19sab4hmdv8kwipgjzg4v3gq4lv1i17yh4hdq3y6lcyf7wjkxjpd";}
- {name="kolourpaint";value="0mr4f1vbhg3vhap92f8jj5lkpfr8cjphn863vda49rfdydhv1x6w";}
- {name="konsole";value="10fgjsq2dj56ifnzxy3dz87s92m2zfcmpqa751b5ar0wp3pil045";}
- {name="korundum";value="0vkhf40ghbqgs9vxl7zpfq21r7sc9z4rm0iyl9cab04wvi9r2nsk";}
- {name="kremotecontrol";value="11z0wc9yvpk72yrx9ic3zpky2z346wdkvs8qcik9nfbbxxpk4vnx";}
- {name="kross-interpreters";value="0afqwxxsysd7wwl5xgwdw58q7hjr8y5sdvsfrz8sfkirinfdmp9s";}
- {name="kruler";value="19xppbxvyw6qzgxz4y1yzz9g104464z1i7dvsd3919njqhsrm628";}
- {name="ksaneplugin";value="0z2gkc0997s79haf2nxgg5xgvmpk5iz2s33147qhhy12hys6jq9m";}
- {name="ksecrets";value="1f4n3x5rmc0l16q3bripk49mj0nyak6s3vf3v7j4g89qz8rr4c87";}
- {name="ksnapshot";value="069v2qs4nl8514kdgcp6y03n1n4d6ymm5j5yq1wwrgij6iqc7a78";}
- {name="kstars";value="1hl0z77cl317pm442lcd2hk6rb83hvch904a0jgflcxcd2w0gg54";}
- {name="ktimer";value="1hf0sbl9y0a9w2xdxdl88lmv55skz7fp1kl9sgnsyj8gzjyv3nwa";}
- {name="ktouch";value="00hij38zk469ja3ns9d7qpj91kyndwrnmf0v2fqd2nicv9mqxdih";}
- {name="kturtle";value="0wvskx6cif0gsgvsc072i33jl58bp2n74vyl2qgbw4bibckp9aq8";}
- {name="kwallet";value="1n4vl0gvr8sqh8ld0bmz3qdz8lws19vzndrp10xl5fmb40cibdsz";}
- {name="kwordquiz";value="1w2xwfqz3bjmm0rg4pn08vgm7f0m1wr2bc8cwgjayc8105xy572h";}
- {name="libkdcraw";value="0fpx8yprgrk6sg03xms8swgqb7b41ia2rnf9n5phm5hvbpwwbw9f";}
- {name="libkdeedu";value="1nz53vjmd48x9vk73wrfz6k94drxv0w2nsa0nnh68q1mphxm8cz3";}
- {name="libkexiv2";value="1w7h8ckq2b7pi6qdf8p7rk6jzpn5caxflzdczlaxa7jn84k4rsjn";}
- {name="libkipi";value="02cdmqjky5sfwpz9m85yixkmcsh9ybjdspsi8dwhypndpq3pgj3w";}
- {name="libksane";value="11wgzdccwix4whfdj8f7fyapxk9yp8jfra56s9gyn7a4sfgp40sp";}
- {name="marble";value="09ph1lg3y6bzkxdnpwbhlysj9s56fbaxwsxpn2ydwg4vnsspspiy";}
- {name="okular";value="06xd3xpm1hp2dk382p4sd2dj2gdwb1f4d97hkh67riddwwzlcdal";}
- {name="oxygen-icons";value="0zw6kv456gf955ip28iykx8nmd4h0scpqdj4f035yqiyxms9p4g1";}
- {name="parley";value="1mg5mkxlzrb1clnclsfcl4vpd8yn97asgcazlq9wmgr077z0f9yd";}
- {name="perlkde";value="1k94rfchpi7nvzvwz2flx49ni92aw6x8cc6qnq1vr98j9hangjg4";}
- {name="perlqt";value="0rjwd2d2jlqlsjvw6w198jb79kjib89p3gbslj4dfgblrq1cgrdq";}
- {name="printer-applet";value="1y8r39dyc04bkqm33s65m77c6y4y19bi32v2cx5bl67w5377hvh0";}
- {name="pykde4";value="0gnzqw2xj1swm2jr728fxb7l48ll8whvc4ranwcvx8920jdd8vk7";}
- {name="qtruby";value="1ixb8kav1pxpkwar99p3cgwi6nql1dfjwmyq7ai2h8ls7g075gz8";}
- {name="qyoto";value="07m64n9xlnpgmw6jj91vwyzzjnmwn9px3ckfi93qs4mgnsj263zi";}
- {name="rocs";value="0zxdskps9ifc8yhrk6lngjsh4abp98pv7d9y48lw830jhy78bm57";}
- {name="smokegen";value="08yzxg6x3bdpza7hld1bd1ils5ipav2laazcar811vsn70lr8rqy";}
- {name="smokekde";value="1k8r7d82mbmilg2x565w9nwxb5x6xfznscqwv9vmsgync56nk982";}
- {name="smokeqt";value="036128q7mz5701ikw7fjc22ygkmnlscckmlgv3nb8d914maa1cl0";}
- {name="step";value="1i1334p7qlc84m8xjc4sp20pmnqal26y8854pcv7lh8r3xzyscd6";}
- {name="superkaramba";value="05xgflb9ramhrqb6avqagxp1kcdax6qwdf1k6wm85l8ys6vjimry";}
- {name="svgpart";value="0xrs93njmp5322m4dh3ycvwgl9p618kzsi5xmrnlksb9n0hi91gw";}
- {name="sweeper";value="1gcyffzzap2gdxk3js43bllf87795f97i0lmykgyllhp364czv6x";}
-];
-modules=[
-{
- module="kdegraphics";
- split=true;
- pkgs=[
- { name="gwenview"; }
- { name="kamera"; }
- { name="kcolorchooser"; }
- { name="kdegraphics-mobipocket"; sane="kdegraphics_mobipocket"; }
- { name="kdegraphics-strigi-analyzer"; sane="kdegraphics_strigi_analyzer"; }
- { name="kdegraphics-thumbnailers"; sane="kdegraphics_thumbnailers"; }
- { name="kgamma"; }
- { name="kolourpaint"; }
- { name="kruler"; }
- { name="ksaneplugin"; }
- { name="ksnapshot"; }
- { name="libkdcraw"; }
- { name="libkexiv2"; }
- { name="libkipi"; }
- { name="libksane"; }
- { name="okular"; }
- { name="svgpart"; }
- ];
-}
-{
- module="kdeutils";
- split=true;
- pkgs=[
- { name="ark"; }
- { name="filelight"; }
- { name="kcalc"; }
- { name="kcharselect"; }
- { name="kdf"; }
- { name="kfloppy"; }
- { name="kgpg"; }
- { name="kremotecontrol"; }
- { name="ksecrets"; }
- { name="ktimer"; }
- { name="kwallet"; }
- { name="printer-applet"; sane="printer_applet"; }
- { name="superkaramba"; }
- { name="sweeper"; }
- ];
-}
-{
- module="kdeedu";
- split=true;
- pkgs=[
- { name="analitza"; }
- { name="blinken"; }
- { name="cantor"; }
- { name="kalgebra"; }
- { name="kalzium"; }
- { name="kanagram"; }
- { name="kbruch"; }
- { name="kgeography"; }
- { name="khangman"; }
- { name="kig"; }
- { name="kiten"; }
- { name="klettres"; }
- { name="kmplot"; }
- { name="kstars"; }
- { name="ktouch"; }
- { name="kturtle"; }
- { name="kwordquiz"; }
- { name="libkdeedu"; }
- { name="marble"; }
- { name="parley"; }
- { name="rocs"; }
- { name="step"; }
- ];
-}
-{
- module="kdebindings";
- split=true;
- pkgs=[
- { name="kimono"; }
- { name="korundum"; }
- { name="kross-interpreters"; sane="kross_interpreters"; }
- { name="perlkde"; }
- { name="perlqt"; }
- { name="pykde4"; }
- { name="qtruby"; }
- { name="qyoto"; }
- { name="smokegen"; }
- { name="smokekde"; }
- { name="smokeqt"; }
- ];
-}
-{
- module="kdeaccessibility";
- split=true;
- pkgs=[
- { name="jovie"; }
- { name="kaccessible"; }
- { name="kmag"; }
- { name="kmousetool"; }
- { name="kmouth"; }
- ];
-}
-{
- module="kde-baseapps";
-sane="kde_baseapps"; split=true;
- pkgs=[
- { name="kate"; }
- { name="kde-baseapps"; sane="kde_baseapps"; }
- { name="konsole"; }
- ];
-}
-{ module="kactivities"; split=false;}
-{ module="kdeadmin"; split=false;
- pkgs=[
- { name="strigi-analyzer"; sane="strigi_analyzer";}
- { name="kuser"; }
- { name="kcron"; }
- { name="ksystemlog"; }
- { name="system-config-printer-kde"; sane="system_config_printer_kde";}
- ];
-
-}
-{ module="kdeartwork"; split=false;
- pkgs=[
- { name="ColorSchemes"; }
- { name="IconThemes"; }
- { name="emoticons"; }
- { name="kscreensaver"; }
- { name="kwin-styles"; sane="kwin_styles";}
- { name="sounds"; }
- { name="styles"; }
- { name="wallpapers"; }
- { name="HighResolutionWallpapers"; }
- { name="WeatherWallpapers"; }
- { name="desktopthemes"; }
- { name="aurorae"; }
- ];
-
-}
-{ module="kdegames"; split=false;}
-{ module="kdelibs"; split=false;}
-{ module="kdemultimedia"; split=false;}
-{ module="kdenetwork"; split=false;
- pkgs=[
- { name="kfile-plugins"; sane="kfile_plugins";}
- { name="kget"; }
- { name="kopete"; }
- { name="krdc"; }
- { name="kppp"; }
- { name="krfb"; }
- { name="kdnssd"; }
- { name="filesharing"; }
- ];
-
-}
-{ module="kdepim"; split=false;}
-{ module="kdepimlibs"; split=false;}
-{ module="kdepim-runtime"; sane="kdepim_runtime"; split=false;}
-{ module="kdeplasma-addons"; sane="kdeplasma_addons"; split=false;}
-{ module="kde-runtime"; sane="kde_runtime"; split=false;}
-{ module="kdesdk"; split=false;
- pkgs=[
- { name="cervisia"; }
- { name="lokalize"; }
- { name="kdeaccounts-plugin"; sane="kdeaccounts_plugin";}
- { name="dolphin-plugins-svn"; sane="dolphin_plugins_svn";subdir="dolphin-plugins/svn"; }
- { name="dolphin-plugins-git"; sane="dolphin_plugins_git";subdir="dolphin-plugins/git"; }
- { name="dolphin-plugins-hg"; sane="dolphin_plugins_hg";subdir="dolphin-plugins/hg"; }
- { name="dolphin-plugins-bazaar"; sane="dolphin_plugins_bazaar";subdir="dolphin-plugins/bazaar"; }
- { name="kcachegrind"; }
- { name="kapptemplate"; }
- { name="kpartloader"; }
- { name="strigi-analyzer"; sane="strigi_analyzer";}
- { name="kioslave"; }
- { name="okteta"; }
- { name="kmtrace"; }
- { name="kompare"; }
- { name="kprofilemethod"; }
- { name="kstartperf"; }
- { name="kuiviewer"; }
- { name="poxml"; }
- { name="scripts"; }
- { name="umbrello"; }
- ];
-
-}
-{ module="kdetoys"; split=false;
- pkgs=[
- { name="kteatime"; }
- { name="ktux"; }
- { name="amor"; }
- ];
-
-}
-{ module="kde-wallpapers"; sane="kde_wallpapers"; split=false;}
-{ module="kdewebdev"; split=false;
- pkgs=[
- { name="klinkstatus"; }
- { name="kfilereplace"; }
- { name="kimagemapeditor"; }
- { name="kommander"; }
- ];
-
-}
-{ module="kde-workspace"; sane="kde_workspace"; split=false;}
-{ module="oxygen-icons"; sane="oxygen_icons"; split=false;}
-];
-}
diff --git a/pkgs/desktops/kde-4.8/kde-package/default.nix b/pkgs/desktops/kde-4.8/kde-package/default.nix
deleted file mode 100644
index 8a6e8e167517bda864e915481975f5adb7bd2a63..0000000000000000000000000000000000000000
--- a/pkgs/desktops/kde-4.8/kde-package/default.nix
+++ /dev/null
@@ -1,128 +0,0 @@
-{ callPackage, runCommand, stdenv, fetchurl, qt4, cmake, automoc4
-, release, ignoreList, extraSubpkgs
-}:
-
-let
- inherit (stdenv.lib) filter fold;
- inherit (builtins) getAttr hasAttr remoteAttrs listToAttrs tail head;
-in
-rec {
- manifest = import (./. + "/${release}.nix");
-
- # src attribute for $name tarball
- kdesrc = name: fetchurl {
- url = "mirror://kde/" + (if manifest.stable then "" else "un")
- + "stable/${release}/src/${name}-${release}.tar.xz";
- sha256 = getAttr name manifest.hashes;
- };
-
- # Default meta attribute
- defMeta = {
- homepage = http://www.kde.org;
- platforms = stdenv.lib.platforms.linux;
- inherit (qt4.meta) maintainers;
- };
-
- # KDE package built from the whole tarball
- # This function is used both for monolithic modules and modules which are
- # released as individual tarballs
- kdeMonoPkg = name: let n_ = name; in a@{meta, name ? n_, ...}:
- stdenv.mkDerivation ({
- name = "${name}-${release}";
- src = kdesrc name;
- meta = defMeta // meta;
- enableParallelBuilding = true;
- } // (removeAttrs a [ "meta" "name" ]));
-
- # kdeMonoPkg wrapper for modules splitted upstream compatible with combinePkgs
- # API.
- kdeSplittedPkg = module: {name, sane ? name}: kdeMonoPkg name;
-
- # Build subdirectory ${subdir} of tarball ${module}-${release}.tar.xz
- kdeSubdirPkg = module:
- {name, subdir ? name, sane ? name}:
- let name_ = name; in
- a@{cmakeFlags ? [], name ? name_, meta ? {}, ...}:
- stdenv.mkDerivation ({
- name = "${name}-${release}";
- src = kdesrc module;
- cmakeFlags =
- [ "-DDISABLE_ALL_OPTIONAL_SUBDIRECTORIES=TRUE"
- "-DBUILD_doc=TRUE"
- "-DBUILD_${subdir}=TRUE"
- ] ++ cmakeFlags;
- meta = defMeta // meta;
- enableParallelBuilding = module.enableParallelBuilding or true;
- } // (removeAttrs a [ "meta" "name" "cmakeFlags" ]));
-
- # A KDE monolithic module
- kdeMonoModule = name: path: callPackage path { kde = kdeMonoPkg name; };
-
- # Combine packages in one module.
- # Arguments:
- # * pkgFun --- a function of the following signature:
- # module: manifest_attrs: manual_attrs: derivation;
- # * module --- name of the module
- # * pkgs --- list of packages in manifest format
- combinePkgs = pkgFun: module: pkgs:
- let
- f = p@{name, ...}:
- callPackage (./.. + "/${module}/${name}.nix") { kde = pkgFun module p; };
- list = map f pkgs;
- attrs = listToAttrs (map
- ({name, sane ? name, ...}@p: { name = sane; value = f p; })
- pkgs);
- in
- runCommand "${module}-${release}"
- ({passthru = attrs // {
- propagatedUserEnvPackages = list;
- projects = attrs;
- };})
- ''
- mkdir -pv $out/nix-support
- echo "${toString list}" | tee $out/nix-support/propagated-user-env-packages
- '';
-
- # Given manifest module data, return the module
- kdeModule = { module, sane ? module, split, pkgs ? [] }:
- let
- pkgs_ = filterPkgs module pkgs;
- in
- # Module is splitted by upstream
- if split then combinePkgs kdeSplittedPkg module pkgs_
- # Monolithic module
- else if pkgs == [] then kdeMonoModule module (./.. + "/${module}.nix")
- # Module is splitted by us
- else combinePkgs kdeSubdirPkg module pkgs_;
-
- # The same, as nameValuePair with sane name
- kdeModuleNV = a@{ module, sane ? module, ... }:
- { name = sane; value = kdeModule a; };
-
- filterPkgs = module: (p:
- removeNames (stdenv.lib.attrByPath [module] [] ignoreList) p
- ++ (stdenv.lib.attrByPath [module] [] extraSubpkgs));
-
- # Remove attrsets with x.name in subst. Optimized for empty subst.
- removeNames = subst: big:
- fold (s: out: filter (x: x.name != s) out) big subst;
-
- modules = listToAttrs (map kdeModuleNV manifest.modules);
-
- splittedModuleList =
- let
- splitted = filter (a: a ? pkgs) manifest.modules;
- names = map ({module, sane ? module, ...}: sane) splitted;
- in
- map (m: m.projects) (stdenv.lib.attrVals names modules);
-
- individual =
- stdenv.lib.zipAttrsWith
- (
- name: list:
- if tail list == []
- then head list
- else abort "Multiple modules define ${name}"
- )
- splittedModuleList;
-}
diff --git a/pkgs/desktops/kde-4.8/kde-package/kde-manifest.sh b/pkgs/desktops/kde-4.8/kde-package/kde-manifest.sh
deleted file mode 100755
index e964ce3ddc11f37b9b310ce023be0b148f80e96c..0000000000000000000000000000000000000000
--- a/pkgs/desktops/kde-4.8/kde-package/kde-manifest.sh
+++ /dev/null
@@ -1,146 +0,0 @@
-#! /bin/sh
-
-# Usage: download kde release to $dir, then run
-# $0 $dir
-
-dir="$1"
-
-# Detect release number & whether it is a stable release
-if [[ ! -d "${dir}" ]]; then
- echo "${dir} is not a directory (or doesn't exist)!" >&2
- exit 1
-fi
-
-release=$(ls "${dir}"/kdelibs-*.tar.xz | \
- sed -e 's/.*kdelibs-//' -e 's/\.tar\.xz//')
-
-if [[ ${release##*.} -gt 50 ]]; then
- stable="false"
-else
- stable="true"
-fi
-
-echo "Detected release ${release}" >&2
-
-declare -A hash
-declare -A modules
-declare -a packages
-declare -a top_level
-
-# xsltproc output declares -A module
-if [[ ! -f kde_projects.xml ]]; then
- curl -O -J http://projects.kde.org/kde_projects.xml
-fi
-eval `xsltproc kde-submodules.xslt kde_projects.xml`
-
-module[kde-baseapps]=kde-baseapps
-unset module[kactivities]
-
-print_sane() {
- echo "Called print_sane $1" >&2
- sane="${1//[^a-z0-9_]/_}"
- if [[ "$sane" != "$1" ]]; then
- echo "Sane version is $sane" >&2
- echo -n "sane=\"$sane\";"
- fi
-}
-
-for i in `cd "${dir}"; ls *-${release}.tar.xz`; do
- package=${i%-${release}.tar.xz}
- packages+=( "$package" )
- echo -n "${package}.. " >&2
- hash[$package]=$(nix-hash --type sha256 --flat --base32 "${dir}/${i}")
- echo -n ${hash[$package]} >&2
-
- if [ -n "${module[$package]}" ]; then
- m="${module[$package]}"
- echo " (${m})" >&2
- modules[$m]=1
- else
- top_level+=( "$package" )
- echo " (top-level)" >&2
- fi
- #nix-store --add-fixed sha256 "${dir}/${i}" >&2
-done
-
-
-print_pkg_hash() {
- echo " {name=\"${1}\";value=\"${hash[$1]}\";}"
-}
-
-print_hashes(){
- echo "hashes=builtins.listToAttrs["
- for p in "${packages[@]}"; do print_pkg_hash "$p"; done
- echo "];"
-}
-
-print_split_module(){
- echo -n "$1:" >&2
- echo -e "{\n module=\"$1\";"
- print_sane "$1"
- echo " split=true;"
- echo " pkgs=["
- for p in "${packages[@]}"; do
- if [[ "${module[$p]}" == "$1" ]]; then
- echo -n " { name=\"$p\"; "
- print_sane "$p"
- echo " }"
- echo -n " $p" >&2
- fi
- done
- echo " ];"
- echo "}"
- echo >&2
-}
-
-print_mono_module(){
- echo -en "{ module=\"$1\"; "
- print_sane "$1"
- echo -n "$1 ... " >&2
- echo -n " split=false;"
- cml="$1-$release/CMakeLists.txt"
- tar -xf "${dir}/$1-${release}.tar.xz" "$cml"
- if grep '^[^#]*add_subdirectory' $cml >/dev/null; then
- if grep '^[^#]*add_subdirectory' $cml | grep -v macro_optional_add_subdirectory >/dev/null; then
- echo " is monolithic (has unconditionally added subdirs)" >&2
- else
- subdirs=( `grep '^[^#]*add_subdirectory' $cml |
- sed -e 's/[^#]*add_subdirectory *( *\(.*\) *)/\1/' |
- grep -v '\(doc\|cmake\)'` )
- echo " seems splittable, subdirs: ${subdirs[*]}" >&2
- echo -e "\n pkgs=["
- for s in "${subdirs[@]}"; do
- echo -en " {"
- echo -n " name=\"${s//\//-}\"; "
- print_sane "$s"
- if [[ $s != "${s//\//-}" ]]; then
- echo -n "subdir=\"$s\"; "
- fi
- echo "}"
- done
- echo -e " ];\n"
- fi
- else
- echo " is monolithic (has no subdirs)" >&2
- fi
- rm $cml
- rmdir $1-$release
- echo "}"
-}
-
-print_modules(){
- echo "modules=["
- echo "Printing modules splitted by upstream" >&2
- for m in "${!modules[@]}"; do print_split_module "$m"; done
- echo >&2
- echo "Printing modules not splitted by upstream (${top_level[*]})" >&2
- for m in "${top_level[@]}"; do print_mono_module "$m"; done
- echo "];"
-}
-
-echo "Writing ${release}.nix" >&2
-exec > "${release}.nix"
-echo "{stable=${stable};"
-print_hashes
-print_modules
-echo "}"
diff --git a/pkgs/desktops/kde-4.8/kde-runtime.nix b/pkgs/desktops/kde-4.8/kde-runtime.nix
deleted file mode 100644
index b8f9afff7b3d663472fb22f08b0406bdfb6c94fa..0000000000000000000000000000000000000000
--- a/pkgs/desktops/kde-4.8/kde-runtime.nix
+++ /dev/null
@@ -1,19 +0,0 @@
-{ kde, kdelibs, shared_desktop_ontologies, bzip2, libssh, exiv2, attica
-, libcanberra, virtuoso, samba, libjpeg, ntrack, pkgconfig, qca2, xz, pulseaudio
-, networkmanager
-}:
-
-kde {
- buildInputs =
- [ kdelibs shared_desktop_ontologies bzip2 libssh exiv2 attica xz networkmanager
- samba libcanberra ntrack libjpeg qca2 pulseaudio
- ];
-
- nativeBuildInputs = [ pkgconfig ];
-
- passthru.propagatedUserEnvPackages = [ virtuoso ];
-
- meta = {
- license = "LGPL";
- };
-}
diff --git a/pkgs/desktops/kde-4.8/kde-wallpapers.nix b/pkgs/desktops/kde-4.8/kde-wallpapers.nix
deleted file mode 100644
index ad4c22c632dbde9811d82e127b1da486c8a643e0..0000000000000000000000000000000000000000
--- a/pkgs/desktops/kde-4.8/kde-wallpapers.nix
+++ /dev/null
@@ -1,17 +0,0 @@
-{ kde, cmake }:
-
-kde {
- nativeBuildInputs = [ cmake ];
-
- patches = [ ./files/kde-wallpapers-buildsystem.patch ];
-
- cmakeFlags = "-DWALLPAPER_INSTALL_DIR=share/wallpapers";
-
- outputHashAlgo = "sha256";
- outputHashMode = "recursive";
- outputHash = "b8dfcc905abc46eebac2dd07267879d6a27e6e77f5253eb9c65fe594766770c4";
-
- meta = {
- description = "Wallpapers for KDE";
- };
-}
diff --git a/pkgs/desktops/kde-4.8/kde-workspace.nix b/pkgs/desktops/kde-4.8/kde-workspace.nix
deleted file mode 100644
index 394cd550b96878a7842785dfafa95c9191d8a1c1..0000000000000000000000000000000000000000
--- a/pkgs/desktops/kde-4.8/kde-workspace.nix
+++ /dev/null
@@ -1,37 +0,0 @@
-{ kde, kdelibs, qimageblitz, libdbusmenu_qt, xorg, shared_desktop_ontologies,
- lm_sensors, pciutils, libraw1394, libusb, libxklavier, python, libqalculate,
- xkeyboard_config, kdepimlibs, pam, boost, gpsd, prison, akonadi,
- pykde4, libjpeg, pkgconfig, libXft, libXxf86misc, kactivities
-}:
-
-kde {
-
- buildInputs =
- [ kdelibs qimageblitz libdbusmenu_qt pykde4 libjpeg libXft libXxf86misc
- xorg.libxkbfile xorg.libXcomposite xorg.libXScrnSaver xorg.libXtst
- xorg.libXcomposite xorg.libXdamage xorg.libXau xorg.libXdmcp
- xorg.libpthreadstubs
- boost gpsd shared_desktop_ontologies lm_sensors pciutils libraw1394
- libusb python libqalculate kdepimlibs pam prison akonadi
- kactivities
- ];
-
- nativeBuildInputs = [ pkgconfig ];
-
- preConfigure =
- ''
- # Fix incorrect path to kde4-config.
- substituteInPlace startkde.cmake --replace '$bindir/kde4-config' ${kdelibs}/bin/kde4-config
-
- # Fix the path to the keyboard configuration files.
- substituteInPlace kcontrol/keyboard/xkb_rules.cpp \
- --replace /usr/share/X11 ${xkeyboard_config}/etc/X11
- '';
-
- enableParallelBuilding = false; # frequent problems on Hydra
-
- meta = {
- description = "KDE workspace components such as Plasma, Kwin and System Settings";
- license = "GPLv2";
- };
-}
diff --git a/pkgs/desktops/kde-4.8/kdeaccessibility/jovie.nix b/pkgs/desktops/kde-4.8/kdeaccessibility/jovie.nix
deleted file mode 100644
index d38c80c4c36ad2e48c5740f2c483879d034b9164..0000000000000000000000000000000000000000
--- a/pkgs/desktops/kde-4.8/kdeaccessibility/jovie.nix
+++ /dev/null
@@ -1,9 +0,0 @@
-{ kde, kdelibs, speechd }:
-
-kde {
- buildInputs = [ kdelibs speechd ];
-
- meta = {
- description = "Text-to-speech synthesis daemon";
- };
-}
diff --git a/pkgs/desktops/kde-4.8/kdeaccessibility/kaccessible.nix b/pkgs/desktops/kde-4.8/kdeaccessibility/kaccessible.nix
deleted file mode 100644
index 98fae7c983f8cdf89ac4d5d63920e32ecbadaa75..0000000000000000000000000000000000000000
--- a/pkgs/desktops/kde-4.8/kdeaccessibility/kaccessible.nix
+++ /dev/null
@@ -1,9 +0,0 @@
-{ kde, kdelibs, speechd }:
-
-kde {
- buildInputs = [ kdelibs speechd ];
-
- meta = {
- description = "Bridge that provides accessibility services to applications";
- };
-}
diff --git a/pkgs/desktops/kde-4.8/kdeaccessibility/kmag.nix b/pkgs/desktops/kde-4.8/kdeaccessibility/kmag.nix
deleted file mode 100644
index f3b27dacf672e65ec80b290d1a16635fef67ab5e..0000000000000000000000000000000000000000
--- a/pkgs/desktops/kde-4.8/kdeaccessibility/kmag.nix
+++ /dev/null
@@ -1,9 +0,0 @@
-{ kde, kdelibs }:
-
-kde {
- buildInputs = [ kdelibs ];
-
- meta = {
- description = "Screen magnifier for KDE";
- };
-}
diff --git a/pkgs/desktops/kde-4.8/kdeaccessibility/kmousetool.nix b/pkgs/desktops/kde-4.8/kdeaccessibility/kmousetool.nix
deleted file mode 100644
index 8e0caa76ed9ce37115431b7d422bce5eb79b5deb..0000000000000000000000000000000000000000
--- a/pkgs/desktops/kde-4.8/kdeaccessibility/kmousetool.nix
+++ /dev/null
@@ -1,9 +0,0 @@
-{ kde, kdelibs, libXtst, libXt }:
-
-kde {
- buildInputs = [ kdelibs libXtst libXt ];
-
- meta = {
- description = "A program that clicks the mouse for you";
- };
-}
diff --git a/pkgs/desktops/kde-4.8/kdeaccessibility/kmouth.nix b/pkgs/desktops/kde-4.8/kdeaccessibility/kmouth.nix
deleted file mode 100644
index 4159501967cda77de6031304ddcb3a2978e65c59..0000000000000000000000000000000000000000
--- a/pkgs/desktops/kde-4.8/kdeaccessibility/kmouth.nix
+++ /dev/null
@@ -1,9 +0,0 @@
-{ kde, kdelibs }:
-
-kde {
- buildInputs = [ kdelibs ];
-
- meta = {
- description = "A type-and-say front end for speech synthesizers";
- };
-}
diff --git a/pkgs/desktops/kde-4.8/kdeadmin/kcron.nix b/pkgs/desktops/kde-4.8/kdeadmin/kcron.nix
deleted file mode 100644
index bada0c1cb108e6e17d36547e9fa61da8eb8d46d1..0000000000000000000000000000000000000000
--- a/pkgs/desktops/kde-4.8/kdeadmin/kcron.nix
+++ /dev/null
@@ -1,5 +0,0 @@
-{ kde, kdelibs }:
-
-kde {
- buildInputs = [ kdelibs ];
-}
diff --git a/pkgs/desktops/kde-4.8/kdeadmin/ksystemlog.nix b/pkgs/desktops/kde-4.8/kdeadmin/ksystemlog.nix
deleted file mode 100644
index bada0c1cb108e6e17d36547e9fa61da8eb8d46d1..0000000000000000000000000000000000000000
--- a/pkgs/desktops/kde-4.8/kdeadmin/ksystemlog.nix
+++ /dev/null
@@ -1,5 +0,0 @@
-{ kde, kdelibs }:
-
-kde {
- buildInputs = [ kdelibs ];
-}
diff --git a/pkgs/desktops/kde-4.8/kdeadmin/kuser.nix b/pkgs/desktops/kde-4.8/kdeadmin/kuser.nix
deleted file mode 100644
index 571674a461ad4354357bfd409806aeb6e0d2fc71..0000000000000000000000000000000000000000
--- a/pkgs/desktops/kde-4.8/kdeadmin/kuser.nix
+++ /dev/null
@@ -1,5 +0,0 @@
-{ kde, kdelibs, kdepimlibs }:
-
-kde {
- buildInputs = [ kdelibs kdepimlibs ];
-}
diff --git a/pkgs/desktops/kde-4.8/kdeadmin/system-config-printer-kde.nix b/pkgs/desktops/kde-4.8/kdeadmin/system-config-printer-kde.nix
deleted file mode 100644
index 2c462f67c1593b106b04431648c121c096de093c..0000000000000000000000000000000000000000
--- a/pkgs/desktops/kde-4.8/kdeadmin/system-config-printer-kde.nix
+++ /dev/null
@@ -1,33 +0,0 @@
-{ kde, pkgconfig, pythonPackages, sip, pycups, pygobject, system_config_printer,
- kdelibs, kdepimlibs, pykde4, cups, nettools }:
-
-let s_c_p = system_config_printer.override { withGUI = false; }; in
-kde {
- buildInputs = [ kdelibs kdepimlibs pythonPackages.python pycups pykde4 sip
- pygobject s_c_p ];
-
- passthru = { system_config_printer = s_c_p; };
-
- preConfigure =
- ''
- for i in system-config-printer-kde/cmake-modules/FindSystemConfigPrinter.py system-config-printer-kde/system-config-printer-kde.py; do
- substituteInPlace $i \
- --replace /usr/share/system-config-printer ${s_c_p}/share/system-config-printer \
- --replace /usr/bin/cupstestppd ${cups}/bin/cupstestppd \
- --replace /bin/hostname ${nettools}/bin/hostname
- done
- '';
-
- postInstall =
- ''
- # Bake the required Python path into the printer configuration program.
- res=
- for i in $(IFS=:; echo $PYTHONPATH); do res="$res''${res:+,} '$i'"; done
-
- sed -i $out/share/apps/system-config-printer-kde/system-config-printer-kde.py \
- -e "1 a import sys\nsys.path = [$res] + sys.path"
-
- mkdir -p $out/nix-support
- echo ${pykde4} > $out/nix-support/propagated-user-env-packages
- '';
-}
diff --git a/pkgs/desktops/kde-4.8/kdeartwork/ColorSchemes.nix b/pkgs/desktops/kde-4.8/kdeartwork/ColorSchemes.nix
deleted file mode 100644
index acccf66976fcfc020ad74eccabb261fb44f719ed..0000000000000000000000000000000000000000
--- a/pkgs/desktops/kde-4.8/kdeartwork/ColorSchemes.nix
+++ /dev/null
@@ -1,11 +0,0 @@
-{ kde, kdelibs }:
-
-kde {
- name = "kde-color-schemes";
-
- buildInputs = [ kdelibs ];
-
- meta = {
- description = "Additional KDE color schemes";
- };
-}
diff --git a/pkgs/desktops/kde-4.8/kdeartwork/FindXscreensaver.cmake b/pkgs/desktops/kde-4.8/kdeartwork/FindXscreensaver.cmake
deleted file mode 100644
index 499ed75268e9e98c0f829edca3976c363149c03f..0000000000000000000000000000000000000000
--- a/pkgs/desktops/kde-4.8/kdeartwork/FindXscreensaver.cmake
+++ /dev/null
@@ -1,73 +0,0 @@
-#Macro to find xscreensaver directory
-
-# Copyright (c) 2006, Laurent Montel,
-#
-# Redistribution and use is allowed according to the terms of the BSD license.
-# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
-
-if (NOT XSCREENSAVER_FOUND)
- FIND_PATH(XSCREENSAVER_DIR deco
- HINTS
- ${KDE4_INCLUDE_DIR}
- PATHS
- /usr
- /usr/local
- /opt/local
- /usr/X11R6
- /opt/kde
- /opt/kde3
- /usr/kde
- /usr/local/kde
- /usr/local/xscreensaver
- /usr/openwin/lib/xscreensaver
- /etc
- PATH_SUFFIXES
- lib${LIB_SUFFIX}/xscreensaver
- lib${LIB_SUFFIX}/misc/xscreensaver
- lib/xscreensaver
- lib64/xscreensaver
- lib/misc/xscreensaver
- libexec/xscreensaver
- bin/xscreensaver-hacks
- hacks)
- message(STATUS "XSCREENSAVER_DIR <${XSCREENSAVER_DIR}>")
-
- FIND_PATH(XSCREENSAVER_CONFIG_DIR deco.xml
- PATHS
- ${KDE4_INCLUDE_DIR}
- /usr/
- /usr/local/
- /opt/local/
- /usr/X11R6/
- /opt/kde/
- /opt/kde3/
- /usr/kde/
- /usr/local/kde/
- /usr/openwin/lib/xscreensaver/
- /etc/
- PATH_SUFFIXES xscreensaver xscreensaver/config share/xscreensaver/config
- )
- MESSAGE(STATUS "XSCREENSAVER_CONFIG_DIR :<${XSCREENSAVER_CONFIG_DIR}>")
-
-endif(NOT XSCREENSAVER_FOUND)
-
-#MESSAGE(STATUS "XSCREENSAVER_CONFIG_DIR :<${XSCREENSAVER_CONFIG_DIR}>")
-#MESSAGE(STATUS "XSCREENSAVER_DIR :<${XSCREENSAVER_DIR}>")
-
-# Need to fix hack
-if(XSCREENSAVER_DIR AND XSCREENSAVER_CONFIG_DIR)
- set(XSCREENSAVER_FOUND TRUE)
-endif(XSCREENSAVER_DIR AND XSCREENSAVER_CONFIG_DIR)
-
-if (XSCREENSAVER_FOUND)
- if (NOT Xscreensaver_FIND_QUIETLY)
- message(STATUS "Found XSCREENSAVER_CONFIG_DIR <${XSCREENSAVER_CONFIG_DIR}>")
- endif (NOT Xscreensaver_FIND_QUIETLY)
-else (XSCREENSAVER_FOUND)
- if (Xscreensaver_FIND_REQUIRED)
- message(FATAL_ERROR "XScreenSaver not found")
- endif (Xscreensaver_FIND_REQUIRED)
-endif (XSCREENSAVER_FOUND)
-
-
-MARK_AS_ADVANCED(XSCREENSAVER_DIR XSCREENSAVER_CONFIG_DIR)
diff --git a/pkgs/desktops/kde-4.8/kdeartwork/HighResolutionWallpapers.nix b/pkgs/desktops/kde-4.8/kdeartwork/HighResolutionWallpapers.nix
deleted file mode 100644
index edffca1562e1027077bab62cd4387164c1fc22af..0000000000000000000000000000000000000000
--- a/pkgs/desktops/kde-4.8/kdeartwork/HighResolutionWallpapers.nix
+++ /dev/null
@@ -1,11 +0,0 @@
-{ kde, kdelibs }:
-
-kde rec {
- name = "kde-wallpapers-high-resolution";
-
- buildInputs = [ kdelibs ];
-
- meta = {
- description = "KDE wallpapers in high resolution";
- };
-}
diff --git a/pkgs/desktops/kde-4.8/kdeartwork/IconThemes.nix b/pkgs/desktops/kde-4.8/kdeartwork/IconThemes.nix
deleted file mode 100644
index 43071e8bd1426ec00b5810904ca791d21894b46e..0000000000000000000000000000000000000000
--- a/pkgs/desktops/kde-4.8/kdeartwork/IconThemes.nix
+++ /dev/null
@@ -1,13 +0,0 @@
-{ kde, kdelibs }:
-
-kde {
- name = "kdeartwork-icon-themes";
-
- # Sources contain primary and kdeclassic as well but they're not installed
-
- buildInputs = [ kdelibs ];
-
- meta = {
- description = "KDE nuvola and mono icon themes";
- };
-}
diff --git a/pkgs/desktops/kde-4.8/kdeartwork/WeatherWallpapers.nix b/pkgs/desktops/kde-4.8/kdeartwork/WeatherWallpapers.nix
deleted file mode 100644
index 947e5e17ab0c12ece28682be5e5a89d7f29c5a46..0000000000000000000000000000000000000000
--- a/pkgs/desktops/kde-4.8/kdeartwork/WeatherWallpapers.nix
+++ /dev/null
@@ -1,11 +0,0 @@
-{ kde, kdelibs }:
-
-kde rec {
- name = "kde-weather-wallpapers";
-
- buildInputs = [ kdelibs ];
-
- meta = {
- description = "Additional KDE wallpapers (weather)";
- };
-}
diff --git a/pkgs/desktops/kde-4.8/kdeartwork/aurorae.nix b/pkgs/desktops/kde-4.8/kdeartwork/aurorae.nix
deleted file mode 100644
index 4bce95217cc676b7f83b8400dbbf7d64ed0a7620..0000000000000000000000000000000000000000
--- a/pkgs/desktops/kde-4.8/kdeartwork/aurorae.nix
+++ /dev/null
@@ -1,7 +0,0 @@
-{ kde, kdelibs }:
-
-kde {
- name = "aurorae-themes";
-
- buildInputs = [ kdelibs ];
-}
diff --git a/pkgs/desktops/kde-4.8/kdeartwork/desktopthemes.nix b/pkgs/desktops/kde-4.8/kdeartwork/desktopthemes.nix
deleted file mode 100644
index 93dd361af738b5a60f3f57e8b5bcb8ff97c46858..0000000000000000000000000000000000000000
--- a/pkgs/desktops/kde-4.8/kdeartwork/desktopthemes.nix
+++ /dev/null
@@ -1,11 +0,0 @@
-{ kde, kdelibs }:
-
-kde {
- name = "kde-desktop-themes";
-
- buildInputs = [ kdelibs ];
-
- meta = {
- description = "Additional KDE desktop themes";
- };
-}
diff --git a/pkgs/desktops/kde-4.8/kdeartwork/emoticons.nix b/pkgs/desktops/kde-4.8/kdeartwork/emoticons.nix
deleted file mode 100644
index 5ef9f78a719514d0fe0e8719485be88c477c6e05..0000000000000000000000000000000000000000
--- a/pkgs/desktops/kde-4.8/kdeartwork/emoticons.nix
+++ /dev/null
@@ -1,11 +0,0 @@
-{ kde, kdelibs }:
-
-kde {
- name = "kde-emotion-icons";
-
- buildInputs = [ kdelibs ];
-
- meta = {
- description = "Additional KDE emotion icons (smiles)";
- };
-}
diff --git a/pkgs/desktops/kde-4.8/kdeartwork/kscreensaver.nix b/pkgs/desktops/kde-4.8/kdeartwork/kscreensaver.nix
deleted file mode 100644
index 7028b9db228d4e7bf5fd4b2f4b2ab1b2c51e8f96..0000000000000000000000000000000000000000
--- a/pkgs/desktops/kde-4.8/kdeartwork/kscreensaver.nix
+++ /dev/null
@@ -1,15 +0,0 @@
-{ kde, kdelibs, xscreensaver, kde_workspace, eigen, libkexiv2, libXt, pkgconfig }:
-
-kde {
- buildInputs = [ kdelibs xscreensaver kde_workspace eigen libkexiv2 libXt ];
-
- nativeBuildInputs = [ pkgconfig ];
-
- preConfigure = "cp -v ${./FindXscreensaver.cmake} cmake/modules/FindXscreensaver.cmake";
-
- cmakeFlags = [ "-DBUILD_asciiquarium:BOOL=ON" ];
-
- meta = {
- description = "KDE screensavers";
- };
-}
diff --git a/pkgs/desktops/kde-4.8/kdeartwork/kwin-styles.nix b/pkgs/desktops/kde-4.8/kdeartwork/kwin-styles.nix
deleted file mode 100644
index b5d769b216dbb80daacf71072ea74bd85de4795a..0000000000000000000000000000000000000000
--- a/pkgs/desktops/kde-4.8/kdeartwork/kwin-styles.nix
+++ /dev/null
@@ -1,9 +0,0 @@
-{ kde, kdelibs, kde_workspace }:
-
-kde {
- buildInputs = [ kdelibs kde_workspace ];
-
- meta = {
- description = "Styles for KWin";
- };
-}
diff --git a/pkgs/desktops/kde-4.8/kdeartwork/sounds.nix b/pkgs/desktops/kde-4.8/kdeartwork/sounds.nix
deleted file mode 100644
index e98705da889e0588e733b154a0d8503f7209b04d..0000000000000000000000000000000000000000
--- a/pkgs/desktops/kde-4.8/kdeartwork/sounds.nix
+++ /dev/null
@@ -1,11 +0,0 @@
-{ kde, kdelibs }:
-
-kde rec {
- name = "kde-sounds";
-
- buildInputs = [ kdelibs ];
-
- meta = {
- description = "New login/logout sounds";
- };
-}
diff --git a/pkgs/desktops/kde-4.8/kdeartwork/styles.nix b/pkgs/desktops/kde-4.8/kdeartwork/styles.nix
deleted file mode 100644
index 6a1306c37100d615dc0e765a76ab06592f82a75e..0000000000000000000000000000000000000000
--- a/pkgs/desktops/kde-4.8/kdeartwork/styles.nix
+++ /dev/null
@@ -1,11 +0,0 @@
-{ kde, kdelibs }:
-
-kde rec {
- name = "kde-style-phase";
-
- buildInputs = [ kdelibs ];
-
- meta = {
- description = "Phase, a widget style for KDE";
- };
-}
diff --git a/pkgs/desktops/kde-4.8/kdeartwork/wallpapers.nix b/pkgs/desktops/kde-4.8/kdeartwork/wallpapers.nix
deleted file mode 100644
index 611c6a70f6bc288b3e88f730fba9fa944c28a1e8..0000000000000000000000000000000000000000
--- a/pkgs/desktops/kde-4.8/kdeartwork/wallpapers.nix
+++ /dev/null
@@ -1,11 +0,0 @@
-{ kde, kdelibs }:
-
-kde rec {
- name = "kde-wallpapers";
-
- buildInputs = [ kdelibs ];
-
- meta = {
- description = "Additional KDE wallpapers";
- };
-}
diff --git a/pkgs/desktops/kde-4.8/kdebindings/perlqt-include-smokeqt.patch b/pkgs/desktops/kde-4.8/kdebindings/perlqt-include-smokeqt.patch
deleted file mode 100644
index fd67860283b8a0fd255580de7d72a1898fe1b2f6..0000000000000000000000000000000000000000
--- a/pkgs/desktops/kde-4.8/kdebindings/perlqt-include-smokeqt.patch
+++ /dev/null
@@ -1,19 +0,0 @@
-commit 48b92b74bc6fd270c33a726257e2879203cf5064
-Author: Yury G. Kudryashov [diff odt]
-Date: Wed Mar 21 00:47:43 2012 +0400
-
- Include SMOKE_QTCORE_INCLUDE_DIR
-
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 48020a1..2263a73 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -14,7 +14,7 @@ find_package(Smoke COMPONENTS QtCore QtGui QtNetwork Qt3Support QtDeclarative Qt
- QtOpenGl QtScript QtSql QtSvg QtTest QtUiTools QtWebKit QtXml QtXmlPatterns
- Phonon Qwt QSci QImageBlitz)
-
--include_directories(${SMOKE_INCLUDE_DIR} ${QT_INCLUDES} ${CMAKE_CURRENT_SOURCE_DIR}/src)
-+include_directories(${SMOKE_INCLUDE_DIR} ${SMOKE_QTCORE_INCLUDE_DIR} ${QT_INCLUDES} ${CMAKE_CURRENT_SOURCE_DIR}/src)
- set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/cmake ${SMOKE_CMAKE_MODULE_DIR})
- include(MacroOptionalFindPackage)
- include(MacroOptionalAddBindings)
diff --git a/pkgs/desktops/kde-4.8/kdebindings/perlqt-rewrite-FindPerlMore.patch b/pkgs/desktops/kde-4.8/kdebindings/perlqt-rewrite-FindPerlMore.patch
deleted file mode 100644
index c7f73815f5459c3b336b90e6825c49627f6a4e81..0000000000000000000000000000000000000000
--- a/pkgs/desktops/kde-4.8/kdebindings/perlqt-rewrite-FindPerlMore.patch
+++ /dev/null
@@ -1,118 +0,0 @@
-commit e702abfd16f610e773fb0310d8c6512991794c63
-Author: Yury G. Kudryashov [diff odt]
-Date: Wed Mar 21 00:50:02 2012 +0400
-
- Rewrite FindPerlMore.cmake
-
- * Ask perl for expanded paths
- * Move execute_process to a macro
- * Add PERL_*_INSTALL_DIR variables that point to CMAKE_INSTALL_PREFIX
-
- The last change makes it easy to install a file into CMAKE_INSTALL_PREFIX
- instead of perl install prefix.Add debug message
-
-diff --git a/cmake/FindPerlMore.cmake b/cmake/FindPerlMore.cmake
-index 6412a47..cc8faf8 100644
---- a/cmake/FindPerlMore.cmake
-+++ b/cmake/FindPerlMore.cmake
-@@ -5,54 +5,52 @@
- #
- # PERL_INCLUDE_PATH = path to where perl.h can be found
-
--if(PERL_INCLUDE_PATH)
-- # Already in cache, be silent
-- SET(PERL_HEADERS_FOUND TRUE)
--endif (PERL_INCLUDE_PATH)
--
--IF(PERL_EXECUTABLE)
-- EXECUTE_PROCESS(COMMAND ${PERL_EXECUTABLE} -MConfig -e "print \$Config{archlib}"
-- OUTPUT_VARIABLE PERL_ARCH_LIB_DIR)
--
-- EXECUTE_PROCESS(COMMAND ${PERL_EXECUTABLE} -MConfig -e "print \$Config{sitearch}"
-- OUTPUT_VARIABLE PERL_SITE_ARCH_DIR)
--
-- EXECUTE_PROCESS(COMMAND ${PERL_EXECUTABLE} -MConfig -e "print \$Config{vendorarch}"
-- OUTPUT_VARIABLE PERL_VENDOR_ARCH_DIR)
--
-- EXECUTE_PROCESS(COMMAND ${PERL_EXECUTABLE} -MConfig -e "print \$Config{sitelib}"
-- OUTPUT_VARIABLE PERL_SITE_LIB_DIR)
--
-- EXECUTE_PROCESS(COMMAND ${PERL_EXECUTABLE} -MConfig -e "print \$Config{vendorlib}"
-- OUTPUT_VARIABLE PERL_VENDOR_LIB_DIR)
--
-- EXECUTE_PROCESS(COMMAND ${PERL_EXECUTABLE} -MConfig -e "print \$Config{version}"
-- OUTPUT_VARIABLE PERL_VERSION)
--
-- EXECUTE_PROCESS(COMMAND ${PERL_EXECUTABLE} -MConfig -e "print \$Config{ccflags}"
-- OUTPUT_VARIABLE PERL_CXX_FLAGS)
--
-- EXECUTE_PROCESS(COMMAND ${PERL_EXECUTABLE} -MConfig -e "print \$Config{ccdlflags}"
-- OUTPUT_VARIABLE PERL_CCDL_FLAGS)
--
-- EXECUTE_PROCESS(COMMAND ${PERL_EXECUTABLE} -MConfig -MFile::Spec -e "print '-L' . File::Spec->catdir(\$Config{archlibexp}, 'CORE')"
-- OUTPUT_VARIABLE PERL_EXTRA_LIB_PATHS)
--
-- EXECUTE_PROCESS(COMMAND ${PERL_EXECUTABLE} -MConfig -e "print \$Config{perllibs}"
-- OUTPUT_VARIABLE PERL_LIBS)
--
-- FIND_PATH(PERL_INCLUDE_PATH
-- NAMES perl.h
-- PATHS ${PERL_ARCH_LIB_DIR}/CORE
-- )
--
-- if(PERL_INCLUDE_PATH)
-- SET(PERL_HEADERS_FOUND TRUE)
-- endif (PERL_INCLUDE_PATH)
--
-- MARK_AS_ADVANCED(
-- PERL_INCLUDE_PATH
-- )
-+if(FIND_PERLMORE_REQUIRED)
-+ find_package(Perl REQUIRED)
-+else()
-+ find_package(Perl)
-+endif()
-+
-+macro(_perl_get_config_var name output)
-+ execute_process(COMMAND ${PERL_EXECUTABLE} -MConfig -e "print \$Config{${name}}"
-+ OUTPUT_VARIABLE PERL_${output})
-+endmacro()
-+
-+macro(_perl_get_config_dir name)
-+ string(TOLOWER ${name} _tmp)
-+ string(REPLACE "_" "" _tmp ${_tmp})
-+ _perl_get_config_var(${_tmp}exp ${name}_DIR)
-+ string(REPLACE "${PERL_ROOT_DIR}" "${CMAKE_INSTALL_PREFIX}" PERL_${name}_INSTALL_DIR "${PERL_${name}_DIR}")
-+endmacro()
-+
-+if(PERL_EXECUTABLE)
-+ _perl_get_config_var(prefixexp ROOT_DIR)
-+
-+ _perl_get_config_dir(ARCH_LIB)
-+ _perl_get_config_dir(SITE_ARCH)
-+ _perl_get_config_dir(VENDOR_ARCH)
-+ _perl_get_config_dir(SITE_LIB)
-+ _perl_get_config_dir(VENDOR_LIB)
-+
-+ _perl_get_config_var(version VERSION)
-+ _perl_get_config_var(ccflags CXX_FLAGS)
-+ _perl_get_config_var(ccdlflags CCDL_FLAGS)
-+
-+ EXECUTE_PROCESS(COMMAND ${PERL_EXECUTABLE} -MConfig -MFile::Spec -e "print '-L' . File::Spec->catdir(\$Config{archlibexp}, 'CORE')"
-+ OUTPUT_VARIABLE PERL_EXTRA_LIB_PATHS)
-+
-+ _perl_get_config_var(perllibs LIBS)
-+
-+ FIND_PATH(PERL_INCLUDE_PATH
-+ NAMES perl.h
-+ HINTS ${PERL_ARCH_LIB_DIR}/CORE
-+ )
-+
-+ if(PERL_INCLUDE_PATH)
-+ SET(PERL_HEADERS_FOUND TRUE)
-+ endif (PERL_INCLUDE_PATH)
-+
-+ MARK_AS_ADVANCED(PERL_INCLUDE_PATH)
- ENDIF(PERL_EXECUTABLE)
-
- IF(PERL_HEADERS_FOUND)
diff --git a/pkgs/desktops/kde-4.8/kdebindings/perlqt-use-site-arch-install-dir.patch b/pkgs/desktops/kde-4.8/kdebindings/perlqt-use-site-arch-install-dir.patch
deleted file mode 100644
index 04f0c5586771536d43c65f6942432a58baa17bbf..0000000000000000000000000000000000000000
--- a/pkgs/desktops/kde-4.8/kdebindings/perlqt-use-site-arch-install-dir.patch
+++ /dev/null
@@ -1,454 +0,0 @@
-commit c78779fcaff587818ee37bec3ded5e0617625b95
-Author: Yury G. Kudryashov [diff odt]
-Date: Wed Mar 21 01:01:27 2012 +0400
-
- Install to PERL_SITE_ARCH_INSTALL_DIR
-
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 48020a1..16188df 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -36,7 +36,6 @@ macro_log_feature(Qwt5_Qt4_FOUND "Qwt5 for Qt4" "Qwt5 libraries for Qt4" "http:/
- add_definitions(-DDEBUG)
-
- include (FindPerlMore)
--set(CUSTOM_PERL_SITE_ARCH_DIR ${PERL_SITE_ARCH_DIR} CACHE DIR "Custom installation directory for perl binary extension")
-
- # the RPATH to be used when installing, but only if it's not a system directory
- GET_FILENAME_COMPONENT(SMOKE_LIB_DIR ${SMOKE_BASE_LIBRARY} PATH)
-diff --git a/INSTALL b/INSTALL
-index d19f97e..97cc9f1 100644
---- a/INSTALL
-+++ b/INSTALL
-@@ -36,7 +36,6 @@ ccmake step.
- The standard options are:
- CMAKE_BUILD_TYPE = The type of build ('Debug', 'Release', etc)
- CMAKE_INSTALL_PREFIX = The location for any executables ( e.g. puic4 )
-- CUSTOM_PERL_SITE_ARCH_DIR = The location for the perl modules themselves.
- QT_QMAKE_EXECUTABLE = The path to your system's qmake.
-
- cmake looks in your path for a qmake executable. If it can't find it, it will
-diff --git a/Makefile.PL b/Makefile.PL
-index df9a13c..31dd912 100755
---- a/Makefile.PL
-+++ b/Makefile.PL
-@@ -3,7 +3,7 @@
- use strict;
- use Config;
-
--my ($prefix, $sitearch, $qmake) = ($Config{prefix}, $Config{sitearch});
-+my ($prefix, $qmake) = ($Config{prefix});
- my @cmakeArgs;
- foreach my $arg (@ARGV) {
- my $key = $arg;
-@@ -12,7 +12,6 @@ foreach my $arg (@ARGV) {
- $value =~ s/^[^=]*=//g;
- if ($key eq 'PREFIX' or $key eq 'INSTALL_BASE') {
- $prefix = $value;
-- $sitearch = "$prefix";
- }
- elsif ($key eq 'QMAKE') {
- $qmake = $value;
-@@ -34,7 +33,6 @@ if($^O =~ /win/i){
- }
- push @args, "-DCMAKE_INSTALL_PREFIX=$prefix" if $prefix;
- push @args, "-DQT_QMAKE_EXECUTABLE=$qmake" if $qmake;
--push @args, "-DCUSTOM_PERL_SITE_ARCH_DIR=$sitearch" if $sitearch;
- push @args, @cmakeArgs;
-
- if ( eval "require Alien::SmokeQt" ) {
-diff --git a/phonon/lib/CMakeLists.txt b/phonon/lib/CMakeLists.txt
-index f2857c3..78674ea 100644
---- a/phonon/lib/CMakeLists.txt
-+++ b/phonon/lib/CMakeLists.txt
-@@ -1,2 +1,2 @@
- add_custom_target(phononpm ALL ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/Phonon.pm ${CMAKE_BINARY_DIR}/blib/lib/Phonon.pm)
--install(FILES Phonon.pm DESTINATION ${CUSTOM_PERL_SITE_ARCH_DIR}/)
-+install(FILES Phonon.pm DESTINATION ${PERL_SITE_ARCH_INSTALL_DIR}/)
-diff --git a/phonon/src/CMakeLists.txt b/phonon/src/CMakeLists.txt
-index a04db11..9933dfd 100644
---- a/phonon/src/CMakeLists.txt
-+++ b/phonon/src/CMakeLists.txt
-@@ -37,4 +37,4 @@ target_link_libraries(perl_phonon
- set_target_properties(perl_phonon PROPERTIES OUTPUT_NAME ${libraryName})
- set_target_properties(perl_phonon PROPERTIES PREFIX "")
-
--install(TARGETS perl_phonon DESTINATION ${CUSTOM_PERL_SITE_ARCH_DIR}/auto/${libraryName}/)
-+install(TARGETS perl_phonon DESTINATION ${PERL_SITE_ARCH_INSTALL_DIR}/auto/${libraryName}/)
-diff --git a/qimageblitz/lib/CMakeLists.txt b/qimageblitz/lib/CMakeLists.txt
-index 0809ba8..22fc1c0 100644
---- a/qimageblitz/lib/CMakeLists.txt
-+++ b/qimageblitz/lib/CMakeLists.txt
-@@ -1,2 +1,2 @@
- add_custom_target(qimageblitzpm ALL ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/QImageBlitz.pm ${CMAKE_BINARY_DIR}/blib/lib/QImageBlitz.pm)
--install(FILES QImageBlitz.pm DESTINATION ${CUSTOM_PERL_SITE_ARCH_DIR}/)
-+install(FILES QImageBlitz.pm DESTINATION ${PERL_SITE_ARCH_INSTALL_DIR}/)
-diff --git a/qimageblitz/src/CMakeLists.txt b/qimageblitz/src/CMakeLists.txt
-index 02ef494..4f02c1b 100644
---- a/qimageblitz/src/CMakeLists.txt
-+++ b/qimageblitz/src/CMakeLists.txt
-@@ -37,4 +37,4 @@ target_link_libraries(perl_qimageblitz
- set_target_properties(perl_qimageblitz PROPERTIES OUTPUT_NAME ${libraryName})
- set_target_properties(perl_qimageblitz PROPERTIES PREFIX "")
-
--install(TARGETS perl_qimageblitz DESTINATION ${CUSTOM_PERL_SITE_ARCH_DIR}/auto/${libraryName}/)
-+install(TARGETS perl_qimageblitz DESTINATION ${PERL_SITE_ARCH_INSTALL_DIR}/auto/${libraryName}/)
-diff --git a/qsci/lib/CMakeLists.txt b/qsci/lib/CMakeLists.txt
-index 63b451f..d22869f 100644
---- a/qsci/lib/CMakeLists.txt
-+++ b/qsci/lib/CMakeLists.txt
-@@ -1,2 +1,2 @@
- add_custom_target(qscipm ALL ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/Qsci.pm ${CMAKE_BINARY_DIR}/blib/lib/Qsci.pm)
--install(FILES Qsci.pm DESTINATION ${CUSTOM_PERL_SITE_ARCH_DIR}/)
-+install(FILES Qsci.pm DESTINATION ${PERL_SITE_ARCH_INSTALL_DIR}/)
-diff --git a/qsci/src/CMakeLists.txt b/qsci/src/CMakeLists.txt
-index 8c1659b..bdcb5a8 100644
---- a/qsci/src/CMakeLists.txt
-+++ b/qsci/src/CMakeLists.txt
-@@ -37,4 +37,4 @@ target_link_libraries(perl_qsci
- set_target_properties(perl_qsci PROPERTIES OUTPUT_NAME ${libraryName})
- set_target_properties(perl_qsci PROPERTIES PREFIX "")
-
--install(TARGETS perl_qsci DESTINATION ${CUSTOM_PERL_SITE_ARCH_DIR}/auto/${libraryName}/)
-+install(TARGETS perl_qsci DESTINATION ${PERL_SITE_ARCH_INSTALL_DIR}/auto/${libraryName}/)
-diff --git a/qt3support/lib/CMakeLists.txt b/qt3support/lib/CMakeLists.txt
-index 2f04cfa..dda5afa 100644
---- a/qt3support/lib/CMakeLists.txt
-+++ b/qt3support/lib/CMakeLists.txt
-@@ -1,2 +1,2 @@
- add_custom_target(qt3support4pm ALL ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/Qt3Support4.pm ${CMAKE_BINARY_DIR}/blib/lib/Qt3Support4.pm)
--install(FILES Qt3Support4.pm DESTINATION ${CUSTOM_PERL_SITE_ARCH_DIR}/)
-+install(FILES Qt3Support4.pm DESTINATION ${PERL_SITE_ARCH_INSTALL_DIR}/)
-diff --git a/qt3support/src/CMakeLists.txt b/qt3support/src/CMakeLists.txt
-index b24532e..bed99aa 100644
---- a/qt3support/src/CMakeLists.txt
-+++ b/qt3support/src/CMakeLists.txt
-@@ -37,4 +37,4 @@ target_link_libraries(perl_qt3support4
- set_target_properties(perl_qt3support4 PROPERTIES OUTPUT_NAME ${libraryName})
- set_target_properties(perl_qt3support4 PROPERTIES PREFIX "")
-
--install(TARGETS perl_qt3support4 DESTINATION ${CUSTOM_PERL_SITE_ARCH_DIR}/auto/${libraryName}/)
-+install(TARGETS perl_qt3support4 DESTINATION ${PERL_SITE_ARCH_INSTALL_DIR}/auto/${libraryName}/)
-diff --git a/qtcore/lib/CMakeLists.txt b/qtcore/lib/CMakeLists.txt
-index ef07d10..1d78196 100644
---- a/qtcore/lib/CMakeLists.txt
-+++ b/qtcore/lib/CMakeLists.txt
-@@ -1,3 +1,3 @@
- add_subdirectory( QtCore4 )
- add_custom_target(perlqtcore4pm ALL ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/QtCore4.pm ${CMAKE_BINARY_DIR}/blib/lib/QtCore4.pm)
--install( FILES QtCore4.pm DESTINATION ${CUSTOM_PERL_SITE_ARCH_DIR} )
-+install( FILES QtCore4.pm DESTINATION ${PERL_SITE_ARCH_INSTALL_DIR} )
-diff --git a/qtcore/lib/QtCore4/CMakeLists.txt b/qtcore/lib/QtCore4/CMakeLists.txt
-index 44c7893..06aef20 100644
---- a/qtcore/lib/QtCore4/CMakeLists.txt
-+++ b/qtcore/lib/QtCore4/CMakeLists.txt
-@@ -1,3 +1,3 @@
--install( FILES signals.pm slots.pm isa.pm debug.pm classinfo.pm DESTINATION ${CUSTOM_PERL_SITE_ARCH_DIR}/QtCore4 )
-+install( FILES signals.pm slots.pm isa.pm debug.pm classinfo.pm DESTINATION ${PERL_SITE_ARCH_INSTALL_DIR}/QtCore4 )
- add_custom_target(perlqt4pmlibmkdir ALL ${CMAKE_COMMAND} -E make_directory ${CMAKE_BINARY_DIR}/blib/lib/QtCore4)
- add_custom_target(perlqt4pmlibsubdir ALL ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_BINARY_DIR}/blib/lib/QtCore4)
-diff --git a/qtcore/src/CMakeLists.txt b/qtcore/src/CMakeLists.txt
-index 3910636..b5e645c 100644
---- a/qtcore/src/CMakeLists.txt
-+++ b/qtcore/src/CMakeLists.txt
-@@ -53,10 +53,10 @@ target_link_libraries(perlqtcore4
- set_target_properties(perlqtcore4 PROPERTIES
- OUTPUT_NAME ${libraryName}
- PREFIX ""
-- INSTALL_NAME_DIR ${CUSTOM_PERL_SITE_ARCH_DIR}/auto/${libraryName}/
-+ INSTALL_NAME_DIR ${PERL_SITE_ARCH_INSTALL_DIR}/auto/${libraryName}/
- )
-
--install(TARGETS perlqtcore4 EXPORT PerlQtExport DESTINATION ${CUSTOM_PERL_SITE_ARCH_DIR}/auto/${libraryName}/)
-+install(TARGETS perlqtcore4 EXPORT PerlQtExport DESTINATION ${PERL_SITE_ARCH_INSTALL_DIR}/auto/${libraryName}/)
- install(FILES binding.h handlers.h listclass_macros.h marshall_basetypes.h marshall_complex.h
- marshall.h marshall_macros.h marshall_primitives.h marshall_types.h perlqt.h ppport.h
- QtCore4.h smokehelp.h smokeperl.h util.h
-diff --git a/qtdbus/lib/CMakeLists.txt b/qtdbus/lib/CMakeLists.txt
-index d03a672..a60d603 100644
---- a/qtdbus/lib/CMakeLists.txt
-+++ b/qtdbus/lib/CMakeLists.txt
-@@ -1,2 +1,2 @@
- add_custom_target(qtdbus4pm ALL ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/QtDBus4.pm ${CMAKE_BINARY_DIR}/blib/lib/QtDBus4.pm)
--install(FILES QtDBus4.pm DESTINATION ${CUSTOM_PERL_SITE_ARCH_DIR}/)
-+install(FILES QtDBus4.pm DESTINATION ${PERL_SITE_ARCH_INSTALL_DIR}/)
-diff --git a/qtdbus/src/CMakeLists.txt b/qtdbus/src/CMakeLists.txt
-index 9aa05a0..5786ea2 100644
---- a/qtdbus/src/CMakeLists.txt
-+++ b/qtdbus/src/CMakeLists.txt
-@@ -31,4 +31,4 @@ target_link_libraries(perl_qtdbus4
- set_target_properties(perl_qtdbus4 PROPERTIES OUTPUT_NAME "QtDBus4")
- set_target_properties(perl_qtdbus4 PROPERTIES PREFIX "")
-
--install(TARGETS perl_qtdbus4 DESTINATION ${CUSTOM_PERL_SITE_ARCH_DIR}/auto/QtDBus4/)
-+install(TARGETS perl_qtdbus4 DESTINATION ${PERL_SITE_ARCH_INSTALL_DIR}/auto/QtDBus4/)
-diff --git a/qtdeclarative/lib/CMakeLists.txt b/qtdeclarative/lib/CMakeLists.txt
-index e8d2847..b458858 100644
---- a/qtdeclarative/lib/CMakeLists.txt
-+++ b/qtdeclarative/lib/CMakeLists.txt
-@@ -1,2 +1,2 @@
- add_custom_target(qtdeclarative4pm ALL ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/QtDeclarative4.pm ${CMAKE_BINARY_DIR}/blib/lib/QtDeclarative4.pm)
--install(FILES QtDeclarative4.pm DESTINATION ${CUSTOM_PERL_SITE_ARCH_DIR}/)
-+install(FILES QtDeclarative4.pm DESTINATION ${PERL_SITE_ARCH_INSTALL_DIR}/)
-diff --git a/qtdeclarative/src/CMakeLists.txt b/qtdeclarative/src/CMakeLists.txt
-index 1662167..ec2a8fc 100644
---- a/qtdeclarative/src/CMakeLists.txt
-+++ b/qtdeclarative/src/CMakeLists.txt
-@@ -37,4 +37,4 @@ target_link_libraries(perl_qtdeclarative4
- set_target_properties(perl_qtdeclarative4 PROPERTIES OUTPUT_NAME ${libraryName})
- set_target_properties(perl_qtdeclarative4 PROPERTIES PREFIX "")
-
--install(TARGETS perl_qtdeclarative4 DESTINATION ${CUSTOM_PERL_SITE_ARCH_DIR}/auto/${libraryName}/)
-+install(TARGETS perl_qtdeclarative4 DESTINATION ${PERL_SITE_ARCH_INSTALL_DIR}/auto/${libraryName}/)
-diff --git a/qtgui/lib/CMakeLists.txt b/qtgui/lib/CMakeLists.txt
-index 82626c8..e62a4ac 100644
---- a/qtgui/lib/CMakeLists.txt
-+++ b/qtgui/lib/CMakeLists.txt
-@@ -1,2 +1,2 @@
- add_custom_target(qtgui4pm ALL ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/QtGui4.pm ${CMAKE_BINARY_DIR}/blib/lib/QtGui4.pm)
--install(FILES QtGui4.pm DESTINATION ${CUSTOM_PERL_SITE_ARCH_DIR}/)
-+install(FILES QtGui4.pm DESTINATION ${PERL_SITE_ARCH_INSTALL_DIR}/)
-diff --git a/qtgui/src/CMakeLists.txt b/qtgui/src/CMakeLists.txt
-index 4cc8b36..44041b6 100644
---- a/qtgui/src/CMakeLists.txt
-+++ b/qtgui/src/CMakeLists.txt
-@@ -38,4 +38,4 @@ target_link_libraries(perl_qtgui4
- set_target_properties(perl_qtgui4 PROPERTIES OUTPUT_NAME ${libraryName})
- set_target_properties(perl_qtgui4 PROPERTIES PREFIX "")
-
--install(TARGETS perl_qtgui4 DESTINATION ${CUSTOM_PERL_SITE_ARCH_DIR}/auto/${libraryName}/)
-+install(TARGETS perl_qtgui4 DESTINATION ${PERL_SITE_ARCH_INSTALL_DIR}/auto/${libraryName}/)
-diff --git a/qthelp/lib/CMakeLists.txt b/qthelp/lib/CMakeLists.txt
-index dcf5ebe..da817d4 100644
---- a/qthelp/lib/CMakeLists.txt
-+++ b/qthelp/lib/CMakeLists.txt
-@@ -1,2 +1,2 @@
- add_custom_target(qthelp4pm ALL ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/QtHelp4.pm ${CMAKE_BINARY_DIR}/blib/lib/QtHelp4.pm)
--install(FILES QtHelp4.pm DESTINATION ${CUSTOM_PERL_SITE_ARCH_DIR}/)
-+install(FILES QtHelp4.pm DESTINATION ${PERL_SITE_ARCH_INSTALL_DIR}/)
-diff --git a/qthelp/src/CMakeLists.txt b/qthelp/src/CMakeLists.txt
-index c00359d..689cb29 100644
---- a/qthelp/src/CMakeLists.txt
-+++ b/qthelp/src/CMakeLists.txt
-@@ -37,4 +37,4 @@ target_link_libraries(perl_qthelp4
- set_target_properties(perl_qthelp4 PROPERTIES OUTPUT_NAME ${libraryName})
- set_target_properties(perl_qthelp4 PROPERTIES PREFIX "")
-
--install(TARGETS perl_qthelp4 DESTINATION ${CUSTOM_PERL_SITE_ARCH_DIR}/auto/${libraryName}/)
-+install(TARGETS perl_qthelp4 DESTINATION ${PERL_SITE_ARCH_INSTALL_DIR}/auto/${libraryName}/)
-diff --git a/qtmultimedia/lib/CMakeLists.txt b/qtmultimedia/lib/CMakeLists.txt
-index e55f697..5384539 100644
---- a/qtmultimedia/lib/CMakeLists.txt
-+++ b/qtmultimedia/lib/CMakeLists.txt
-@@ -1,2 +1,2 @@
- add_custom_target(qtmultimedia4pm ALL ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/QtMultimedia4.pm ${CMAKE_BINARY_DIR}/blib/lib/QtMultimedia4.pm)
--install(FILES QtMultimedia4.pm DESTINATION ${CUSTOM_PERL_SITE_ARCH_DIR}/)
-+install(FILES QtMultimedia4.pm DESTINATION ${PERL_SITE_ARCH_INSTALL_DIR}/)
-diff --git a/qtmultimedia/src/CMakeLists.txt b/qtmultimedia/src/CMakeLists.txt
-index 0728aba..df8e552 100644
---- a/qtmultimedia/src/CMakeLists.txt
-+++ b/qtmultimedia/src/CMakeLists.txt
-@@ -37,4 +37,4 @@ target_link_libraries(perl_qtmultimedia4
- set_target_properties(perl_qtmultimedia4 PROPERTIES OUTPUT_NAME ${libraryName})
- set_target_properties(perl_qtmultimedia4 PROPERTIES PREFIX "")
-
--install(TARGETS perl_qtmultimedia4 DESTINATION ${CUSTOM_PERL_SITE_ARCH_DIR}/auto/${libraryName}/)
-+install(TARGETS perl_qtmultimedia4 DESTINATION ${PERL_SITE_ARCH_INSTALL_DIR}/auto/${libraryName}/)
-diff --git a/qtnetwork/lib/CMakeLists.txt b/qtnetwork/lib/CMakeLists.txt
-index 12cd5dd..d1fb0e6 100644
---- a/qtnetwork/lib/CMakeLists.txt
-+++ b/qtnetwork/lib/CMakeLists.txt
-@@ -1,2 +1,2 @@
- add_custom_target(qtnetwork4pm ALL ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/QtNetwork4.pm ${CMAKE_BINARY_DIR}/blib/lib/QtNetwork4.pm)
--install(FILES QtNetwork4.pm DESTINATION ${CUSTOM_PERL_SITE_ARCH_DIR}/)
-+install(FILES QtNetwork4.pm DESTINATION ${PERL_SITE_ARCH_INSTALL_DIR}/)
-diff --git a/qtnetwork/src/CMakeLists.txt b/qtnetwork/src/CMakeLists.txt
-index caf8327..0994d57 100644
---- a/qtnetwork/src/CMakeLists.txt
-+++ b/qtnetwork/src/CMakeLists.txt
-@@ -39,4 +39,4 @@ target_link_libraries(perl_qtnetwork4
- set_target_properties(perl_qtnetwork4 PROPERTIES OUTPUT_NAME ${libraryName})
- set_target_properties(perl_qtnetwork4 PROPERTIES PREFIX "")
-
--install(TARGETS perl_qtnetwork4 DESTINATION ${CUSTOM_PERL_SITE_ARCH_DIR}/auto/${libraryName}/)
-+install(TARGETS perl_qtnetwork4 DESTINATION ${PERL_SITE_ARCH_INSTALL_DIR}/auto/${libraryName}/)
-diff --git a/qtopengl/lib/CMakeLists.txt b/qtopengl/lib/CMakeLists.txt
-index f3b5640..d8dc9e4 100644
---- a/qtopengl/lib/CMakeLists.txt
-+++ b/qtopengl/lib/CMakeLists.txt
-@@ -1,2 +1,2 @@
- add_custom_target(qtopengl4pm ALL ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/QtOpenGL4.pm ${CMAKE_BINARY_DIR}/blib/lib/QtOpenGL4.pm)
--install(FILES QtOpenGL4.pm DESTINATION ${CUSTOM_PERL_SITE_ARCH_DIR}/)
-+install(FILES QtOpenGL4.pm DESTINATION ${PERL_SITE_ARCH_INSTALL_DIR}/)
-diff --git a/qtopengl/src/CMakeLists.txt b/qtopengl/src/CMakeLists.txt
-index 20493a9..777af89 100644
---- a/qtopengl/src/CMakeLists.txt
-+++ b/qtopengl/src/CMakeLists.txt
-@@ -37,4 +37,4 @@ target_link_libraries(perl_qtopengl4
- set_target_properties(perl_qtopengl4 PROPERTIES OUTPUT_NAME ${libraryName})
- set_target_properties(perl_qtopengl4 PROPERTIES PREFIX "")
-
--install(TARGETS perl_qtopengl4 DESTINATION ${CUSTOM_PERL_SITE_ARCH_DIR}/auto/${libraryName}/)
-+install(TARGETS perl_qtopengl4 DESTINATION ${PERL_SITE_ARCH_INSTALL_DIR}/auto/${libraryName}/)
-diff --git a/qtscript/lib/CMakeLists.txt b/qtscript/lib/CMakeLists.txt
-index d21dbe5..320ff93 100644
---- a/qtscript/lib/CMakeLists.txt
-+++ b/qtscript/lib/CMakeLists.txt
-@@ -1,2 +1,2 @@
- add_custom_target(qtscript4pm ALL ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/QtScript4.pm ${CMAKE_BINARY_DIR}/blib/lib/QtScript4.pm)
--install(FILES QtScript4.pm DESTINATION ${CUSTOM_PERL_SITE_ARCH_DIR}/)
-+install(FILES QtScript4.pm DESTINATION ${PERL_SITE_ARCH_INSTALL_DIR}/)
-diff --git a/qtscript/src/CMakeLists.txt b/qtscript/src/CMakeLists.txt
-index dd395be..6ff47d8 100644
---- a/qtscript/src/CMakeLists.txt
-+++ b/qtscript/src/CMakeLists.txt
-@@ -37,4 +37,4 @@ target_link_libraries(perl_qtscript4
- set_target_properties(perl_qtscript4 PROPERTIES OUTPUT_NAME ${libraryName})
- set_target_properties(perl_qtscript4 PROPERTIES PREFIX "")
-
--install(TARGETS perl_qtscript4 DESTINATION ${CUSTOM_PERL_SITE_ARCH_DIR}/auto/${libraryName}/)
-+install(TARGETS perl_qtscript4 DESTINATION ${PERL_SITE_ARCH_INSTALL_DIR}/auto/${libraryName}/)
-diff --git a/qtsql/lib/CMakeLists.txt b/qtsql/lib/CMakeLists.txt
-index 59336d3..d9dd4d5 100644
---- a/qtsql/lib/CMakeLists.txt
-+++ b/qtsql/lib/CMakeLists.txt
-@@ -1,2 +1,2 @@
- add_custom_target(qtsql4pm ALL ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/QtSql4.pm ${CMAKE_BINARY_DIR}/blib/lib/QtSql4.pm)
--install(FILES QtSql4.pm DESTINATION ${CUSTOM_PERL_SITE_ARCH_DIR}/)
-+install(FILES QtSql4.pm DESTINATION ${PERL_SITE_ARCH_INSTALL_DIR}/)
-diff --git a/qtsql/src/CMakeLists.txt b/qtsql/src/CMakeLists.txt
-index 3ec2028..59096ba 100644
---- a/qtsql/src/CMakeLists.txt
-+++ b/qtsql/src/CMakeLists.txt
-@@ -37,4 +37,4 @@ target_link_libraries(perl_qtsql4
- set_target_properties(perl_qtsql4 PROPERTIES OUTPUT_NAME ${libraryName})
- set_target_properties(perl_qtsql4 PROPERTIES PREFIX "")
-
--install(TARGETS perl_qtsql4 DESTINATION ${CUSTOM_PERL_SITE_ARCH_DIR}/auto/${libraryName}/)
-+install(TARGETS perl_qtsql4 DESTINATION ${PERL_SITE_ARCH_INSTALL_DIR}/auto/${libraryName}/)
-diff --git a/qtsvg/lib/CMakeLists.txt b/qtsvg/lib/CMakeLists.txt
-index 33f6deb..bf1dc1f 100644
---- a/qtsvg/lib/CMakeLists.txt
-+++ b/qtsvg/lib/CMakeLists.txt
-@@ -1,2 +1,2 @@
- add_custom_target(qtsvg4pm ALL ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/QtSvg4.pm ${CMAKE_BINARY_DIR}/blib/lib/QtSvg4.pm)
--install(FILES QtSvg4.pm DESTINATION ${CUSTOM_PERL_SITE_ARCH_DIR}/)
-+install(FILES QtSvg4.pm DESTINATION ${PERL_SITE_ARCH_INSTALL_DIR}/)
-diff --git a/qtsvg/src/CMakeLists.txt b/qtsvg/src/CMakeLists.txt
-index 11eccd2..449bf0f 100644
---- a/qtsvg/src/CMakeLists.txt
-+++ b/qtsvg/src/CMakeLists.txt
-@@ -37,4 +37,4 @@ target_link_libraries(perl_qtsvg4
- set_target_properties(perl_qtsvg4 PROPERTIES OUTPUT_NAME ${libraryName})
- set_target_properties(perl_qtsvg4 PROPERTIES PREFIX "")
-
--install(TARGETS perl_qtsvg4 DESTINATION ${CUSTOM_PERL_SITE_ARCH_DIR}/auto/${libraryName}/)
-+install(TARGETS perl_qtsvg4 DESTINATION ${PERL_SITE_ARCH_INSTALL_DIR}/auto/${libraryName}/)
-diff --git a/qttest/lib/CMakeLists.txt b/qttest/lib/CMakeLists.txt
-index 3bfa78c..5a8d8da 100644
---- a/qttest/lib/CMakeLists.txt
-+++ b/qttest/lib/CMakeLists.txt
-@@ -1,2 +1,2 @@
- add_custom_target(qttest4pm ALL ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/QtTest4.pm ${CMAKE_BINARY_DIR}/blib/lib/QtTest4.pm)
--install(FILES QtTest4.pm DESTINATION ${CUSTOM_PERL_SITE_ARCH_DIR}/)
-+install(FILES QtTest4.pm DESTINATION ${PERL_SITE_ARCH_INSTALL_DIR}/)
-diff --git a/qttest/src/CMakeLists.txt b/qttest/src/CMakeLists.txt
-index 5492e55..d4662b1 100644
---- a/qttest/src/CMakeLists.txt
-+++ b/qttest/src/CMakeLists.txt
-@@ -38,4 +38,4 @@ target_link_libraries(perl_qttest4
- set_target_properties(perl_qttest4 PROPERTIES OUTPUT_NAME ${libraryName})
- set_target_properties(perl_qttest4 PROPERTIES PREFIX "")
-
--install(TARGETS perl_qttest4 DESTINATION ${CUSTOM_PERL_SITE_ARCH_DIR}/auto/${libraryName}/)
-+install(TARGETS perl_qttest4 DESTINATION ${PERL_SITE_ARCH_INSTALL_DIR}/auto/${libraryName}/)
-diff --git a/qtuitools/lib/CMakeLists.txt b/qtuitools/lib/CMakeLists.txt
-index 119e40e..3a5f472 100644
---- a/qtuitools/lib/CMakeLists.txt
-+++ b/qtuitools/lib/CMakeLists.txt
-@@ -1,2 +1,2 @@
- add_custom_target(qtuitools4pm ALL ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/QtUiTools4.pm ${CMAKE_BINARY_DIR}/blib/lib/QtUiTools4.pm)
--install(FILES QtUiTools4.pm DESTINATION ${CUSTOM_PERL_SITE_ARCH_DIR}/)
-+install(FILES QtUiTools4.pm DESTINATION ${PERL_SITE_ARCH_INSTALL_DIR}/)
-diff --git a/qtuitools/src/CMakeLists.txt b/qtuitools/src/CMakeLists.txt
-index a8ae4a2..ecc079f 100644
---- a/qtuitools/src/CMakeLists.txt
-+++ b/qtuitools/src/CMakeLists.txt
-@@ -37,4 +37,4 @@ target_link_libraries(perl_qtuitools4
- set_target_properties(perl_qtuitools4 PROPERTIES OUTPUT_NAME ${libraryName})
- set_target_properties(perl_qtuitools4 PROPERTIES PREFIX "")
-
--install(TARGETS perl_qtuitools4 DESTINATION ${CUSTOM_PERL_SITE_ARCH_DIR}/auto/${libraryName}/)
-+install(TARGETS perl_qtuitools4 DESTINATION ${PERL_SITE_ARCH_INSTALL_DIR}/auto/${libraryName}/)
-diff --git a/qtwebkit/lib/CMakeLists.txt b/qtwebkit/lib/CMakeLists.txt
-index a02f7ee..3846227 100644
---- a/qtwebkit/lib/CMakeLists.txt
-+++ b/qtwebkit/lib/CMakeLists.txt
-@@ -1,2 +1,2 @@
- add_custom_target(qtwebkit4pm ALL ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/QtWebKit4.pm ${CMAKE_BINARY_DIR}/blib/lib/QtWebKit4.pm)
--install(FILES QtWebKit4.pm DESTINATION ${CUSTOM_PERL_SITE_ARCH_DIR}/)
-+install(FILES QtWebKit4.pm DESTINATION ${PERL_SITE_ARCH_INSTALL_DIR}/)
-diff --git a/qtwebkit/src/CMakeLists.txt b/qtwebkit/src/CMakeLists.txt
-index a6e00f8..dbebc44 100644
---- a/qtwebkit/src/CMakeLists.txt
-+++ b/qtwebkit/src/CMakeLists.txt
-@@ -37,4 +37,4 @@ target_link_libraries(perl_qtwebkit4
- set_target_properties(perl_qtwebkit4 PROPERTIES OUTPUT_NAME ${libraryName})
- set_target_properties(perl_qtwebkit4 PROPERTIES PREFIX "")
-
--install(TARGETS perl_qtwebkit4 DESTINATION ${CUSTOM_PERL_SITE_ARCH_DIR}/auto/${libraryName}/)
-+install(TARGETS perl_qtwebkit4 DESTINATION ${PERL_SITE_ARCH_INSTALL_DIR}/auto/${libraryName}/)
-diff --git a/qtxml/lib/CMakeLists.txt b/qtxml/lib/CMakeLists.txt
-index 5505bc4..7db743c 100644
---- a/qtxml/lib/CMakeLists.txt
-+++ b/qtxml/lib/CMakeLists.txt
-@@ -1,2 +1,2 @@
- add_custom_target(qtxml4pm ALL ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/QtXml4.pm ${CMAKE_BINARY_DIR}/blib/lib/QtXml4.pm)
--install(FILES QtXml4.pm DESTINATION ${CUSTOM_PERL_SITE_ARCH_DIR}/)
-+install(FILES QtXml4.pm DESTINATION ${PERL_SITE_ARCH_INSTALL_DIR}/)
-diff --git a/qtxml/src/CMakeLists.txt b/qtxml/src/CMakeLists.txt
-index 018508c..a351609 100644
---- a/qtxml/src/CMakeLists.txt
-+++ b/qtxml/src/CMakeLists.txt
-@@ -37,4 +37,4 @@ target_link_libraries(perl_qtxml4
- set_target_properties(perl_qtxml4 PROPERTIES OUTPUT_NAME ${libraryName})
- set_target_properties(perl_qtxml4 PROPERTIES PREFIX "")
-
--install(TARGETS perl_qtxml4 DESTINATION ${CUSTOM_PERL_SITE_ARCH_DIR}/auto/${libraryName}/)
-+install(TARGETS perl_qtxml4 DESTINATION ${PERL_SITE_ARCH_INSTALL_DIR}/auto/${libraryName}/)
-diff --git a/qtxmlpatterns/lib/CMakeLists.txt b/qtxmlpatterns/lib/CMakeLists.txt
-index a35f3df..3d86103 100644
---- a/qtxmlpatterns/lib/CMakeLists.txt
-+++ b/qtxmlpatterns/lib/CMakeLists.txt
-@@ -1,2 +1,2 @@
- add_custom_target(qtxmlpatterns4pm ALL ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/QtXmlPatterns4.pm ${CMAKE_BINARY_DIR}/blib/lib/QtXmlPatterns4.pm)
--install(FILES QtXmlPatterns4.pm DESTINATION ${CUSTOM_PERL_SITE_ARCH_DIR}/)
-+install(FILES QtXmlPatterns4.pm DESTINATION ${PERL_SITE_ARCH_INSTALL_DIR}/)
-diff --git a/qtxmlpatterns/src/CMakeLists.txt b/qtxmlpatterns/src/CMakeLists.txt
-index 9970a98..563e922 100644
---- a/qtxmlpatterns/src/CMakeLists.txt
-+++ b/qtxmlpatterns/src/CMakeLists.txt
-@@ -37,4 +37,4 @@ target_link_libraries(perl_qtxmlpatterns4
- set_target_properties(perl_qtxmlpatterns4 PROPERTIES OUTPUT_NAME ${libraryName})
- set_target_properties(perl_qtxmlpatterns4 PROPERTIES PREFIX "")
-
--install(TARGETS perl_qtxmlpatterns4 DESTINATION ${CUSTOM_PERL_SITE_ARCH_DIR}/auto/${libraryName}/)
-+install(TARGETS perl_qtxmlpatterns4 DESTINATION ${PERL_SITE_ARCH_INSTALL_DIR}/auto/${libraryName}/)
-diff --git a/qwt/lib/CMakeLists.txt b/qwt/lib/CMakeLists.txt
-index 0013c4d..d67ffbf 100644
---- a/qwt/lib/CMakeLists.txt
-+++ b/qwt/lib/CMakeLists.txt
-@@ -1,2 +1,2 @@
- add_custom_target(qwtpm ALL ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/Qwt.pm ${CMAKE_BINARY_DIR}/blib/lib/Qwt.pm)
--install(FILES Qwt.pm DESTINATION ${CUSTOM_PERL_SITE_ARCH_DIR}/)
-+install(FILES Qwt.pm DESTINATION ${PERL_SITE_ARCH_INSTALL_DIR}/)
-diff --git a/qwt/src/CMakeLists.txt b/qwt/src/CMakeLists.txt
-index 869d818..b644e80 100644
---- a/qwt/src/CMakeLists.txt
-+++ b/qwt/src/CMakeLists.txt
-@@ -37,4 +37,4 @@ target_link_libraries(perl_qwt
- set_target_properties(perl_qwt PROPERTIES OUTPUT_NAME ${libraryName})
- set_target_properties(perl_qwt PROPERTIES PREFIX "")
-
--install(TARGETS perl_qwt DESTINATION ${CUSTOM_PERL_SITE_ARCH_DIR}/auto/${libraryName}/)
-+install(TARGETS perl_qwt DESTINATION ${PERL_SITE_ARCH_INSTALL_DIR}/auto/${libraryName}/)
diff --git a/pkgs/desktops/kde-4.8/kdebindings/perlqt.nix b/pkgs/desktops/kde-4.8/kdebindings/perlqt.nix
deleted file mode 100644
index f2b5462f33e2ef47f79d16274de9928a56e1ae37..0000000000000000000000000000000000000000
--- a/pkgs/desktops/kde-4.8/kdebindings/perlqt.nix
+++ /dev/null
@@ -1,16 +0,0 @@
-{ kde, cmake, smokeqt, perl }:
-
-kde {
- buildInputs = [ smokeqt perl ];
- nativeBuildInputs = [ cmake ];
-
- patches =
- # The order is important
- [ ./perlqt-include-smokeqt.patch ./perlqt-rewrite-FindPerlMore.patch
- ./perlqt-use-site-arch-install-dir.patch
- ];
-
- meta = {
- description = "Perl bindings for Qt library";
- };
-}
diff --git a/pkgs/desktops/kde-4.8/kdebindings/pykde4-hardcode-lib-python.patch b/pkgs/desktops/kde-4.8/kdebindings/pykde4-hardcode-lib-python.patch
deleted file mode 100644
index e7a7cb4c661c6ac34d5bd0969535454b69439560..0000000000000000000000000000000000000000
--- a/pkgs/desktops/kde-4.8/kdebindings/pykde4-hardcode-lib-python.patch
+++ /dev/null
@@ -1,18 +0,0 @@
-diff --git a/kpythonpluginfactory/CMakeLists.txt b/kpythonpluginfactory/CMakeLists.txt
-index 41fa0fe..642d867 100644
---- a/kpythonpluginfactory/CMakeLists.txt
-+++ b/kpythonpluginfactory/CMakeLists.txt
-@@ -3,7 +3,12 @@
- set(kpythonpluginfactory_SRCS
- kpythonpluginfactory.cpp)
-
--GET_FILENAME_COMPONENT(LIB_PYTHON ${PYTHON_LIBRARY} NAME)
-+option(HARDCODE_LIB_PYTHON_PATH "Whether the path to libpython.so should be hardcoded" OFF)
-+if(HARDCODE_LIB_PYTHON_PATH)
-+ get_filename_component(LIB_PYTHON ${PYTHON_LIBRARY} REALPATH)
-+else(HARDCODE_LIB_PYTHON_PATH)
-+ get_filename_component(LIB_PYTHON ${PYTHON_LIBRARY} NAME)
-+endif(HARDCODE_LIB_PYTHON_PATH)
- ADD_DEFINITIONS(-DLIB_PYTHON=\\"${LIB_PYTHON}\\")
- ADD_DEFINITIONS(-DKDE_DEFAULT_DEBUG_AREA=15000)
-
diff --git a/pkgs/desktops/kde-4.8/kdebindings/pykde4-new-sip.patch b/pkgs/desktops/kde-4.8/kdebindings/pykde4-new-sip.patch
deleted file mode 100644
index 96b3b887a8d16f231b69f2ac5b150dd07f4b1f04..0000000000000000000000000000000000000000
--- a/pkgs/desktops/kde-4.8/kdebindings/pykde4-new-sip.patch
+++ /dev/null
@@ -1,91 +0,0 @@
-commit 017822bd0dfc83fe9a7a483ecc33f4aab839a3c6
-Author: Luca Beltrame
-Date: Mon Oct 1 20:47:56 2012 +0200
-
- Remove duplicated QVector definition, since it's in PyQt now.
- Simon, if you have time, please review if everything is OK.
-
- CCMAIL: simon@simonzone.com
-
-diff --git a/sip/kdecore/typedefs.sip b/sip/kdecore/typedefs.sip
-index 5a0a080..73dad01 100644
---- a/sip/kdecore/typedefs.sip
-+++ b/sip/kdecore/typedefs.sip
-@@ -951,77 +951,3 @@ template
- %End
- };
-
--%MappedType QVector
--{
--%TypeHeaderCode
--#include
--%End
--
--%ConvertFromTypeCode
-- // Create the list.
-- PyObject *l;
--
-- if ((l = PyList_New(sipCpp->size())) == NULL)
-- return NULL;
--
-- // Set the list elements.
-- for (int i = 0; i < sipCpp->size(); ++i)
-- {
-- int t = (sipCpp->at(i));
--
--#if PY_MAJOR_VERSION >= 3
-- PyObject *tobj = PyLong_FromLong(t);
--#else
-- PyObject *tobj = PyInt_FromLong(t);
--#endif
--
-- PyList_SET_ITEM(l, i, tobj);
-- }
--
-- return l;
--%End
--
--%ConvertToTypeCode
-- // Check the type if that is all that is required.
-- if (sipIsErr == NULL)
-- {
-- if (!PyList_Check(sipPy))
-- return 0;
--
-- for (int i = 0; i < PyList_GET_SIZE(sipPy); ++i) {
-- PyObject *tobj = PyList_GET_ITEM(sipPy, i);
--#if PY_MAJOR_VERSION >= 3
-- if (!PyNumber_Check(tobj))
--#else
-- if (!PyInt_Check(tobj))
--#endif
-- return 0;
-- }
-- return 1;
-- }
--
-- QVector *qv = new QVector;
--
-- for (int i = 0; i < PyList_GET_SIZE(sipPy); ++i)
-- {
-- PyObject *tobj = PyList_GET_ITEM(sipPy, i);
-- #if PY_MAJOR_VERSION >= 3
-- int t = PyLong_AsLong (tobj);
--#else
-- int t = PyInt_AS_LONG (tobj);
--#endif
--
-- if (*sipIsErr)
-- {
-- delete qv;
-- return 0;
-- }
--
-- qv->append(t);
-- }
--
-- *sipCppPtr = qv;
--
-- return sipGetState(sipTransferObj);
--%End
--};
diff --git a/pkgs/desktops/kde-4.8/kdebindings/pykde4.nix b/pkgs/desktops/kde-4.8/kdebindings/pykde4.nix
deleted file mode 100644
index eb4d49616c4efb847a8c3baa62a5b3960e68d288..0000000000000000000000000000000000000000
--- a/pkgs/desktops/kde-4.8/kdebindings/pykde4.nix
+++ /dev/null
@@ -1,29 +0,0 @@
-{ kde, kdelibs, python, sip, pyqt4, kdepimlibs, shared_desktop_ontologies,
- boost, lndir }:
-
-let pydir = "lib/python${python.majorVersion}"; in
-
-kde {
- buildInputs = [ python kdepimlibs shared_desktop_ontologies boost ];
-
- propagatedBuildInputs = [ pyqt4 sip ];
-
- patches = [ ./pykde4-hardcode-lib-python.patch ./pykde4-new-sip.patch ];
-
- cmakeFlags = "-DHARDCODE_LIB_PYTHON_PATH=ON ";
-
- preConfigure =
- ''
- # Symlink PyQt into PyKDE. This is necessary because PyQt looks
- # in its PyQt4/uic/widget-plugins directory for plugins, and KDE
- # needs to install a plugin.
- mkdir -pv $out/${pydir}
- ${lndir}/bin/lndir ${pyqt4}/${pydir} $out/${pydir}
- cmakeFlagsArray=( "-DSIP_DEFAULT_SIP_DIR=$prefix/share/sip" )
- '';
-
- meta = {
- description = "Python bindings for KDE";
- kde.name = "pykde4";
- };
-}
diff --git a/pkgs/desktops/kde-4.8/kdebindings/qtruby-include-smokeqt.patch b/pkgs/desktops/kde-4.8/kdebindings/qtruby-include-smokeqt.patch
deleted file mode 100644
index 7d20a3c1c0bc76cc1b2e43540e8bddafd1032221..0000000000000000000000000000000000000000
--- a/pkgs/desktops/kde-4.8/kdebindings/qtruby-include-smokeqt.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 33078b4..1a6ad2e 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -5,7 +5,7 @@ set(COMPILE_RUBY FALSE CACHE INTERNAL "")
- find_package(Ruby REQUIRED)
- find_package(Qt4 REQUIRED)
- find_package(Smoke COMPONENTS QtCore QtGui QtXml QtOpenGl QtSql QtNetwork QtDbus QtSvg Phonon QSci QtDeclarative QtScript QtWebkit QtUiTools QtTest Qwt)
--include_directories(${SMOKE_INCLUDE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/src ${QT_INCLUDES})
-+include_directories(${SMOKE_INCLUDE_DIR} ${SMOKE_QTCORE_INCLUDE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/src ${QT_INCLUDES})
-
- set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${SMOKE_CMAKE_MODULE_DIR})
- include(MacroOptionalFindPackage)
diff --git a/pkgs/desktops/kde-4.8/kdebindings/qtruby-install-prefix.patch b/pkgs/desktops/kde-4.8/kdebindings/qtruby-install-prefix.patch
deleted file mode 100644
index bd95a0d8bd3dff2a3e9ca5a4dfdfcc1b49940c3e..0000000000000000000000000000000000000000
--- a/pkgs/desktops/kde-4.8/kdebindings/qtruby-install-prefix.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 33078b4..30aec0e 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -31,8 +31,8 @@ if (NOT COMPILE_RUBY)
- return()
- endif (NOT COMPILE_RUBY)
-
--SET(CUSTOM_RUBY_SITE_ARCH_DIR ${RUBY_SITEARCH_DIR} CACHE DIR "custom installation directory for ruby binary extension" )
--SET(CUSTOM_RUBY_SITE_LIB_DIR ${RUBY_SITELIB_DIR} CACHE DIR "custom installation directory for ruby extension" )
-+string(REPLACE "${RUBY_ROOT_DIR}" "${CMAKE_INSTALL_PREFIX}" CUSTOM_RUBY_SITE_ARCH_DIR ${RUBY_SITEARCH_DIR})
-+string(REPLACE "${RUBY_ROOT_DIR}" "${CMAKE_INSTALL_PREFIX}" CUSTOM_RUBY_SITE_LIB_DIR ${RUBY_SITELIB_DIR})
-
- # compute an overall version number which can be compared at once
- MATH(EXPR RUBY_VERSION_NUMBER "${RUBY_VERSION_MAJOR}*10000 + ${RUBY_VERSION_MINOR}*100 + ${RUBY_VERSION_PATCH}")
diff --git a/pkgs/desktops/kde-4.8/kdebindings/qtruby.nix b/pkgs/desktops/kde-4.8/kdebindings/qtruby.nix
deleted file mode 100644
index 723732f6104a382aec346cf3e19cf3f548d0013a..0000000000000000000000000000000000000000
--- a/pkgs/desktops/kde-4.8/kdebindings/qtruby.nix
+++ /dev/null
@@ -1,16 +0,0 @@
-{ kde, cmake, smokeqt, ruby }:
-
-kde {
- buildInputs = [ smokeqt ruby ];
- nativeBuildInputs = [ cmake ];
-
- # The second patch is not ready for upstream submmission. I should add an
- # option() instead.
- patches = [ ./qtruby-include-smokeqt.patch ./qtruby-install-prefix.patch ];
-
- cmakeFlags="-DRUBY_ROOT_DIR=${ruby}";
-
- meta = {
- description = "Ruby bindings for Qt library";
- };
-}
diff --git a/pkgs/desktops/kde-4.8/kdebindings/smokegen-nix.patch b/pkgs/desktops/kde-4.8/kdebindings/smokegen-nix.patch
deleted file mode 100644
index 03df484b63e49a24edb69a2a7b022a12bb718da1..0000000000000000000000000000000000000000
--- a/pkgs/desktops/kde-4.8/kdebindings/smokegen-nix.patch
+++ /dev/null
@@ -1,46 +0,0 @@
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 79945c4..a244d0f 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -32,10 +32,6 @@ set(generator_SRC
- type.cpp
- )
-
--# force RPATH so that the binary is usable from within the build tree
--set (CMAKE_SKIP_BUILD_RPATH FALSE)
--set (CMAKE_SKIP_RPATH FALSE)
--
- configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/config.h.in config.h @ONLY )
-
- add_executable(smokegen ${generator_SRC})
-diff --git a/cmake/SmokeConfig.cmake.in b/cmake/SmokeConfig.cmake.in
-index 947315c..de8d66c 100644
---- a/cmake/SmokeConfig.cmake.in
-+++ b/cmake/SmokeConfig.cmake.in
-@@ -44,21 +44,19 @@ macro (find_smoke_component name)
- set (SMOKE_${uppercase}_FOUND FALSE CACHE INTERNAL "")
-
- find_path(SMOKE_${uppercase}_INCLUDE_DIR
-- ${lowercase}_smoke.h
-- PATH ${SMOKE_INCLUDE_DIR}
-- NO_DEFAULT_PATH
-+ ${lowercase}_smoke.h
-+ HINTS ${SMOKE_INCLUDE_DIR}
-+ PATH_SUFFIXES smoke
- )
- if(WIN32)
- # DLLs are in the bin directory.
- find_library(SMOKE_${uppercase}_LIBRARY
- smoke${lowercase}
-- PATHS "@CMAKE_INSTALL_PREFIX@/bin"
-- NO_DEFAULT_PATH)
-+ PATHS "@CMAKE_INSTALL_PREFIX@/bin")
- else(WIN32)
- find_library(SMOKE_${uppercase}_LIBRARY
- smoke${lowercase}
-- PATHS "@SMOKE_LIBRARY_PREFIX@"
-- NO_DEFAULT_PATH)
-+ PATHS "@SMOKE_LIBRARY_PREFIX@")
- endif(WIN32)
-
- if (NOT SMOKE_${uppercase}_INCLUDE_DIR OR NOT SMOKE_${uppercase}_LIBRARY)
diff --git a/pkgs/desktops/kde-4.8/kdebindings/smokegen.nix b/pkgs/desktops/kde-4.8/kdebindings/smokegen.nix
deleted file mode 100644
index 8b5da2a641ddc68b9885c5e27813e16ef22f9914..0000000000000000000000000000000000000000
--- a/pkgs/desktops/kde-4.8/kdebindings/smokegen.nix
+++ /dev/null
@@ -1,13 +0,0 @@
-{ kde, qt4, cmake }:
-
-kde {
- buildInputs = [ qt4 ];
- nativeBuildInputs = [ cmake ];
-
- patches = [ ./smokegen-nix.patch ];
-
- meta = {
- description = "C++ parser used to generate language bindings for Qt/KDE";
- license = "GPLv2";
- };
-}
diff --git a/pkgs/desktops/kde-4.8/kdebindings/smokekde.nix b/pkgs/desktops/kde-4.8/kdebindings/smokekde.nix
deleted file mode 100644
index 0e823a95e3b293eaf08e3e799a2fe764b8f8678b..0000000000000000000000000000000000000000
--- a/pkgs/desktops/kde-4.8/kdebindings/smokekde.nix
+++ /dev/null
@@ -1,12 +0,0 @@
-{ kde, cmake, smokeqt, kdelibs, akonadi, kdepimlibs, shared_desktop_ontologies, attica }:
-
-kde {
- # attica, akonadi and kdepimlibs are disabled due to smokegen crash
- buildInputs = [ smokeqt kdelibs shared_desktop_ontologies ];
- nativeBuildInputs = [ cmake ];
-
- cmakeFlags = "-DQTDEFINES_FILE=${smokeqt}/share/smokegen/qtdefines";
- meta = {
- description = "SMOKE bindings for kdelibs";
- };
-}
diff --git a/pkgs/desktops/kde-4.8/kdebindings/smokeqt.nix b/pkgs/desktops/kde-4.8/kdebindings/smokeqt.nix
deleted file mode 100644
index 29e25093d11b9a720e08a4dc88a8d67c751acfcd..0000000000000000000000000000000000000000
--- a/pkgs/desktops/kde-4.8/kdebindings/smokeqt.nix
+++ /dev/null
@@ -1,12 +0,0 @@
-{ kde, qt4, cmake, phonon, qimageblitz, smokegen }:
-
-kde {
- propagatedBuildInputs = [ qt4 phonon qimageblitz ];
- nativeBuildInputs = [ cmake ];
- propagatedNativeBuildInputs = [ smokegen ];
-
- meta = {
- description = "C++ parser used to generate language bindings for Qt/KDE";
- license = "GPLv2";
- };
-}
diff --git a/pkgs/desktops/kde-4.8/kdeedu/analitza.nix b/pkgs/desktops/kde-4.8/kdeedu/analitza.nix
deleted file mode 100644
index 74c3a1ebb200023171701416167cebfcb4a3edb9..0000000000000000000000000000000000000000
--- a/pkgs/desktops/kde-4.8/kdeedu/analitza.nix
+++ /dev/null
@@ -1,8 +0,0 @@
-{ kde, kdelibs, readline }:
-kde {
- buildInputs = [ kdelibs readline ];
-
- meta = {
- description = "Library part of KAlgebra";
- };
-}
diff --git a/pkgs/desktops/kde-4.8/kdeedu/blinken.nix b/pkgs/desktops/kde-4.8/kdeedu/blinken.nix
deleted file mode 100644
index cdf9728833c2d4edbb1f67de7b060accdbf5b065..0000000000000000000000000000000000000000
--- a/pkgs/desktops/kde-4.8/kdeedu/blinken.nix
+++ /dev/null
@@ -1,8 +0,0 @@
-{ kde, kdelibs }:
-kde {
- buildInputs = [ kdelibs ];
-
- meta = {
- description = "Memory Enhancement Game";
- };
-}
diff --git a/pkgs/desktops/kde-4.8/kdeedu/cantor.nix b/pkgs/desktops/kde-4.8/kdeedu/cantor.nix
deleted file mode 100644
index 8b8bbc210c757916b671eb32799e4dcc83fa0d9b..0000000000000000000000000000000000000000
--- a/pkgs/desktops/kde-4.8/kdeedu/cantor.nix
+++ /dev/null
@@ -1,8 +0,0 @@
-{ kde, kdelibs, libspectre }:
-kde {
- buildInputs = [ kdelibs libspectre ];
-
- meta = {
- description = "KDE Frontend to Mathematical Software";
- };
-}
diff --git a/pkgs/desktops/kde-4.8/kdeedu/kalgebra.nix b/pkgs/desktops/kde-4.8/kdeedu/kalgebra.nix
deleted file mode 100644
index 3675c3a225f41b32a4c80e13fcb5450590067994..0000000000000000000000000000000000000000
--- a/pkgs/desktops/kde-4.8/kdeedu/kalgebra.nix
+++ /dev/null
@@ -1,8 +0,0 @@
-{ kde, kdelibs, libkdeedu, analitza }:
-kde {
- buildInputs = [ kdelibs libkdeedu analitza ];
-
- meta = {
- description = "2D and 3D Graph Calculator";
- };
-}
diff --git a/pkgs/desktops/kde-4.8/kdeedu/kalzium.nix b/pkgs/desktops/kde-4.8/kdeedu/kalzium.nix
deleted file mode 100644
index 69ab5dfc4736bb03008474a82d6a13aab016ec31..0000000000000000000000000000000000000000
--- a/pkgs/desktops/kde-4.8/kdeedu/kalzium.nix
+++ /dev/null
@@ -1,8 +0,0 @@
-{ kde, kdelibs, facile, ocaml, eigen, openbabel, avogadro }:
-kde {
- buildInputs = [ kdelibs facile ocaml eigen openbabel avogadro ];
-
- meta = {
- description = "Periodic Table of Elements";
- };
-}
diff --git a/pkgs/desktops/kde-4.8/kdeedu/kanagram.nix b/pkgs/desktops/kde-4.8/kdeedu/kanagram.nix
deleted file mode 100644
index 8759c96d78c466658713598faffd811a093e0925..0000000000000000000000000000000000000000
--- a/pkgs/desktops/kde-4.8/kdeedu/kanagram.nix
+++ /dev/null
@@ -1,8 +0,0 @@
-{ kde, kdelibs, libkdeedu }:
-kde {
- buildInputs = [ kdelibs libkdeedu ];
-
- meta = {
- description = "Letter Order Game";
- };
-}
diff --git a/pkgs/desktops/kde-4.8/kdeedu/kbruch.nix b/pkgs/desktops/kde-4.8/kdeedu/kbruch.nix
deleted file mode 100644
index dc50f1e85a37eb4429f0442c79874367fe8efa2e..0000000000000000000000000000000000000000
--- a/pkgs/desktops/kde-4.8/kdeedu/kbruch.nix
+++ /dev/null
@@ -1,8 +0,0 @@
-{ kde, kdelibs }:
-kde {
- buildInputs = [ kdelibs ];
-
- meta = {
- description = "Practice Fractions";
- };
-}
diff --git a/pkgs/desktops/kde-4.8/kdeedu/kgeography.nix b/pkgs/desktops/kde-4.8/kdeedu/kgeography.nix
deleted file mode 100644
index bd8d27c8d6e20eb2d51ae931f53c60bf776f822d..0000000000000000000000000000000000000000
--- a/pkgs/desktops/kde-4.8/kdeedu/kgeography.nix
+++ /dev/null
@@ -1,8 +0,0 @@
-{ kde, kdelibs }:
-kde {
- buildInputs = [ kdelibs ];
-
- meta = {
- description = "Geography Trainer";
- };
-}
diff --git a/pkgs/desktops/kde-4.8/kdeedu/khangman.nix b/pkgs/desktops/kde-4.8/kdeedu/khangman.nix
deleted file mode 100644
index 997b50e906a2f0e17c715de1aca3f7e4e2fba1cb..0000000000000000000000000000000000000000
--- a/pkgs/desktops/kde-4.8/kdeedu/khangman.nix
+++ /dev/null
@@ -1,8 +0,0 @@
-{ kde, kdelibs, libkdeedu }:
-kde {
- buildInputs = [ kdelibs libkdeedu ];
-
- meta = {
- description = "KDE hangman game";
- };
-}
diff --git a/pkgs/desktops/kde-4.8/kdeedu/kig.nix b/pkgs/desktops/kde-4.8/kdeedu/kig.nix
deleted file mode 100644
index bd5ef67529cc871570687b9bfce04ddbda13f424..0000000000000000000000000000000000000000
--- a/pkgs/desktops/kde-4.8/kdeedu/kig.nix
+++ /dev/null
@@ -1,12 +0,0 @@
-{ kde, kdelibs, boost, python}:
-kde {
- buildInputs = [ kdelibs boost python ];
-
- cmakeFlags = ''
- -DBOOST_PYTHON_INCLUDES:PATH=${boost}/include;${python}/include/${python.libPrefix}
- -DBOOST_PYTHON_LIBS=boost_python;${python.libPrefix} -DKIG_ENABLE_PYTHON_SCRIPTING=1
- '';
- meta = {
- description = "KDE Interactive Geometry";
- };
-}
diff --git a/pkgs/desktops/kde-4.8/kdeedu/kiten.nix b/pkgs/desktops/kde-4.8/kdeedu/kiten.nix
deleted file mode 100644
index 939b7a9f77a25b000436715d6c4ff3f46f103f73..0000000000000000000000000000000000000000
--- a/pkgs/desktops/kde-4.8/kdeedu/kiten.nix
+++ /dev/null
@@ -1,9 +0,0 @@
-{ kde, kdelibs }:
-
-kde {
- buildInputs = [ kdelibs ];
-
- meta = {
- description = "Japanese Reference/Study Tool";
- };
-}
diff --git a/pkgs/desktops/kde-4.8/kdeedu/klettres.nix b/pkgs/desktops/kde-4.8/kdeedu/klettres.nix
deleted file mode 100644
index 7a0fa83078e347a70c84dcc79733c7c05a60b885..0000000000000000000000000000000000000000
--- a/pkgs/desktops/kde-4.8/kdeedu/klettres.nix
+++ /dev/null
@@ -1,9 +0,0 @@
-{ kde, kdelibs }:
-
-kde {
- buildInputs = [ kdelibs ];
-
- meta = {
- description = "A KDE alphabet tutorial";
- };
-}
diff --git a/pkgs/desktops/kde-4.8/kdeedu/kmplot.nix b/pkgs/desktops/kde-4.8/kdeedu/kmplot.nix
deleted file mode 100644
index 18458cf6f0bffe394a71ed73cf2986d7f63e96b1..0000000000000000000000000000000000000000
--- a/pkgs/desktops/kde-4.8/kdeedu/kmplot.nix
+++ /dev/null
@@ -1,12 +0,0 @@
-{ kde, kdelibs }:
-
-kde {
- buildInputs = [ kdelibs ];
-
- meta = {
- description = "A KDE mathematical function plotter";
- kde = {
- name = "kmplot";
- };
- };
-}
diff --git a/pkgs/desktops/kde-4.8/kdeedu/kstars.nix b/pkgs/desktops/kde-4.8/kdeedu/kstars.nix
deleted file mode 100644
index 5b5a2d621de73638d8bdaac0917cb48cfedf47ac..0000000000000000000000000000000000000000
--- a/pkgs/desktops/kde-4.8/kdeedu/kstars.nix
+++ /dev/null
@@ -1,9 +0,0 @@
-{ kde, kdelibs, eigen, xplanet, indilib }:
-
-kde {
- buildInputs = [ kdelibs eigen xplanet indilib ];
-
- meta = {
- description = "A KDE graphical desktop planetarium";
- };
-}
diff --git a/pkgs/desktops/kde-4.8/kdeedu/ktouch.nix b/pkgs/desktops/kde-4.8/kdeedu/ktouch.nix
deleted file mode 100644
index 768be6f4367c7dc17cad43d90c08a1c3888c1aba..0000000000000000000000000000000000000000
--- a/pkgs/desktops/kde-4.8/kdeedu/ktouch.nix
+++ /dev/null
@@ -1,9 +0,0 @@
-{ kde, kdelibs }:
-
-kde {
- buildInputs = [ kdelibs ];
-
- meta = {
- description = "Touch Typing Tutor";
- };
-}
diff --git a/pkgs/desktops/kde-4.8/kdeedu/kturtle.nix b/pkgs/desktops/kde-4.8/kdeedu/kturtle.nix
deleted file mode 100644
index 1e1922b1410d9582a3c3199aea2b0f371983f274..0000000000000000000000000000000000000000
--- a/pkgs/desktops/kde-4.8/kdeedu/kturtle.nix
+++ /dev/null
@@ -1,9 +0,0 @@
-{ kde, kdelibs }:
-
-kde {
- buildInputs = [ kdelibs ];
-
- meta = {
- description = "Educational Programming Environment";
- };
-}
diff --git a/pkgs/desktops/kde-4.8/kdeedu/kwordquiz.nix b/pkgs/desktops/kde-4.8/kdeedu/kwordquiz.nix
deleted file mode 100644
index 1b33ba2e469f1c9e8337ec8f372dc9697840130a..0000000000000000000000000000000000000000
--- a/pkgs/desktops/kde-4.8/kdeedu/kwordquiz.nix
+++ /dev/null
@@ -1,9 +0,0 @@
-{ kde, kdelibs, libkdeedu }:
-
-kde {
- buildInputs = [ kdelibs libkdeedu ];
-
- meta = {
- description = "Flash Card Trainer";
- };
-}
diff --git a/pkgs/desktops/kde-4.8/kdeedu/libkdeedu.nix b/pkgs/desktops/kde-4.8/kdeedu/libkdeedu.nix
deleted file mode 100644
index def6c85fefe2fb7ef937de8e1aa1064db2434b28..0000000000000000000000000000000000000000
--- a/pkgs/desktops/kde-4.8/kdeedu/libkdeedu.nix
+++ /dev/null
@@ -1,8 +0,0 @@
-{ kde, kdelibs }:
-kde {
- buildInputs = [ kdelibs ];
-
- meta = {
- description = "Libraries used by KDE Education applications";
- };
-}
diff --git a/pkgs/desktops/kde-4.8/kdeedu/marble.nix b/pkgs/desktops/kde-4.8/kdeedu/marble.nix
deleted file mode 100644
index 8bd86c91094e2d4139ccb0ae45c800bc47c0b2fe..0000000000000000000000000000000000000000
--- a/pkgs/desktops/kde-4.8/kdeedu/marble.nix
+++ /dev/null
@@ -1,9 +0,0 @@
-{ kde, kdelibs, gpsd }:
-
-kde {
- buildInputs = [ kdelibs gpsd ];
-
- meta = {
- description = "Marble Virtual Globe";
- };
-}
diff --git a/pkgs/desktops/kde-4.8/kdeedu/parley.nix b/pkgs/desktops/kde-4.8/kdeedu/parley.nix
deleted file mode 100644
index eccd40a598f0d967a16c3c89546f091f55e4ca70..0000000000000000000000000000000000000000
--- a/pkgs/desktops/kde-4.8/kdeedu/parley.nix
+++ /dev/null
@@ -1,9 +0,0 @@
-{ kde, kdelibs, libkdeedu, libxml2, attica }:
-
-kde {
- buildInputs = [ kdelibs libkdeedu libxml2 attica ];
-
- meta = {
- description = "Vocabulary Trainer";
- };
-}
diff --git a/pkgs/desktops/kde-4.8/kdeedu/rocs.nix b/pkgs/desktops/kde-4.8/kdeedu/rocs.nix
deleted file mode 100644
index 91976b840011eaa0a635d5332942fdff47ae16ca..0000000000000000000000000000000000000000
--- a/pkgs/desktops/kde-4.8/kdeedu/rocs.nix
+++ /dev/null
@@ -1,14 +0,0 @@
-{ kde, kdelibs, boost }:
-
-kde {
- buildInputs = [ kdelibs (boost.override { enableExceptions = true; }) ];
-
- NIX_CFLAGS_COMPILE = "-fexceptions";
-
- meta = {
- description = "A KDE graph theory viewer";
- kde = {
- name = "rocs";
- };
- };
-}
diff --git a/pkgs/desktops/kde-4.8/kdeedu/step.nix b/pkgs/desktops/kde-4.8/kdeedu/step.nix
deleted file mode 100644
index fac9974baf18a4f4876b30810692770bbdb703db..0000000000000000000000000000000000000000
--- a/pkgs/desktops/kde-4.8/kdeedu/step.nix
+++ /dev/null
@@ -1,12 +0,0 @@
-{ kde, kdelibs, gsl, libqalculate, eigen }:
-
-kde {
- buildInputs = [ kdelibs gsl libqalculate eigen ];
-
- meta = {
- description = "A KDE interactive physical simulator";
- kde = {
- name = "step";
- };
- };
-}
diff --git a/pkgs/desktops/kde-4.8/kdegames.nix b/pkgs/desktops/kde-4.8/kdegames.nix
deleted file mode 100644
index dfca49be12fdb1a38a0c5e94b2aa61236c6dc263..0000000000000000000000000000000000000000
--- a/pkgs/desktops/kde-4.8/kdegames.nix
+++ /dev/null
@@ -1,20 +0,0 @@
-{ kde, kdelibs, qca2, twisted, pythonPackages, sip, makeWrapper, pykde4,
- openal, libsndfile, qhull, sqlite, pkgconfig }:
-
-kde rec {
- buildInputs = [ kdelibs qca2 pythonPackages.python pythonPackages.wrapPython
- openal libsndfile qhull sqlite ] ++ pythonPath;
-
- pythonPath = [ pythonPackages.twisted pykde4 ];
-
- nativeBuildInputs = [ pkgconfig ];
-
- # TODO: ggz
-
- postInstall = "wrapPythonPrograms";
-
- meta = {
- description = "KDE Games";
- license = "GPL";
- };
-}
diff --git a/pkgs/desktops/kde-4.8/kdegraphics/gwenview.nix b/pkgs/desktops/kde-4.8/kdegraphics/gwenview.nix
deleted file mode 100644
index c03c82469e660b3a26998e52f63a4bd3602f7312..0000000000000000000000000000000000000000
--- a/pkgs/desktops/kde-4.8/kdegraphics/gwenview.nix
+++ /dev/null
@@ -1,15 +0,0 @@
-{ kde, kdelibs, exiv2, shared_desktop_ontologies, kde_baseapps, libkipi
-, libjpeg, pkgconfig }:
-
-kde {
-
- buildInputs =
- [ kdelibs exiv2 shared_desktop_ontologies kde_baseapps libkipi libjpeg ];
-
- nativeBuildInputs = [ pkgconfig ];
-
- meta = {
- description = "Gwenview, the KDE image viewer";
- license = "GPLv2";
- };
-}
diff --git a/pkgs/desktops/kde-4.8/kdegraphics/kamera.nix b/pkgs/desktops/kde-4.8/kdegraphics/kamera.nix
deleted file mode 100644
index 70904b17c232bde4eb5785a63d7a5095a5ad05d8..0000000000000000000000000000000000000000
--- a/pkgs/desktops/kde-4.8/kdegraphics/kamera.nix
+++ /dev/null
@@ -1,10 +0,0 @@
-{ kde, kdelibs, libgphoto2 }:
-
-kde {
- buildInputs = [ kdelibs libgphoto2 ];
-
- meta = {
- description = "KDE camera interface library";
- license = "GPLv2";
- };
-}
diff --git a/pkgs/desktops/kde-4.8/kdegraphics/kcolorchooser.nix b/pkgs/desktops/kde-4.8/kdegraphics/kcolorchooser.nix
deleted file mode 100644
index 58528cb186bb2fe9fce4fc340ac06163b0ace657..0000000000000000000000000000000000000000
--- a/pkgs/desktops/kde-4.8/kdegraphics/kcolorchooser.nix
+++ /dev/null
@@ -1,10 +0,0 @@
-{ kde, kdelibs }:
-
-kde {
- buildInputs = [ kdelibs ];
-
- meta = {
- description = "A small utility to select a color";
- license = "GPLv2";
- };
-}
diff --git a/pkgs/desktops/kde-4.8/kdegraphics/kdegraphics-mobipocket.nix b/pkgs/desktops/kde-4.8/kdegraphics/kdegraphics-mobipocket.nix
deleted file mode 100644
index 2c2ba3796a2c357a7afe5e949e9eae1162c11a4b..0000000000000000000000000000000000000000
--- a/pkgs/desktops/kde-4.8/kdegraphics/kdegraphics-mobipocket.nix
+++ /dev/null
@@ -1,10 +0,0 @@
-{ kde, kdelibs, okular }:
-
-kde {
- buildInputs = [ kdelibs okular ];
-
- meta = {
- description = "A collection of plugins to handle mobipocket files";
- license = "GPLv2";
- };
-}
diff --git a/pkgs/desktops/kde-4.8/kdegraphics/kdegraphics-strigi-analyzer.nix b/pkgs/desktops/kde-4.8/kdegraphics/kdegraphics-strigi-analyzer.nix
deleted file mode 100644
index 6001a5f363db11804a5a299ee657523d3758ff4c..0000000000000000000000000000000000000000
--- a/pkgs/desktops/kde-4.8/kdegraphics/kdegraphics-strigi-analyzer.nix
+++ /dev/null
@@ -1,10 +0,0 @@
-{ kde, kdelibs }:
-
-kde {
- buildInputs = [ kdelibs ];
-
- meta = {
- description = "Strigi analyzers for various graphics file formats";
- license = "GPLv2";
- };
-}
diff --git a/pkgs/desktops/kde-4.8/kdegraphics/kdegraphics-thumbnailers.nix b/pkgs/desktops/kde-4.8/kdegraphics/kdegraphics-thumbnailers.nix
deleted file mode 100644
index 55bf8309b2a9faf9cedb342136cf7feb089ff764..0000000000000000000000000000000000000000
--- a/pkgs/desktops/kde-4.8/kdegraphics/kdegraphics-thumbnailers.nix
+++ /dev/null
@@ -1,10 +0,0 @@
-{ kde, kdelibs, libkexiv2, libkdcraw }:
-
-kde {
- buildInputs = [ kdelibs libkexiv2 libkdcraw ];
-
- meta = {
- description = "Thumbnailers for various graphics file formats";
- license = "GPLv2";
- };
-}
diff --git a/pkgs/desktops/kde-4.8/kdegraphics/kgamma.nix b/pkgs/desktops/kde-4.8/kdegraphics/kgamma.nix
deleted file mode 100644
index 28d9252187e0ebf046a8333ad36501b2d0edc5f5..0000000000000000000000000000000000000000
--- a/pkgs/desktops/kde-4.8/kdegraphics/kgamma.nix
+++ /dev/null
@@ -1,10 +0,0 @@
-{ kde, kdelibs, libXxf86vm }:
-
-kde {
- buildInputs = [ kdelibs libXxf86vm ];
-
- meta = {
- description = "KDE monitor calibration tool";
- license = "GPLv2";
- };
-}
diff --git a/pkgs/desktops/kde-4.8/kdegraphics/kolourpaint.nix b/pkgs/desktops/kde-4.8/kdegraphics/kolourpaint.nix
deleted file mode 100644
index 5276ec09f462f464103f702b5caf17495522862f..0000000000000000000000000000000000000000
--- a/pkgs/desktops/kde-4.8/kdegraphics/kolourpaint.nix
+++ /dev/null
@@ -1,10 +0,0 @@
-{ kde, kdelibs, qimageblitz }:
-
-kde {
- buildInputs = [ kdelibs qimageblitz ];
-
- meta = {
- description = "KDE paint program";
- license = "GPLv2";
- };
-}
diff --git a/pkgs/desktops/kde-4.8/kdegraphics/kruler.nix b/pkgs/desktops/kde-4.8/kdegraphics/kruler.nix
deleted file mode 100644
index c5c2c6e05d7c519fdceb654d351659de94c6cbbb..0000000000000000000000000000000000000000
--- a/pkgs/desktops/kde-4.8/kdegraphics/kruler.nix
+++ /dev/null
@@ -1,10 +0,0 @@
-{ kde, kdelibs }:
-
-kde {
- buildInputs = [ kdelibs ];
-
- meta = {
- description = "KDE screen ruler";
- license = "GPLv2";
- };
-}
diff --git a/pkgs/desktops/kde-4.8/kdegraphics/ksaneplugin.nix b/pkgs/desktops/kde-4.8/kdegraphics/ksaneplugin.nix
deleted file mode 100644
index 1381ed7dd266577441c62aac4043da0c52cc7a7f..0000000000000000000000000000000000000000
--- a/pkgs/desktops/kde-4.8/kdegraphics/ksaneplugin.nix
+++ /dev/null
@@ -1,10 +0,0 @@
-{ kde, kdelibs, libksane }:
-
-kde {
- buildInputs = [ kdelibs libksane ];
-
- meta = {
- description = "A KScan plugin that implements the scanning through libksane";
- license = "GPLv2";
- };
-}
diff --git a/pkgs/desktops/kde-4.8/kdegraphics/ksnapshot.nix b/pkgs/desktops/kde-4.8/kdegraphics/ksnapshot.nix
deleted file mode 100644
index f01a609e20de9d0af66f675a79cb1684cdd9bed1..0000000000000000000000000000000000000000
--- a/pkgs/desktops/kde-4.8/kdegraphics/ksnapshot.nix
+++ /dev/null
@@ -1,10 +0,0 @@
-{ kde, kdelibs, libkipi }:
-
-kde {
- buildInputs = [ kdelibs libkipi ];
-
- meta = {
- description = "KDE screenshot utility";
- license = "GPLv2";
- };
-}
diff --git a/pkgs/desktops/kde-4.8/kdegraphics/libkdcraw.nix b/pkgs/desktops/kde-4.8/kdegraphics/libkdcraw.nix
deleted file mode 100644
index 9810a98551ed8cd90da8e6bbab4b9a6516f1254c..0000000000000000000000000000000000000000
--- a/pkgs/desktops/kde-4.8/kdegraphics/libkdcraw.nix
+++ /dev/null
@@ -1,10 +0,0 @@
-{ kde, kdelibs, libjpeg, lcms1 }:
-
-kde {
- buildInputs = [ kdelibs libjpeg lcms1 ];
-
- meta = {
- description = "Library for decoding RAW images";
- license = "GPLv2";
- };
-}
diff --git a/pkgs/desktops/kde-4.8/kdegraphics/libkexiv2.nix b/pkgs/desktops/kde-4.8/kdegraphics/libkexiv2.nix
deleted file mode 100644
index 096b0a6e957bf4273b5e105476e2f4dae4e32903..0000000000000000000000000000000000000000
--- a/pkgs/desktops/kde-4.8/kdegraphics/libkexiv2.nix
+++ /dev/null
@@ -1,10 +0,0 @@
-{ kde, kdelibs, exiv2 }:
-
-kde {
- buildInputs = [ kdelibs exiv2 ];
-
- meta = {
- description = "Exiv2 support library";
- license = "GPLv2";
- };
-}
diff --git a/pkgs/desktops/kde-4.8/kdegraphics/libkipi.nix b/pkgs/desktops/kde-4.8/kdegraphics/libkipi.nix
deleted file mode 100644
index 6b16265e7a3e8fc45c1a34fdf9b4cde9e1968c26..0000000000000000000000000000000000000000
--- a/pkgs/desktops/kde-4.8/kdegraphics/libkipi.nix
+++ /dev/null
@@ -1,10 +0,0 @@
-{ kde, kdelibs }:
-
-kde {
- buildInputs = [ kdelibs ];
-
- meta = {
- description = "Interface library to kipi-plugins";
- license = "GPLv2";
- };
-}
diff --git a/pkgs/desktops/kde-4.8/kdegraphics/libksane.nix b/pkgs/desktops/kde-4.8/kdegraphics/libksane.nix
deleted file mode 100644
index b539eab38992f806af2b6a6838f4b519c2809ecc..0000000000000000000000000000000000000000
--- a/pkgs/desktops/kde-4.8/kdegraphics/libksane.nix
+++ /dev/null
@@ -1,10 +0,0 @@
-{ kde, kdelibs, saneBackends }:
-
-kde {
- buildInputs = [ kdelibs saneBackends ];
-
- meta = {
- description = "An image scanning library that provides a QWidget that contains all the logic needed to interface a sacanner";
- license = "GPLv2";
- };
-}
diff --git a/pkgs/desktops/kde-4.8/kdegraphics/okular.nix b/pkgs/desktops/kde-4.8/kdegraphics/okular.nix
deleted file mode 100644
index 0c5c7b49b17d11f5de7ad032fd3984923aef40ef..0000000000000000000000000000000000000000
--- a/pkgs/desktops/kde-4.8/kdegraphics/okular.nix
+++ /dev/null
@@ -1,12 +0,0 @@
-{ chmlib, djvulibre, ebook_tools, kde, kdelibs, libspectre, popplerQt4, qca2
-, qimageblitz, pkgconfig }:
-
-kde {
- buildInputs =
- [ chmlib djvulibre ebook_tools kdelibs libspectre popplerQt4 qca2 qimageblitz pkgconfig ];
-
- meta = {
- description = "Okular, the KDE document viewer";
- license = "GPLv2";
- };
-}
diff --git a/pkgs/desktops/kde-4.8/kdegraphics/svgpart.nix b/pkgs/desktops/kde-4.8/kdegraphics/svgpart.nix
deleted file mode 100644
index a344cc4b4b46395ee7978b81048b94f4bf2f9e5e..0000000000000000000000000000000000000000
--- a/pkgs/desktops/kde-4.8/kdegraphics/svgpart.nix
+++ /dev/null
@@ -1,10 +0,0 @@
-{ kde, kdelibs }:
-
-kde {
- buildInputs = [ kdelibs ];
-
- meta = {
- description = "SVG KPart";
- license = "GPLv2";
- };
-}
diff --git a/pkgs/desktops/kde-4.8/kdelibs.nix b/pkgs/desktops/kde-4.8/kdelibs.nix
deleted file mode 100644
index 0e7c9cfdbea0381fb0450f92303fb59666c8a6a4..0000000000000000000000000000000000000000
--- a/pkgs/desktops/kde-4.8/kdelibs.nix
+++ /dev/null
@@ -1,38 +0,0 @@
-{ kde, gcc, cmake, perl
-, qt4, bzip2, pcre, fam, libxml2, libxslt, shared_mime_info, giflib, jasper
-, openexr, avahi, kerberos, acl, attr, shared_desktop_ontologies, libXScrnSaver
-, automoc4, strigi, soprano, qca2, attica, enchant, libdbusmenu_qt
-, docbook_xml_dtd_42, docbook_xsl, polkit_qt_1
-, getopt, udev, herqq, phonon, libjpeg, xz
-}:
-
-kde {
- buildInputs =
- [ acl attr attica avahi bzip2 enchant fam getopt giflib herqq jasper
- libdbusmenu_qt libXScrnSaver libxslt pcre polkit_qt_1 qca2
- shared_desktop_ontologies xz udev libxml2 libjpeg kerberos
- ];
-
- propagatedBuildInputs = [ qt4 soprano strigi phonon ];
-
- propagatedNativeBuildInputs = [ automoc4 cmake perl shared_mime_info ];
-
- # TODO: make sonnet plugins (dictionaries) really work.
- # There are a few hardcoded paths.
- # Let kdelibs find openexr
- # Split plugins from libs?
-
- patches = [ ./files/polkit-install.patch ];
-
- # cmake fails to find acl.h because of C++-style comment
- # TODO: OpenEXR
- cmakeFlags = [
- "-DDOCBOOKXML_CURRENTDTD_DIR=${docbook_xml_dtd_42}/xml/dtd/docbook"
- "-DDOCBOOKXSL_DIR=${docbook_xsl}/xml/xsl/docbook"
- ];
-
- meta = {
- description = "KDE libraries";
- license = "LGPL";
- };
-}
diff --git a/pkgs/desktops/kde-4.8/kdemultimedia.nix b/pkgs/desktops/kde-4.8/kdemultimedia.nix
deleted file mode 100644
index 09efeb336dce13f2ac70cb479887ea7cfb28a59f..0000000000000000000000000000000000000000
--- a/pkgs/desktops/kde-4.8/kdemultimedia.nix
+++ /dev/null
@@ -1,15 +0,0 @@
-{ kde, alsaLib, libvorbis, taglib, flac, cdparanoia, lame, kdelibs, ffmpeg,
- libmusicbrainz3, libtunepimp, pulseaudio }:
-
-kde {
-
- buildInputs =
- [ kdelibs cdparanoia taglib libvorbis libmusicbrainz3 libtunepimp ffmpeg
- flac lame pulseaudio
- ];
-
- meta = {
- description = "KDE multimedia programs such as a movie player and volume utility";
- license = "GPL";
- };
-}
diff --git a/pkgs/desktops/kde-4.8/kdenetwork/FindmsiLBC.cmake b/pkgs/desktops/kde-4.8/kdenetwork/FindmsiLBC.cmake
deleted file mode 100644
index c40b0bed3105da4b02c1c0f656b663d1965b43ac..0000000000000000000000000000000000000000
--- a/pkgs/desktops/kde-4.8/kdenetwork/FindmsiLBC.cmake
+++ /dev/null
@@ -1,19 +0,0 @@
-# cmake macro to test msiLBC
-
-# Copyright (c) 2009-2010 Pali Rohár
-#
-# MSILBC_FOUND
-# MSILBC_LIBRARY
-
-include ( FindPackageHandleStandardArgs )
-
-if ( MSILBC_LIBRARY )
- set ( MSILBC_FOUND true )
- set ( msiLBC_FIND_QUIETLY true )
-else ( MSILBC_LIBRARY )
- find_library ( MSILBC_LIBRARY NAMES msilbc
- PATH_SUFFIXES mediastreamer/plugins)
-endif ( MSILBC_LIBRARY )
-
-find_package_handle_standard_args ( msiLBC DEFAULT_MSG MSILBC_LIBRARY )
-mark_as_advanced ( MSILBC_LIBRARY )
diff --git a/pkgs/desktops/kde-4.8/kdenetwork/filesharing.nix b/pkgs/desktops/kde-4.8/kdenetwork/filesharing.nix
deleted file mode 100644
index 2f32f4d6b2cd6b28235b244a3ffa8ac83d9a455f..0000000000000000000000000000000000000000
--- a/pkgs/desktops/kde-4.8/kdenetwork/filesharing.nix
+++ /dev/null
@@ -1,7 +0,0 @@
-{ kde, kdelibs }:
-
-kde {
- buildInputs = [ kdelibs ];
-
- patches = [ ./kdenetwork.patch ];
-}
diff --git a/pkgs/desktops/kde-4.8/kdenetwork/kdenetwork.patch b/pkgs/desktops/kde-4.8/kdenetwork/kdenetwork.patch
deleted file mode 100644
index ebadbfad9bac453837b27e3e95406c967658cbb7..0000000000000000000000000000000000000000
--- a/pkgs/desktops/kde-4.8/kdenetwork/kdenetwork.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-diff -r -u kdenetwork-4.7.1.orig/CMakeLists.txt kdenetwork-4.7.1/CMakeLists.txt
---- kdenetwork-4.7.1.orig/CMakeLists.txt 2011-03-29 15:25:42.174521812 +0400
-+++ kdenetwork-4.7.1/CMakeLists.txt 2011-03-29 15:27:43.268140322 +0400
-@@ -28,7 +28,8 @@
- set(CMAKE_REQUIRED_INCLUDES ${KDEWIN_INCLUDES} )
- endif (WIN32)
-
--find_package(KdepimLibs REQUIRED)
-+macro_optional_find_package(KdepimLibs)
-+macro_log_feature(KDEPIMLIBS_FOUND "KDEPimLibs" "KDE pim-related libraries" "http://pim.kde.org.org/" FALSE "" "Required for Kopete")
- # find_package(X11VidMode) not used at this time
-
- # NX support is not ready for KDE 4.2; disabled (uwolfer)
-@@ -79,7 +80,9 @@
- macro_optional_add_subdirectory(kfile-plugins)
- macro_optional_add_subdirectory(kget)
-
--macro_optional_add_subdirectory(kopete)
-+if(KDEPIMLIBS_FOUND)
-+ macro_optional_add_subdirectory(kopete)
-+endif(KDEPIMLIBS_FOUND)
-
- if(Q_WS_X11)
- macro_optional_add_subdirectory(krdc)
diff --git a/pkgs/desktops/kde-4.8/kdenetwork/kdnssd.nix b/pkgs/desktops/kde-4.8/kdenetwork/kdnssd.nix
deleted file mode 100644
index 2f32f4d6b2cd6b28235b244a3ffa8ac83d9a455f..0000000000000000000000000000000000000000
--- a/pkgs/desktops/kde-4.8/kdenetwork/kdnssd.nix
+++ /dev/null
@@ -1,7 +0,0 @@
-{ kde, kdelibs }:
-
-kde {
- buildInputs = [ kdelibs ];
-
- patches = [ ./kdenetwork.patch ];
-}
diff --git a/pkgs/desktops/kde-4.8/kdenetwork/kfile-plugins.nix b/pkgs/desktops/kde-4.8/kdenetwork/kfile-plugins.nix
deleted file mode 100644
index f90fd3560796f343214c8122b1d652e13ecc75d8..0000000000000000000000000000000000000000
--- a/pkgs/desktops/kde-4.8/kdenetwork/kfile-plugins.nix
+++ /dev/null
@@ -1,11 +0,0 @@
-{ kde, kdelibs, boost }:
-
-kde {
- name = "strigi-analyzer-torrent";
-
- buildInputs = [ kdelibs boost ];
-
- preConfigure = "mv -v strigi-analyzer kfile-plugins";
-
- patches = [ ./kdenetwork.patch ];
-}
diff --git a/pkgs/desktops/kde-4.8/kdenetwork/kget.nix b/pkgs/desktops/kde-4.8/kdenetwork/kget.nix
deleted file mode 100644
index 2381a2459e60b2dfa295df3a032ef6007c2125b3..0000000000000000000000000000000000000000
--- a/pkgs/desktops/kde-4.8/kdenetwork/kget.nix
+++ /dev/null
@@ -1,13 +0,0 @@
-{ kde, kdelibs, libktorrent, kde_workspace, kdepimlibs, sqlite
-, shared_desktop_ontologies, kde_baseapps, gpgme, boost, libmms, qca2 }:
-
-kde {
- buildInputs =
- [ kdelibs libktorrent kde_workspace shared_desktop_ontologies kdepimlibs
- kde_baseapps gpgme boost libmms qca2 sqlite
- ];
-
- KDEDIRS = libktorrent;
-
- patches = [ ./kdenetwork.patch ];
-}
diff --git a/pkgs/desktops/kde-4.8/kdenetwork/kopete.nix b/pkgs/desktops/kde-4.8/kdenetwork/kopete.nix
deleted file mode 100644
index d1d9f0c8e03eaef06972229486227f0d604aaeb3..0000000000000000000000000000000000000000
--- a/pkgs/desktops/kde-4.8/kdenetwork/kopete.nix
+++ /dev/null
@@ -1,24 +0,0 @@
-{ kde, kdelibs, speex, libmsn, libotr, kdepimlibs, qimageblitz, libktorrent,
- jasper, libidn, mediastreamer, msilbc, pkgconfig, libxml2, libxslt, giflib,
- libgadu, boost, qca2, gpgme, sqlite }:
-
-kde {
- buildInputs = [ kdelibs speex libmsn libotr kdepimlibs qimageblitz libktorrent
- jasper libidn mediastreamer msilbc libxml2 libxslt giflib libgadu boost qca2
- gpgme sqlite ];
-
- nativeBuildInputs = [ pkgconfig ];
-
- KDEDIRS = libktorrent;
-
- patchPhase =
- ''
- cp -v ${./FindmsiLBC.cmake} kopete/cmake/modules/FindmsiLBC.cmake
- '';
-
- cmakeFlags = [ "-DBUILD_skypebuttons=TRUE" ];
-
- meta = {
- description = "A KDE multi-protocol IM client";
- };
-}
diff --git a/pkgs/desktops/kde-4.8/kdenetwork/kppp.nix b/pkgs/desktops/kde-4.8/kdenetwork/kppp.nix
deleted file mode 100644
index 2f32f4d6b2cd6b28235b244a3ffa8ac83d9a455f..0000000000000000000000000000000000000000
--- a/pkgs/desktops/kde-4.8/kdenetwork/kppp.nix
+++ /dev/null
@@ -1,7 +0,0 @@
-{ kde, kdelibs }:
-
-kde {
- buildInputs = [ kdelibs ];
-
- patches = [ ./kdenetwork.patch ];
-}
diff --git a/pkgs/desktops/kde-4.8/kdenetwork/krdc.nix b/pkgs/desktops/kde-4.8/kdenetwork/krdc.nix
deleted file mode 100644
index 40ef91d543392c92c67ced85291a087cfdbbb3bb..0000000000000000000000000000000000000000
--- a/pkgs/desktops/kde-4.8/kdenetwork/krdc.nix
+++ /dev/null
@@ -1,7 +0,0 @@
-{ kde, kdelibs, libvncserver, libjpeg }:
-
-kde {
- buildInputs = [ kdelibs libvncserver libjpeg ];
-
- patches = [ ./kdenetwork.patch ];
-}
diff --git a/pkgs/desktops/kde-4.8/kdenetwork/krfb.nix b/pkgs/desktops/kde-4.8/kdenetwork/krfb.nix
deleted file mode 100644
index 80013f430d3c3138623fd233c4630713a62aae9c..0000000000000000000000000000000000000000
--- a/pkgs/desktops/kde-4.8/kdenetwork/krfb.nix
+++ /dev/null
@@ -1,7 +0,0 @@
-{ kde, kdelibs, libvncserver, libXdamage, libXtst }:
-
-kde {
- buildInputs = [ kdelibs libvncserver libXdamage libXtst];
-
- patches = [ ./kdenetwork.patch ];
-}
diff --git a/pkgs/desktops/kde-4.8/kdepim-runtime.nix b/pkgs/desktops/kde-4.8/kdepim-runtime.nix
deleted file mode 100644
index ef637f3f075b1e043984ed4ea9193f0340622c34..0000000000000000000000000000000000000000
--- a/pkgs/desktops/kde-4.8/kdepim-runtime.nix
+++ /dev/null
@@ -1,12 +0,0 @@
-{ kde, fetchurl, cmake, kdelibs, libxml2, libxslt, boost, kdepimlibs, akonadi
-, shared_desktop_ontologies }:
-
-kde {
- buildInputs = [ kdepimlibs akonadi boost shared_desktop_ontologies libxml2
- libxslt ];
-
- meta = {
- description = "KDE PIM runtime";
- license = "GPL";
- };
-}
diff --git a/pkgs/desktops/kde-4.8/kdepim.nix b/pkgs/desktops/kde-4.8/kdepim.nix
deleted file mode 100644
index 6d99a801d1c1c876425c5aee217946a7551c66bc..0000000000000000000000000000000000000000
--- a/pkgs/desktops/kde-4.8/kdepim.nix
+++ /dev/null
@@ -1,21 +0,0 @@
-{ kde, boost, gpgme, libassuan, libxml2, libxslt, kdepimlibs, kdepim_runtime
-, akonadi, shared_desktop_ontologies, cyrus_sasl, grantlee, prison }:
-
-kde {
-
- buildInputs =
- [ kdepimlibs boost akonadi shared_desktop_ontologies libxml2
- libxslt cyrus_sasl gpgme libassuan grantlee prison
- ];
-
- passthru.propagatedUserEnvPackages = [ akonadi kdepimlibs kdepim_runtime ];
-
- meta = {
- description = "KDE PIM tools";
- longDescription = ''
- Contains various personal information management tools for KDE, such as an organizer.
- '';
- license = "GPL";
- homepage = http://pim.kde.org;
- };
-}
diff --git a/pkgs/desktops/kde-4.8/kdepimlibs.nix b/pkgs/desktops/kde-4.8/kdepimlibs.nix
deleted file mode 100644
index 736508eaf0f37d7c20b8c9eb9bd8dfda846b2533..0000000000000000000000000000000000000000
--- a/pkgs/desktops/kde-4.8/kdepimlibs.nix
+++ /dev/null
@@ -1,16 +0,0 @@
-{ kde, boost, cyrus_sasl, gpgme, libical, openldap, shared_mime_info
-, kdelibs, akonadi, shared_desktop_ontologies, libxml2, libxslt, prison }:
-
-kde {
- buildInputs =
- [ boost gpgme shared_desktop_ontologies libical libxml2 libxslt
- openldap cyrus_sasl akonadi prison
- ];
-
- propagatedBuildInputs = [ kdelibs ];
-
- meta = {
- description = "KDE PIM libraries";
- license = "LGPL";
- };
-}
diff --git a/pkgs/desktops/kde-4.8/kdeplasma-addons.nix b/pkgs/desktops/kde-4.8/kdeplasma-addons.nix
deleted file mode 100644
index a69002bff28ba45cf43dedbe1c639fa21aaa2196..0000000000000000000000000000000000000000
--- a/pkgs/desktops/kde-4.8/kdeplasma-addons.nix
+++ /dev/null
@@ -1,20 +0,0 @@
-{ kde, kdelibs, marble, shared_desktop_ontologies, pkgconfig
-, boost, eigen, kde_workspace, attica, python, qca2, qimageblitz
-, kdepimlibs, libkexiv2, libqalculate, libXtst, libdbusmenu_qt }:
-# TODO: qwt, scim
-
-kde {
-
- KDEDIRS=marble;
-
- buildInputs = [ kdelibs boost eigen kde_workspace
- attica python qca2 qimageblitz kdepimlibs libdbusmenu_qt
- libqalculate libXtst shared_desktop_ontologies marble libkexiv2];
-
- nativeBuildInputs = [ pkgconfig ];
-
- meta = {
- description = "KDE Plasma Addons";
- license = "GPL";
- };
-}
diff --git a/pkgs/desktops/kde-4.8/kdesdk/cervisia.nix b/pkgs/desktops/kde-4.8/kdesdk/cervisia.nix
deleted file mode 100644
index 1dabe46cd429db728ee57656851479b99ef50b12..0000000000000000000000000000000000000000
--- a/pkgs/desktops/kde-4.8/kdesdk/cervisia.nix
+++ /dev/null
@@ -1,9 +0,0 @@
-{ kde, kdelibs }:
-
-kde {
- buildInputs = [ kdelibs ];
-
- meta = {
- description = "A KDE CVS frontend";
- };
-}
diff --git a/pkgs/desktops/kde-4.8/kdesdk/dolphin-plugins-bazaar.nix b/pkgs/desktops/kde-4.8/kdesdk/dolphin-plugins-bazaar.nix
deleted file mode 100644
index 8032b89ff54c36bef125f0acc5ab7ed92a2d4599..0000000000000000000000000000000000000000
--- a/pkgs/desktops/kde-4.8/kdesdk/dolphin-plugins-bazaar.nix
+++ /dev/null
@@ -1,10 +0,0 @@
-{ kde, kdelibs, kde_baseapps }:
-
-kde {
- # Needs kdebase for libkonq
- buildInputs = [ kdelibs kde_baseapps ];
-
- meta = {
- description = "Svn plugin for dolphin";
- };
-}
diff --git a/pkgs/desktops/kde-4.8/kdesdk/dolphin-plugins-git.nix b/pkgs/desktops/kde-4.8/kdesdk/dolphin-plugins-git.nix
deleted file mode 100644
index df4a0856c6b0bef52275f84fdc5ec93f3fa10fd2..0000000000000000000000000000000000000000
--- a/pkgs/desktops/kde-4.8/kdesdk/dolphin-plugins-git.nix
+++ /dev/null
@@ -1,10 +0,0 @@
-{ kde, kdelibs, kde_baseapps }:
-
-kde {
- # Needs kdebase for libkonq
- buildInputs = [ kdelibs kde_baseapps ];
-
- meta = {
- description = "Git plugin for dolphin";
- };
-}
diff --git a/pkgs/desktops/kde-4.8/kdesdk/dolphin-plugins-hg.nix b/pkgs/desktops/kde-4.8/kdesdk/dolphin-plugins-hg.nix
deleted file mode 100644
index 8032b89ff54c36bef125f0acc5ab7ed92a2d4599..0000000000000000000000000000000000000000
--- a/pkgs/desktops/kde-4.8/kdesdk/dolphin-plugins-hg.nix
+++ /dev/null
@@ -1,10 +0,0 @@
-{ kde, kdelibs, kde_baseapps }:
-
-kde {
- # Needs kdebase for libkonq
- buildInputs = [ kdelibs kde_baseapps ];
-
- meta = {
- description = "Svn plugin for dolphin";
- };
-}
diff --git a/pkgs/desktops/kde-4.8/kdesdk/dolphin-plugins-svn.nix b/pkgs/desktops/kde-4.8/kdesdk/dolphin-plugins-svn.nix
deleted file mode 100644
index 8032b89ff54c36bef125f0acc5ab7ed92a2d4599..0000000000000000000000000000000000000000
--- a/pkgs/desktops/kde-4.8/kdesdk/dolphin-plugins-svn.nix
+++ /dev/null
@@ -1,10 +0,0 @@
-{ kde, kdelibs, kde_baseapps }:
-
-kde {
- # Needs kdebase for libkonq
- buildInputs = [ kdelibs kde_baseapps ];
-
- meta = {
- description = "Svn plugin for dolphin";
- };
-}
diff --git a/pkgs/desktops/kde-4.8/kdesdk/find-svn.patch b/pkgs/desktops/kde-4.8/kdesdk/find-svn.patch
deleted file mode 100644
index f6f4df942dd9a2a76061ad0d2f9ccff0289a0a0e..0000000000000000000000000000000000000000
--- a/pkgs/desktops/kde-4.8/kdesdk/find-svn.patch
+++ /dev/null
@@ -1,57 +0,0 @@
-diff --git a/cmake/modules/FindSVN.cmake b/cmake/modules/FindSVN.cmake
-index 59bcb96..2eac05d 100644
---- a/cmake/modules/FindSVN.cmake
-+++ b/cmake/modules/FindSVN.cmake
-@@ -17,6 +17,9 @@ FIND_PROGRAM(SVNCONFIG_EXECUTABLE NAMES svn-config PATHS
- FIND_PROGRAM(APRCONFIG_EXECUTABLE NAMES apr-1-config apr-config PATHS
- /usr/local/apr/bin
- )
-+find_program(APUCONFIG_EXECUTABLE NAMES apu-1-config apu-config PATHS
-+ /usr/local/apr/bin
-+)
-
- if(SVNCONFIG_EXECUTABLE)
-
-@@ -56,15 +59,8 @@ else(SVNCONFIG_EXECUTABLE)
- set(SVN_INCLUDES ${SVN_INCLUDES} ${_INCLUDES})
- else(APRCONFIG_EXECUTABLE)
- FIND_PATH(_INCLUDES apr_pools.h
-- ${SVN_INCLUDES}/apr-0/
-- ${SVN_INCLUDES}/apr-1/
-- ${SVN_INCLUDES}/apr-1.0/
-- /usr/include/apr-0/
-- /usr/include/apr-1/
-- /usr/include/apr-1.0/
-- /usr/local/include/apr-0/
-- /usr/local/include/apr-1/
-- /usr/local/include/apr-1.0/
-+ HINTS ${SVN_INCLUDES}
-+ SUFFIXES apr-0 apr-1 apr-1.0
- )
- if(_INCLUDES)
- set(SVN_INCLUDES ${SVN_INCLUDES} ${_INCLUDES})
-@@ -72,6 +69,24 @@ else(SVNCONFIG_EXECUTABLE)
- set(SVN_FOUND FALSE) # no apr == can't compile!
- endif(_INCLUDES)
- endif(APRCONFIG_EXECUTABLE)
-+
-+ # Use apu-config if it exists
-+ if(APUCONFIG_EXECUTABLE)
-+ EXEC_PROGRAM(${APUCONFIG_EXECUTABLE} ARGS --includes RETURN_VALUE _return_VALUE OUTPUT_VARIABLE _INCLUDES)
-+ string(REPLACE "-I" "" _INCLUDES ${_INCLUDES})
-+ string(REPLACE " " ";" _INCLUDES ${_INCLUDES})
-+ set(SVN_INCLUDES ${SVN_INCLUDES} ${_INCLUDES})
-+ else(APUCONFIG_EXECUTABLE)
-+ FIND_PATH(_INCLUDES apu.h
-+ HINTS ${SVN_INCLUDES}
-+ SUFFIXES apr-0 apr-1 apr-1.0
-+ )
-+ if(_INCLUDES)
-+ set(SVN_INCLUDES ${SVN_INCLUDES} ${_INCLUDES})
-+ else(_INCLUDES)
-+ set(SVN_FOUND FALSE) # no apr == can't compile!
-+ endif(_INCLUDES)
-+ endif(APUCONFIG_EXECUTABLE)
- FIND_LIBRARY(SVN_LIBRARIES NAMES svn_client-1)
- if(SVN_LIBRARIES)
- FIND_LIBRARY(_LIBRARIES NAMES svn_subr-1)
diff --git a/pkgs/desktops/kde-4.8/kdesdk/kapptemplate.nix b/pkgs/desktops/kde-4.8/kdesdk/kapptemplate.nix
deleted file mode 100644
index 391536248dd3df8f120e30c91b4f2fb2823bc117..0000000000000000000000000000000000000000
--- a/pkgs/desktops/kde-4.8/kdesdk/kapptemplate.nix
+++ /dev/null
@@ -1,9 +0,0 @@
-{ kde, kdelibs }:
-
-kde {
- buildInputs = [ kdelibs ];
-
- meta = {
- description = "A KDE 4 project template generator";
- };
-}
diff --git a/pkgs/desktops/kde-4.8/kdesdk/kcachegrind.nix b/pkgs/desktops/kde-4.8/kdesdk/kcachegrind.nix
deleted file mode 100644
index 65d410cca48ddefc517a3512f0f38380a22364f1..0000000000000000000000000000000000000000
--- a/pkgs/desktops/kde-4.8/kdesdk/kcachegrind.nix
+++ /dev/null
@@ -1,9 +0,0 @@
-{ kde, kdelibs }:
-
-kde {
- buildInputs = [ kdelibs ];
-
- meta = {
- description = "KDE Frontend for Callgrind/Cachegrind";
- };
-}
diff --git a/pkgs/desktops/kde-4.8/kdesdk/kdeaccounts-plugin.nix b/pkgs/desktops/kde-4.8/kdesdk/kdeaccounts-plugin.nix
deleted file mode 100644
index 7e170ca2a2c2ff02ebf63b6a9943801fa2d5c150..0000000000000000000000000000000000000000
--- a/pkgs/desktops/kde-4.8/kdesdk/kdeaccounts-plugin.nix
+++ /dev/null
@@ -1,9 +0,0 @@
-{ kde, kdelibs, kdepimlibs }:
-
-kde {
- buildInputs = [ kdelibs kdepimlibs ];
-
- meta = {
- description = "KDE accounts akonadi agent";
- };
-}
diff --git a/pkgs/desktops/kde-4.8/kdesdk/kioslave-perldoc.nix b/pkgs/desktops/kde-4.8/kdesdk/kioslave-perldoc.nix
deleted file mode 100644
index 6a10bdf7c4bc71870c3ea87ca0fe9d0e99e74dd7..0000000000000000000000000000000000000000
--- a/pkgs/desktops/kde-4.8/kdesdk/kioslave-perldoc.nix
+++ /dev/null
@@ -1,11 +0,0 @@
-{ kde, kdelibs, perl }:
-
-kde {
- buildInputs = [ kdelibs perl ];
-
- cmakeFlags = [ "-DBUILD_perldoc=ON" ];
-
- meta = {
- description = "perldoc: kioslave";
- };
-}
diff --git a/pkgs/desktops/kde-4.8/kdesdk/kioslave-svn.nix b/pkgs/desktops/kde-4.8/kdesdk/kioslave-svn.nix
deleted file mode 100644
index db0bd27094b5130c1799f2d88f40e3488156eeb7..0000000000000000000000000000000000000000
--- a/pkgs/desktops/kde-4.8/kdesdk/kioslave-svn.nix
+++ /dev/null
@@ -1,11 +0,0 @@
-{ kde, kdelibs, subversionClient, apr, aprutil }:
-
-kde {
- buildInputs = [ kdelibs subversionClient apr aprutil ];
-
- patches = [ ./find-svn.patch ];
-
- meta = {
- description = "Subversion kioslave";
- };
-}
diff --git a/pkgs/desktops/kde-4.8/kdesdk/kmtrace.nix b/pkgs/desktops/kde-4.8/kdesdk/kmtrace.nix
deleted file mode 100644
index d580f7fb6911d61b5785e88202c0d85996b32222..0000000000000000000000000000000000000000
--- a/pkgs/desktops/kde-4.8/kdesdk/kmtrace.nix
+++ /dev/null
@@ -1,11 +0,0 @@
-{ kde, kdelibs, gcc }:
-
-kde {
- buildInputs = [ kdelibs ];
-
- preConfigure = "export CMAKE_PREFIX_PATH=$CMAKE_PREFIX_PATH:${gcc}:${gcc.gcc}";
-
- meta = {
- description = "KDE mtrace-based malloc debugger";
- };
-}
diff --git a/pkgs/desktops/kde-4.8/kdesdk/kompare.nix b/pkgs/desktops/kde-4.8/kdesdk/kompare.nix
deleted file mode 100644
index 1ddb4b8ea5b9e1751d86ebe7cb096eca50415d59..0000000000000000000000000000000000000000
--- a/pkgs/desktops/kde-4.8/kdesdk/kompare.nix
+++ /dev/null
@@ -1,9 +0,0 @@
-{ kde, kdelibs }:
-
-kde {
- buildInputs = [ kdelibs ];
-
- meta = {
- description = "A program to view the differences between files and optionally generate a diff";
- };
-}
diff --git a/pkgs/desktops/kde-4.8/kdesdk/kpartloader.nix b/pkgs/desktops/kde-4.8/kdesdk/kpartloader.nix
deleted file mode 100644
index e7790d33c90cd6e7a49c947c4b07af862684f3c3..0000000000000000000000000000000000000000
--- a/pkgs/desktops/kde-4.8/kdesdk/kpartloader.nix
+++ /dev/null
@@ -1,9 +0,0 @@
-{ kde, kdelibs }:
-
-kde {
- buildInputs = [ kdelibs ];
-
- meta = {
- description = "A test application for KParts";
- };
-}
diff --git a/pkgs/desktops/kde-4.8/kdesdk/kprofilemethod.nix b/pkgs/desktops/kde-4.8/kdesdk/kprofilemethod.nix
deleted file mode 100644
index 5a6693f2f5d8d048e6990b1f9da7caeeaa5d7c0a..0000000000000000000000000000000000000000
--- a/pkgs/desktops/kde-4.8/kdesdk/kprofilemethod.nix
+++ /dev/null
@@ -1,9 +0,0 @@
-{ kde, kdelibs }:
-
-kde {
- buildInputs = [ kdelibs ];
-
- meta = {
- description = "A macro for profiling using QTime";
- };
-}
diff --git a/pkgs/desktops/kde-4.8/kdesdk/kstartperf.nix b/pkgs/desktops/kde-4.8/kdesdk/kstartperf.nix
deleted file mode 100644
index 0c8259cd31f5bacfd5d0487e3b6eaf66ba4ed1e0..0000000000000000000000000000000000000000
--- a/pkgs/desktops/kde-4.8/kdesdk/kstartperf.nix
+++ /dev/null
@@ -1,9 +0,0 @@
-{ kde, kdelibs, libtool }:
-
-kde {
- buildInputs = [ kdelibs libtool ];
-
- meta = {
- description = "Measures start up time of a KDE application";
- };
-}
diff --git a/pkgs/desktops/kde-4.8/kdesdk/kuiviewer.nix b/pkgs/desktops/kde-4.8/kdesdk/kuiviewer.nix
deleted file mode 100644
index 7c5089dcd37f22ed405ee3e07c30d8d4a894a1ee..0000000000000000000000000000000000000000
--- a/pkgs/desktops/kde-4.8/kdesdk/kuiviewer.nix
+++ /dev/null
@@ -1,9 +0,0 @@
-{ kde, kdelibs }:
-
-kde {
- buildInputs = [ kdelibs ];
-
- meta = {
- description = "Displays Qt Designer's UI files";
- };
-}
diff --git a/pkgs/desktops/kde-4.8/kdesdk/lokalize.nix b/pkgs/desktops/kde-4.8/kdesdk/lokalize.nix
deleted file mode 100644
index 1565426eb1fc25ef993258d166a863a47e3a7e47..0000000000000000000000000000000000000000
--- a/pkgs/desktops/kde-4.8/kdesdk/lokalize.nix
+++ /dev/null
@@ -1,13 +0,0 @@
-{ kde, kdelibs, hunspell }:
-
-kde {
- buildInputs = [ kdelibs hunspell ];
-
- meta = {
- description = "KDE 4 Computer-aided translation system";
- longDescription = ''
- Computer-aided translation system.
- Do not translate what had already been translated.
- '';
- };
-}
diff --git a/pkgs/desktops/kde-4.8/kdesdk/okteta.nix b/pkgs/desktops/kde-4.8/kdesdk/okteta.nix
deleted file mode 100644
index 058636596ad81eafff72bddf60b3dba4c15e46fb..0000000000000000000000000000000000000000
--- a/pkgs/desktops/kde-4.8/kdesdk/okteta.nix
+++ /dev/null
@@ -1,13 +0,0 @@
-{ kde, kdelibs, qca2 }:
-
-kde {
- buildInputs = [ kdelibs qca2 ];
-
-# TODO: Look what does -DBUILD_mobile add
-
- enableParallelBuilding = false;
-
- meta = {
- description = "KDE byte editor";
- };
-}
diff --git a/pkgs/desktops/kde-4.8/kdesdk/poxml.nix b/pkgs/desktops/kde-4.8/kdesdk/poxml.nix
deleted file mode 100644
index 1ab9ed49df566d630d6d905e2469385859906a4d..0000000000000000000000000000000000000000
--- a/pkgs/desktops/kde-4.8/kdesdk/poxml.nix
+++ /dev/null
@@ -1,9 +0,0 @@
-{ kde, kdelibs, antlr }:
-
-kde {
- buildInputs = [ kdelibs antlr ];
-
- meta = {
- description = "Po<->xml tools";
- };
-}
diff --git a/pkgs/desktops/kde-4.8/kdesdk/scripts.nix b/pkgs/desktops/kde-4.8/kdesdk/scripts.nix
deleted file mode 100644
index df81145e5d6025ebab8f2a26ede5955efb374518..0000000000000000000000000000000000000000
--- a/pkgs/desktops/kde-4.8/kdesdk/scripts.nix
+++ /dev/null
@@ -1,9 +0,0 @@
-{ kde, kdelibs }:
-
-kde {
- buildInputs = [ kdelibs ];
-
- meta = {
- description = "Various scripts to ease KDE development";
- };
-}
diff --git a/pkgs/desktops/kde-4.8/kdesdk/strigi-analyzer.nix b/pkgs/desktops/kde-4.8/kdesdk/strigi-analyzer.nix
deleted file mode 100644
index 0ad48c8cfdee07cfc25a45276277f244d525508a..0000000000000000000000000000000000000000
--- a/pkgs/desktops/kde-4.8/kdesdk/strigi-analyzer.nix
+++ /dev/null
@@ -1,13 +0,0 @@
-{ kde, kdelibs }:
-
-kde {
- buildInputs = [ kdelibs ];
-
- meta = {
- description = "Strigi analyzers for diff, po and ts";
- kde = {
- name = "strigi-analyzer";
- module = "kdesdk";
- };
- };
-}
diff --git a/pkgs/desktops/kde-4.8/kdesdk/umbrello.nix b/pkgs/desktops/kde-4.8/kdesdk/umbrello.nix
deleted file mode 100644
index e83a2d9a901b8b86ad1c80d6a9eabdba45f2bb97..0000000000000000000000000000000000000000
--- a/pkgs/desktops/kde-4.8/kdesdk/umbrello.nix
+++ /dev/null
@@ -1,9 +0,0 @@
-{ kde, kdelibs, libxml2, libxslt, boost }:
-
-kde {
- buildInputs = [ kdelibs libxml2 libxslt boost ];
-
- meta = {
- description = "Umbrello UML modeller";
- };
-}
diff --git a/pkgs/desktops/kde-4.8/kdetoys/amor.nix b/pkgs/desktops/kde-4.8/kdetoys/amor.nix
deleted file mode 100644
index 936d63d544a9dbbb901e4b90249766e52782c4d4..0000000000000000000000000000000000000000
--- a/pkgs/desktops/kde-4.8/kdetoys/amor.nix
+++ /dev/null
@@ -1,9 +0,0 @@
-{ kde, kdelibs }:
-
-kde {
- buildInputs = [ kdelibs ];
-
- meta = {
- description = "KDE creature for your desktop";
- };
-}
diff --git a/pkgs/desktops/kde-4.8/kdetoys/kteatime.nix b/pkgs/desktops/kde-4.8/kdetoys/kteatime.nix
deleted file mode 100644
index dacf54def4b0cb1ffc2e0d83e187535aa1a64e1e..0000000000000000000000000000000000000000
--- a/pkgs/desktops/kde-4.8/kdetoys/kteatime.nix
+++ /dev/null
@@ -1,9 +0,0 @@
-{ kde, kdelibs }:
-
-kde {
- buildInputs = [ kdelibs ];
-
- meta = {
- description = "KDE utility for making a fine cup of tea";
- };
-}
diff --git a/pkgs/desktops/kde-4.8/kdetoys/ktux.nix b/pkgs/desktops/kde-4.8/kdetoys/ktux.nix
deleted file mode 100644
index 108f9be7c72283fec0e99241a6befefae36e3855..0000000000000000000000000000000000000000
--- a/pkgs/desktops/kde-4.8/kdetoys/ktux.nix
+++ /dev/null
@@ -1,9 +0,0 @@
-{ kde, kdelibs, kde_workspace }:
-
-kde {
- buildInputs = [ kdelibs kde_workspace ];
-
- meta = {
- description = "Tux Screen Saver";
- };
-}
diff --git a/pkgs/desktops/kde-4.8/kdeutils/ark.nix b/pkgs/desktops/kde-4.8/kdeutils/ark.nix
deleted file mode 100644
index 7fbdaf586d66848c370771f549466302520d8637..0000000000000000000000000000000000000000
--- a/pkgs/desktops/kde-4.8/kdeutils/ark.nix
+++ /dev/null
@@ -1,9 +0,0 @@
-{ kde, kdelibs, libarchive, bzip2, kde_baseapps }:
-
-kde {
- buildInputs = [ kdelibs kde_baseapps libarchive bzip2 ];
-
- meta = {
- description = "KDE Archiving Tool";
- };
-}
diff --git a/pkgs/desktops/kde-4.8/kdeutils/filelight.nix b/pkgs/desktops/kde-4.8/kdeutils/filelight.nix
deleted file mode 100644
index 25ecabed27ce724924064e5115b456d8246e32e0..0000000000000000000000000000000000000000
--- a/pkgs/desktops/kde-4.8/kdeutils/filelight.nix
+++ /dev/null
@@ -1,9 +0,0 @@
-{ kde, kdelibs }:
-
-kde {
- buildInputs = [ kdelibs ];
-
- meta = {
- description = "Tool to visualise file and directory sizes";
- };
-}
diff --git a/pkgs/desktops/kde-4.8/kdeutils/kcalc.nix b/pkgs/desktops/kde-4.8/kdeutils/kcalc.nix
deleted file mode 100644
index 08b202e8f0e8fba52c0aa48e39cba485f151a2f0..0000000000000000000000000000000000000000
--- a/pkgs/desktops/kde-4.8/kdeutils/kcalc.nix
+++ /dev/null
@@ -1,9 +0,0 @@
-{ kde, kdelibs, gmp }:
-
-kde {
- buildInputs = [ kdelibs gmp ];
-
- meta = {
- description = "KDE Calculator";
- };
-}
diff --git a/pkgs/desktops/kde-4.8/kdeutils/kcharselect.nix b/pkgs/desktops/kde-4.8/kdeutils/kcharselect.nix
deleted file mode 100644
index d4c9c06f483dcc6f02b270f9c63812eb2d1c3c43..0000000000000000000000000000000000000000
--- a/pkgs/desktops/kde-4.8/kdeutils/kcharselect.nix
+++ /dev/null
@@ -1,9 +0,0 @@
-{ kde, kdelibs }:
-
-kde {
- buildInputs = [ kdelibs ];
-
- meta = {
- description = "KDE character selection utility";
- };
-}
diff --git a/pkgs/desktops/kde-4.8/kdeutils/kdf.nix b/pkgs/desktops/kde-4.8/kdeutils/kdf.nix
deleted file mode 100644
index 3f9da58d0a62573a92170311c96ab7c717f79861..0000000000000000000000000000000000000000
--- a/pkgs/desktops/kde-4.8/kdeutils/kdf.nix
+++ /dev/null
@@ -1,9 +0,0 @@
-{ kde, kdelibs }:
-
-kde {
- buildInputs = [ kdelibs ];
-
- meta = {
- description = "KDE free disk space utility";
- };
-}
diff --git a/pkgs/desktops/kde-4.8/kdeutils/kfloppy.nix b/pkgs/desktops/kde-4.8/kdeutils/kfloppy.nix
deleted file mode 100644
index 2434a4fa671fcae1678f036e225a0fd71d1093a1..0000000000000000000000000000000000000000
--- a/pkgs/desktops/kde-4.8/kdeutils/kfloppy.nix
+++ /dev/null
@@ -1,9 +0,0 @@
-{ kde, kdelibs }:
-
-kde {
- buildInputs = [ kdelibs ];
-
- meta = {
- description = "Floppy disk formatting utility";
- };
-}
diff --git a/pkgs/desktops/kde-4.8/kdeutils/kgpg.nix b/pkgs/desktops/kde-4.8/kdeutils/kgpg.nix
deleted file mode 100644
index f3b00a5b968c61da2f98f940767277221f3c7f70..0000000000000000000000000000000000000000
--- a/pkgs/desktops/kde-4.8/kdeutils/kgpg.nix
+++ /dev/null
@@ -1,9 +0,0 @@
-{ kde, kdelibs, kdepimlibs }:
-
-kde {
- buildInputs = [ kdelibs kdepimlibs ];
-
- meta = {
- description = "Simple KDE GUI for GPG";
- };
-}
diff --git a/pkgs/desktops/kde-4.8/kdeutils/kremotecontrol.nix b/pkgs/desktops/kde-4.8/kdeutils/kremotecontrol.nix
deleted file mode 100644
index fef516e478d310d9b16a5c1e1f6fd843418529ae..0000000000000000000000000000000000000000
--- a/pkgs/desktops/kde-4.8/kdeutils/kremotecontrol.nix
+++ /dev/null
@@ -1,9 +0,0 @@
-{ kde, kdelibs, kde_workspace, libXtst }:
-
-kde {
- buildInputs = [ kdelibs kde_workspace libXtst ];
-
- meta = {
- description = "KDE remote control";
- };
-}
diff --git a/pkgs/desktops/kde-4.8/kdeutils/ktimer.nix b/pkgs/desktops/kde-4.8/kdeutils/ktimer.nix
deleted file mode 100644
index 5700977349e3fe475e37cde45d180cd2d0bc5f56..0000000000000000000000000000000000000000
--- a/pkgs/desktops/kde-4.8/kdeutils/ktimer.nix
+++ /dev/null
@@ -1,9 +0,0 @@
-{ kde, kdelibs }:
-
-kde {
- buildInputs = [ kdelibs ];
-
- meta = {
- description = "KDE Timer";
- };
-}
diff --git a/pkgs/desktops/kde-4.8/kdeutils/kwallet.nix b/pkgs/desktops/kde-4.8/kdeutils/kwallet.nix
deleted file mode 100644
index 9ec0e6c0396cddd2977485d4892b3b4bc4aea097..0000000000000000000000000000000000000000
--- a/pkgs/desktops/kde-4.8/kdeutils/kwallet.nix
+++ /dev/null
@@ -1,9 +0,0 @@
-{ kde, kdelibs }:
-
-kde {
- buildInputs = [ kdelibs ];
-
- meta = {
- description = "KDE Wallet (password storage) management tool";
- };
-}
diff --git a/pkgs/desktops/kde-4.8/kdeutils/printer-applet.nix b/pkgs/desktops/kde-4.8/kdeutils/printer-applet.nix
deleted file mode 100644
index 2d937b3a4db7fc6fa51e88d371ca643e315dc9bf..0000000000000000000000000000000000000000
--- a/pkgs/desktops/kde-4.8/kdeutils/printer-applet.nix
+++ /dev/null
@@ -1,28 +0,0 @@
-{ kde, kdelibs
-, pythonPackages, sip, pyqt4, pykde4, pycups, rhpl, system_config_printer
-, pythonDBus, makeWrapper }:
-
-let s_c_p = system_config_printer.override { withGUI = false; }; in
-
-kde rec {
- buildInputs = [ kdelibs pythonPackages.python pythonPackages.wrapPython
- ] ++ pythonPath;
-
- pythonPath = [ pyqt4 pykde4 pycups s_c_p ];
-
- passthru.propagatedUserEnvPackages = [ s_c_p ];
-
- postInstall =
- ''
- wrapPythonPrograms
-
- # ‘system-config-printer’ supplies some D-Bus policy that we need.
- mkdir -p $out/nix-support
- echo ${s_c_p} > $out/nix-support/propagated-user-env-packages
- '';
-
- meta = {
- description = "KDE printer applet";
- longDescription = "Applet to view current print jobs and configure new printers";
- };
-}
diff --git a/pkgs/desktops/kde-4.8/kdeutils/superkaramba.nix b/pkgs/desktops/kde-4.8/kdeutils/superkaramba.nix
deleted file mode 100644
index 4dce768078ba178c836d026cd33eb2632de83958..0000000000000000000000000000000000000000
--- a/pkgs/desktops/kde-4.8/kdeutils/superkaramba.nix
+++ /dev/null
@@ -1,11 +0,0 @@
-{ kde, kdelibs, qimageblitz }:
-
-kde {
- buildInputs = [ kdelibs qimageblitz ];
-
- cmakeFlags = [ "-DBUILD_icons=TRUE" "-DBUILD_plasma=TRUE" ];
-
- meta = {
- description = "A KDE Eye-candy Application";
- };
-}
diff --git a/pkgs/desktops/kde-4.8/kdeutils/sweeper.nix b/pkgs/desktops/kde-4.8/kdeutils/sweeper.nix
deleted file mode 100644
index 78d56c7df30e8d1c61f4b11cdad18575e3489da1..0000000000000000000000000000000000000000
--- a/pkgs/desktops/kde-4.8/kdeutils/sweeper.nix
+++ /dev/null
@@ -1,9 +0,0 @@
-{ kde, kdelibs }:
-
-kde {
- buildInputs = [ kdelibs ];
-
- meta = {
- description = "Helps clean unwanted traces the user leaves on the system";
- };
-}
diff --git a/pkgs/desktops/kde-4.8/kdewebdev/kfilereplace.nix b/pkgs/desktops/kde-4.8/kdewebdev/kfilereplace.nix
deleted file mode 100644
index c3f6129d7e5c8921c3bd191011c3fdc4d1ed0efb..0000000000000000000000000000000000000000
--- a/pkgs/desktops/kde-4.8/kdewebdev/kfilereplace.nix
+++ /dev/null
@@ -1,10 +0,0 @@
-{ kde, kdelibs, libxml2, libxslt }:
-
-kde {
- buildInputs = [ kdelibs libxml2 libxslt ];
-
- meta = {
- description = "Batch search and replace tool";
- homepage = http://www.kdewebdev.org;
- };
-}
diff --git a/pkgs/desktops/kde-4.8/kdewebdev/kimagemapeditor.nix b/pkgs/desktops/kde-4.8/kdewebdev/kimagemapeditor.nix
deleted file mode 100644
index bececea7797e46157a1cec56fc4bab54c513dbb6..0000000000000000000000000000000000000000
--- a/pkgs/desktops/kde-4.8/kdewebdev/kimagemapeditor.nix
+++ /dev/null
@@ -1,10 +0,0 @@
-{ kde, kdelibs, libxml2, libxslt }:
-
-kde {
- buildInputs = [ kdelibs libxml2 libxslt ];
-
- meta = {
- description = "An HTML imagemap editor";
- homepage = http://www.nongnu.org/kimagemap/;
- };
-}
diff --git a/pkgs/desktops/kde-4.8/kdewebdev/klinkstatus.nix b/pkgs/desktops/kde-4.8/kdewebdev/klinkstatus.nix
deleted file mode 100644
index 94adbb7fd6e09ce48185432eef6993966cafafbe..0000000000000000000000000000000000000000
--- a/pkgs/desktops/kde-4.8/kdewebdev/klinkstatus.nix
+++ /dev/null
@@ -1,12 +0,0 @@
-{ kde, kdelibs, libxml2, libxslt, kdepimlibs
-, boost, htmlTidy }:
-
-kde {
- buildInputs =
- [ kdelibs libxml2 libxslt kdepimlibs boost htmlTidy ];
-
- meta = {
- description = "A KDE link checker";
- homepage = http://klinkstatus.kdewebdev.org;
- };
-}
diff --git a/pkgs/desktops/kde-4.8/kdewebdev/kommander.nix b/pkgs/desktops/kde-4.8/kdewebdev/kommander.nix
deleted file mode 100644
index 6a870e5630330323e360ace5206aabb34af8eff0..0000000000000000000000000000000000000000
--- a/pkgs/desktops/kde-4.8/kdewebdev/kommander.nix
+++ /dev/null
@@ -1,9 +0,0 @@
-{ kde, kdelibs, libxml2, libxslt }:
-
-kde {
- buildInputs = [ kdelibs libxml2 libxslt ];
-
- meta = {
- description = "A graphical editor of scripted dialogs";
- };
-}
diff --git a/pkgs/desktops/kde-4.8/l10n/default.nix b/pkgs/desktops/kde-4.8/l10n/default.nix
deleted file mode 100644
index c9fab80bffb4396a1591173b08948c26b107d3c1..0000000000000000000000000000000000000000
--- a/pkgs/desktops/kde-4.8/l10n/default.nix
+++ /dev/null
@@ -1,45 +0,0 @@
-{ stdenv, fetchurl, kdelibs, gettext, release, stable }:
-
-let
-
- inherit (stdenv.lib) attrByPath singleton;
-
- kdeL10nDerivation =
- { lang, saneName, sha256 }:
-
- stdenv.mkDerivation rec {
- name = "kde-l10n-${saneName}-${release}";
-
- src = fetchurl {
- url = "mirror://kde/${if stable then "" else "un"}stable/${release}/src/kde-l10n/kde-l10n-${lang}-${release}.tar.xz";
- name = "${name}.tar.xz";
- inherit sha256;
- };
-
- buildInputs = [ gettext kdelibs ];
-
- cmakeFlags = "-Wno-dev";
-
- meta = {
- description = "KDE translation for ${lang}";
- license = "GPL";
- platforms = stdenv.lib.platforms.linux;
- inherit (kdelibs.meta) maintainers homepage;
- };
- };
-
- kdeL10nRelease =
- builtins.listToAttrs (
- map ({lang, saneName, sha256}:
- {
- name = saneName;
- value = kdeL10nDerivation { inherit lang saneName sha256; };
- }
- ) (import (./manifest + "-${release}.nix"))
- );
-
-in
-{
- inherit kdeL10nDerivation;
- recurseForDerivations = true;
-} // kdeL10nRelease
diff --git a/pkgs/desktops/kde-4.8/l10n/l10n-manifest.sh b/pkgs/desktops/kde-4.8/l10n/l10n-manifest.sh
deleted file mode 100755
index ec159a1e2047b91845c9afb1ded0d3671eb0e1b3..0000000000000000000000000000000000000000
--- a/pkgs/desktops/kde-4.8/l10n/l10n-manifest.sh
+++ /dev/null
@@ -1,32 +0,0 @@
-#!/bin/sh
-
-# Usage: download kde-l10n to $dir, then run
-# $0 $dir
-
-dir=$1
-
-if [[ ! -d "${dir}" ]]; then
- echo "${dir} is not a directory (or doesn't exist)!" >&2
- exit 1
-fi
-
-release=$(ls "${dir}"/kde-l10n-en_GB-*.tar.xz | \
- sed -e 's/.*en_GB-//' -e 's/\.tar\.xz//')
-
-echo "Detected release ${release}" >&2
-
-exec > "manifest-${release}.nix"
-echo "["
-for i in `cd "${dir}"; ls kde-l10n-*-${release}.tar.xz`; do
- lang=${i%-${release}.tar.xz}
- lang=${lang#kde-l10n-}
- echo -n "${lang}.. " >&2
- hash=$(nix-hash --type sha256 --flat --base32 "${dir}/${i}")
- echo "{"
- echo " lang = \"${lang}\";"
- echo " saneName = \"$(echo $lang | sed s^@^_^g)\";"
- echo " sha256 = \"${hash}\";"
- echo "}"
- echo $hash >&2
-done
-echo "]"
diff --git a/pkgs/desktops/kde-4.8/l10n/manifest-4.8.4.nix b/pkgs/desktops/kde-4.8/l10n/manifest-4.8.4.nix
deleted file mode 100644
index fb823440abd59b60bbcb245d24e6e1cd9f714279..0000000000000000000000000000000000000000
--- a/pkgs/desktops/kde-4.8/l10n/manifest-4.8.4.nix
+++ /dev/null
@@ -1,277 +0,0 @@
-[
-{
- lang = "ar";
- saneName = "ar";
- sha256 = "1s17fypvwbr7v2jz1cdmxcgyav8ggj6sjiamvxdb9c6waahhmpjv";
-}
-{
- lang = "bg";
- saneName = "bg";
- sha256 = "1lpdd4h9xgssvd5srkiyfzl7ngiyq7pipjm896qfmz03j3yzbwnz";
-}
-{
- lang = "bs";
- saneName = "bs";
- sha256 = "0g6f5nihxizixc17y92453b4gj6w0bfwk4kndg2z60in9m4cswz5";
-}
-{
- lang = "ca";
- saneName = "ca";
- sha256 = "02har0kybcj2jj51lxkrm6akr9dmv0afrxmzggbrbhfglhln8221";
-}
-{
- lang = "ca@valencia";
- saneName = "ca_valencia";
- sha256 = "06wcfrbq1yh1vmzcyn7klym9cvmk8p56b23k9nbgw129z0ylhqxx";
-}
-{
- lang = "cs";
- saneName = "cs";
- sha256 = "14kn3xq62fxn138gkc63icmngl97vb1bkmqv93cscbr4zc5sfkvw";
-}
-{
- lang = "da";
- saneName = "da";
- sha256 = "10h3crypajdrxghn3hwprsgm09dblwsr17pg99c03zs4cd3gyv6s";
-}
-{
- lang = "de";
- saneName = "de";
- sha256 = "1pp5d3s1450wf1kwawj9n3gv4pgr32dh3nnvkl5n58wjq07b9ah7";
-}
-{
- lang = "el";
- saneName = "el";
- sha256 = "1wkp2v8yspgyixyki962vb3y8qdkdlp9mkrvfbw8lr6w2ivhkd90";
-}
-{
- lang = "en_GB";
- saneName = "en_GB";
- sha256 = "07qw1qinlndfdkz2dzdr9bbb9kqxqhq3ya1qmcz999bw3ggjyi25";
-}
-{
- lang = "es";
- saneName = "es";
- sha256 = "0wfl76s3zdb29dckbds63cfi96v2v59f6cm9yzjhwn87kyicq7k1";
-}
-{
- lang = "et";
- saneName = "et";
- sha256 = "04ip1493m35qdv9f42590r1zqf9g6cksqzp6n7xcfzi1lr0cipyv";
-}
-{
- lang = "eu";
- saneName = "eu";
- sha256 = "1pisn8myphk38jym2i8rp60rnvh3jn8lxnjghf5ng7h6ac1ydki3";
-}
-{
- lang = "fa";
- saneName = "fa";
- sha256 = "1vx01f0i8mcxzbizn32hpl737bgih73qnsysvzl6cdv06ckvxrmm";
-}
-{
- lang = "fi";
- saneName = "fi";
- sha256 = "1gx78cc294xnq2n96br2ahr2p6jzgv9d7bbaf9rm4nsamzbdd5m6";
-}
-{
- lang = "fr";
- saneName = "fr";
- sha256 = "0skvnga1xavx10l3hhyqdr0mfapnjnbh75pbjvibg96d7wzxxi23";
-}
-{
- lang = "ga";
- saneName = "ga";
- sha256 = "1pqcxhsgca3c5h9i9jpx67b572r3nhxrd6zmpkhidp3b476j2fx4";
-}
-{
- lang = "gl";
- saneName = "gl";
- sha256 = "03k0w0byra36krrm8gbfmfv7am74y85zy6n01nl3j4xgiy41yqy4";
-}
-{
- lang = "he";
- saneName = "he";
- sha256 = "0llqgsp9nw92px54lidsgdx5mk6z5nivshs4p193iplypa1pcfck";
-}
-{
- lang = "hr";
- saneName = "hr";
- sha256 = "0w8l6msbxmjg889kpprh3bfzbgks2abp30b0m6xn43jkrghghxsj";
-}
-{
- lang = "hu";
- saneName = "hu";
- sha256 = "0j63m00ilk9k5dy12bp3ndrwk5vcz79pwqhj9znp9l077lr1ah5n";
-}
-{
- lang = "ia";
- saneName = "ia";
- sha256 = "0d3nkv9kbh6rdaf46psy2iia1phkj49xf67cdmnhr8kqgh557vh6";
-}
-{
- lang = "id";
- saneName = "id";
- sha256 = "1gq4asqwsayd7wgkyqqg93lhqa8m0ac35as4dlrbqph4rk56k54y";
-}
-{
- lang = "is";
- saneName = "is";
- sha256 = "05l9d9xmf08nr14gjsl8qbqyn8xc3qji4wc4zsqnmnp2fk8l3ndd";
-}
-{
- lang = "it";
- saneName = "it";
- sha256 = "0hhl7pdfs1kcmz18k08961xq7y5vvjkwwzibkg238xagjq6wh1wl";
-}
-{
- lang = "ja";
- saneName = "ja";
- sha256 = "1ipf5y1vy5accxbxs74641iqs785n2nkgxy31lgcm0ay0s6y3kx4";
-}
-{
- lang = "kk";
- saneName = "kk";
- sha256 = "1arhyqn4yarcff3zhpi7a0c26b0rr1k3dwds9r6vq383vmv5la4a";
-}
-{
- lang = "km";
- saneName = "km";
- sha256 = "1ny008qwxpdl9l4a56y664hxb3y0c9i5rpbbwnpcmynm6fmnm1ik";
-}
-{
- lang = "ko";
- saneName = "ko";
- sha256 = "0aimxflnbx716bdph6snfzw17kkqqsbxrxawgjwmdp69h02pj5zh";
-}
-{
- lang = "lt";
- saneName = "lt";
- sha256 = "14np3z28z946mf1g93ci202mqmg3qlgi1wlv8yp7949lq36psfx2";
-}
-{
- lang = "lv";
- saneName = "lv";
- sha256 = "1jqxyih3m9p0km610dmpv9c3nzxjfm2aga1lm7nz3akgb8n6lhdi";
-}
-{
- lang = "nb";
- saneName = "nb";
- sha256 = "000lmksgcinsxr5ny607b2q4h108pk4jzyygrf38zpw02crsa0i5";
-}
-{
- lang = "nds";
- saneName = "nds";
- sha256 = "0spg23ngm8lj7bkbcj0s62i22flqzwvnhg12ghkiyqrdg8v725hq";
-}
-{
- lang = "nl";
- saneName = "nl";
- sha256 = "1qpdabq9clbb6r59gs7s0k3l1rb5fxvbhsasxsw1r7m4l32gnlib";
-}
-{
- lang = "nn";
- saneName = "nn";
- sha256 = "1nfkwmic4vs287ywi0mrqw95fvy42xdaxrsafxhjwdxqiynq6z66";
-}
-{
- lang = "pa";
- saneName = "pa";
- sha256 = "078m4ph7kcjvkbivhaa54wdqr8fz8qa8r8db76w1wlynwgqy4qfs";
-}
-{
- lang = "pl";
- saneName = "pl";
- sha256 = "1vcgkikbq48kxcgpi0vp95gj3wgfmghrvr6gqhlfql19wp5mjvm8";
-}
-{
- lang = "pt";
- saneName = "pt";
- sha256 = "04pjxaxllhhccwinn33ild0xjjn05wqb3a660xhf3cgr6wkgx02f";
-}
-{
- lang = "pt_BR";
- saneName = "pt_BR";
- sha256 = "1bb2f14h73ba35ysl3snnbiawx2ciz8h80f80k76qnyxix6zk885";
-}
-{
- lang = "ro";
- saneName = "ro";
- sha256 = "1gm22h89j0s91gdnpn8nf0zw761ddwj5wg5i58v8aza45dh026rx";
-}
-{
- lang = "ru";
- saneName = "ru";
- sha256 = "13hmbpsvzxiz4ci29388crr8xwhqmbrgs3yn12ay6z8fcwi3v528";
-}
-{
- lang = "si";
- saneName = "si";
- sha256 = "0557m5r07xdqc0ambzw7b5kqnjaxyx6si2w2zi804gx89cjkjzyn";
-}
-{
- lang = "sk";
- saneName = "sk";
- sha256 = "0yy379i8hy37sq61xz3n9309srjgm46n8jhj5dqf120jfc4knp2m";
-}
-{
- lang = "sl";
- saneName = "sl";
- sha256 = "03qk82hz3zdaj1rcpfyrzks4ss6rrqfwz1wkjqp1rrm5g7kl835w";
-}
-{
- lang = "sr";
- saneName = "sr";
- sha256 = "1dz2ckc7h7sm8ac66ajpypfifkpnx94d5d24hsm9gnp271x3134a";
-}
-{
- lang = "sv";
- saneName = "sv";
- sha256 = "0rynj1db0yijlb2ilwzia53h2xqaj5prz4ap0y06vpw5i84xf6f5";
-}
-{
- lang = "tg";
- saneName = "tg";
- sha256 = "0s78pb4b6fkqwvn9hp0n2mb6jkdwnx3hfh7vs9dxdx3m7zpgjq9z";
-}
-{
- lang = "th";
- saneName = "th";
- sha256 = "0xf646xnyjkwa5m32chsnsbb5ndfvbrzgc7i76g2fwp843wrn4rq";
-}
-{
- lang = "tr";
- saneName = "tr";
- sha256 = "0bfawc1cp9f7q1cq69y0w9bwawh2f4bhl1795f0i171pvfmmwq9g";
-}
-{
- lang = "ug";
- saneName = "ug";
- sha256 = "1lj7kjmfjk6micrspkpzx4jhskw33zi7jyshfz8i8234vzzn9j6d";
-}
-{
- lang = "uk";
- saneName = "uk";
- sha256 = "09ssi2zx24cfwc4bm039i9p6si8cx22fqwisi356ijjclrb3k7sh";
-}
-{
- lang = "vi";
- saneName = "vi";
- sha256 = "0sc3mjbi7gsyllgkqck75qgnfdmrlqh5ffmxl2p4q8m1whkgxqr1";
-}
-{
- lang = "wa";
- saneName = "wa";
- sha256 = "06rfw2l812gf3zyw7kl500lxda751q3bhrl7dh67zsc4s18gy9cb";
-}
-{
- lang = "zh_CN";
- saneName = "zh_CN";
- sha256 = "1zaxjza3q5ana63kqm9mbqssz73my07iikfq2w0i29naqx570p0y";
-}
-{
- lang = "zh_TW";
- saneName = "zh_TW";
- sha256 = "1svp8ykbcssl028hn6vxb6yb5agkbzlzvxnm6imkillsvmqlchdj";
-}
-]
diff --git a/pkgs/desktops/kde-4.8/oxygen-icons.nix b/pkgs/desktops/kde-4.8/oxygen-icons.nix
deleted file mode 100644
index 52e5e5f6bb01bf29baf26ff4a8e5999bd76c037f..0000000000000000000000000000000000000000
--- a/pkgs/desktops/kde-4.8/oxygen-icons.nix
+++ /dev/null
@@ -1,15 +0,0 @@
-{ kde, cmake }:
-
-kde {
- outputHashAlgo = "sha256";
- outputHashMode = "recursive";
- outputHash = "3984dac79aa7398578bcd9d69d74988bd992807518d46cd1dabc03867044c8a4";
-
- nativeBuildInputs = [ cmake ];
-
- meta = {
- description = "KDE Oxygen theme icons";
- longDescription = "Icons for KDE's default theme";
- license = "GPL";
- };
-}
diff --git a/pkgs/desktops/kde-4.8/support/akonadi/default.nix b/pkgs/desktops/kde-4.8/support/akonadi/default.nix
deleted file mode 100644
index 9a9e8a8706607741f6d0e7c1e4319bcc168a5953..0000000000000000000000000000000000000000
--- a/pkgs/desktops/kde-4.8/support/akonadi/default.nix
+++ /dev/null
@@ -1,24 +0,0 @@
-{ stdenv, fetchurl, cmake, qt4, shared_mime_info, libxslt, boost, automoc4, soprano }:
-
-stdenv.mkDerivation rec {
- name = "akonadi-1.7.2";
-
- src = fetchurl {
- url = "mirror://kde/stable/akonadi/src/${name}.tar.bz2";
- sha256 = "07rbhc8aa3d896j2r64ljv3amd6s4xhlbgq7kx99m1f68yl1fwjb";
- };
-
- buildInputs = [ qt4 soprano libxslt boost ];
-
- nativeBuildInputs = [ cmake automoc4 shared_mime_info ];
-
- enableParallelBuilding = true;
-
- meta = with stdenv.lib; {
- description = "KDE PIM Storage Service";
- license = "LGPL";
- homepage = http://pim.kde.org/akonadi;
- maintainers = [ maintainers.sander maintainers.urkud ];
- platforms = platforms.linux;
- };
-}
diff --git a/pkgs/development/arduino/ino/default.nix b/pkgs/development/arduino/ino/default.nix
index e77c2251b36d58c28979c0892d13ab0701e23f31..89501f11269c631f7b7450bfea31f408fea36e8f 100644
--- a/pkgs/development/arduino/ino/default.nix
+++ b/pkgs/development/arduino/ino/default.nix
@@ -29,11 +29,12 @@ buildPythonPackage rec {
--replace "self.e['avrdude']" "'${avrdude}/bin/avrdude'" \
--replace "'-C', self.e['avrdude.conf']," ""
'';
-
+
meta = {
description = "Command line toolkit for working with Arduino hardware";
homepage = http://inotool.org/;
license = stdenv.lib.licenses.mit;
maintainers = with stdenv.lib.maintainers; [ antono the-kenny ];
+ platforms = stdenv.lib.platforms.linux;
};
}
diff --git a/pkgs/development/compilers/aldor/default.nix b/pkgs/development/compilers/aldor/default.nix
index fcd0c9fd453d4b6d793b95137bd60d572a69fa77..57d1bf74154e98ae7fcaf33db14cf1cc9a2c28c9 100644
--- a/pkgs/development/compilers/aldor/default.nix
+++ b/pkgs/development/compilers/aldor/default.nix
@@ -29,7 +29,7 @@ stdenv.mkDerivation {
meta = {
homepage = "http://www.aldor.org/";
- description = "Aldor is a programming language with an expressive type system";
+ description = "Programming language with an expressive type system";
license = stdenv.lib.licenses.asl20;
longDescription = ''
diff --git a/pkgs/development/compilers/clean/default.nix b/pkgs/development/compilers/clean/default.nix
index bd051a95699e3dca575a53121c9118e9be5fb853..7f3e679e84763dd46bd3e4b17a7d0291993cf8d4 100644
--- a/pkgs/development/compilers/clean/default.nix
+++ b/pkgs/development/compilers/clean/default.nix
@@ -34,7 +34,7 @@ stdenv.mkDerivation rec {
'';
meta = {
- description = "Clean is a general purpose, state-of-the-art, pure and lazy functional programming language.";
+ description = "General purpose, state-of-the-art, pure and lazy functional programming language";
longDescription = ''
Clean is a general purpose, state-of-the-art, pure and lazy functional
programming language designed for making real-world applications. Some
diff --git a/pkgs/development/compilers/edk2/default.nix b/pkgs/development/compilers/edk2/default.nix
index 949324ba8b1cac2f6a1da6d3a34df6087efe65ad..3c2a4f779fddfe30d27423b22011596994a84ed0 100644
--- a/pkgs/development/compilers/edk2/default.nix
+++ b/pkgs/development/compilers/edk2/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchsvn, libuuid, pythonFull, iasl }:
+{ stdenv, fetchgit, libuuid, pythonFull, iasl }:
let
@@ -10,12 +10,12 @@ else
throw "Unsupported architecture";
edk2 = stdenv.mkDerivation {
- name = "edk2-2013-03-19";
+ name = "edk2-2013-10-09";
- src = fetchsvn {
- url = https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2;
- rev = "14211";
- sha256 = "1rhrv7cyazb1d4gw3s8fv0c245iankvb9pqx6nngbkkxkcswvnw7";
+ src = fetchgit {
+ url = git://github.com/tianocore/edk2;
+ rev = "5bcb62a4098c9bde9be6af0833a025adc768e08d";
+ sha256 = "3e2958877061bf6bbfb28b150743d7244486929c1c320bdb1ff2586774aa042a";
};
buildInputs = [ libuuid pythonFull ];
diff --git a/pkgs/development/compilers/gwt/2.4.0.nix b/pkgs/development/compilers/gwt/2.4.0.nix
index c5c7841d72a013855b0e120a722c1c1a6106bc52..65208b062c2534a27aae0780d5b197872cddf116 100644
--- a/pkgs/development/compilers/gwt/2.4.0.nix
+++ b/pkgs/development/compilers/gwt/2.4.0.nix
@@ -18,6 +18,6 @@ stdenv.mkDerivation {
meta = {
homepage = http://code.google.com/webtoolkit/;
- description = "Google Web Toolkit (GWT) is a development toolkit for building and optimizing complex browser-based applications.";
+ description = "Google Web Toolkit (GWT) is a development toolkit for building and optimizing complex browser-based applications";
};
}
diff --git a/pkgs/development/compilers/idris/default.nix b/pkgs/development/compilers/idris/default.nix
index 7252343aa559c7faa7202610d3695649635ca724..30ef18a1ef9187b70c9035ab7438234ac93ca0d1 100644
--- a/pkgs/development/compilers/idris/default.nix
+++ b/pkgs/development/compilers/idris/default.nix
@@ -1,20 +1,21 @@
-{ cabal, ansiTerminal, binary, boehmgc, Cabal, filepath, gmp, happy
-, haskeline, languageJava, libffi, llvmGeneral, llvmGeneralPure
-, mtl, parsec, parsers, split, text, time, transformers, trifecta
-, unorderedContainers, utf8String, vector, vectorBinaryInstances
+{ cabal, ansiTerminal, ansiWlPprint, binary, boehmgc, Cabal
+, filepath, gmp, happy, haskeline, languageJava, libffi
+, llvmGeneral, llvmGeneralPure, mtl, parsec, parsers, split, text
+, time, transformers, trifecta, unorderedContainers, utf8String
+, vector, vectorBinaryInstances
}:
cabal.mkDerivation (self: {
pname = "idris";
- version = "0.9.9.2";
- sha256 = "0xfwnlf3jca64i4piyx9scmk4z8f6rak2cvrcjwji505a9vaa0rw";
+ version = "0.9.9.3";
+ sha256 = "1l19xx0xbcwlnnh2w0rmri7wwixffzfrafpbji64nwyx1awz4iab";
isLibrary = false;
isExecutable = true;
buildDepends = [
- ansiTerminal binary Cabal filepath haskeline languageJava libffi
- llvmGeneral llvmGeneralPure mtl parsec parsers split text time
- transformers trifecta unorderedContainers utf8String vector
- vectorBinaryInstances
+ ansiTerminal ansiWlPprint binary Cabal filepath haskeline
+ languageJava libffi llvmGeneral llvmGeneralPure mtl parsec parsers
+ split text time transformers trifecta unorderedContainers
+ utf8String vector vectorBinaryInstances
];
buildTools = [ happy ];
extraLibraries = [ boehmgc gmp ];
diff --git a/pkgs/development/compilers/jdk/dlj-bundle-builder.sh b/pkgs/development/compilers/jdk/dlj-bundle-builder.sh
index cf59a28164bb61cb0dd7c17be380d853e220e1f6..028164ac3955d864da70472d1e3abe889f9beb0d 100644
--- a/pkgs/development/compilers/jdk/dlj-bundle-builder.sh
+++ b/pkgs/development/compilers/jdk/dlj-bundle-builder.sh
@@ -37,6 +37,11 @@ else
jrePath=$out/jre
fi
+if test -n "$jce"; then
+ unzip $jce
+ cp -v jce/*.jar $jrePath/lib/security
+fi
+
rpath=$rpath${rpath:+:}$jrePath/lib/$architecture/jli
# set all the dynamic linkers
diff --git a/pkgs/development/compilers/jdk/jdk6-linux.nix b/pkgs/development/compilers/jdk/jdk6-linux.nix
index 340bbdf91ac975ad46f714feebdb5c793df9637a..97ec6b56305c7442adc5644500fd7c3b68248cd3 100644
--- a/pkgs/development/compilers/jdk/jdk6-linux.nix
+++ b/pkgs/development/compilers/jdk/jdk6-linux.nix
@@ -6,6 +6,7 @@
, xlibs ? null
, installjdk ? true
, pluginSupport ? true
+, installjce ? false
}:
assert stdenv.system == "i686-linux" || stdenv.system == "x86_64-linux";
@@ -24,6 +25,15 @@ let
else
abort "jdk requires i686-linux or x86_64 linux";
+ jce =
+ if installjce then
+ requireFile {
+ name = "jce_policy-6.zip";
+ url = http://www.oracle.com/technetwork/java/javase/downloads/jce-6-download-429243.html;
+ sha256 = "0qljzfxbikm8br5k7rkamibp1vkyjrf6blbxpx6hn4k46f62bhnh";
+ }
+ else
+ null;
in
stdenv.mkDerivation {
@@ -65,7 +75,7 @@ stdenv.mkDerivation {
[stdenv.gcc.libc] ++
(if swingSupport then [xlibs.libX11 xlibs.libXext xlibs.libXtst xlibs.libXi xlibs.libXp xlibs.libXt] else []);
- inherit swingSupport pluginSupport architecture;
+ inherit swingSupport pluginSupport architecture jce;
inherit (xlibs) libX11;
mozillaPlugin = if installjdk then "/jre/lib/${architecture}/plugins" else "/lib/${architecture}/plugins";
diff --git a/pkgs/development/compilers/julia/default.nix b/pkgs/development/compilers/julia/default.nix
index 3e45fc6d5e356e30b87808b048ac0ef1acf012e0..ae550f5692d8dd1962350a8a6e9877bb94d866fa 100644
--- a/pkgs/development/compilers/julia/default.nix
+++ b/pkgs/development/compilers/julia/default.nix
@@ -8,7 +8,7 @@ let
in
stdenv.mkDerivation rec {
pname = "julia";
- date = "20130611";
+ date = "20131013";
name = "${pname}-git-${date}";
grisu_ver = "1.1.1";
@@ -65,8 +65,8 @@ stdenv.mkDerivation rec {
src = fetchgit {
url = "git://github.com/JuliaLang/julia.git";
- rev = "60cc4e44bf415dcda90f2bbe22300f842fe44098";
- sha256 = "018s0zyvdkxjldbvcdv40q3v2gcjznyyql5pv3zhhy1iq11jddfz";
+ rev = "76d2b87a45fff637473c4c342c9f5f9387675fda";
+ sha256 = "079g44r27lv0wsfbg84ihrmgzl73djjjr41xjiaqdph55zqfbn4f";
};
buildInputs = [ gfortran perl m4 gmp pcre llvm readline zlib
@@ -131,7 +131,7 @@ stdenv.mkDerivation rec {
'';
meta = {
- description = "High-level performance-oriented dynamical language for technical computing.";
+ description = "High-level performance-oriented dynamical language for technical computing";
homepage = "http://julialang.org/";
license = stdenv.lib.licenses.mit;
maintainers = [ stdenv.lib.maintainers.raskin ];
diff --git a/pkgs/development/compilers/mlton/default.nix b/pkgs/development/compilers/mlton/default.nix
index 770a6b17b158daa021aafbf9d4cd14d789cc477a..a5ff613a9b456ea698f965dab9ffec14039e1f9c 100644
--- a/pkgs/development/compilers/mlton/default.nix
+++ b/pkgs/development/compilers/mlton/default.nix
@@ -77,7 +77,7 @@ stdenv.mkDerivation rec {
'';
meta = {
- description = "MLton is an open-source, whole-program, optimizing Standard ML compiler.";
+ description = "Open-source, whole-program, optimizing Standard ML compiler";
longDescription = ''
MLton is an open source, whole-program optimizing compiler for the Standard ML programming language.
MLton aims to produce fast executables, and to encourage rapid prototyping and modular programming
diff --git a/pkgs/development/compilers/sbcl/default.nix b/pkgs/development/compilers/sbcl/default.nix
index 1e4feff1107bf2499885bfcb7ee80dc5f7564e6f..288fdb33454ac292f47c61538c19ff9c56011c07 100644
--- a/pkgs/development/compilers/sbcl/default.nix
+++ b/pkgs/development/compilers/sbcl/default.nix
@@ -4,11 +4,11 @@ let
s= # Generated upstream information
rec {
baseName="sbcl";
- version="1.1.8";
+ version="1.1.12";
name="${baseName}-${version}";
- hash="1fmcpsi2bddfpz3impm9i62y9p15r3mc4xgm1dg0k77l33859jip";
- url="mirror://sourceforge/project/sbcl/sbcl/1.1.8/sbcl-1.1.8-source.tar.bz2";
- sha256="1fmcpsi2bddfpz3impm9i62y9p15r3mc4xgm1dg0k77l33859jip";
+ hash="0mvl6lpi44yv6jv3xhyyzvf9g7bdlj691iz3ydpn66v0vg5i554c";
+ url="mirror://sourceforge/project/sbcl/sbcl/1.1.12/sbcl-1.1.12-source.tar.bz2";
+ sha256="0mvl6lpi44yv6jv3xhyyzvf9g7bdlj691iz3ydpn66v0vg5i554c";
};
buildInputs = with a; [
clisp makeWrapper
diff --git a/pkgs/development/compilers/urweb/default.nix b/pkgs/development/compilers/urweb/default.nix
index 66b15e3499d9cdf7cba40ff50322548c1a5ea709..a2423bee9b9a9d06366fbd4cd6b7379843a70d70 100644
--- a/pkgs/development/compilers/urweb/default.nix
+++ b/pkgs/development/compilers/urweb/default.nix
@@ -32,7 +32,7 @@ stdenv.mkDerivation rec {
dontDisableStatic = true;
meta = {
- description = "Ur/Web supports construction of dynamic web applications backed by SQL databases.";
+ description = "Construct dynamic web applications backed by SQL databases";
longDescription = ''
Ur is a programming language in the tradition of ML and Haskell, but
featuring a significantly richer type system. Ur is functional, pure,
diff --git a/pkgs/development/compilers/yap/default.nix b/pkgs/development/compilers/yap/default.nix
index 44e407105690a9a23934623c644b904b1fa35406..a29c0de65b8787843670de13e4e8bc46c49612ca 100644
--- a/pkgs/development/compilers/yap/default.nix
+++ b/pkgs/development/compilers/yap/default.nix
@@ -11,6 +11,8 @@ stdenv.mkDerivation rec {
buildInputs = [ readline gmp zlib ];
+ configureFlags = "--enable-tabling=yes";
+
meta = {
homepage = "http://www.dcc.fc.up.pt/~vsc/Yap/";
description = "Yap Prolog System is a ISO-compatible high-performance Prolog compiler";
diff --git a/pkgs/development/interpreters/angelscript/default.nix b/pkgs/development/interpreters/angelscript/default.nix
index a092172c8ca781d9e15592091edc541b2c59d682..22f92f40183e4bb84637f8e982ea6e550bf9192e 100644
--- a/pkgs/development/interpreters/angelscript/default.nix
+++ b/pkgs/development/interpreters/angelscript/default.nix
@@ -47,7 +47,7 @@ rec {
'' ["defEnsureDir" "prepareBuild"];
meta = {
- description = "A light-weight scripting library";
+ description = "Light-weight scripting library";
maintainers = with a.lib.maintainers;
[
raskin
diff --git a/pkgs/development/interpreters/clisp/default.nix b/pkgs/development/interpreters/clisp/default.nix
index bd19d738860a04b4dd164d2542979c51c6db7a2f..b8af3f6d7479459b880afa37372d5d6aa8f2af39 100644
--- a/pkgs/development/interpreters/clisp/default.nix
+++ b/pkgs/development/interpreters/clisp/default.nix
@@ -48,6 +48,11 @@ stdenv.mkDerivation rec {
cd builddir
'';
+ postInstall = ''
+ ./clisp-link add "$out"/lib/clisp*/base "$(dirname "$out"/lib/clisp*/base)"/full \
+ clx/new-clx bindings/glibc pcre rawsock wildcard zlib
+ '';
+
NIX_CFLAGS_COMPILE="-O0";
# TODO : make mod-check fails
diff --git a/pkgs/development/interpreters/falcon/default.nix b/pkgs/development/interpreters/falcon/default.nix
index 9800e895400c9433965cb6ee1254a7388d2d8d4a..0b4bfacb6de52b1a4e728c70fa63509429513e74 100644
--- a/pkgs/development/interpreters/falcon/default.nix
+++ b/pkgs/development/interpreters/falcon/default.nix
@@ -29,6 +29,6 @@ rec {
name = "falcon-" + version;
meta = {
- description = "A programming language. Has macros and syntax at once.";
+ description = "Programming language with macros and syntax at once";
};
}
diff --git a/pkgs/development/interpreters/hiphopvm/default.nix b/pkgs/development/interpreters/hiphopvm/default.nix
index 57e3e93c6466e3a35a591581333cc4d8ff472a39..c18c81caff0514fa4d43e25584e69cbb2289a5e8 100644
--- a/pkgs/development/interpreters/hiphopvm/default.nix
+++ b/pkgs/development/interpreters/hiphopvm/default.nix
@@ -56,7 +56,7 @@ stdenv.mkDerivation {
patches = [./tbb.patch];
meta = {
- description = "HipHop is a high performance PHP toolchain.";
+ description = "High performance PHP toolchain";
homepage = https://github.com/facebook/hiphop-php;
platforms = ["x86_64-linux"];
};
diff --git a/pkgs/development/interpreters/lua-4/default.nix b/pkgs/development/interpreters/lua-4/default.nix
index a95e4e4c35eacaca9da31e1ced4138173571c441..13f7964769cae254fcf1912c99cc4937cb7597a6 100644
--- a/pkgs/development/interpreters/lua-4/default.nix
+++ b/pkgs/development/interpreters/lua-4/default.nix
@@ -14,7 +14,7 @@ stdenv.mkDerivation {
meta = {
homepage = "http://www.lua.org";
- description = "Lua is a powerful, fast, lightweight, embeddable scripting language.";
+ description = "Powerful, fast, lightweight, embeddable scripting language";
longDescription = ''
Lua combines simple procedural syntax with powerful data
description constructs based on associative arrays and extensible
diff --git a/pkgs/development/interpreters/lua-5/5.0.3.nix b/pkgs/development/interpreters/lua-5/5.0.3.nix
index ff2a814019100df2ebf4b69c8d2ba485fbbf7a5f..eae2d82d5d0ab646de7f5c703feaa684c6fe66da 100644
--- a/pkgs/development/interpreters/lua-5/5.0.3.nix
+++ b/pkgs/development/interpreters/lua-5/5.0.3.nix
@@ -15,7 +15,7 @@ stdenv.mkDerivation {
meta = {
homepage = "http://www.lua.org";
- description = "Lua is a powerful, fast, lightweight, embeddable scripting language.";
+ description = "Powerful, fast, lightweight, embeddable scripting language";
longDescription = ''
Lua combines simple procedural syntax with powerful data
description constructs based on associative arrays and extensible
diff --git a/pkgs/development/interpreters/lua-5/5.1.nix b/pkgs/development/interpreters/lua-5/5.1.nix
index a6caf0023e358a8400cbcf00371a17f606e336c7..2923a8f960d19654f38c9f0146bc0ba7ee35bf4c 100644
--- a/pkgs/development/interpreters/lua-5/5.1.nix
+++ b/pkgs/development/interpreters/lua-5/5.1.nix
@@ -26,14 +26,14 @@ stdenv.mkDerivation rec {
postInstall = ''
mkdir -p "$out/share/doc/lua" "$out/lib/pkgconfig"
- mv "etc/lua.pc" "$out/lib/pkgconfig/"
+ sed <"etc/lua.pc" >"$out/lib/pkgconfig/lua.pc" -e "s|^prefix=.*|prefix=$out|"
mv "doc/"*.{gif,png,css,html} "$out/share/doc/lua/"
rmdir $out/{share,lib}/lua/5.1 $out/{share,lib}/lua
'';
meta = {
homepage = "http://www.lua.org";
- description = "Lua is a powerful, fast, lightweight, embeddable scripting language.";
+ description = "Powerful, fast, lightweight, embeddable scripting language";
longDescription = ''
Lua combines simple procedural syntax with powerful data
description constructs based on associative arrays and extensible
diff --git a/pkgs/development/interpreters/lua-5/5.2.nix b/pkgs/development/interpreters/lua-5/5.2.nix
index bd5a868c2d5f13972918f5a40a0a04b4f53ae34a..5b4c2459872e2ca788d62977788a859d0fd5eb68 100644
--- a/pkgs/development/interpreters/lua-5/5.2.nix
+++ b/pkgs/development/interpreters/lua-5/5.2.nix
@@ -51,7 +51,7 @@ stdenv.mkDerivation rec {
meta = {
homepage = "http://www.lua.org";
- description = "Lua is a powerful, fast, lightweight, embeddable scripting language.";
+ description = "Powerful, fast, lightweight, embeddable scripting language";
longDescription = ''
Lua combines simple procedural syntax with powerful data
description constructs based on associative arrays and extensible
diff --git a/pkgs/development/interpreters/php/5.4.nix b/pkgs/development/interpreters/php/5.4.nix
index 394278dea74934e61bb1abc223300ee8ca34705f..eb3d796f229a6958ef562e95862dbb951db6328d 100644
--- a/pkgs/development/interpreters/php/5.4.nix
+++ b/pkgs/development/interpreters/php/5.4.nix
@@ -9,7 +9,7 @@ in
composableDerivation.composableDerivation {} ( fixed : let inherit (fixed.fixed) version; in {
- version = "5.4.18";
+ version = "5.4.20";
name = "php-${version}";
@@ -230,7 +230,7 @@ composableDerivation.composableDerivation {} ( fixed : let inherit (fixed.fixed)
"http://nl1.php.net/get/php-${version}.tar.bz2/from/this/mirror"
"http://se1.php.net/get/php-${version}.tar.bz2/from/this/mirror"
];
- sha256 = "1ncizy992nfy3i3lzns7qcinj5376d840hchaqs5jlfn2nz0k50x";
+ sha256 = "1qarcxj46rzkmql3w2dln0hxzs349ph31fxcslizxch1ig7l43nd";
name = "php-${version}.tar.bz2";
};
diff --git a/pkgs/development/interpreters/pure/default.nix b/pkgs/development/interpreters/pure/default.nix
index 83a1c0ac5009d1d43099466a01fe147d7ce0d805..84ae789150dabd11df0fb1c08a431c228aaa4ebb 100644
--- a/pkgs/development/interpreters/pure/default.nix
+++ b/pkgs/development/interpreters/pure/default.nix
@@ -1,5 +1,5 @@
x@{builderDefsPackage
- , llvm, gmp, mpfr, readline, bison, flex
+ , llvm, gmp, mpfr, readline, bison, flex, makeWrapper
, ...}:
builderDefsPackage
(a :
@@ -12,11 +12,11 @@ let
sourceInfo = rec {
baseName="pure";
project="pure-lang";
- version="0.56";
+ version="0.58";
name="${baseName}-${version}";
extension="tar.gz";
- url="http://${project}.googlecode.com/files/${name}.${extension}";
- hash="1ll29j31lp7ymp1kq57328q8md7pkp8jmwsadp67j4cdlzc3zdhj";
+ url="https://bitbucket.org/purelang/${project}/downloads/${name}.${extension}";
+ hash="180ygv8nmfy8v4696km8jdahn5cnr454sc8i1av7s6z4ss7mrxmi";
};
in
rec {
@@ -29,9 +29,9 @@ rec {
inherit buildInputs;
/* doConfigure should be removed if not needed */
- phaseNames = ["doPatch" "doConfigure" "doMakeInstall"];
+ phaseNames = ["doConfigure" "doMakeInstall" "doWrap"];
- patches = [ ./new-gcc.patch ];
+ doWrap = a.makeManyWrappers ''$out/bin/pure'' ''--prefix LD_LIBRARY_PATH : "${llvm}/lib"'';
meta = {
description = "A purely functional programming language based on term rewriting";
@@ -45,7 +45,7 @@ rec {
};
passthru = {
updateInfo = {
- downloadPage = "http://code.google.com/p/pure-lang/downloads/list";
+ downloadPage = "https://bitbucket.org/purelang/pure-lang/downloads";
};
};
}) x
diff --git a/pkgs/development/interpreters/pure/new-gcc.patch b/pkgs/development/interpreters/pure/new-gcc.patch
deleted file mode 100644
index ea2cd8450591ab1a5ff9eae2fb95b49ad69e1b7d..0000000000000000000000000000000000000000
--- a/pkgs/development/interpreters/pure/new-gcc.patch
+++ /dev/null
@@ -1,62 +0,0 @@
-diff --git a/runtime.cc b/runtime.cc
-index 04cbc40..54a0b43 100644
---- a/runtime.cc
-+++ b/runtime.cc
-@@ -13121,39 +13121,6 @@ unsigned int sleep(unsigned int secs)
- }
- #endif
-
--/* Horrible kludge to get round, trunc and the inverse hyperbolic functions
-- from libmingwex.a (these are in C99, but not in the Windows system
-- libraries, and LLVM doesn't know how to get them either). */
--
--extern "C"
--double __round(double x)
--{
-- return round(x);
--}
--
--extern "C"
--double __trunc(double x)
--{
-- return trunc(x);
--}
--
--extern "C"
--double __asinh(double x)
--{
-- return asinh(x);
--}
--
--extern "C"
--double __acosh(double x)
--{
-- return acosh(x);
--}
--
--extern "C"
--double __atanh(double x)
--{
-- return atanh(x);
--}
-
- /* File type bits. */
-
-diff --git a/util.hh b/util.hh
-index ae95b79..eab3330 100644
---- a/util.hh
-+++ b/util.hh
-@@ -58,13 +58,6 @@ char *default_encoding();
- double my_strtod(const char *nptr, char **endptr);
- char *my_formatd(char *buffer, const char *format, double d);
-
--/* Windows doesn't have strptime, so we provide a suitable replacement from
-- GNU libc (see strptime.c). */
--
--#ifndef HAVE_STRPTIME
--extern "C"
--char *strptime(const char *s, const char *format, struct tm *tm);
--#endif
-
- /* Windows doesn't have mkstemp, so we provide a suitable replacement. */
-
diff --git a/pkgs/development/interpreters/python/2.6/default.nix b/pkgs/development/interpreters/python/2.6/default.nix
index b99beca3892383e227586582c74740e680d95321..6b746185b6cc5fbad24364053016b7a447115514 100644
--- a/pkgs/development/interpreters/python/2.6/default.nix
+++ b/pkgs/development/interpreters/python/2.6/default.nix
@@ -160,6 +160,11 @@ let
deps = [ ncurses ];
};
+ curses_panel = buildInternalPythonModule {
+ moduleName = "curses_panel";
+ deps = [ ncurses modules.curses ];
+ };
+
gdbm = buildInternalPythonModule {
moduleName = "gdbm";
internalName = "gdbm";
diff --git a/pkgs/development/interpreters/python/2.7/default.nix b/pkgs/development/interpreters/python/2.7/default.nix
index ce061348675772f4c36acc01d4bf167571485670..043094c03036117b3687d9281e5ad1c5c359b92e 100644
--- a/pkgs/development/interpreters/python/2.7/default.nix
+++ b/pkgs/development/interpreters/python/2.7/default.nix
@@ -164,6 +164,11 @@ let
deps = [ ncurses ];
};
+ curses_panel = buildInternalPythonModule {
+ moduleName = "curses_panel";
+ deps = [ ncurses modules.curses ];
+ };
+
crypt = buildInternalPythonModule {
moduleName = "crypt";
internalName = "crypt";
diff --git a/pkgs/development/interpreters/python/wrapper.nix b/pkgs/development/interpreters/python/wrapper.nix
index d2783ffb085e092e9d5446e634410b84dcc338ce..1699690749f1816a3523b9d4fd405a962d68d944 100644
--- a/pkgs/development/interpreters/python/wrapper.nix
+++ b/pkgs/development/interpreters/python/wrapper.nix
@@ -1,23 +1,26 @@
-# Create a python that knows about additional python packages via
-# PYTHONPATH
+{ stdenv, python, buildEnv, makeWrapper, recursivePthLoader, extraLibs ? [] }:
-{ stdenv, python, makeWrapper, recursivePthLoader, extraLibs ? [] }:
+# Create a python executable that knows about additional packages.
-stdenv.mkDerivation {
+(buildEnv {
name = "python-${python.version}-wrapper";
+ paths = extraLibs ++ [ python makeWrapper recursivePthLoader ];
+ ignoreCollisions = false;
- propagatedBuildInputs = extraLibs ++ [ python makeWrapper recursivePthLoader ];
-
- unpackPhase = "true";
- installPhase = ''
+ postBuild = ''
+ . "${makeWrapper}/nix-support/setup-hook"
+ if [ -L "$out/bin" ]; then
+ unlink "$out/bin"
+ fi
mkdir -p "$out/bin"
- for prg in 2to3 idle pdb pdb${python.majorVersion} pydoc python python-config python${python.majorVersion} python${python.majorVersion}-config smtpd.py; do
- makeWrapper "$python/bin/$prg" "$out/bin/$prg" --suffix PYTHONPATH : "$PYTHONPATH"
+ cd "${python}/bin"
+ for prg in *; do
+ echo "$prg --> $out/bin/$prg"
+ rm -f "$out/bin/$prg"
+ makeWrapper "${python}/bin/$prg" "$out/bin/$prg" --set PYTHONHOME "$out"
done
- ensureDir "$out/share"
- ln -s "$python/share/man" "$out/share/man"
'';
-
+}) // {
inherit python;
inherit (python) meta;
}
diff --git a/pkgs/development/interpreters/racket/default.nix b/pkgs/development/interpreters/racket/default.nix
index ddcf26340397fa187f09668648a695a7d432c101..f45c96d2805df120a7b2b04cd44a7a6e59ccdb84 100644
--- a/pkgs/development/interpreters/racket/default.nix
+++ b/pkgs/development/interpreters/racket/default.nix
@@ -44,7 +44,7 @@ stdenv.mkDerivation rec {
'';
meta = {
- description = "A programming language derived from Scheme (formerly called PLT Scheme).";
+ description = "Programming language derived from Scheme (formerly called PLT Scheme)";
longDescription = ''
Racket (formerly called PLT Scheme) is a programming language derived
from Scheme. The Racket project has four primary components: the
diff --git a/pkgs/development/libraries/SDL2/default.nix b/pkgs/development/libraries/SDL2/default.nix
new file mode 100644
index 0000000000000000000000000000000000000000..7bc27362a296d0b5f285822215cff8fc2b2ad205
--- /dev/null
+++ b/pkgs/development/libraries/SDL2/default.nix
@@ -0,0 +1,56 @@
+{ stdenv, fetchurl, pkgconfig, audiofile
+, openglSupport ? false, mesa ? null
+, alsaSupport ? true, alsaLib ? null
+, x11Support ? true, x11 ? null, libXrandr ? null
+, pulseaudioSupport ? true, pulseaudio ? null
+}:
+
+# OSS is no longer supported, for it's much crappier than ALSA and
+# PulseAudio.
+assert alsaSupport || pulseaudioSupport;
+
+assert openglSupport -> (mesa != null && x11Support);
+assert x11Support -> (x11 != null && libXrandr != null);
+assert alsaSupport -> alsaLib != null;
+assert pulseaudioSupport -> pulseaudio != null;
+
+let
+ configureFlagsFun = attrs: ''
+ --disable-oss --disable-video-x11-xme
+ --disable-x11-shared --disable-alsa-shared --enable-rpath --disable-pulseaudio-shared
+ --disable-osmesa-shared --enable-static
+ ${if alsaSupport then "--with-alsa-prefix=${attrs.alsaLib}/lib" else ""}
+ '';
+in
+stdenv.mkDerivation rec {
+ name = "SDL2-2.0.0";
+
+ src = fetchurl {
+ url = "http://www.libsdl.org/release/${name}.tar.gz";
+ sha256 = "0y3in99brki7vc2mb4c0w39v70mf4h341mblhh8nmq4h7lawhskg";
+ };
+
+ # Since `libpulse*.la' contain `-lgdbm', PulseAudio must be propagated.
+ propagatedBuildInputs = stdenv.lib.optionals x11Support [ x11 libXrandr ] ++
+ stdenv.lib.optional pulseaudioSupport pulseaudio;
+
+ buildInputs = [ pkgconfig audiofile ] ++
+ stdenv.lib.optional openglSupport [ mesa ] ++
+ stdenv.lib.optional alsaSupport alsaLib;
+
+ # XXX: By default, SDL wants to dlopen() PulseAudio, in which case
+ # we must arrange to add it to its RPATH; however, `patchelf' seems
+ # to fail at doing this, hence `--disable-pulseaudio-shared'.
+ configureFlags = configureFlagsFun { inherit alsaLib; };
+
+ crossAttrs = {
+ configureFlags = configureFlagsFun { alsaLib = alsaLib.crossDrv; };
+ };
+
+ passthru = {inherit openglSupport;};
+
+ meta = {
+ description = "A cross-platform multimedia library";
+ homepage = http://www.libsdl.org/;
+ };
+}
diff --git a/pkgs/development/libraries/SDL2_gfx/default.nix b/pkgs/development/libraries/SDL2_gfx/default.nix
new file mode 100644
index 0000000000000000000000000000000000000000..693b7bf8fe19893c2fd13fde7bc066ac54b691cf
--- /dev/null
+++ b/pkgs/development/libraries/SDL2_gfx/default.nix
@@ -0,0 +1,54 @@
+{stdenv, fetchsvn, SDL2} :
+
+let rev = 5; in
+stdenv.mkDerivation rec {
+ name = "SDL2_gfx-${toString rev}";
+
+ src = fetchsvn {
+ url = http://svn.code.sf.net/p/sdl2gfx/code/trunk;
+ inherit rev;
+ sha256 = "1hzilbn1412m2b44mygrbdfh1gvks4v5p0kmafz248jf9ifsvmzp";
+ };
+
+ buildInputs = [ SDL2 ] ;
+
+ configureFlags = "--disable-mmx";
+
+ postInstall = ''
+ sed -i -e 's,"SDL.h",,' \
+ $out/include/SDL2/*.h
+
+ ln -s $out/include/SDL2/SDL2_framerate.h $out/include/SDL2/SDL_framerate.h;
+ ln -s $out/include/SDL2/SDL2_gfxPrimitives.h $out/include/SDL2/SDL_gfxPrimitives.h;
+ ln -s $out/include/SDL2/SDL2_rotozoom.h $out/include/SDL2/SDL_rotozoom.h;
+ ln -s $out/include/SDL2/*.h $out/include/;
+ '';
+
+ meta = {
+ description = "SDL graphics drawing primitives and support functions";
+
+ longDescription =
+ '' The SDL_gfx library evolved out of the SDL_gfxPrimitives code
+ which provided basic drawing routines such as lines, circles or
+ polygons and SDL_rotozoom which implemented a interpolating
+ rotozoomer for SDL surfaces.
+
+ The current components of the SDL_gfx library are:
+
+ * Graphic Primitives (SDL_gfxPrimitves.h)
+ * Rotozoomer (SDL_rotozoom.h)
+ * Framerate control (SDL_framerate.h)
+ * MMX image filters (SDL_imageFilter.h)
+ * Custom Blit functions (SDL_gfxBlitFunc.h)
+
+ The library is backwards compatible to the above mentioned
+ code. Its is written in plain C and can be used in C++ code.
+ '';
+
+ homepage = https://sourceforge.net/projects/sdlgfx/;
+ license = "LGPLv2+";
+
+ maintainers = [ stdenv.lib.maintainers.bjg ];
+ platforms = stdenv.lib.platforms.linux;
+ };
+}
diff --git a/pkgs/development/libraries/SDL2_image/default.nix b/pkgs/development/libraries/SDL2_image/default.nix
new file mode 100644
index 0000000000000000000000000000000000000000..73b5ba8d929a9ffa5de1c07ccd948c87664a1c52
--- /dev/null
+++ b/pkgs/development/libraries/SDL2_image/default.nix
@@ -0,0 +1,27 @@
+{ stdenv, fetchurl, SDL2, libpng, libjpeg, libtiff, libungif, libXpm, zlib }:
+
+stdenv.mkDerivation rec {
+ name = "SDL2_image-2.0.0";
+
+ src = fetchurl {
+ url = "http://www.libsdl.org/projects/SDL_image/release/${name}.tar.gz";
+ sha256 = "0d3jlhkmr0j5a2dd5h6y29jfcsj7mkl16wghm6n3nqqp7g3ib65j";
+ };
+
+ buildInputs = [SDL2 libpng libjpeg libtiff libungif libXpm zlib];
+
+ postInstall = ''
+ sed -i -e 's,"SDL.h",,' \
+ -e 's,"SDL_version.h",,' \
+ -e 's,"begin_code.h",,' \
+ -e 's,"close_code.h",,' \
+ $out/include/SDL2/SDL_image.h
+ ln -sv SDL2/SDL_image.h $out/include/SDL_image.h
+ '';
+
+ meta = {
+ description = "SDL image library";
+ homepage = "http://www.libsdl.org/projects/SDL_image/";
+ platforms = stdenv.lib.platforms.linux;
+ };
+}
diff --git a/pkgs/development/libraries/SDL2_mixer/default.nix b/pkgs/development/libraries/SDL2_mixer/default.nix
new file mode 100644
index 0000000000000000000000000000000000000000..6d29ddf6eea01942510874c685ae14025274467b
--- /dev/null
+++ b/pkgs/development/libraries/SDL2_mixer/default.nix
@@ -0,0 +1,20 @@
+{ stdenv, fetchurl, SDL2, libogg, libvorbis, enableNativeMidi ? false }:
+
+stdenv.mkDerivation rec {
+ name = "SDL2_mixer-2.0.0";
+
+ src = fetchurl {
+ url = "http://www.libsdl.org/projects/SDL_mixer/release/${name}.tar.gz";
+ sha256 = "0nvjdxjchrajrn0jag877hdx9zb788hsd315zzg1lyck2wb0xkm8";
+ };
+
+ buildInputs = [SDL2 libogg libvorbis];
+
+ configureFlags = "--disable-music-ogg-shared" + stdenv.lib.optionalString enableNativeMidi "--enable-music-native-midi-gpl";
+
+ postInstall = "ln -s $out/include/SDL2/SDL_mixer.h $out/include/";
+
+ meta = {
+ description = "SDL multi-channel audio mixer library";
+ };
+}
diff --git a/pkgs/development/libraries/Xaw3d/default.nix b/pkgs/development/libraries/Xaw3d/default.nix
index a0603b546cf6e72dd4b3f3e6c459674996d31f11..454c4e882f56c4d1d4f1cce9f03925cef3bf1cc3 100644
--- a/pkgs/development/libraries/Xaw3d/default.nix
+++ b/pkgs/development/libraries/Xaw3d/default.nix
@@ -10,4 +10,8 @@ stdenv.mkDerivation {
patches = [./config.patch ./laylex.patch];
buildInputs = [x11 imake gccmakedep libXmu libXpm libXp bison flex];
propagatedBuildInputs = [x11 libXmu];
+
+ meta = {
+ description = "3D widget set based on the Athena Widget set";
+ };
}
diff --git a/pkgs/development/libraries/a52dec/default.nix b/pkgs/development/libraries/a52dec/default.nix
index 82fef49cfc1086570dfd3c8bf155853c8309022d..84a87df03e40fecdd265cf1f726c88a590864a6d 100644
--- a/pkgs/development/libraries/a52dec/default.nix
+++ b/pkgs/development/libraries/a52dec/default.nix
@@ -11,6 +11,7 @@ stdenv.mkDerivation rec {
NIX_CFLAGS_COMPILE = "-fpic";
meta = {
+ description = "ATSC A/52 stream decoder";
homepage = http://liba52.sourceforge.net/;
};
}
diff --git a/pkgs/development/libraries/aalib/default.nix b/pkgs/development/libraries/aalib/default.nix
index 2da006a6cebe4a7229513cfd4dde10c485ea07bf..897fc9db8de1cba708d0d3430e51d62ea8cd0544 100644
--- a/pkgs/development/libraries/aalib/default.nix
+++ b/pkgs/development/libraries/aalib/default.nix
@@ -15,4 +15,8 @@ stdenv.mkDerivation {
buildInputs = [ncurses];
inherit ncurses;
+
+ meta = {
+ description = "ASCII art graphics library";
+ };
}
diff --git a/pkgs/development/libraries/agg/default.nix b/pkgs/development/libraries/agg/default.nix
index 8c24ae6fdbeebebd8f1c8ba642ddd5df809143d4..59124f011dd4e4c42066f3a7aa6f267ee720ff0c 100644
--- a/pkgs/development/libraries/agg/default.nix
+++ b/pkgs/development/libraries/agg/default.nix
@@ -18,7 +18,7 @@ stdenv.mkDerivation rec {
configureFlags = "--x-includes=${libX11}/include --x-libraries=${libX11}/lib";
meta = {
- description = "The Anti-Grain Geometry (AGG) library, a high quality rendering engine for C++";
+ description = "High quality rendering engine for C++";
longDescription = ''
Anti-Grain Geometry (AGG) is an Open Source, free of charge
diff --git a/pkgs/development/libraries/apache-activemq/default.nix b/pkgs/development/libraries/apache-activemq/default.nix
index 90d0dafdd9526ba795ec6b51d935e8183e54d71d..d55ff9049eda4d078670ccb4a5f1d622da887860 100644
--- a/pkgs/development/libraries/apache-activemq/default.nix
+++ b/pkgs/development/libraries/apache-activemq/default.nix
@@ -22,9 +22,7 @@ stdenv.mkDerivation rec {
meta = {
homepage = http://activemq.apache.org/;
- description = ''
- Messaging and Integration Patterns server written in Java.
- '';
+ description = "Messaging and Integration Patterns server written in Java";
license = stdenv.lib.licenses.asl20;
};
diff --git a/pkgs/development/libraries/aspell/default.nix b/pkgs/development/libraries/aspell/default.nix
index dd8b68717aae3593058765098375ae2430fbfb82..a69cee99b2b69c61d16407448797a83c90a0ee06 100644
--- a/pkgs/development/libraries/aspell/default.nix
+++ b/pkgs/development/libraries/aspell/default.nix
@@ -20,7 +20,7 @@ stdenv.mkDerivation rec {
# doesn't expand environment variables such as `$HOME'.
meta = {
- description = "GNU Aspell, A spell checker for many languages";
+ description = "Spell checker for many languages";
homepage = http://aspell.net/;
license = "LGPLv2+";
maintainers = [ ];
diff --git a/pkgs/development/libraries/atk/default.nix b/pkgs/development/libraries/atk/default.nix
index f4c33c869112cf8ee971ff152e18f99dcdd305c4..0c9e998ed2e12048810fcc7041cd2b5cb976d319 100644
--- a/pkgs/development/libraries/atk/default.nix
+++ b/pkgs/development/libraries/atk/default.nix
@@ -17,7 +17,7 @@ stdenv.mkDerivation rec {
postInstall = "rm -rf $out/share/gtk-doc";
meta = {
- description = "ATK, the accessibility toolkit";
+ description = "Accessibility toolkit";
longDescription = ''
ATK is the Accessibility Toolkit. It provides a set of generic
diff --git a/pkgs/development/libraries/attica/default.nix b/pkgs/development/libraries/attica/default.nix
index 87f6c019fb759cab4c5c9742cf20797207c4bfe3..3174dc57667dc0a4af3e7b25c69705baa503f245 100644
--- a/pkgs/development/libraries/attica/default.nix
+++ b/pkgs/development/libraries/attica/default.nix
@@ -12,7 +12,7 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ cmake ];
meta = with stdenv.lib; {
- description = "A library to access Open Collaboration Service providers";
+ description = "Library to access Open Collaboration Service providers";
license = "LGPL";
maintainers = [ maintainers.sander maintainers.urkud maintainers.phreedom ];
inherit (qt4.meta) platforms;
diff --git a/pkgs/development/libraries/aubio/default.nix b/pkgs/development/libraries/aubio/default.nix
index 91d27254aedefe2a03199d943018014cc6abe76a..abfb3985f261c6339614f90407e1d65d7938479c 100644
--- a/pkgs/development/libraries/aubio/default.nix
+++ b/pkgs/development/libraries/aubio/default.nix
@@ -16,7 +16,7 @@ stdenv.mkDerivation rec {
];
meta = {
- description = "A library for audio labelling";
+ description = "Library for audio labelling";
homepage = http://aubio.org/;
license = "GPLv2";
maintainers = [ stdenv.lib.maintainers.marcweber ];
diff --git a/pkgs/development/libraries/audiofile/default.nix b/pkgs/development/libraries/audiofile/default.nix
index 2f4de88c94c2b83c9366b68fb6548d5cbe33c5bf..73f38f028145c00877a885e65e7f5bb90e395afe 100644
--- a/pkgs/development/libraries/audiofile/default.nix
+++ b/pkgs/development/libraries/audiofile/default.nix
@@ -11,7 +11,7 @@ stdenv.mkDerivation rec {
};
meta = with stdenv.lib; {
- description = "A library for reading and writing audio files in various formats";
+ description = "Library for reading and writing audio files in various formats";
homepage = http://www.68k.org/~michael/audiofile/;
license = licenses.lgpl21Plus;
maintainers = with maintainers; [ lovek323 shlevy ];
diff --git a/pkgs/development/libraries/avahi/default.nix b/pkgs/development/libraries/avahi/default.nix
index f62dc2004476d9133d5950244998c2202c018d76..f4795286e096f64d4c5db2dcace0f82621c634ae 100644
--- a/pkgs/development/libraries/avahi/default.nix
+++ b/pkgs/development/libraries/avahi/default.nix
@@ -38,7 +38,7 @@ stdenv.mkDerivation rec {
'';
meta = with stdenv.lib; {
- description = "Avahi, an mDNS/DNS-SD implementation";
+ description = "mDNS/DNS-SD implementation";
homepage = http://avahi.org;
license = licenses.lgpl2Plus;
platforms = platforms.unix;
diff --git a/pkgs/development/libraries/bwidget/default.nix b/pkgs/development/libraries/bwidget/default.nix
index 31dc885bc433661ead148d89cea7e9ab4015790e..17f2b545168e396840c9f6a0f4d66b9f66d0e26c 100644
--- a/pkgs/development/libraries/bwidget/default.nix
+++ b/pkgs/development/libraries/bwidget/default.nix
@@ -24,7 +24,7 @@ stdenv.mkDerivation rec {
meta = {
homepage = "http://tcl.activestate.com/software/tcllib/";
- description = "The BWidget toolkit is a high-level widget set for Tcl/Tk.";
+ description = "High-level widget set for Tcl/Tk";
license = stdenv.lib.licenses.tcltk;
};
}
diff --git a/pkgs/development/libraries/classads/default.nix b/pkgs/development/libraries/classads/default.nix
index 5739690e59a1053fe463534e1132bd5fd5fecc24..080e854315dcc922363a6d05ff35cc0255a7cab1 100644
--- a/pkgs/development/libraries/classads/default.nix
+++ b/pkgs/development/libraries/classads/default.nix
@@ -16,7 +16,7 @@ stdenv.mkDerivation {
meta = {
homepage = http://www.cs.wisc.edu/condor/classad/;
- description = "The Classified Advertisements library provides a generic means for matching resources.";
+ description = "The Classified Advertisements library provides a generic means for matching resources";
license = "Apache-2.0";
};
}
diff --git a/pkgs/development/libraries/clucene-core/2.x.nix b/pkgs/development/libraries/clucene-core/2.x.nix
index 97c7a4c9f53a256266efe0af00b8bc85b7353ce9..60e8da9c3fc81f22758040935ba08b9fc7ca2c9c 100644
--- a/pkgs/development/libraries/clucene-core/2.x.nix
+++ b/pkgs/development/libraries/clucene-core/2.x.nix
@@ -21,7 +21,17 @@ stdenv.mkDerivation rec {
];
meta = {
- description = "CLucene is a port of the very popular Java Lucene text search engine API. Core package, 2.x branch.";
+ description = "Core library for full-featured text search engine";
+ longDescription = ''
+ CLucene is a high-performance, scalable, cross platform, full-featured,
+ open-source indexing and searching API. Specifically, CLucene is the guts
+ of a search engine, the hard stuff. You write the easy stuff: the UI and
+ the process of selecting and parsing your data files to pump them into
+ the search engine yourself, and any specialized queries to pull it back
+ for display or further processing.
+
+ CLucene is a port of the very popular Java Lucene text search engine API.
+ '';
homepage = http://clucene.sourceforge.net;
};
}
diff --git a/pkgs/development/libraries/clucene-core/default.nix b/pkgs/development/libraries/clucene-core/default.nix
index abd6712736f5d346f79f2209e8b2cc0525ba60ae..33a789266d48c084c46aecf06788e6cdf68d815b 100644
--- a/pkgs/development/libraries/clucene-core/default.nix
+++ b/pkgs/development/libraries/clucene-core/default.nix
@@ -9,7 +9,17 @@ stdenv.mkDerivation rec {
};
meta = {
- description = "CLucene is a port of the very popular Java Lucene text search engine API. Core package.";
+ description = "Core library for full-featured text search engine";
+ longDescription = ''
+ CLucene is a high-performance, scalable, cross platform, full-featured,
+ open-source indexing and searching API. Specifically, CLucene is the guts
+ of a search engine, the hard stuff. You write the easy stuff: the UI and
+ the process of selecting and parsing your data files to pump them into
+ the search engine yourself, and any specialized queries to pull it back
+ for display or further processing.
+
+ CLucene is a port of the very popular Java Lucene text search engine API.
+ '';
homepage = http://clucene.sourceforge.net;
};
}
diff --git a/pkgs/development/libraries/cogl/default.nix b/pkgs/development/libraries/cogl/default.nix
index 9c3a1a4d67474b8a82eb2647e8ab903658dfb5d0..abb92f7b08b45e29c2d988c511e5d59fde6cd9ca 100644
--- a/pkgs/development/libraries/cogl/default.nix
+++ b/pkgs/development/libraries/cogl/default.nix
@@ -35,6 +35,6 @@ stdenv.mkDerivation rec {
render without stepping on each other's toes.
'';
- inherit (glib.meta) platforms;
+ platforms = stdenv.lib.platforms.mesaPlatforms;
};
}
diff --git a/pkgs/development/libraries/coin3d/default.nix b/pkgs/development/libraries/coin3d/default.nix
index 5eb93621f416a97faa77d126d43f20b3128e5ba7..f866b2299c1f364077d842ca1f6d85a03a03a9bd 100644
--- a/pkgs/development/libraries/coin3d/default.nix
+++ b/pkgs/development/libraries/coin3d/default.nix
@@ -23,8 +23,7 @@ stdenv.mkDerivation rec {
meta = {
homepage = http://www.coin3d.org/;
license = "GPLv2+";
- description = "High-level, retained-mode toolkit for effective 3D graphics development.";
-
+ description = "High-level, retained-mode toolkit for effective 3D graphics development";
maintainers = [ stdenv.lib.maintainers.viric ];
platforms = stdenv.lib.platforms.linux;
};
diff --git a/pkgs/development/libraries/eventlog/default.nix b/pkgs/development/libraries/eventlog/default.nix
index b1239d6f4cf476863b4f8f161b55ce30e569dbd7..7a8ab8e464b4adc30a238324708c3ec8f4fdeccc 100644
--- a/pkgs/development/libraries/eventlog/default.nix
+++ b/pkgs/development/libraries/eventlog/default.nix
@@ -9,7 +9,15 @@ stdenv.mkDerivation {
};
meta = {
- description = "A new API to format and send structured log messages.";
+ description = "Syslog event logger library";
+ longDescription = ''
+ The EventLog library aims to be a replacement of the simple syslog() API
+ provided on UNIX systems. The major difference between EventLog and
+ syslog is that EventLog tries to add structure to messages.
+
+ Where you had a simple non-structrured string in syslog() you have a
+ combination of description and tag/value pairs.
+ '';
homepage = "http://www.balabit.com/support/community/products/";
license = "BSD";
};
diff --git a/pkgs/development/libraries/fox/fox-1.6.nix b/pkgs/development/libraries/fox/fox-1.6.nix
index 540c2c61d946922672ef6001dfcc74cf96628fd5..2a7bb1dc31a1b5a4e728cd5bc282597387fde573 100644
--- a/pkgs/development/libraries/fox/fox-1.6.nix
+++ b/pkgs/development/libraries/fox/fox-1.6.nix
@@ -31,6 +31,6 @@ stdenv.mkDerivation rec {
homepage = "http://fox-toolkit.org";
license = "LGPLv3";
maintainers = [ stdenv.lib.maintainers.bbenoist ];
- platforms = stdenv.lib.platforms.all;
+ platforms = stdenv.lib.platforms.mesaPlatforms;
};
}
diff --git a/pkgs/development/libraries/gnu-efi/default.nix b/pkgs/development/libraries/gnu-efi/default.nix
index ca24db94cd05e524f76d6d4a9d40210a85df8165..f741a0b4f34dcf558efec4305942d7f7b1faccc1 100644
--- a/pkgs/development/libraries/gnu-efi/default.nix
+++ b/pkgs/development/libraries/gnu-efi/default.nix
@@ -2,13 +2,13 @@
, fetchurl
}:
-let version = "3.0s"; in stdenv.mkDerivation {
+let version = "3.0u"; in stdenv.mkDerivation {
name = "gnu-efi-${version}";
src = fetchurl {
url = "mirror://sourceforge/gnu-efi/gnu-efi_${version}.orig.tar.gz";
- sha256 = "18bpswzkj81dadq1b7n2s9g0cz60l34ggzxlq21mb8va10j9zmhh";
+ sha256 = "0klkdxh1aqwwfm393q67nxww6liffyp2lfybbnh4q819b06la39w";
};
meta = {
@@ -34,7 +34,7 @@ let version = "3.0s"; in stdenv.mkDerivation {
'';
installPhase = ''
- make INSTALLROOT="$out" install
+ make PREFIX="$out" install
mkdir -pv $out/share/gnu-efi
install -D -m644 apps/*.efi $out/share/gnu-efi
'';
diff --git a/pkgs/development/libraries/gnutls/3.2.nix b/pkgs/development/libraries/gnutls/3.2.nix
new file mode 100644
index 0000000000000000000000000000000000000000..5a5b6aa94e2b4bd5cd3c513c6757d423d184cc0c
--- /dev/null
+++ b/pkgs/development/libraries/gnutls/3.2.nix
@@ -0,0 +1,73 @@
+{ fetchurl, stdenv, zlib, lzo, libtasn1, nettle, pkgconfig, lzip
+, guileBindings, guile, perl, gmp }:
+
+assert guileBindings -> guile != null;
+
+stdenv.mkDerivation (rec {
+
+ name = "gnutls-3.2.4";
+
+ src = fetchurl {
+ url = "ftp://ftp.gnutls.org/gcrypt/gnutls/v3.2/${name}.tar.lz";
+ sha256 = "0zl4h37g51xyaalv3qp2hvn1m6z7xzfw4yvpvi6mby4x5sqrrp8i";
+ };
+
+ # Note: GMP is a dependency of Nettle, whose public headers include
+ # GMP headers, hence the hack.
+ configurePhase = ''
+ ./configure --prefix="$out" \
+ --disable-dependency-tracking --enable-fast-install \
+ --without-p11-kit \
+ --with-lzo --with-libtasn1-prefix="${libtasn1}" \
+ --with-libnettle-prefix="${nettle}" \
+ CPPFLAGS="-I${gmp}/include" \
+ ${if guileBindings
+ then "--enable-guile --with-guile-site-dir=\"$out/share/guile/site\""
+ else ""}
+ '';
+
+ # Build of the Guile bindings is not parallel-safe. See
+ #
+ # for the actual fix.
+ enableParallelBuilding = false;
+
+ buildInputs = [ zlib lzo lzip ]
+ ++ stdenv.lib.optional guileBindings guile;
+
+ nativeBuildInputs = [ perl pkgconfig ];
+
+ propagatedBuildInputs = [ nettle libtasn1 ];
+
+ # XXX: Gnulib's `test-select' fails on FreeBSD:
+ # http://hydra.nixos.org/build/2962084/nixlog/1/raw .
+ doCheck = (!stdenv.isFreeBSD && !stdenv.isDarwin);
+
+ meta = with stdenv.lib; {
+ description = "The GNU Transport Layer Security Library";
+
+ longDescription = ''
+ GnuTLS is a project that aims to develop a library which
+ provides a secure layer, over a reliable transport
+ layer. Currently the GnuTLS library implements the proposed
+ standards by the IETF's TLS working group.
+
+ Quoting from the TLS protocol specification:
+
+ "The TLS protocol provides communications privacy over the
+ Internet. The protocol allows client/server applications to
+ communicate in a way that is designed to prevent eavesdropping,
+ tampering, or message forgery."
+ '';
+
+ homepage = http://www.gnu.org/software/gnutls/;
+ license = "LGPLv2.1+";
+ maintainers = [ ];
+ };
+}
+
+//
+
+(stdenv.lib.optionalAttrs stdenv.isFreeBSD {
+ # FreeBSD doesn't have , and Gnulib's `alloca' module isn't used.
+ patches = [ ./guile-gnulib-includes.patch ];
+}))
diff --git a/pkgs/development/libraries/gssdp/default.nix b/pkgs/development/libraries/gssdp/default.nix
index 28bad546084a48297d3c883fe5b6fa33f3163291..c33457544f5f8ef99f853edc362320081911dbf0 100644
--- a/pkgs/development/libraries/gssdp/default.nix
+++ b/pkgs/development/libraries/gssdp/default.nix
@@ -11,7 +11,7 @@ stdenv.mkDerivation {
buildInputs = [pkgconfig libsoup glib libxml2];
meta = {
- description = "A GObject-based API for handling resource discovery and announcement over SSDP.";
+ description = "GObject-based API for handling resource discovery and announcement over SSDP";
homepage = http://www.gupnp.org/;
license = "LGPL v2";
platforms = stdenv.lib.platforms.all;
diff --git a/pkgs/development/libraries/gurobi/default.nix b/pkgs/development/libraries/gurobi/default.nix
new file mode 100644
index 0000000000000000000000000000000000000000..4bdee56ae991debc18203ea812e4acd38a00aa4b
--- /dev/null
+++ b/pkgs/development/libraries/gurobi/default.nix
@@ -0,0 +1,25 @@
+{ stdenv, requireFile }:
+
+stdenv.mkDerivation {
+ name = "gurobi-5.6.0";
+
+ src = requireFile {
+ name = "gurobi5.6.0_linux64.tar.gz";
+ sha256 = "1qwfjyx5y71x97gkndqnl9h4xc8hl48zwcwss7jagqfj3gxwvnky";
+ url = "http://www.gurobi.com/download/gurobi-optimizer";
+ };
+
+ installPhase = "mv linux64 $out";
+
+ fixupPhase = ''
+ interp=`cat $NIX_GCC/nix-support/dynamic-linker`
+ find $out/bin -type f -executable -exec patchelf --interpreter "$interp" --set-rpath $out/lib {} \;
+ '';
+
+ meta = {
+ description = "State-of-the-art mathematical programming solver";
+ homepage = http://www.gurobi.com/;
+ license = "unfree";
+ maintainers = [ stdenv.lib.maintainers.shlevy ];
+ };
+}
diff --git a/pkgs/development/libraries/harfbuzz/default.nix b/pkgs/development/libraries/harfbuzz/default.nix
index 4fb024db0e13977db20a2f9973c238ccbed2d84c..1202ab5825d7710d3725d0e593959ce4dd41344a 100644
--- a/pkgs/development/libraries/harfbuzz/default.nix
+++ b/pkgs/development/libraries/harfbuzz/default.nix
@@ -1,4 +1,5 @@
-{ stdenv, fetchurl, pkgconfig, glib, freetype, libintlOrEmpty }:
+{ stdenv, fetchurl, pkgconfig, glib, freetype,
+ icu ? null, graphite2 ? null, libintlOrEmpty }:
stdenv.mkDerivation rec {
name = "harfbuzz-0.9.12";
@@ -8,7 +9,12 @@ stdenv.mkDerivation rec {
sha256 = "19cx5y2m20rp7z5j7mwqfb4ph2g8lrri69zim44x362y4w5gfly6";
};
- buildInputs = [ pkgconfig glib freetype ] ++ libintlOrEmpty;
+ buildInputs = [ pkgconfig glib freetype ]
+ ++ libintlOrEmpty;
+ propagatedBuildInputs = []
+ ++ (stdenv.lib.optionals (icu != null) [icu])
+ ++ (stdenv.lib.optionals (graphite2 != null) [graphite2])
+ ;
meta = {
description = "An OpenType text shaping engine";
diff --git a/pkgs/development/libraries/haskell/Cabal/1.18.1.nix b/pkgs/development/libraries/haskell/Cabal/1.18.1.1.nix
similarity index 89%
rename from pkgs/development/libraries/haskell/Cabal/1.18.1.nix
rename to pkgs/development/libraries/haskell/Cabal/1.18.1.1.nix
index f0792be6ec9f3e214aa9a53f125524cb5aacb770..431c62b85e0396f32bcf48bdcd30d9e1cb9f245a 100644
--- a/pkgs/development/libraries/haskell/Cabal/1.18.1.nix
+++ b/pkgs/development/libraries/haskell/Cabal/1.18.1.1.nix
@@ -5,8 +5,8 @@
cabal.mkDerivation (self: {
pname = "Cabal";
- version = "1.18.1";
- sha256 = "041m3xr8v0bbw0016lnzmnv9xpj15z5pd272j3sbsrwpmcyds3a0";
+ version = "1.18.1.1";
+ sha256 = "1qa6z9kb46hmix15fdjw80jqd69v4rxr52mfq25m8c60l3kxbiny";
buildDepends = [ deepseq filepath time ];
testDepends = [
extensibleExceptions filepath HUnit QuickCheck regexPosix
diff --git a/pkgs/development/libraries/haskell/ChasingBottoms/default.nix b/pkgs/development/libraries/haskell/ChasingBottoms/default.nix
index 719e5eb2cee981aeeae34e15577634e3fa3cd8fc..b22272a7703326fefe94e7d1b9b080d3cf3503c4 100644
--- a/pkgs/development/libraries/haskell/ChasingBottoms/default.nix
+++ b/pkgs/development/libraries/haskell/ChasingBottoms/default.nix
@@ -2,8 +2,8 @@
cabal.mkDerivation (self: {
pname = "ChasingBottoms";
- version = "1.3.0.6";
- sha256 = "1l40n1ylzrbp0lhm80q9djl8mf39zvmw7zzlg0gzxsqbzwbsggx8";
+ version = "1.3.0.7";
+ sha256 = "0g1bx6d2mi27qsb4bxvby50g39fm56gyi2658fyjiq1gamy50ypa";
isLibrary = true;
isExecutable = true;
buildDepends = [ mtl QuickCheck random syb ];
diff --git a/pkgs/development/libraries/haskell/GLFW/default.nix b/pkgs/development/libraries/haskell/GLFW/default.nix
index f204bcdf655438021c5140e980963451e6e34c2f..26a132ae0286a67e467e88c87d38bd1cd92c9beb 100644
--- a/pkgs/development/libraries/haskell/GLFW/default.nix
+++ b/pkgs/development/libraries/haskell/GLFW/default.nix
@@ -2,8 +2,8 @@
cabal.mkDerivation (self: {
pname = "GLFW";
- version = "0.5.1.0";
- sha256 = "190d75w84y9gayxvdz13dnzpyflc5qy4vdg5iv9p2dpcamcih3km";
+ version = "0.5.2.0";
+ sha256 = "06vps929dmk9yimfv7jj12m0p0bf4ih0ssf6rbcq2j6i9wbhpxq3";
buildDepends = [ OpenGL ];
extraLibraries = [ libX11 mesa ];
meta = {
diff --git a/pkgs/development/libraries/haskell/HTTP/4000.2.8.nix b/pkgs/development/libraries/haskell/HTTP/4000.2.8.nix
index 1b52261dea0899f2cc3f41106522b69e01847bb7..09f0b25910b9eea43e7622b3da777a64b8a9bc5d 100644
--- a/pkgs/development/libraries/haskell/HTTP/4000.2.8.nix
+++ b/pkgs/development/libraries/haskell/HTTP/4000.2.8.nix
@@ -12,6 +12,7 @@ cabal.mkDerivation (self: {
caseInsensitive conduit deepseq httpdShed httpTypes HUnit mtl
network pureMD5 split testFramework testFrameworkHunit wai warp
];
+ jailbreak = true;
doCheck = false;
meta = {
homepage = "https://github.com/haskell/HTTP";
diff --git a/pkgs/development/libraries/haskell/JuicyPixels/default.nix b/pkgs/development/libraries/haskell/JuicyPixels/default.nix
index 2a7bc888c48c24ef23d1cf569d679f52383770dc..b2947318a1f17440ca309befb6516a1960d8adce 100644
--- a/pkgs/development/libraries/haskell/JuicyPixels/default.nix
+++ b/pkgs/development/libraries/haskell/JuicyPixels/default.nix
@@ -1,13 +1,13 @@
-{ cabal, binary, deepseq, mmap, mtl, primitive, transformers
-, vector, zlib
+{ cabal, binary, deepseq, mtl, primitive, transformers, vector
+, zlib
}:
cabal.mkDerivation (self: {
pname = "JuicyPixels";
- version = "3.1";
- sha256 = "1z3adva85qgdyx85hldqi99lnb3pg7a42q44zxil4gxwi62pw4xr";
+ version = "3.1.1.1";
+ sha256 = "0lvhaa8pqknkcsfps5gcbwiqx0y1rhasiw9hwy7975vgpsh58dph";
buildDepends = [
- binary deepseq mmap mtl primitive transformers vector zlib
+ binary deepseq mtl primitive transformers vector zlib
];
meta = {
homepage = "https://github.com/Twinside/Juicy.Pixels";
diff --git a/pkgs/development/libraries/haskell/accelerate-fft/default.nix b/pkgs/development/libraries/haskell/accelerate-fft/default.nix
index 523e5ae1504c81940c002aafc0628bf55bd05a2b..4e9a75f64eefb494bb795657478ab6ff8a86402f 100644
--- a/pkgs/development/libraries/haskell/accelerate-fft/default.nix
+++ b/pkgs/development/libraries/haskell/accelerate-fft/default.nix
@@ -9,6 +9,6 @@ cabal.mkDerivation (self: {
homepage = "https://github.com/AccelerateHS/accelerate-fft";
description = "FFT using the Accelerate library";
license = self.stdenv.lib.licenses.bsd3;
- platforms = self.ghc.meta.platforms;
+ platforms = self.stdenv.lib.platforms.linux;
};
})
diff --git a/pkgs/development/libraries/haskell/accelerate/default.nix b/pkgs/development/libraries/haskell/accelerate/default.nix
index c2484116f465d83cce50934339b9dc9db05cb8c8..b7979f6f5f2a3d76641be698e8706bc564c57b79 100644
--- a/pkgs/development/libraries/haskell/accelerate/default.nix
+++ b/pkgs/development/libraries/haskell/accelerate/default.nix
@@ -5,6 +5,7 @@ cabal.mkDerivation (self: {
version = "0.13.0.5";
sha256 = "1vqkv3k0w1zy0111a786npf3hypbcg675lbdkv2cf3zx5hqcnn6j";
buildDepends = [ fclabels hashable hashtables ];
+ jailbreak = true;
meta = {
homepage = "https://github.com/AccelerateHS/accelerate/";
description = "An embedded language for accelerated array processing";
diff --git a/pkgs/development/libraries/haskell/aeson/default.nix b/pkgs/development/libraries/haskell/aeson/default.nix
index bcb202c64d07495136f9eeb8c6ce30803874fe5c..edd2a21040e8f599586d61354b2a57ab06046b8e 100644
--- a/pkgs/development/libraries/haskell/aeson/default.nix
+++ b/pkgs/development/libraries/haskell/aeson/default.nix
@@ -5,8 +5,8 @@
cabal.mkDerivation (self: {
pname = "aeson";
- version = "0.6.2.0";
- sha256 = "1f7bzgwl9pm5a79gr3a8wxh7dyz4k2508d0bw4l0mbjgv6r7s4an";
+ version = "0.6.2.1";
+ sha256 = "00fa13qr38s4c0fwfvpks3x3sb21kh71cv1v0x2zqg0adnaydknb";
buildDepends = [
attoparsec blazeBuilder deepseq dlist hashable mtl syb text time
unorderedContainers vector
diff --git a/pkgs/development/libraries/haskell/bifunctors/default.nix b/pkgs/development/libraries/haskell/bifunctors/default.nix
index c659c3bc3beaca6349618f71dcea517f16307ab6..d7c8fa6debb471f69068c064f1edaaa381e6e971 100644
--- a/pkgs/development/libraries/haskell/bifunctors/default.nix
+++ b/pkgs/development/libraries/haskell/bifunctors/default.nix
@@ -2,12 +2,12 @@
cabal.mkDerivation (self: {
pname = "bifunctors";
- version = "3.2.0.1";
- sha256 = "1biicx0zi48wzzi7vkhzvrdyk59hmmm1bqbsga6x5nbrbf3qrkm6";
+ version = "4.1.0.1";
+ sha256 = "1mf1v64g5pr2k1jpc7i4994ki2fp5vkxg4n5v84lfbl2r3kr92yg";
buildDepends = [ semigroupoids semigroups tagged ];
meta = {
homepage = "http://github.com/ekmett/bifunctors/";
- description = "Haskell 98 bifunctors";
+ description = "Bifunctors";
license = self.stdenv.lib.licenses.bsd3;
platforms = self.ghc.meta.platforms;
};
diff --git a/pkgs/development/libraries/haskell/bindings-DSL/default.nix b/pkgs/development/libraries/haskell/bindings-DSL/default.nix
index 5e4e5d79379ebb66aad8814e824db5ece203869b..ed2a631419ab3e8a7bc80ad90c8fb0f753eac593 100644
--- a/pkgs/development/libraries/haskell/bindings-DSL/default.nix
+++ b/pkgs/development/libraries/haskell/bindings-DSL/default.nix
@@ -2,8 +2,8 @@
cabal.mkDerivation (self: {
pname = "bindings-DSL";
- version = "1.0.19";
- sha256 = "0mjlv2ld1qdd83pv7khrk3f0g4ypk8a8z79ykp3nwbvlhhi7bp2h";
+ version = "1.0.20";
+ sha256 = "11qc02fkmrpy6c1a85lwlz06m4fpvfpbpbxgv5rkyb1amg2cnklq";
meta = {
homepage = "http://bitbucket.org/mauricio/bindings-dsl";
description = "FFI domain specific language, on top of hsc2hs";
diff --git a/pkgs/development/libraries/haskell/bindings-libusb/default.nix b/pkgs/development/libraries/haskell/bindings-libusb/default.nix
new file mode 100644
index 0000000000000000000000000000000000000000..aeea654577a214734d27313d69179bb1b6943d49
--- /dev/null
+++ b/pkgs/development/libraries/haskell/bindings-libusb/default.nix
@@ -0,0 +1,15 @@
+{ cabal, bindingsDSL, libusb }:
+
+cabal.mkDerivation (self: {
+ pname = "bindings-libusb";
+ version = "1.4.4.1";
+ sha256 = "1cip5a0n8svjkzawpx3wi9z7nywmn9bl3k2w559b3awy0wixybrx";
+ buildDepends = [ bindingsDSL ];
+ pkgconfigDepends = [ libusb ];
+ meta = {
+ homepage = "https://github.com/basvandijk/bindings-libusb";
+ description = "Low level bindings to libusb";
+ license = self.stdenv.lib.licenses.bsd3;
+ platforms = self.ghc.meta.platforms;
+ };
+})
diff --git a/pkgs/development/libraries/haskell/certificate/default.nix b/pkgs/development/libraries/haskell/certificate/default.nix
index 0a284cd9ba593af00cee289c39bad012be224ba8..95b990b464b46a0c053a60671dcb21eb59d99de6 100644
--- a/pkgs/development/libraries/haskell/certificate/default.nix
+++ b/pkgs/development/libraries/haskell/certificate/default.nix
@@ -4,8 +4,8 @@
cabal.mkDerivation (self: {
pname = "certificate";
- version = "1.3.8";
- sha256 = "1id3jfaisl04n1mjj9lbq3gyz8hyn3r9p9chzmfbra0pcj3vf1m0";
+ version = "1.3.9";
+ sha256 = "18g5rq7lpxmvmlnz610537w6mix6z6kxjrfj2ylbhkc81r5pn9g6";
isLibrary = true;
isExecutable = true;
buildDepends = [
diff --git a/pkgs/development/libraries/haskell/charset/default.nix b/pkgs/development/libraries/haskell/charset/default.nix
index 9aee9b97afe904e9e5a446d0ed2397c23562fcb4..829c35b7563272fa9bde0976f883d34b1bdef0cd 100644
--- a/pkgs/development/libraries/haskell/charset/default.nix
+++ b/pkgs/development/libraries/haskell/charset/default.nix
@@ -2,8 +2,8 @@
cabal.mkDerivation (self: {
pname = "charset";
- version = "0.3.5";
- sha256 = "0842jdqg7hipgkvax3p4cb2y3znsgcmbj9nfrg2448dg2nanlhsn";
+ version = "0.3.5.1";
+ sha256 = "0bf9s5r2j9bkwmjxzvj5c2c7bhnf5gyh2kkx67lmy8xqalfxgmwn";
buildDepends = [ semigroups unorderedContainers ];
meta = {
homepage = "http://github.com/ekmett/charset";
diff --git a/pkgs/development/libraries/haskell/cipher-aes/default.nix b/pkgs/development/libraries/haskell/cipher-aes/default.nix
index 5fc5905ebb92790bde01b6fc34555e1a03007b31..d68d2389e0e7207097b8dcfbeb7b193a3f04e39e 100644
--- a/pkgs/development/libraries/haskell/cipher-aes/default.nix
+++ b/pkgs/development/libraries/haskell/cipher-aes/default.nix
@@ -4,8 +4,8 @@
cabal.mkDerivation (self: {
pname = "cipher-aes";
- version = "0.2.5";
- sha256 = "1ayypdfn2nnxp595dpyivmzw2jc4iyjz2in3z7ldccx36gn5j6b3";
+ version = "0.2.6";
+ sha256 = "0ys5a1w5pwwr74k9wzcsh1flb2jdcvnp1zz7sjs14jpxclpd8x3i";
buildDepends = [ byteable cryptoCipherTypes securemem ];
testDepends = [
byteable cryptoCipherTests cryptoCipherTypes QuickCheck
diff --git a/pkgs/development/libraries/haskell/cipher-blowfish/default.nix b/pkgs/development/libraries/haskell/cipher-blowfish/default.nix
index 535a4b97fcad5903dbbb763f5d77450c2a6e8167..44a7d96907aa59054149bcbe8ce85d5e54416ddf 100644
--- a/pkgs/development/libraries/haskell/cipher-blowfish/default.nix
+++ b/pkgs/development/libraries/haskell/cipher-blowfish/default.nix
@@ -4,8 +4,8 @@
cabal.mkDerivation (self: {
pname = "cipher-blowfish";
- version = "0.0.2";
- sha256 = "08jc1qsvnyk7zm7bp0nibkc6lx3bkid79cn1r6fidmccf716r3sp";
+ version = "0.0.3";
+ sha256 = "0hb67gmiyqrknynz5am8nada1b1v47rqla87dw5nvfhxhl51fhcg";
buildDepends = [ byteable cryptoCipherTypes securemem vector ];
testDepends = [
byteable cryptoCipherTests cryptoCipherTypes QuickCheck
diff --git a/pkgs/development/libraries/haskell/cipher-camellia/default.nix b/pkgs/development/libraries/haskell/cipher-camellia/default.nix
index 6d29792ea337f2a4f5eeaeaa1b57cb9070728190..52217751d27af54e4cdb76a18d6d0787fefbb738 100644
--- a/pkgs/development/libraries/haskell/cipher-camellia/default.nix
+++ b/pkgs/development/libraries/haskell/cipher-camellia/default.nix
@@ -4,8 +4,8 @@
cabal.mkDerivation (self: {
pname = "cipher-camellia";
- version = "0.0.1";
- sha256 = "11narl4h77v7317hdqy8zxhym3k7xrmw97yfwh0vr8k1y5dkiqh3";
+ version = "0.0.2";
+ sha256 = "19z2mi1rvp8fsqjdbmrm1hdlxmx61yr55fyknmmn945qrlvx234d";
buildDepends = [ byteable cryptoCipherTypes securemem vector ];
testDepends = [
byteable cryptoCipherTests cryptoCipherTypes QuickCheck
diff --git a/pkgs/development/libraries/haskell/cipher-des/default.nix b/pkgs/development/libraries/haskell/cipher-des/default.nix
index 0340372d54b7fd01fcd22151eda3ea303fcc8f6f..16b953c10bd6dd2e10d2cc077bab0c6c03b451d8 100644
--- a/pkgs/development/libraries/haskell/cipher-des/default.nix
+++ b/pkgs/development/libraries/haskell/cipher-des/default.nix
@@ -4,8 +4,8 @@
cabal.mkDerivation (self: {
pname = "cipher-des";
- version = "0.0.4";
- sha256 = "18xpc7v0xyh0qb7p03ail1lyh376h1vg000xn22b5shpgp5kxiqq";
+ version = "0.0.5";
+ sha256 = "1j4nbmxdc3nb5q9gqmwp40dj7pdy71135kvhvl7dfh6mb18bk22v";
buildDepends = [ byteable cryptoCipherTypes securemem ];
testDepends = [
byteable cryptoCipherTests cryptoCipherTypes QuickCheck
diff --git a/pkgs/development/libraries/haskell/cipher-rc4/default.nix b/pkgs/development/libraries/haskell/cipher-rc4/default.nix
index 038e0dd3292d9489ec9edad916be5378ca2eed64..6485487a0e58cdfb9bf846e3e59b2b264e087113 100644
--- a/pkgs/development/libraries/haskell/cipher-rc4/default.nix
+++ b/pkgs/development/libraries/haskell/cipher-rc4/default.nix
@@ -4,8 +4,8 @@
cabal.mkDerivation (self: {
pname = "cipher-rc4";
- version = "0.1.3";
- sha256 = "1pdkm7m3v8c7wks7asvqixxjk9jixf78n489ckmw10p77wrqby78";
+ version = "0.1.4";
+ sha256 = "0k9qf0cn5yxc4qlqikcm5yyrnkkvr6g3v7306cp8iwz7r4dp6zn6";
buildDepends = [ byteable cryptoCipherTypes ];
testDepends = [
cryptoCipherTests cryptoCipherTypes QuickCheck testFramework
diff --git a/pkgs/development/libraries/haskell/citeproc-hs/default.nix b/pkgs/development/libraries/haskell/citeproc-hs/default.nix
index 573c5085b1095b2cacc9382358321258eb7d2e68..bdc78984c7bd651d21d0c7bba89754fad3f71cae 100644
--- a/pkgs/development/libraries/haskell/citeproc-hs/default.nix
+++ b/pkgs/development/libraries/haskell/citeproc-hs/default.nix
@@ -4,8 +4,8 @@
cabal.mkDerivation (self: {
pname = "citeproc-hs";
- version = "0.3.8";
- sha256 = "0wlfwjxg852qcgx54m99xm7hxsmcw8c8r7fyrsxyxl3054xnfwz8";
+ version = "0.3.9";
+ sha256 = "0f3l33a3rcp8lm8nkbda42lijjpaqa7cxszswhjryy1inywpsssg";
buildDepends = [
filepath hexpat hsBibutils HTTP json mtl network pandocTypes parsec
syb time utf8String
diff --git a/pkgs/development/libraries/haskell/comonad-transformers/default.nix b/pkgs/development/libraries/haskell/comonad-transformers/default.nix
index ef0ffe061985e71dc0c890b9cc0d6af17f3c0603..912b36057c0a93bc6ffa92b9f033244ea2c0f848 100644
--- a/pkgs/development/libraries/haskell/comonad-transformers/default.nix
+++ b/pkgs/development/libraries/haskell/comonad-transformers/default.nix
@@ -1,18 +1,13 @@
-{ cabal, comonad, contravariant, distributive, semigroupoids
-, semigroups, transformers
-}:
+{ cabal, comonad }:
cabal.mkDerivation (self: {
pname = "comonad-transformers";
- version = "3.1";
- sha256 = "024l437xfi0bkbn3121xi8slwsh9jby9a92qg1m5y0nmxzs9lxda";
- buildDepends = [
- comonad contravariant distributive semigroupoids semigroups
- transformers
- ];
+ version = "4.0";
+ sha256 = "13zzp6r6s6c80skniphwvzxhpazbyal5854m53139kgcw560rv6z";
+ buildDepends = [ comonad ];
meta = {
homepage = "http://github.com/ekmett/comonad-transformers/";
- description = "Comonad transformers";
+ description = "This package has been merged into comonad 4.0";
license = self.stdenv.lib.licenses.bsd3;
platforms = self.ghc.meta.platforms;
};
diff --git a/pkgs/development/libraries/haskell/comonad/default.nix b/pkgs/development/libraries/haskell/comonad/default.nix
index 472e4e315c1c78c19271c9793fdc617d7f521916..9457a2ad44dcdf5631437571d48feee6a5160431 100644
--- a/pkgs/development/libraries/haskell/comonad/default.nix
+++ b/pkgs/development/libraries/haskell/comonad/default.nix
@@ -1,14 +1,18 @@
-{ cabal, doctest, filepath, semigroups, tagged, transformers }:
+{ cabal, contravariant, distributive, doctest, filepath, mtl
+, semigroups, tagged, transformers
+}:
cabal.mkDerivation (self: {
pname = "comonad";
- version = "3.1";
- sha256 = "0sl9b3f1vwpjdvnrxv7b8n512w05pv4in6qx3l4sbksdp1zjvcyv";
- buildDepends = [ semigroups tagged transformers ];
+ version = "4.0";
+ sha256 = "1f57wqxy1la59kippbj924prnj53a5hwc2ppg48n9xx2wfr63iha";
+ buildDepends = [
+ contravariant distributive mtl semigroups tagged transformers
+ ];
testDepends = [ doctest filepath ];
meta = {
homepage = "http://github.com/ekmett/comonad/";
- description = "Haskell 98 compatible comonads";
+ description = "Comonads";
license = self.stdenv.lib.licenses.bsd3;
platforms = self.ghc.meta.platforms;
};
diff --git a/pkgs/development/libraries/haskell/comonads-fd/default.nix b/pkgs/development/libraries/haskell/comonads-fd/default.nix
index aac28ff08711ff98755cc04889d0e4b393f011dd..f55123f8fe18c0ebef9bd05982689e31e263d462 100644
--- a/pkgs/development/libraries/haskell/comonads-fd/default.nix
+++ b/pkgs/development/libraries/haskell/comonads-fd/default.nix
@@ -1,17 +1,14 @@
-{ cabal, comonad, comonadTransformers, mtl, semigroups
-, transformers
-}:
+{ cabal, comonad }:
cabal.mkDerivation (self: {
pname = "comonads-fd";
- version = "3.0.3";
- sha256 = "06x545yq5xc3kphjipkgjrgrfvvkjpy0wji9d5fw44ca91nzglww";
- buildDepends = [
- comonad comonadTransformers mtl semigroups transformers
- ];
+ version = "4.0";
+ sha256 = "19xpv0dsz7w3a1sq1gdxwzglfal45vj2s22zb12g9mpk5rp3hw1s";
+ buildDepends = [ comonad ];
+ noHaddock = true;
meta = {
homepage = "http://github.com/ekmett/comonads-fd/";
- description = "Comonad transformers using functional dependencies";
+ description = "This package has been merged into comonad 4.0";
license = self.stdenv.lib.licenses.bsd3;
platforms = self.ghc.meta.platforms;
};
diff --git a/pkgs/development/libraries/haskell/conduit/default.nix b/pkgs/development/libraries/haskell/conduit/default.nix
index 0e1757f7b507ef5cbee74f6494ea0b95458c8df5..ab41f5a5621df308c4e5c8507604193737f24d92 100644
--- a/pkgs/development/libraries/haskell/conduit/default.nix
+++ b/pkgs/development/libraries/haskell/conduit/default.nix
@@ -4,8 +4,8 @@
cabal.mkDerivation (self: {
pname = "conduit";
- version = "1.0.7.4";
- sha256 = "1bvi9gw9sfi1fml339rn3cfq4i3yd9j9vw41p5cpz5pnv3gw225x";
+ version = "1.0.8";
+ sha256 = "0qsi9p7hwzaw1ridgydfmaagjjpkbgq755b1r9xm4apdy6fikcz5";
buildDepends = [
liftedBase mmorph monadControl mtl resourcet text transformers
transformersBase void
diff --git a/pkgs/development/libraries/haskell/connection/default.nix b/pkgs/development/libraries/haskell/connection/default.nix
new file mode 100644
index 0000000000000000000000000000000000000000..a7930cab08b31790f4393f8074f0b5c5c062508f
--- /dev/null
+++ b/pkgs/development/libraries/haskell/connection/default.nix
@@ -0,0 +1,18 @@
+{ cabal, certificate, cprngAes, dataDefault, network, socks, tls
+, tlsExtra
+}:
+
+cabal.mkDerivation (self: {
+ pname = "connection";
+ version = "0.1.3";
+ sha256 = "13bwlbga612kc7g3m3rrdzbdv4w0glp4af9r6crwgjsmxgimrgs9";
+ buildDepends = [
+ certificate cprngAes dataDefault network socks tls tlsExtra
+ ];
+ meta = {
+ homepage = "http://github.com/vincenthz/hs-connection";
+ description = "Simple and easy network connections API";
+ license = self.stdenv.lib.licenses.bsd3;
+ platforms = self.ghc.meta.platforms;
+ };
+})
diff --git a/pkgs/development/libraries/haskell/constraints/default.nix b/pkgs/development/libraries/haskell/constraints/default.nix
index 87ec5d82724b9d99f5af1473f3f77da9181f0e1a..e57b4e6c085b2faaa1faf9470222bfa267006590 100644
--- a/pkgs/development/libraries/haskell/constraints/default.nix
+++ b/pkgs/development/libraries/haskell/constraints/default.nix
@@ -2,8 +2,8 @@
cabal.mkDerivation (self: {
pname = "constraints";
- version = "0.3.3";
- sha256 = "0mglqd6l6bc333i7gymbm8q037hj5fny6jzyg1zmw5kg6r3xcwdi";
+ version = "0.3.4.1";
+ sha256 = "13jxh2cgcfyiqhx7j5063k8k60wz9h4hd5lf2mw2skbcryg6csmb";
buildDepends = [ newtype ];
meta = {
homepage = "http://github.com/ekmett/constraints/";
diff --git a/pkgs/development/libraries/haskell/crypto-cipher-tests/default.nix b/pkgs/development/libraries/haskell/crypto-cipher-tests/default.nix
index 752ef8fdf9e4d797434ad2da323279ad2a4f4607..ed071bbc92a6a89997a32953bbd3ce74b7a18cfe 100644
--- a/pkgs/development/libraries/haskell/crypto-cipher-tests/default.nix
+++ b/pkgs/development/libraries/haskell/crypto-cipher-tests/default.nix
@@ -5,8 +5,8 @@
cabal.mkDerivation (self: {
pname = "crypto-cipher-tests";
- version = "0.0.8";
- sha256 = "0bprv2pj3acq97482wsz1pp76rrdvvy5scv4na8aqfsdsglbjq47";
+ version = "0.0.10";
+ sha256 = "1gmhpk1pdc9axkmpw9fyr1zgv6pskyzzlsq8icp2w4fc83l61smb";
buildDepends = [
byteable cryptoCipherTypes HUnit mtl QuickCheck securemem
testFramework testFrameworkHunit testFrameworkQuickcheck2
diff --git a/pkgs/development/libraries/haskell/crypto-cipher-types/default.nix b/pkgs/development/libraries/haskell/crypto-cipher-types/default.nix
index 2dc8636024155d4757027fa30102aa6d482be7b8..70e61054137f32bfb79117eadbe2f0e9eb24b5d1 100644
--- a/pkgs/development/libraries/haskell/crypto-cipher-types/default.nix
+++ b/pkgs/development/libraries/haskell/crypto-cipher-types/default.nix
@@ -2,8 +2,8 @@
cabal.mkDerivation (self: {
pname = "crypto-cipher-types";
- version = "0.0.6";
- sha256 = "1gw3nmf242fbmwhpwk1v1sxhvw1dcy9l06aj6ag0wqb12qn2bqmg";
+ version = "0.0.7";
+ sha256 = "1zvlc88c4w4rhj1imx3w3j3f4b6im9sj78fgwwyzwmn14mn1y6l8";
buildDepends = [ byteable securemem ];
meta = {
homepage = "http://github.com/vincenthz/hs-crypto-cipher";
diff --git a/pkgs/development/libraries/haskell/cryptohash/default.nix b/pkgs/development/libraries/haskell/cryptohash/default.nix
index d598b36393394b1c13dc140f29014e16597e3bed..839bf4518a19be557464cbfb4c08e963f713c327 100644
--- a/pkgs/development/libraries/haskell/cryptohash/default.nix
+++ b/pkgs/development/libraries/haskell/cryptohash/default.nix
@@ -4,11 +4,11 @@
cabal.mkDerivation (self: {
pname = "cryptohash";
- version = "0.10.0";
- sha256 = "0szvx1dxf16chlksmp08g9qxy7f87w6hspigwbw78aygc3q9mzaq";
+ version = "0.11.1";
+ sha256 = "0ww7bikl8i50m1pwkqp145bfsiy07npnjw48j3il4w2ia0b3axmy";
buildDepends = [ byteable ];
testDepends = [
- HUnit QuickCheck testFramework testFrameworkHunit
+ byteable HUnit QuickCheck testFramework testFrameworkHunit
testFrameworkQuickcheck2
];
meta = {
diff --git a/pkgs/development/libraries/haskell/cufft/default.nix b/pkgs/development/libraries/haskell/cufft/default.nix
index 76039f065488e7c8ce224ee66612d2647dc10f68..213072b5cdfc4630303547d873499dfc27f837ce 100644
--- a/pkgs/development/libraries/haskell/cufft/default.nix
+++ b/pkgs/development/libraries/haskell/cufft/default.nix
@@ -10,6 +10,6 @@ cabal.mkDerivation (self: {
homepage = "http://github.com/robeverest/cufft";
description = "Haskell bindings for the CUFFT library";
license = self.stdenv.lib.licenses.bsd3;
- platforms = self.ghc.meta.platforms;
+ platforms = self.stdenv.lib.platforms.linux;
};
})
diff --git a/pkgs/development/libraries/haskell/distributive/default.nix b/pkgs/development/libraries/haskell/distributive/default.nix
index d40952024ef2ac7829f02a51195a0cb5712b820c..d03257f54d3479401de93b374c21ed5b93272312 100644
--- a/pkgs/development/libraries/haskell/distributive/default.nix
+++ b/pkgs/development/libraries/haskell/distributive/default.nix
@@ -2,8 +2,8 @@
cabal.mkDerivation (self: {
pname = "distributive";
- version = "0.3.1";
- sha256 = "0zf3wq1xz9sbb0g6fg852jckrwkffsfkghq3zx03d2q9ginc6jbc";
+ version = "0.3.2";
+ sha256 = "1n2xnjffrbfw736qn9w5fxy4pjl2319yhimkglhbayq85pz51r1h";
buildDepends = [ transformers transformersCompat ];
testDepends = [ doctest filepath ];
meta = {
diff --git a/pkgs/development/libraries/haskell/either/default.nix b/pkgs/development/libraries/haskell/either/default.nix
index 67c1962cbe9ca225f3650665b549eada6c428218..93dfd043c907162cf21b9b48e0da3c2e0ff3b5df 100644
--- a/pkgs/development/libraries/haskell/either/default.nix
+++ b/pkgs/development/libraries/haskell/either/default.nix
@@ -3,8 +3,8 @@
cabal.mkDerivation (self: {
pname = "either";
- version = "3.4.1";
- sha256 = "1cq4glqhxz9k8fxf0dc8b6hcxxfn4yci6h7wmfkmkfq5ca61ax1b";
+ version = "4.0";
+ sha256 = "07axaq43cqyglndr5az7ns4mvkjmybq6z8s32l1jxc5x7532scwr";
buildDepends = [
MonadRandom mtl semigroupoids semigroups transformers
];
diff --git a/pkgs/development/libraries/haskell/entropy/default.nix b/pkgs/development/libraries/haskell/entropy/default.nix
index 17409f05eed539a994504c9441d868e35a7fb457..f2154ddddf7b4b494d5d952271dd427510911536 100644
--- a/pkgs/development/libraries/haskell/entropy/default.nix
+++ b/pkgs/development/libraries/haskell/entropy/default.nix
@@ -2,8 +2,8 @@
cabal.mkDerivation (self: {
pname = "entropy";
- version = "0.2.2.2";
- sha256 = "1xkpfi6njj5iqwn5wa6npyzxksj9hr0xqbxrslg646whxrkd8718";
+ version = "0.2.2.4";
+ sha256 = "1cjmpb0rh1ib4j9mwmf1irn401vmjawxkshxdmmb4643rmcgx1gm";
meta = {
homepage = "https://github.com/TomMD/entropy";
description = "A platform independent entropy source";
diff --git a/pkgs/development/libraries/haskell/enumerator/default.nix b/pkgs/development/libraries/haskell/enumerator/default.nix
index 5b44c9efc62a94b9350629921e131a69cb280e51..4dfa4e573dd91dc27a1a99a3f6f0ceacfa68a4a7 100644
--- a/pkgs/development/libraries/haskell/enumerator/default.nix
+++ b/pkgs/development/libraries/haskell/enumerator/default.nix
@@ -2,8 +2,8 @@
cabal.mkDerivation (self: {
pname = "enumerator";
- version = "0.4.19";
- sha256 = "1avxy55vbvkz6yj512bkb2b986y3m0b28c9c5lfc3wd2na7w1s5g";
+ version = "0.4.20";
+ sha256 = "02a75dggj295zkhgjry5cb43s6y6ydpjb5w6vgl7kd9b6ma11qik";
buildDepends = [ text transformers ];
meta = {
homepage = "https://john-millikin.com/software/enumerator/";
diff --git a/pkgs/development/libraries/haskell/errors/default.nix b/pkgs/development/libraries/haskell/errors/default.nix
index d15ac59febabb2fdb4cda258726bcff78eda6fe4..be061cfb44334ea6e8a2cb5c3e7d9170ae78768e 100644
--- a/pkgs/development/libraries/haskell/errors/default.nix
+++ b/pkgs/development/libraries/haskell/errors/default.nix
@@ -5,6 +5,7 @@ cabal.mkDerivation (self: {
version = "1.4.2";
sha256 = "1csry8bbz7r4gc7x3lf1ih10rvnig2i91nfij227p9744yndl2xw";
buildDepends = [ either safe transformers ];
+ jailbreak = true;
meta = {
description = "Simplified error-handling";
license = self.stdenv.lib.licenses.bsd3;
diff --git a/pkgs/development/libraries/haskell/fclabels/default.nix b/pkgs/development/libraries/haskell/fclabels/default.nix
index 71a3fe8d0c238dcdab91ac821e94bc297f58e65b..cea3302cf58cf3c3f060c0103dbfc266df2c3c1d 100644
--- a/pkgs/development/libraries/haskell/fclabels/default.nix
+++ b/pkgs/development/libraries/haskell/fclabels/default.nix
@@ -2,12 +2,12 @@
cabal.mkDerivation (self: {
pname = "fclabels";
- version = "1.1.7.1";
- sha256 = "1f34r3bzn1cbba8d5d1j3wxrlrrj5vf09hpgd6ppina91wyj4dyn";
+ version = "2.0";
+ sha256 = "1zh8hr0nq7vnp0q5yf0qd4sbxpaq67l15gs1rvssxfj6n738kngq";
buildDepends = [ mtl transformers ];
meta = {
homepage = "https://github.com/sebastiaanvisser/fclabels";
- description = "First class accessor labels";
+ description = "First class accessor labels implemented as lenses";
license = self.stdenv.lib.licenses.bsd3;
platforms = self.ghc.meta.platforms;
maintainers = [ self.stdenv.lib.maintainers.andres ];
diff --git a/pkgs/development/libraries/haskell/file-embed/default.nix b/pkgs/development/libraries/haskell/file-embed/default.nix
index 2eb9ac94d8c399d6770dfd7e13726eff2e42909b..3d7015d7ec2020494b591073d98aab1e3fc631d1 100644
--- a/pkgs/development/libraries/haskell/file-embed/default.nix
+++ b/pkgs/development/libraries/haskell/file-embed/default.nix
@@ -2,8 +2,8 @@
cabal.mkDerivation (self: {
pname = "file-embed";
- version = "0.0.4.9";
- sha256 = "128z3jwxn6d13dkrfjx7maxgmax8bfgr8n2jfhqg3rvv4ryjnqv2";
+ version = "0.0.5";
+ sha256 = "0s77g7azw73f7d07hvwwps8sx79jpwj8ap9iqzcglyjw1sw4l1n1";
buildDepends = [ filepath ];
testDepends = [ filepath HUnit ];
meta = {
diff --git a/pkgs/development/libraries/haskell/free/default.nix b/pkgs/development/libraries/haskell/free/default.nix
index 56bf80d71af413254c293def6ac234909ff489ec..64d9541f4019c3b6bb0b6c7becedf20dc60ac1ee 100644
--- a/pkgs/development/libraries/haskell/free/default.nix
+++ b/pkgs/development/libraries/haskell/free/default.nix
@@ -1,15 +1,14 @@
-{ cabal, bifunctors, comonad, comonadsFd, comonadTransformers
-, distributive, mtl, profunctors, semigroupoids, semigroups
-, transformers
+{ cabal, bifunctors, comonad, distributive, mtl, profunctors
+, semigroupoids, semigroups, transformers
}:
cabal.mkDerivation (self: {
pname = "free";
- version = "3.4.2";
- sha256 = "1x6pdkcxk6z9ndph2yzz5n21afc2330m0ryv4w67jsss5aa69fwb";
+ version = "4.1";
+ sha256 = "16951r4f7ggvcw2qgjwdrmaxxnrmrm69c67nixs77lm1d31nks4w";
buildDepends = [
- bifunctors comonad comonadsFd comonadTransformers distributive mtl
- profunctors semigroupoids semigroups transformers
+ bifunctors comonad distributive mtl profunctors semigroupoids
+ semigroups transformers
];
meta = {
homepage = "http://github.com/ekmett/free/";
diff --git a/pkgs/development/libraries/haskell/ghc-mod/default.nix b/pkgs/development/libraries/haskell/ghc-mod/default.nix
index 3504e79d54b71652bb66bd2c58de43147384bcfa..977a15d28e06435a3d80c8b58126e340c9049b35 100644
--- a/pkgs/development/libraries/haskell/ghc-mod/default.nix
+++ b/pkgs/development/libraries/haskell/ghc-mod/default.nix
@@ -4,8 +4,8 @@
cabal.mkDerivation (self: {
pname = "ghc-mod";
- version = "3.1.2";
- sha256 = "164ldbdvr2qrnb9sq0d9y35la4fzwn6x43xqdsi1s10dppckczlm";
+ version = "3.1.3";
+ sha256 = "0g12cj8yn2znhqi7wiz5jayzh4g5jdcj1qwy5g3pz456hcpb0jig";
isLibrary = true;
isExecutable = true;
buildDepends = [
diff --git a/pkgs/development/libraries/haskell/groupoids/default.nix b/pkgs/development/libraries/haskell/groupoids/default.nix
index 4c085c0ae23bf9ba128ece9a303d1a7ecea11d93..7697e8e369f9dfdb79edb5e3b920ac9bca815bff 100644
--- a/pkgs/development/libraries/haskell/groupoids/default.nix
+++ b/pkgs/development/libraries/haskell/groupoids/default.nix
@@ -2,12 +2,13 @@
cabal.mkDerivation (self: {
pname = "groupoids";
- version = "3.0.1.1";
- sha256 = "0r4xjyq7icd52nas27bhr5k8q7li6lba8mlkcipghhsgxsyjfp63";
+ version = "4.0";
+ sha256 = "08la44c19pz2clws5mb939zc1d17cb6qy9qlh2n1634pl0zrawb6";
buildDepends = [ semigroupoids ];
+ noHaddock = true;
meta = {
homepage = "http://github.com/ekmett/groupoids/";
- description = "Haskell 98 Groupoids";
+ description = "This package has been absorbed into semigroupoids 4.0";
license = self.stdenv.lib.licenses.bsd3;
platforms = self.ghc.meta.platforms;
};
diff --git a/pkgs/development/libraries/haskell/hakyll/default.nix b/pkgs/development/libraries/haskell/hakyll/default.nix
index 0197bc4d142e58662f916f6c88da8768d7edc2d4..27f3d6629d5ce859e7af59a9e535b4a3426b73d5 100644
--- a/pkgs/development/libraries/haskell/hakyll/default.nix
+++ b/pkgs/development/libraries/haskell/hakyll/default.nix
@@ -1,38 +1,34 @@
-{ cabal, binary, blazeHtml, blazeMarkup, pandocCiteproc, cmdargs
-, cryptohash, dataDefault, deepseq, filepath, fsnotify, httpConduit
-, httpTypes, HUnit, lrucache, mtl, network, pandoc, parsec
+{ cabal, binary, blazeHtml, blazeMarkup, cmdargs, cryptohash
+, dataDefault, deepseq, filepath, fsnotify, httpConduit, httpTypes
+, HUnit, lrucache, mtl, network, pandoc, pandocCiteproc, parsec
, QuickCheck, random, regexBase, regexTdfa, snapCore, snapServer
, systemFilepath, tagsoup, testFramework, testFrameworkHunit
-, testFrameworkQuickcheck2, text, time, fetchurl
+, testFrameworkQuickcheck2, text, time
}:
cabal.mkDerivation (self: {
pname = "hakyll";
- version = "4.3.3.0";
- sha256 = "11zfz55a7dr5l7xzknphqninyrb2pw2qmrs7v7ajq2gvbl0lf37n";
+ version = "4.4.1.0";
+ sha256 = "17bns61l5d0h8qyhbz5gnc4j9yjjajk57whp0j4gfshaq0s2aif9";
isLibrary = true;
isExecutable = true;
- patches = [ (fetchurl { url = "https://github.com/jaspervdj/hakyll/pull/183.patch";
- sha256 = "0vjrxvgyc05nnshapjhk65pcamj9rigqff5q6wjbssx3ggqggrz9";
- name = "hakyll-pandoc-fix.patch";
- }) ];
buildDepends = [
- binary blazeHtml blazeMarkup pandocCiteproc cmdargs cryptohash
- dataDefault deepseq filepath fsnotify httpConduit httpTypes
- lrucache mtl network pandoc parsec random regexBase regexTdfa
- snapCore snapServer systemFilepath tagsoup text time
+ binary blazeHtml blazeMarkup cmdargs cryptohash dataDefault deepseq
+ filepath fsnotify httpConduit httpTypes lrucache mtl network pandoc
+ pandocCiteproc parsec random regexBase regexTdfa snapCore
+ snapServer systemFilepath tagsoup text time
];
testDepends = [
- binary blazeHtml blazeMarkup pandocCiteproc cmdargs cryptohash
- dataDefault deepseq filepath fsnotify httpConduit httpTypes HUnit
- lrucache mtl network pandoc parsec QuickCheck random regexBase
- regexTdfa snapCore snapServer systemFilepath tagsoup testFramework
+ binary blazeHtml blazeMarkup cmdargs cryptohash dataDefault deepseq
+ filepath fsnotify httpConduit httpTypes HUnit lrucache mtl network
+ pandoc pandocCiteproc parsec QuickCheck random regexBase regexTdfa
+ snapCore snapServer systemFilepath tagsoup testFramework
testFrameworkHunit testFrameworkQuickcheck2 text time
];
- doCheck = false;
- postPatch = ''
+ patchPhase = ''
sed -i -e 's|cryptohash.*,|cryptohash,|' -e 's|tagsoup.*,|tagsoup,|' hakyll.cabal
'';
+ doCheck = false;
meta = {
homepage = "http://jaspervdj.be/hakyll";
description = "A static website compiler library";
diff --git a/pkgs/development/libraries/haskell/hamlet/default.nix b/pkgs/development/libraries/haskell/hamlet/default.nix
index c29672767a6b619b2809c2081087fa2734204916..b40025ff7166b29f9add6527c527e5652a4bb358 100644
--- a/pkgs/development/libraries/haskell/hamlet/default.nix
+++ b/pkgs/development/libraries/haskell/hamlet/default.nix
@@ -4,8 +4,8 @@
cabal.mkDerivation (self: {
pname = "hamlet";
- version = "1.1.7.2";
- sha256 = "1pfpygbabfmgx01vjkxhf3p9map2v7x8jys06jd6qgc4j90dnk1c";
+ version = "1.1.7.3";
+ sha256 = "0532gf4xdbjxjpv7gsfv0bapnnb4g81jcfzkn71nwizi8zls3qck";
buildDepends = [
blazeBuilder blazeHtml blazeMarkup failure parsec shakespeare text
];
diff --git a/pkgs/development/libraries/haskell/happstack/happstack-server.nix b/pkgs/development/libraries/haskell/happstack/happstack-server.nix
index f58e4ba2d3d11c57c3525b23b5578bc6a32f9313..e12d848f00f914116218ddcfef2ca96374b37d94 100644
--- a/pkgs/development/libraries/haskell/happstack/happstack-server.nix
+++ b/pkgs/development/libraries/haskell/happstack/happstack-server.nix
@@ -7,8 +7,8 @@
cabal.mkDerivation (self: {
pname = "happstack-server";
- version = "7.3.0";
- sha256 = "094q6m6a4cxwmmw9hin2pphiq8gi0y4ma4vkvqv7rwqnn3mf9n0q";
+ version = "7.3.1";
+ sha256 = "0yk4ylyyc8pz7j5lxibah356f986w932ncxp4y612rqcd0abzrq4";
buildDepends = [
base64Bytestring blazeHtml extensibleExceptions filepath hslogger
html monadControl mtl network parsec sendfile syb systemFilepath
diff --git a/pkgs/development/libraries/haskell/hashtables/default.nix b/pkgs/development/libraries/haskell/hashtables/default.nix
index ae62c051ec5e95678519ef4e2627094b5626467b..ca0e2e529c569fdbf1e8eb21c5e52787e6503038 100644
--- a/pkgs/development/libraries/haskell/hashtables/default.nix
+++ b/pkgs/development/libraries/haskell/hashtables/default.nix
@@ -2,8 +2,8 @@
cabal.mkDerivation (self: {
pname = "hashtables";
- version = "1.1.0.2";
- sha256 = "0d103cvr168hgyghm6fp67r4lz1p592x45igwld6xq3nyxjxnbp9";
+ version = "1.1.2.1";
+ sha256 = "1166baqalpp9v735821drjvyasr44p4znbcs7njyr09fx87r23f5";
buildDepends = [ hashable primitive vector ];
meta = {
homepage = "http://github.com/gregorycollins/hashtables";
diff --git a/pkgs/development/libraries/haskell/haskell-src-meta/default.nix b/pkgs/development/libraries/haskell/haskell-src-meta/default.nix
index 7c9e76940462b8ea4c0d39d5737e08538f4f40ba..6ce8f9e72ba2179bf6ad20b82de4cb916742707f 100644
--- a/pkgs/development/libraries/haskell/haskell-src-meta/default.nix
+++ b/pkgs/development/libraries/haskell/haskell-src-meta/default.nix
@@ -2,8 +2,8 @@
cabal.mkDerivation (self: {
pname = "haskell-src-meta";
- version = "0.6.0.3";
- sha256 = "1ag26pzppvqw9ch6jz1p0bhsld7fz0b01k7h9516hnmy215h7xai";
+ version = "0.6.0.4";
+ sha256 = "10dixf2abk0canwikf3wdp1ahc51400wxa7x4g59pygv8a3c1c1x";
buildDepends = [ haskellSrcExts syb thOrphans uniplate ];
jailbreak = true;
meta = {
diff --git a/pkgs/development/libraries/haskell/haxr/default.nix b/pkgs/development/libraries/haskell/haxr/default.nix
index a5aaf44c3928c4cb005c947507fb198ce56dcc03..26ebbb9f8b02bfd84bcb3a4c42479e15cb286978 100644
--- a/pkgs/development/libraries/haskell/haxr/default.nix
+++ b/pkgs/development/libraries/haskell/haxr/default.nix
@@ -4,8 +4,8 @@
cabal.mkDerivation (self: {
pname = "haxr";
- version = "3000.9.3";
- sha256 = "1jg7abgbykxjjpmakmfm6zcwxn0hf9q53430ibr4m9n6alh7nglq";
+ version = "3000.10.1.1";
+ sha256 = "0qvbl3bms2mf650w9j3r0pnl151vzkggy2if3f4rj34qwb2sxmvp";
buildDepends = [
base64Bytestring blazeBuilder HaXml HTTP mtl network time
utf8String
diff --git a/pkgs/development/libraries/haskell/heist/default.nix b/pkgs/development/libraries/haskell/heist/default.nix
index c39a1fc24a8c616e1fc05376be80a7152361098f..b8f709a402cb5ab30ed8e8d25a87b38bfe29df3f 100644
--- a/pkgs/development/libraries/haskell/heist/default.nix
+++ b/pkgs/development/libraries/haskell/heist/default.nix
@@ -6,8 +6,8 @@
cabal.mkDerivation (self: {
pname = "heist";
- version = "0.13.0.1";
- sha256 = "1hxf131xhvsqbvmrm8wbjpndy41pz1lq65gqlk3lxr57dhi59s4w";
+ version = "0.13.0.2";
+ sha256 = "0rbzizgrvwj505dk7qyc9ky5vwyaxyj91xz1dsv0mv7cjl9pp17n";
buildDepends = [
aeson attoparsec blazeBuilder blazeHtml directoryTree dlist errors
filepath hashable MonadCatchIOTransformers mtl random text time
diff --git a/pkgs/development/libraries/haskell/hflags/default.nix b/pkgs/development/libraries/haskell/hflags/default.nix
index f65520da532d62c0b215103bf229d7859b797f34..04e70183781dd2abef54097d854cce2fe900768e 100644
--- a/pkgs/development/libraries/haskell/hflags/default.nix
+++ b/pkgs/development/libraries/haskell/hflags/default.nix
@@ -2,8 +2,8 @@
cabal.mkDerivation (self: {
pname = "hflags";
- version = "0.3";
- sha256 = "113pqdjnxfhkk95969ia393n1jvbbnfljsz42vfapgzvd8f1fci2";
+ version = "0.4";
+ sha256 = "17zzx273kmnwwazmmns78cllz3l7wad1gi7hizgcxi68j04blhd4";
buildDepends = [ text ];
meta = {
homepage = "http://github.com/errge/hflags";
diff --git a/pkgs/development/libraries/haskell/hjsmin/default.nix b/pkgs/development/libraries/haskell/hjsmin/default.nix
index 9551581dadf6216c3cec3b3fd38258cdafc9ecd0..5980141526b0d658d61cec588ec64d8cfb0665d6 100644
--- a/pkgs/development/libraries/haskell/hjsmin/default.nix
+++ b/pkgs/development/libraries/haskell/hjsmin/default.nix
@@ -4,8 +4,8 @@
cabal.mkDerivation (self: {
pname = "hjsmin";
- version = "0.1.4.1";
- sha256 = "0r73hd6kn37mdbm2i3g6v3qqm696kyflqs6ajq68qr5sr62sjb1a";
+ version = "0.1.4.3";
+ sha256 = "1jhpqfvwvzik41i4mi9fr9w1jlrlc1lj2illlbbwg7r3fwr5hnnl";
buildDepends = [ blazeBuilder languageJavascript text ];
testDepends = [
blazeBuilder Cabal HUnit languageJavascript QuickCheck
diff --git a/pkgs/development/libraries/haskell/hslua/default.nix b/pkgs/development/libraries/haskell/hslua/default.nix
index e953eb74711dfc9387885cb050eb87468967064e..ebccbf963fedfb8fc191f6e9f610ab7693cd79ea 100644
--- a/pkgs/development/libraries/haskell/hslua/default.nix
+++ b/pkgs/development/libraries/haskell/hslua/default.nix
@@ -1,10 +1,12 @@
-{ cabal, mtl }:
+{ cabal, lua, mtl }:
cabal.mkDerivation (self: {
pname = "hslua";
- version = "0.3.6.1";
- sha256 = "0c60gnf0mp6kx2z2149icl7hdwvigibvxd091a3vc6zkl5c5r41p";
+ version = "0.3.7";
+ sha256 = "1q5s2b7x9idvdvp31yl86mmy476gfq6rg8f0r8faqxrm45jwgv2q";
buildDepends = [ mtl ];
+ pkgconfigDepends = [ lua ];
+ configureFlags = "-fsystem-lua";
meta = {
description = "A Lua language interpreter embedding in Haskell";
license = self.stdenv.lib.licenses.bsd3;
diff --git a/pkgs/development/libraries/haskell/intervals/default.nix b/pkgs/development/libraries/haskell/intervals/default.nix
index 3cc44b05dbb52231a5fc9a2dc0902e9849089d3e..9a270574570e9d526d5c8359ed9b39c822047e98 100644
--- a/pkgs/development/libraries/haskell/intervals/default.nix
+++ b/pkgs/development/libraries/haskell/intervals/default.nix
@@ -2,8 +2,8 @@
cabal.mkDerivation (self: {
pname = "intervals";
- version = "0.2.2";
- sha256 = "059xmk373xz6nwk61iyhx4d7xd328jxb694qmq9plry3k77mdh5q";
+ version = "0.2.2.1";
+ sha256 = "0kbsms3742ppmzbmrfp94aq4wvwrayx5ppsyk7pd1mj7y47aay0f";
buildDepends = [ numericExtras ];
meta = {
homepage = "http://github.com/ekmett/intervals";
diff --git a/pkgs/development/libraries/haskell/keys/default.nix b/pkgs/development/libraries/haskell/keys/default.nix
index 80a61b5b5be40e7cf3bb86bf8d85c93d784b5877..b657f3dd6b947112e0c7cc56110268df63f58eb7 100644
--- a/pkgs/development/libraries/haskell/keys/default.nix
+++ b/pkgs/development/libraries/haskell/keys/default.nix
@@ -1,14 +1,11 @@
-{ cabal, comonadsFd, comonadTransformers, free, semigroupoids
-, semigroups, transformers
-}:
+{ cabal, comonad, free, semigroupoids, semigroups, transformers }:
cabal.mkDerivation (self: {
pname = "keys";
- version = "3.0.3";
- sha256 = "1fqw0745pj8pzjjlrbg85gdr3acm7gpip5052m9wcz997949ca3r";
+ version = "3.10";
+ sha256 = "1s2xkzvaqk507wrgabpxli8g8n83arflmdhxq40f7qkvyflhhmyh";
buildDepends = [
- comonadsFd comonadTransformers free semigroupoids semigroups
- transformers
+ comonad free semigroupoids semigroups transformers
];
meta = {
homepage = "http://github.com/ekmett/keys/";
diff --git a/pkgs/development/libraries/haskell/lens/default.nix b/pkgs/development/libraries/haskell/lens/default.nix
index cdccc4768e0faae7489a03266e93cbfc14a7d23e..60aa29ac089a893b5089aa7acb566800097e2880 100644
--- a/pkgs/development/libraries/haskell/lens/default.nix
+++ b/pkgs/development/libraries/haskell/lens/default.nix
@@ -1,23 +1,21 @@
-{ cabal, bifunctors, comonad, comonadsFd, comonadTransformers
-, contravariant, deepseq, distributive, doctest, filepath
-, genericDeriving, hashable, HUnit, MonadCatchIOTransformers, mtl
-, nats, parallel, profunctorExtras, profunctors, QuickCheck
-, reflection, semigroupoids, semigroups, simpleReflect, split
-, tagged, testFramework, testFrameworkHunit
+{ cabal, bifunctors, comonad, contravariant, deepseq, distributive
+, doctest, filepath, genericDeriving, hashable, HUnit
+, MonadCatchIOTransformers, mtl, nats, parallel, profunctors
+, QuickCheck, reflection, semigroupoids, semigroups, simpleReflect
+, split, tagged, testFramework, testFrameworkHunit
, testFrameworkQuickcheck2, testFrameworkTh, text, transformers
, transformersCompat, unorderedContainers, vector, void
}:
cabal.mkDerivation (self: {
pname = "lens";
- version = "3.9.2";
- sha256 = "17pc0waf3g6dxvmvyxkgh8kz22iscd9z00s67rcn0p604swprj2k";
+ version = "3.10";
+ sha256 = "086kbd59zlx3ldrxilssxd0gr9izwhcfhg5k6bqzm6gwvysrzq3y";
buildDepends = [
- bifunctors comonad comonadsFd comonadTransformers contravariant
- distributive filepath genericDeriving hashable
- MonadCatchIOTransformers mtl parallel profunctorExtras profunctors
- reflection semigroupoids semigroups split tagged text transformers
- transformersCompat unorderedContainers vector void
+ bifunctors comonad contravariant distributive filepath
+ genericDeriving hashable MonadCatchIOTransformers mtl parallel
+ profunctors reflection semigroupoids semigroups split tagged text
+ transformers transformersCompat unorderedContainers vector void
];
testDepends = [
deepseq doctest filepath genericDeriving HUnit mtl nats parallel
diff --git a/pkgs/development/libraries/haskell/llvm-general/3.3.5.nix b/pkgs/development/libraries/haskell/llvm-general/3.3.5.nix
deleted file mode 100644
index 16d9859aae22640c18ae3b14a2e08a6f03034f93..0000000000000000000000000000000000000000
--- a/pkgs/development/libraries/haskell/llvm-general/3.3.5.nix
+++ /dev/null
@@ -1,21 +0,0 @@
-{ cabal, HUnit, llvmConfig, mtl, parsec, QuickCheck, setenv
-, testFramework, testFrameworkHunit, testFrameworkQuickcheck2, text
-, transformers
-}:
-
-cabal.mkDerivation (self: {
- pname = "llvm-general";
- version = "3.3.5.0";
- sha256 = "15zrav7339jn6p75g1d7h3qkr1wyal1jzfs8xy73kckw2fzn4nlf";
- buildDepends = [ mtl parsec setenv text transformers ];
- testDepends = [
- HUnit mtl QuickCheck testFramework testFrameworkHunit
- testFrameworkQuickcheck2
- ];
- buildTools = [ llvmConfig ];
- meta = {
- description = "General purpose LLVM bindings";
- license = self.stdenv.lib.licenses.bsd3;
- platforms = self.ghc.meta.platforms;
- };
-})
diff --git a/pkgs/development/libraries/haskell/llvm-general/3.3.8.2.nix b/pkgs/development/libraries/haskell/llvm-general/default.nix
similarity index 100%
rename from pkgs/development/libraries/haskell/llvm-general/3.3.8.2.nix
rename to pkgs/development/libraries/haskell/llvm-general/default.nix
diff --git a/pkgs/development/libraries/haskell/math-functions/default.nix b/pkgs/development/libraries/haskell/math-functions/default.nix
index 2e29269a9fdfa40d7359528cdd089553d9851c78..8180c8bce75303f1238bdee7b675bb60d5616477 100644
--- a/pkgs/development/libraries/haskell/math-functions/default.nix
+++ b/pkgs/development/libraries/haskell/math-functions/default.nix
@@ -4,8 +4,8 @@
cabal.mkDerivation (self: {
pname = "math-functions";
- version = "0.1.3.0";
- sha256 = "06wxr8fbhmsgkpyx2vimx9l6apk0p27mwrxrvbjk0b7m9vsg3ay5";
+ version = "0.1.4.0";
+ sha256 = "1cijm224gfvd7rvrrndcks8d7aj89c9qv0m4wx2qqngr7rk78kav";
buildDepends = [ erf vector ];
testDepends = [
HUnit ieee754 QuickCheck testFramework testFrameworkHunit
diff --git a/pkgs/development/libraries/haskell/mwc-random/default.nix b/pkgs/development/libraries/haskell/mwc-random/default.nix
index 2d6b846e70667a33ffde470b855b3da172078aeb..d26980994e714dbe3150f97b546ce7f275d40aa7 100644
--- a/pkgs/development/libraries/haskell/mwc-random/default.nix
+++ b/pkgs/development/libraries/haskell/mwc-random/default.nix
@@ -4,8 +4,8 @@
cabal.mkDerivation (self: {
pname = "mwc-random";
- version = "0.13.0.0";
- sha256 = "16f8dd81wj81h0jcqnrlr2d6mjc7q2r436qf8z320d6wpzih2djy";
+ version = "0.13.1.0";
+ sha256 = "16g6b1pphr4p36nn5qjj62iwf47rq8kfmpjgfvd35r3cz9qqb8cb";
buildDepends = [ primitive time vector ];
testDepends = [
HUnit QuickCheck statistics testFramework testFrameworkHunit
diff --git a/pkgs/development/libraries/haskell/network-conduit-tls/default.nix b/pkgs/development/libraries/haskell/network-conduit-tls/default.nix
index bfb96e30480228b63517b13810ae347adb4c004a..415c047a2f53c33e429fde55a01551a8d6a215c0 100644
--- a/pkgs/development/libraries/haskell/network-conduit-tls/default.nix
+++ b/pkgs/development/libraries/haskell/network-conduit-tls/default.nix
@@ -1,16 +1,17 @@
-{ cabal, aeson, certificate, conduit, cprngAes, cryptoApi
-, cryptoRandomApi, network, networkConduit, pem, systemFileio
-, systemFilepath, tls, tlsExtra, transformers
+{ cabal, aeson, certificate, conduit, connection, cprngAes
+, cryptoApi, cryptoRandomApi, dataDefault, monadControl, network
+, networkConduit, pem, systemFileio, systemFilepath, tls, tlsExtra
+, transformers
}:
cabal.mkDerivation (self: {
pname = "network-conduit-tls";
- version = "1.0.1.1";
- sha256 = "0v5rspcjhd2vid5i74dy1sdcvci7dlr88sgr0v9vjp4gcyb29qlj";
+ version = "1.0.2";
+ sha256 = "0m3sbb4vpsjf568zaaxri8x7x46wngf5y2s5chgjzfmbj0amkl51";
buildDepends = [
- aeson certificate conduit cprngAes cryptoApi cryptoRandomApi
- network networkConduit pem systemFileio systemFilepath tls tlsExtra
- transformers
+ aeson certificate conduit connection cprngAes cryptoApi
+ cryptoRandomApi dataDefault monadControl network networkConduit pem
+ systemFileio systemFilepath tls tlsExtra transformers
];
meta = {
homepage = "https://github.com/snoyberg/conduit";
diff --git a/pkgs/development/libraries/haskell/network/2.4.2.0.nix b/pkgs/development/libraries/haskell/network/2.4.2.0.nix
new file mode 100644
index 0000000000000000000000000000000000000000..2912138daf7cac286f17e1514b386aeb6dce1c2d
--- /dev/null
+++ b/pkgs/development/libraries/haskell/network/2.4.2.0.nix
@@ -0,0 +1,20 @@
+{ cabal, HUnit, parsec, testFramework, testFrameworkHunit
+, testFrameworkQuickcheck2
+}:
+
+cabal.mkDerivation (self: {
+ pname = "network";
+ version = "2.4.2.0";
+ sha256 = "1v6iwww8xym0sr2593ri0aa6gcs6n2975fi9gaz9n7rizbqm88qs";
+ buildDepends = [ parsec ];
+ testDepends = [
+ HUnit testFramework testFrameworkHunit testFrameworkQuickcheck2
+ ];
+ meta = {
+ homepage = "https://github.com/haskell/network";
+ description = "Low-level networking interface";
+ license = self.stdenv.lib.licenses.bsd3;
+ platforms = self.ghc.meta.platforms;
+ maintainers = [ self.stdenv.lib.maintainers.andres ];
+ };
+})
diff --git a/pkgs/development/libraries/haskell/numbers/default.nix b/pkgs/development/libraries/haskell/numbers/default.nix
index 81a3e866dc017520c41ac08bbd92448dfb34c287..26ed2d77bd0f94ffb5a3ddcc0f12e1ad0c9dcee3 100644
--- a/pkgs/development/libraries/haskell/numbers/default.nix
+++ b/pkgs/development/libraries/haskell/numbers/default.nix
@@ -2,8 +2,8 @@
cabal.mkDerivation (self: {
pname = "numbers";
- version = "3000.1.0.3";
- sha256 = "0w2m2m3vp3lpvnc7wkw6pqfz741a68dma4s0asl7cryykwf94xgz";
+ version = "3000.2.0.0";
+ sha256 = "035qc7dgh4nd661z4mm742v8y7xqdyyp0r0vkinxiifciqb1fkbm";
testDepends = [
QuickCheck testFramework testFrameworkQuickcheck2
];
diff --git a/pkgs/development/libraries/haskell/optparse-applicative/default.nix b/pkgs/development/libraries/haskell/optparse-applicative/default.nix
index a3ab241b28caeb898ce4f347d4da99b1141c152d..44917d01c0036290e696412eae7ce03b9a320abf 100644
--- a/pkgs/development/libraries/haskell/optparse-applicative/default.nix
+++ b/pkgs/development/libraries/haskell/optparse-applicative/default.nix
@@ -4,8 +4,8 @@
cabal.mkDerivation (self: {
pname = "optparse-applicative";
- version = "0.5.2.1";
- sha256 = "0w4mk851mx8dch8lnck0g82asmzrsc47xrf34jygh0f6v4kbj40i";
+ version = "0.6.0";
+ sha256 = "07wzsgwym0g6qd39jvgp6ndpqdn2w0c4sn9mcz19rqlb2am24ip8";
buildDepends = [ transformers ];
testDepends = [
HUnit testFramework testFrameworkHunit testFrameworkThPrime
diff --git a/pkgs/development/libraries/haskell/pandoc-citeproc/default.nix b/pkgs/development/libraries/haskell/pandoc-citeproc/default.nix
index 2c4776870960089bac46fdf0415461c28ff1e55c..4960e16202ec6aac9389bb3b6cda5f7d84070070 100644
--- a/pkgs/development/libraries/haskell/pandoc-citeproc/default.nix
+++ b/pkgs/development/libraries/haskell/pandoc-citeproc/default.nix
@@ -1,21 +1,21 @@
{ cabal, aeson, aesonPretty, attoparsec, Diff, filepath, hexpat
-, hsBibutils, HTTP, json, mtl, network, pandocTypes, parsec
-, rfc5051, syb, tagsoup, texmath, text, time, utf8String, vector
-, yaml
+, hsBibutils, HTTP, json, mtl, network, pandoc, pandocTypes, parsec
+, rfc5051, split, syb, tagsoup, texmath, text, time, utf8String
+, vector, yaml
}:
cabal.mkDerivation (self: {
pname = "pandoc-citeproc";
- version = "0.1.1.1";
- sha256 = "07h277cz5wzc2dsfqfh9lasz7ypb4pspvqljs9maj6lx5rkk5fq1";
+ version = "0.1.2";
+ sha256 = "055msvrcqjkijkhzws48scpc4z90g0qjjsdcd0fhy309da6vax57";
isLibrary = true;
isExecutable = true;
buildDepends = [
aeson attoparsec filepath hexpat hsBibutils HTTP json mtl network
- pandocTypes parsec rfc5051 syb tagsoup texmath text time utf8String
- vector yaml
+ pandoc pandocTypes parsec rfc5051 split syb tagsoup texmath text
+ time utf8String vector yaml
];
- testDepends = [ aeson aesonPretty Diff pandocTypes utf8String ];
+ testDepends = [ aeson aesonPretty Diff pandoc pandocTypes ];
doCheck = false;
meta = {
description = "Supports using pandoc with citeproc";
diff --git a/pkgs/development/libraries/haskell/pandoc-types/default.nix b/pkgs/development/libraries/haskell/pandoc-types/default.nix
index 686c07949be71fa3878a1d51b7906b1c0fee78f0..e1e7ac54d4caa86f376400b2bd2aa3f8f039495b 100644
--- a/pkgs/development/libraries/haskell/pandoc-types/default.nix
+++ b/pkgs/development/libraries/haskell/pandoc-types/default.nix
@@ -2,8 +2,8 @@
cabal.mkDerivation (self: {
pname = "pandoc-types";
- version = "1.12.2.2";
- sha256 = "1ax92rxynrp42032d0i4wnv700cszm6qsvna8f9hqcfxvc2cbp36";
+ version = "1.12.2.3";
+ sha256 = "05xbpsx44sys0rkf2aqs4fcv4bg02ffhicp49jgnjyw9jiynhzzj";
buildDepends = [ aeson syb ];
meta = {
homepage = "http://johnmacfarlane.net/pandoc";
diff --git a/pkgs/development/libraries/haskell/parsers/default.nix b/pkgs/development/libraries/haskell/parsers/default.nix
index dc42228df66a2994331b61a9f134d488ec7435e8..529fdf47124c5917f9900a09b2b51ff14dd2274c 100644
--- a/pkgs/development/libraries/haskell/parsers/default.nix
+++ b/pkgs/development/libraries/haskell/parsers/default.nix
@@ -1,12 +1,14 @@
-{ cabal, charset, doctest, filepath, text, transformers
+{ cabal, charset, doctest, filepath, parsec, text, transformers
, unorderedContainers
}:
cabal.mkDerivation (self: {
pname = "parsers";
- version = "0.9";
- sha256 = "04lbayvdv2hax4s9sqlnia7jpzv1sgls41ylql0xbi2zhz5rvyyi";
- buildDepends = [ charset text transformers unorderedContainers ];
+ version = "0.10";
+ sha256 = "090dvmdb1kmnc3k2x170y9fdifxi16hzkij1gzc51flx3bpx40i1";
+ buildDepends = [
+ charset parsec text transformers unorderedContainers
+ ];
testDepends = [ doctest filepath ];
meta = {
homepage = "http://github.com/ekmett/parsers/";
diff --git a/pkgs/development/libraries/haskell/persistent-template/default.nix b/pkgs/development/libraries/haskell/persistent-template/default.nix
index 2afc416cb522c65f2cacd7d6b1b5354c3e3451bc..c3bb228933d3e8934ef39da2b0fc80658f8d71de 100644
--- a/pkgs/development/libraries/haskell/persistent-template/default.nix
+++ b/pkgs/development/libraries/haskell/persistent-template/default.nix
@@ -4,8 +4,8 @@
cabal.mkDerivation (self: {
pname = "persistent-template";
- version = "1.2.0.2";
- sha256 = "0zj35mg7fzyk4b98s3s8m5i064s0wznz9aixgxa4kzm4xps7hj4z";
+ version = "1.2.0.4";
+ sha256 = "0lhqv4mcai9r5mzj5h6fsd1hd8mv1458id0rb6q157192gywxhzf";
buildDepends = [
aeson monadControl monadLogger persistent text transformers
];
diff --git a/pkgs/development/libraries/haskell/pointed/default.nix b/pkgs/development/libraries/haskell/pointed/default.nix
index e3a8d66be4c80fe478fba091f4dfd587bcf4288b..15f4ba59aaada47bcc35dc7ba2f894ec8b43e93a 100644
--- a/pkgs/development/libraries/haskell/pointed/default.nix
+++ b/pkgs/development/libraries/haskell/pointed/default.nix
@@ -1,18 +1,18 @@
-{ cabal, comonad, comonadTransformers, dataDefault, semigroupoids
-, semigroups, stm, tagged, transformers
+{ cabal, comonad, dataDefaultClass, semigroupoids, semigroups, stm
+, tagged, transformers
}:
cabal.mkDerivation (self: {
pname = "pointed";
- version = "3.1";
- sha256 = "13vx1vy3qfa23145fdfdivdmw01qyl2k6g8ynqxl8pzbj9cbb08n";
+ version = "4.0";
+ sha256 = "02y7ba1pcpmwcp762516p4x75y3ma2kml9mbiv1y8gcnn4ylvir4";
buildDepends = [
- comonad comonadTransformers dataDefault semigroupoids semigroups
- stm tagged transformers
+ comonad dataDefaultClass semigroupoids semigroups stm tagged
+ transformers
];
meta = {
homepage = "http://github.com/ekmett/pointed/";
- description = "Haskell 98 pointed and copointed data";
+ description = "Pointed and copointed data";
license = self.stdenv.lib.licenses.bsd3;
platforms = self.ghc.meta.platforms;
};
diff --git a/pkgs/development/libraries/haskell/postgresql-simple/default.nix b/pkgs/development/libraries/haskell/postgresql-simple/default.nix
index 9f89ae83ec60c544cb2e3dd0d1aa805bf1f1db31..a6412006e8fcb761db247c50162545f3e7315529 100644
--- a/pkgs/development/libraries/haskell/postgresql-simple/default.nix
+++ b/pkgs/development/libraries/haskell/postgresql-simple/default.nix
@@ -5,8 +5,8 @@
cabal.mkDerivation (self: {
pname = "postgresql-simple";
- version = "0.3.7.1";
- sha256 = "1xrgwpg58srmzv1d0jdknyh5vwdq2c40fyqy0wvgppisxzq469wh";
+ version = "0.3.8.0";
+ sha256 = "1p1cxp7mjrxyxxqrq2skm3kqrnmb3k6fb8kwr2aj9cnbqfhwl1qf";
buildDepends = [
aeson attoparsec blazeBuilder blazeTextual postgresqlLibpq text
time transformers vector
diff --git a/pkgs/development/libraries/haskell/profunctor-extras/default.nix b/pkgs/development/libraries/haskell/profunctor-extras/default.nix
index 6844bcc369a6f0e1af82f79779070dfca853eadf..bf7e6ab71212eafa8416028a9f9b3c95174e748c 100644
--- a/pkgs/development/libraries/haskell/profunctor-extras/default.nix
+++ b/pkgs/development/libraries/haskell/profunctor-extras/default.nix
@@ -1,18 +1,13 @@
-{ cabal, comonad, profunctors, semigroupoidExtras, semigroupoids
-, tagged, transformers
-}:
+{ cabal, profunctors }:
cabal.mkDerivation (self: {
pname = "profunctor-extras";
- version = "3.3.3.1";
- sha256 = "16naa6ksgwy6fh8vwflcc9s0rpamn886as8qhjqrkpjlc8s83h7g";
- buildDepends = [
- comonad profunctors semigroupoidExtras semigroupoids tagged
- transformers
- ];
+ version = "4.0";
+ sha256 = "10j458liqlyz5s9gkg95c6aq7ap5fa7d8pc7hygy71nn87pm2g4a";
+ buildDepends = [ profunctors ];
meta = {
homepage = "http://github.com/ekmett/profunctor-extras/";
- description = "Profunctor extras";
+ description = "This package has been absorbed into profunctors 4.0";
license = self.stdenv.lib.licenses.bsd3;
platforms = self.ghc.meta.platforms;
};
diff --git a/pkgs/development/libraries/haskell/profunctors/default.nix b/pkgs/development/libraries/haskell/profunctors/default.nix
index 83398295108b33f0b9413eb0382f156c8c56be4e..83d06b10ca6689f1d0e81bb44828f253263921e5 100644
--- a/pkgs/development/libraries/haskell/profunctors/default.nix
+++ b/pkgs/development/libraries/haskell/profunctors/default.nix
@@ -1,13 +1,13 @@
-{ cabal, comonad, tagged }:
+{ cabal, comonad, semigroupoids, tagged, transformers }:
cabal.mkDerivation (self: {
pname = "profunctors";
- version = "3.3.0.1";
- sha256 = "16d7xg929r4smmmcgi54bz7rsjxs6psksrdvzl4336sjpp3dw5h2";
- buildDepends = [ comonad tagged ];
+ version = "4.0.1";
+ sha256 = "13yr3n7jkhxbk4gk6nd1j8p1a7g5ir8g9xprcy3s1x39cqf4m986";
+ buildDepends = [ comonad semigroupoids tagged transformers ];
meta = {
homepage = "http://github.com/ekmett/profunctors/";
- description = "Haskell 98 Profunctors";
+ description = "Profunctors";
license = self.stdenv.lib.licenses.bsd3;
platforms = self.ghc.meta.platforms;
};
diff --git a/pkgs/development/libraries/haskell/reducers/default.nix b/pkgs/development/libraries/haskell/reducers/default.nix
index 319cd138ccecd119c215a2ca1be923fd39f02b34..ea1049d2b40a4fec0580fdc11a04c1744fef7714 100644
--- a/pkgs/development/libraries/haskell/reducers/default.nix
+++ b/pkgs/development/libraries/haskell/reducers/default.nix
@@ -5,8 +5,8 @@
cabal.mkDerivation (self: {
pname = "reducers";
- version = "3.0.2";
- sha256 = "0inw5gz3bdrfc6hprjfxssyqjwmclgf09gms14blj24qr027gdqq";
+ version = "3.10.1";
+ sha256 = "0pgywdgq0rqir95n4z3nzmyx5n54a1df9abyanz4qfv0g080fjkz";
buildDepends = [
comonad fingertree hashable keys pointed semigroupoids semigroups
text transformers unorderedContainers
diff --git a/pkgs/development/libraries/haskell/regex-compat-tdfa/default.nix b/pkgs/development/libraries/haskell/regex-compat-tdfa/default.nix
index c7ed906b908fa9a6a89b90780b525c663daa0705..6a45c87d9a6e2aa9851f635bf06e3d6705e0d88a 100644
--- a/pkgs/development/libraries/haskell/regex-compat-tdfa/default.nix
+++ b/pkgs/development/libraries/haskell/regex-compat-tdfa/default.nix
@@ -2,8 +2,8 @@
cabal.mkDerivation (self: {
pname = "regex-compat-tdfa";
- version = "0.95.1.3";
- sha256 = "0wl5sqbb3rl5dai3qni8w09wlipc4n1mn9kh5zgb9xl0lcd59pjx";
+ version = "0.95.1.4";
+ sha256 = "1p90fn90yhp7fvljjdqjp41cszidcfz4pw7fwvzyx4739b98x8sg";
buildDepends = [ regexBase regexTdfa ];
meta = {
homepage = "http://hub.darcs.net/shelarcy/regex-compat-tdfa";
diff --git a/pkgs/development/libraries/haskell/resourcet/default.nix b/pkgs/development/libraries/haskell/resourcet/default.nix
index b0953cf9f7c36c244faa2aa692acdb691346a8bd..b4d0fccd8a0b1c7318c1f0d4c29d288435a444e7 100644
--- a/pkgs/development/libraries/haskell/resourcet/default.nix
+++ b/pkgs/development/libraries/haskell/resourcet/default.nix
@@ -4,8 +4,8 @@
cabal.mkDerivation (self: {
pname = "resourcet";
- version = "0.4.8";
- sha256 = "10pp4hm5c2k2fqzqpagy03gmr526ac2ji8h7k0mcypf4v0ga620m";
+ version = "0.4.9";
+ sha256 = "1jpaphmwvykjshjqwmmyfx64w1j99f6dphy9ygrzc32fjffk5laz";
buildDepends = [
liftedBase mmorph monadControl mtl transformers transformersBase
];
diff --git a/pkgs/development/libraries/haskell/semigroupoid-extras/default.nix b/pkgs/development/libraries/haskell/semigroupoid-extras/default.nix
index 263adb42f25342e6d58419ef6519ba2e4b4e89f3..cb8ed865da3d92ada7fa90dc2a800baef55b8888 100644
--- a/pkgs/development/libraries/haskell/semigroupoid-extras/default.nix
+++ b/pkgs/development/libraries/haskell/semigroupoid-extras/default.nix
@@ -1,13 +1,13 @@
-{ cabal, comonad, distributive, groupoids, semigroupoids }:
+{ cabal, semigroupoids }:
cabal.mkDerivation (self: {
pname = "semigroupoid-extras";
- version = "3.0.1";
- sha256 = "1b6ix9myjav1h4bbq3jxlan8sn2pjw8x0zhazv3anxfab5n2sxpd";
- buildDepends = [ comonad distributive groupoids semigroupoids ];
+ version = "4.0";
+ sha256 = "07aa7z4nywcrp9msq83b1pcmryl25yxha89sn5vwlgq40cibcm3g";
+ buildDepends = [ semigroupoids ];
meta = {
homepage = "http://github.com/ekmett/semigroupoid-extras";
- description = "Semigroupoids requiring Haskell extensions";
+ description = "This package has been absorbed into semigroupoids 4.0";
license = self.stdenv.lib.licenses.bsd3;
platforms = self.ghc.meta.platforms;
};
diff --git a/pkgs/development/libraries/haskell/semigroupoids/default.nix b/pkgs/development/libraries/haskell/semigroupoids/default.nix
index aa7176f7e161fd188f1728bfed3c5a8405fa66ca..e0dbf4568049d19def837fe8a831be29abab1770 100644
--- a/pkgs/development/libraries/haskell/semigroupoids/default.nix
+++ b/pkgs/development/libraries/haskell/semigroupoids/default.nix
@@ -1,13 +1,17 @@
-{ cabal, comonad, contravariant, semigroups, transformers }:
+{ cabal, comonad, contravariant, distributive, semigroups
+, transformers
+}:
cabal.mkDerivation (self: {
pname = "semigroupoids";
- version = "3.1";
- sha256 = "02147y0nnvyc9ykvjbbxa9gzmkk9kgpsmx40ahwnjk9igjkbyp9g";
- buildDepends = [ comonad contravariant semigroups transformers ];
+ version = "4.0";
+ sha256 = "12h2b9pisy21xca3x9ilj0aix9clni0za35d2dmv55gb8y8df54l";
+ buildDepends = [
+ comonad contravariant distributive semigroups transformers
+ ];
meta = {
homepage = "http://github.com/ekmett/semigroupoids";
- description = "Haskell 98 semigroupoids: Category sans id";
+ description = "Semigroupoids: Category sans id";
license = self.stdenv.lib.licenses.bsd3;
platforms = self.ghc.meta.platforms;
};
diff --git a/pkgs/development/libraries/haskell/setenv/default.nix b/pkgs/development/libraries/haskell/setenv/default.nix
index b19728820aadaf4b480fbeeaf9abf7e8e3a08fef..b00480279e182d4fa8f063a778b80b005ccbd32e 100644
--- a/pkgs/development/libraries/haskell/setenv/default.nix
+++ b/pkgs/development/libraries/haskell/setenv/default.nix
@@ -1,10 +1,9 @@
-{ cabal, hspec, QuickCheck }:
+{ cabal }:
cabal.mkDerivation (self: {
pname = "setenv";
- version = "0.1.0";
- sha256 = "04w42bpfbrs5crjp19zzi9dg61xpz4wvmjs2vc7q7qxblyhdfdsy";
- testDepends = [ hspec QuickCheck ];
+ version = "0.1.1";
+ sha256 = "1j0fj8nrx9z90kghasxjx5jycz9y9xdi7mrxmgnsc14csa65rhb8";
doCheck = false;
meta = {
description = "A cross-platform library for setting environment variables";
diff --git a/pkgs/development/libraries/haskell/shake/default.nix b/pkgs/development/libraries/haskell/shake/default.nix
index 2588b11ae780f9ee04228648705f74fdd397bc65..ef7a6d699050f15aad9b02a8019e2cf36a1314d5 100644
--- a/pkgs/development/libraries/haskell/shake/default.nix
+++ b/pkgs/development/libraries/haskell/shake/default.nix
@@ -4,14 +4,19 @@
cabal.mkDerivation (self: {
pname = "shake";
- version = "0.10.7";
- sha256 = "0r48kzldbgixr1c83sd7frvygqyjx32n67nri1nnamcwpvlv8hgv";
+ version = "0.10.8";
+ sha256 = "15r392b18nis9p0ys95kbj79hki19wid2gyrpy0z9zm2l5d1m3ya";
isLibrary = true;
isExecutable = true;
buildDepends = [
binary deepseq filepath hashable random time transformers
unorderedContainers utf8String
];
+ testDepends = [
+ binary deepseq filepath hashable random time transformers
+ unorderedContainers utf8String
+ ];
+ doCheck = false;
meta = {
homepage = "http://community.haskell.org/~ndm/shake/";
description = "Build system library, like Make, but more accurate dependencies";
diff --git a/pkgs/development/libraries/haskell/shakespeare-css/default.nix b/pkgs/development/libraries/haskell/shakespeare-css/default.nix
index f24d60612d6f3f185ad696227540625890c2e3ba..03b6b057cd1e8be638fcef89bef9d9a927d2e948 100644
--- a/pkgs/development/libraries/haskell/shakespeare-css/default.nix
+++ b/pkgs/development/libraries/haskell/shakespeare-css/default.nix
@@ -2,8 +2,8 @@
cabal.mkDerivation (self: {
pname = "shakespeare-css";
- version = "1.0.6.3";
- sha256 = "1zwvrdb8kgknp2ri3ws6m0jg41d8kdprvjdimwxh98san7vmk744";
+ version = "1.0.6.4";
+ sha256 = "12f2b69grxpwk56b2d7idlg8axqfgzn0rn3m56r1hcpvkjbynlc4";
buildDepends = [ parsec shakespeare text transformers ];
testDepends = [ hspec HUnit shakespeare text ];
meta = {
diff --git a/pkgs/development/libraries/haskell/shakespeare-js/default.nix b/pkgs/development/libraries/haskell/shakespeare-js/default.nix
index 6aa34026ce8857ebf870469c4ddb76b64d2548ef..ed743d8783244b87280c3fa8cf6a75dd03e48209 100644
--- a/pkgs/development/libraries/haskell/shakespeare-js/default.nix
+++ b/pkgs/development/libraries/haskell/shakespeare-js/default.nix
@@ -2,8 +2,8 @@
cabal.mkDerivation (self: {
pname = "shakespeare-js";
- version = "1.2.0";
- sha256 = "1g37m7shqxfv7i2dk5qhvxldfzh1xipd91vcyqhks1jwa5byarzj";
+ version = "1.2.0.2";
+ sha256 = "1d7fmw2295ycjipaj9fjgw02y1088h2gxxk1d6sy4c165x95r6vx";
buildDepends = [ aeson shakespeare text ];
testDepends = [ aeson hspec HUnit shakespeare text ];
meta = {
diff --git a/pkgs/development/libraries/haskell/shakespeare-text/default.nix b/pkgs/development/libraries/haskell/shakespeare-text/default.nix
index d05e2247710ca72841041ce3000d8d00a6196e12..d5e91da61b1e4fd7d3756e51a1d5e699a421552d 100644
--- a/pkgs/development/libraries/haskell/shakespeare-text/default.nix
+++ b/pkgs/development/libraries/haskell/shakespeare-text/default.nix
@@ -2,8 +2,8 @@
cabal.mkDerivation (self: {
pname = "shakespeare-text";
- version = "1.0.0.7";
- sha256 = "0vl8884a0x927svvkza5xzjn4g1rip8dak1zh9wkm4d0q7lhv2px";
+ version = "1.0.0.8";
+ sha256 = "0gf4gsdfjz9c15wvxz886gjzzifgzanfhblgab15inl2rblirv7l";
buildDepends = [ shakespeare text ];
testDepends = [ hspec HUnit text ];
meta = {
diff --git a/pkgs/development/libraries/haskell/shakespeare/default.nix b/pkgs/development/libraries/haskell/shakespeare/default.nix
index 231470dca5a39d2459c3c0e490a18016b9e93a80..a5428b0ee3c1fff92aaf6237004de676027c7661 100644
--- a/pkgs/development/libraries/haskell/shakespeare/default.nix
+++ b/pkgs/development/libraries/haskell/shakespeare/default.nix
@@ -2,8 +2,8 @@
cabal.mkDerivation (self: {
pname = "shakespeare";
- version = "1.2.0";
- sha256 = "0lzzdkry3sm5i5hhdygsikpnaps66k1sfdxi2mp0ly5aqi1n1blz";
+ version = "1.2.0.1";
+ sha256 = "07qfbqvq8fqbf7y43h0qq2gk9brpf4g0k7gghrjzyjrd57v5zygp";
buildDepends = [ parsec systemFileio systemFilepath text time ];
testDepends = [
hspec parsec systemFileio systemFilepath text time
diff --git a/pkgs/development/libraries/haskell/simple-sendfile/default.nix b/pkgs/development/libraries/haskell/simple-sendfile/default.nix
index b8c527daf1a9aff6fa4ef3a93d9f9b46f32a5d4d..806feee295f7f8ab7cc1dca383de8f1be9add33b 100644
--- a/pkgs/development/libraries/haskell/simple-sendfile/default.nix
+++ b/pkgs/development/libraries/haskell/simple-sendfile/default.nix
@@ -2,8 +2,8 @@
cabal.mkDerivation (self: {
pname = "simple-sendfile";
- version = "0.2.12";
- sha256 = "019n82700fbhsqxgn1cwfqii27r436gljis7yl02zjnzy7xlvrha";
+ version = "0.2.13";
+ sha256 = "03cgbzfhkih1ln1xb78r1hfh6zzjjj6763n9nzr9cj6bxs0fiqd3";
buildDepends = [ network ];
testDepends = [ conduit hspec HUnit network networkConduit ];
doCheck = false;
diff --git a/pkgs/development/libraries/haskell/snap/snap.nix b/pkgs/development/libraries/haskell/snap/snap.nix
index 94f452f69b8881246f11bfcba16b8f4c5973b3ef..15fe497b88dacf761a9ed2b906e82e812abf7a7a 100644
--- a/pkgs/development/libraries/haskell/snap/snap.nix
+++ b/pkgs/development/libraries/haskell/snap/snap.nix
@@ -20,6 +20,7 @@ cabal.mkDerivation (self: {
unorderedContainers vector vectorAlgorithms xmlhtml
];
jailbreak = true;
+ patchPhase = "sed -i -e 's|lens .*|lens|' snap.cabal";
meta = {
homepage = "http://snapframework.com/";
description = "Top-level package for the Snap Web Framework";
diff --git a/pkgs/development/libraries/haskell/socks/default.nix b/pkgs/development/libraries/haskell/socks/default.nix
index 22b9a4151237e5386f45c4eeeb60db29ff2fa9fa..f939708c16a6c7372ffd70456da1a6a4a9bdd2d8 100644
--- a/pkgs/development/libraries/haskell/socks/default.nix
+++ b/pkgs/development/libraries/haskell/socks/default.nix
@@ -2,8 +2,8 @@
cabal.mkDerivation (self: {
pname = "socks";
- version = "0.5.2";
- sha256 = "1bvvrc0lzjspab7jn31d45za8g6n9jr52mcf7rs5zci99f5jgpsv";
+ version = "0.5.3";
+ sha256 = "0cajbl7vrljawaxl3vbbf0sq92ry3cj925sww4nw70lhpz96ay4x";
buildDepends = [ cereal network ];
meta = {
homepage = "http://github.com/vincenthz/hs-socks";
diff --git a/pkgs/development/libraries/haskell/statistics/default.nix b/pkgs/development/libraries/haskell/statistics/default.nix
index 54876a879fcc8077ac52fd0e9f322fd0f890fc9c..5db264d3c7b39d02994682b02109ba900f632dba 100644
--- a/pkgs/development/libraries/haskell/statistics/default.nix
+++ b/pkgs/development/libraries/haskell/statistics/default.nix
@@ -6,8 +6,8 @@
cabal.mkDerivation (self: {
pname = "statistics";
- version = "0.10.4.1";
- sha256 = "0kd3zn8ckz3h9dnighmfviacw5cy6czsj90ryn8c0h6yb2s3gqi1";
+ version = "0.10.5.0";
+ sha256 = "0yn0bqvh922zi0cg2nyb9vn5jk9k4j4vz96fl0h3ayxhfds08m6v";
buildDepends = [
binary deepseq erf mathFunctions monadPar mwcRandom primitive
vector vectorAlgorithms vectorBinaryInstances
diff --git a/pkgs/development/libraries/haskell/system-filepath/default.nix b/pkgs/development/libraries/haskell/system-filepath/default.nix
index 851b28baafeacf0b2de60a2235b8a16aba5c5baa..84ca453c6c161d2224ad8e7f826b7cb413ec37cc 100644
--- a/pkgs/development/libraries/haskell/system-filepath/default.nix
+++ b/pkgs/development/libraries/haskell/system-filepath/default.nix
@@ -2,8 +2,8 @@
cabal.mkDerivation (self: {
pname = "system-filepath";
- version = "0.4.7";
- sha256 = "108bmgz6rynkyabr4pws07smdh31syqvzry9cshrw3zd07c3mn89";
+ version = "0.4.8";
+ sha256 = "15x0yxakqqrdqvghr0l4pzvy5a68xxdv1c75d3qwx604665j3xkw";
buildDepends = [ deepseq text ];
meta = {
homepage = "https://john-millikin.com/software/haskell-filesystem/";
diff --git a/pkgs/development/libraries/haskell/tasty/default.nix b/pkgs/development/libraries/haskell/tasty/default.nix
index 37030681e34016f6475b4e11bb2355f7dc225996..df14857f9ab3c883b18084b60cb14ef98d19c449 100644
--- a/pkgs/development/libraries/haskell/tasty/default.nix
+++ b/pkgs/development/libraries/haskell/tasty/default.nix
@@ -4,8 +4,8 @@
cabal.mkDerivation (self: {
pname = "tasty";
- version = "0.3";
- sha256 = "0sgc0529sqhj0b75a4mkdw0bkx56ynyl4msmi8hd20jvv5wnzyi6";
+ version = "0.3.1";
+ sha256 = "0ipndrpywzg40s5hiwyyly29mcppcfqbbpwqqp4apma57m8cdpb0";
buildDepends = [
ansiTerminal mtl optparseApplicative regexPosix stm tagged
];
diff --git a/pkgs/development/libraries/haskell/test-framework-hunit/default.nix b/pkgs/development/libraries/haskell/test-framework-hunit/default.nix
index 011d791643cc5bf35068a3770dd018ccf67d0e95..9efcff9a6d1e2eb9207a370a069aeef875242c54 100644
--- a/pkgs/development/libraries/haskell/test-framework-hunit/default.nix
+++ b/pkgs/development/libraries/haskell/test-framework-hunit/default.nix
@@ -2,11 +2,11 @@
cabal.mkDerivation (self: {
pname = "test-framework-hunit";
- version = "0.3.0";
- sha256 = "1jwbpbf9q3g936gk71632h830l2wsiic8h6ms1jlmw209mpm7c84";
+ version = "0.3.0.1";
+ sha256 = "1h0h55kf6ff25nbfx1mhliwyknc0glwv3zi78wpzllbjbs7gvyfk";
buildDepends = [ extensibleExceptions HUnit testFramework ];
meta = {
- homepage = "http://batterseapower.github.com/test-framework/";
+ homepage = "https://batterseapower.github.io/test-framework/";
description = "HUnit support for the test-framework package";
license = self.stdenv.lib.licenses.bsd3;
platforms = self.ghc.meta.platforms;
diff --git a/pkgs/development/libraries/haskell/test-framework-quickcheck2/default.nix b/pkgs/development/libraries/haskell/test-framework-quickcheck2/default.nix
index b944c1e104cc6c50e5ba07301d125b369debf7fe..627c9f6347a59966813c3b00ddec9b6e21b373f8 100644
--- a/pkgs/development/libraries/haskell/test-framework-quickcheck2/default.nix
+++ b/pkgs/development/libraries/haskell/test-framework-quickcheck2/default.nix
@@ -2,14 +2,14 @@
cabal.mkDerivation (self: {
pname = "test-framework-quickcheck2";
- version = "0.3.0.1";
- sha256 = "1177cvlb4qsa5x2k12dd60y7b14dyd3jr1ygb49aackhjx52c41s";
+ version = "0.3.0.2";
+ sha256 = "0zgsbmxidyv735jbgajczn25pnhwq66haaadhh6lxj2jsq5fnqpy";
buildDepends = [
extensibleExceptions QuickCheck random testFramework
];
jailbreak = true;
meta = {
- homepage = "http://batterseapower.github.com/test-framework/";
+ homepage = "https://batterseapower.github.io/test-framework/";
description = "QuickCheck2 support for the test-framework package";
license = self.stdenv.lib.licenses.bsd3;
platforms = self.ghc.meta.platforms;
diff --git a/pkgs/development/libraries/haskell/test-framework/default.nix b/pkgs/development/libraries/haskell/test-framework/default.nix
index b9f335e1a5af67cd8a0db1ff8cdf1c6d1b70470b..735666734e3ba20c73afbe254c98d236149e7b4d 100644
--- a/pkgs/development/libraries/haskell/test-framework/default.nix
+++ b/pkgs/development/libraries/haskell/test-framework/default.nix
@@ -1,19 +1,18 @@
-{ cabal, ansiTerminal, ansiWlPprint, extensibleExceptions, hostname
-, random, regexPosix, time, xml
+{ cabal, ansiTerminal, ansiWlPprint, hostname, random, regexPosix
+, time, xml
}:
cabal.mkDerivation (self: {
pname = "test-framework";
- version = "0.8";
- sha256 = "1w895nq357zpc4v6vr5nbszyrw7cpsjq5bj38vdd10bfpjjmijcl";
+ version = "0.8.0.3";
+ sha256 = "136nw5dapsz3jrnw1pdfkjgplxigpr2mrf6i85154vx342zvw5ar";
isLibrary = true;
isExecutable = true;
buildDepends = [
- ansiTerminal ansiWlPprint extensibleExceptions hostname random
- regexPosix time xml
+ ansiTerminal ansiWlPprint hostname random regexPosix time xml
];
meta = {
- homepage = "http://batterseapower.github.com/test-framework/";
+ homepage = "https://batterseapower.github.io/test-framework/";
description = "Framework for running and organising tests, with HUnit and QuickCheck support";
license = self.stdenv.lib.licenses.bsd3;
platforms = self.ghc.meta.platforms;
diff --git a/pkgs/development/libraries/haskell/th-lift/default.nix b/pkgs/development/libraries/haskell/th-lift/default.nix
index b8a118b56a65e4fcf20a149d538aac96d06c6a96..c479955db6453f5d8077ae3aef8892aedd085a27 100644
--- a/pkgs/development/libraries/haskell/th-lift/default.nix
+++ b/pkgs/development/libraries/haskell/th-lift/default.nix
@@ -2,8 +2,8 @@
cabal.mkDerivation (self: {
pname = "th-lift";
- version = "0.5.5";
- sha256 = "1zp9alv3nbvra1rscddak3i33c2jnv6g6806h94qbfkq3zbimfi0";
+ version = "0.5.6";
+ sha256 = "128rbpqbm4fgn1glbv8bvlqnvn2wvca7wj08xri25w3bikmfy2z4";
meta = {
description = "Derive Template Haskell's Lift class for datatypes";
license = "unknown";
diff --git a/pkgs/development/libraries/haskell/th-orphans/default.nix b/pkgs/development/libraries/haskell/th-orphans/default.nix
index 8fb51c77dbf1d63ddff19d0a2c6645c5b1f16688..9196e9ef76b23f1dd1adbe53431ffce3f60abbba 100644
--- a/pkgs/development/libraries/haskell/th-orphans/default.nix
+++ b/pkgs/development/libraries/haskell/th-orphans/default.nix
@@ -2,8 +2,8 @@
cabal.mkDerivation (self: {
pname = "th-orphans";
- version = "0.7.0.1";
- sha256 = "19lfq2m7c6n2z8gz4n57wc92x5x5rkgv4chbfq7w4n531qya4bgr";
+ version = "0.8";
+ sha256 = "0kzzcicn6pggvvblhbrs3vh0bf71izlb99lb0f5qww7ymi4smldr";
buildDepends = [ thLift ];
meta = {
description = "Orphan instances for TH datatypes";
diff --git a/pkgs/development/libraries/haskell/tls-extra/default.nix b/pkgs/development/libraries/haskell/tls-extra/default.nix
index 8c2a50255b1b6aa7b41004ca8b96bb8a129b5b7e..6d63c267c61c2441321ae36c891a2d36d05c6bfc 100644
--- a/pkgs/development/libraries/haskell/tls-extra/default.nix
+++ b/pkgs/development/libraries/haskell/tls-extra/default.nix
@@ -4,8 +4,8 @@
cabal.mkDerivation (self: {
pname = "tls-extra";
- version = "0.6.5";
- sha256 = "09b8wxg4k88gdzpbxhd2apf0x5y51zh2zbw2cvraffjnnfkgvzqc";
+ version = "0.6.6";
+ sha256 = "0k0sj3nq1lrvbmd582mjj8cxbxigivz1hm8hhij1ncl2pgnq5xyv";
isLibrary = true;
isExecutable = true;
buildDepends = [
diff --git a/pkgs/development/libraries/haskell/trifecta/default.nix b/pkgs/development/libraries/haskell/trifecta/default.nix
index 417b6102e7eddd4a0bcf82c00b3d22b174278b72..f7b9a7aea81153b8df1bf9fdc9de987ea74e1894 100644
--- a/pkgs/development/libraries/haskell/trifecta/default.nix
+++ b/pkgs/development/libraries/haskell/trifecta/default.nix
@@ -6,14 +6,20 @@
cabal.mkDerivation (self: {
pname = "trifecta";
- version = "1.1";
- sha256 = "19wnblpn31hvdi5dc8ir24s0hfjj4vvzr43gg9ydl2qdjq6s166w";
+ version = "1.2.1.1";
+ sha256 = "1bv35ip7g0h7r2w0s8pkcbvm0b9hx91vblf5w57q3jr843v9314c";
buildDepends = [
ansiTerminal ansiWlPprint blazeBuilder blazeHtml blazeMarkup
charset comonad deepseq fingertree hashable lens mtl parsers
reducers semigroups transformers unorderedContainers utf8String
];
testDepends = [ doctest filepath ];
+ postPatch = ''
+ substituteInPlace trifecta.cabal \
+ --replace "blaze-html >= 0.5 && < 0.6," "blaze-html >= 0.5 && < 0.7," \
+ --replace "hashable >= 1.2 && < 1.3," "hashable >= 1.1 && < 1.3," \
+ --replace "fingertree >= 0.0.1 && < 0.1," "fingertree >= 0.0.1 && < 0.2,"
+ '';
meta = {
homepage = "http://github.com/ekmett/trifecta/";
description = "A modern parser combinator library with convenient diagnostics";
diff --git a/pkgs/development/libraries/haskell/usb/default.nix b/pkgs/development/libraries/haskell/usb/default.nix
new file mode 100644
index 0000000000000000000000000000000000000000..41a7161854622489f53f8dba6f39009a1b622138
--- /dev/null
+++ b/pkgs/development/libraries/haskell/usb/default.nix
@@ -0,0 +1,14 @@
+{ cabal, baseUnicodeSymbols, bindingsLibusb, text, vector }:
+
+cabal.mkDerivation (self: {
+ pname = "usb";
+ version = "1.2";
+ sha256 = "1k73avkmpbmg6iq2kmwhg2ifibni5c1yp202afdb6v7w5akvmc0b";
+ buildDepends = [ baseUnicodeSymbols bindingsLibusb text vector ];
+ meta = {
+ homepage = "http://basvandijk.github.com/usb";
+ description = "Communicate with USB devices";
+ license = self.stdenv.lib.licenses.bsd3;
+ platforms = self.ghc.meta.platforms;
+ };
+})
diff --git a/pkgs/development/libraries/haskell/utf8-light/default.nix b/pkgs/development/libraries/haskell/utf8-light/default.nix
index 42591158cd7cb34b1204921437c8bc175951ee99..1c2e1f5c116bda364fff31ca460bcf22267d2573 100644
--- a/pkgs/development/libraries/haskell/utf8-light/default.nix
+++ b/pkgs/development/libraries/haskell/utf8-light/default.nix
@@ -2,8 +2,8 @@
cabal.mkDerivation (self: {
pname = "utf8-light";
- version = "0.4.0.1";
- sha256 = "1y2vfxjgq8r90bpaxhha0s837vklpwdj4cj3h61bimc0lcx22905";
+ version = "0.4.2";
+ sha256 = "0rwyc5z331yfnm4hpx0sph6i1zvkd1z10vvglhnp0vc9wy644k0q";
meta = {
description = "Unicode";
license = self.stdenv.lib.licenses.bsd3;
diff --git a/pkgs/development/libraries/haskell/uuid/default.nix b/pkgs/development/libraries/haskell/uuid/default.nix
index 65115ef9a98ff3d6ba65385a3883ded1cad27b97..37ef38da4e2ed3cea3e0f5592fd5c78ae414c8d5 100644
--- a/pkgs/development/libraries/haskell/uuid/default.nix
+++ b/pkgs/development/libraries/haskell/uuid/default.nix
@@ -12,6 +12,7 @@ cabal.mkDerivation (self: {
criterion deepseq HUnit mersenneRandomPure64 QuickCheck random
testFramework testFrameworkHunit testFrameworkQuickcheck2
];
+ jailbreak = true;
doCheck = false;
meta = {
homepage = "http://projects.haskell.org/uuid/";
diff --git a/pkgs/development/libraries/haskell/wai-app-static/default.nix b/pkgs/development/libraries/haskell/wai-app-static/default.nix
index 2d0dd397a08cc64689287480c842d4ab94847841..d88eb2df0bc9274e5572830c4776e190c1aa32d4 100644
--- a/pkgs/development/libraries/haskell/wai-app-static/default.nix
+++ b/pkgs/development/libraries/haskell/wai-app-static/default.nix
@@ -7,8 +7,8 @@
cabal.mkDerivation (self: {
pname = "wai-app-static";
- version = "1.3.2.1";
- sha256 = "1iw2b53p08c38fdh3d0js9j8lyy0i8qszp3jd736kzxxiig6ah79";
+ version = "1.3.3";
+ sha256 = "0lsqfvlh65rggp9z6m5gyx8gv0wk3b44jrk57s8yj2bh74pbr64f";
buildDepends = [
base64Bytestring blazeBuilder blazeHtml blazeMarkup cereal
cryptoApi cryptoConduit cryptohashCryptoapi fileEmbed httpDate
diff --git a/pkgs/development/libraries/haskell/warp/default.nix b/pkgs/development/libraries/haskell/warp/default.nix
index c96e7bfd7383e6969b8faf7b09517aa6abeebc84..100dbbd7024e0e8a403c3db18f7bc751bf96dd16 100644
--- a/pkgs/development/libraries/haskell/warp/default.nix
+++ b/pkgs/development/libraries/haskell/warp/default.nix
@@ -1,13 +1,13 @@
{ cabal, blazeBuilder, blazeBuilderConduit, caseInsensitive
-, conduit, hashable, hspec, httpAttoparsec, httpTypes, HUnit
+, conduit, hashable, hspec, HTTP, httpAttoparsec, httpTypes, HUnit
, liftedBase, network, networkConduit, QuickCheck, simpleSendfile
, transformers, unixCompat, void, wai
}:
cabal.mkDerivation (self: {
pname = "warp";
- version = "1.3.9.2";
- sha256 = "0l4iq7dl7iv9sf0bj52g577x9i84miscfr27b2vm8g8n6306jr77";
+ version = "1.3.10.1";
+ sha256 = "1pi2x0gi4r6qy151a9gmfq223yiy53j7prj2pyn00cprr0m4mk2v";
buildDepends = [
blazeBuilder blazeBuilderConduit caseInsensitive conduit hashable
httpAttoparsec httpTypes liftedBase network networkConduit
@@ -15,7 +15,7 @@ cabal.mkDerivation (self: {
];
testDepends = [
blazeBuilder blazeBuilderConduit caseInsensitive conduit hashable
- hspec httpAttoparsec httpTypes HUnit liftedBase network
+ hspec HTTP httpAttoparsec httpTypes HUnit liftedBase network
networkConduit QuickCheck simpleSendfile transformers unixCompat
void wai
];
diff --git a/pkgs/development/libraries/haskell/yaml/default.nix b/pkgs/development/libraries/haskell/yaml/default.nix
index 7e2bd368c7e2b4cbe8efe07a852ac01606a6ec32..8d06099b77e564138ce5a728e55202811ec2ced6 100644
--- a/pkgs/development/libraries/haskell/yaml/default.nix
+++ b/pkgs/development/libraries/haskell/yaml/default.nix
@@ -4,8 +4,8 @@
cabal.mkDerivation (self: {
pname = "yaml";
- version = "0.8.5";
- sha256 = "12jj785gzcnrif460cx2k69pc2h9h956g0w1gp8pcr5hawrvd6rg";
+ version = "0.8.5.1";
+ sha256 = "0vbampykc5a027q5fh5w6i1bxblyxx7s3nzhpzaa4c1yz8nz3k57";
isLibrary = true;
isExecutable = true;
buildDepends = [
diff --git a/pkgs/development/libraries/haskell/yesod-bin/default.nix b/pkgs/development/libraries/haskell/yesod-bin/default.nix
index b260a6e4188e900d312abeea946a3f24986c109f..a86417f6b397af69f01e2401ac339851ecde59d6 100644
--- a/pkgs/development/libraries/haskell/yesod-bin/default.nix
+++ b/pkgs/development/libraries/haskell/yesod-bin/default.nix
@@ -10,8 +10,8 @@
cabal.mkDerivation (self: {
pname = "yesod-bin";
- version = "1.2.3.3";
- sha256 = "13cbahj7kjxvw0p92sza72fyh47by5qna6ym9lsvka0y8fk7jf6w";
+ version = "1.2.3.4";
+ sha256 = "0xwav5ghik0vzg706rcqlzk64gnvr4nn4iikx1bzymzz2p5zyg0z";
isLibrary = false;
isExecutable = true;
buildDepends = [
diff --git a/pkgs/development/libraries/haskell/yesod-core/default.nix b/pkgs/development/libraries/haskell/yesod-core/default.nix
index 14c8259cddb6b860f8be163b86dffa41a98d1ea9..0bd73c2ade4ff6715c98625b142938652ec44f7e 100644
--- a/pkgs/development/libraries/haskell/yesod-core/default.nix
+++ b/pkgs/development/libraries/haskell/yesod-core/default.nix
@@ -10,8 +10,8 @@
cabal.mkDerivation (self: {
pname = "yesod-core";
- version = "1.2.4.4";
- sha256 = "0awz5ijhmd7z292irzz8sp2j3vp3lp57k9rcp4bmgqmxkf826hkj";
+ version = "1.2.4.5";
+ sha256 = "091f89bwjsf2qimivbz74rykjjgzghfvs66sv9cz305pgw6kpjc7";
buildDepends = [
aeson attoparsecConduit blazeBuilder blazeHtml blazeMarkup
caseInsensitive cereal clientsession conduit cookie dataDefault
diff --git a/pkgs/development/libraries/haskell/yesod-form/default.nix b/pkgs/development/libraries/haskell/yesod-form/default.nix
index 878e3c9ebce15e40c03496477bb497ac5bb81981..5c0220f1f2aacd32e81036d9544d88f9af1f94fa 100644
--- a/pkgs/development/libraries/haskell/yesod-form/default.nix
+++ b/pkgs/development/libraries/haskell/yesod-form/default.nix
@@ -6,8 +6,8 @@
cabal.mkDerivation (self: {
pname = "yesod-form";
- version = "1.3.2.2";
- sha256 = "1dqhpzkhg9wcdd9djynrjixpp28rj8iy9pfipx250bry7yq77rv2";
+ version = "1.3.3";
+ sha256 = "1maf8yczijx8rdjy4abr2jq1ds4g61jg3zbqxjzaaxsbs77gna4a";
buildDepends = [
aeson attoparsec blazeBuilder blazeHtml blazeMarkup cryptoApi
dataDefault emailValidate hamlet network persistent resourcet
diff --git a/pkgs/development/libraries/haskell/yesod-platform/default.nix b/pkgs/development/libraries/haskell/yesod-platform/default.nix
index 9fe24ca4a747591260cd1f153eba60bd1b1fd908..f75b5706f6aae5a59a85b7b438b7e9ae2262170d 100644
--- a/pkgs/development/libraries/haskell/yesod-platform/default.nix
+++ b/pkgs/development/libraries/haskell/yesod-platform/default.nix
@@ -30,8 +30,8 @@
cabal.mkDerivation (self: {
pname = "yesod-platform";
- version = "1.2.4.2";
- sha256 = "1hmzdwjqi3cxdmyvcr48kprrsa8h548z272mif07114d0qh48x4w";
+ version = "1.2.4.3";
+ sha256 = "1ilkfmg4sdrz45hc2m8b8rqz242phgxzgizrnd41d5g04jib3hl3";
buildDepends = [
aeson ansiTerminal asn1Data asn1Types attoparsec attoparsecConduit
authenticate base64Bytestring baseUnicodeSymbols blazeBuilder
diff --git a/pkgs/development/libraries/hunspell/default.nix b/pkgs/development/libraries/hunspell/default.nix
index 04be58eb50a66b01ee2662d3c70fc4866f377cfa..95516dadacf79fc0e29785d42b02acae9789173a 100644
--- a/pkgs/development/libraries/hunspell/default.nix
+++ b/pkgs/development/libraries/hunspell/default.nix
@@ -13,9 +13,15 @@ stdenv.mkDerivation rec {
meta = with stdenv.lib; {
homepage = http://hunspell.sourceforge.net;
- description = "The spell checker of OpenOffice.org and Mozilla Firefox 3 & Thunderbird, Google Chrome etc.";
+ description = "Spell checker";
longDescription = ''
+ Hunspell is the spell checker of LibreOffice, OpenOffice.org, Mozilla
+ Firefox 3 & Thunderbird, Google Chrome, and it is also used by
+ proprietary software packages, like Mac OS X, InDesign, memoQ, Opera and
+ SDL Trados.
+
Main features:
+
* Extended support for language peculiarities; Unicode character encoding, compounding and complex morphology.
* Improved suggestion using n-gram similarity, rule and dictionary based pronounciation data.
* Morphological analysis, stemming and generation.
diff --git a/pkgs/development/libraries/jansson/default.nix b/pkgs/development/libraries/jansson/default.nix
index a1f9983abe2cbddd5e49b89f35fef60bfadc0f7a..4908c737ece4fc51bda5a219092dd9dbd940c208 100644
--- a/pkgs/development/libraries/jansson/default.nix
+++ b/pkgs/development/libraries/jansson/default.nix
@@ -10,7 +10,7 @@ stdenv.mkDerivation rec {
meta = {
homepage = "http://www.digip.org/jansson/";
- description = "Jansson is a C library for encoding, decoding and manipulating JSON data.";
+ description = "C library for encoding, decoding and manipulating JSON data";
license = "MIT";
};
}
diff --git a/pkgs/development/libraries/leveldb/default.nix b/pkgs/development/libraries/leveldb/default.nix
index 12846dfbe8b5413835c56547d0892001b1ef5bb1..7c990e99c33cb8a1453a88635cd600c9d5a37993 100644
--- a/pkgs/development/libraries/leveldb/default.nix
+++ b/pkgs/development/libraries/leveldb/default.nix
@@ -21,7 +21,7 @@ stdenv.mkDerivation rec {
meta = {
homepage = "https://code.google.com/p/leveldb/";
- description = "A fast and lightweight key/value database library by Google.";
+ description = "Fast and lightweight key/value database library by Google";
license = "BSD";
};
}
diff --git a/pkgs/development/libraries/libav/default.nix b/pkgs/development/libraries/libav/default.nix
index ea45902b7493a9c1c6308b8ee4e1d73daeafdbb2..287ac32fff5f6a890600f81843d8b002e049a918 100644
--- a/pkgs/development/libraries/libav/default.nix
+++ b/pkgs/development/libraries/libav/default.nix
@@ -26,7 +26,7 @@ with { inherit (stdenv.lib) optional optionals; };
let
result = {
- libav_9 = libavFun "9.9" "1rwphyqb2c4zyp20y4ywxjiddmd46vd4dbpdm1lxqm3q63rmmdk9";
+ libav_9 = libavFun "9.10" "039hx7z8lmsiljy4wj87hk8lkxspbxbrjv43v3lc38cxfx0fdnw3";
libav_0_8 = libavFun "0.8.8" "1wnbmbs0z4f55y8r9bwb63l04zn383l1avy4c9x1ffb2xccgcp79";
};
diff --git a/pkgs/development/libraries/libdevil/default.nix b/pkgs/development/libraries/libdevil/default.nix
index 6efb785b6577de583de19d8286664d90a84fe616..d3053b4d2a5fd0d438bc9e6473d937f33c93d2dd 100644
--- a/pkgs/development/libraries/libdevil/default.nix
+++ b/pkgs/development/libraries/libdevil/default.nix
@@ -28,7 +28,7 @@ stdenv.mkDerivation rec {
homepage = http://openil.sourceforge.net/;
description = "An image library which can can load, save, convert, manipulate, filter and display a wide variety of image formats";
license = licenses.lgpl2;
- platforms = platforms.all;
+ platforms = platforms.mesaPlatforms;
maintainers = [ maintainers.phreedom maintainers.urkud ];
};
}
diff --git a/pkgs/development/libraries/libid3tag/default.nix b/pkgs/development/libraries/libid3tag/default.nix
index e137c939771570f69781be970a7221b1ac5eaa5c..3b701b703c1a84941bad0b68bd113b810248c8dc 100644
--- a/pkgs/development/libraries/libid3tag/default.nix
+++ b/pkgs/development/libraries/libid3tag/default.nix
@@ -10,7 +10,7 @@ stdenv.mkDerivation {
propagatedBuildInputs = [zlib];
meta = {
- description = "An ID3 tag manipulation library.";
+ description = "ID3 tag manipulation library";
homepage = http://mad.sourceforge.net/;
license = "GPL";
};
diff --git a/pkgs/development/libraries/libjson-rpc-cpp/default.nix b/pkgs/development/libraries/libjson-rpc-cpp/default.nix
new file mode 100644
index 0000000000000000000000000000000000000000..3dca6a04af7b442a552ac69ec0eb12cb2560970d
--- /dev/null
+++ b/pkgs/development/libraries/libjson-rpc-cpp/default.nix
@@ -0,0 +1,28 @@
+{ stdenv, fetchurl, cmake, curl }:
+
+let
+ name = "libjson-rpc-cpp";
+ version = "0.2.1";
+in
+
+stdenv.mkDerivation {
+ name = "${name}-${version}";
+
+ src = fetchurl {
+ url = "https://github.com/cinemast/${name}/archive/${version}.tar.gz";
+ sha256 = "1pc9nn4968qkda8vr4f9dijn2fcldm8i0ymwmql29h4cl5ghdnpw";
+ };
+
+ buildInputs = [ cmake curl ];
+
+ NIX_LDFLAGS = "-lpthread";
+ enableParallelBuilding = true;
+ doCheck = true;
+
+ checkPhase = "LD_LIBRARY_PATH=out/ ctest";
+
+ meta = {
+ description = "C++ framework for json-rpc (json remote procedure call)";
+ platforms = stdenv.lib.platforms.linux;
+ };
+}
diff --git a/pkgs/development/libraries/liblockfile/default.nix b/pkgs/development/libraries/liblockfile/default.nix
index 2db90845f699c656ecfe22c25ad0ad5981ed300b..f991fdc2f299c16cdbdf530d6cad82913f1cbb4b 100644
--- a/pkgs/development/libraries/liblockfile/default.nix
+++ b/pkgs/development/libraries/liblockfile/default.nix
@@ -20,7 +20,7 @@ stdenv.mkDerivation rec {
meta = {
- description = "Liblockfile is a shared library with NFS-safe locking functions.";
+ description = "Shared library with NFS-safe locking functions";
homepage = http://packages.debian.org/unstable/libs/liblockfile1;
license = "GPLv2+";
diff --git a/pkgs/development/libraries/libmcrypt/default.nix b/pkgs/development/libraries/libmcrypt/default.nix
index 79019cbc4891eeff8f0ec4f0f61fcf6ed3366329..afa661617318dddc8df5251f687367fc1fe8eb1f 100644
--- a/pkgs/development/libraries/libmcrypt/default.nix
+++ b/pkgs/development/libraries/libmcrypt/default.nix
@@ -16,7 +16,7 @@ stdenv.mkDerivation rec {
[ "--disable-posix-threads" ];
meta = {
- description = "MCrypt is a replacement for the old crypt() package and crypt(1) command, with extensions.";
+ description = "Replacement for the old crypt() package and crypt(1) command, with extensions";
homepage = http://mcrypt.sourceforge.net;
license = "GPL";
};
diff --git a/pkgs/development/libraries/libmemcached/default.nix b/pkgs/development/libraries/libmemcached/default.nix
index 487b4de6cb76dff4c56355e3941a03d9ac2819b1..b724f915150a17399b74a111456c755e10c6b883 100644
--- a/pkgs/development/libraries/libmemcached/default.nix
+++ b/pkgs/development/libraries/libmemcached/default.nix
@@ -12,7 +12,7 @@ stdenv.mkDerivation rec {
meta = {
homepage = http://libmemcached.org;
- description = "libMemcached is an open source C/C++ client library and tools for the memcached server.";
+ description = "Open source C/C++ client library and tools for the memcached server";
license = "BSD";
};
}
diff --git a/pkgs/development/libraries/libnet/default.nix b/pkgs/development/libraries/libnet/default.nix
new file mode 100644
index 0000000000000000000000000000000000000000..783739dda717b5381c8c4e39f1a7eeda3cda1804
--- /dev/null
+++ b/pkgs/development/libraries/libnet/default.nix
@@ -0,0 +1,18 @@
+{ stdenv, fetchurl }:
+
+stdenv.mkDerivation rec {
+ name = "libnet-${version}";
+ version = "1.2-rc2";
+
+ src = fetchurl {
+ url = "mirror://sourceforge/libnet-dev/${name}.tar.gz";
+ sha256 = "1pc74p839a7wvhjdgy0scj7c4yarr6mqdqvj56k6sp8pkc763az7";
+ };
+
+ meta = {
+ homepage = http://github.com/sam-github/libnet;
+ description = "Portable framework for low-level network packet construction";
+ license = stdenv.lib.licenses.bsd3;
+ platforms = stdenv.lib.platforms.unix;
+ };
+}
diff --git a/pkgs/development/libraries/libnetfilter_conntrack/default.nix b/pkgs/development/libraries/libnetfilter_conntrack/default.nix
index 99624911077d1a1a6febb6a5e30a12bf3ef3bd37..8e689ed25687ec5128b9d3b1ecaccb16e4f4b1df 100644
--- a/pkgs/development/libraries/libnetfilter_conntrack/default.nix
+++ b/pkgs/development/libraries/libnetfilter_conntrack/default.nix
@@ -11,7 +11,7 @@ stdenv.mkDerivation rec {
buildInputs = [ pkgconfig libnfnetlink libmnl ];
meta = {
- description = "userspace library providing an API to the in-kernel connection tracking state table.";
+ description = "Userspace library providing an API to the in-kernel connection tracking state table";
longDescription = ''
libnetfilter_conntrack is a userspace library providing a programming interface (API) to the
in-kernel connection tracking state table. The library libnetfilter_conntrack has been
diff --git a/pkgs/development/libraries/libnfnetlink/default.nix b/pkgs/development/libraries/libnfnetlink/default.nix
index 07a182dff10febce562a0132a8ae600f5040944b..3bb698e9bf631c9fcfd87a296f13a03b84e3cf15 100644
--- a/pkgs/development/libraries/libnfnetlink/default.nix
+++ b/pkgs/development/libraries/libnfnetlink/default.nix
@@ -9,7 +9,7 @@ stdenv.mkDerivation rec {
};
meta = {
- description = "low-level library for netfilter related kernel/userspace communication.";
+ description = "Low-level library for netfilter related kernel/userspace communication";
longDescription = ''
libnfnetlink is the low-level library for netfilter related kernel/userspace communication.
It provides a generic messaging infrastructure for in-kernel netfilter subsystems
diff --git a/pkgs/development/libraries/liboop/default.nix b/pkgs/development/libraries/liboop/default.nix
index 20793eb3140feb5ef2a8a358457cb908eaaf60cc..a963288e869a5d23d0781614d2881ca35300554a 100644
--- a/pkgs/development/libraries/liboop/default.nix
+++ b/pkgs/development/libraries/liboop/default.nix
@@ -9,7 +9,7 @@ stdenv.mkDerivation {
};
meta = {
- description = "`liboop', an event loop library.";
+ description = "Event loop library";
homepage = http://liboop.ofb.net/;
license = "LGPL";
};
diff --git a/pkgs/development/libraries/librdf/default.nix b/pkgs/development/libraries/librdf/default.nix
index 21c952b7fb899f697fb9db9d17b0d2813131cd67..9b51f694ab3ec3be3300305476f21241826ebb90 100644
--- a/pkgs/development/libraries/librdf/default.nix
+++ b/pkgs/development/libraries/librdf/default.nix
@@ -25,7 +25,7 @@ stdenv.mkDerivation rec {
#doCheck = true; # would need swh_lv2 and some path patching
meta = {
- description = "A lightweight RDF library with special support for LADSPA plugins.";
+ description = "Lightweight RDF library with special support for LADSPA plugins";
homepage = http://sourceforge.net/projects/lrdf/;
license = "GPLv2";
maintainers = [ stdenv.lib.maintainers.marcweber ];
diff --git a/pkgs/development/libraries/libsodium/default.nix b/pkgs/development/libraries/libsodium/default.nix
new file mode 100644
index 0000000000000000000000000000000000000000..e8124c2643ab92c4e91d958d2774e6d9f5cc9bb7
--- /dev/null
+++ b/pkgs/development/libraries/libsodium/default.nix
@@ -0,0 +1,21 @@
+{ stdenv, fetchurl }:
+
+stdenv.mkDerivation rec {
+ name = "libsodium-0.4.3";
+
+ src = fetchurl {
+ url = "https://download.libsodium.org/libsodium/releases/${name}.tar.gz";
+ sha256 = "0hk0zca1kpj6xlc2j2qx9qy7287pi0896frmxq5d7qmcwsdf372r";
+ };
+
+ NIX_LDFLAGS = "-lssp";
+
+ doCheck = true;
+
+ meta = {
+ description = "Version of NaCl with harwdare tests at runtime, not build time";
+ license = "ISC";
+ maintainers = with stdenv.lib.maintainers; [ viric ];
+ platforms = stdenv.lib.platforms.all;
+ };
+}
diff --git a/pkgs/development/libraries/libtoxcore/default.nix b/pkgs/development/libraries/libtoxcore/default.nix
new file mode 100644
index 0000000000000000000000000000000000000000..0098ddb9d77aa3696d3dde85addb9c22e13f9a4f
--- /dev/null
+++ b/pkgs/development/libraries/libtoxcore/default.nix
@@ -0,0 +1,36 @@
+{ stdenv, fetchurl, autoconf, libtool, automake, libsodium, ncurses
+, libconfig, pkgconfig }:
+
+let
+ version = "31f5d7a8ab";
+ date = "20131011";
+in
+stdenv.mkDerivation rec {
+ name = "tox-core-${date}-${version}";
+
+ src = fetchurl {
+ url = "https://github.com/irungentoo/ProjectTox-Core/tarball/${version}";
+ name = "${name}.tar.gz";
+ sha256 = "0frz8ylvi33i7zkiz3hp28ylqg4c3ffrbc2m3ibb4zv9rwfzf77r";
+ };
+
+ preConfigure = ''
+ autoreconf -i
+ '';
+
+ configureFlags = [ "--with-libsodium-headers=${libsodium}/include"
+ "--with-libsodium-libs=${libsodium}/lib"
+ "--enable-ntox" ];
+
+ buildInputs = [ autoconf libtool automake libsodium ncurses libconfig
+ pkgconfig ];
+
+ doCheck = true;
+
+ meta = {
+ description = "P2P FOSS instant messaging application aimed to replace Skype with crypto";
+ license = "GPLv3+";
+ maintainers = with stdenv.lib.maintainers; [ viric ];
+ platforms = stdenv.lib.platforms.all;
+ };
+}
diff --git a/pkgs/development/libraries/libusb1/default.nix b/pkgs/development/libraries/libusb1/default.nix
index c01baa2fd0f64087b5dc1fbf3d59f4c024d1b56f..d4504a26b7f3d63a460e45aac8bf15998c09920c 100644
--- a/pkgs/development/libraries/libusb1/default.nix
+++ b/pkgs/development/libraries/libusb1/default.nix
@@ -11,6 +11,8 @@ stdenv.mkDerivation rec {
buildInputs = [ pkgconfig ];
propagatedBuildInputs = stdenv.lib.optional (stdenv.isLinux) udev;
+ NIX_LDFLAGS = "-lgcc_s";
+
meta = {
homepage = http://www.libusb.org;
description = "User-space USB library";
diff --git a/pkgs/development/libraries/libyaml-cpp/0.3.x.nix b/pkgs/development/libraries/libyaml-cpp/0.3.x.nix
new file mode 100644
index 0000000000000000000000000000000000000000..4b0acd83fc39a2719d7905b1d06ad315de9343ef
--- /dev/null
+++ b/pkgs/development/libraries/libyaml-cpp/0.3.x.nix
@@ -0,0 +1,18 @@
+{stdenv, fetchurl, cmake, boostHeaders}:
+
+stdenv.mkDerivation {
+ name = "libyaml-cpp-0.3.0";
+
+ src = fetchurl {
+ url = http://yaml-cpp.googlecode.com/files/yaml-cpp-0.3.0.tar.gz;
+ sha256 = "10kv25zgq96ybxc6c19lzpax1xi5lpxrdqa9x52nffsql6skil1c";
+ };
+
+ buildInputs = [ cmake boostHeaders ];
+
+ meta = {
+ homepage = http://code.google.com/p/yaml-cpp/;
+ description = "A YAML parser and emitter for C++";
+ license = "MIT";
+ };
+}
diff --git a/pkgs/development/libraries/libyaml-cpp/default.nix b/pkgs/development/libraries/libyaml-cpp/default.nix
new file mode 100644
index 0000000000000000000000000000000000000000..09860522ef4193fac57aef4c91d132769ca20873
--- /dev/null
+++ b/pkgs/development/libraries/libyaml-cpp/default.nix
@@ -0,0 +1,18 @@
+{stdenv, fetchurl, cmake, boostHeaders}:
+
+stdenv.mkDerivation {
+ name = "libyaml-cpp-0.5.1";
+
+ src = fetchurl {
+ url = http://yaml-cpp.googlecode.com/files/yaml-cpp-0.5.1.tar.gz;
+ sha256 = "01kg0h8ksp162kdhyzn67vnlxpj5zjbks84sh50pv61xni990z1y";
+ };
+
+ buildInputs = [ cmake boostHeaders ];
+
+ meta = {
+ homepage = http://code.google.com/p/yaml-cpp/;
+ description = "A YAML parser and emitter for C++";
+ license = "MIT";
+ };
+}
diff --git a/pkgs/development/libraries/nspr/default.nix b/pkgs/development/libraries/nspr/default.nix
index 1aef55c9b2ccad38276ed9b2b560e2c3470a16e4..8036803134933099a378cabf2c865883dd294753 100644
--- a/pkgs/development/libraries/nspr/default.nix
+++ b/pkgs/development/libraries/nspr/default.nix
@@ -1,13 +1,13 @@
{ stdenv, fetchurl }:
-let version = "4.10"; in
+let version = "4.10.1"; in
stdenv.mkDerivation {
name = "nspr-${version}";
src = fetchurl {
url = "http://ftp.mozilla.org/pub/mozilla.org/nspr/releases/v${version}/src/nspr-${version}.tar.gz";
- sha1 = "10dbf68c07497dab30be09db526931c885d5a7e9";
+ sha1 = "bd1cdf5e7e107846ffe431c5c62b81a560e8c3f7";
};
preConfigure = "cd nspr";
diff --git a/pkgs/development/libraries/nss/default.nix b/pkgs/development/libraries/nss/default.nix
index de980d718f33e3cb50b3532476139776a66b8913..49f3754bc14061acaffb849c788f43ec69ca9684 100644
--- a/pkgs/development/libraries/nss/default.nix
+++ b/pkgs/development/libraries/nss/default.nix
@@ -17,11 +17,11 @@ let
in stdenv.mkDerivation rec {
name = "nss-${version}";
- version = "3.15.1";
+ version = "3.15.2";
src = fetchurl {
- url = "http://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/NSS_3_15_1_RTM/src/${name}.tar.gz";
- sha1 = "1aa7c0ff8af7fb2c8b6e4886ae2291f4bfe0d5c0";
+ url = "http://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/NSS_3_15_2_RTM/src/${name}.tar.gz";
+ sha1 = "2d900c296bf11deabbf833ebd6ecdea549c97a5f";
};
buildInputs = [ nspr perl zlib sqlite ];
diff --git a/pkgs/development/libraries/oniguruma/default.nix b/pkgs/development/libraries/oniguruma/default.nix
index 984b84085fe474a8e48a1172442a81f7e6ed1afe..684d6475c637498642fca6faa98d90d6ed43d723 100644
--- a/pkgs/development/libraries/oniguruma/default.nix
+++ b/pkgs/development/libraries/oniguruma/default.nix
@@ -10,7 +10,7 @@ stdenv.mkDerivation rec {
meta = {
homepage = http://www.geocities.jp/kosako3/oniguruma/;
- description = "Oniguruma is a regular expressions library.";
+ description = "Oniguruma regular expressions library";
license = "BSD";
};
}
diff --git a/pkgs/development/libraries/phonon-backend-vlc/default.nix b/pkgs/development/libraries/phonon-backend-vlc/default.nix
index 97e778cc1f58f09489cf94aed71d98cbd7f4ddaf..257c80f0b1183f3664ac4114d6732a664e7a574e 100644
--- a/pkgs/development/libraries/phonon-backend-vlc/default.nix
+++ b/pkgs/development/libraries/phonon-backend-vlc/default.nix
@@ -20,7 +20,7 @@ stdenv.mkDerivation {
meta = {
description = "VideoLAN backend for Phonon multimedia framework";
- inherit (qt4.meta) platforms;
+ platforms = stdenv.lib.platforms.linux;
maintainers = [ stdenv.lib.maintainers.urkud ];
};
}
diff --git a/pkgs/development/libraries/polkit/default.nix b/pkgs/development/libraries/polkit/default.nix
index 788b6d6d32b83189c1e455c037ab30fc3bfc4330..9d1f0d18c1ad6321db93b3b404c7650795aaabe7 100644
--- a/pkgs/development/libraries/polkit/default.nix
+++ b/pkgs/development/libraries/polkit/default.nix
@@ -1,6 +1,6 @@
{ stdenv, fetchurl, pkgconfig, glib, expat, pam, intltool, gettext
, gobjectIntrospection
-, useSystemd ? true, systemd }:
+, useSystemd ? stdenv.isLinux, systemd }:
let
diff --git a/pkgs/development/libraries/qhull/default.nix b/pkgs/development/libraries/qhull/default.nix
index b81dbda15860a21809168cd42d4e2ae2ec95a1e4..a82acd2745db0db26b6d7ed9c8b2525e124bc354 100644
--- a/pkgs/development/libraries/qhull/default.nix
+++ b/pkgs/development/libraries/qhull/default.nix
@@ -14,7 +14,7 @@ stdenv.mkDerivation rec {
meta = {
homepage = http://www.qhull.org/;
- description = "Computes the convex hull, Delaunay triangulation, ...";
+ description = "Computes the convex hull, Delaunay triangulation, Voronoi diagram and more";
license = "free";
};
}
diff --git a/pkgs/development/libraries/sfml/default.nix b/pkgs/development/libraries/sfml/default.nix
index 99b0f2e725cd1c5d931ad6682c3a9d7de3181b0d..844505cb3599f317d72bf2b545863f1d5a2d41b3 100644
--- a/pkgs/development/libraries/sfml/default.nix
+++ b/pkgs/development/libraries/sfml/default.nix
@@ -16,7 +16,12 @@ stdenv.mkDerivation rec {
";
meta = with stdenv.lib; {
homepage = http://www.sfml-dev.org/;
- description = "A multimedia C++ API that provides access to graphics, input, audio, etc.";
+ description = "Simple and fast multimedia library";
+ longDescription = ''
+ SFML provides a simple interface to the various components of your PC, to
+ ease the development of games and multimedia applications. It is composed
+ of five modules: system, window, graphics, audio and network.
+ '';
license = licenses.zlib;
maintainers = [ maintainers.astsmtl ];
};
diff --git a/pkgs/development/libraries/silgraphite/graphite2.nix b/pkgs/development/libraries/silgraphite/graphite2.nix
new file mode 100644
index 0000000000000000000000000000000000000000..0a36efbc982bfe06d54e98ed5d2c73ca37eebd2b
--- /dev/null
+++ b/pkgs/development/libraries/silgraphite/graphite2.nix
@@ -0,0 +1,21 @@
+{ stdenv, fetchurl, pkgconfig, freetype, libXft, pango, fontconfig, cmake }:
+
+stdenv.mkDerivation rec {
+ version = "1.2.3";
+ name = "graphite2-${version}";
+
+ src = fetchurl {
+ url = "mirror://sourceforge/silgraphite/graphite2/${name}.tgz";
+ sha256 = "1xgwnd81gm6p293x8paxb3yisnvpj5qnv1dzr7bjdi7b7h00ls7g";
+ };
+
+ buildInputs = [pkgconfig freetype libXft pango fontconfig cmake];
+
+ NIX_CFLAGS_COMPILE = "-I${freetype}/include/freetype2";
+
+ meta = {
+ description = "An advanced font engine";
+ maintainers = [ stdenv.lib.maintainers.raskin ];
+ platforms = stdenv.lib.platforms.linux;
+ };
+}
diff --git a/pkgs/development/libraries/spice-protocol/default.nix b/pkgs/development/libraries/spice-protocol/default.nix
index e281b1fcf9d14989c2620ff70a1f67d1f1ee645e..162a832c93af6b6ccd278cd0d44ea50ab8e6e428 100644
--- a/pkgs/development/libraries/spice-protocol/default.nix
+++ b/pkgs/development/libraries/spice-protocol/default.nix
@@ -9,7 +9,7 @@ stdenv.mkDerivation rec {
};
meta = {
- description = "Protocol headers for the SPICE protocol.";
+ description = "Protocol headers for the SPICE protocol";
homepage = http://www.spice-space.org;
license = stdenv.lib.licenses.bsd3;
diff --git a/pkgs/development/libraries/tinyxml/2.6.2.nix b/pkgs/development/libraries/tinyxml/2.6.2.nix
index fde30a98fe9859efedcaabcc95919ba6e8d90130..e1cc1f27c1d04cbba2ad1c365060368d61f6709c 100644
--- a/pkgs/development/libraries/tinyxml/2.6.2.nix
+++ b/pkgs/development/libraries/tinyxml/2.6.2.nix
@@ -58,7 +58,7 @@ in stdenv.mkDerivation {
'';
meta = {
- description = "TinyXML is a simple, small, C++ XML parser that can be easily integrating into other programs.";
+ description = "Simple, small, C++ XML parser that can be easily integrating into other programs";
homepage = "http://www.grinninglizard.com/tinyxml/index.html";
license = "free-non-copyleft";
};
diff --git a/pkgs/development/libraries/v8/default.nix b/pkgs/development/libraries/v8/default.nix
index 13c2990c73d3fe17cdd7dccdf54e7fb42c139fa3..0564e68879574993213373969fdc3f6d26ba3e4e 100644
--- a/pkgs/development/libraries/v8/default.nix
+++ b/pkgs/development/libraries/v8/default.nix
@@ -59,7 +59,7 @@ stdenv.mkDerivation {
meta = with stdenv.lib; {
description = "V8 is Google's open source JavaScript engine";
- platforms = platforms.unix;
+ platforms = platforms.linux ++ platforms.darwin;
license = licenses.bsd3;
};
}
diff --git a/pkgs/development/libraries/vcdimager/default.nix b/pkgs/development/libraries/vcdimager/default.nix
index 58b9d2f25735afe5ac965a1030c9fae639fd3786..e93f071aefacf4a4d1e6acb8eb8ef357b299b676 100644
--- a/pkgs/development/libraries/vcdimager/default.nix
+++ b/pkgs/development/libraries/vcdimager/default.nix
@@ -16,7 +16,7 @@ stdenv.mkDerivation {
meta = {
homepage = http://www.gnu.org/software/vcdimager/;
- description = "GNU VCDImager is a full-featured mastering suite for authoring, disassembling and analyzing Video CDs and Super Video CDs.";
+ description = "Full-featured mastering suite for authoring, disassembling and analyzing Video CDs and Super Video CDs";
platforms = stdenv.lib.platforms.gnu; # random choice
};
}
diff --git a/pkgs/development/lisp-modules/asdf/default.nix b/pkgs/development/lisp-modules/asdf/default.nix
new file mode 100644
index 0000000000000000000000000000000000000000..c615573ae3ecfae6d2ad3f9c6073b84463b178bc
--- /dev/null
+++ b/pkgs/development/lisp-modules/asdf/default.nix
@@ -0,0 +1,40 @@
+{stdenv, fetchurl, texinfo, texLive}:
+let
+ s = # Generated upstream information
+ rec {
+ baseName="asdf";
+ version="3.0.2.1";
+ name="${baseName}-${version}";
+ hash="1npd4dxsgk06ayhln56mwwky0vdpf7i77mkxfh105pld8w5xs4r4";
+ url="http://common-lisp.net/project/asdf/archives/asdf-3.0.2.1.tar.gz";
+ sha256="1npd4dxsgk06ayhln56mwwky0vdpf7i77mkxfh105pld8w5xs4r4";
+ };
+ buildInputs = [
+ texinfo texLive
+ ];
+in
+stdenv.mkDerivation {
+ inherit (s) name version;
+ inherit buildInputs;
+ src = fetchurl {
+ inherit (s) url sha256;
+ };
+ buildPhase = ''
+ make build/asdf.lisp
+ make -C doc asdf.info asdf.html
+ '';
+ installPhase = ''
+ mkdir -p "$out"/lib/common-lisp/asdf/
+ mkdir -p "$out"/share/doc/asdf/
+ cp -r ./* "$out"/lib/common-lisp/asdf/
+ cp -r doc/* "$out"/share/doc/asdf/
+ '';
+ sourceRoot=".";
+ meta = {
+ inherit (s) version;
+ description = ''Standard software-system definition library for Common Lisp'';
+ license = stdenv.lib.licenses.mit ;
+ maintainers = [stdenv.lib.maintainers.raskin];
+ platforms = stdenv.lib.platforms.linux;
+ };
+}
diff --git a/pkgs/development/lisp-modules/asdf/default.upstream b/pkgs/development/lisp-modules/asdf/default.upstream
new file mode 100644
index 0000000000000000000000000000000000000000..d8625182352f31c2c38a8ac50f76091e2e6d21d6
--- /dev/null
+++ b/pkgs/development/lisp-modules/asdf/default.upstream
@@ -0,0 +1,2 @@
+url http://common-lisp.net/project/asdf/archives/
+version_link asdf-[0-9].*[.]tar[.].*
diff --git a/pkgs/development/lisp-modules/clwrapper/cl-wrapper.sh b/pkgs/development/lisp-modules/clwrapper/cl-wrapper.sh
new file mode 100755
index 0000000000000000000000000000000000000000..91b8a0c2bb0fda87cc2109c355ae6f57d5f16e41
--- /dev/null
+++ b/pkgs/development/lisp-modules/clwrapper/cl-wrapper.sh
@@ -0,0 +1,44 @@
+#! /bin/sh
+# Part of NixPkgs package collection
+# This script can be used at your option under the same license as NixPkgs or
+# under MIT/X11 license
+
+eval "$NIX_LISP_PREHOOK"
+
+NIX_LISP_COMMAND="$1"
+shift
+
+[ -z "$NIX_LISP" ] && NIX_LISP="${NIX_LISP_COMMAND##*/}"
+
+export NIX_LISP NIX_LISP_LOAD_FILE NIX_LISP_EXEC_CODE NIX_LISP_COMMAND NIX_LISP_FINAL_PARAMETERS
+
+case "$NIX_LISP" in
+ sbcl)
+ NIX_LISP_LOAD_FILE="--load"
+ NIX_LISP_EXEC_CODE="--eval"
+ NIX_LISP_FINAL_PARAMETERS=
+ ;;
+ ecl)
+ NIX_LISP_LOAD_FILE="-load"
+ NIX_LISP_EXEC_CODE="-eval"
+ NIX_LISP_FINAL_PARAMETERS=
+ ;;
+ clisp)
+ NIX_LISP_LOAD_FILE="-c -l"
+ NIX_LISP_EXEC_CODE="-x"
+ NIX_LISP_FINAL_PARAMETERS="-repl"
+ ;;
+esac
+
+NIX_LISP_ASDF_REGISTRY_CODE="
+ (progn
+ (setf asdf:*default-source-registries* '(asdf/source-registry:environment-source-registry))
+ (asdf:initialize-source-registry)
+ )
+"
+
+[ -z "$NIX_LISP_SKIP_CODE" ] && "$NIX_LISP_COMMAND" $NIX_LISP_EARLY_OPTIONS \
+ $NIX_LISP_EXEC_CODE "(load \"$NIX_LISP_ASDF/lib/common-lisp/asdf/build/asdf.lisp\")" \
+ $NIX_LISP_EXEC_CODE "$NIX_LISP_ASDF_REGISTRY_CODE" \
+ $NIX_LISP_FINAL_PARAMETERS \
+ "$@"
diff --git a/pkgs/development/lisp-modules/clwrapper/common-lisp.sh b/pkgs/development/lisp-modules/clwrapper/common-lisp.sh
new file mode 100755
index 0000000000000000000000000000000000000000..b22ca016128abfe3af409bf334d5a24cfd6ea356
--- /dev/null
+++ b/pkgs/development/lisp-modules/clwrapper/common-lisp.sh
@@ -0,0 +1,3 @@
+#! /bin/sh
+
+"$(dirname "$0")"/cl-wrapper.sh "${NIX_LISP_COMMAND:-sbcl}" "$@"
diff --git a/pkgs/development/lisp-modules/clwrapper/default.nix b/pkgs/development/lisp-modules/clwrapper/default.nix
new file mode 100644
index 0000000000000000000000000000000000000000..0ae4ce13064c646990cf69d1c511ef3e66d2af94
--- /dev/null
+++ b/pkgs/development/lisp-modules/clwrapper/default.nix
@@ -0,0 +1,28 @@
+{stdenv, fetchurl, asdf, lisp ? null}:
+stdenv.mkDerivation {
+ name = "cl-wrapper-script";
+
+ buildPhase="";
+
+ installPhase=''
+ mkdir -p "$out"/bin
+ cp ${./cl-wrapper.sh} "$out"/bin/cl-wrapper.sh
+ cp ${./common-lisp.sh} "$out"/bin/common-lisp.sh
+ chmod a+x "$out"/bin/*
+ '';
+
+ inherit asdf lisp;
+
+ setupHook = ./setup-hook.sh;
+
+ phases="installPhase fixupPhase";
+
+ passthru = {
+ inherit lisp;
+ };
+
+ meta = {
+ description = ''Script used to wrap Common Lisp implementations'';
+ maintainers = [stdenv.lib.maintainers.raskin];
+ };
+}
diff --git a/pkgs/development/lisp-modules/clwrapper/setup-hook.sh b/pkgs/development/lisp-modules/clwrapper/setup-hook.sh
new file mode 100644
index 0000000000000000000000000000000000000000..5de43dc0e9a98f1f304a47946ae4f833c1c89521
--- /dev/null
+++ b/pkgs/development/lisp-modules/clwrapper/setup-hook.sh
@@ -0,0 +1,33 @@
+NIX_LISP_ASDF="@asdf@"
+
+CL_SOURCE_REGISTRY="@asdf@/lib/common-lisp/asdf/:@asdf@/lib/common-lisp/asdf/uiop/"
+
+addASDFPaths () {
+ for j in "$1"/lib/common-lisp/*; do
+ if [ -d "$j" ]; then
+ CL_SOURCE_REGISTRY="$CL_SOURCE_REGISTRY:$j/"
+ fi
+ done
+}
+
+setLisp () {
+ if [ -z "$NIX_LISP_COMMAND" ]; then
+ for j in "$1"/bin/*; do
+ case "$(basename "$j")" in
+ sbcl) NIX_LISP_COMMAND="$j" ;;
+ ecl) NIX_LISP_COMMAND="$j" ;;
+ clisp) NIX_LISP_COMMAND="$j" ;;
+ esac
+ done
+ fi
+ if [ -z "$NIX_LISP" ]; then
+ NIX_LISP="${NIX_LISP_COMMAND##*/}"
+ fi
+}
+
+export NIX_LISP_COMMAND NIX_LISP CL_SOURCE_REGISTRY NIX_LISP_ASDF
+
+envHooks=(envHooks[@] addASDFPaths setLisp)
+
+mkdir -p "$HOME"/.cache/common-lisp || HOME="$TMP/.temp-$USER-home"
+mkdir -p "$HOME"/.cache/common-lisp
diff --git a/pkgs/development/lisp-modules/define-package.nix b/pkgs/development/lisp-modules/define-package.nix
new file mode 100644
index 0000000000000000000000000000000000000000..4fe3bb68373ad028b6c8dd75d7d35e8f6d95d057
--- /dev/null
+++ b/pkgs/development/lisp-modules/define-package.nix
@@ -0,0 +1,45 @@
+args @ {stdenv, clwrapper, baseName, version ? "latest", src, description, deps,
+ buildInputs ? [], meta ? {}, overrides?(x: {})}:
+let
+ deployConfigScript = ''
+ config_script="$out"/lib/common-lisp-settings/${args.baseName}-shell-config.sh
+ mkdir -p "$(dirname "$config_script")"
+ touch "$config_script"
+ chmod a+x "$config_script"
+ echo "export NIX_LISP_COMMAND='$NIX_LISP_COMMAND'" >> "$config_script"
+ echo "export NIX_LISP_ASDF='$NIX_LISP_ASDF'" >> "$config_script"
+ echo "export CL_SOURCE_REGISTRY="\$CL_SOURCE_REGISTRY\''${CL_SOURCE_REGISTRY:+:}"'$CL_SOURCE_REGISTRY:$out/lib/common-lisp/${args.baseName}/'" >> "$config_script"
+ '';
+ deployLaunchScript = ''
+ launch_script="$out"/bin/${args.baseName}-lisp-launcher.sh
+ mkdir -p "$(dirname "$launch_script")"
+ touch "$launch_script"
+ chmod a+x "$launch_script"
+ echo "#! /bin/sh" >> "$launch_script"
+ echo "source '$config_script'" >> "$launch_script"
+ echo '"${clwrapper}/bin/common-lisp.sh" "$@"' >> "$launch_script"
+ '';
+basePackage = {
+ name = "lisp-${baseName}-${version}";
+ inherit src;
+
+ inherit deployConfigScript deployLaunchScript;
+ installPhase = ''
+ mkdir -p "$out"/share/doc/${args.baseName};
+ mkdir -p "$out"/lib/common-lisp/${args.baseName};
+ cp -r . "$out"/lib/common-lisp/${args.baseName};
+ cp -rf doc/* LICENCE LICENSE COPYING README README.html README.md readme.html "$out"/share/doc/${args.baseName} || true
+
+ ${deployConfigScript}
+ ${deployLaunchScript}
+ '';
+ propagatedBuildInputs = args.deps ++ [clwrapper clwrapper.lisp];
+ buildInputs = buildInputs;
+ dontStrip=true;
+ meta = {
+ inherit description version;
+ } // meta;
+};
+package = basePackage // (overrides basePackage);
+in
+stdenv.mkDerivation package
diff --git a/pkgs/development/lisp-modules/lisp-packages.nix b/pkgs/development/lisp-modules/lisp-packages.nix
new file mode 100644
index 0000000000000000000000000000000000000000..8eaaf151fa71e5f88bb178bc0f6a8982b9b5c836
--- /dev/null
+++ b/pkgs/development/lisp-modules/lisp-packages.nix
@@ -0,0 +1,49 @@
+{stdenv, clwrapper, pkgs}:
+let lispPackages = rec {
+ inherit pkgs clwrapper stdenv;
+ nixLib = pkgs.lib;
+ callPackage = nixLib.callPackageWith lispPackages;
+
+ buildLispPackage = callPackage ./define-package.nix;
+
+ cl-ppcre = buildLispPackage rec {
+ baseName = "cl-ppcre";
+ version = "2.0.4";
+ description = "Regular expression library for Common Lisp";
+ deps = [];
+ src = pkgs.fetchurl {
+ url = "https://github.com/edicl/cl-ppcre/archive/v${version}.tar.gz";
+ sha256 = "16nkfg6j7nn8qkzxn462kqpdlbajpz2p55pdl12sia6yqkj3lh97";
+ };
+ };
+
+ clx = buildLispPackage rec {
+ baseName = "clx";
+ version = "2013-09";
+ description = "X11 bindings for Common Lisp";
+ deps = [];
+ src = pkgs.fetchgit {
+ url = "https://github.com/sharplispers/clx/";
+ rev = "e2b762ac93d78d6eeca4f36698c8dfd1537ce998";
+ sha256 = "0jcrmlaayz7m8ixgriq7id3pdklyk785qvpcxdpcp4aqnfiiqhij";
+ };
+ };
+
+ iterate = buildLispPackage rec {
+ baseName = "iterate";
+ version = "1.4.3";
+ description = "Iteration package for Common Lisp";
+ deps = [];
+ src = pkgs.fetchdarcs {
+ url = "http://common-lisp.net/project/iterate/darcs/iterate";
+ sha256 = "0m3q0s7h5s8varwx584m2akgdslj14df7kg4w1bj1fbgzsag5m1w";
+ tag=version;
+ };
+ overrides = x: {
+ configurePhase="buildPhase(){ true; }";
+ };
+ };
+
+ stumpwm = callPackage ./stumpwm {};
+};
+in lispPackages
diff --git a/pkgs/development/lisp-modules/stumpwm/default.nix b/pkgs/development/lisp-modules/stumpwm/default.nix
new file mode 100644
index 0000000000000000000000000000000000000000..a41ee799d8a065b3bca2da7cd6967368489552c4
--- /dev/null
+++ b/pkgs/development/lisp-modules/stumpwm/default.nix
@@ -0,0 +1,33 @@
+{pkgs, nixLib, clwrapper, cl-ppcre, clx, buildLispPackage}:
+buildLispPackage rec {
+ baseName = "stumpwm";
+ version = "2013-09";
+ src = pkgs.fetchgit {
+ url = "https://github.com/sabetts/stumpwm";
+ sha256 = "0dd69myssfn2bsdx3xdp65mjrvs9x81dl3y3659pyf1avnjlir7h";
+ rev = "565ef58f04f59e1667ec1da4087f1a43a32cd67f";
+ };
+ description = "Tiling window manager for X11";
+ deps = [cl-ppcre clx];
+ buildInputs = with pkgs; [texinfo4 autoconf which makeWrapper];
+ meta = {
+ maintainers = [nixLib.maintainers.raskin];
+ platforms = nixLib.platforms.linux;
+ };
+ overrides = x: {
+ preConfigure = ''
+ ${x.deployConfigScript}
+ export CL_SOURCE_REGISTRY="$CL_SOURCE_REGISTRY:$PWD/"
+ ./autogen.sh
+ configureFlags=" --with-lisp=$NIX_LISP --with-$NIX_LISP=$(which common-lisp.sh) "
+ '';
+ installPhase=x.installPhase + ''
+ make install
+
+ if [ "$NIX_LISP" = "sbcl" ]; then
+ wrapProgram "$out"/bin/stumpwm --set SBCL_HOME "${clwrapper.lisp}/lib/sbcl"
+ fi;
+ '';
+ postInstall = ''false'';
+ };
+}
diff --git a/pkgs/development/misc/avr-gcc-with-avr-libc/default.nix b/pkgs/development/misc/avr-gcc-with-avr-libc/default.nix
index 3c28ed04dba2b7ac0eeb58418f124c0a33af57a2..5218f5b7744834a8b31d8461df19b219a08094d6 100644
--- a/pkgs/development/misc/avr-gcc-with-avr-libc/default.nix
+++ b/pkgs/development/misc/avr-gcc-with-avr-libc/default.nix
@@ -79,7 +79,7 @@ stdenv.mkDerivation {
};
meta = {
- description = "avr gcc developement environment including binutils, avr-gcc and avr-libc";
+ description = "AVR developement environment including binutils, avr-gcc and avr-libc";
# I've tried compiling the packages separately.. too much hassle. This just works. Fine.
license = ["GPL" "LGPL"]; # see single packages ..
homepage = []; # dito
diff --git a/pkgs/development/mobile/androidenv/build-app.nix b/pkgs/development/mobile/androidenv/build-app.nix
index 2792d364f15c15353f5100cd4601df1ae8a59a2f..db7067c989c56b44e655baa2631155b92174efa1 100644
--- a/pkgs/development/mobile/androidenv/build-app.nix
+++ b/pkgs/development/mobile/androidenv/build-app.nix
@@ -1,6 +1,7 @@
{ stdenv, androidsdk, jdk, ant }:
-{ name, src, platformVersions ? [ "8" ], useGoogleAPIs ? false, antFlags ? ""
+args@{ name, src, platformVersions ? [ "8" ], useGoogleAPIs ? false, antFlags ? ""
, release ? false, keyStore ? null, keyAlias ? null, keyStorePassword ? null, keyAliasPassword ? null
+, ...
}:
assert release -> keyStore != null && keyAlias != null && keyStorePassword != null && keyAliasPassword != null;
@@ -15,9 +16,8 @@ let
abiVersions = [];
};
in
-stdenv.mkDerivation {
+stdenv.mkDerivation ({
name = stdenv.lib.replaceChars [" "] [""] name;
- inherit src;
ANDROID_HOME = "${androidsdkComposition}/libexec/android-sdk-${platformName}";
@@ -45,4 +45,5 @@ stdenv.mkDerivation {
mkdir -p $out/nix-support
echo "file binary-dist \"$(echo $out/*.apk)\"" > $out/nix-support/hydra-build-products
'';
-}
+} //
+builtins.removeAttrs args ["name"])
diff --git a/pkgs/development/mobile/xcodeenv/xcodewrapper.nix b/pkgs/development/mobile/xcodeenv/xcodewrapper.nix
index 1cbab99e365d390c16ae55b74d14c4548960a038..7515fcdd121f17fd484231b430620ae596b9de37 100644
--- a/pkgs/development/mobile/xcodeenv/xcodewrapper.nix
+++ b/pkgs/development/mobile/xcodeenv/xcodewrapper.nix
@@ -1,4 +1,4 @@
-{stdenv, version ? "4.6"}:
+{stdenv, version ? "5.0"}:
stdenv.mkDerivation {
name = "xcode-wrapper-"+version;
@@ -9,6 +9,7 @@ stdenv.mkDerivation {
ln -s /usr/bin/xcodebuild
ln -s /usr/bin/xcrun
ln -s /usr/bin/security
+ ln -s /usr/bin/codesign
ln -s "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Applications/iPhone Simulator.app/Contents/MacOS/iPhone Simulator"
cd ..
diff --git a/pkgs/development/ocaml-modules/ocamlgraph/default.nix b/pkgs/development/ocaml-modules/ocamlgraph/default.nix
index 2e109f1d6210433de48671960469dd888237f03e..997ca2206105a3f3296a16c88b7a53f3d85b2b1c 100644
--- a/pkgs/development/ocaml-modules/ocamlgraph/default.nix
+++ b/pkgs/development/ocaml-modules/ocamlgraph/default.nix
@@ -36,7 +36,7 @@ stdenv.mkDerivation {
meta = {
homepage = http://ocamlgraph.lri.fr/;
- description = "ocamlgraph is a graph library for Objective Caml.";
+ description = "Graph library for Objective Caml";
license = "GNU Library General Public License version 2, with the special exception on linking described in file LICENSE";
platforms = ocaml.meta.platforms;
maintainers = [
diff --git a/pkgs/development/ocaml-modules/sexplib/default.nix b/pkgs/development/ocaml-modules/sexplib/default.nix
index 32d5c842dc8cc2909510d2bd28b0b7a4f1cec9e7..7c40b5e6cfb8224efbdaf1ccd5ae79126d237d76 100644
--- a/pkgs/development/ocaml-modules/sexplib/default.nix
+++ b/pkgs/development/ocaml-modules/sexplib/default.nix
@@ -15,7 +15,7 @@ stdenv.mkDerivation {
meta = {
homepage = "http://forge.ocamlcore.org/projects/sexplib/";
- description = "Library for serializing OCaml values to and from S-expressions.";
+ description = "Library for serializing OCaml values to and from S-expressions";
license = "LGPL";
platforms = ocaml.meta.platforms;
};
diff --git a/pkgs/development/perl-modules/maatkit/default.nix b/pkgs/development/perl-modules/maatkit/default.nix
index d560a5d8e4104d9d841d5b27602fe801dd9a80c9..d9a1f777f3ab5e7bbf37f1feabfa11124e991be0 100644
--- a/pkgs/development/perl-modules/maatkit/default.nix
+++ b/pkgs/development/perl-modules/maatkit/default.nix
@@ -25,7 +25,15 @@ buildPerlPackage rec {
'' ;
meta = {
- description = "Maatkit makes MySQL easier and safer to manage. It provides simple, predictable ways to do things you cannot otherwise do.";
+ description = "Database toolkit";
+ longDescription = ''
+ You can use Maatkit to prove replication is working correctly, fix
+ corrupted data, automate repetitive tasks, speed up your servers, and
+ much more.
+
+ In addition to MySQL, there is support for PostgreSQL, Memcached, and a
+ growing variety of other databases and technologies.
+ '';
license = "GPLv2+";
homepage = http://www.maatkit.org/;
};
diff --git a/pkgs/development/python-modules/blivet/default.nix b/pkgs/development/python-modules/blivet/default.nix
index 922594bc3dc94ee622fbfd76038706fe00c40662..c1b36bf909dee23306fe588cf6ac5589aaf1bb48 100644
--- a/pkgs/development/python-modules/blivet/default.nix
+++ b/pkgs/development/python-modules/blivet/default.nix
@@ -53,5 +53,6 @@ in buildPythonPackage rec {
homepage = "https://fedoraproject.org/wiki/Blivet";
description = "Module for management of a system's storage configuration";
license = [ "GPLv2+" "LGPLv2.1+" ];
+ platforms = stdenv.lib.platforms.linux;
};
}
diff --git a/pkgs/development/python-modules/buildout-nix/nix.patch b/pkgs/development/python-modules/buildout-nix/nix.patch
index a09163518a96ba0bb79dee38b6514aea9bce1753..dd3b8e12aa89143f41a18b5bebea346f1344296c 100644
--- a/pkgs/development/python-modules/buildout-nix/nix.patch
+++ b/pkgs/development/python-modules/buildout-nix/nix.patch
@@ -1,21 +1,36 @@
--- a/src/zc/buildout/easy_install.py 2013-08-27 22:28:40.233718116 +0200
-+++ b/src/zc/buildout/easy_install.py 2013-08-27 22:31:07.967871186 +0200
-@@ -508,16 +508,15 @@
++++ b/src/zc/buildout/easy_install.py 2013-10-07 00:29:31.077413935 +0200
+@@ -508,16 +508,31 @@
self._dest, os.path.basename(dist.location))
if os.path.isdir(dist.location):
- # we got a directory. It must have been
- # obtained locally. Just copy it.
- shutil.copytree(dist.location, newloc)
-+ # Symlink to dists in /nix/store
-+ if not os.path.exists(newloc):
++ # Replace links to garbage collected eggs in
++ # /nix/store
++ if os.path.islink(newloc):
++ # It seems necessary to jump through these
++ # hoops, otherwise we end up in an
++ # infinite loop because
++ # self._env.best_match fails to find the dist
++ os.remove(newloc)
++ dist = self._fetch(avail, tmp, self._download_cache)
+ os.symlink(dist.location, newloc)
++ newdist = pkg_resources.Distribution.from_filename(
++ newloc)
++ self._env.add(newdist)
++ logger.info("Updated link to %s" %dist.location)
++ # Symlink to the egg in /nix/store
++ elif not os.path.exists(newloc):
++ os.symlink(dist.location, newloc)
++ logger.info("Created link to %s" %dist.location)
else:
setuptools.archive_util.unpack_archive(
dist.location, newloc)
--
+
- redo_pyc(newloc)
+ redo_pyc(newloc)
diff --git a/pkgs/development/python-modules/pyside/default.nix b/pkgs/development/python-modules/pyside/default.nix
index 791d5e83d3c183bf4c09f1158bfd84f92d61ef48..dc4f733a4cf0c992a397f8b9aeb48691a639c229 100644
--- a/pkgs/development/python-modules/pyside/default.nix
+++ b/pkgs/development/python-modules/pyside/default.nix
@@ -16,7 +16,7 @@ stdenv.mkDerivation {
makeFlags = "QT_PLUGIN_PATH=" + pysideShiboken + "/lib/generatorrunner";
meta = {
- description = "LGPL-licensed Python bindings for the Qt cross-platform application and UI framework.";
+ description = "LGPL-licensed Python bindings for the Qt cross-platform application and UI framework";
license = stdenv.lib.licenses.lgpl21;
homepage = "http://www.pyside.org";
maintainers = [ stdenv.lib.maintainers.chaoflow ];
diff --git a/pkgs/development/python-modules/pyside/tools.nix b/pkgs/development/python-modules/pyside/tools.nix
index 0b5e6851761cff19b8bfa58cbba47b34b702d927..a3153bed21775df8cd9ea423936fe3e1d7e6df97 100644
--- a/pkgs/development/python-modules/pyside/tools.nix
+++ b/pkgs/development/python-modules/pyside/tools.nix
@@ -14,7 +14,7 @@ stdenv.mkDerivation {
buildInputs = [ cmake pyside python27 qt4 pysideShiboken ];
meta = {
- description = "Tools for pyside, the LGPL-licensed Python bindings for the Qt cross-platform application and UI framework.";
+ description = "Tools for pyside, the LGPL-licensed Python bindings for the Qt cross-platform application and UI framework";
license = stdenv.lib.licenses.gpl2;
homepage = "http://www.pyside.org";
maintainers = [ stdenv.lib.maintainers.chaoflow ];
diff --git a/pkgs/development/qtcreator/default.nix b/pkgs/development/qtcreator/default.nix
index 97f238302ecc3e390b8f6bd0d393b2cadc2a5712..55e33c45ca959b1f15877b1968395f81a7dc1149 100644
--- a/pkgs/development/qtcreator/default.nix
+++ b/pkgs/development/qtcreator/default.nix
@@ -30,14 +30,14 @@ stdenv.mkDerivation rec {
installFlags = "INSTALL_ROOT=$(out)";
meta = {
- description = "Qt Creator is a cross-platform IDE tailored to the needs of Qt developers.";
+ description = "Cross-platform IDE tailored to the needs of Qt developers";
longDescription = ''
- Qt Creator is a cross-platform IDE (integrated development environment) tailored to the needs of Qt developers.
- It includes features such as an advanced code editor, a visual debugger and a GUI designer.
- '';
+ Qt Creator is a cross-platform IDE (integrated development environment)
+ tailored to the needs of Qt developers. It includes features such as an
+ advanced code editor, a visual debugger and a GUI designer.
+ '';
homepage = "http://qt-project.org/wiki/Category:Tools::QtCreator";
license = "LGPL";
-
maintainers = [ stdenv.lib.maintainers.bbenoist ];
platforms = stdenv.lib.platforms.all;
};
diff --git a/pkgs/development/tools/analysis/checkstyle/default.nix b/pkgs/development/tools/analysis/checkstyle/default.nix
index 09656dc520a8595f18d2e8dd4df0b0b3fe5d1b5b..1dfaa5cf875bab04fedb50fb95acb78999069495 100644
--- a/pkgs/development/tools/analysis/checkstyle/default.nix
+++ b/pkgs/development/tools/analysis/checkstyle/default.nix
@@ -15,7 +15,12 @@ stdenv.mkDerivation {
'';
meta = {
- description = "A development tool to help programmers write Java code that adheres to a coding standard. By default it supports the Sun Code Conventions, but is highly configurable." ;
+ description = "Checks Java source against a coding standard";
+ longDescription = ''
+ checkstyle is a development tool to help programmers write Java code that
+ adheres to a coding standard. By default it supports the Sun Code
+ Conventions, but is highly configurable.
+ '';
homepage = http://checkstyle.sourceforge.net/;
};
}
diff --git a/pkgs/development/tools/analysis/cppcheck/default.nix b/pkgs/development/tools/analysis/cppcheck/default.nix
index b152f0537e3b1eabc1ec4b619e21d34890148b8b..8aea7bc8aa8ed06e5ce1a2aabf23a3e0cddab4e9 100644
--- a/pkgs/development/tools/analysis/cppcheck/default.nix
+++ b/pkgs/development/tools/analysis/cppcheck/default.nix
@@ -17,7 +17,7 @@ stdenv.mkDerivation {
configurePhase = "makeFlags=PREFIX=$out";
meta = {
- description = "check C/C++ code for memory leaks, mismatching allocation-deallocation, buffer overrun, etc.";
+ description = "Check C/C++ code for memory leaks, mismatching allocation-deallocation, buffer overrun and more";
homepage = "http://sourceforge.net/apps/mediawiki/cppcheck/";
license = "GPL";
platforms = stdenv.lib.platforms.unix;
diff --git a/pkgs/development/tools/analysis/jdepend/default.nix b/pkgs/development/tools/analysis/jdepend/default.nix
index 7498d3b652ac8d29f5de7a1b1764109c7245d7d0..586e9d5cd5d3264b845ac8d0726032a17082f969 100644
--- a/pkgs/development/tools/analysis/jdepend/default.nix
+++ b/pkgs/development/tools/analysis/jdepend/default.nix
@@ -15,7 +15,7 @@ stdenv.mkDerivation {
'';
meta = {
- description = "Depend traverses Java class file directories and generates design quality metrics for each Java package." ;
+ description = "Traverses Java class file directories and generates design quality metrics for each Java package";
homepage = http://www.clarkware.com/software/JDepend.html ;
};
}
diff --git a/pkgs/development/tools/analysis/pmd/default.nix b/pkgs/development/tools/analysis/pmd/default.nix
index b830ee008389f084f3d42d98c592260c04a53181..14007d80b0fb3338bb2a43b161197ef53ad6d37f 100644
--- a/pkgs/development/tools/analysis/pmd/default.nix
+++ b/pkgs/development/tools/analysis/pmd/default.nix
@@ -15,7 +15,7 @@ stdenv.mkDerivation {
'';
meta = {
- description = "PMD scans Java source code and looks for potential problems." ;
+ description = "Scans Java source code and looks for potential problems";
homepage = http://pmd.sourceforge.net/;
};
}
diff --git a/pkgs/development/tools/build-managers/apache-ant/default.nix b/pkgs/development/tools/build-managers/apache-ant/default.nix
index 034285522292ea8a4b1b3b18bfff16c2186ec6e8..c14e09e25b7f9d2acd7b26838be9991579bc55fd 100644
--- a/pkgs/development/tools/build-managers/apache-ant/default.nix
+++ b/pkgs/development/tools/build-managers/apache-ant/default.nix
@@ -23,4 +23,8 @@ stdenv.mkDerivation {
url = "mirror://apache/ant/binaries/apache-ant-${version}-bin.tar.bz2";
sha1 = "d9e3e83dd9664cfe1dcd4841c082db3f559af922";
};
+
+ meta = {
+ description = "Java-based build tool";
+ };
}
diff --git a/pkgs/development/tools/build-managers/apache-ant/from-source.nix b/pkgs/development/tools/build-managers/apache-ant/from-source.nix
index 01fdd5541ecf551dbc01f6aa38c08388549997c4..14213415ff8468dc69406688c399fe9150df0312 100644
--- a/pkgs/development/tools/build-managers/apache-ant/from-source.nix
+++ b/pkgs/development/tools/build-managers/apache-ant/from-source.nix
@@ -57,7 +57,7 @@ EOF
'';
meta = {
- description = "Apache Ant, a Java-based build tool";
+ description = "Java-based build tool";
longDescription = ''
Apache Ant is a Java-based build tool. In theory, it is kind of like
diff --git a/pkgs/development/tools/build-managers/colormake/default.nix b/pkgs/development/tools/build-managers/colormake/default.nix
index 9d62b4e187b10fa1aeb7d9c049061de7a9989cf5..25ef7ef0b246781f0a8afba5f0a2640fa7aad00a 100644
--- a/pkgs/development/tools/build-managers/colormake/default.nix
+++ b/pkgs/development/tools/build-managers/colormake/default.nix
@@ -18,7 +18,7 @@ stdenv.mkDerivation rec {
'';
meta = {
- description = "A simple wrapper around make to colorize the output.";
+ description = "Simple wrapper around make to colorize the output";
license = "GPLv2";
};
}
diff --git a/pkgs/development/tools/build-managers/leiningen/default.nix b/pkgs/development/tools/build-managers/leiningen/default.nix
index 779b84d0ca86590c5c935dfa87b614a14dbe5e73..b1664010550300d66f638da9d09101880e488055 100644
--- a/pkgs/development/tools/build-managers/leiningen/default.nix
+++ b/pkgs/development/tools/build-managers/leiningen/default.nix
@@ -29,7 +29,7 @@ stdenv.mkDerivation rec {
homepage = http://leiningen.org/;
description = "Project automation for Clojure";
license = "EPL";
- platforms = stdenv.lib.platforms.unix;
+ platforms = stdenv.lib.platforms.linux;
maintainer = with stdenv.lib.maintainers; [ the-kenny ];
};
}
diff --git a/pkgs/development/tools/casperjs/default.nix b/pkgs/development/tools/casperjs/default.nix
index f140f0d7862d9e2f0aa8e8706d8d336d13ff1a0e..bd63a0e68eeb46ce4a84fd29391add07a300fbe0 100644
--- a/pkgs/development/tools/casperjs/default.nix
+++ b/pkgs/development/tools/casperjs/default.nix
@@ -21,7 +21,7 @@ stdenv.mkDerivation rec {
'';
meta = {
- description = "Navigation scripting & testing utility for PhantomJS.";
+ description = "Navigation scripting & testing utility for PhantomJS";
longDescription = ''
CasperJS is a navigation scripting & testing utility for PhantomJS.
It eases the process of defining a full navigation scenario and provides useful high-level
@@ -41,6 +41,6 @@ stdenv.mkDerivation rec {
license = stdenv.lib.licenses.mit;
maintainers = [ stdenv.lib.maintainers.bluescreen303 ];
- platforms = stdenv.lib.platforms.all;
+ platforms = stdenv.lib.platforms.linux;
};
}
diff --git a/pkgs/development/tools/haskell/packunused/default.nix b/pkgs/development/tools/haskell/packunused/default.nix
index 814c2774cb2721a133e6d5d38dface235437899e..35d318d36bae7e7848324d7e3de75777e3e90476 100644
--- a/pkgs/development/tools/haskell/packunused/default.nix
+++ b/pkgs/development/tools/haskell/packunused/default.nix
@@ -2,11 +2,12 @@
cabal.mkDerivation (self: {
pname = "packunused";
- version = "0.1.0.0";
- sha256 = "131x99id3jcxglj24p5sjb6mnhphj925pp4jdjy09y6ai7wss3rs";
+ version = "0.1.0.1";
+ sha256 = "130717k4rknj5jl904cmb4h09msp4xjj84w6iwzc10lz736dk3jd";
isLibrary = false;
isExecutable = true;
buildDepends = [ Cabal cmdargs filepath haskellSrcExts ];
+ jailbreak = true;
meta = {
homepage = "https://github.com/hvr/packunused";
description = "Tool for detecting redundant Cabal package dependencies";
diff --git a/pkgs/development/tools/misc/astyle/default.nix b/pkgs/development/tools/misc/astyle/default.nix
index 9b1e9955732455e2f6a874986174d4c840980daa..6128406bbe5b1d229f105c2aadcdeaa36ad9e38f 100644
--- a/pkgs/development/tools/misc/astyle/default.nix
+++ b/pkgs/development/tools/misc/astyle/default.nix
@@ -18,7 +18,7 @@ stdenv.mkDerivation {
meta = {
homepage = "http://astyle.sourceforge.net/";
- description = "source code reformatter";
+ description = "Source code indenter, formatter, and beautifier for C, C++, C# and Java";
license = "LGPL";
platforms = stdenv.lib.platforms.linux;
diff --git a/pkgs/development/tools/misc/autobuild/default.nix b/pkgs/development/tools/misc/autobuild/default.nix
index f8497b5deced7a7d2d73a0fdfa7d0f78cd3d63ee..88246e4bb6eb180c839b437e477cf3b03372d60e 100644
--- a/pkgs/development/tools/misc/autobuild/default.nix
+++ b/pkgs/development/tools/misc/autobuild/default.nix
@@ -18,7 +18,7 @@ stdenv.mkDerivation rec {
'';
meta = {
- description = "Simon Josefsson's Autobuild, a continuous integration tool";
+ description = "Continuous integration tool";
longDescription = ''
Autobuild is a package that process output from building
diff --git a/pkgs/development/tools/misc/autoconf/2.13.nix b/pkgs/development/tools/misc/autoconf/2.13.nix
index 1dfe4d4a0a7b2108660d3cc9af3917ad2cc6f921..2d8169d408fe65336e94c1089f67b2b59c6d8876 100644
--- a/pkgs/development/tools/misc/autoconf/2.13.nix
+++ b/pkgs/development/tools/misc/autoconf/2.13.nix
@@ -18,7 +18,7 @@ stdenv.mkDerivation rec {
meta = {
homepage = http://www.gnu.org/software/autoconf/;
- description = "GNU Autoconf, a part of the GNU Build System";
+ description = "Part of the GNU Build System";
longDescription = ''
GNU Autoconf is an extensible package of M4 macros that produce
diff --git a/pkgs/development/tools/misc/autoconf/default.nix b/pkgs/development/tools/misc/autoconf/default.nix
index b4de66d9bafc964678babc8da10eb2408257f03c..08fcd95afb5e7e6e0159e14dbb8b329e53e5fa34 100644
--- a/pkgs/development/tools/misc/autoconf/default.nix
+++ b/pkgs/development/tools/misc/autoconf/default.nix
@@ -29,7 +29,7 @@ stdenv.mkDerivation rec {
meta = {
homepage = http://www.gnu.org/software/autoconf/;
- description = "GNU Autoconf, a part of the GNU Build System";
+ description = "Part of the GNU Build System";
longDescription = ''
GNU Autoconf is an extensible package of M4 macros that produce
diff --git a/pkgs/development/tools/misc/autogen/default.nix b/pkgs/development/tools/misc/autogen/default.nix
index 25fa29526c9bf326d21780a40b49a5a418e2fcbd..cd4f19694b2e9530e50b587cded64700fd94ed4c 100644
--- a/pkgs/development/tools/misc/autogen/default.nix
+++ b/pkgs/development/tools/misc/autogen/default.nix
@@ -25,7 +25,7 @@ let version = "5.17"; in
#doCheck = true; # 2 tests fail because of missing /dev/tty
meta = {
- description = "GNU AutoGen, an automated text and program generation tool";
+ description = "Automated text and program generation tool";
longDescription = ''
AutoGen is a tool designed to simplify the creation and maintenance
diff --git a/pkgs/development/tools/misc/automake/automake-1.10.x.nix b/pkgs/development/tools/misc/automake/automake-1.10.x.nix
index c015c0115fe424bbe2dbc465fdbbefb83a4bb185..80b033425a13b12c9d62136711c85c9f5a55113a 100644
--- a/pkgs/development/tools/misc/automake/automake-1.10.x.nix
+++ b/pkgs/development/tools/misc/automake/automake-1.10.x.nix
@@ -26,7 +26,7 @@ stdenv.mkDerivation rec {
meta = {
homepage = http://www.gnu.org/software/automake/;
- description = "GNU Automake, a GNU standard-compliant makefile generator";
+ description = "GNU standard-compliant makefile generator";
longDescription = ''
GNU Automake is a tool for automatically generating
diff --git a/pkgs/development/tools/misc/automake/automake-1.11.x.nix b/pkgs/development/tools/misc/automake/automake-1.11.x.nix
index 91c27deb8b825322254528289c7c70bae3b8fa73..0af9877c935526c040bf9485c88e18c1a7f56d7e 100644
--- a/pkgs/development/tools/misc/automake/automake-1.11.x.nix
+++ b/pkgs/development/tools/misc/automake/automake-1.11.x.nix
@@ -32,7 +32,7 @@ stdenv.mkDerivation rec {
meta = {
homepage = http://www.gnu.org/software/automake/;
- description = "GNU Automake, a GNU standard-compliant makefile generator";
+ description = "GNU standard-compliant makefile generator";
longDescription = ''
GNU Automake is a tool for automatically generating
diff --git a/pkgs/development/tools/misc/automake/automake-1.12.x.nix b/pkgs/development/tools/misc/automake/automake-1.12.x.nix
index bd609c4a40d3b7b9f0101edd82b0121549baec2b..8bee4790bcb755b2ce448e99415d01640c618b7f 100644
--- a/pkgs/development/tools/misc/automake/automake-1.12.x.nix
+++ b/pkgs/development/tools/misc/automake/automake-1.12.x.nix
@@ -38,7 +38,7 @@ stdenv.mkDerivation rec {
meta = {
homepage = http://www.gnu.org/software/automake/;
- description = "GNU Automake, a GNU standard-compliant makefile generator";
+ description = "GNU standard-compliant makefile generator";
longDescription = ''
GNU Automake is a tool for automatically generating
diff --git a/pkgs/development/tools/misc/automake/automake-1.13.x.nix b/pkgs/development/tools/misc/automake/automake-1.13.x.nix
index 400d554b65e2b261c65892efe26767204ea83873..96a93e8d60b58969ea6c1ae8c5ab692c8e766ee5 100644
--- a/pkgs/development/tools/misc/automake/automake-1.13.x.nix
+++ b/pkgs/development/tools/misc/automake/automake-1.13.x.nix
@@ -26,7 +26,7 @@ stdenv.mkDerivation rec {
meta = {
homepage = "http://www.gnu.org/software/automake/";
- description = "GNU Automake, a GNU standard-compliant makefile generator";
+ description = "GNU standard-compliant makefile generator";
license = "GPLv2+";
longDescription = ''
diff --git a/pkgs/development/tools/misc/avarice/default.nix b/pkgs/development/tools/misc/avarice/default.nix
index bc3785181a8fffb360325bd2233771ea48782009..e2c4c89e9987eefb8711ffb1b6743b44f94991d3 100644
--- a/pkgs/development/tools/misc/avarice/default.nix
+++ b/pkgs/development/tools/misc/avarice/default.nix
@@ -13,7 +13,7 @@ stdenv.mkDerivation rec {
meta = {
license = stdenv.lib.licenses.gpl2;
- description = "AVaRICE translates between GDB's remote debug protocol and the AVR JTAG ICE protocol";
+ description = "Translator between GDB's remote debug protocol and the AVR JTAG ICE protocol";
homepage = http://sourceforge.net/projects/avarice/files/avarice/;
maintainers = [ stdenv.lib.maintainers.smironov ];
platforms = stdenv.lib.platforms.linux;
diff --git a/pkgs/development/tools/misc/ccache/default.nix b/pkgs/development/tools/misc/ccache/default.nix
index 2cd00f51d9d492f1ae2d5cca80765db1b82be799..05a0d9bbeb50e2492a2609a465d070cd09aa89dd 100644
--- a/pkgs/development/tools/misc/ccache/default.nix
+++ b/pkgs/development/tools/misc/ccache/default.nix
@@ -38,7 +38,7 @@ stdenv.mkDerivation {
};
meta = {
- description = "ccache, a tool that caches compilation results.";
+ description = "Compiler cache for fast recompilation of C/C++ code";
homepage = http://ccache.samba.org/;
license = "GPL";
};
diff --git a/pkgs/development/tools/misc/sysbench/default.nix b/pkgs/development/tools/misc/sysbench/default.nix
index f09ab2af7d1d3570cde6380fc3becd773cebd702..e3acf620c73b43e131680e95ee4ca806404094ef 100644
--- a/pkgs/development/tools/misc/sysbench/default.nix
+++ b/pkgs/development/tools/misc/sysbench/default.nix
@@ -12,7 +12,7 @@ stdenv.mkDerivation rec {
'';
meta = {
- description = "SysBench is a modular, cross-platform and multi-threaded benchmark tool.";
+ description = "Modular, cross-platform and multi-threaded benchmark tool";
license = "GPLv2";
platforms = stdenv.lib.platforms.linux;
};
diff --git a/pkgs/development/tools/parsing/re2c/default.nix b/pkgs/development/tools/parsing/re2c/default.nix
index b7ed4fb8934a2bdb27ee6a006b49246c3b68b563..e603768b8cc27457ae3f2c1900a391bb0791a2a9 100644
--- a/pkgs/development/tools/parsing/re2c/default.nix
+++ b/pkgs/development/tools/parsing/re2c/default.nix
@@ -8,6 +8,6 @@ stdenv.mkDerivation {
};
meta = {
- description = "Re2c is a tool for writing very fast and very flexible scanners.";
+ description = "Tool for writing very fast and very flexible scanners";
};
}
diff --git a/pkgs/games/anki/default.nix b/pkgs/games/anki/default.nix
index b904a6b5dcdbf37ca7f481cbcbede562f7876187..7437e2e2262cfc08642a2c6235ac881a9c691892 100644
--- a/pkgs/games/anki/default.nix
+++ b/pkgs/games/anki/default.nix
@@ -66,6 +66,6 @@ stdenv.mkDerivation rec {
* even practicing guitar chords!
'';
license = "GPLv3";
- platforms = stdenv.lib.platforms.all;
+ platforms = stdenv.lib.platforms.mesaPlatforms;
};
}
diff --git a/pkgs/games/blobby/default.nix b/pkgs/games/blobby/default.nix
index 7e4f6b00587bd2bd942bc3230b3276068ab40e7e..faf7366f2494a8566eb2ea77bef57bd6bbeabfd1 100644
--- a/pkgs/games/blobby/default.nix
+++ b/pkgs/games/blobby/default.nix
@@ -15,7 +15,7 @@ stdenv.mkDerivation rec {
'';
meta = {
- description = ''A blobby volleyball game.'';
+ description = ''A blobby volleyball game'';
license = with stdenv.lib.licenses; bsd3;
platforms = with stdenv.lib.platforms; linux;
maintainers = with stdenv.lib.maintainers; [raskin];
diff --git a/pkgs/games/dwarf-fortress/default.nix b/pkgs/games/dwarf-fortress/default.nix
index 24c0b40edb3cb108dd35f4407a838643a0a704cd..6e53aff65a573dc48bc9df5f5a9ad48c1f452610 100644
--- a/pkgs/games/dwarf-fortress/default.nix
+++ b/pkgs/games/dwarf-fortress/default.nix
@@ -1,13 +1,14 @@
-{stdenv, fetchurl, SDL, SDL_image, SDL_ttf, gtk, glib, mesa, openal, glibc, libsndfile}:
+{ stdenv, fetchurl, SDL, SDL_image, SDL_ttf, gtk, glib, mesa, openal, glibc, libsndfile
+, copyDataDirectory ? false }:
assert stdenv.system == "i686-linux";
stdenv.mkDerivation rec {
- name = "dwarf-fortress-0.31.25";
+ name = "dwarf-fortress-0.34.11";
src = fetchurl {
- url = "http://www.bay12games.com/dwarves/df_31_25_linux.tar.bz2";
- sha256 = "0d3klvf5n99j38pdhx9mak78px65aw47smck82jb92la97drmcg3";
+ url = "http://www.bay12games.com/dwarves/df_34_11_linux.tar.bz2";
+ sha256 = "1qk9vmdxzs0li81c8bglpj3m7aw9k71x1slf58hv2bz7hdndl3kj";
};
phases = "unpackPhase patchPhase installPhase";
@@ -22,10 +23,10 @@ stdenv.mkDerivation rec {
mkdir -p $out/share/df_linux
cp -r * $out/share/df_linux
cp $permission $out/share/df_linux/nix_permission
-
+
patchelf --set-interpreter ${glibc}/lib/ld-linux.so.2 $out/share/df_linux/libs/Dwarf_Fortress
ln -s ${libsndfile}/lib/libsndfile.so $out/share/df_linux/libs/
-
+
cat > $out/bin/dwarf-fortress << EOF
#!${stdenv.shell}
export DF_DIR="\$HOME/.config/df_linux"
@@ -33,39 +34,48 @@ stdenv.mkDerivation rec {
then export DF_DIR="\$XDG_DATA_HOME/df_linux"
fi
- # Recreate a directory sturctor reflecting the original distribution in the user directory
-
- # Link in the static stuff
- mkdir -p \$DF_DIR
- ln -sf $out/share/df_linux/libs \$DF_DIR/
- ln -sf $out/share/df_linux/raw \$DF_DIR/
- ln -sf $out/share/df_linux/df \$DF_DIR/
-
- # Delete old data directory
- rm -rf \$DF_DIR/data
-
- # Link in the static data directory
- mkdir \$DF_DIR/data
- for i in $out/share/df_linux/data/*
- do
- ln -s \$i \$DF_DIR/data/
- done
-
- # index initial_movies, announcement, dipscript and help files are as of 0.31.16 opened in read/write mode instead of read-only mode
- # this is a hack to work around this
- # Should I just apply this to the whole data directory?
- for i in index initial_movies announcement dipscript help
- do
- rm \$DF_DIR/data/\$i
- cp -rf $out/share/df_linux/data/\$i \$DF_DIR/data/
- chmod -R u+w \$DF_DIR/data/\$i
- done
-
- # link in persistant data
- mkdir -p \$DF_DIR/save
- ln -s \$DF_DIR/save \$DF_DIR/data/
-
- # now run Dwarf Fortress!
+ # Recreate a directory structure reflecting the original
+ # distribution in the user directory (for modding support)
+ ${if copyDataDirectory then ''
+ if [ ! -d "\$DF_DIR" ];
+ then
+ mkdir -p \$DF_DIR
+ cp -r $out/share/df_linux/* \$DF_DIR/
+ chmod -R u+rw \$DF_DIR/
+ fi
+ '' else ''
+ # Link in the static stuff
+ mkdir -p \$DF_DIR
+ ln -sf $out/share/df_linux/libs \$DF_DIR/
+ ln -sf $out/share/df_linux/raw \$DF_DIR/
+ ln -sf $out/share/df_linux/df \$DF_DIR/
+
+ # Delete old data directory
+ rm -rf \$DF_DIR/data
+
+ # Link in the static data directory
+ mkdir \$DF_DIR/data
+ for i in $out/share/df_linux/data/*
+ do
+ ln -s \$i \$DF_DIR/data/
+ done
+
+ # index initial_movies, announcement, dipscript and help files are as of 0.31.16 opened in read/write mode instead of read-only mode
+ # this is a hack to work around this
+ # Should I just apply this to the whole data directory?
+ for i in index initial_movies announcement dipscript help
+ do
+ rm \$DF_DIR/data/\$i
+ cp -rf $out/share/df_linux/data/\$i \$DF_DIR/data/
+ chmod -R u+w \$DF_DIR/data/\$i
+ done
+
+ # link in persistant data
+ mkdir -p \$DF_DIR/save
+ ln -s \$DF_DIR/save \$DF_DIR/data/
+ ''}
+
+ # now run Dwarf Fortress!
export LD_LIBRARY_PATH=\$DF_DIR/df_linux/libs/:${SDL}/lib:${SDL_image}/lib/:${SDL_ttf}/lib/:${gtk}/lib/:${glib}/lib/:${mesa}/lib/:${openal}/lib/
\$DF_DIR/df "\$@"
EOF
diff --git a/pkgs/games/dwarf-therapist/default.nix b/pkgs/games/dwarf-therapist/default.nix
new file mode 100644
index 0000000000000000000000000000000000000000..8ac84a96aeb5a10fef8fac7891a9a0b994a8ba3e
--- /dev/null
+++ b/pkgs/games/dwarf-therapist/default.nix
@@ -0,0 +1,60 @@
+{ stdenv, coreutils, fetchhg, qt4, dwarf_fortress, bash, makeWrapper }:
+
+stdenv.mkDerivation rec {
+ name = "dwarf-therapist-${rev}";
+ rev = "eeeac8544d94";
+
+ src = fetchhg {
+ url = "https://code.google.com/r/splintermind-attributes/";
+ tag = rev;
+ sha256 = "0a9m967q6p2q3plrl6qysg1xrdmg65jzil6awjh2wr3g10x2x15z";
+ };
+
+ # Needed for hashing
+ dwarfBinary = "${dwarf_fortress}/share/df_linux/libs/Dwarf_Fortress";
+
+ buildInputs = [ coreutils qt4 dwarf_fortress makeWrapper ];
+ enableParallelBuilding = false;
+
+ preConfigure = ''
+ substituteInPlace dwarftherapist.pro \
+ --replace /usr/bin $out/bin \
+ --replace /usr/share $out/share \
+ --replace "INSTALLS += doc" ""
+ '';
+
+ preBuild = ''
+ # Log to current directory, otherwise it crashes if log/ doesn't
+ # exist Note: Whis is broken because we cd to the nix store in the
+ # wrapper-script
+ substituteInPlace src/dwarftherapist.cpp \
+ --replace "log/run.log" "dwarf-therapist.log"
+ '';
+
+ buildPhase = ''
+ qmake INSTALL_PREFIX=$out;
+ make;
+ '';
+
+ postInstall = ''
+ # DwarfTherapist assumes it's run in $out/share/dwarftherapist and
+ # therefore uses many relative paths.
+ rm $out/bin/dwarftherapist
+ wrapProgram $out/bin/DwarfTherapist \
+ --run "cd $out/share/dwarftherapist"
+ '';
+
+ postFixup = ''
+ # Fix checksum of memory access directives
+ substituteInPlace $out/share/dwarftherapist/etc/memory_layouts/linux/v034.11.ini \
+ --replace "e966ee88" $(md5sum ${dwarfBinary} | cut -c1-8)
+ '';
+
+ meta = {
+ description = "Tool to manage dwarves in in a running game of Dwarf Fortress";
+ maintainers = with stdenv.lib.maintainers; [ the-kenny ];
+ license = "MIT";
+ platforms = stdenv.lib.platforms.linux;
+ homepage = https://code.google.com/r/splintermind-attributes/;
+ };
+}
diff --git a/pkgs/games/extremetuxracer/default.nix b/pkgs/games/extremetuxracer/default.nix
index 898334a1d4abab71cfbe537999608629ea06d7df..e35eb3266c2d07029ddabee3838674c9d0d9afdd 100644
--- a/pkgs/games/extremetuxracer/default.nix
+++ b/pkgs/games/extremetuxracer/default.nix
@@ -26,6 +26,9 @@ rec {
name = "extremetuxracer-" + version;
meta = {
- description = "ExtremeTuxRacer - Tux lies on his belly and accelerates down ice slopes..";
+ description = "High speed arctic racing game based on Tux Racer";
+ longDescription = ''
+ ExtremeTuxRacer - Tux lies on his belly and accelerates down ice slopes.
+ '';
};
}
diff --git a/pkgs/games/freeciv/default.nix b/pkgs/games/freeciv/default.nix
index 049f10ad15b2c51ce1d894cb0e565a71d743cb86..de62b4a669a2cbe23cc384bf73e147f17b42d4f0 100644
--- a/pkgs/games/freeciv/default.nix
+++ b/pkgs/games/freeciv/default.nix
@@ -23,7 +23,7 @@ stdenv.mkDerivation rec {
++ optional server readline;
meta = with stdenv.lib; {
- description = "multiplayer (or single player), turn-based strategy game.";
+ description = "Multiplayer (or single player), turn-based strategy game";
longDescription = ''
Freeciv is a Free and Open Source empire-building strategy game
diff --git a/pkgs/games/gtypist/default.nix b/pkgs/games/gtypist/default.nix
index 3dded927ba1f5c58039d6165a193dece20aea9ea..19567918377629cdf08659fe369c5e8cbbc86221 100644
--- a/pkgs/games/gtypist/default.nix
+++ b/pkgs/games/gtypist/default.nix
@@ -14,7 +14,7 @@ stdenv.mkDerivation {
meta = {
homepage = http://www.gnu.org/software/gtypist;
- description = "GNU Typist (also called gtypist) is a universal typing tutor.";
+ description = "Universal typing tutor";
license = stdenv.lib.licenses.gpl3Plus;
};
}
diff --git a/pkgs/games/minetest/default.nix b/pkgs/games/minetest/default.nix
index 6c860d42925ade902902ca90d9845f2f55a1fa64..f2ac737486c6f82469d5a1cb899a5984066a1a8f 100644
--- a/pkgs/games/minetest/default.nix
+++ b/pkgs/games/minetest/default.nix
@@ -34,7 +34,7 @@ in stdenv.mkDerivation {
meta = {
homepage = "http://minetest.net/";
- description = "Minetest is an infinite-world block sandbox game.";
+ description = "Infinite-world block sandbox game";
license = "LGPLv2.1+";
};
}
diff --git a/pkgs/games/sdlmame/default.nix b/pkgs/games/sdlmame/default.nix
new file mode 100644
index 0000000000000000000000000000000000000000..bd6e90111785dab01f5e0e363e70cde01aa40899
--- /dev/null
+++ b/pkgs/games/sdlmame/default.nix
@@ -0,0 +1,44 @@
+{ stdenv, fetchurl, alsaLib, qt48, SDL, fontconfig, freetype, SDL_ttf, xlibs }:
+
+assert stdenv.system == "x86_64-linux" || stdenv.system == "1686-linux";
+
+stdenv.mkDerivation rec {
+ version = "0.150.u0-1";
+ name = "sdlmame-${version}";
+
+ src = if stdenv.system == "x86_64-linux"
+ then fetchurl {
+ url = "ftp://ftp.archlinux.org/community/os/x86_64/${name}-x86_64.pkg.tar.xz";
+ sha256 = "0393xnzrzq53szmicn96lvapm66wmlykdxaa1n7smx8a0mcz0kah";
+ }
+ else fetchurl {
+ url = "ftp://ftp.archlinux.org/community/os/i686/${name}-i686.pkg.tar.xz";
+ sha256 = "0js67w2szd0qs7ycgxb3bbmcdziv1fywyd9ihra2f6bq5rhcs2jp";
+ };
+
+ buildPhase = ''
+ sed -i "s|/usr|$out|" bin/sdlmame
+ '';
+
+ installPhase = ''
+ patchelf \
+ --set-interpreter "$(cat $NIX_GCC/nix-support/dynamic-linker)" \
+ --set-rpath "${alsaLib}/lib:${qt48}/lib:${SDL}/lib:${fontconfig}/lib:${freetype}/lib:${SDL_ttf}/lib:${xlibs.libX11}/lib:${xlibs.libXinerama}/lib:${stdenv.gcc.gcc}/lib" \
+ share/sdlmame/sdlmame
+
+ mkdir -p "$out/bin"
+ cp -r bin/sdlmame "$out/bin"
+ cp -r share "$out"
+ '';
+
+ dontPatchELF = true;
+ dontStrip = true;
+
+ meta = with stdenv.lib; {
+ homepage = http://sdlmame.lngn.net;
+ description = "A port of the popular Multiple Arcade Machine Emulator using SDL with OpenGL support.";
+ license = "MAME";
+ maintainers = with maintainers; [ lovek323 ];
+ platforms = platforms.linux;
+ };
+}
diff --git a/pkgs/games/spring/default.nix b/pkgs/games/spring/default.nix
index ba45360ccb6d0ebed03002a0f7c3ef838415426c..109cb239d2bef1d1cfb0940f1764a49c9b227e97 100644
--- a/pkgs/games/spring/default.nix
+++ b/pkgs/games/spring/default.nix
@@ -27,9 +27,9 @@ stdenv.mkDerivation rec {
meta = with stdenv.lib; {
homepage = http://springrts.com/;
- description = "A powerful real-time strategy(RTS) game engine";
+ description = "A powerful real-time strategy (RTS) game engine";
license = licenses.gpl2;
maintainers = [ maintainers.phreedom maintainers.qknight ];
- platforms = platforms.unix;
+ platforms = platforms.mesaPlatforms;
};
}
diff --git a/pkgs/games/spring/springlobby.nix b/pkgs/games/spring/springlobby.nix
index e6051a12a267147a9616685b1340ce23b542efe2..b78fd7d778887f5231dab7ac7a2a1e11283d1004 100644
--- a/pkgs/games/spring/springlobby.nix
+++ b/pkgs/games/spring/springlobby.nix
@@ -27,7 +27,7 @@ stdenv.mkDerivation rec {
meta = with stdenv.lib; {
homepage = http://springlobby.info/;
- description = "A free cross-platform lobby client for the Spring RTS project.";
+ description = "Cross-platform lobby client for the Spring RTS project";
license = licenses.gpl2;
maintainers = [ maintainers.phreedom maintainers.qknight];
platforms = platforms.linux;
diff --git a/pkgs/games/super-tux/default.nix b/pkgs/games/super-tux/default.nix
index 60e9cc537bf05160e9db1a21dc008a468e2bc99c..945eaa7fbf8802cc8b211c28d94c7f240658ed4b 100644
--- a/pkgs/games/super-tux/default.nix
+++ b/pkgs/games/super-tux/default.nix
@@ -19,7 +19,7 @@ stdenv.mkDerivation {
patches = [ ./g++4.patch ];
meta = {
- description = "SuperTux is a classic 2D jump'n run sidescroller game in a style similar to the original Super Mario games covered under the GPL.";
+ description = "Classic 2D jump'n run sidescroller game";
homepage = http://supertux.lethargik.org/index.html;
diff --git a/pkgs/games/unvanquished/default.nix b/pkgs/games/unvanquished/default.nix
index 6d1c8e5607c9e8eb9cdea1db4977297a2bcf3c2d..2768d2fad9e105cfcbff911d72b19ef3fcac571c 100644
--- a/pkgs/games/unvanquished/default.nix
+++ b/pkgs/games/unvanquished/default.nix
@@ -32,7 +32,7 @@ stdenv.mkDerivation rec {
'';
meta = {
- description = "A FLOSS FPS combining RTS elements with a futuristic, sci-fi setting.";
+ description = "FPS game set in a futuristic, sci-fi setting";
longDescription = ''
Unvanquished is a free, open-source first-person shooter
combining real-time strategy elements with a futuristic, sci-fi
diff --git a/pkgs/games/warsow/default.nix b/pkgs/games/warsow/default.nix
index aeb7e37cd7e4da25282ddbfb3b878562f2e75aad..84d15efb810f7cb72bfe90ccd8839cb85185f0d0 100644
--- a/pkgs/games/warsow/default.nix
+++ b/pkgs/games/warsow/default.nix
@@ -47,7 +47,7 @@ stdenv.mkDerivation rec {
patchelf --set-rpath $cur_rpath:${mesa}/lib $p
'';
meta = {
- description = "A multiplayer FPS designed for competitive gaming.";
+ description = "Multiplayer FPS game designed for competitive gaming";
longDescription = ''
Set in a futuristic cartoon-like world where rocketlauncher-wielding
pigs and lasergun-carrying cyberpunks roam the streets, Warsow is a
diff --git a/pkgs/games/worldofgoo/default.nix b/pkgs/games/worldofgoo/default.nix
index 216ec0d8041a42508513a8c50cf87441fdcd8d7e..13e7e487c8f0eb13016db83cc2454b5bb143cca1 100644
--- a/pkgs/games/worldofgoo/default.nix
+++ b/pkgs/games/worldofgoo/default.nix
@@ -77,7 +77,6 @@ stdenv.mkDerivation rec {
homepage = http://worldofgoo.com;
license = [ "unfree" ];
maintainers = with stdenv.lib.maintainers; [ jcumming ];
- platforms = [ "x86_64-linux"] ;
};
}
diff --git a/pkgs/misc/emulators/hatari/default.nix b/pkgs/misc/emulators/hatari/default.nix
index e4eeff9cd5441aa2ad0cad4f6f03dc72c7fedcbd..150b45dd727502f26db72e8e7b581bb77d33d64c 100644
--- a/pkgs/misc/emulators/hatari/default.nix
+++ b/pkgs/misc/emulators/hatari/default.nix
@@ -15,7 +15,7 @@ stdenv.mkDerivation rec {
meta = {
homepage = "http://hatari.tuxfamily.org/";
- description = "Hatari is an Atari ST/STE/TT/Falcon emulator.";
+ description = "Atari ST/STE/TT/Falcon emulator";
license = "GPLv2+";
platforms = with stdenv.lib.platforms; all;
};
diff --git a/pkgs/misc/screensavers/xlockmore/default.nix b/pkgs/misc/screensavers/xlockmore/default.nix
index 2df8f2fd97a756269cfbc9fff3a2aa611bd7fef1..b3c71c8919126b9cb14f31b84766401e20726a8d 100644
--- a/pkgs/misc/screensavers/xlockmore/default.nix
+++ b/pkgs/misc/screensavers/xlockmore/default.nix
@@ -39,7 +39,7 @@ stdenv.mkDerivation rec {
+ (if pam != null then " --enable-pam --enable-bad-pam" else " --disable-pam");
meta = {
- description = "Xlockmore, a screen locker for the X Window System.";
+ description = "Screen locker for the X Window System";
homepage = "http://www.tux.org/~bagleyd/xlockmore.html";
license = "GPL";
};
diff --git a/pkgs/os-specific/linux/acpi/default.nix b/pkgs/os-specific/linux/acpi/default.nix
index 6bb44d7db449dd124097921ebe013377eeadc646..d694a9e5ed24d7093adae1c2deffb1796cf3bedd 100644
--- a/pkgs/os-specific/linux/acpi/default.nix
+++ b/pkgs/os-specific/linux/acpi/default.nix
@@ -10,6 +10,7 @@ stdenv.mkDerivation rec {
};
meta = {
+ description = "Show battery status and other ACPI information";
longDescription = ''
Linux ACPI client is a small command-line
program that attempts to replicate the functionality of
diff --git a/pkgs/os-specific/linux/apparmor/default.nix b/pkgs/os-specific/linux/apparmor/default.nix
index da71eb8c7095a9a2ecfdada287bdd993288a7a45..858be431a91d7879d818ca2a179ce57de77a74d0 100644
--- a/pkgs/os-specific/linux/apparmor/default.nix
+++ b/pkgs/os-specific/linux/apparmor/default.nix
@@ -85,7 +85,7 @@ stdenv.mkDerivation rec {
meta = with stdenv.lib; {
homepage = http://apparmor.net/;
- description = "A Linux application security system";
+ description = "Linux application security system";
license = licenses.gpl2;
maintainers = [ maintainers.phreedom ];
platforms = platforms.linux;
diff --git a/pkgs/os-specific/linux/dstat/default.nix b/pkgs/os-specific/linux/dstat/default.nix
index fb454c78788b25d541060a0946210f25d7d39556..138b4ff468f1f348b0a67469cb711b33f5abade5 100644
--- a/pkgs/os-specific/linux/dstat/default.nix
+++ b/pkgs/os-specific/linux/dstat/default.nix
@@ -19,7 +19,7 @@ stdenv.mkDerivation rec {
meta = {
homepage = http://dag.wieers.com/home-made/dstat/;
- description = "Versatile resource statistics tool.";
+ description = "Versatile resource statistics tool";
license = "GPLv2";
platforms = stdenv.lib.platforms.linux;
maintainers = [ ];
diff --git a/pkgs/os-specific/linux/kernel/linux-3.0.nix b/pkgs/os-specific/linux/kernel/linux-3.0.nix
index 48197ae14ca50d2204b8bce7cbd43aff1b5eab77..30b70035dfac44586c886afbd41fac9dbb7c0697 100644
--- a/pkgs/os-specific/linux/kernel/linux-3.0.nix
+++ b/pkgs/os-specific/linux/kernel/linux-3.0.nix
@@ -1,11 +1,11 @@
{ stdenv, fetchurl, ... } @ args:
import ./generic.nix (args // rec {
- version = "3.0.88";
+ version = "3.0.99";
src = fetchurl {
url = "mirror://kernel/linux/kernel/v3.x/linux-${version}.tar.xz";
- sha256 = "1icfkbn9a5cpwiax1xklvpqyjcvqij3dwib009fipp53z4pn5bz4";
+ sha256 = "1p31gq9kzwfks980y6rb2mjyagj8lrh6y156a550v7mk0bd4fzdi";
};
features.iwlwifi = true;
diff --git a/pkgs/os-specific/linux/kernel/linux-3.10.nix b/pkgs/os-specific/linux/kernel/linux-3.10.nix
index fa57fdd93ddc8dff1ff71a1597c005587229d8da..65660619857bccfe6a8bed0e17d3d0a9a8e2b425 100644
--- a/pkgs/os-specific/linux/kernel/linux-3.10.nix
+++ b/pkgs/os-specific/linux/kernel/linux-3.10.nix
@@ -1,11 +1,11 @@
{ stdenv, fetchurl, ... } @ args:
import ./generic.nix (args // rec {
- version = "3.10.10";
+ version = "3.10.15";
src = fetchurl {
url = "mirror://kernel/linux/kernel/v3.x/linux-${version}.tar.xz";
- sha256 = "01cpg6j1jsjh4vgvmia12y6rci4gqb967gc0gqpz5gcimzg4bb5p";
+ sha256 = "07wjh58sylbbw9hwxd5xvbz3dxd05iar8ahzk90lki38m5157ffk";
};
features.iwlwifi = true;
diff --git a/pkgs/os-specific/linux/kernel/linux-3.11.nix b/pkgs/os-specific/linux/kernel/linux-3.11.nix
index 3d332bd2ce29476c9db99d75c341eee7baec374f..6a3320669a51955c49dad5ee626422aee39d2a41 100644
--- a/pkgs/os-specific/linux/kernel/linux-3.11.nix
+++ b/pkgs/os-specific/linux/kernel/linux-3.11.nix
@@ -1,11 +1,11 @@
{ stdenv, fetchurl, ... } @ args:
import ./generic.nix (args // rec {
- version = "3.11.2";
+ version = "3.11.4";
src = fetchurl {
url = "mirror://kernel/linux/kernel/v3.x/linux-${version}.tar.xz";
- sha256 = "139w8g59fa2kw39kkcpln54mvrl2rq1gv3nqdcrhcy6n1b7r4194";
+ sha256 = "1kv6j7mc5r5qw43kirc0fv83khpnwy8m7158qf8ar08p3r01i3mi";
};
features.iwlwifi = true;
diff --git a/pkgs/os-specific/linux/kernel/linux-3.12.nix b/pkgs/os-specific/linux/kernel/linux-3.12.nix
index dc77c55696aae4847dc43601255f89fe98422cfb..f7cd28920511dac550bb2bc8660822c12e2174a3 100644
--- a/pkgs/os-specific/linux/kernel/linux-3.12.nix
+++ b/pkgs/os-specific/linux/kernel/linux-3.12.nix
@@ -1,11 +1,11 @@
{ stdenv, fetchurl, ... } @ args:
import ./generic.nix (args // rec {
- version = "3.12-rc2";
+ version = "3.12-rc3";
src = fetchurl {
url = "https://www.kernel.org/pub/linux/kernel/v3.0/testing/linux-${version}.tar.gz";
- sha256 = "1m24fh3cwmkb1scn3sl7gbc50jl53v357kjpgda9avi3ljxmyq5z";
+ sha256 = "1rayb0f4n81yp9ghcws0v36dpqyl9ks3naf37p2qy7jvrwagmj28";
};
features.iwlwifi = true;
diff --git a/pkgs/os-specific/linux/kernel/linux-3.4.nix b/pkgs/os-specific/linux/kernel/linux-3.4.nix
index 953f7d69157562eab1fe24a5003b585da01bc4c9..d37ca172479dd8caf335d49f17cb355d8a2de143 100644
--- a/pkgs/os-specific/linux/kernel/linux-3.4.nix
+++ b/pkgs/os-specific/linux/kernel/linux-3.4.nix
@@ -1,11 +1,11 @@
{ stdenv, fetchurl, ... } @ args:
import ./generic.nix (args // rec {
- version = "3.4.63";
+ version = "3.4.66";
src = fetchurl {
url = "mirror://kernel/linux/kernel/v3.x/linux-${version}.tar.xz";
- sha256 = "0wphxk0lzbcd7vplvnx4b2h446pmdv2gxc0gnjbrzfl0v4lgz1y3";
+ sha256 = "09jrj989mqk76klrg5zq1z8qrx3gif69bqi78ywq3jky8dmrwz3y";
};
features.iwlwifi = true;
diff --git a/pkgs/os-specific/linux/lxc/default.nix b/pkgs/os-specific/linux/lxc/default.nix
index c1dec8b926a35f79f6399677f3674d90210e734c..5a9b3587870fab48f6e51bf3688613905cce5e23 100644
--- a/pkgs/os-specific/linux/lxc/default.nix
+++ b/pkgs/os-specific/linux/lxc/default.nix
@@ -1,20 +1,18 @@
-{ stdenv, fetchurl, libcap, apparmor, perl, docbook2x, docbook_xml_dtd_45 }:
+{ stdenv, autoreconfHook, fetchurl, libcap, apparmor, perl, docbook2x
+, docbook_xml_dtd_45, gnutls, pkgconfig
+}:
stdenv.mkDerivation rec {
- name = "lxc-0.9.0";
+ name = "lxc-1.0.0.alpha1-92-g8111adf";
src = fetchurl {
- url = "mirror://sourceforge/lxc/${name}.tar.gz";
- sha256 = "0821clxymkgp71n720xj5ngs22s2v8jks68f5j4vypycwvm6f5qy";
+ url = "http://github.com/lxc/lxc/archive/${name}.tar.gz";
+ sha256 = "05hjrn79wyjnm4ynf8y0j7pk2hwfrzp4dzwynxq4z2wxlc1ficd5";
};
- buildInputs = [ libcap apparmor perl docbook2x ];
+ buildInputs = [ libcap apparmor perl docbook2x gnutls autoreconfHook pkgconfig ];
- patches = [
- ./dont-run-ldconfig.patch
- ./install-localstatedir-in-store.patch
- ./support-db2x.patch
- ];
+ patches = [ ./install-localstatedir-in-store.patch ./support-db2x.patch ];
preConfigure = "export XML_CATALOG_FILES=${docbook_xml_dtd_45}/xml/dtd/docbook/catalog.xml";
diff --git a/pkgs/os-specific/linux/lxc/dont-run-ldconfig.patch b/pkgs/os-specific/linux/lxc/dont-run-ldconfig.patch
deleted file mode 100644
index 6904eec5175a58860350a8176e413cffbc42e270..0000000000000000000000000000000000000000
--- a/pkgs/os-specific/linux/lxc/dont-run-ldconfig.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-diff -ubr lxc-0.9.0-orig/src/lxc/Makefile.am lxc-0.9.0/src/lxc/Makefile.am
---- lxc-0.9.0-orig/src/lxc/Makefile.am 2013-04-15 10:50:22.898102973 +0200
-+++ lxc-0.9.0/src/lxc/Makefile.am 2013-04-15 10:50:44.264862808 +0200
-@@ -193,7 +193,6 @@
- mkdir -p $(DESTDIR)$(datadir)/lxc
- install -c -m 644 lxc.functions $(DESTDIR)$(datadir)/lxc
- mv $(DESTDIR)$(libdir)/liblxc.so $(DESTDIR)$(libdir)/liblxc.so.$(VERSION)
-- /sbin/ldconfig -l $(DESTDIR)$(libdir)/liblxc.so.$(VERSION)
- cd $(DESTDIR)$(libdir); \
- ln -sf liblxc.so.$(VERSION) liblxc.so.$(firstword $(subst ., ,$(VERSION))); \
- ln -sf liblxc.so.$(firstword $(subst ., ,$(VERSION))) liblxc.so
-diff -ubr lxc-0.9.0-orig/src/lxc/Makefile.in lxc-0.9.0/src/lxc/Makefile.in
---- lxc-0.9.0-orig/src/lxc/Makefile.in 2013-04-15 10:50:22.898102973 +0200
-+++ lxc-0.9.0/src/lxc/Makefile.in 2013-04-15 10:51:08.755810177 +0200
-@@ -1519,7 +1519,6 @@
- mkdir -p $(DESTDIR)$(datadir)/lxc
- install -c -m 644 lxc.functions $(DESTDIR)$(datadir)/lxc
- mv $(DESTDIR)$(libdir)/liblxc.so $(DESTDIR)$(libdir)/liblxc.so.$(VERSION)
-- /sbin/ldconfig -l $(DESTDIR)$(libdir)/liblxc.so.$(VERSION)
- cd $(DESTDIR)$(libdir); \
- ln -sf liblxc.so.$(VERSION) liblxc.so.$(firstword $(subst ., ,$(VERSION))); \
- ln -sf liblxc.so.$(firstword $(subst ., ,$(VERSION))) liblxc.so
diff --git a/pkgs/os-specific/linux/lxc/install-localstatedir-in-store.patch b/pkgs/os-specific/linux/lxc/install-localstatedir-in-store.patch
index 061875aa3b6ffb161c352f21ae2f463ec17f58b8..d45335a02324dc9e1d76af6cd040a28a3791b8c9 100644
--- a/pkgs/os-specific/linux/lxc/install-localstatedir-in-store.patch
+++ b/pkgs/os-specific/linux/lxc/install-localstatedir-in-store.patch
@@ -1,23 +1,10 @@
-diff -ubr lxc-0.9.0-orig/Makefile.am lxc-0.9.0/Makefile.am
---- lxc-0.9.0-orig/Makefile.am 2013-04-15 10:50:22.899103057 +0200
-+++ lxc-0.9.0/Makefile.am 2013-04-15 10:58:41.189504254 +0200
-@@ -25,8 +25,8 @@
+diff --git a/Makefile.am b/Makefile.am
+index eac2bfd..8f040d3 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -25,8 +25,8 @@ pcdatadir = $(libdir)/pkgconfig
pcdata_DATA = lxc.pc
- install-data-local:
-- $(MKDIR_P) $(DESTDIR)$(LXCPATH)
-- $(MKDIR_P) $(DESTDIR)$(localstatedir)/cache/lxc
-+ $(MKDIR_P) $(out)$(LXCPATH)
-+ $(MKDIR_P) $(out)$(localstatedir)/cache/lxc
-
- ChangeLog::
- @touch ChangeLog
-diff -ubr lxc-0.9.0-orig/Makefile.in lxc-0.9.0/Makefile.in
---- lxc-0.9.0-orig/Makefile.in 2013-04-15 10:50:22.899103057 +0200
-+++ lxc-0.9.0/Makefile.in 2013-04-15 10:58:58.817870957 +0200
-@@ -805,8 +805,8 @@
-
-
install-data-local:
- $(MKDIR_P) $(DESTDIR)$(LXCPATH)
- $(MKDIR_P) $(DESTDIR)$(localstatedir)/cache/lxc
diff --git a/pkgs/os-specific/linux/lxc/support-db2x.patch b/pkgs/os-specific/linux/lxc/support-db2x.patch
index 8be7f5f0a92bdbef0ca128f8cdf6afeb491194e0..4662ca2e50480114b120bbebb7296d3361bb3cdd 100644
--- a/pkgs/os-specific/linux/lxc/support-db2x.patch
+++ b/pkgs/os-specific/linux/lxc/support-db2x.patch
@@ -1,29 +1,16 @@
-diff -ubr lxc-0.9.0-orig/configure lxc-0.9.0/configure
---- lxc-0.9.0-orig/configure 2013-04-15 10:50:22.899103057 +0200
-+++ lxc-0.9.0/configure 2013-04-15 11:08:08.696539776 +0200
-@@ -4792,7 +4792,7 @@
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for docbook2x-man" >&5
- $as_echo_n "checking for docbook2x-man... " >&6; }
-- for name in docbook2x-man db2x_docbook2man; do
-+ for name in docbook2x-man db2x_docbook2man docbook2man; do
- if "$name" --help >/dev/null 2>&1; then
- db2xman="$name"
- break;
-@@ -8353,4 +8353,3 @@
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
- $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
+diff --git a/configure.ac b/configure.ac
+index 92a4690..4dd341b 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -91,9 +91,9 @@ if test "x$enable_doc" = "xyes" -o "x$enable_doc" = "xauto"; then
+ AC_SUBST(db2xman)
fi
--
-diff -ubr lxc-0.9.0-orig/configure.ac lxc-0.9.0/configure.ac
---- lxc-0.9.0-orig/configure.ac 2013-04-15 10:50:22.896102806 +0200
-+++ lxc-0.9.0/configure.ac 2013-04-15 11:07:52.399582819 +0200
-@@ -67,7 +67,7 @@
- db2xman=""
+ AM_CONDITIONAL([ENABLE_DOCBOOK], [test "x$db2xman" != "x"])
+-AM_CONDITIONAL([USE_DOCBOOK2X], [test "x$db2xman" != "xdocbook2man"])
++AM_CONDITIONAL([USE_DOCBOOK2X], [test "x$db2xman" != "no-no-no"])
- AC_MSG_CHECKING(for docbook2x-man)
-- for name in docbook2x-man db2x_docbook2man; do
-+ for name in docbook2x-man db2x_docbook2man docbook2man; do
- if "$name" --help >/dev/null 2>&1; then
- db2xman="$name"
- break;
+-if test "x$db2xman" = "xdocbook2man"; then
++if test "x$db2xman" = "no-no-no"; then
+ docdtd="\"-//Davenport//DTD DocBook V3.0//EN\""
+ else
+ docdtd="\"-//OASIS//DTD DocBook XML\" \"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd\""
diff --git a/pkgs/os-specific/linux/pam_ccreds/default.nix b/pkgs/os-specific/linux/pam_ccreds/default.nix
index 4d48c86dd142654ba8695eddccc97db846919c90..7f84918156c4fc5a2e8e494269f9ee922d6071a8 100644
--- a/pkgs/os-specific/linux/pam_ccreds/default.nix
+++ b/pkgs/os-specific/linux/pam_ccreds/default.nix
@@ -14,6 +14,6 @@ stdenv.mkDerivation {
buildInputs = [pam openssl db];
meta = {
homepage = "http://www.padl.com/OSS/pam_ccreds.html";
- description = "The pam_ccreds module provides the means for Linux workstations to locally authenticate using an enterprise identity when the network is unavailable.";
+ description = "PAM module to locally authenticate using an enterprise identity when the network is unavailable";
};
}
diff --git a/pkgs/os-specific/linux/pam_krb5/default.nix b/pkgs/os-specific/linux/pam_krb5/default.nix
index 62f9b5c119b582141a048398db053e634463d260..5f95811e0f6ae924cb43a87b6017a7f8970f6aa5 100644
--- a/pkgs/os-specific/linux/pam_krb5/default.nix
+++ b/pkgs/os-specific/linux/pam_krb5/default.nix
@@ -14,6 +14,10 @@ stdenv.mkDerivation {
meta = {
# homepage = "http://www.eyrie.org/~eagle/software/pam-krb5";
homepage = "https://fedorahosted.org/pam_krb5/";
- description = "The pam_krb5 module allows PAM-aware applications to authenticate users by performing an AS exchange with a Kerberos KDC. It can optionally convert Kerberos 5 credentials to Kerberos IV credentials and/or use them to set up AFS tokens for a user's session.";
+ description = "PAM module allowing PAM-aware applications to authenticate users by performing an AS exchange with a Kerberos KDC";
+ longDescription = ''
+ pam_krb5 can optionally convert Kerberos 5 credentials to Kerberos IV
+ credentials and/or use them to set up AFS tokens for a user's session.
+ '';
};
}
diff --git a/pkgs/os-specific/linux/systemd/0001-Make-systemctl-daemon-reexec-do-the-right-thing-on-N.patch b/pkgs/os-specific/linux/systemd/0001-Make-systemctl-daemon-reexec-do-the-right-thing-on-N.patch
deleted file mode 100644
index 84a03dd97330ac99dc98cf169a5a4cdc815f464c..0000000000000000000000000000000000000000
--- a/pkgs/os-specific/linux/systemd/0001-Make-systemctl-daemon-reexec-do-the-right-thing-on-N.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-From 8f861550827e750fb56954c3f91a2f565abb42bb Mon Sep 17 00:00:00 2001
-From: Eelco Dolstra
-Date: Tue, 8 Jan 2013 15:44:33 +0100
-Subject: [PATCH 01/11] Make "systemctl daemon-reexec" do the right thing on
- NixOS
-
----
- src/core/main.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/core/main.c b/src/core/main.c
-index 7fc06be..7575223 100644
---- a/src/core/main.c
-+++ b/src/core/main.c
-@@ -1857,7 +1857,7 @@ finish:
- char_array_0(sfd);
-
- i = 0;
-- args[i++] = SYSTEMD_BINARY_PATH;
-+ args[i++] = "/run/current-system/systemd/lib/systemd/systemd";
- if (switch_root_dir)
- args[i++] = "--switched-root";
- args[i++] = arg_running_as == SYSTEMD_SYSTEM ? "--system" : "--user";
---
-1.8.3.4
-
diff --git a/pkgs/os-specific/linux/systemd/0002-Ignore-duplicate-paths-in-systemctl-start.patch b/pkgs/os-specific/linux/systemd/0002-Ignore-duplicate-paths-in-systemctl-start.patch
deleted file mode 100644
index 15946506ac18ab88255e321111c30870d1ef4857..0000000000000000000000000000000000000000
--- a/pkgs/os-specific/linux/systemd/0002-Ignore-duplicate-paths-in-systemctl-start.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-From 2afcee0b4da066fb5f8fc00b749d88f5bd9df3d3 Mon Sep 17 00:00:00 2001
-From: Eelco Dolstra
-Date: Tue, 8 Jan 2013 15:45:01 +0100
-Subject: [PATCH 02/11] Ignore duplicate paths in "systemctl start"
-
----
- src/systemctl/systemctl.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c
-index 3cca861..16791a2 100644
---- a/src/systemctl/systemctl.c
-+++ b/src/systemctl/systemctl.c
-@@ -1867,7 +1867,7 @@ static int start_unit_one(
- return log_oom();
-
- r = set_consume(s, p);
-- if (r < 0) {
-+ if (r < 0 && r != -EEXIST) {
- log_error("Failed to add path to set.");
- return r;
- }
---
-1.8.3.4
-
diff --git a/pkgs/os-specific/linux/systemd/0003-Start-device-units-for-uninitialised-encrypted-devic.patch b/pkgs/os-specific/linux/systemd/0003-Start-device-units-for-uninitialised-encrypted-devic.patch
deleted file mode 100644
index 2927d6e4dc691274f93da79ab72731cb2bfe2a9b..0000000000000000000000000000000000000000
--- a/pkgs/os-specific/linux/systemd/0003-Start-device-units-for-uninitialised-encrypted-devic.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From b288ca7d376e3a78368a2b59529ebe5ba812babf Mon Sep 17 00:00:00 2001
-From: Eelco Dolstra
-Date: Tue, 8 Jan 2013 15:46:30 +0100
-Subject: [PATCH 03/11] Start device units for uninitialised encrypted devices
-
-This is necessary because the NixOS service that initialises the
-filesystem depends on the appearance of the device unit. Also, this
-makes more sense to me: the device is ready; it's the filesystem
-that's not, but taking care of that is the responsibility of the mount
-unit. (However, this ignores the fsck unit, so it's not perfect...)
----
- rules/99-systemd.rules.in | 4 ----
- 1 file changed, 4 deletions(-)
-
-diff --git a/rules/99-systemd.rules.in b/rules/99-systemd.rules.in
-index d17bdd9..040b10e 100644
---- a/rules/99-systemd.rules.in
-+++ b/rules/99-systemd.rules.in
-@@ -14,10 +14,6 @@ KERNEL=="vport*", TAG+="systemd"
- SUBSYSTEM=="block", KERNEL!="ram*|loop*", TAG+="systemd"
- SUBSYSTEM=="block", KERNEL!="ram*|loop*", ENV{DM_UDEV_DISABLE_OTHER_RULES_FLAG}=="1", ENV{SYSTEMD_READY}="0"
-
--# Ignore encrypted devices with no identified superblock on it, since
--# we are probably still calling mke2fs or mkswap on it.
--SUBSYSTEM=="block", KERNEL!="ram*|loop*", ENV{DM_UUID}=="CRYPT-*", ENV{ID_PART_TABLE_TYPE}=="", ENV{ID_FS_USAGE}=="", ENV{SYSTEMD_READY}="0"
--
- # Ignore raid devices that are not yet assembled and started
- SUBSYSTEM=="block", ENV{DEVTYPE}=="disk", KERNEL=="md*", TEST!="md/array_state", ENV{SYSTEMD_READY}="0"
- SUBSYSTEM=="block", ENV{DEVTYPE}=="disk", KERNEL=="md*", ATTR{md/array_state}=="|clear|inactive", ENV{SYSTEMD_READY}="0"
---
-1.8.3.4
-
diff --git a/pkgs/os-specific/linux/systemd/0004-Set-switch-to-configuration-hints-for-some-units.patch b/pkgs/os-specific/linux/systemd/0004-Set-switch-to-configuration-hints-for-some-units.patch
deleted file mode 100644
index 54fcf9c3e1eeb65280effd0b46dc16adc417cf44..0000000000000000000000000000000000000000
--- a/pkgs/os-specific/linux/systemd/0004-Set-switch-to-configuration-hints-for-some-units.patch
+++ /dev/null
@@ -1,74 +0,0 @@
-From 7a498e661f3d111fa09700a6cfa62cfd6733b1cc Mon Sep 17 00:00:00 2001
-From: Eelco Dolstra
-Date: Tue, 8 Jan 2013 15:48:19 +0100
-Subject: [PATCH 04/11] Set switch-to-configuration hints for some units
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Target units like local-fs.target need ‘X-StopOnReconfiguration=yes’
-to ensure dependencies *on* that target properly take into account the
-dependencies *of* the target.
-
-‘X-RestartIfChanged=no’ is necessary for systemd-journald.service
-because restarting it causes services connected to journald to stop
-logging.
-
-‘X-RestartIfChanged=no’ is necessary for systemd-user-sessions.service
-to prevent all user sessions from being killed when this unit changes.
----
- units/local-fs.target | 2 ++
- units/remote-fs.target | 2 ++
- units/systemd-journald.service.in | 5 +++++
- units/systemd-user-sessions.service.in | 3 +++
- 4 files changed, 12 insertions(+)
-
-diff --git a/units/local-fs.target b/units/local-fs.target
-index 18c3d74..a09054c 100644
---- a/units/local-fs.target
-+++ b/units/local-fs.target
-@@ -11,3 +11,5 @@ Documentation=man:systemd.special(7)
- After=local-fs-pre.target
- OnFailure=emergency.target
- OnFailureIsolate=no
-+
-+X-StopOnReconfiguration=yes
-diff --git a/units/remote-fs.target b/units/remote-fs.target
-index 09213e8..47b4cf5 100644
---- a/units/remote-fs.target
-+++ b/units/remote-fs.target
-@@ -10,5 +10,7 @@ Description=Remote File Systems
- Documentation=man:systemd.special(7)
- After=remote-fs-pre.target
-
-+X-StopOnReconfiguration=yes
-+
- [Install]
- WantedBy=multi-user.target
-diff --git a/units/systemd-journald.service.in b/units/systemd-journald.service.in
-index ab2e50c..9563a7d 100644
---- a/units/systemd-journald.service.in
-+++ b/units/systemd-journald.service.in
-@@ -24,3 +24,8 @@ CapabilityBoundingSet=CAP_SYS_ADMIN CAP_DAC_OVERRIDE CAP_SYS_PTRACE CAP_SYSLOG C
- # Increase the default a bit in order to allow many simultaneous
- # services being run since we keep one fd open per service.
- LimitNOFILE=16384
-+
-+# Don't restart journald, since that causes services connected to
-+# journald to stop logging (see
-+# https://bugs.freedesktop.org/show_bug.cgi?id=56043).
-+X-RestartIfChanged=no
-diff --git a/units/systemd-user-sessions.service.in b/units/systemd-user-sessions.service.in
-index 0869e73..b6ed958 100644
---- a/units/systemd-user-sessions.service.in
-+++ b/units/systemd-user-sessions.service.in
-@@ -15,3 +15,6 @@ Type=oneshot
- RemainAfterExit=yes
- ExecStart=@rootlibexecdir@/systemd-user-sessions start
- ExecStop=@rootlibexecdir@/systemd-user-sessions stop
-+
-+# Restart kills all active sessions.
-+X-RestartIfChanged=no
---
-1.8.3.4
-
diff --git a/pkgs/os-specific/linux/systemd/0005-sysinit.target-Drop-the-dependency-on-local-fs.targe.patch b/pkgs/os-specific/linux/systemd/0005-sysinit.target-Drop-the-dependency-on-local-fs.targe.patch
deleted file mode 100644
index 9cbb2f716a8a5d1e9eabcbe1624a0bb2091d5d8a..0000000000000000000000000000000000000000
--- a/pkgs/os-specific/linux/systemd/0005-sysinit.target-Drop-the-dependency-on-local-fs.targe.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From e6bbe5fa858bd8196c8e1f264904679e6bda426d Mon Sep 17 00:00:00 2001
-From: Eelco Dolstra
-Date: Tue, 8 Jan 2013 15:56:03 +0100
-Subject: [PATCH 05/11] sysinit.target: Drop the dependency on local-fs.target
- and swap.target
-
-Having all services with DefaultDependencies=yes depend on
-local-fs.target is annoying, because some of those services might be
-necessary to mount local filesystems. For instance, Charon's
-send-keys feature requires sshd to be running in order to receive LUKS
-encryption keys, which in turn requires dhcpcd, and so on. So we drop
-this dependency (and swap.target as well for consistency). If
-services require a specific mount, they should use RequiresMountsFor
-in any case.
----
- units/sysinit.target | 3 +--
- 1 file changed, 1 insertion(+), 2 deletions(-)
-
-diff --git a/units/sysinit.target b/units/sysinit.target
-index 8f4fb8f..e0f0147 100644
---- a/units/sysinit.target
-+++ b/units/sysinit.target
-@@ -9,6 +9,5 @@
- Description=System Initialization
- Documentation=man:systemd.special(7)
- Conflicts=emergency.service emergency.target
--Wants=local-fs.target swap.target
--After=local-fs.target swap.target emergency.service emergency.target
-+After=emergency.service emergency.target
- RefuseManualStart=yes
---
-1.8.3.4
-
diff --git a/pkgs/os-specific/linux/systemd/0006-Don-t-call-plymouth-quit.patch b/pkgs/os-specific/linux/systemd/0006-Don-t-call-plymouth-quit.patch
deleted file mode 100644
index d73733a68b000cdaff8eeae0c5f257272bf3fbb2..0000000000000000000000000000000000000000
--- a/pkgs/os-specific/linux/systemd/0006-Don-t-call-plymouth-quit.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-From 4731a9074538e9e24d2b81fc737917b064e194e6 Mon Sep 17 00:00:00 2001
-From: Eelco Dolstra
-Date: Tue, 8 Jan 2013 18:36:28 +0100
-Subject: [PATCH 06/11] Don't call "plymouth quit"
-
-NixOS doesn't use Plymouth (yet).
----
- units/emergency.service.in | 1 -
- units/rescue.service.m4.in | 1 -
- 2 files changed, 2 deletions(-)
-
-diff --git a/units/emergency.service.in b/units/emergency.service.in
-index 442f0e0..6b7eafd 100644
---- a/units/emergency.service.in
-+++ b/units/emergency.service.in
-@@ -15,7 +15,6 @@ Before=shutdown.target
- [Service]
- Environment=HOME=/root
- WorkingDirectory=/root
--ExecStartPre=-/bin/plymouth quit
- ExecStartPre=-/bin/echo -e 'Welcome to emergency mode! After logging in, type "journalctl -xb" to view\\nsystem logs, "systemctl reboot" to reboot, "systemctl default" to try again\\nto boot into default mode.'
- ExecStart=-/sbin/sulogin
- ExecStopPost=@SYSTEMCTL@ --fail --no-block default
-diff --git a/units/rescue.service.m4.in b/units/rescue.service.m4.in
-index 269797a..2c640f4 100644
---- a/units/rescue.service.m4.in
-+++ b/units/rescue.service.m4.in
-@@ -16,7 +16,6 @@ Before=shutdown.target
- [Service]
- Environment=HOME=/root
- WorkingDirectory=/root
--ExecStartPre=-/bin/plymouth quit
- ExecStartPre=-/bin/echo -e 'Welcome to rescue mode! Type "systemctl default" or ^D to enter default mode.\\nType "journalctl -xb" to view system logs. Type "systemctl reboot" to reboot.'
- ExecStart=-/sbin/sulogin
- ExecStopPost=-@SYSTEMCTL@ --fail --no-block default
---
-1.8.3.4
-
diff --git a/pkgs/os-specific/linux/systemd/0007-Ignore-IPv6-link-local-addresses.patch b/pkgs/os-specific/linux/systemd/0007-Ignore-IPv6-link-local-addresses.patch
deleted file mode 100644
index f3b3103fe68ef9166b8bb6b8271861d9a902ba8e..0000000000000000000000000000000000000000
--- a/pkgs/os-specific/linux/systemd/0007-Ignore-IPv6-link-local-addresses.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-From f0c362873860526579bf9bda216005fd5a0936dd Mon Sep 17 00:00:00 2001
-From: Eelco Dolstra
-Date: Mon, 4 Feb 2013 12:41:14 +0100
-Subject: [PATCH 07/11] Ignore IPv6 link-local addresses
-
-Returning IPv6 link-local addresses is a bad idea, because they only
-work if an application connects specifically over the corresponding
-interface. So you get errors like:
-
- $ curl -6 http://my-machine/
- curl: (7) Failed to connect to fe80::d6be:d9ff:fe1b:8477: Invalid argument
-
-To prevent this, this patch filters out link-local addresses. So if
-you don't have a routable IPv6 address, nss-myhostname will fall back
-to returning ::1.
----
- src/nss-myhostname/netlink.c | 4 ++++
- 1 file changed, 4 insertions(+)
-
-diff --git a/src/nss-myhostname/netlink.c b/src/nss-myhostname/netlink.c
-index b1ef912..4f2ab5c 100644
---- a/src/nss-myhostname/netlink.c
-+++ b/src/nss-myhostname/netlink.c
-@@ -113,6 +113,10 @@ static int read_reply(int fd, struct address **list, unsigned *n_list) {
- ifaddrmsg->ifa_scope == RT_SCOPE_NOWHERE)
- continue;
-
-+ if (ifaddrmsg->ifa_family == AF_INET6 &&
-+ ifaddrmsg->ifa_scope == RT_SCOPE_LINK)
-+ continue;
-+
- if (ifaddrmsg->ifa_flags & IFA_F_DEPRECATED)
- continue;
-
---
-1.8.3.4
-
diff --git a/pkgs/os-specific/linux/systemd/0008-Don-t-try-to-unmount-nix-or-nix-store.patch b/pkgs/os-specific/linux/systemd/0008-Don-t-try-to-unmount-nix-or-nix-store.patch
deleted file mode 100644
index 252f1cde79a87bcfeed233495b5e20424810ba11..0000000000000000000000000000000000000000
--- a/pkgs/os-specific/linux/systemd/0008-Don-t-try-to-unmount-nix-or-nix-store.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From 0112df74e576dd683c132ec33861b7099dc94454 Mon Sep 17 00:00:00 2001
-From: Eelco Dolstra
-Date: Fri, 12 Apr 2013 13:16:57 +0200
-Subject: [PATCH 08/11] Don't try to unmount /nix or /nix/store
-
-They'll still be remounted read-only.
-
-https://github.com/NixOS/nixos/issues/126
----
- src/core/umount.c | 2 ++
- 1 file changed, 2 insertions(+)
-
-diff --git a/src/core/umount.c b/src/core/umount.c
-index 1e95ad7..9f0e471 100644
---- a/src/core/umount.c
-+++ b/src/core/umount.c
-@@ -435,6 +435,8 @@ static int mount_points_list_umount(MountPoint **head, bool *changed, bool log_e
- * anyway, since we are running from it. They have
- * already been remounted ro. */
- if (path_equal(m->path, "/")
-+ || path_equal(m->path, "/nix")
-+ || path_equal(m->path, "/nix/store")
- #ifndef HAVE_SPLIT_USR
- || path_equal(m->path, "/usr")
- #endif
---
-1.8.3.4
-
diff --git a/pkgs/os-specific/linux/systemd/0009-Start-ctrl-alt-del.target-irreversibly.patch b/pkgs/os-specific/linux/systemd/0009-Start-ctrl-alt-del.target-irreversibly.patch
deleted file mode 100644
index 8a78ded4b0dadb0105e79fb2ccbb3f5041284910..0000000000000000000000000000000000000000
--- a/pkgs/os-specific/linux/systemd/0009-Start-ctrl-alt-del.target-irreversibly.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-From ed7c22c76e1399861ec8e0216f08a7f9419eea50 Mon Sep 17 00:00:00 2001
-From: Eelco Dolstra
-Date: Tue, 7 May 2013 14:03:13 +0200
-Subject: [PATCH 09/11] Start ctrl-alt-del.target irreversibly
-
-This makes ctrl-alt-del reboots more robust, just like "systemctl
-reboot".
----
- src/core/manager.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/core/manager.c b/src/core/manager.c
-index c7f8f20..0508628 100644
---- a/src/core/manager.c
-+++ b/src/core/manager.c
-@@ -1372,7 +1372,7 @@ static int manager_process_signal_fd(Manager *m) {
-
- case SIGINT:
- if (m->running_as == SYSTEMD_SYSTEM) {
-- manager_start_target(m, SPECIAL_CTRL_ALT_DEL_TARGET, JOB_REPLACE);
-+ manager_start_target(m, SPECIAL_CTRL_ALT_DEL_TARGET, JOB_REPLACE_IRREVERSIBLY);
- break;
- }
-
---
-1.8.3.4
-
diff --git a/pkgs/os-specific/linux/systemd/0010-Fix-CPUShares-configuration-option.patch b/pkgs/os-specific/linux/systemd/0010-Fix-CPUShares-configuration-option.patch
deleted file mode 100644
index 1f4852e6bfaee24959a9fc53837761e3007d5600..0000000000000000000000000000000000000000
--- a/pkgs/os-specific/linux/systemd/0010-Fix-CPUShares-configuration-option.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-From 687e657cd320cb4d4ae442e3529ae9571108bb6e Mon Sep 17 00:00:00 2001
-From: Eelco Dolstra
-Date: Fri, 24 May 2013 13:34:53 -0400
-Subject: [PATCH 10/11] Fix CPUShares configuration option
-
-This fixes the error message "Unknown or unsupported cgroup attribute
-CPUShares".
----
- src/core/cgroup-semantics.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/core/cgroup-semantics.c b/src/core/cgroup-semantics.c
-index 82b02bb..7df9d01 100644
---- a/src/core/cgroup-semantics.c
-+++ b/src/core/cgroup-semantics.c
-@@ -255,7 +255,7 @@ static int map_blkio(const CGroupSemantics *s, const char *value, char **ret) {
- }
-
- static const CGroupSemantics semantics[] = {
-- { "cpu", "cpu.shares", "CPUShare", false, parse_cpu_shares, NULL, NULL },
-+ { "cpu", "cpu.shares", "CPUShares", false, parse_cpu_shares, NULL, NULL },
- { "memory", "memory.soft_limit_in_bytes", "MemorySoftLimit", false, parse_memory_limit, NULL, NULL },
- { "memory", "memory.limit_in_bytes", "MemoryLimit", false, parse_memory_limit, NULL, NULL },
- { "devices", "devices.allow", "DeviceAllow", true, parse_device, map_device, NULL },
---
-1.8.3.4
-
diff --git a/pkgs/os-specific/linux/systemd/0011-polkit-Avoid-race-condition-in-scraping-proc.patch b/pkgs/os-specific/linux/systemd/0011-polkit-Avoid-race-condition-in-scraping-proc.patch
deleted file mode 100644
index 08446db72c52b4373bfbd120906b4565bdf13478..0000000000000000000000000000000000000000
--- a/pkgs/os-specific/linux/systemd/0011-polkit-Avoid-race-condition-in-scraping-proc.patch
+++ /dev/null
@@ -1,75 +0,0 @@
-From ab7707b4a9b1b7615bfe2e30e4a2bc9cb5261766 Mon Sep 17 00:00:00 2001
-From: Colin Walters
-Date: Thu, 22 Aug 2013 13:55:21 -0400
-Subject: [PATCH 11/11] polkit: Avoid race condition in scraping /proc
-
-If a calling process execve()s a setuid program, it can appear to be
-uid 0. Since we're receiving requests over DBus, avoid this by simply
-passing system-bus-name as a subject.
----
- src/shared/polkit.c | 31 +++++--------------------------
- 1 file changed, 5 insertions(+), 26 deletions(-)
-
-diff --git a/src/shared/polkit.c b/src/shared/polkit.c
-index cea7074..1c5e9e3 100644
---- a/src/shared/polkit.c
-+++ b/src/shared/polkit.c
-@@ -38,12 +38,8 @@ int verify_polkit(
-
- #ifdef ENABLE_POLKIT
- DBusMessage *m = NULL, *reply = NULL;
-- const char *unix_process = "unix-process", *pid = "pid", *starttime = "start-time", *cancel_id = "";
-+ const char *system_bus_name = "system-bus-name", *name = "name", *cancel_id = "";
- uint32_t flags = interactive ? 1 : 0;
-- pid_t pid_raw;
-- uint32_t pid_u32;
-- unsigned long long starttime_raw;
-- uint64_t starttime_u64;
- DBusMessageIter iter_msg, iter_struct, iter_array, iter_dict, iter_variant;
- int r;
- dbus_bool_t authorized = FALSE, challenge = FALSE;
-@@ -68,14 +64,6 @@ int verify_polkit(
-
- #ifdef ENABLE_POLKIT
-
-- pid_raw = bus_get_unix_process_id(c, sender, error);
-- if (pid_raw == 0)
-- return -EINVAL;
--
-- r = get_starttime_of_pid(pid_raw, &starttime_raw);
-- if (r < 0)
-- return r;
--
- m = dbus_message_new_method_call(
- "org.freedesktop.PolicyKit1",
- "/org/freedesktop/PolicyKit1/Authority",
-@@ -86,22 +74,13 @@ int verify_polkit(
-
- dbus_message_iter_init_append(m, &iter_msg);
-
-- pid_u32 = (uint32_t) pid_raw;
-- starttime_u64 = (uint64_t) starttime_raw;
--
- if (!dbus_message_iter_open_container(&iter_msg, DBUS_TYPE_STRUCT, NULL, &iter_struct) ||
-- !dbus_message_iter_append_basic(&iter_struct, DBUS_TYPE_STRING, &unix_process) ||
-+ !dbus_message_iter_append_basic(&iter_struct, DBUS_TYPE_STRING, &system_bus_name) ||
- !dbus_message_iter_open_container(&iter_struct, DBUS_TYPE_ARRAY, "{sv}", &iter_array) ||
- !dbus_message_iter_open_container(&iter_array, DBUS_TYPE_DICT_ENTRY, NULL, &iter_dict) ||
-- !dbus_message_iter_append_basic(&iter_dict, DBUS_TYPE_STRING, &pid) ||
-- !dbus_message_iter_open_container(&iter_dict, DBUS_TYPE_VARIANT, "u", &iter_variant) ||
-- !dbus_message_iter_append_basic(&iter_variant, DBUS_TYPE_UINT32, &pid_u32) ||
-- !dbus_message_iter_close_container(&iter_dict, &iter_variant) ||
-- !dbus_message_iter_close_container(&iter_array, &iter_dict) ||
-- !dbus_message_iter_open_container(&iter_array, DBUS_TYPE_DICT_ENTRY, NULL, &iter_dict) ||
-- !dbus_message_iter_append_basic(&iter_dict, DBUS_TYPE_STRING, &starttime) ||
-- !dbus_message_iter_open_container(&iter_dict, DBUS_TYPE_VARIANT, "t", &iter_variant) ||
-- !dbus_message_iter_append_basic(&iter_variant, DBUS_TYPE_UINT64, &starttime_u64) ||
-+ !dbus_message_iter_append_basic(&iter_dict, DBUS_TYPE_STRING, &name) ||
-+ !dbus_message_iter_open_container(&iter_dict, DBUS_TYPE_VARIANT, "s", &iter_variant) ||
-+ !dbus_message_iter_append_basic(&iter_variant, DBUS_TYPE_STRING, &sender) ||
- !dbus_message_iter_close_container(&iter_dict, &iter_variant) ||
- !dbus_message_iter_close_container(&iter_array, &iter_dict) ||
- !dbus_message_iter_close_container(&iter_struct, &iter_array) ||
---
-1.8.3.4
-
diff --git a/pkgs/os-specific/linux/systemd/default.nix b/pkgs/os-specific/linux/systemd/default.nix
index 3215032011a25e1a0cb48e5696062f9643828b4d..2c2ed582083f6a9dfdc65e67adb8186f65738b06 100644
--- a/pkgs/os-specific/linux/systemd/default.nix
+++ b/pkgs/os-specific/linux/systemd/default.nix
@@ -16,18 +16,11 @@ stdenv.mkDerivation rec {
};
patches =
- [ ./0001-Make-systemctl-daemon-reexec-do-the-right-thing-on-N.patch
- ./0002-Ignore-duplicate-paths-in-systemctl-start.patch
- ./0003-Start-device-units-for-uninitialised-encrypted-devic.patch
- ./0004-Set-switch-to-configuration-hints-for-some-units.patch
- ./0005-sysinit.target-Drop-the-dependency-on-local-fs.targe.patch
- ./0006-Don-t-call-plymouth-quit.patch
- ./0007-Ignore-IPv6-link-local-addresses.patch
- ./0008-Don-t-try-to-unmount-nix-or-nix-store.patch
- ./0009-Start-ctrl-alt-del.target-irreversibly.patch
- ./0010-Fix-CPUShares-configuration-option.patch
- ./0011-polkit-Avoid-race-condition-in-scraping-proc.patch
- ] ++ stdenv.lib.optional stdenv.isArm ./libc-bug-accept4-arm.patch;
+ [ # These are all changes between upstream and
+ # https://github.com/edolstra/systemd/tree/nixos-v203.
+ ./fixes.patch
+ ]
+ ++ stdenv.lib.optional stdenv.isArm ./libc-bug-accept4-arm.patch;
buildInputs =
[ pkgconfig intltool gperf libcap dbus.libs kmod xz pam acl
diff --git a/pkgs/os-specific/linux/systemd/fix-tests-1.patch b/pkgs/os-specific/linux/systemd/fix-tests-1.patch
deleted file mode 100644
index 14bb0fa27081d7ff68fe944b2e9125cd9f710b97..0000000000000000000000000000000000000000
--- a/pkgs/os-specific/linux/systemd/fix-tests-1.patch
+++ /dev/null
@@ -1,68 +0,0 @@
-Signed-off-by: Ramkumar Ramachandra
----
- Ramkumar Ramachandra wrote:
- > $ ./test-id128
- > random: a08ea8ed34594d4bbd953dd182ec86f9
- > Assertion 'sd_id128_get_machine(&id) == 0' failed at
- > src/test/test-id128.c:41, function main(). Aborting.
- > [1] 8017 abort (core dumped) ./test-id128
-
- Okay, this test fails because I don't have a /etc/machine-id -- I
- thought systemd is supposed to create it? However, from the logic in
- src/core/machine-id-setup.c, it looks like although open() is called
- with O_CREAT on /etc/machine-id, systemd barfs if the file isn't
- present. How about changing this?
-
- src/core/machine-id-setup.c | 12 +++++-------
- src/test/test-id128.c | 6 ++++--
- 2 files changed, 9 insertions(+), 9 deletions(-)
-
-diff --git a/src/core/machine-id-setup.c b/src/core/machine-id-setup.c
-index 7f4c23b..3f21d58 100644
---- a/src/core/machine-id-setup.c
-+++ b/src/core/machine-id-setup.c
-@@ -168,12 +168,8 @@ int machine_id_setup(void) {
- writable = true;
- else {
- fd = open("/etc/machine-id", O_RDONLY|O_CLOEXEC|O_NOCTTY);
-- if (fd < 0) {
-- umask(m);
-- log_error("Cannot open /etc/machine-id: %m");
-- return -errno;
-- }
--
-+ if (fd < 0)
-+ goto generate;
- writable = false;
- }
-
-@@ -192,7 +188,9 @@ int machine_id_setup(void) {
- }
- }
-
-- /* Hmm, so, the id currently stored is not useful, then let's
-+generate:
-+ /* Hmm, so, either /etc/machine-id doesn't exist, the id
-+ * currently stored is not useful, then let's
- * generate one */
-
- r = generate(id);
-diff --git a/src/test/test-id128.c b/src/test/test-id128.c
-index bfd743e..60902d0 100644
---- a/src/test/test-id128.c
-+++ b/src/test/test-id128.c
-@@ -38,8 +38,10 @@ int main(int argc, char *argv[]) {
- assert_se(sd_id128_from_string(t, &id2) == 0);
- assert_se(sd_id128_equal(id, id2));
-
-- assert_se(sd_id128_get_machine(&id) == 0);
-- printf("machine: %s\n", sd_id128_to_string(id, t));
-+ if (sd_id128_get_machine(&id) < 0)
-+ printf("machine: run systemd-machine-id-setup first\n");
-+ else
-+ printf("machine: %s\n", sd_id128_to_string(id, t));
-
- assert_se(sd_id128_get_boot(&id) == 0);
- printf("boot: %s\n", sd_id128_to_string(id, t));
---
-1.7.8.1.362.g5d6df.dirty
diff --git a/pkgs/os-specific/linux/systemd/fixes.patch b/pkgs/os-specific/linux/systemd/fixes.patch
new file mode 100644
index 0000000000000000000000000000000000000000..0ad420cd35cc433ef32198e567545d2bd829f8fb
--- /dev/null
+++ b/pkgs/os-specific/linux/systemd/fixes.patch
@@ -0,0 +1,757 @@
+diff --git a/man/systemd.special.xml b/man/systemd.special.xml
+index 7164b1e..29401eb 100644
+--- a/man/systemd.special.xml
++++ b/man/systemd.special.xml
+@@ -381,7 +381,7 @@
+ this unit during
+ installation. This is best
+ configured via
+- WantedBy=multi-uer.target
++ WantedBy=multi-user.target
+ in the unit's
+ [Install]
+ section.
+diff --git a/rules/80-net-name-slot.rules b/rules/80-net-name-slot.rules
+index 15b5bc4..c5f1b38 100644
+--- a/rules/80-net-name-slot.rules
++++ b/rules/80-net-name-slot.rules
+@@ -1,6 +1,6 @@
+ # do not edit this file, it will be overwritten on update
+
+-ACTION=="remove", GOTO="net_name_slot_end"
++ACTION!="add", GOTO="net_name_slot_end"
+ SUBSYSTEM!="net", GOTO="net_name_slot_end"
+ NAME!="", GOTO="net_name_slot_end"
+
+diff --git a/rules/99-systemd.rules.in b/rules/99-systemd.rules.in
+index d17bdd9..040b10e 100644
+--- a/rules/99-systemd.rules.in
++++ b/rules/99-systemd.rules.in
+@@ -14,10 +14,6 @@ KERNEL=="vport*", TAG+="systemd"
+ SUBSYSTEM=="block", KERNEL!="ram*|loop*", TAG+="systemd"
+ SUBSYSTEM=="block", KERNEL!="ram*|loop*", ENV{DM_UDEV_DISABLE_OTHER_RULES_FLAG}=="1", ENV{SYSTEMD_READY}="0"
+
+-# Ignore encrypted devices with no identified superblock on it, since
+-# we are probably still calling mke2fs or mkswap on it.
+-SUBSYSTEM=="block", KERNEL!="ram*|loop*", ENV{DM_UUID}=="CRYPT-*", ENV{ID_PART_TABLE_TYPE}=="", ENV{ID_FS_USAGE}=="", ENV{SYSTEMD_READY}="0"
+-
+ # Ignore raid devices that are not yet assembled and started
+ SUBSYSTEM=="block", ENV{DEVTYPE}=="disk", KERNEL=="md*", TEST!="md/array_state", ENV{SYSTEMD_READY}="0"
+ SUBSYSTEM=="block", ENV{DEVTYPE}=="disk", KERNEL=="md*", ATTR{md/array_state}=="|clear|inactive", ENV{SYSTEMD_READY}="0"
+diff --git a/src/core/cgroup-semantics.c b/src/core/cgroup-semantics.c
+index 82b02bb..7df9d01 100644
+--- a/src/core/cgroup-semantics.c
++++ b/src/core/cgroup-semantics.c
+@@ -255,7 +255,7 @@ static int map_blkio(const CGroupSemantics *s, const char *value, char **ret) {
+ }
+
+ static const CGroupSemantics semantics[] = {
+- { "cpu", "cpu.shares", "CPUShare", false, parse_cpu_shares, NULL, NULL },
++ { "cpu", "cpu.shares", "CPUShares", false, parse_cpu_shares, NULL, NULL },
+ { "memory", "memory.soft_limit_in_bytes", "MemorySoftLimit", false, parse_memory_limit, NULL, NULL },
+ { "memory", "memory.limit_in_bytes", "MemoryLimit", false, parse_memory_limit, NULL, NULL },
+ { "devices", "devices.allow", "DeviceAllow", true, parse_device, map_device, NULL },
+diff --git a/src/core/dbus-execute.h b/src/core/dbus-execute.h
+index 91d70e5..698102f 100644
+--- a/src/core/dbus-execute.h
++++ b/src/core/dbus-execute.h
+@@ -63,7 +63,7 @@
+ " \n" \
+ " \n" \
+ " \n" \
+- " \n" \
++ " \n" \
+ " \n" \
+ " \n" \
+ " \n" \
+diff --git a/src/core/dbus-manager.c b/src/core/dbus-manager.c
+index 56b02a1..2b6d799 100644
+--- a/src/core/dbus-manager.c
++++ b/src/core/dbus-manager.c
+@@ -1550,7 +1550,7 @@ static DBusHandlerResult bus_manager_message_handler(DBusConnection *connection,
+ _cleanup_strv_free_ char **l = NULL;
+ char **e = NULL;
+
+- SELINUX_ACCESS_CHECK(connection, message, "reboot");
++ SELINUX_ACCESS_CHECK(connection, message, "reload");
+
+ r = bus_parse_strv(message, &l);
+ if (r == -ENOMEM)
+@@ -1577,7 +1577,7 @@ static DBusHandlerResult bus_manager_message_handler(DBusConnection *connection,
+ _cleanup_strv_free_ char **l = NULL;
+ char **e = NULL;
+
+- SELINUX_ACCESS_CHECK(connection, message, "reboot");
++ SELINUX_ACCESS_CHECK(connection, message, "reload");
+
+ r = bus_parse_strv(message, &l);
+ if (r == -ENOMEM)
+@@ -1605,7 +1605,7 @@ static DBusHandlerResult bus_manager_message_handler(DBusConnection *connection,
+ char **f = NULL;
+ DBusMessageIter iter;
+
+- SELINUX_ACCESS_CHECK(connection, message, "reboot");
++ SELINUX_ACCESS_CHECK(connection, message, "reload");
+
+ if (!dbus_message_iter_init(message, &iter))
+ goto oom;
+diff --git a/src/core/dbus-swap.c b/src/core/dbus-swap.c
+index 2e99fba..e72749a 100644
+--- a/src/core/dbus-swap.c
++++ b/src/core/dbus-swap.c
+@@ -93,6 +93,7 @@ static DEFINE_BUS_PROPERTY_APPEND_ENUM(bus_swap_append_swap_result, swap_result,
+ static const BusProperty bus_swap_properties[] = {
+ { "What", bus_property_append_string, "s", offsetof(Swap, what), true },
+ { "Priority", bus_swap_append_priority, "i", 0 },
++ { "TimeoutUSec",bus_property_append_usec, "t", offsetof(Swap, timeout_usec)},
+ BUS_EXEC_COMMAND_PROPERTY("ExecActivate", offsetof(Swap, exec_command[SWAP_EXEC_ACTIVATE]), false),
+ BUS_EXEC_COMMAND_PROPERTY("ExecDeactivate", offsetof(Swap, exec_command[SWAP_EXEC_DEACTIVATE]), false),
+ { "ControlPID", bus_property_append_pid, "u", offsetof(Swap, control_pid) },
+diff --git a/src/core/main.c b/src/core/main.c
+index 7fc06be..101ce79 100644
+--- a/src/core/main.c
++++ b/src/core/main.c
+@@ -1590,14 +1590,14 @@ int main(int argc, char *argv[]) {
+ log_error("Failed to adjust timer slack: %m");
+
+ if (arg_capability_bounding_set_drop) {
+- r = capability_bounding_set_drop(arg_capability_bounding_set_drop, true);
++ r = capability_bounding_set_drop_usermode(arg_capability_bounding_set_drop);
+ if (r < 0) {
+- log_error("Failed to drop capability bounding set: %s", strerror(-r));
++ log_error("Failed to drop capability bounding set of usermode helpers: %s", strerror(-r));
+ goto finish;
+ }
+- r = capability_bounding_set_drop_usermode(arg_capability_bounding_set_drop);
++ r = capability_bounding_set_drop(arg_capability_bounding_set_drop, true);
+ if (r < 0) {
+- log_error("Failed to drop capability bounding set of usermode helpers: %s", strerror(-r));
++ log_error("Failed to drop capability bounding set: %s", strerror(-r));
+ goto finish;
+ }
+ }
+@@ -1650,6 +1650,7 @@ int main(int argc, char *argv[]) {
+ /* This will close all file descriptors that were opened, but
+ * not claimed by any unit. */
+ fdset_free(fds);
++ fds = NULL;
+
+ if (serialization) {
+ fclose(serialization);
+@@ -1857,7 +1858,7 @@ finish:
+ char_array_0(sfd);
+
+ i = 0;
+- args[i++] = SYSTEMD_BINARY_PATH;
++ args[i++] = "/run/current-system/systemd/lib/systemd/systemd";
+ if (switch_root_dir)
+ args[i++] = "--switched-root";
+ args[i++] = arg_running_as == SYSTEMD_SYSTEM ? "--system" : "--user";
+diff --git a/src/core/manager.c b/src/core/manager.c
+index c7f8f20..0508628 100644
+--- a/src/core/manager.c
++++ b/src/core/manager.c
+@@ -1372,7 +1372,7 @@ static int manager_process_signal_fd(Manager *m) {
+
+ case SIGINT:
+ if (m->running_as == SYSTEMD_SYSTEM) {
+- manager_start_target(m, SPECIAL_CTRL_ALT_DEL_TARGET, JOB_REPLACE);
++ manager_start_target(m, SPECIAL_CTRL_ALT_DEL_TARGET, JOB_REPLACE_IRREVERSIBLY);
+ break;
+ }
+
+diff --git a/src/core/service.c b/src/core/service.c
+index 3617c24..4d0e2ad 100644
+--- a/src/core/service.c
++++ b/src/core/service.c
+@@ -2642,6 +2642,9 @@ static int service_serialize(Unit *u, FILE *f, FDSet *fds) {
+ if (s->exec_context.var_tmp_dir)
+ unit_serialize_item(u, f, "var-tmp-dir", s->exec_context.var_tmp_dir);
+
++ if (s->forbid_restart)
++ unit_serialize_item(u, f, "forbid-restart", yes_no(s->forbid_restart));
++
+ return 0;
+ }
+
+@@ -2776,6 +2779,14 @@ static int service_deserialize_item(Unit *u, const char *key, const char *value,
+ return log_oom();
+
+ s->exec_context.var_tmp_dir = t;
++ } else if (streq(key, "forbid-restart")) {
++ int b;
++
++ b = parse_boolean(value);
++ if (b < 0)
++ log_debug_unit(u->id, "Failed to parse forbid-restart value %s", value);
++ else
++ s->forbid_restart = b;
+ } else
+ log_debug_unit(u->id, "Unknown serialization key '%s'", key);
+
+diff --git a/src/core/snapshot.c b/src/core/snapshot.c
+index a63eccd..a6807eb 100644
+--- a/src/core/snapshot.c
++++ b/src/core/snapshot.c
+@@ -217,8 +217,10 @@ int snapshot_create(Manager *m, const char *name, bool cleanup, DBusError *e, Sn
+ if (asprintf(&n, "snapshot-%u.snapshot", ++ m->n_snapshots) < 0)
+ return -ENOMEM;
+
+- if (!manager_get_unit(m, n))
++ if (!manager_get_unit(m, n)) {
++ name = n;
+ break;
++ }
+
+ free(n);
+ }
+diff --git a/src/core/umount.c b/src/core/umount.c
+index 1e95ad7..9f0e471 100644
+--- a/src/core/umount.c
++++ b/src/core/umount.c
+@@ -435,6 +435,8 @@ static int mount_points_list_umount(MountPoint **head, bool *changed, bool log_e
+ * anyway, since we are running from it. They have
+ * already been remounted ro. */
+ if (path_equal(m->path, "/")
++ || path_equal(m->path, "/nix")
++ || path_equal(m->path, "/nix/store")
+ #ifndef HAVE_SPLIT_USR
+ || path_equal(m->path, "/usr")
+ #endif
+diff --git a/src/cryptsetup/cryptsetup-generator.c b/src/cryptsetup/cryptsetup-generator.c
+index 81b7708..edd0b40 100644
+--- a/src/cryptsetup/cryptsetup-generator.c
++++ b/src/cryptsetup/cryptsetup-generator.c
+@@ -111,6 +111,7 @@ static int create_disk(
+ "Conflicts=umount.target\n"
+ "DefaultDependencies=no\n"
+ "BindsTo=dev-mapper-%i.device\n"
++ "IgnoreOnIsolate=true\n"
+ "After=systemd-readahead-collect.service systemd-readahead-replay.service\n",
+ f);
+
+diff --git a/src/fstab-generator/fstab-generator.c b/src/fstab-generator/fstab-generator.c
+index c17299f..6b3e67e 100644
+--- a/src/fstab-generator/fstab-generator.c
++++ b/src/fstab-generator/fstab-generator.c
+@@ -351,7 +351,7 @@ static int add_mount(
+
+ if (automount && !path_equal(where, "/")) {
+ automount_name = unit_name_from_path(where, ".automount");
+- if (!name)
++ if (!automount_name)
+ return log_oom();
+
+ automount_unit = strjoin(arg_dest, "/", automount_name, NULL);
+@@ -596,9 +596,9 @@ static int parse_proc_cmdline(void) {
+ } else if (startswith(word, "rd.fstab=")) {
+
+ if (in_initrd()) {
+- r = parse_boolean(word + 6);
++ r = parse_boolean(word + 9);
+ if (r < 0)
+- log_warning("Failed to parse fstab switch %s. Ignoring.", word + 6);
++ log_warning("Failed to parse fstab switch %s. Ignoring.", word + 9);
+ else
+ arg_enabled = r;
+ }
+diff --git a/src/journal/journal-file.c b/src/journal/journal-file.c
+index 38499a6..bb80905 100644
+--- a/src/journal/journal-file.c
++++ b/src/journal/journal-file.c
+@@ -907,6 +907,8 @@ static int journal_file_append_field(
+
+ osize = offsetof(Object, field.payload) + size;
+ r = journal_file_append_object(f, OBJECT_FIELD, osize, &o, &p);
++ if (r < 0)
++ return r;
+
+ o->field.hash = htole64(hash);
+ memcpy(o->field.payload, field, size);
+diff --git a/src/journal/journald-server.c b/src/journal/journald-server.c
+index 88163c0..e09ba4c 100644
+--- a/src/journal/journald-server.c
++++ b/src/journal/journald-server.c
+@@ -333,8 +333,10 @@ void server_rotate(Server *s) {
+ if (r < 0)
+ if (f)
+ log_error("Failed to rotate %s: %s", f->path, strerror(-r));
+- else
++ else {
+ log_error("Failed to create user journal: %s", strerror(-r));
++ hashmap_remove(s->user_journals, k);
++ }
+ else {
+ hashmap_replace(s->user_journals, k, f);
+ server_fix_perms(s, f, PTR_TO_UINT32(k));
+@@ -975,7 +977,8 @@ int process_event(Server *s, struct epoll_event *ev) {
+ ssize_t n;
+
+ if (ev->events != EPOLLIN) {
+- log_error("Got invalid event from epoll.");
++ log_error("Got invalid event from epoll for %s: %"PRIx32,
++ "signal fd", ev->events);
+ return -EIO;
+ }
+
+@@ -1024,8 +1027,12 @@ int process_event(Server *s, struct epoll_event *ev) {
+ } else if (ev->data.fd == s->dev_kmsg_fd) {
+ int r;
+
+- if (ev->events != EPOLLIN) {
+- log_error("Got invalid event from epoll.");
++ if (ev->events & EPOLLERR)
++ log_warning("/dev/kmsg buffer overrun, some messages lost.");
++
++ if (!(ev->events & EPOLLIN)) {
++ log_error("Got invalid event from epoll for %s: %"PRIx32,
++ "/dev/kmsg", ev->events);
+ return -EIO;
+ }
+
+@@ -1039,7 +1046,9 @@ int process_event(Server *s, struct epoll_event *ev) {
+ ev->data.fd == s->syslog_fd) {
+
+ if (ev->events != EPOLLIN) {
+- log_error("Got invalid event from epoll.");
++ log_error("Got invalid event from epoll for %s: %"PRIx32,
++ ev->data.fd == s->native_fd ? "native fd" : "syslog fd",
++ ev->events);
+ return -EIO;
+ }
+
+@@ -1140,12 +1149,7 @@ int process_event(Server *s, struct epoll_event *ev) {
+ char *e;
+
+ if (n > 0 && n_fds == 0) {
+- e = memchr(s->buffer, '\n', n);
+- if (e)
+- *e = 0;
+- else
+- s->buffer[n] = 0;
+-
++ s->buffer[n] = 0;
+ server_process_syslog_message(s, strstrip(s->buffer), ucred, tv, label, label_len);
+ } else if (n_fds > 0)
+ log_warning("Got file descriptors via syslog socket. Ignoring.");
+@@ -1167,7 +1171,8 @@ int process_event(Server *s, struct epoll_event *ev) {
+ } else if (ev->data.fd == s->stdout_fd) {
+
+ if (ev->events != EPOLLIN) {
+- log_error("Got invalid event from epoll.");
++ log_error("Got invalid event from epoll for %s: %"PRIx32,
++ "stdout fd", ev->events);
+ return -EIO;
+ }
+
+@@ -1178,6 +1183,8 @@ int process_event(Server *s, struct epoll_event *ev) {
+ StdoutStream *stream;
+
+ if ((ev->events|EPOLLIN|EPOLLHUP) != (EPOLLIN|EPOLLHUP)) {
++ log_error("Got invalid event from epoll for %s: %"PRIx32,
++ "stdout stream", ev->events);
+ log_error("Got invalid event from epoll.");
+ return -EIO;
+ }
+diff --git a/src/journal/mmap-cache.c b/src/journal/mmap-cache.c
+index 54bf114..bd197d0 100644
+--- a/src/journal/mmap-cache.c
++++ b/src/journal/mmap-cache.c
+@@ -308,9 +308,13 @@ static void mmap_cache_free(MMapCache *m) {
+ while ((c = hashmap_first(m->contexts)))
+ context_free(c);
+
++ hashmap_free(m->contexts);
++
+ while ((f = hashmap_first(m->fds)))
+ fd_free(f);
+
++ hashmap_free(m->fds);
++
+ while (m->unused)
+ window_free(m->unused);
+
+diff --git a/src/libsystemd-bus/bus-internal.c b/src/libsystemd-bus/bus-internal.c
+index 0e66f3d..cac948e 100644
+--- a/src/libsystemd-bus/bus-internal.c
++++ b/src/libsystemd-bus/bus-internal.c
+@@ -63,7 +63,7 @@ bool object_path_is_valid(const char *p) {
+
+ bool interface_name_is_valid(const char *p) {
+ const char *q;
+- bool dot, found_dot;
++ bool dot, found_dot = false;
+
+ if (isempty(p))
+ return false;
+@@ -103,7 +103,7 @@ bool interface_name_is_valid(const char *p) {
+
+ bool service_name_is_valid(const char *p) {
+ const char *q;
+- bool dot, found_dot, unique;
++ bool dot, found_dot = false, unique;
+
+ if (isempty(p))
+ return false;
+diff --git a/src/libsystemd-bus/sd-bus.c b/src/libsystemd-bus/sd-bus.c
+index 7d6d848..b0eb2f1 100644
+--- a/src/libsystemd-bus/sd-bus.c
++++ b/src/libsystemd-bus/sd-bus.c
+@@ -1088,11 +1088,11 @@ static int dispatch_rqueue(sd_bus *bus, sd_bus_message **m) {
+ if (r == 0)
+ return ret;
+
+- r = 1;
++ ret = 1;
+ } while (!z);
+
+ *m = z;
+- return 1;
++ return ret;
+ }
+
+ int sd_bus_send(sd_bus *bus, sd_bus_message *m, uint64_t *serial) {
+diff --git a/src/libudev/libudev-enumerate.c b/src/libudev/libudev-enumerate.c
+index 5ccaabd..100c1fb 100644
+--- a/src/libudev/libudev-enumerate.c
++++ b/src/libudev/libudev-enumerate.c
+@@ -299,7 +299,7 @@ _public_ struct udev_list_entry *udev_enumerate_get_list_entry(struct udev_enume
+ /* skip to be delayed devices, and move the to
+ * the point where the prefix changes. We can
+ * only move one item at a time. */
+- if (!move_later) {
++ if (move_later == -1) {
+ move_later_prefix = devices_delay_later(udev_enumerate->udev, entry->syspath);
+
+ if (move_later_prefix > 0) {
+@@ -718,6 +718,8 @@ static bool match_subsystem(struct udev_enumerate *udev_enumerate, const char *s
+ {
+ struct udev_list_entry *list_entry;
+
++ subsystem = subsystem ? : "";
++
+ udev_list_entry_foreach(list_entry, udev_list_get_entry(&udev_enumerate->subsystem_nomatch_list)) {
+ if (fnmatch(udev_list_entry_get_name(list_entry), subsystem, 0) == 0)
+ return false;
+@@ -826,23 +828,27 @@ nomatch:
+ static int parent_add_child(struct udev_enumerate *enumerate, const char *path)
+ {
+ struct udev_device *dev;
++ int r = 0;
+
+ dev = udev_device_new_from_syspath(enumerate->udev, path);
+ if (dev == NULL)
+ return -ENODEV;
+
+ if (!match_subsystem(enumerate, udev_device_get_subsystem(dev)))
+- return 0;
++ goto nomatch;
+ if (!match_sysname(enumerate, udev_device_get_sysname(dev)))
+- return 0;
++ goto nomatch;
+ if (!match_property(enumerate, dev))
+- return 0;
++ goto nomatch;
+ if (!match_sysattr(enumerate, dev))
+- return 0;
++ goto nomatch;
+
+ syspath_add(enumerate, udev_device_get_syspath(dev));
++ r = 1;
++
++nomatch:
+ udev_device_unref(dev);
+- return 1;
++ return r;
+ }
+
+ static int parent_crawl_children(struct udev_enumerate *enumerate, const char *path, int maxdepth)
+diff --git a/src/libudev/libudev.sym b/src/libudev/libudev.sym
+index 8e09430..1e6f885 100644
+--- a/src/libudev/libudev.sym
++++ b/src/libudev/libudev.sym
+@@ -109,5 +109,6 @@ global:
+ } LIBUDEV_189;
+
+ LIBUDEV_199 {
++global:
+ udev_device_set_sysattr_value;
+ } LIBUDEV_196;
+diff --git a/src/modules-load/modules-load.c b/src/modules-load/modules-load.c
+index 7b19ee0..49ee420 100644
+--- a/src/modules-load/modules-load.c
++++ b/src/modules-load/modules-load.c
+@@ -302,8 +302,8 @@ int main(int argc, char *argv[]) {
+
+ STRV_FOREACH(i, arg_proc_cmdline_modules) {
+ k = load_module(ctx, *i);
+- if (k < 0)
+- r = EXIT_FAILURE;
++ if (k < 0 && r == 0)
++ r = k;
+ }
+
+ r = conf_files_list_nulstr(&files, ".conf", NULL, conf_file_dirs);
+diff --git a/src/nss-myhostname/netlink.c b/src/nss-myhostname/netlink.c
+index b1ef912..4f2ab5c 100644
+--- a/src/nss-myhostname/netlink.c
++++ b/src/nss-myhostname/netlink.c
+@@ -113,6 +113,10 @@ static int read_reply(int fd, struct address **list, unsigned *n_list) {
+ ifaddrmsg->ifa_scope == RT_SCOPE_NOWHERE)
+ continue;
+
++ if (ifaddrmsg->ifa_family == AF_INET6 &&
++ ifaddrmsg->ifa_scope == RT_SCOPE_LINK)
++ continue;
++
+ if (ifaddrmsg->ifa_flags & IFA_F_DEPRECATED)
+ continue;
+
+diff --git a/src/shared/efivars.c b/src/shared/efivars.c
+index 8d004ba..99340c9 100644
+--- a/src/shared/efivars.c
++++ b/src/shared/efivars.c
+@@ -383,7 +383,8 @@ int efi_get_boot_options(uint16_t **options) {
+ list[count ++] = id;
+ }
+
+- qsort(list, count, sizeof(uint16_t), cmp_uint16);
++ if (list)
++ qsort(list, count, sizeof(uint16_t), cmp_uint16);
+
+ *options = list;
+ return count;
+diff --git a/src/shared/env-util.c b/src/shared/env-util.c
+index 6a52fb9..598222c 100644
+--- a/src/shared/env-util.c
++++ b/src/shared/env-util.c
+@@ -406,7 +406,9 @@ char **strv_env_clean_log(char **e, const char *message) {
+ e[k++] = *p;
+ }
+
+- e[k] = NULL;
++ if (e)
++ e[k] = NULL;
++
+ return e;
+ }
+
+diff --git a/src/shared/log.c b/src/shared/log.c
+index 27317f7..8f4995a 100644
+--- a/src/shared/log.c
++++ b/src/shared/log.c
+@@ -115,16 +115,20 @@ void log_close_syslog(void) {
+
+ static int create_log_socket(int type) {
+ int fd;
++ struct timeval tv;
+
+- /* All output to the syslog/journal fds we do asynchronously,
+- * and if the buffers are full we just drop the messages */
+-
+- fd = socket(AF_UNIX, type|SOCK_CLOEXEC|SOCK_NONBLOCK, 0);
++ fd = socket(AF_UNIX, type|SOCK_CLOEXEC, 0);
+ if (fd < 0)
+ return -errno;
+
+ fd_inc_sndbuf(fd, SNDBUF_SIZE);
+
++ /* We need a blocking fd here since we'd otherwise lose
++ messages way too early. However, let's not hang forever in the
++ unlikely case of a deadlock. */
++ timeval_store(&tv, 1*USEC_PER_MINUTE);
++ setsockopt(fd, SOL_SOCKET, SO_SNDTIMEO, &tv, sizeof(tv));
++
+ return fd;
+ }
+
+diff --git a/src/shared/polkit.c b/src/shared/polkit.c
+index cea7074..1c5e9e3 100644
+--- a/src/shared/polkit.c
++++ b/src/shared/polkit.c
+@@ -38,12 +38,8 @@ int verify_polkit(
+
+ #ifdef ENABLE_POLKIT
+ DBusMessage *m = NULL, *reply = NULL;
+- const char *unix_process = "unix-process", *pid = "pid", *starttime = "start-time", *cancel_id = "";
++ const char *system_bus_name = "system-bus-name", *name = "name", *cancel_id = "";
+ uint32_t flags = interactive ? 1 : 0;
+- pid_t pid_raw;
+- uint32_t pid_u32;
+- unsigned long long starttime_raw;
+- uint64_t starttime_u64;
+ DBusMessageIter iter_msg, iter_struct, iter_array, iter_dict, iter_variant;
+ int r;
+ dbus_bool_t authorized = FALSE, challenge = FALSE;
+@@ -68,14 +64,6 @@ int verify_polkit(
+
+ #ifdef ENABLE_POLKIT
+
+- pid_raw = bus_get_unix_process_id(c, sender, error);
+- if (pid_raw == 0)
+- return -EINVAL;
+-
+- r = get_starttime_of_pid(pid_raw, &starttime_raw);
+- if (r < 0)
+- return r;
+-
+ m = dbus_message_new_method_call(
+ "org.freedesktop.PolicyKit1",
+ "/org/freedesktop/PolicyKit1/Authority",
+@@ -86,22 +74,13 @@ int verify_polkit(
+
+ dbus_message_iter_init_append(m, &iter_msg);
+
+- pid_u32 = (uint32_t) pid_raw;
+- starttime_u64 = (uint64_t) starttime_raw;
+-
+ if (!dbus_message_iter_open_container(&iter_msg, DBUS_TYPE_STRUCT, NULL, &iter_struct) ||
+- !dbus_message_iter_append_basic(&iter_struct, DBUS_TYPE_STRING, &unix_process) ||
++ !dbus_message_iter_append_basic(&iter_struct, DBUS_TYPE_STRING, &system_bus_name) ||
+ !dbus_message_iter_open_container(&iter_struct, DBUS_TYPE_ARRAY, "{sv}", &iter_array) ||
+ !dbus_message_iter_open_container(&iter_array, DBUS_TYPE_DICT_ENTRY, NULL, &iter_dict) ||
+- !dbus_message_iter_append_basic(&iter_dict, DBUS_TYPE_STRING, &pid) ||
+- !dbus_message_iter_open_container(&iter_dict, DBUS_TYPE_VARIANT, "u", &iter_variant) ||
+- !dbus_message_iter_append_basic(&iter_variant, DBUS_TYPE_UINT32, &pid_u32) ||
+- !dbus_message_iter_close_container(&iter_dict, &iter_variant) ||
+- !dbus_message_iter_close_container(&iter_array, &iter_dict) ||
+- !dbus_message_iter_open_container(&iter_array, DBUS_TYPE_DICT_ENTRY, NULL, &iter_dict) ||
+- !dbus_message_iter_append_basic(&iter_dict, DBUS_TYPE_STRING, &starttime) ||
+- !dbus_message_iter_open_container(&iter_dict, DBUS_TYPE_VARIANT, "t", &iter_variant) ||
+- !dbus_message_iter_append_basic(&iter_variant, DBUS_TYPE_UINT64, &starttime_u64) ||
++ !dbus_message_iter_append_basic(&iter_dict, DBUS_TYPE_STRING, &name) ||
++ !dbus_message_iter_open_container(&iter_dict, DBUS_TYPE_VARIANT, "s", &iter_variant) ||
++ !dbus_message_iter_append_basic(&iter_variant, DBUS_TYPE_STRING, &sender) ||
+ !dbus_message_iter_close_container(&iter_dict, &iter_variant) ||
+ !dbus_message_iter_close_container(&iter_array, &iter_dict) ||
+ !dbus_message_iter_close_container(&iter_struct, &iter_array) ||
+diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c
+index 3cca861..f6052dd 100644
+--- a/src/systemctl/systemctl.c
++++ b/src/systemctl/systemctl.c
+@@ -1482,7 +1482,7 @@ static DBusHandlerResult wait_filter(DBusConnection *connection, DBusMessage *me
+
+ } else if (dbus_message_is_signal(message, "org.freedesktop.systemd1.Manager", "JobRemoved")) {
+ uint32_t id;
+- const char *path, *result, *unit;
++ const char *path, *result, *unit, *r;
+
+ if (dbus_message_get_args(message, &error,
+ DBUS_TYPE_UINT32, &id,
+@@ -1491,7 +1491,11 @@ static DBusHandlerResult wait_filter(DBusConnection *connection, DBusMessage *me
+ DBUS_TYPE_STRING, &result,
+ DBUS_TYPE_INVALID)) {
+
+- free(set_remove(d->set, (char*) path));
++ r = set_remove(d->set, (char*) path);
++ if (!r)
++ return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
++
++ free(r);
+
+ if (!isempty(result))
+ d->result = strdup(result);
+@@ -1511,7 +1515,11 @@ static DBusHandlerResult wait_filter(DBusConnection *connection, DBusMessage *me
+ /* Compatibility with older systemd versions <
+ * 183 during upgrades. This should be dropped
+ * one day. */
+- free(set_remove(d->set, (char*) path));
++ r = set_remove(d->set, (char*) path);
++ if (!r)
++ return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
++
++ free(r);
+
+ if (*result)
+ d->result = strdup(result);
+@@ -1867,7 +1875,7 @@ static int start_unit_one(
+ return log_oom();
+
+ r = set_consume(s, p);
+- if (r < 0) {
++ if (r < 0 && r != -EEXIST) {
+ log_error("Failed to add path to set.");
+ return r;
+ }
+diff --git a/units/emergency.service.in b/units/emergency.service.in
+index 442f0e0..6b7eafd 100644
+--- a/units/emergency.service.in
++++ b/units/emergency.service.in
+@@ -15,7 +15,6 @@ Before=shutdown.target
+ [Service]
+ Environment=HOME=/root
+ WorkingDirectory=/root
+-ExecStartPre=-/bin/plymouth quit
+ ExecStartPre=-/bin/echo -e 'Welcome to emergency mode! After logging in, type "journalctl -xb" to view\\nsystem logs, "systemctl reboot" to reboot, "systemctl default" to try again\\nto boot into default mode.'
+ ExecStart=-/sbin/sulogin
+ ExecStopPost=@SYSTEMCTL@ --fail --no-block default
+diff --git a/units/local-fs.target b/units/local-fs.target
+index 18c3d74..a09054c 100644
+--- a/units/local-fs.target
++++ b/units/local-fs.target
+@@ -11,3 +11,5 @@ Documentation=man:systemd.special(7)
+ After=local-fs-pre.target
+ OnFailure=emergency.target
+ OnFailureIsolate=no
++
++X-StopOnReconfiguration=yes
+diff --git a/units/remote-fs.target b/units/remote-fs.target
+index 09213e8..47b4cf5 100644
+--- a/units/remote-fs.target
++++ b/units/remote-fs.target
+@@ -10,5 +10,7 @@ Description=Remote File Systems
+ Documentation=man:systemd.special(7)
+ After=remote-fs-pre.target
+
++X-StopOnReconfiguration=yes
++
+ [Install]
+ WantedBy=multi-user.target
+diff --git a/units/rescue.service.m4.in b/units/rescue.service.m4.in
+index 269797a..2c640f4 100644
+--- a/units/rescue.service.m4.in
++++ b/units/rescue.service.m4.in
+@@ -16,7 +16,6 @@ Before=shutdown.target
+ [Service]
+ Environment=HOME=/root
+ WorkingDirectory=/root
+-ExecStartPre=-/bin/plymouth quit
+ ExecStartPre=-/bin/echo -e 'Welcome to rescue mode! Type "systemctl default" or ^D to enter default mode.\\nType "journalctl -xb" to view system logs. Type "systemctl reboot" to reboot.'
+ ExecStart=-/sbin/sulogin
+ ExecStopPost=-@SYSTEMCTL@ --fail --no-block default
+diff --git a/units/sysinit.target b/units/sysinit.target
+index 8f4fb8f..e0f0147 100644
+--- a/units/sysinit.target
++++ b/units/sysinit.target
+@@ -9,6 +9,5 @@
+ Description=System Initialization
+ Documentation=man:systemd.special(7)
+ Conflicts=emergency.service emergency.target
+-Wants=local-fs.target swap.target
+-After=local-fs.target swap.target emergency.service emergency.target
++After=emergency.service emergency.target
+ RefuseManualStart=yes
+diff --git a/units/systemd-journald.service.in b/units/systemd-journald.service.in
+index ab2e50c..9563a7d 100644
+--- a/units/systemd-journald.service.in
++++ b/units/systemd-journald.service.in
+@@ -24,3 +24,8 @@ CapabilityBoundingSet=CAP_SYS_ADMIN CAP_DAC_OVERRIDE CAP_SYS_PTRACE CAP_SYSLOG C
+ # Increase the default a bit in order to allow many simultaneous
+ # services being run since we keep one fd open per service.
+ LimitNOFILE=16384
++
++# Don't restart journald, since that causes services connected to
++# journald to stop logging (see
++# https://bugs.freedesktop.org/show_bug.cgi?id=56043).
++X-RestartIfChanged=no
+diff --git a/units/systemd-user-sessions.service.in b/units/systemd-user-sessions.service.in
+index 0869e73..b6ed958 100644
+--- a/units/systemd-user-sessions.service.in
++++ b/units/systemd-user-sessions.service.in
+@@ -15,3 +15,6 @@ Type=oneshot
+ RemainAfterExit=yes
+ ExecStart=@rootlibexecdir@/systemd-user-sessions start
+ ExecStop=@rootlibexecdir@/systemd-user-sessions stop
++
++# Restart kills all active sessions.
++X-RestartIfChanged=no
diff --git a/pkgs/os-specific/linux/systemd/no-global-install.patch b/pkgs/os-specific/linux/systemd/no-global-install.patch
deleted file mode 100644
index 6567251d57a122bf62cc7298c0663f2cd5e89229..0000000000000000000000000000000000000000
--- a/pkgs/os-specific/linux/systemd/no-global-install.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-diff --git a/Makefile.am b/Makefile.am
-index 05bf582..aa16a7c 100644
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -2568,11 +2568,6 @@ endif
- # "adm" and "wheel".
- libsystemd-journal-install-hook:
- libname=libsystemd-journal.so && $(move-to-rootlibdir)
-- $(MKDIR_P) $(DESTDIR)/var/log/journal
-- -chown 0:0 $(DESTDIR)/var/log/journal
-- -chmod 755 $(DESTDIR)/var/log/journal
-- -setfacl -nm g:adm:rx,d:g:adm:rx $(DESTDIR)/var/log/journal/
-- -setfacl -nm g:wheel:rx,d:g:wheel:rx $(DESTDIR)/var/log/journal/
-
- libsystemd-journal-uninstall-hook:
- rm -f $(DESTDIR)$(rootlibdir)/libsystemd-journal.so*
-@@ -3676,9 +3671,6 @@ if HAVE_SYSV_COMPAT
- sysvinit_DATA = \
- docs/sysvinit/README
-
--varlog_DATA = \
-- docs/var-log/README
--
- docs/sysvinit/README: docs/sysvinit/README.in
- $(SED_PROCESS)
-
diff --git a/pkgs/os-specific/linux/usbutils/default.nix b/pkgs/os-specific/linux/usbutils/default.nix
index b7d139a534f06b44f45aeb7dbf53c2cbe7c82620..aff730e387a570ff70327d5bd0e8d716a7950c0c 100644
--- a/pkgs/os-specific/linux/usbutils/default.nix
+++ b/pkgs/os-specific/linux/usbutils/default.nix
@@ -4,8 +4,8 @@ let
# Obtained from http://www.linux-usb.org/usb.ids.bz2.
usbids = fetchurl {
- url = http://tarballs.nixos.org/usb.ids.20120920.bz2;
- sha256 = "0sz860g7grf6kx22p49s6j8h85c69ymcw16a8110klzfl9hl9hli";
+ url = http://tarballs.nixos.org/usb.ids.20130821.bz2;
+ sha256 = "0x7mf4h5h5wjzhygfr4lc8yz0cwm7mahxrnp5nkxcmawmyxwsg53";
};
in
@@ -20,8 +20,14 @@ stdenv.mkDerivation rec {
buildInputs = [ pkgconfig libusb1 ];
- # currently up-to-date
- #preBuild = "bunzip2 < ${usbids} > usb.ids";
+ preBuild = "bunzip2 < ${usbids} > usb.ids";
+
+ postInstall =
+ ''
+ rm $out/sbin/update-usbids.sh
+ substituteInPlace $out/bin/lsusb.py \
+ --replace /usr/share/usb.ids $out/share/usb.ids
+ '';
meta = {
homepage = http://www.linux-usb.org/;
diff --git a/pkgs/os-specific/linux/x86info/default.nix b/pkgs/os-specific/linux/x86info/default.nix
index 297991ff4d9542dcc293d11e33204b03b4719907..6cd2a431a605c5ccc1104f9f9fae08892ad86249 100644
--- a/pkgs/os-specific/linux/x86info/default.nix
+++ b/pkgs/os-specific/linux/x86info/default.nix
@@ -19,7 +19,7 @@ stdenv.mkDerivation rec {
'';
meta = {
- description = "An identification utility for the x86 series of processors.";
+ description = "Identification utility for the x86 series of processors";
longDescription =
''
x86info will identify all Intel/AMD/Centaur/Cyrix/VIA CPUs. It leverages
diff --git a/pkgs/servers/apcupsd/default.nix b/pkgs/servers/apcupsd/default.nix
index 877be1d74b8acb6e96ab4f69d74181cdddb368fc..4ccb1b069c93f3d5b959da241b69748feaa22541 100644
--- a/pkgs/servers/apcupsd/default.nix
+++ b/pkgs/servers/apcupsd/default.nix
@@ -45,7 +45,7 @@ stdenv.mkDerivation rec {
'';
meta = with stdenv.lib; {
- description = "A daemon for controlling APC UPSes";
+ description = "Daemon for controlling APC UPSes";
homepage = http://www.apcupsd.com/;
license = licenses.gpl2;
platforms = platforms.linux;
diff --git a/pkgs/servers/computing/storm/default.nix b/pkgs/servers/computing/storm/default.nix
index ca3f5333b30e842057eeacd9b5ab1be48a5af48a..88837f9bb427097d35def70bf7a72a0f628c4e47 100644
--- a/pkgs/servers/computing/storm/default.nix
+++ b/pkgs/servers/computing/storm/default.nix
@@ -42,7 +42,7 @@ stdenv.mkDerivation {
meta = {
homepage = "http://storm-project.net";
- description = "Storm, free and open source distributed realtime computation system.";
+ description = "Distributed realtime computation system";
license = "Eclipse Public License 1.0";
maintainers = [ lib.maintainers.vizanto ];
};
diff --git a/pkgs/servers/http/apache-modules/mod_evasive/default.nix b/pkgs/servers/http/apache-modules/mod_evasive/default.nix
index d796d0a6dc5e9f784444c34220e6414b6106d9b3..129f44ab502f1382b0e0314e6c2223a214dc6c75 100644
--- a/pkgs/servers/http/apache-modules/mod_evasive/default.nix
+++ b/pkgs/servers/http/apache-modules/mod_evasive/default.nix
@@ -23,8 +23,7 @@ stdenv.mkDerivation {
meta = {
homepage = "http://www.zdziarski.com/blog/?page_id=442";
- description = "mod_evasive is an evasive maneuvers module for Apache to provide evasive action in the event of an HTTP DoS or DDoS attack or brute force attack.";
-
+ description = "Evasive maneuvers module for Apache to provide evasive action in the event of an HTTP DoS or DDoS attack or brute force attack";
platforms = stdenv.lib.platforms.linux;
};
}
diff --git a/pkgs/servers/http/nginx/default.nix b/pkgs/servers/http/nginx/default.nix
index 083dbc482f0a286192b1c57a5b7f6ae4132e3796..8e77d07e5c59a81b24064564dcd051424fec9158 100644
--- a/pkgs/servers/http/nginx/default.nix
+++ b/pkgs/servers/http/nginx/default.nix
@@ -13,7 +13,7 @@ stdenv.mkDerivation rec {
src = fetchurl {
url = "http://nginx.org/download/${name}.tar.gz";
- sha256 = "06ficmjiya3m8mdlyq3bgqx604h475n77qc5c502kfjijzld39dw";
+ sha256 = "116yfy0k65mwxdkld0w7c3gly77jdqlvga5hpbsw79i3r62kh4mf";
};
buildInputs = [ openssl zlib pcre libxml2 libxslt ] ++ stdenv.lib.optional fullWebDAV expat;
@@ -41,6 +41,6 @@ stdenv.mkDerivation rec {
description = "A reverse proxy and lightweight webserver";
maintainers = [ stdenv.lib.maintainers.raskin];
platforms = stdenv.lib.platforms.all;
- version = "1.4.1";
+ version = "1.4.3";
};
}
diff --git a/pkgs/servers/icecast/default.nix b/pkgs/servers/icecast/default.nix
index 24ae245a8a07f406c907925c162cc24fe28fc7bd..8b940fdb0cfc3dd6621fb5116f008be5b1bd5d0b 100644
--- a/pkgs/servers/icecast/default.nix
+++ b/pkgs/servers/icecast/default.nix
@@ -13,7 +13,7 @@ stdenv.mkDerivation rec {
buildInputs = [ libxml2 libxslt curl libvorbis libtheora speex libkate ];
meta = {
- description = "icecast is free server software for streaming multimedia.";
+ description = "Server software for streaming multimedia";
longDescription = ''
Icecast is a streaming media server which currently supports Ogg Vorbis and MP3
diff --git a/pkgs/servers/mail/dovecot-pigeonhole/default.nix b/pkgs/servers/mail/dovecot-pigeonhole/default.nix
index c4204113ae0ff3394ce7bae35e35da1df6b96db2..5c0f39ca135f8d7a3e4b51b4bc02cf3efb94d669 100644
--- a/pkgs/servers/mail/dovecot-pigeonhole/default.nix
+++ b/pkgs/servers/mail/dovecot-pigeonhole/default.nix
@@ -28,7 +28,7 @@ stdenv.mkDerivation rec {
meta = with stdenv.lib; {
homepage = http://pigeonhole.dovecot.org/;
- description = "A sieve plugin for the Dovecot IMAP server.";
+ description = "A sieve plugin for the Dovecot IMAP server";
license = licenses.lgpl21;
maintainers = [ maintainers.rickynils ];
};
diff --git a/pkgs/servers/monitoring/zabbix/2.0.nix b/pkgs/servers/monitoring/zabbix/2.0.nix
index 14a4e8bd5a585da4ba00b52c6ef198a0541f3cd1..8752f54647f07395e6dc74c1ae36578f79fd878b 100644
--- a/pkgs/servers/monitoring/zabbix/2.0.nix
+++ b/pkgs/servers/monitoring/zabbix/2.0.nix
@@ -31,6 +31,14 @@ in
inherit src preConfigure;
+ patchFlags = "-p0";
+ patches =
+ [ (fetchurl {
+ url = "https://support.zabbix.com/secure/attachment/24449/ZBX-7091-2.0.8.patch";
+ sha256 = "1rlk3812dd12imk29i0fw6bzpgi44a8231kiq3bl5yryx18qh580";
+ })
+ ];
+
configureFlags = [
"--enable-agent"
"--enable-server"
diff --git a/pkgs/servers/monitoring/zabbix/default.nix b/pkgs/servers/monitoring/zabbix/default.nix
index 6ee4712ae6573489bb685a40adf30056704b8173..b106921cdf696cdc8a1e36c0a8c7c4d6b3984ee6 100644
--- a/pkgs/servers/monitoring/zabbix/default.nix
+++ b/pkgs/servers/monitoring/zabbix/default.nix
@@ -2,11 +2,11 @@
let
- version = "1.8.17";
+ version = "1.8.18rc1";
src = fetchurl {
url = "mirror://sourceforge/zabbix/zabbix-${version}.tar.gz";
- sha256 = "0c2dpx7ncahp161p6zymrrxwyn3algkfzh6dz7x2j0wsnvb6lrp2";
+ sha256 = "1pa4656dcl5r7r36nwk05zy38z49np6j717wjmmd8sqlz6szw01n";
};
preConfigure =
diff --git a/pkgs/servers/mpd/default.nix b/pkgs/servers/mpd/default.nix
index 43da84dcb819fa9f3e4429f8aab9ac40887a8b7a..238176aadff908e9d863d09c876be276e669995a 100644
--- a/pkgs/servers/mpd/default.nix
+++ b/pkgs/servers/mpd/default.nix
@@ -34,8 +34,8 @@ in stdenv.mkDerivation rec {
};
buildInputs = [ pkgconfig glib ]
- ++ opt (!stdenv.isDarwin) systemd
- ++ opt (!stdenv.isDarwin && alsaSupport) alsaLib
+ ++ opt stdenv.isLinux systemd
+ ++ opt (stdenv.isLinux && alsaSupport) alsaLib
++ opt flacSupport flac
++ opt vorbisSupport libvorbis
# using libmad to decode mp3 files on darwin is causing a segfault -- there
@@ -81,7 +81,7 @@ in stdenv.mkDerivation rec {
(mkFlag mpg123Support "mpg123")
(mkFlag aacSupport "aac")
"--enable-debugging" ]
- ++ opt (!stdenv.isDarwin)
+ ++ opt stdenv.isLinux
"--with-systemdsystemunitdir=$(out)/etc/systemd/system";
NIX_LDFLAGS = ''
diff --git a/pkgs/servers/pulseaudio/default.nix b/pkgs/servers/pulseaudio/default.nix
index 629dcb5bbce8fd086e7aee1c0e577f82d7fb698f..4b23cb4173c6a933ac088051fbadf72aaae60f07 100644
--- a/pkgs/servers/pulseaudio/default.nix
+++ b/pkgs/servers/pulseaudio/default.nix
@@ -17,7 +17,7 @@ stdenv.mkDerivation rec {
# Since `libpulse*.la' contain `-lgdbm' and `-lcap', it must be propagated.
propagatedBuildInputs
- = [ gdbm ] ++ stdenv.lib.optionals (!stdenv.isDarwin) [ libcap ];
+ = [ gdbm ] ++ stdenv.lib.optionals stdenv.isLinux [ libcap ];
buildInputs =
[ pkgconfig gnum4 libtool intltool glib dbus avahi libsamplerate libsndfile
@@ -25,7 +25,7 @@ stdenv.mkDerivation rec {
++ stdenv.lib.optional jackaudioSupport jackaudio
++ stdenv.lib.optionals x11Support [ xlibs.xlibs xlibs.libXtst xlibs.libXi ]
++ stdenv.lib.optional useSystemd systemd
- ++ stdenv.lib.optionals (!stdenv.isDarwin) [ alsaLib bluez sbc udev ];
+ ++ stdenv.lib.optionals stdenv.isLinux [ alsaLib bluez sbc udev ];
preConfigure = ''
# Move the udev rules under $(prefix).
diff --git a/pkgs/servers/sabnzbd/default.nix b/pkgs/servers/sabnzbd/default.nix
index 599f6ee31f3e64d770e81dd3d955ab2d15a017ec..ace96fbed6375b31e9545f316e2f344fcf0a03c4 100644
--- a/pkgs/servers/sabnzbd/default.nix
+++ b/pkgs/servers/sabnzbd/default.nix
@@ -14,6 +14,6 @@ stdenv.mkDerivation {
builder = ./builder.sh;
meta = {
- description = "Usenet NZB downloader, par2 repairer and auto extracting server.";
+ description = "Usenet NZB downloader, par2 repairer and auto extracting server";
};
}
diff --git a/pkgs/servers/sql/mysql51/default.nix b/pkgs/servers/sql/mysql/5.1.x.nix
similarity index 93%
rename from pkgs/servers/sql/mysql51/default.nix
rename to pkgs/servers/sql/mysql/5.1.x.nix
index b0f125faef7ab0c0683ae472a1bc0dc128759754..c210c9965327f926f820e56536295761df4f6329 100644
--- a/pkgs/servers/sql/mysql51/default.nix
+++ b/pkgs/servers/sql/mysql/5.1.x.nix
@@ -3,11 +3,11 @@
# Note: zlib is not required; MySQL can use an internal zlib.
stdenv.mkDerivation rec {
- name = "mysql-5.1.69";
+ name = "mysql-5.1.72";
src = fetchurl {
url = "http://cdn.mysql.com/Downloads/MySQL-5.1/${name}.tar.gz";
- md5 = "06bbb6a11a2cbe042f80dbd333ff9f12";
+ md5 = "ed79cd48e3e7402143548917813cdb80";
};
buildInputs = [ncurses zlib perl openssl] ++ stdenv.lib.optional stdenv.isLinux ps;
diff --git a/pkgs/servers/sql/mysql55/default.nix b/pkgs/servers/sql/mysql/5.5.x.nix
similarity index 93%
rename from pkgs/servers/sql/mysql55/default.nix
rename to pkgs/servers/sql/mysql/5.5.x.nix
index 898acc1ba4930c5b2be33a4346c6438bd430f85f..bd30b7db75ff763bd27b088a22cbd299c628d321 100644
--- a/pkgs/servers/sql/mysql55/default.nix
+++ b/pkgs/servers/sql/mysql/5.5.x.nix
@@ -4,11 +4,11 @@
stdenv.mkDerivation rec {
name = "mysql-${version}";
- version = "5.5.31";
+ version = "5.5.34";
src = fetchurl {
url = "http://cdn.mysql.com/Downloads/MySQL-5.5/${name}.tar.gz";
- md5 = "bf402cbd52a9af33e5c25b2a4bbc56db";
+ md5 = "930970a42d51e48599deb7fe01778a4a";
};
buildInputs = [ cmake bison ncurses openssl readline zlib ]
diff --git a/pkgs/servers/sql/mysql51/abi_check.patch b/pkgs/servers/sql/mysql/abi_check.patch
similarity index 100%
rename from pkgs/servers/sql/mysql51/abi_check.patch
rename to pkgs/servers/sql/mysql/abi_check.patch
diff --git a/pkgs/servers/sql/mysql/default.nix b/pkgs/servers/sql/mysql/default.nix
deleted file mode 100644
index 3a13aa323a195fcc856147131615f3e15dd70708..0000000000000000000000000000000000000000
--- a/pkgs/servers/sql/mysql/default.nix
+++ /dev/null
@@ -1,16 +0,0 @@
-{stdenv, fetchurl, ps, ncurses, zlib ? null, perl}:
-
-# Note: zlib is not required; MySQL can use an internal zlib.
-
-stdenv.mkDerivation {
- name = "mysql-4.1.18";
-
- src = fetchurl {
- url = http://downloads.mysql.com/archives/mysql-4.1/mysql-4.1.18.tar.gz;
- md5 = "a2db4edb3e1e3b8e0f8c2242225ea513";
- };
-
- buildInputs = [ps ncurses zlib perl];
-
- configureFlags = "--enable-thread-safe-client";
-}
diff --git a/pkgs/servers/sql/mysql5/default.nix b/pkgs/servers/sql/mysql5/default.nix
deleted file mode 100644
index 908ae3fc70c613bd1782135db8d1d4f15a901776..0000000000000000000000000000000000000000
--- a/pkgs/servers/sql/mysql5/default.nix
+++ /dev/null
@@ -1,34 +0,0 @@
-{stdenv, fetchurl, ps, ncurses, zlib, perl, openssl}:
-
-# Note: zlib is not required; MySQL can use an internal zlib.
-
-stdenv.mkDerivation {
- name = "mysql-5.0.77";
-
- src = fetchurl {
- url = http://downloads.mysql.com/archives/mysql-5.0/mysql-5.0.77.tar.gz;
- sha256 = "1s0m991aynim8ny28cfwhjw0ly8j5d72xi00461w6yc2hlaijcd9";
- };
-
- buildInputs = [ps ncurses zlib perl openssl];
-
- configureFlags = "--enable-thread-safe-client --with-openssl=${openssl} --with-berkeley-db --with-embedded-server" +
- (if stdenv.system == "x86_64-linux" then " --with-lib-ccflags=-fPIC" else "");
-
- NIX_CFLAGS_COMPILE = if stdenv.system == "x86_64-linux" then "-fPIC" else "";
-
- NIX_CFLAGS_CXXFLAGS = if stdenv.system == "x86_64-linux" then "-fPIC" else "";
-
- NIX_LDFLAGS = stdenv.lib.optionalString stdenv.isLinux "-lgcc_s";
-
- postInstall =
- ''
- ln -s mysqld_safe $out/bin/mysqld
- rm -rf $out/mysql-test $out/sql-bench $out/share/info
- '';
-
- meta = {
- homepage = http://www.mysql.com/;
- description = "The world's most popular open source database";
- };
-}
diff --git a/pkgs/servers/sql/postgresql/8.4.x.nix b/pkgs/servers/sql/postgresql/8.4.x.nix
index c8597def61e9db793b93d3bf6111336cd253942b..a99d7536a8a2b782394dbbd18ec2fb2fc4212c0a 100644
--- a/pkgs/servers/sql/postgresql/8.4.x.nix
+++ b/pkgs/servers/sql/postgresql/8.4.x.nix
@@ -1,13 +1,13 @@
{ stdenv, fetchurl, zlib, ncurses, readline }:
-let version = "8.4.17"; in
+let version = "8.4.18"; in
stdenv.mkDerivation rec {
name = "postgresql-${version}";
src = fetchurl {
url = "mirror://postgresql/source/v${version}/${name}.tar.bz2";
- sha256 = "0dh4rn4q2amqjwmjjiya99bz1ph3lx45j5brnpwdjd9mxhs4r26w";
+ sha256 = "c08e5e93dac9d484019a07ff91db9f224350b90ef4be1543e33282cc20daf872";
};
buildInputs = [ zlib ncurses readline ];
diff --git a/pkgs/servers/sql/postgresql/9.0.x.nix b/pkgs/servers/sql/postgresql/9.0.x.nix
index ea25cf0d476c491c8269f46e423294bdd45ff387..3810eeba72c552eedf4ac32c37fc6e2a59940f53 100644
--- a/pkgs/servers/sql/postgresql/9.0.x.nix
+++ b/pkgs/servers/sql/postgresql/9.0.x.nix
@@ -1,13 +1,13 @@
{ stdenv, fetchurl, zlib, readline }:
-let version = "9.0.13"; in
+let version = "9.0.14"; in
stdenv.mkDerivation rec {
name = "postgresql-${version}";
src = fetchurl {
url = "mirror://postgresql/source/v${version}/${name}.tar.bz2";
- sha256 = "0xwrmwrx0pm21w3ifrqcmb8k2sa46w491ff3gqqfxynyk78a9bji";
+ sha256 = "de42b669cb891fc9b925406e71d1669ed5c856aae6d552ac6f14bf6dec0b79f1";
};
buildInputs = [ zlib readline ];
diff --git a/pkgs/servers/sql/postgresql/9.1.x.nix b/pkgs/servers/sql/postgresql/9.1.x.nix
index b9436cb4b0833914752197cd35dee7580557656a..65a969b4db0ed5d24148911f052a4d4dc72799ff 100644
--- a/pkgs/servers/sql/postgresql/9.1.x.nix
+++ b/pkgs/servers/sql/postgresql/9.1.x.nix
@@ -1,13 +1,13 @@
{ stdenv, fetchurl, zlib, readline }:
-let version = "9.1.9"; in
+let version = "9.1.10"; in
stdenv.mkDerivation rec {
name = "postgresql-${version}";
src = fetchurl {
url = "mirror://postgresql/source/v${version}/${name}.tar.bz2";
- sha256 = "1n1dc1kqc487dylc22iq1j8sn93jxbqm2g4b5rr0i4q0h7hk7998";
+ sha256 = "8329bcd160fcb76ee8c79676f6c979a94069ca5c108449fbb365e1ea98f92b77";
};
buildInputs = [ zlib readline ];
diff --git a/pkgs/servers/sql/postgresql/9.2.x.nix b/pkgs/servers/sql/postgresql/9.2.x.nix
index 46a6aa0c032c6c43a7f239492575f3d8225acd83..46b7e7ff3c5711c41baa395ed9fd1b729b44a451 100644
--- a/pkgs/servers/sql/postgresql/9.2.x.nix
+++ b/pkgs/servers/sql/postgresql/9.2.x.nix
@@ -1,13 +1,13 @@
{ stdenv, fetchurl, zlib, readline }:
-let version = "9.2.4"; in
+let version = "9.2.5"; in
stdenv.mkDerivation rec {
name = "postgresql-${version}";
src = fetchurl {
url = "mirror://postgresql/source/v${version}/${name}.tar.bz2";
- sha256 = "14xfzw3hb2fn60c438v3j7wa65jjm2pnmx4qb4i4ji4am0cdjzfr";
+ sha256 = "22c1edfd6a404bb15fba655863e94f09a10716ded1910a8bc98ee85f413007a4";
};
buildInputs = [ zlib readline ];
diff --git a/pkgs/servers/varnish/default.nix b/pkgs/servers/varnish/default.nix
index 528c03e3aa38ba1ced56ebdfc7867c16b47ecba2..8d0f3b306f2645882d5d484dea4fabdeac703992 100644
--- a/pkgs/servers/varnish/default.nix
+++ b/pkgs/servers/varnish/default.nix
@@ -12,7 +12,7 @@ stdenv.mkDerivation rec {
buildInputs = [ pcre libxslt groff ncurses pkgconfig ];
meta = {
- description = "Varnish Cache is a web application accelerator also known as a caching HTTP reverse proxy.";
+ description = "Web application accelerator also known as a caching HTTP reverse proxy";
homepage = "https://www.varnish-cache.org";
license = stdenv.lib.licenses.bsd2;
maintainers = [ stdenv.lib.maintainers.garbas ];
diff --git a/pkgs/servers/x11/xorg/overrides.nix b/pkgs/servers/x11/xorg/overrides.nix
index 099283afedd67c9b9b83dddf4f1a27ef36f56302..c8e20f1f0b994907c4ec93afd23d91484940c3b6 100644
--- a/pkgs/servers/x11/xorg/overrides.nix
+++ b/pkgs/servers/x11/xorg/overrides.nix
@@ -198,7 +198,11 @@ in
"--with-default-font-path= " # there were only paths containing "${prefix}",
# and there are no fonts in this package anyway
];
- patches = [./xorgserver-dri-path.patch ./xorgserver-xkbcomp-path.patch];
+ patches =
+ [ ./xorgserver-dri-path.patch
+ ./xorgserver-xkbcomp-path.patch
+ ./xorgserver-cve-2013-4396.patch
+ ];
buildInputs = attrs.buildInputs ++ [ xtrans ];
propagatedBuildInputs =
[ args.zlib args.udev args.mesa args.dbus.libs
diff --git a/pkgs/servers/x11/xorg/xorgserver-cve-2013-4396.patch b/pkgs/servers/x11/xorg/xorgserver-cve-2013-4396.patch
new file mode 100644
index 0000000000000000000000000000000000000000..4b6727e61c056654132fbd9eabf9ff16886066eb
--- /dev/null
+++ b/pkgs/servers/x11/xorg/xorgserver-cve-2013-4396.patch
@@ -0,0 +1,75 @@
+From 7bddc2ba16a2a15773c2ea8947059afa27727764 Mon Sep 17 00:00:00 2001
+From: Alan Coopersmith
+Date: Mon, 16 Sep 2013 21:47:16 -0700
+Subject: [PATCH] Avoid use-after-free in dix/dixfonts.c: doImageText()
+ [CVE-2013-4396]
+
+Save a pointer to the passed in closure structure before copying it
+and overwriting the *c pointer to point to our copy instead of the
+original. If we hit an error, once we free(c), reset c to point to
+the original structure before jumping to the cleanup code that
+references *c.
+
+Since one of the errors being checked for is whether the server was
+able to malloc(c->nChars * itemSize), the client can potentially pass
+a number of characters chosen to cause the malloc to fail and the
+error path to be taken, resulting in the read from freed memory.
+
+Since the memory is accessed almost immediately afterwards, and the
+X server is mostly single threaded, the odds of the free memory having
+invalid contents are low with most malloc implementations when not using
+memory debugging features, but some allocators will definitely overwrite
+the memory there, leading to a likely crash.
+
+Reported-by: Pedro Ribeiro
+Signed-off-by: Alan Coopersmith
+Reviewed-by: Julien Cristau
+---
+ dix/dixfonts.c | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/dix/dixfonts.c b/dix/dixfonts.c
+index feb765d..2e34d37 100644
+--- a/dix/dixfonts.c
++++ b/dix/dixfonts.c
+@@ -1425,6 +1425,7 @@ doImageText(ClientPtr client, ITclosurePtr c)
+ GC *pGC;
+ unsigned char *data;
+ ITclosurePtr new_closure;
++ ITclosurePtr old_closure;
+
+ /* We're putting the client to sleep. We need to
+ save some state. Similar problem to that handled
+@@ -1436,12 +1437,14 @@ doImageText(ClientPtr client, ITclosurePtr c)
+ err = BadAlloc;
+ goto bail;
+ }
++ old_closure = c;
+ *new_closure = *c;
+ c = new_closure;
+
+ data = malloc(c->nChars * itemSize);
+ if (!data) {
+ free(c);
++ c = old_closure;
+ err = BadAlloc;
+ goto bail;
+ }
+@@ -1452,6 +1455,7 @@ doImageText(ClientPtr client, ITclosurePtr c)
+ if (!pGC) {
+ free(c->data);
+ free(c);
++ c = old_closure;
+ err = BadAlloc;
+ goto bail;
+ }
+@@ -1464,6 +1468,7 @@ doImageText(ClientPtr client, ITclosurePtr c)
+ FreeScratchGC(pGC);
+ free(c->data);
+ free(c);
++ c = old_closure;
+ err = BadAlloc;
+ goto bail;
+ }
+--
+1.7.9.2
diff --git a/pkgs/stdenv/generic/default.nix b/pkgs/stdenv/generic/default.nix
index fe17af44c2c41d60342613cb4926c5630d44f6a0..3ae6f4bde4c0c58ab105427fc9627e701924eb92 100644
--- a/pkgs/stdenv/generic/default.nix
+++ b/pkgs/stdenv/generic/default.nix
@@ -14,7 +14,7 @@ else
let
- lib = import ../../lib;
+ lib = import ../../../lib;
allowUnfree = config.allowUnfree or true && builtins.getEnv "HYDRA_DISALLOW_UNFREE" != "1";
diff --git a/pkgs/tools/X11/autocutsel/default.nix b/pkgs/tools/X11/autocutsel/default.nix
index f4776933e53d07b0b34712676130110943e4737b..bc7679b1670e0a7caf7f55da7ebd1155b22e385e 100644
--- a/pkgs/tools/X11/autocutsel/default.nix
+++ b/pkgs/tools/X11/autocutsel/default.nix
@@ -19,7 +19,7 @@ stdenv.mkDerivation {
meta = {
homepage = "http://www.nongnu.org/autocutsel/";
- description = "Autocutsel tracks changes in the server's cutbuffer and CLIPBOARD selection.";
+ description = "Tracks changes in the server's cutbuffer and CLIPBOARD selection";
license = "GPLv2+";
platforms = with stdenv.lib.platforms; all;
};
diff --git a/pkgs/tools/X11/bgs/default.nix b/pkgs/tools/X11/bgs/default.nix
index a3fff2bc50b03bfddf4463810d4ad0448273306c..0c6951aa3e76e679f4d113bd3084ff3280770f8f 100644
--- a/pkgs/tools/X11/bgs/default.nix
+++ b/pkgs/tools/X11/bgs/default.nix
@@ -15,7 +15,7 @@ stdenv.mkDerivation rec {
preConfigure = ''sed -i "s@PREFIX = /usr/local@PREFIX = $out@g" config.mk'';
meta = {
- description = "bgs is an extremely fast and small background setter for X.";
+ description = "Extremely fast and small background setter for X";
license = "MIT";
platforms = with stdenv.lib.platforms; all;
maintainers = with stdenv.lib.maintainers; [pSub];
diff --git a/pkgs/tools/X11/keynav/default.nix b/pkgs/tools/X11/keynav/default.nix
index 19de62990e2c9af6262232e1488b05af81b33041..02b6321d18c82005ccb8cc11accc36645d9320f3 100644
--- a/pkgs/tools/X11/keynav/default.nix
+++ b/pkgs/tools/X11/keynav/default.nix
@@ -20,6 +20,6 @@ stdenv.mkDerivation rec {
'';
meta = {
- description = "A tool to generate X11 mouse clicks from keyboard.";
+ description = "Generate X11 mouse clicks from keyboard";
};
}
diff --git a/pkgs/tools/X11/winswitch/default.nix b/pkgs/tools/X11/winswitch/default.nix
index b53db509dafeb27e38006f27b365a8bd524d0976..bd160940b5737dbac0d6059e23e32e0b67534be2 100644
--- a/pkgs/tools/X11/winswitch/default.nix
+++ b/pkgs/tools/X11/winswitch/default.nix
@@ -38,6 +38,8 @@ let
'';
doCheck = false;
+
+ meta.platforms = stdenv.lib.platforms.mesaPlatforms;
};
in stdenv.lib.overrideDerivation base (b: {
postFixup = b.postFixup + ''
diff --git a/pkgs/tools/X11/x2x/default.nix b/pkgs/tools/X11/x2x/default.nix
index 5d68e1da1ba9c7a205c7d2ea4e934df2bbb03107..237ea614059994a47eb30595e64deb89ebd9af37 100644
--- a/pkgs/tools/X11/x2x/default.nix
+++ b/pkgs/tools/X11/x2x/default.nix
@@ -23,7 +23,7 @@ stdenv.mkDerivation {
'';
meta = {
- description = "x2x allows the keyboard, mouse on one X display to be used to control another X display.";
+ description = "Allows the keyboard, mouse on one X display to be used to control another X display";
homepage = http://x2x.dottedmag.net;
license = "BSD";
};
diff --git a/pkgs/tools/X11/xpra/default.nix b/pkgs/tools/X11/xpra/default.nix
index 71c5d5f3a44eea1fe7177b0cf4ebc5944677bec8..b8995430f92a43735de7e5b5f39cf447f310b848 100644
--- a/pkgs/tools/X11/xpra/default.nix
+++ b/pkgs/tools/X11/xpra/default.nix
@@ -40,5 +40,6 @@ buildPythonPackage rec {
meta = {
homepage = http://xpra.org/;
description = "Persistent remote applications for X";
+ platforms = stdenv.lib.platforms.mesaPlatforms;
};
}
diff --git a/pkgs/tools/admin/analog/default.nix b/pkgs/tools/admin/analog/default.nix
index debd6e4c2b77927872a22256d2dd61891363b6f3..ec139e7240d3afaed5b81ae2812b9ade6dc26278 100644
--- a/pkgs/tools/admin/analog/default.nix
+++ b/pkgs/tools/admin/analog/default.nix
@@ -30,7 +30,7 @@ stdenv.mkDerivation {
meta = {
homepage = "http://www.analog.cx/";
license = "GPL";
- description = "a powerful tool to generate web server statistics";
+ description = "Powerful tool to generate web server statistics";
maintainers = [ stdenv.lib.maintainers.simons ];
platforms = stdenv.lib.platforms.linux;
};
diff --git a/pkgs/tools/backup/httrack/default.nix b/pkgs/tools/backup/httrack/default.nix
index ecdf40be0a5a96e314b1d81bc7457ad6d699acad..c02a16d821ac953077ef547d9f529d7df24e1c63 100644
--- a/pkgs/tools/backup/httrack/default.nix
+++ b/pkgs/tools/backup/httrack/default.nix
@@ -13,7 +13,7 @@ stdenv.mkDerivation rec {
meta = {
homepage = "http://www.httrack.com";
- description = "HTTrack is a free (GPL, libre/free software) and easy-to-use offline browser utility.";
+ description = "Easy-to-use offline browser utility";
license = "GPL";
};
}
diff --git a/pkgs/tools/backup/obnam/default.nix b/pkgs/tools/backup/obnam/default.nix
index 69927e01582798a64dd6d992a878e2bea120de33..6d550e95a9df616e7cb5a04e87060aeaf59a3020 100644
--- a/pkgs/tools/backup/obnam/default.nix
+++ b/pkgs/tools/backup/obnam/default.nix
@@ -18,7 +18,7 @@ pythonPackages.buildPythonPackage rec {
meta = {
homepage = http://liw.fi/obnam/;
- description = "A backup program supporting deduplication, compression and encryption.";
+ description = "Backup program supporting deduplication, compression and encryption";
maintainers = [ stdenv.lib.maintainers.rickynils ];
platforms = stdenv.lib.platforms.linux;
};
diff --git a/pkgs/tools/backup/rsnapshot/default.nix b/pkgs/tools/backup/rsnapshot/default.nix
index 3da2fad21f29cc75ec8a5f44d921b81d6a54ded2..9b147d68230f75a2fa0041c2abba7cfd24c3276f 100644
--- a/pkgs/tools/backup/rsnapshot/default.nix
+++ b/pkgs/tools/backup/rsnapshot/default.nix
@@ -1,10 +1,25 @@
-{fetchurl, stdenv, perl, openssh, rsync, logger}:
+{ fetchurl, stdenv, writeText, perl, openssh, rsync, logger,
+ configFile ? "/etc/rsnapshot.conf" }:
+let patch = writeText "rsnapshot-config.patch" ''
+--- rsnapshot-program.pl 2013-10-05 20:31:08.715991442 +0200
++++ rsnapshot-program.pl 2013-10-05 20:31:42.496193633 +0200
+@@ -383,7 +383,7 @@
+ }
+
+ # set global variable
+- $config_file = $default_config_file;
++ $config_file = '${configFile}';
+ }
+
+ # accepts no args
+'';
+in
stdenv.mkDerivation rec {
- name = "rsnapshot-1.3.0";
+ name = "rsnapshot-1.3.1";
src = fetchurl {
url = "mirror://sourceforge/rsnapshot/${name}.tar.gz";
- sha256 = "19p35ycm73a8vd4ccjpah18h5jagvcr11rqca6ya87sg8k0a5h9z";
+ sha256 = "0pn7vlg3yxl7xrvfwmp4zlrg3cckmlldq6qr5bs3b2b281zcgdll";
};
propagatedBuildInputs = [perl openssh rsync logger];
@@ -12,6 +27,7 @@ stdenv.mkDerivation rec {
patchPhase = ''
substituteInPlace "Makefile.in" --replace \
"/usr/bin/pod2man" "${perl}/bin/pod2man"
+ patch -p0 <${patch}
'';
meta = {
diff --git a/pkgs/tools/compression/gzrt/default.nix b/pkgs/tools/compression/gzrt/default.nix
new file mode 100644
index 0000000000000000000000000000000000000000..44073f84a5d8058bff81cf058d216b37a98f448b
--- /dev/null
+++ b/pkgs/tools/compression/gzrt/default.nix
@@ -0,0 +1,23 @@
+{ stdenv, fetchurl, zlib }:
+
+stdenv.mkDerivation rec {
+ name = "gzrt-0.8";
+
+ src = fetchurl {
+ url = "http://www.urbanophile.com/arenn/coding/gzrt/${name}.tar.gz";
+ sha256 = "1vhzazj47xfpbfhzkwalz27cc0n5gazddmj3kynhk0yxv99xrdxh";
+ };
+
+ buildInputs = [ zlib ];
+
+ installPhase = ''
+ mkdir -p $out/bin
+ cp gzrecover $out/bin
+ '';
+
+ meta = {
+ homepage = http://www.urbanophile.com/arenn/hacking/gzrt/;
+ description = "The gzip Recovery Toolkit";
+ license = stdenv.lib.licenses.gpl3;
+ };
+}
diff --git a/pkgs/tools/filesystems/archivemount/default.nix b/pkgs/tools/filesystems/archivemount/default.nix
index c05d2e98af32f04012764997f62591ca53c2c822..8c7593121bbea722c75a69867615b5e32557a96c 100644
--- a/pkgs/tools/filesystems/archivemount/default.nix
+++ b/pkgs/tools/filesystems/archivemount/default.nix
@@ -14,7 +14,7 @@ stdenv.mkDerivation {
buildInputs = [ pkgconfig fuse libarchive ];
meta = {
- description = "Gateway between FUSE and libarchive: allows mounting of cpio, .tar.gz, .tar.bz2 archives.";
+ description = "Gateway between FUSE and libarchive: allows mounting of cpio, .tar.gz, .tar.bz2 archives";
license = "GPL2";
platforms = stdenv.lib.platforms.linux;
diff --git a/pkgs/tools/filesystems/nixpart/default.nix b/pkgs/tools/filesystems/nixpart/default.nix
index 2cd40bb086755cb21fd317d41f5ad265fbb707d7..633f04320c370b2d61df3db863afe36e786c4e70 100644
--- a/pkgs/tools/filesystems/nixpart/default.nix
+++ b/pkgs/tools/filesystems/nixpart/default.nix
@@ -24,5 +24,6 @@ in buildPythonPackage rec {
description = "NixOS storage manager/partitioner";
license = stdenv.lib.licenses.gpl2Plus;
maintainers = [ stdenv.lib.maintainers.aszlig ];
+ platforms = stdenv.lib.platforms.linux;
};
}
diff --git a/pkgs/tools/graphics/argyllcms/default.nix b/pkgs/tools/graphics/argyllcms/default.nix
index 934a27ef25b76153d5e15018efeacefc2d3d939d..d9eed4df224a3813a510babccd5656c4b25c34c7 100644
--- a/pkgs/tools/graphics/argyllcms/default.nix
+++ b/pkgs/tools/graphics/argyllcms/default.nix
@@ -77,7 +77,7 @@ stdenv.mkDerivation rec {
meta = with stdenv.lib; {
homepage = http://www.argyllcms.com;
- description = "An ICC compatible color management system";
+ description = "Color management system (compatible with ICC)";
license = licenses.gpl3;
maintainers = [ maintainers.rickynils ];
platforms = platforms.linux;
diff --git a/pkgs/tools/graphics/asymptote/default.nix b/pkgs/tools/graphics/asymptote/default.nix
index e32a3901a92be28caaf6bb37e8dd97499d1a3c18..e9f61228bedb95273f8d486625690f47e7400508 100644
--- a/pkgs/tools/graphics/asymptote/default.nix
+++ b/pkgs/tools/graphics/asymptote/default.nix
@@ -11,11 +11,11 @@ let
s = # Generated upstream information
rec {
baseName="asymptote";
- version="2.21";
- name="asymptote-2.21";
- hash="07lkj0xnxpanfscmbm30lw6j9484rlmmqpnl0mhs7nx9h2lczrjz";
- url="mirror://sourceforge/project/asymptote/2.21/asymptote-2.21.src.tgz";
- sha256="07lkj0xnxpanfscmbm30lw6j9484rlmmqpnl0mhs7nx9h2lczrjz";
+ version="2.24";
+ name="asymptote-2.24";
+ hash="0iypv3n89h8mx46b0c3msl0ldmg7fxf8v9fl4zy4sxfszazrvivl";
+ url="mirror://sourceforge/project/asymptote/2.24/asymptote-2.24.src.tgz";
+ sha256="0iypv3n89h8mx46b0c3msl0ldmg7fxf8v9fl4zy4sxfszazrvivl";
};
buildInputs = with a; [
freeglut ghostscriptX imagemagick fftw boehmgc
diff --git a/pkgs/tools/graphics/dmtx/default.nix b/pkgs/tools/graphics/dmtx/default.nix
index 29c6b5ebf795d1bd43b5e2b6334899798cfa213d..74b1a2bf4edff54f48221273d5531a2a14029fc0 100644
--- a/pkgs/tools/graphics/dmtx/default.nix
+++ b/pkgs/tools/graphics/dmtx/default.nix
@@ -24,7 +24,7 @@ rec {
name = "dmtx-" + version;
meta = {
- description = "DataMatrix (2D bar code) processing tools.";
+ description = "DataMatrix (2D bar code) processing tools";
maintainers = [args.lib.maintainers.raskin];
platforms = args.lib.platforms.linux;
};
diff --git a/pkgs/tools/misc/autojump/default.nix b/pkgs/tools/misc/autojump/default.nix
index 5371ac55adba83cd5b92b10ed92075f3f78fdec7..a92b4ae3b1bbdf3c46ce164d04f733f55c3a12d0 100644
--- a/pkgs/tools/misc/autojump/default.nix
+++ b/pkgs/tools/misc/autojump/default.nix
@@ -29,7 +29,7 @@ in
'';
meta = {
- description = "Autojump, a `cd' command that learns";
+ description = "A `cd' command that learns";
longDescription = ''
One of the most used shell commands is “cd”. A quick survey
among my friends revealed that between 10 and 20% of all
diff --git a/pkgs/tools/misc/autorandr/default.nix b/pkgs/tools/misc/autorandr/default.nix
new file mode 100644
index 0000000000000000000000000000000000000000..2c7505260a6941d3fe0f0ca32b6312b48a3c776d
--- /dev/null
+++ b/pkgs/tools/misc/autorandr/default.nix
@@ -0,0 +1,40 @@
+{ fetchgit
+, stdenv
+, enableXRandr ? true, xrandr ? null
+, enableDisper ? false, disper ? null
+, xdpyinfo }:
+
+assert enableXRandr -> xrandr != null;
+assert enableDisper -> disper != null;
+
+let
+ rev = "4f5e2401ef";
+in
+ stdenv.mkDerivation {
+ name = "autorandr-${rev}";
+
+ src = fetchgit {
+ inherit rev;
+ url = "https://github.com/wertarbyte/autorandr.git";
+ };
+
+ patchPhase = ''
+ substituteInPlace "autorandr" \
+ --replace "/usr/bin/xrandr" "${if enableXRandr then xrandr else "/nowhere"}/bin/xrandr" \
+ --replace "/usr/bin/disper" "${if enableDisper then disper else "/nowhere"}/bin/disper" \
+ --replace "/usr/bin/xdpyinfo" "${xdpyinfo}/bin/xdpyinfo"
+ '';
+
+ installPhase = ''
+ mkdir -p "$out/etc/bash_completion.d"
+ cp -v bash_completion/autorandr "$out/etc/bash_completion.d"
+ mkdir -p "$out/bin"
+ cp -v autorandr auto-disper $out/bin
+ '';
+
+ meta = {
+ description = "Automatic display configuration selector based on connected devices";
+ homepage = https://github.com/wertarbyte/autorandr;
+ maintainer = [ stdenv.lib.maintainers.coroa ];
+ };
+ }
diff --git a/pkgs/tools/misc/byobu/default.nix b/pkgs/tools/misc/byobu/default.nix
index 6766e0bb474ff5dce663a0484806e5de71e900c6..03b3719c9f0ab5e45adc11d486b1cc077ba70b64 100644
--- a/pkgs/tools/misc/byobu/default.nix
+++ b/pkgs/tools/misc/byobu/default.nix
@@ -12,7 +12,7 @@ stdenv.mkDerivation rec {
meta = {
homepage = https://launchpad.net/byobu/;
- description = "Byobu is a GPLv3 open source text-based window manager and terminal multiplexer.";
+ description = "Text-based window manager and terminal multiplexer";
longDescription =
''Byobu is a GPLv3 open source text-based window manager and terminal multiplexer.
diff --git a/pkgs/tools/misc/detox/default.nix b/pkgs/tools/misc/detox/default.nix
index ade13382033cab5a7eb9ab10b798dfc5bf040e07..435115ffc596f897888294e6d083cac8f77d3e1e 100644
--- a/pkgs/tools/misc/detox/default.nix
+++ b/pkgs/tools/misc/detox/default.nix
@@ -11,7 +11,7 @@ stdenv.mkDerivation {
buildInputs = [flex];
meta = {
- description = "Detox is a utility designed to clean up filenames.";
+ description = "Utility designed to clean up filenames";
longDescription = ''
Detox is a utility designed to clean up filenames. It replaces
difficult to work with characters, such as spaces, with standard
diff --git a/pkgs/tools/misc/disper/default.nix b/pkgs/tools/misc/disper/default.nix
index cc11427f65aaeaa4dd47b05f890cecb2d53fd60d..b4a159745d46f33afac06f3980ffa25f14021205 100644
--- a/pkgs/tools/misc/disper/default.nix
+++ b/pkgs/tools/misc/disper/default.nix
@@ -15,7 +15,7 @@ stdenv.mkDerivation rec {
};
meta = {
- description = "Disper is an on-the-fly display switch utility.";
+ description = "On-the-fly display switch utility";
homepage = http://willem.engen.nl/projects/disper/;
};
diff --git a/pkgs/tools/misc/fdupes/default.nix b/pkgs/tools/misc/fdupes/default.nix
index 2de9efdac58a43d4151599b3762384f211505c05..14e6a2f6681f5c7d8dd37e085c9c48766a57c04f 100644
--- a/pkgs/tools/misc/fdupes/default.nix
+++ b/pkgs/tools/misc/fdupes/default.nix
@@ -13,7 +13,7 @@ stdenv.mkDerivation {
makeFlags = "PREFIX=\${out}";
meta = {
- description = "identifies duplicate files residing within specified directories.";
+ description = "Identifies duplicate files residing within specified directories";
longDescription = ''
FDUPES uses md5sums and then a byte by byte comparison to finde duplicate
files within a set of directories.
diff --git a/pkgs/tools/misc/gnuvd/default.nix b/pkgs/tools/misc/gnuvd/default.nix
index 6436a14047ab3897496dfe485fdbce4e56e7aae8..122694af456744b7ba89ac66a5eacab38b5ab2c6 100644
--- a/pkgs/tools/misc/gnuvd/default.nix
+++ b/pkgs/tools/misc/gnuvd/default.nix
@@ -9,7 +9,7 @@ stdenv.mkDerivation {
};
meta = {
- description = "gnuvd is a command-line dutch dictionary application.";
+ description = "Command-line dutch dictionary application";
homepage = http://www.djcbsoftware.nl/code/gnuvd/;
};
}
diff --git a/pkgs/tools/misc/grc/default.nix b/pkgs/tools/misc/grc/default.nix
index ea54ab4a543d592769592f3d89620659cc1709fc..cd3ea6eda6f0babe50cfd0bc31143f0c2140c31b 100644
--- a/pkgs/tools/misc/grc/default.nix
+++ b/pkgs/tools/misc/grc/default.nix
@@ -17,7 +17,7 @@ stdenv.mkDerivation rec {
'';
meta = with stdenv.lib; {
- description = "Yet another colouriser for beautifying your logfiles or output of commands.";
+ description = "Yet another colouriser for beautifying your logfiles or output of commands";
homepage = http://korpus.juls.savba.sk/~garabik/software/grc.html;
license = licenses.gpl2;
maintainers = with maintainers; [ lovek323 ];
diff --git a/pkgs/tools/misc/gsmartcontrol/default.nix b/pkgs/tools/misc/gsmartcontrol/default.nix
index abbd8f20fd08d93154b0c2b2d1a65e79e8ec2603..6cb528cca1ddf77bd6758e1210c251d1594fd0d0 100644
--- a/pkgs/tools/misc/gsmartcontrol/default.nix
+++ b/pkgs/tools/misc/gsmartcontrol/default.nix
@@ -14,7 +14,16 @@ stdenv.mkDerivation rec {
#installTargets = "install datainstall";
meta = {
- description = "GSmartControl is a graphical user interface for smartctl (from smartmontools package), which is a tool for querying and controlling SMART (Self-Monitoring, Analysis, and Reporting Technology) data on modern hard disk drives.";
+ description = "Hard disk drive health inspection tool";
+ longDescription = ''
+ GSmartControl is a graphical user interface for smartctl (from
+ smartmontools package), which is a tool for querying and controlling
+ SMART (Self-Monitoring, Analysis, and Reporting Technology) data on
+ modern hard disk drives.
+
+ It allows you to inspect the drive's SMART data to determine its health,
+ as well as run various tests on it.
+ '';
homepage = http://gsmartcontrol.berlios.de;
license = "GPLv2+";
maintainers = with stdenv.lib.maintainers; [qknight];
diff --git a/pkgs/tools/misc/gummiboot/default.nix b/pkgs/tools/misc/gummiboot/default.nix
index cf2fe713461f1b2a4dd2851221796e25a424f477..1098e9d0920795947a316ce1cab6dfe2d329fcd4 100644
--- a/pkgs/tools/misc/gummiboot/default.nix
+++ b/pkgs/tools/misc/gummiboot/default.nix
@@ -1,19 +1,20 @@
-{ stdenv, fetchurl, gnu_efi, unzip, pkgconfig, utillinux, libxslt, docbook_xsl, docbook_xml_dtd_42 }:
+{ stdenv, fetchurl, gnu-efi, unzip, pkgconfig, utillinux, libxslt, docbook_xsl, docbook_xml_dtd_42 }:
stdenv.mkDerivation rec {
- name = "gummiboot-23";
+ name = "gummiboot-38";
- buildInputs = [ unzip pkgconfig utillinux libxslt docbook_xsl docbook_xml_dtd_42 ];
+ buildInputs = [ gnu-efi pkgconfig libxslt utillinux ];
- patches = [ ./no-usr.patch ];
-
- buildFlags = [ "GNU_EFI=${gnu_efi}" ];
-
- makeFlags = [ "PREFIX=$(out)" ];
+ # Sigh, gummiboot should be able to find this in buildInputs
+ configureFlags = [
+ "--with-efi-includedir=${gnu-efi}/include"
+ "--with-efi-libdir=${gnu-efi}/lib"
+ "--with-efi-ldsdir=${gnu-efi}/lib"
+ ];
src = fetchurl {
- url = "http://cgit.freedesktop.org/gummiboot/snapshot/${name}.zip";
- sha256 = "1lmfk4k52ha00ppna5g7h51vhd27i9fipf5k7mc2d9jkm2480z4j";
+ url = http://pkgs.fedoraproject.org/repo/pkgs/gummiboot/gummiboot-38.tar.xz/0504791387e1998bf2075728c237f27e/gummiboot-38.tar.xz;
+ sha256 = "1aid2a29ym8dqldxpcihnrls7vrr9ijbla3dad0r8qwkca43d4lm";
};
meta = {
diff --git a/pkgs/tools/misc/gummiboot/no-usr.patch b/pkgs/tools/misc/gummiboot/no-usr.patch
deleted file mode 100644
index db90689474076f9845e6bf8ad9ea36802a258464..0000000000000000000000000000000000000000
--- a/pkgs/tools/misc/gummiboot/no-usr.patch
+++ /dev/null
@@ -1,79 +0,0 @@
-diff -Naur gummiboot-23-orig/Makefile gummiboot-23/Makefile
---- gummiboot-23-orig/Makefile 2013-02-20 00:55:44.000000000 -0500
-+++ gummiboot-23/Makefile 2013-02-21 12:00:35.783637645 -0500
-@@ -10,7 +10,8 @@
- export E Q
-
- ARCH=$(shell $(CC) -dumpmachine | sed "s/\(-\).*$$//")
--LIBDIR=$(shell echo $$(cd /usr/lib/$$(gcc -print-multi-os-directory); pwd))
-+PREFIX=/usr
-+LIBDIR=$(GNU_EFI)/lib
- LIBEFIDIR=$(or $(wildcard $(LIBDIR)/gnuefi), $(LIBDIR))
-
- ifeq ($(ARCH),i686)
-@@ -25,13 +26,13 @@
- -mno-red-zone
- endif
-
--all: gummiboot$(MACHINE_TYPE_NAME).efi gummiboot
-+all: gummiboot$(MACHINE_TYPE_NAME).efi gummiboot man
-
- # ------------------------------------------------------------------------------
- CPPFLAGS = \
- -I. \
-- -I/usr/include/efi \
-- -I/usr/include/efi/$(ARCH)
-+ -I$(GNU_EFI)/include/efi \
-+ -I$(GNU_EFI)/include/efi/$(ARCH)
-
- CFLAGS = \
- -DVERSION=$(VERSION) \
-@@ -82,6 +83,7 @@
- `pkg-config --cflags --libs blkid` \
- src/setup/setup.c \
- src/setup/efivars.c \
-+ -DPREFIX=\"$(PREFIX)\" \
- -o $@
-
- # ------------------------------------------------------------------------------
-@@ -101,11 +103,11 @@
- rm -f src/efi/gummiboot.o src/efi/gummiboot.so gummiboot gummiboot$(MACHINE_TYPE_NAME).efi
-
- install: all
-- mkdir -p $(DESTDIR)/usr/bin/
-- cp gummiboot $(DESTDIR)/usr/bin
-- mkdir -p $(DESTDIR)/usr/lib/gummiboot/
-- cp gummiboot$(MACHINE_TYPE_NAME).efi $(DESTDIR)/usr/lib/gummiboot/
-- [ -e gummiboot.1 ] && mkdir -p $(DESTDIR)/usr/share/man/man1/ && cp gummiboot.1 $(DESTDIR)/usr/share/man/man1/ || :
-+ mkdir -p $(DESTDIR)$(PREFIX)/bin/
-+ cp gummiboot $(DESTDIR)$(PREFIX)/bin
-+ mkdir -p $(DESTDIR)$(PREFIX)/lib/gummiboot/
-+ cp gummiboot$(MACHINE_TYPE_NAME).efi $(DESTDIR)$(PREFIX)/lib/gummiboot/
-+ [ -e gummiboot.1 ] && mkdir -p $(DESTDIR)$(PREFIX)/share/man/man1/ && cp gummiboot.1 $(DESTDIR)$(PREFIX)/share/man/man1/ || :
-
- tar:
- git archive --format=tar --prefix=gummiboot-$(VERSION)/ $(VERSION) | xz > gummiboot-$(VERSION).tar.xz
-diff -Naur gummiboot-23-orig/src/setup/setup.c gummiboot-23/src/setup/setup.c
---- gummiboot-23-orig/src/setup/setup.c 2013-02-20 00:55:44.000000000 -0500
-+++ gummiboot-23/src/setup/setup.c 2013-02-21 11:57:43.295324700 -0500
-@@ -736,7 +736,7 @@
- char *p = NULL, *q = NULL, *v = NULL;
- int r;
-
-- if (asprintf(&p, "/usr/lib/gummiboot/%s", name) < 0) {
-+ if (asprintf(&p, PREFIX "/lib/gummiboot/%s", name) < 0) {
- fprintf(stderr, "Out of memory.\n");
- r = -ENOMEM;
- goto finish;
-@@ -791,9 +791,9 @@
- return r;
- }
-
-- d = opendir("/usr/lib/gummiboot");
-+ d = opendir(PREFIX "/lib/gummiboot");
- if (!d) {
-- fprintf(stderr, "Failed to open /usr/lib/gummiboot: %m\n");
-+ fprintf(stderr, "Failed to open " PREFIX "/lib/gummiboot: %m\n");
- return -errno;
- }
-
diff --git a/pkgs/tools/misc/hdf5/default.nix b/pkgs/tools/misc/hdf5/default.nix
index 0aacf744b1ab3d3e2d431659b6bf0c862fd3d511..01820aaf77807fb051f9ef92cec9539de6fe6cc1 100644
--- a/pkgs/tools/misc/hdf5/default.nix
+++ b/pkgs/tools/misc/hdf5/default.nix
@@ -13,9 +13,9 @@ stdenv.mkDerivation {
patches = [./bin-mv.patch];
meta = {
- description = "HDF5 is a data model, library, and file format for storing and managing data.";
+ description = "Data model, library, and file format for storing and managing data";
longDescription = ''
- It supports an unlimited variety of datatypes, and is designed for flexible and efficient
+ HDF5 supports an unlimited variety of datatypes, and is designed for flexible and efficient
I/O and for high volume and complex data. HDF5 is portable and is extensible, allowing
applications to evolve in their use of HDF5. The HDF5 Technology suite includes tools and
applications for managing, manipulating, viewing, and analyzing data in the HDF5 format.
diff --git a/pkgs/tools/misc/mcrypt/default.nix b/pkgs/tools/misc/mcrypt/default.nix
index 7701f0e205906142b098ea15dd9f41911345f9c1..761b2c5bdbfbd35bb8d1737670191e0594b19b3e 100644
--- a/pkgs/tools/misc/mcrypt/default.nix
+++ b/pkgs/tools/misc/mcrypt/default.nix
@@ -12,7 +12,12 @@ stdenv.mkDerivation rec {
buildInputs = [libmcrypt libmhash];
meta = {
- description = "mcrypt, and the accompanying libmcrypt, are intended to be replacements for the old Unix crypt, except that they are under the GPL and support an ever-wider range of algorithms and modes.";
+ description = "Replacement for old UNIX crypt(1)";
+ longDescription = ''
+ mcrypt, and the accompanying libmcrypt, are intended to be replacements
+ for the old Unix crypt, except that they are under the GPL and support an
+ ever-wider range of algorithms and modes.
+ '';
homepage = http://mcrypt.sourceforge.net;
license = "GPLv2";
platforms = stdenv.lib.platforms.all;
diff --git a/pkgs/tools/misc/ncdu/default.nix b/pkgs/tools/misc/ncdu/default.nix
index 2d3a67db8c55cf08d927c59975ce702e9051774e..47b96023ce0f13b781a56b1d7d6861c5d0473558 100644
--- a/pkgs/tools/misc/ncdu/default.nix
+++ b/pkgs/tools/misc/ncdu/default.nix
@@ -12,7 +12,7 @@ stdenv.mkDerivation rec {
buildInputs = [ ncurses ];
meta = {
- description = "An ncurses disk usage analyzer.";
+ description = "Ncurses disk usage analyzer";
homepage = http://dev.yorhel.nl/ncdu;
license = stdenv.lib.licenses.mit;
platforms = stdenv.lib.platforms.all;
diff --git a/pkgs/tools/misc/plantuml/default.nix b/pkgs/tools/misc/plantuml/default.nix
new file mode 100644
index 0000000000000000000000000000000000000000..10886e969a2c305c75f2e00eb7d23da968b0669d
--- /dev/null
+++ b/pkgs/tools/misc/plantuml/default.nix
@@ -0,0 +1,37 @@
+{ stdenv, fetchurl, jre, graphviz }:
+
+stdenv.mkDerivation rec {
+ version = "7982";
+ name = "plantuml-${version}";
+
+ src = fetchurl {
+ url = "mirror://sourceforge/project/plantuml/plantuml.${version}.jar";
+ sha256 = "0hxs0whjgx36j5azdcna40rw2c7smhg0qm3kzld9vx88m0c51dgl";
+ };
+
+ # It's only a .jar file and a shell wrapper
+ phases = [ "installPhase" ];
+
+ installPhase = ''
+ mkdir -p "$out/bin"
+ mkdir -p "$out/lib"
+
+ cp "$src" "$out/lib/plantuml.jar"
+
+ cat > "$out/bin/plantuml" << EOF
+ #!${stdenv.shell}
+ export GRAPHVIZ_DOT="${graphviz}/bin/dot"
+ exec "${jre}/bin/java" -jar "$out/lib/plantuml.jar" "\$@"
+ EOF
+ chmod a+x "$out/bin/plantuml"
+ '';
+
+ meta = with stdenv.lib; {
+ description = "Draw UML diagrams using a simple and human readable text description";
+ homepage = http://plantuml.sourceforge.net/;
+ # "java -jar plantuml.jar -license" says GPLv3 or later
+ license = licenses.gpl3Plus;
+ maintainers = [ maintainers.bjornfor ];
+ platforms = platforms.linux;
+ };
+}
diff --git a/pkgs/tools/misc/ponysay/default.nix b/pkgs/tools/misc/ponysay/default.nix
index 17be93dda8f7eb79939d519de59ff3ae6cb17400..1da0d70a14fac7cc1dc784e91b3dfaab03332d5c 100644
--- a/pkgs/tools/misc/ponysay/default.nix
+++ b/pkgs/tools/misc/ponysay/default.nix
@@ -25,7 +25,7 @@ stdenv.mkDerivation rec {
'';
meta = {
- description = "cowsay reimplemention for ponies.";
+ description = "Cowsay reimplemention for ponies";
homepage = http://terse.tk/ponysay/;
license = "GPLv3";
maintainers = with stdenv.lib.maintainers; [ bodil ];
diff --git a/pkgs/tools/misc/pv/default.nix b/pkgs/tools/misc/pv/default.nix
index 444408fec41d78c76904fb5329f0912287918e48..bf0c44de14192401e76c19feddc27bb8c3ab54d3 100644
--- a/pkgs/tools/misc/pv/default.nix
+++ b/pkgs/tools/misc/pv/default.nix
@@ -1,11 +1,11 @@
{ stdenv, fetchurl } :
stdenv.mkDerivation rec {
- name = "pv-1.3.4";
+ name = "pv-1.4.12";
src = fetchurl {
url = "http://www.ivarch.com/programs/sources/${name}.tar.bz2";
- sha256 = "114b730pghgg4gv9d798817n3am88p2b0xgdavch1vhklzh33c16";
+ sha256 = "0hnpv4l5kidfwxzba7ibm9wjs71ing9gzx0m80bgr3ia8k4s8nka";
};
meta = {
diff --git a/pkgs/tools/misc/refind/default.nix b/pkgs/tools/misc/refind/default.nix
index 1fbb177afa06cce49d6db4d8d74cf07fe88eb309..6f4e031e44191779e48b5c6da0bf1aa88389077f 100644
--- a/pkgs/tools/misc/refind/default.nix
+++ b/pkgs/tools/misc/refind/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, gnu_efi, unzip }:
+{ stdenv, fetchurl, gnu-efi, unzip }:
let version = "0.4.5"; in
@@ -12,7 +12,7 @@ stdenv.mkDerivation {
buildInputs = [ unzip ];
- buildFlags = [ "prefix=" "EFIINC=${gnu_efi}/include/efi" "GNUEFILIB=${gnu_efi}/lib" "EFILIB=${gnu_efi}/lib" "EFICRT0=${gnu_efi}/lib" "LOCAL_CFLAGS=-I${gnu_efi}/include" ];
+ buildFlags = [ "prefix=" "EFIINC=${gnu-efi}/include/efi" "GNUEFILIB=${gnu-efi}/lib" "EFILIB=${gnu-efi}/lib" "EFICRT0=${gnu-efi}/lib" "LOCAL_CFLAGS=-I${gnu-efi}/include" ];
installPhase = ''
mkdir -pv $out
diff --git a/pkgs/tools/misc/ttmkfdir/default.nix b/pkgs/tools/misc/ttmkfdir/default.nix
index 3f05d600944bc243ecc5b5258b1463f27f495837..12adb5318a89408a0f1a8e55e07ab7abf57ba9c6 100644
--- a/pkgs/tools/misc/ttmkfdir/default.nix
+++ b/pkgs/tools/misc/ttmkfdir/default.nix
@@ -26,6 +26,6 @@ stdenv.mkDerivation {
buildInputs = [freetype fontconfig libunwind libtool flex bison];
meta = {
- description = "Create fonts.dir for TTF font directory.";
+ description = "Create fonts.dir for TTF font directory";
};
}
diff --git a/pkgs/tools/misc/unclutter/default.nix b/pkgs/tools/misc/unclutter/default.nix
index b267074e77faa676545c8197306ae129315fa50f..542530532de064c8d69ec32117a4ed829b03f1e9 100644
--- a/pkgs/tools/misc/unclutter/default.nix
+++ b/pkgs/tools/misc/unclutter/default.nix
@@ -17,7 +17,7 @@ stdenv.mkDerivation {
'';
meta = with stdenv.lib; {
- description = "Hides mouse pointer while not in use.";
+ description = "Hides mouse pointer while not in use";
longDescription = ''
Unclutter hides your X mouse cursor when you do not need it, to prevent
it from getting in the way. You have only to move the mouse to restore
diff --git a/pkgs/tools/misc/units/default.nix b/pkgs/tools/misc/units/default.nix
index d4cd07aa4c6f6792a9e32dac1668d1c7c55073f9..c609d2275dad374d3c3ef39041d0694101e522ad 100644
--- a/pkgs/tools/misc/units/default.nix
+++ b/pkgs/tools/misc/units/default.nix
@@ -8,6 +8,6 @@ stdenv.mkDerivation {
};
meta = {
- description = "Unit conversion tool.";
+ description = "Unit conversion tool";
};
}
diff --git a/pkgs/tools/misc/venus/default.nix b/pkgs/tools/misc/venus/default.nix
index b4f9732dec6cfe2209abbb4093d1f3cd73366cd2..b7f2be179c4780aa37bc170d54fc6f75ac516ede 100644
--- a/pkgs/tools/misc/venus/default.nix
+++ b/pkgs/tools/misc/venus/default.nix
@@ -41,7 +41,12 @@ stdenv.mkDerivation rec {
'';
meta = {
- description = "Planet Venus is an awesome ‘river of news’ feed reader. It downloads news feeds published by web sites and aggregates their content together into a single combined feed, latest news first.";
+ description = "News feed reader";
+ longDescription = ''
+ Planet Venus is an awesome ‘river of news’ feed reader. It downloads news
+ feeds published by web sites and aggregates their content together into a
+ single combined feed, latest news first.
+ '';
homepage = "http://intertwingly.net/code/venus/docs/index.html";
license = stdenv.lib.licenses.psfl;
platforms = stdenv.lib.platforms.all;
diff --git a/pkgs/tools/networking/aria/default.nix b/pkgs/tools/networking/aria/default.nix
index 4f58463ecf9306a647c929035cc8db5fcccfeca2..f6432f8aa225481c1f25a0ac7d3f9197bd06c9be 100644
--- a/pkgs/tools/networking/aria/default.nix
+++ b/pkgs/tools/networking/aria/default.nix
@@ -16,6 +16,6 @@ rec {
name = "aria-" + version;
meta = {
- description = "aria - multiprotocol DL manager";
+ description = "Multiprotocol download manager";
};
}
diff --git a/pkgs/tools/networking/axel/default.nix b/pkgs/tools/networking/axel/default.nix
index 0ee0185094025859dd0757d21504a695e50382f3..8a6d63d164c02389ad15f133adcae9eebc7ce3e3 100644
--- a/pkgs/tools/networking/axel/default.nix
+++ b/pkgs/tools/networking/axel/default.nix
@@ -8,6 +8,6 @@ stdenv.mkDerivation {
};
meta = {
- description = "A console downloading program. Has some features for parallel connections for faster downloading.";
+ description = "Console downloading program with some features for parallel connections for faster downloading";
};
}
diff --git a/pkgs/tools/networking/bwm-ng/default.nix b/pkgs/tools/networking/bwm-ng/default.nix
index 88460d86730caf1f9061929e755c5016bc2c97fd..4d18c4adb373da832d664f1964aa930141d0f96b 100644
--- a/pkgs/tools/networking/bwm-ng/default.nix
+++ b/pkgs/tools/networking/bwm-ng/default.nix
@@ -11,7 +11,7 @@ stdenv.mkDerivation rec {
buildInputs = [ ncurses ];
meta = with stdenv.lib; {
- description = "Bandwidth Monitor NG is a small and simple console-based live network and disk io bandwidth monitor.";
+ description = "Bandwidth Monitor NG is a small and simple console-based live network and disk io bandwidth monitor";
homepage = "http://www.gropp.org/?id=projects&sub=bwm-ng";
license = licenses.gpl2;
platforms = platforms.unix;
diff --git a/pkgs/tools/networking/chrony/default.nix b/pkgs/tools/networking/chrony/default.nix
index d7fe07570574776a09606a50d2ffe07435f648f6..d15559961f6bdae65770a1043fd2ba8ddac25ac3 100644
--- a/pkgs/tools/networking/chrony/default.nix
+++ b/pkgs/tools/networking/chrony/default.nix
@@ -13,7 +13,7 @@ stdenv.mkDerivation rec {
buildInputs = [ readline ] ++ stdenv.lib.optional stdenv.isLinux libcap;
meta = with stdenv.lib; {
- description = "A pair of programs which are used to maintain the accuracy of the system clock on a computer.";
+ description = "Sets your computer's clock from time servers on the Net";
homepage = "http://chrony.tuxfamily.org/";
license = licenses.gpl2;
platforms = platforms.unix;
diff --git a/pkgs/tools/networking/connect/default.nix b/pkgs/tools/networking/connect/default.nix
index 67f2b63c292850c80d3856f6a78a273555cc71f8..c6291efad312335c5781e764ada6f359df86082f 100644
--- a/pkgs/tools/networking/connect/default.nix
+++ b/pkgs/tools/networking/connect/default.nix
@@ -20,7 +20,7 @@ stdenv.mkDerivation rec {
'';
meta = {
- description = "make network connection via SOCKS and https proxy.";
+ description = "Make network connection via SOCKS and https proxy";
longDescription = ''
This proxy traversal tool is intended to assist OpenSSH (via ProxyCommand
in ~/.ssh/config) and GIT (via $GIT_PROXY_COMMAND) utilize SOCKS and https proxies.
diff --git a/pkgs/tools/networking/filegive/default.nix b/pkgs/tools/networking/filegive/default.nix
index 275c496798009d4f45797068ccf894247945c2f2..443feee2ea032952e1af977d6e82d3a17cddb292 100644
--- a/pkgs/tools/networking/filegive/default.nix
+++ b/pkgs/tools/networking/filegive/default.nix
@@ -11,7 +11,7 @@ let
sha256 = "1swwfyzaj3l40yh9np3x4fcracgs79nwryc85sxbdakx8wwxs2xb";
};
- version = "0.7";
+ version = "0.7.1";
in
stdenv.mkDerivation rec {
@@ -20,7 +20,7 @@ stdenv.mkDerivation rec {
src = fetchurl {
url = "http://viric.name/cgi-bin/filegive/tarball/${name}.tar.gz?uuid=v${version}";
name = "${name}.tar.gz";
- sha256 = "0wj6vjfqfzqb75ii0djczdbcwilr05ahil5sqm65kimv11hc4j9n";
+ sha256 = "14yyif6q89ihn28kliszaf19vywjg9f7192q1ak8823da1svbq8a";
};
buildInputs = [ go ];
diff --git a/pkgs/tools/networking/fping/default.nix b/pkgs/tools/networking/fping/default.nix
index c51c8f59ff763321ac14cce2da2148d7eeea0cd3..4bda944c68a597554b57ff17a7fe8a7ba988323c 100644
--- a/pkgs/tools/networking/fping/default.nix
+++ b/pkgs/tools/networking/fping/default.nix
@@ -10,6 +10,6 @@ stdenv.mkDerivation rec {
meta = {
homepage = "http://fping.org/";
- description = "A program to send ICMP echo probes to network hosts.";
+ description = "Send ICMP echo probes to network hosts";
};
}
diff --git a/pkgs/tools/networking/gmvault/default.nix b/pkgs/tools/networking/gmvault/default.nix
index 8ab93948191502a23793d7e5da2b45ec512d7793..e78dfa5b2cae6e7f9acedb14d93315572bf5b754 100644
--- a/pkgs/tools/networking/gmvault/default.nix
+++ b/pkgs/tools/networking/gmvault/default.nix
@@ -28,7 +28,7 @@ buildPythonPackage rec {
'';
meta = {
- description = "Gmvault Gmail Backup - Backup and restore your gmail account at will.";
+ description = "Backup and restore your gmail account";
homepage = "http://gmvault.org";
license = pkgs.lib.licenses.agpl3Plus;
};
diff --git a/pkgs/tools/networking/haproxy/default.nix b/pkgs/tools/networking/haproxy/default.nix
index d44c9f831f34d537a3fa17b39429513c43970e0d..3946f1eef0fa7b871ae779c1420399825102862f 100644
--- a/pkgs/tools/networking/haproxy/default.nix
+++ b/pkgs/tools/networking/haproxy/default.nix
@@ -17,7 +17,15 @@ stdenv.mkDerivation rec {
'';
meta = {
- description = "HAProxy is a free, very fast and reliable solution offering high availability, load balancing, and proxying for TCP and HTTP-based applications.";
+ description = "Reliable, high performance TCP/HTTP load balancer";
+ longDescription = ''
+ HAProxy is a free, very fast and reliable solution offering high
+ availability, load balancing, and proxying for TCP and HTTP-based
+ applications. It is particularly suited for web sites crawling under very
+ high loads while needing persistence or Layer7 processing. Supporting
+ tens of thousands of connections is clearly realistic with todays
+ hardware.
+ '';
homepage = http://haproxy.1wt.eu;
maintainers = [ stdenv.lib.maintainers.garbas ];
platforms = stdenv.lib.platforms.linux;
diff --git a/pkgs/tools/networking/mosh/default.nix b/pkgs/tools/networking/mosh/default.nix
index f9562f7eff608c0bf624d159fcdbe0e3d7b18b6b..2708210af80582c694312d1b7dc9b3096073e5a4 100644
--- a/pkgs/tools/networking/mosh/default.nix
+++ b/pkgs/tools/networking/mosh/default.nix
@@ -17,7 +17,15 @@ stdenv.mkDerivation rec {
meta = {
homepage = http://mosh.mit.edu/;
- description = "Remote terminal application that allows roaming, local echo, etc.";
+ description = "Mobile shell (ssh replacement)";
+ longDescription = ''
+ Remote terminal application that allows roaming, supports intermittent
+ connectivity, and provides intelligent local echo and line editing of
+ user keystrokes.
+
+ Mosh is a replacement for SSH. It's more robust and responsive,
+ especially over Wi-Fi, cellular, and long-distance links.
+ '';
license = "GPLv3+";
maintainers = with stdenv.lib.maintainers; [viric];
platforms = with stdenv.lib.platforms; linux;
diff --git a/pkgs/tools/networking/mu/default.nix b/pkgs/tools/networking/mu/default.nix
index 6b316321afdeefbe828f0c9f474df6e7d26d17ef..e42dfee7cae2a935ded777474e3113e2f9039ecd 100644
--- a/pkgs/tools/networking/mu/default.nix
+++ b/pkgs/tools/networking/mu/default.nix
@@ -33,7 +33,7 @@ stdenv.mkDerivation rec {
description = "A collection of utilties for indexing and searching Maildirs";
license = "GPLv3+";
homepage = "http://www.djcbsoftware.nl/code/mu/";
- platforms = stdenv.lib.platforms.all;
+ platforms = stdenv.lib.platforms.mesaPlatforms;
maintainers = with stdenv.lib.maintainers; [ antono the-kenny ];
};
}
diff --git a/pkgs/tools/networking/netrw/default.nix b/pkgs/tools/networking/netrw/default.nix
index 23ff6ddba55a0ccf5194760a701d750b1fb75758..77ef6e0ad306c00d245e907a30419d54ad84a03b 100644
--- a/pkgs/tools/networking/netrw/default.nix
+++ b/pkgs/tools/networking/netrw/default.nix
@@ -27,7 +27,7 @@ stdenv.mkDerivation rec {
};
meta = {
- description = "A simple tool for transporting data over the network.";
+ description = "Simple tool for transporting data over the network";
license = stdenv.lib.licenses.gpl2;
homepage = "http://mamuti.net/netrw/index.en.html";
};
diff --git a/pkgs/tools/networking/network-manager/default.nix b/pkgs/tools/networking/network-manager/default.nix
index adc1cd7481b837e788bbe8e493c46c6520bb7768..25494d75f0dcf22411f920d17752f6a09fb779c2 100644
--- a/pkgs/tools/networking/network-manager/default.nix
+++ b/pkgs/tools/networking/network-manager/default.nix
@@ -59,6 +59,9 @@ stdenv.mkDerivation rec {
# FIXME: Workaround until NixOS' dbus+systemd supports at_console policy
substituteInPlace $out/etc/dbus-1/system.d/org.freedesktop.NetworkManager.conf --replace 'at_console="true"' 'group="networkmanager"'
+
+ # As NixOS doesn't seem to handle systemd Aliases, we just rename the dispatcher service file
+ mv $out/etc/systemd/system/NetworkManager-dispatcher.service $out/etc/systemd/system/dbus-org.freedesktop.nm-dispatcher.service
'';
meta = with stdenv.lib; {
diff --git a/pkgs/tools/networking/nylon/default.nix b/pkgs/tools/networking/nylon/default.nix
index 3d1563f9520d003a3344a3a7931697fc86c0d8d0..9050423cfafb84a51db2883692de0da276d475dd 100644
--- a/pkgs/tools/networking/nylon/default.nix
+++ b/pkgs/tools/networking/nylon/default.nix
@@ -13,7 +13,7 @@ stdenv.mkDerivation {
meta = {
homepage = http://monkey.org/~marius/nylon;
- description = "Proxy server, supporting SOCKS 4 and 5, as well as a mirror mode.";
+ description = "Proxy server, supporting SOCKS 4 and 5, as well as a mirror mode";
license = "free";
};
}
diff --git a/pkgs/tools/networking/offlineimap/default.nix b/pkgs/tools/networking/offlineimap/default.nix
index a5b46ebbc3c65ea4961e422ed238232fd3981b6a..fa1d2fb805a7327a847642ad76d1003cba68854a 100644
--- a/pkgs/tools/networking/offlineimap/default.nix
+++ b/pkgs/tools/networking/offlineimap/default.nix
@@ -18,7 +18,7 @@ buildPythonPackage rec {
];
meta = {
- description = "OfflineImap synchronizes emails between two repositories, so that you can read the same mailbox from multiple computers.";
+ description = "Synchronize emails between two repositories, so that you can read the same mailbox from multiple computers";
homepage = "http://offlineimap.org";
license = pkgs.lib.licenses.gpl2Plus;
maintainers = [ pkgs.lib.maintainers.garbas ];
diff --git a/pkgs/tools/networking/p2p/amule/default.nix b/pkgs/tools/networking/p2p/amule/default.nix
index 4864611f670ad0e94ea2a7b3b4b883caa3c4c7b4..c92fcecc9fcd1e6ab4b51f7f035c3d82ef61b2e7 100644
--- a/pkgs/tools/networking/p2p/amule/default.nix
+++ b/pkgs/tools/networking/p2p/amule/default.nix
@@ -48,7 +48,7 @@ mkDerivation rec {
meta = {
homepage = http://amule.org/;
- description = "aMule, a peer-to-peer client for the eD2K and Kademlia networks";
+ description = "Peer-to-peer client for the eD2K and Kademlia networks";
longDescription = ''
aMule is an eMule-like client for the eD2k and Kademlia
diff --git a/pkgs/tools/networking/p2p/bit-tornado/default.nix b/pkgs/tools/networking/p2p/bit-tornado/default.nix
index 14e13a17559f113494b7e24df97ed301e9aefa73..92458b3d145905cc10a3180f462b0ebe94f94534 100644
--- a/pkgs/tools/networking/p2p/bit-tornado/default.nix
+++ b/pkgs/tools/networking/p2p/bit-tornado/default.nix
@@ -19,6 +19,6 @@ stdenv.mkDerivation {
'';
meta = {
- description = "Bittorrent client with IPv6 support.";
+ description = "Bittorrent client with IPv6 support";
};
}
diff --git a/pkgs/tools/networking/pdsh/default.nix b/pkgs/tools/networking/pdsh/default.nix
index ec0b7c6f60b7e82088a9233e8d2c1d96e2ad342f..80fc075107c14790f4d80b5ddb545f8556266593 100644
--- a/pkgs/tools/networking/pdsh/default.nix
+++ b/pkgs/tools/networking/pdsh/default.nix
@@ -35,7 +35,7 @@ stdenv.mkDerivation {
meta = {
homepage = "http://code.google.com/p/pdsh/";
- description = "A high-performance, parallel remote shell utility.";
+ description = "High-performance, parallel remote shell utility";
license = "GPLv2";
longDescription = ''
diff --git a/pkgs/tools/networking/proxychains/default.nix b/pkgs/tools/networking/proxychains/default.nix
index e2eeb73fc64990d03b05fad89fddddc73ad403cd..6778cf94907ecfbf97d5398f9e080ec0cd7ea061 100644
--- a/pkgs/tools/networking/proxychains/default.nix
+++ b/pkgs/tools/networking/proxychains/default.nix
@@ -8,7 +8,7 @@ stdenv.mkDerivation {
};
meta = {
- description = "Proxifier for SOCKS proxies.";
+ description = "Proxifier for SOCKS proxies";
homepage = http://proxychains.sourceforge.net;
license = "GPLv2+";
};
diff --git a/pkgs/tools/networking/trickle/default.nix b/pkgs/tools/networking/trickle/default.nix
index 646108525d3c1adad5b5c7710574e984e2c82c94..254dc168ec8cf64ccfac7960ad00164868003c43 100644
--- a/pkgs/tools/networking/trickle/default.nix
+++ b/pkgs/tools/networking/trickle/default.nix
@@ -23,7 +23,7 @@ stdenv.mkDerivation rec {
configureFlags = "--with-libevent";
meta = {
- description = "Trickle, a portable lightweight userspace bandwidth shaper.";
+ description = "Lightweight userspace bandwidth shaper";
license = "BSD";
homepage = http://monkey.org/~marius/pages/?page=trickle;
platforms = stdenv.lib.platforms.linux;
diff --git a/pkgs/tools/networking/unbound/default.nix b/pkgs/tools/networking/unbound/default.nix
index 98fc8e4d1451ae2060950350f2c41130a5372b8d..ea9719dd9b291c7056b47243ec76f2714040513f 100644
--- a/pkgs/tools/networking/unbound/default.nix
+++ b/pkgs/tools/networking/unbound/default.nix
@@ -14,7 +14,7 @@ stdenv.mkDerivation rec {
"--localstatedir=/var" ];
meta = {
- description = "Unbound, a validating, recursive, and caching DNS resolver.";
+ description = "Validating, recursive, and caching DNS resolver";
license = "BSD";
homepage = http://www.unbound.net;
platforms = with stdenv.lib.platforms; linux;
diff --git a/pkgs/tools/package-management/nix/unstable.nix b/pkgs/tools/package-management/nix/unstable.nix
index ba0353e4507807abcd03b285295e2a86620caef9..a548a9f13bdd5bb96f0297e9fef98b9ecfd3d755 100644
--- a/pkgs/tools/package-management/nix/unstable.nix
+++ b/pkgs/tools/package-management/nix/unstable.nix
@@ -5,11 +5,11 @@
}:
stdenv.mkDerivation rec {
- name = "nix-1.6pre3220_fecad91";
+ name = "nix-1.7pre3252_792fd51";
src = fetchurl {
- url = "http://hydra.nixos.org/build/6038922/download/5/${name}.tar.xz";
- sha256 = "0251b8cb7ad2a4974a9c8002c65f1c6e1b334be082d3dd2f085929594637f947";
+ url = "http://hydra.nixos.org/build/6500161/download/5/${name}.tar.xz";
+ sha256 = "f99c1996292ea1a20068f0a6d58d3dc4775f30fdd22cdd756ac4d749acb2c20e";
};
nativeBuildInputs = [ perl pkgconfig ];
diff --git a/pkgs/tools/package-management/nixops/default.nix b/pkgs/tools/package-management/nixops/default.nix
index 3381e3644fe5efecbf3c05f263ab8f4e066c63f3..18144b41d911ef1a69ba65610438fc5ba5c5c3d3 100644
--- a/pkgs/tools/package-management/nixops/default.nix
+++ b/pkgs/tools/package-management/nixops/default.nix
@@ -1,12 +1,12 @@
{ lib, pythonPackages, fetchurl, libxslt, docbook5_xsl, openssh }:
pythonPackages.buildPythonPackage rec {
- name = "nixops-1.1";
+ name = "nixops-1.1.1";
namePrefix = "";
src = fetchurl {
url = "http://nixos.org/releases/nixops/${name}/${name}.tar.bz2";
- sha256 = "1i0v4v83s663izw6al63avhs0378rp3nxchy8nkb1zam5rj097z2";
+ sha256 = "0hb77cf9l8qcjp6a1gzkzv7k10j5zvp23ilxgx5x6j93602d5jwb";
};
buildInputs = [ libxslt ];
diff --git a/pkgs/tools/security/apg/default.nix b/pkgs/tools/security/apg/default.nix
index 28f66e1e4929401a28ee907abbf15e966cbf35c2..2190a1ffbe63db70fc704da487274192293a6f5a 100644
--- a/pkgs/tools/security/apg/default.nix
+++ b/pkgs/tools/security/apg/default.nix
@@ -12,7 +12,7 @@ stdenv.mkDerivation rec {
patches = [ ./apg.patch ];
meta = {
- description = "A tool set for random password generation.";
+ description = "Tools for random password generation";
longDescription = ''
APG (Automated Password Generator) is the tool set for random
password generation.
diff --git a/pkgs/tools/security/clamav/default.nix b/pkgs/tools/security/clamav/default.nix
index cb32085a8cfe25d2736c4c33a7d98ef369cc5f93..ec00137b36f74d4d34976cb8fef31d0e5467faa8 100644
--- a/pkgs/tools/security/clamav/default.nix
+++ b/pkgs/tools/security/clamav/default.nix
@@ -18,7 +18,7 @@ stdenv.mkDerivation rec {
meta = with stdenv.lib; {
homepage = http://www.clamav.net;
- description = "an open source (GPL) antivirus engine designed for detecting Trojans, viruses, malware and other malicious threats.";
+ description = "Antivirus engine designed for detecting Trojans, viruses, malware and other malicious threats";
license = licenses.gpl2;
maintainers = [ maintainers.phreedom ];
platforms = platforms.linux;
diff --git a/pkgs/tools/security/fail2ban/default.nix b/pkgs/tools/security/fail2ban/default.nix
index dd869714e05652860ec830f122b512c1dabd2b75..1a443fc18b618ced7633a655702d0df840800739 100644
--- a/pkgs/tools/security/fail2ban/default.nix
+++ b/pkgs/tools/security/fail2ban/default.nix
@@ -1,6 +1,6 @@
{ stdenv, fetchurl, pythonPackages, unzip, gamin }:
-let version = "0.8.6"; in
+let version = "0.8.10"; in
pythonPackages.buildPythonPackage {
name = "fail2ban-${version}";
@@ -9,7 +9,7 @@ pythonPackages.buildPythonPackage {
src = fetchurl {
url = "https://github.com/fail2ban/fail2ban/zipball/${version}";
name = "fail2ban-${version}.zip";
- sha256 = "0lbanfshr8kasa1bb7861w3mrm2d0c1bvv4s5703265s8zp5m284";
+ sha256 = "0zbjwnghpdnzan7hn40cjjh2r06p2ph5kblpm0w1r72djwsk67x9";
};
buildInputs = [ unzip ];
@@ -21,6 +21,7 @@ pythonPackages.buildPythonPackage {
--replace /usr $out
substituteInPlace setup.py \
+ --replace /usr $out \
--replace /etc $out/etc \
--replace /var $TMPDIR/var \
@@ -28,7 +29,7 @@ pythonPackages.buildPythonPackage {
substituteInPlace $i \
--replace /usr/share/fail2ban $out/share/fail2ban
done
-
+
for i in config/action.d/sendmail*.conf; do
substituteInPlace $i \
--replace /usr/sbin/sendmail sendmail \
@@ -37,7 +38,7 @@ pythonPackages.buildPythonPackage {
'';
doCheck = false;
-
+
installCommand = ''
python setup.py install --prefix=$out
'';
diff --git a/pkgs/tools/security/gnupg/default.nix b/pkgs/tools/security/gnupg/default.nix
index baa8dd87ec1fc0035f5f0d8b1a41b0e3f8784239..f242c3f323aed3b788528a400c5c1aa0aae9e0a8 100644
--- a/pkgs/tools/security/gnupg/default.nix
+++ b/pkgs/tools/security/gnupg/default.nix
@@ -13,11 +13,11 @@ assert useUsb -> (libusb != null);
assert useCurl -> (curl != null);
stdenv.mkDerivation rec {
- name = "gnupg-2.0.21";
+ name = "gnupg-2.0.22";
src = fetchurl {
url = "mirror://gnupg/gnupg/${name}.tar.bz2";
- sha256 = "1xgf1q1phdawk6y66haaqcvfnlsqk12jmjin1m2d5x6fqw18kpq0";
+ sha256 = "0lg210acj2rxq291q4cwamg9gx6gh2prb1xa93y5jhw5b6r0lza3";
};
buildInputs
@@ -39,7 +39,7 @@ stdenv.mkDerivation rec {
meta = {
homepage = "http://gnupg.org/";
- description = "GNU Privacy Guard (GnuPG), GNU Project's implementation of the OpenPGP standard";
+ description = "free implementation of the OpenPGP standard for encrypting and signing data";
license = stdenv.lib.licenses.gpl3Plus;
longDescription = ''
diff --git a/pkgs/tools/security/gnupg1/default.nix b/pkgs/tools/security/gnupg1/default.nix
index f9b959061da02311dfcbcd65b8c4291f3e30b9d3..192970b5caed2c552dca44dd59432e4046690d86 100644
--- a/pkgs/tools/security/gnupg1/default.nix
+++ b/pkgs/tools/security/gnupg1/default.nix
@@ -1,38 +1,19 @@
-{ # Support for the IDEA cipher (used by the old PGP) should only be
- # enabled if it is legal for you to do so.
- ideaSupport ? false
-
-, stdenv, fetchurl, readline, bzip2
-}:
-
-let
-
- idea = fetchurl {
- url = http://tarballs.nixos.org/idea.c.gz;
- md5 = "9dc3bc086824a8c7a331f35e09a3e57f";
- };
-
-in
+{ stdenv, fetchurl, readline, bzip2 }:
stdenv.mkDerivation rec {
- name = "gnupg-1.4.13";
+ name = "gnupg-1.4.15";
src = fetchurl {
url = "mirror://gnupg/gnupg/${name}.tar.bz2";
- sha1 = "17a75c54d292bd0923f0a1817a1b02ded37d1de1";
+ sha1 = "63ebf0ab375150903c65738070e4105200197fd4";
};
buildInputs = [ readline bzip2 ];
- preConfigure = stdenv.lib.optionalString ideaSupport
- ''
- gunzip < ${idea} > ./cipher/idea.c
- '';
-
doCheck = true;
meta = {
- description = "GnuPG, a free implementation of the OpenPGP standard for encrypting and signing data";
+ description = "free implementation of the OpenPGP standard for encrypting and signing data";
homepage = http://www.gnupg.org/;
license = "GPLv3+";
platforms = stdenv.lib.platforms.gnu; # arbitrary choice
diff --git a/pkgs/tools/security/haveged/default.nix b/pkgs/tools/security/haveged/default.nix
new file mode 100644
index 0000000000000000000000000000000000000000..48f9727b3c03966f1f9f8dd73e15392077949ea9
--- /dev/null
+++ b/pkgs/tools/security/haveged/default.nix
@@ -0,0 +1,27 @@
+{ stdenv, fetchurl }:
+
+stdenv.mkDerivation rec {
+ name = "haveged-${version}";
+ version = "1.7c";
+
+ src = fetchurl {
+ url = "http://www.issihosts.com/haveged/haveged-${version}.tar.gz";
+ sha256 = "08gi3d9lbrllk5lyxw8l65py88xhia48w758lqjddh3gv7g7wfa0";
+ };
+
+ meta = {
+ description = "A simple entropy daemon";
+ longDescription = ''
+ The haveged project is an attempt to provide an easy-to-use, unpredictable
+ random number generator based upon an adaptation of the HAVEGE algorithm.
+ Haveged was created to remedy low-entropy conditions in the Linux random device
+ that can occur under some workloads, especially on headless servers. Current development
+ of haveged is directed towards improving overall reliablity and adaptability while minimizing
+ the barriers to using haveged for other tasks.
+ '';
+ homepage = http://www.issihosts.com/haveged/;
+ license = stdenv.lib.licenses.gpl3;
+ maintainers = stdenv.lib.maintainers.iElectric;
+ platforms = stdenv.lib.platforms.unix;
+ };
+}
diff --git a/pkgs/tools/security/prey/default.nix b/pkgs/tools/security/prey/default.nix
new file mode 100644
index 0000000000000000000000000000000000000000..fe71806301dd9924ce1b23ffc724835224f41ff5
--- /dev/null
+++ b/pkgs/tools/security/prey/default.nix
@@ -0,0 +1,46 @@
+{ stdenv, fetchurl, fetchgit, curl, scrot, imagemagick, xawtv, inetutils, makeWrapper, coreutils
+, apiKey ? ""
+, deviceKey ? "" }:
+
+# TODO: this should assert keys are set, somehow if set through .override assertion fails
+#assert apiKey != "";
+#assert deviceKey != "";
+
+let
+ modulesSrc = fetchgit {
+ url = "git://github.com/prey/prey-bash-client-modules.git";
+ rev = "aba260ef110834cb2e92923a31f50c15970639ee";
+ };
+in stdenv.mkDerivation rec {
+ name = "prey-bash-client-${version}";
+ version = "0.6.0";
+
+ src = fetchurl {
+ url = "https://github.com/prey/prey-bash-client/archive/v${version}.tar.gz";
+ sha256 = "09cb15jh4jdwvix9nx048ajkw2r5jaflk68y3rkha541n8n0qwh0";
+ };
+
+ buildInputs = [ curl scrot imagemagick xawtv makeWrapper ];
+
+ phases = "unpackPhase installPhase";
+
+ installPhase = ''
+ substituteInPlace config --replace api_key=\'\' "api_key='${apiKey}'"
+ substituteInPlace config --replace device_key=\'\' "device_key='${deviceKey}'"
+
+ substituteInPlace prey.sh --replace /bin/bash $(type -Pp bash)
+ mkdir -p $out/modules
+ cp -R . $out
+ cp -R ${modulesSrc}/* $out/modules/
+ wrapProgram "$out/prey.sh" \
+ --prefix PATH ":" "${xawtv}/bin:${imagemagick}/bin:${curl}/bin:${scrot}/bin:${inetutils}/bin:${coreutils}/bin" \
+ --set CURL_CA_BUNDLE "/etc/ssl/certs/ca-bundle.crt"
+ '';
+
+ meta = with stdenv.lib; {
+ homepage = http://preyproject.com;
+ description = "Proven tracking software that helps you find, lock and recover your devices when stolen or missing";
+ maintainers = with maintainers; [ iElectric ];
+ license = licenses.gpl3;
+ };
+}
diff --git a/pkgs/tools/security/pwgen/default.nix b/pkgs/tools/security/pwgen/default.nix
index aaa3b577657fe49883e7baec1780b621ea6d4a7c..ef91e69428a36f0c1b5d3b53a8196875688cfe86 100644
--- a/pkgs/tools/security/pwgen/default.nix
+++ b/pkgs/tools/security/pwgen/default.nix
@@ -7,7 +7,7 @@ stdenv.mkDerivation {
sha256 = "1afxbkdl9b81760pyb972k18dmidrciy3vzcnspp3jg0aa316yn8";
};
meta = {
- description = "Small, GPL'ed password generator which creates passwords which can be easily memorized by a human.";
- platforms = stdenv.lib.platforms.all;
+ description = "Password generator which creates passwords which can be easily memorized by a human";
+ platforms = stdenv.lib.platforms.all;
};
}
diff --git a/pkgs/tools/security/seccure/0.4.nix b/pkgs/tools/security/seccure/default.nix
similarity index 100%
rename from pkgs/tools/security/seccure/0.4.nix
rename to pkgs/tools/security/seccure/default.nix
diff --git a/pkgs/tools/security/sshuttle/default.nix b/pkgs/tools/security/sshuttle/default.nix
new file mode 100644
index 0000000000000000000000000000000000000000..61ba63862afa98797e6a7231ceebc0b4fce10ddf
--- /dev/null
+++ b/pkgs/tools/security/sshuttle/default.nix
@@ -0,0 +1,34 @@
+{ stdenv, fetchurl, iptables, python, pythonPackages }:
+
+stdenv.mkDerivation rec {
+ name = "sshuttle-${version}";
+ version = "0.61";
+
+ src = fetchurl {
+ url = "https://github.com/apenwarr/sshuttle/archive/sshuttle-0.61.tar.gz";
+ sha256 = "1v2v1kbwnmx6ygzhbgqcmyafx914s2p7vjp7l0pf52sa7qkliy9b";
+ };
+
+ preBuild = ''
+ substituteInPlace Documentation/all.do --replace "/bin/ls" "$(type -tP ls)";
+ substituteInPlace Documentation/md2man.py --replace "/usr/bin/env python" "${python}/bin/python"
+ '';
+
+ phases = "unpackPhase installPhase";
+
+ installPhase = ''
+ mkdir -p $out/bin
+ cp -R . $out
+ ln -s $out/sshuttle $out/bin/sshuttle
+ '';
+
+
+ buildInputs = [ iptables python pythonPackages.markdown pythonPackages.beautifulsoup ];
+
+ meta = with stdenv.lib; {
+ homepage = https://github.com/apenwarr/sshuttle;
+ description = "Transparent proxy server that works as a poor man's VPN";
+ maintainers = with maintainers; [ iElectric ];
+ platforms = platforms.unix;
+ };
+}
diff --git a/pkgs/tools/security/tor/torsocks.nix b/pkgs/tools/security/tor/torsocks.nix
index ac60ccb16a1fe3633ae5249279757991c42a4260..0254b143edfdcf251ff7d688fc4df64954f72cf4 100644
--- a/pkgs/tools/security/tor/torsocks.nix
+++ b/pkgs/tools/security/tor/torsocks.nix
@@ -1,14 +1,16 @@
-{ stdenv, fetchurl }:
+{ stdenv, fetchgit, autoreconfHook }:
stdenv.mkDerivation rec {
pname = "torsocks";
name = "${pname}-${version}";
- version = "1.2";
+ version = "1.3";
- src = fetchurl {
- url = "http://${pname}.googlecode.com/files/${name}.tar.gz";
- sha256 = "1m0is5q24sf7jjlkl0icfkdc0m53nbkg0q72s57p48yp4hv7v9dy";
+ src = fetchgit {
+ url = meta.repositories.git;
+ rev = "refs/tags/${version}";
+ sha256 = "1cqplb36fkdb81kzf48xlxclf64wnp8r56x1gjayax1h6x4aal1w";
};
+ buildInputs = [ autoreconfHook ];
preConfigure = ''
export configureFlags="$configureFlags --libdir=$out/lib"
'';
@@ -16,6 +18,7 @@ stdenv.mkDerivation rec {
meta = {
description = "use socks-friendly applications with Tor";
homepage = http://code.google.com/p/torsocks/;
+ repositories.git = https://git.torproject.org/torsocks.git;
license = "GPLv2";
};
}
diff --git a/pkgs/tools/security/torbutton/default.nix b/pkgs/tools/security/torbutton/default.nix
index 348d96b002475d8339054938b83f25c180b87a9f..05bab06d3827718ffc29634bb1d373a2b0357035 100644
--- a/pkgs/tools/security/torbutton/default.nix
+++ b/pkgs/tools/security/torbutton/default.nix
@@ -21,7 +21,12 @@ stdenv.mkDerivation rec {
meta = with stdenv.lib; {
homepage = https://www.torproject.org/torbutton/;
- description = "the component in Tor Browser Bundle that takes care of application-level security and privacy concerns in Firefox. To keep you safe, Torbutton disables many types of active content.";
+ description = "Part of the Tor Browser Bundle";
+ longDescription = ''
+ The component in Tor Browser Bundle that takes care of application-level
+ security and privacy concerns in Firefox. To keep you safe, Torbutton
+ disables many types of active content.
+ '';
license = licenses.mit;
maintainers = [ maintainers.phreedom ];
platforms = platforms.linux;
diff --git a/pkgs/tools/system/gptfdisk/default.nix b/pkgs/tools/system/gptfdisk/default.nix
index 9db39411854b59f8b8e1b610f81d01699e78a890..7c8c2ec09ed33271e741641c3fc363b35874bb04 100644
--- a/pkgs/tools/system/gptfdisk/default.nix
+++ b/pkgs/tools/system/gptfdisk/default.nix
@@ -1,11 +1,11 @@
{ fetchurl, stdenv, libuuid, popt, icu, ncurses }:
stdenv.mkDerivation rec {
- name = "gptfdisk-0.8.5";
+ name = "gptfdisk-0.8.6";
src = fetchurl {
url = "mirror://sourceforge/gptfdisk/${name}.tar.gz";
- sha256 = "1yaax2mga7n847x1ihbgvv4drzvndgnn4mii0mz1ab1150gnkk0m";
+ sha256 = "1cj7lribq8f3i4q6463q08bs42pvlzfj0iz2f2cnjn94hiacsya5";
};
buildInputs = [ libuuid popt icu ncurses ];
@@ -13,9 +13,11 @@ stdenv.mkDerivation rec {
installPhase = ''
mkdir -p $out/sbin
mkdir -p $out/share/man/man8
- install -v -m755 gdisk sgdisk fixparts $out/sbin
- install -v -m644 gdisk.8 sgdisk.8 fixparts.8 \
- $out/share/man/man8
+ for prog in gdisk sgdisk fixparts cgdisk
+ do
+ install -v -m755 $prog $out/sbin
+ install -v -m644 $prog.8 $out/share/man/man8
+ done
'';
meta = {
@@ -26,6 +28,7 @@ stdenv.mkDerivation rec {
homepage = http://www.rodsbooks.com/gdisk/;
maintainers = stdenv.lib.maintainers.shlevy;
+
platforms = stdenv.lib.platforms.linux;
};
}
diff --git a/pkgs/tools/system/logcheck/default.nix b/pkgs/tools/system/logcheck/default.nix
index 1c57711940bf7cf764c3ce38e0628c225bd6b3f7..7d15ade348cf355d6464f0e7b7db1548878c01b6 100644
--- a/pkgs/tools/system/logcheck/default.nix
+++ b/pkgs/tools/system/logcheck/default.nix
@@ -29,7 +29,7 @@ stdenv.mkDerivation rec {
];
meta = {
- description = "Mails anomalies in the system logfiles to the administrator.";
+ description = "Mails anomalies in the system logfiles to the administrator";
longDescription = ''
Mails anomalies in the system logfiles to the administrator.
diff --git a/pkgs/tools/system/lshw/default.nix b/pkgs/tools/system/lshw/default.nix
index a0f838cfcf93d19cbb372edf4b9bb288e1acd898..930cb7b7bff0085cc2141d2d96a4967d2769e329 100644
--- a/pkgs/tools/system/lshw/default.nix
+++ b/pkgs/tools/system/lshw/default.nix
@@ -24,7 +24,7 @@ stdenv.mkDerivation rec {
meta = with stdenv.lib; {
homepage = http://ezix.org/project/wiki/HardwareLiSter;
- description = "A small tool to provide detailed information on the hardware configuration of the machine.";
+ description = "Provide detailed information on the hardware configuration of the machine";
license = licenses.gpl2;
maintainers = [ maintainers.phreedom ];
platforms = platforms.linux;
diff --git a/pkgs/tools/system/pciutils/default.nix b/pkgs/tools/system/pciutils/default.nix
index 3f63d077c7fad303cc9ed5d323b2ef80fb42df8e..93486d3decf22e2c313996c45f6b3471f59b2d0c 100644
--- a/pkgs/tools/system/pciutils/default.nix
+++ b/pkgs/tools/system/pciutils/default.nix
@@ -3,8 +3,8 @@
let
pciids = fetchurl {
# Obtained from http://pciids.sourceforge.net/v2.2/pci.ids.bz2.
- url = http://tarballs.nixos.org/pci.ids.20120929.bz2;
- sha256 = "1q3i479ay88wam1zz1vbgkbqb2axg8av9qjxaigrqbnw2pv0srmb";
+ url = http://tarballs.nixos.org/pci.ids.20131006.bz2;
+ sha256 = "1vmshcgxqminiyh52pdcak24lm24qlic49py9cmkp96y1s48lvsc";
};
in
stdenv.mkDerivation rec {
@@ -17,8 +17,7 @@ stdenv.mkDerivation rec {
buildInputs = [ pkgconfig zlib kmod which ];
- # currently up-to-date
- #preBuild = "bunzip2 < ${pciids} > pci.ids";
+ preBuild = "bunzip2 < ${pciids} > pci.ids";
makeFlags = "SHARED=yes PREFIX=\${out}";
diff --git a/pkgs/tools/system/rsyslog/default.nix b/pkgs/tools/system/rsyslog/default.nix
index 0189d04902a29d38ac77b6dc1104d18a33daf65e..3b5c06483845dc8639261ef84cca6169b1b00002 100644
--- a/pkgs/tools/system/rsyslog/default.nix
+++ b/pkgs/tools/system/rsyslog/default.nix
@@ -14,9 +14,8 @@ stdenv.mkDerivation {
meta = {
homepage = "http://www.rsyslog.com/";
- description = "Rsyslog is an enhanced syslogd. It can be used as a drop-in replacement for stock sysklogd.";
+ description = "Enhanced syslog implementation";
license = "GPLv3";
-
platforms = stdenv.lib.platforms.linux;
};
}
diff --git a/pkgs/tools/system/syslog-ng/default.nix b/pkgs/tools/system/syslog-ng/default.nix
index f5ee2f1bcbbacb5111f482755c292f59c5df3466..f2cb221cb3219e2e961a6ac44c2316d809206ab8 100644
--- a/pkgs/tools/system/syslog-ng/default.nix
+++ b/pkgs/tools/system/syslog-ng/default.nix
@@ -13,9 +13,8 @@ stdenv.mkDerivation {
meta = {
homepage = "http://www.balabit.com/network-security/syslog-ng/";
- description = "Next-generation syslogd with advanced networking and filtering capabilities.";
+ description = "Next-generation syslogd with advanced networking and filtering capabilities";
license = "GPLv2";
-
platforms = stdenv.lib.platforms.linux;
maintainers = [ stdenv.lib.maintainers.simons ];
};
diff --git a/pkgs/tools/system/vboot_reference/default.nix b/pkgs/tools/system/vboot_reference/default.nix
index ed48a9976d4c99b091efab33f3ee080795cfbd97..e1c4734bbdaf1c0dc3130621f6d6d1e4d569ad4a 100644
--- a/pkgs/tools/system/vboot_reference/default.nix
+++ b/pkgs/tools/system/vboot_reference/default.nix
@@ -40,7 +40,7 @@ stdenv.mkDerivation rec {
'';
meta = {
- description = "Chrome OS partitioning and kernel signing tools.";
+ description = "Chrome OS partitioning and kernel signing tools";
license = stdenv.lib.licenses.bsd3;
platforms = stdenv.lib.platforms.linux;
};
diff --git a/pkgs/tools/text/wgetpaste/default.nix b/pkgs/tools/text/wgetpaste/default.nix
index 04102093aae4f1d35c6a883cb05c01458d046c47..a47eb2ddf9f925aecd2b800668ce166498ad748e 100644
--- a/pkgs/tools/text/wgetpaste/default.nix
+++ b/pkgs/tools/text/wgetpaste/default.nix
@@ -19,7 +19,7 @@
'';
meta = {
- description = "wgetpaste";
+ description = "Command-line interface to various pastebins";
homepage = http://wgetpaste.zlin.dk/;
license = "publicDomain";
maintainers = with stdenv.lib.maintainers; [qknight];
diff --git a/pkgs/tools/text/xml/html-xml-utils/default.nix b/pkgs/tools/text/xml/html-xml-utils/default.nix
new file mode 100644
index 0000000000000000000000000000000000000000..f52855dfc538d6dfc9bbb2ede35fd1e9035b7d50
--- /dev/null
+++ b/pkgs/tools/text/xml/html-xml-utils/default.nix
@@ -0,0 +1,20 @@
+{ stdenv, fetchurl }:
+
+stdenv.mkDerivation rec {
+ name = "html-xml-utils-6.4";
+
+ src = fetchurl {
+ url = "http://www.w3.org/Tools/HTML-XML-utils/${name}.tar.gz";
+
+ sha256 = "0dqa8vjk5my728hmb7dhl6nbg7946fh905j0yzlwx7p7rg2zrxcp";
+ };
+
+ patches = [ ./no-Boolean-type.patch ];
+
+ meta = {
+ description = "Utilities for manipulating HTML and XML files";
+ homepage = http://www.w3.org/Tools/HTML-XML-utils/;
+ license = "free-non-copyleft";
+ maintainers = [ stdenv.lib.maintainers.shlevy ];
+ };
+}
diff --git a/pkgs/tools/text/xml/html-xml-utils/no-Boolean-type.patch b/pkgs/tools/text/xml/html-xml-utils/no-Boolean-type.patch
new file mode 100644
index 0000000000000000000000000000000000000000..f675c4280e78346055c8642b49bea7e14be413f0
--- /dev/null
+++ b/pkgs/tools/text/xml/html-xml-utils/no-Boolean-type.patch
@@ -0,0 +1,20 @@
+diff -Naur html-xml-utils-6.4-orig/openurl.c html-xml-utils-6.4/openurl.c
+--- html-xml-utils-6.4-orig/openurl.c 2012-10-23 09:55:12.000000000 -0400
++++ html-xml-utils-6.4/openurl.c 2013-10-17 14:05:11.424077842 -0400
+@@ -66,6 +66,7 @@
+ #include
+ #include
+ #include
++#include
+ #include "export.h"
+ #if HAVE_LIBCURL && !HAVE_FOPENCOOKIE
+ # include "fopencookie.e" /* Use our own fopencookie() */
+@@ -505,7 +506,7 @@
+ const conststring path, Dictionary request,
+ Dictionary response, int maxredirs, int *status)
+ {
+- Boolean delete_response = !response;
++ bool delete_response = !response;
+ conststring h, v;
+ char buf[BUFLEN];
+ int fd, n, i;
diff --git a/pkgs/tools/typesetting/asciidoc/default.nix b/pkgs/tools/typesetting/asciidoc/default.nix
index 986d0d7a69c098119cf099e16362c299b4c12d8a..aeeaf04e7bad7ee39fe6004ac61fbcf71d1cdcb7 100644
--- a/pkgs/tools/typesetting/asciidoc/default.nix
+++ b/pkgs/tools/typesetting/asciidoc/default.nix
@@ -1,4 +1,27 @@
{ fetchurl, stdenv, python
+
+, enableStandardFeatures ? false
+, sourceHighlight ? null
+, highlight ? null
+, pygments ? null
+, graphviz ? null
+, tetex ? null
+, dblatexFull ? null
+, libxslt ? null
+, w3m ? null
+, lynx ? null
+, imagemagick ? null
+, lilypond ? null
+, libxml2 ? null
+, docbook_xml_dtd_45 ? null
+, docbook5_xsl ? null
+, docbook_xsl ? null
+, fop ? null
+# TODO: Package this:
+#, epubcheck ? null
+, gnused ? null
+, coreutils ? null
+
, unzip ? null
# filters
, enableDitaaFilter ? false, jre ? null
@@ -12,6 +35,28 @@
, enableOdfBackend ? false
}:
+assert enableStandardFeatures ->
+ sourceHighlight != null &&
+ highlight != null &&
+ pygments != null &&
+ graphviz != null &&
+ tetex != null &&
+ dblatexFull != null &&
+ libxslt != null &&
+ w3m != null &&
+ lynx != null &&
+ imagemagick != null &&
+ lilypond != null &&
+ libxml2 != null &&
+ docbook_xml_dtd_45 != null &&
+ docbook5_xsl != null &&
+ docbook_xsl != null &&
+ fop != null &&
+# TODO: Package this:
+# epubcheck != null &&
+ gnused != null &&
+ coreutils != null;
+
# filters
assert (enableDitaaFilter || enableMscgenFilter || enableDiagFilter || enableQrcodeFilter || enableAafigureFilter) -> unzip != null;
assert enableDitaaFilter -> jre != null;
@@ -49,7 +94,7 @@ let
sha256 = "0h4bql1nb4y4fmg2yvlpfjhvy22ln8jsaxdr10f8bfcg5lr0zkxs";
};
- # latest commit in master branch as per 2013-09-22
+ # there are no archives or tags, using latest commit in master branch as per 2013-09-22
matplotlibFilterSrc = let commit = "75f0d009629f93f33fab04b83faca20cc35dd358"; in fetchurl rec {
name = "mplw-${commit}.tar.gz";
url = "https://api.github.com/repos/lvv/mplw/tarball/${commit}";
@@ -151,11 +196,48 @@ stdenv.mkDerivation rec {
# the odp backend already has that fix. Copy it here until fixed upstream.
sed -i "s|'/etc/asciidoc/backends/odt/asciidoc.ott'|os.path.dirname(__file__),'asciidoc.ott'|" \
"$out/etc/asciidoc/backends/odt/a2x-backend.py"
+ '' + optionalString enableStandardFeatures ''
+ sed -e "s|dot|${graphviz}/bin/dot|g" \
+ -e "s|neato|${graphviz}/bin/neato|g" \
+ -e "s|twopi|${graphviz}/bin/circo|g" \
+ -e "s|circo|${graphviz}/bin/circo|g" \
+ -e "s|fdp|${graphviz}/bin/fdp|g" \
+ -i "filters/graphviz/graphviz2png.py"
+
+ sed -e "s|run('latex|run('${tetex}/bin/latex|g" \
+ -e "s|cmd = 'dvipng'|cmd = '${tetex}/bin/dvipng'|g" \
+ -i "filters/latex/latex2png.py"
+
+ sed -e "s|run('abc2ly|run('${lilypond}/bin/abc2ly|g" \
+ -e "s|run('lilypond|run('${lilypond}/bin/lilypond|g" \
+ -e "s|run('convert|run('${imagemagick}/bin/convert|g" \
+ -i "filters/music/music2png.py"
+
+ sed -e 's|filter="source-highlight|filter="${sourceHighlight}/bin/source-highlight|' \
+ -e 's|filter="highlight|filter="${highlight}/bin/highlight|' \
+ -e 's|filter="pygmentize|filter="${pygments}/bin/pygmentize|' \
+ -i "filters/source/source-highlight-filter.conf"
+
+ # ENV is custom environment passed to programs that a2x invokes. Here we
+ # use it to work around an impurity in the tetex package; tetex tools
+ # cannot find their neighbours (e.g. pdflatex doesn't find mktextfm).
+ # We can remove PATH= when those impurities are fixed.
+ sed -e "s|^ENV =.*|ENV = dict(XML_CATALOG_FILES='${docbook_xml_dtd_45}/xml/dtd/docbook/catalog.xml ${docbook5_xsl}/xml/xsl/docbook/catalog.xml ${docbook_xsl}/xml/xsl/docbook/catalog.xml', PATH='${tetex}/bin:${coreutils}/bin:${gnused}/bin')|" \
+ -e "s|^ASCIIDOC =.*|ASCIIDOC = '$out/bin/asciidoc'|" \
+ -e "s|^XSLTPROC =.*|XSLTPROC = '${libxslt}/bin/xsltproc'|" \
+ -e "s|^DBLATEX =.*|DBLATEX = '${dblatexFull}/bin/dblatex'|" \
+ -e "s|^FOP =.*|FOP = '${fop}/bin/fop'|" \
+ -e "s|^W3M =.*|W3M = '${w3m}/bin/w3m'|" \
+ -e "s|^LYNX =.*|LYNX = '${lynx}/bin/lynx'|" \
+ -e "s|^XMLLINT =.*|XMLLINT = '${libxml2}/bin/xmllint'|" \
+ -e "s|^EPUBCHECK =.*|EPUBCHECK = 'nixpkgs_is_missing_epubcheck'|" \
+ -i a2x.py
'' + ''
for n in $(find "$out" . -name \*.py); do
sed -i -e "s,^#![[:space:]]*.*/bin/env python,#!${python}/bin/python,g" "$n"
chmod +x "$n"
done
+
sed -i -e "s,/etc/vim,,g" Makefile.in
'';
diff --git a/pkgs/tools/typesetting/pdf2djvu/default.nix b/pkgs/tools/typesetting/pdf2djvu/default.nix
index b7204b9578420e21c78e155a3f403f971d824af2..b97252e74de023354b2ad87fdd54ce8f0b2b42f7 100644
--- a/pkgs/tools/typesetting/pdf2djvu/default.nix
+++ b/pkgs/tools/typesetting/pdf2djvu/default.nix
@@ -1,12 +1,12 @@
{stdenv, fetchurl, pkgconfig, djvulibre, poppler, fontconfig, libjpeg }:
stdenv.mkDerivation rec {
- version = "0.7.16";
+ version = "0.7.17";
name = "pdf2djvu-${version}";
src = fetchurl {
url = "http://pdf2djvu.googlecode.com/files/pdf2djvu_${version}.tar.gz";
- sha256 = "1yg4ppqxpfda89yi4c3rrq2zhar5dzyqypvqdvdd0r7is2321nnv";
+ sha256 = "1nplcabb8526bs5707k9212pi000wnskq3c9hbq9acgmdlnnwvgy";
};
buildInputs = [ pkgconfig djvulibre poppler fontconfig libjpeg ];
diff --git a/pkgs/tools/typesetting/tex/auctex/default.nix b/pkgs/tools/typesetting/tex/auctex/default.nix
index 9774d7d1a9486c1aae998c54b6bd4906c813f7a4..3a8b41da66090bb9a4d0902ffcd452ce60d509ef 100644
--- a/pkgs/tools/typesetting/tex/auctex/default.nix
+++ b/pkgs/tools/typesetting/tex/auctex/default.nix
@@ -6,7 +6,7 @@ stdenv.mkDerivation ( rec {
name = "${pname}-${version}";
meta = {
- description = "AUCTeX is an extensible package for writing and formatting TeX files in GNU Emacs and XEmacs.";
+ description = "Extensible package for writing and formatting TeX files in GNU Emacs and XEmacs";
homepage = http://www.gnu.org/software/auctex;
};
diff --git a/pkgs/tools/typesetting/tex/dblatex/default.nix b/pkgs/tools/typesetting/tex/dblatex/default.nix
index fa4746a562ea10a1406edd3c900d03e16f3eebe1..6993158291c24fa260d27831e821e2dbb991da05 100644
--- a/pkgs/tools/typesetting/tex/dblatex/default.nix
+++ b/pkgs/tools/typesetting/tex/dblatex/default.nix
@@ -1,4 +1,15 @@
-{ stdenv, fetchurl, python, libxslt, tetex }:
+{ stdenv, fetchurl, python, libxslt, tetex
+, enableAllFeatures ? false, imagemagick ? null, transfig ? null, inkscape ? null, fontconfig ? null, ghostscript ? null }:
+
+# NOTE: enableAllFeatures just purifies the expression, it doesn't actually
+# enable any extra features.
+
+assert enableAllFeatures ->
+ imagemagick != null &&
+ transfig != null &&
+ inkscape != null &&
+ fontconfig != null &&
+ ghostscript != null;
stdenv.mkDerivation rec {
name = "dblatex-0.3.4";
@@ -8,15 +19,39 @@ stdenv.mkDerivation rec {
sha256 = "120w3wm07qx0k1grgdhjwm2vpwil71icshjvqznskp1f6ggch290";
};
+ buildInputs = [ python libxslt tetex ]
+ ++ stdenv.lib.optionals enableAllFeatures [ imagemagick transfig ];
+
+ # TODO: dblatex tries to execute texindy command, but nixpkgs doesn't have
+ # that yet. In Ubuntu, texindy is a part of the xindy package.
+ preConfigure = ''
+ sed -i 's|self.install_layout == "deb"|False|' setup.py
+ '' + stdenv.lib.optionalString enableAllFeatures ''
+ for file in $(find -name "*.py"); do
+ sed -e 's|cmd = \["xsltproc|cmd = \["${libxslt}/bin/xsltproc|g' \
+ -e 's|Popen(\["xsltproc|Popen(\["${libxslt}/bin/xsltproc|g' \
+ -e 's|cmd = \["texindy|cmd = ["nixpkgs_is_missing_texindy|g' \
+ -e 's|cmd = "epstopdf|cmd = "${tetex}/bin/epstopdf|g' \
+ -e 's|cmd = \["makeindex|cmd = ["${tetex}/bin/makeindex|g' \
+ -e 's|doc.program = "pdflatex"|doc.program = "${tetex}/bin/pdflatex"|g' \
+ -e 's|self.program = "latex"|self.program = "${tetex}/bin/latex"|g' \
+ -e 's|Popen("pdflatex|Popen("${tetex}/bin/pdflatex|g' \
+ -e 's|"fc-match"|"${fontconfig}/bin/fc-match"|g' \
+ -e 's|"fc-list"|"${fontconfig}/bin/fc-list"|g' \
+ -e 's|cmd = "inkscape|cmd = "${inkscape}/bin/inkscape|g' \
+ -e 's|cmd = "fig2dev|cmd = "${transfig}/bin/fig2dev|g' \
+ -e 's|cmd = \["ps2pdf|cmd = ["${ghostscript}/bin/ps2pdf|g' \
+ -e 's|cmd = "convert|cmd = "${imagemagick}/bin/convert|g' \
+ -i "$file"
+ done
+ '';
+
buildPhase = "true";
installPhase = ''
- sed -i 's|self.install_layout == "deb"|False|' setup.py
- python ./setup.py install --prefix=$out
+ python ./setup.py install --prefix="$out" --use-python-path --verbose
'';
- buildInputs = [ python libxslt tetex ];
-
meta = {
description = "A program to convert DocBook to DVI, PostScript or PDF via LaTeX or ConTeXt";
homepage = http://dblatex.sourceforge.net/;
diff --git a/pkgs/tools/typesetting/tex/texlive/aggregate.nix b/pkgs/tools/typesetting/tex/texlive/aggregate.nix
index 84fa1cfab75a4be3cfc833cff5174ddbeaf2d560..2d1de93fed87f321b1fbd501631180b9631f1f5b 100644
--- a/pkgs/tools/typesetting/tex/texlive/aggregate.nix
+++ b/pkgs/tools/typesetting/tex/texlive/aggregate.nix
@@ -3,6 +3,7 @@ rec {
name = "TeXLive-linkdir";
buildInputs = lib.closePropagation paths
+ ++ [perl]
++ stdenv.lib.optional stdenv.isDarwin makeWrapper;
phaseNames = [ "doAggregate" ];
@@ -11,12 +12,15 @@ rec {
mkdir -p $out/bin
for currentPath in ${lib.concatStringsSep " " buildInputs}; do
echo Symlinking "$currentPath"
+ find $currentPath/share/info $currentPath/share/man $(echo $currentPath/texmf*/) -type d | while read; do
+ REPLY="''${REPLY#$currentPath}"
+ mkdir -p $out/"$REPLY"
+ done
find $currentPath/share/info $currentPath/share/man $(echo $currentPath/texmf*/) ! -type d | while read; do
REPLY="''${REPLY#$currentPath}"
- mkdir -p $out/"$(dirname "$REPLY")"
ln -fs $currentPath/"$REPLY" $out/"$REPLY"
echo
- done | while read; do head -n 99 >/dev/null; echo -n .; done
+ done | while read; do head -n 999 >/dev/null; echo -n .; done
for i in "$currentPath/bin/"* :; do
test "$i" != : || continue
@@ -31,8 +35,8 @@ rec {
ln -s $out/texmf* $out/share/
- rm -r $out/texmf-config
- find $out/texmf/ -type d | while read; do
+ rm -rf $out/texmf-config
+ find $out/texmf*/ -type d | while read; do
REPLY="''${REPLY#$out/texmf}"
mkdir -p $out/texmf-config/"$REPLY"
done
@@ -45,9 +49,10 @@ rec {
chmod a+x $out/bin/$(basename $i)
done
- rm $out/texmf*/ls-R
+ rm -f $out/texmf*/ls-R
for i in web2c texconfig fonts/map; do
- cp -Lr $out/texmf/$i/* $out/texmf-config/$i || true
+ mkdir -p $out/texmf-config/$i
+ cp -Lr $out/texmf*/$i/* $out/texmf-config/$i || true
done
chmod -R u+w $out/texmf-config
diff --git a/pkgs/tools/typesetting/tex/texlive/cm-super.nix b/pkgs/tools/typesetting/tex/texlive/cm-super.nix
index e23b393685071e72a968e79f4535979a2c593b13..4d161c3e05366678a1bbaf89a0eb1d7a96ec504c 100644
--- a/pkgs/tools/typesetting/tex/texlive/cm-super.nix
+++ b/pkgs/tools/typesetting/tex/texlive/cm-super.nix
@@ -10,16 +10,16 @@ rec {
doCopy = fullDepEntry (''
mkdir -p $out/share/
- mkdir -p $out/texmf/fonts/enc
- mkdir -p $out/texmf/fonts/map
- mkdir -p $out/texmf/fonts/type1/public/cm-super
- cp pfb/*.pfb $out/texmf/fonts/type1/public/cm-super
- mkdir -p $out/texmf/dvips/cm-super
- cp dvips/*.{map,enc} $out/texmf/dvips/cm-super
- cp dvips/*.enc $out/texmf/fonts/enc
- cp dvips/*.map $out/texmf/fonts/map
- mkdir -p $out/texmf/dvipdfm/config
- cp dvipdfm/*.map $out/texmf/dvipdfm/config
+ mkdir -p $out/texmf-dist/fonts/enc
+ mkdir -p $out/texmf-dist/fonts/map
+ mkdir -p $out/texmf-dist/fonts/type1/public/cm-super
+ cp pfb/*.pfb $out/texmf-dist/fonts/type1/public/cm-super
+ mkdir -p $out/texmf-dist/dvips/cm-super
+ cp dvips/*.{map,enc} $out/texmf-dist/dvips/cm-super
+ cp dvips/*.enc $out/texmf-dist/fonts/enc
+ cp dvips/*.map $out/texmf-dist/fonts/map
+ mkdir -p $out/texmf-dist/dvipdfm/config
+ cp dvipdfm/*.map $out/texmf-dist/dvipdfm/config
ln -s $out/texmf* $out/share/
'') ["minInit" "doUnpack" "defEnsureDir" "addInputs"];
diff --git a/pkgs/tools/typesetting/tex/texlive/context.nix b/pkgs/tools/typesetting/tex/texlive/context.nix
index a7161cea4c1bc05cfaec2de2e5aaaee6208bfc85..c0c702cd4189f4119aefb61fc3d1afd9d15c6f04 100644
--- a/pkgs/tools/typesetting/tex/texlive/context.nix
+++ b/pkgs/tools/typesetting/tex/texlive/context.nix
@@ -11,8 +11,8 @@ rec {
doCopy = fullDepEntry (''
mkdir -p $out/share/
- mkdir -p $out/texmf
- cp -r * $out/texmf
+ mkdir -p $out/texmf-dist
+ cp -r * $out/texmf-dist
ln -s $out/texmf* $out/share/
'') ["minInit" "doUnpack" "defEnsureDir" "addInputs"];
diff --git a/pkgs/tools/typesetting/tex/texlive/default.nix b/pkgs/tools/typesetting/tex/texlive/default.nix
index f119dbd1e4a110aaf122f5ad748d65bf880eff5c..57f7424dc2dae6adc770ab67de0203368eea15f8 100644
--- a/pkgs/tools/typesetting/tex/texlive/default.nix
+++ b/pkgs/tools/typesetting/tex/texlive/default.nix
@@ -1,18 +1,18 @@
args : with args;
rec {
src = fetchurl {
- url = mirror://debian/pool/main/t/texlive-bin/texlive-bin_2012.20120628.orig.tar.xz;
- sha256 = "0k94df3lfvghngzdzi2d4fz2z0gs8iglz7h3w2lxvlhiwwpmx601";
+ url = mirror://debian/pool/main/t/texlive-bin/texlive-bin_2013.20130729.30972.orig.tar.xz;
+ sha256 = "1idgyim6r4bi3id245k616qrdarfh65xv3gi2psarqqmsw504yhd";
};
texmfSrc = fetchurl {
- url = mirror://debian/pool/main/t/texlive-base/texlive-base_2012.20120611.orig.tar.xz;
- sha256 = "116zm0qdq9rd4vakhd2py9q7lq3ihspc7hy33bh8wy5v1rgiqsm6";
+ url = mirror://debian/pool/main/t/texlive-base/texlive-base_2013.20130918.orig.tar.xz;
+ sha256 = "0h7x49zsd2gs8fr28f4h04dv5m8p2mpgqxk2vvl5xlf4wwxxbm2p";
};
langTexmfSrc = fetchurl {
- url = mirror://debian/pool/main/t/texlive-lang/texlive-lang_2012.20120611.orig.tar.xz;
- sha256 = "0zh9svszfkbjx72i7sa9gg0gak93wf05845mxpjv56h8qwk4bffv";
+ url = mirror://debian/pool/main/t/texlive-lang/texlive-lang_2013.20131010.orig.tar.xz;
+ sha256 = "17wfd2qmyafv74ac3ssy9aga12g09l2q0r1p19fb4vvs0wrkwzbz";
};
setupHook = ./setup-hook.sh;
@@ -34,6 +34,8 @@ rec {
sed -e 's@\' -i $(find . -name configure)
+ sed -e 's/-lttf/-lfreetype/' -i $(find . -name configure)
+
sed -e s@ncurses/curses.h@curses.h@g -i $(grep ncurses/curses.h -rl . )
sed -e '1i\#include \n\#include ' -i $( find libs/teckit -name '*.cpp' -o -name '*.c' )
@@ -44,7 +46,7 @@ rec {
cd Work
'' ) [ "minInit" "doUnpack" "addInputs" "defEnsureDir" ];
- doPostInstall = fullDepEntry( ''
+ promoteLibexec = fullDepEntry (''
mkdir -p $out/libexec/
mv $out/bin $out/libexec/$(uname -m)
mkdir -p $out/bin
@@ -61,13 +63,15 @@ rec {
rm "$out/libexec/$(basename "$i")"
fi;
done
+ '') ["doMakeInstall"];
- [ -d $out/texmf-config ] || ln -s $out/texmf $out/texmf-config
- ln -s -v "$out/"*texmf* "$out/share/" || true
-
- sed -e 's/.*pyhyph.*/=&/' -i $out/texmf-config/tex/generic/config/language.dat
+ doPostInstall = fullDepEntry( ''
+ cp -r "$out/"texmf* "$out/share/" || true
+ rm -rf "$out"/texmf*
+ [ -d $out/share/texmf-config ] || ln -s $out/share/texmf-dist $out/share/texmf-config
+ ln -s "$out"/share/texmf* "$out"/
- PATH=$PATH:$out/bin mktexlsr $out/texmf*
+ PATH=$PATH:$out/bin mktexlsr $out/share/texmf*
HOME=. PATH=$PATH:$out/bin updmap-sys --syncwithtrees
@@ -80,25 +84,37 @@ rec {
#
# I find it acceptable, hence the "|| true".
echo "building format files..."
- mkdir -p "$out/texmf-var/web2c"
+ mkdir -p "$out/share/texmf-var/web2c"
+ ln -sf "$out"/out/share/texmf* "$out"/
PATH="$PATH:$out/bin" fmtutil-sys --all || true
- PATH=$PATH:$out/bin mktexlsr $out/texmf*
+ PATH=$PATH:$out/bin mktexlsr $out/share/texmf*
'' + stdenv.lib.optionalString stdenv.isDarwin ''
for prog in $out/bin/*; do
wrapProgram "$prog" --prefix DYLD_LIBRARY_PATH : "${poppler}/lib"
done
- '' ) [ "minInit" "defEnsureDir" "doUnpack" "doMakeInstall" ];
+ '' ) [ "minInit" "defEnsureDir" "doUnpack" "doMakeInstall" "promoteLibexec" "patchShebangsInterim"];
+
+ patchShebangsInterimBin = doPatchShebangs ''$out/bin/'';
+ patchShebangsInterimLibexec = doPatchShebangs ''$out/libexec/'';
+ patchShebangsInterimShareTexmfDist = doPatchShebangs ''$out/share/texmf-dist/scripts/'';
+ patchShebangsInterimTexmfDist = doPatchShebangs ''$out/texmf-dist/scripts/'';
+
+ patchShebangsInterim = fullDepEntry ("") ["patchShebangsInterimBin"
+ "patchShebangsInterimLibexec" "patchShebangsInterimTexmfDist"
+ "patchShebangsInterimShareTexmfDist"];
buildInputs = [ zlib bzip2 ncurses libpng flex bison libX11 libICE xproto
freetype t1lib gd libXaw icu ghostscript ed libXt libXpm libXmu libXext
xextproto perl libSM ruby expat curl libjpeg python fontconfig xz pkgconfig
- poppler silgraphite lesstif zziplib ]
+ poppler graphite2 lesstif zziplib harfbuzz texinfo ]
++ stdenv.lib.optionals stdenv.isDarwin [ makeWrapper ];
configureFlags = [ "--with-x11" "--enable-ipc" "--with-mktexfmt"
"--enable-shared" "--disable-native-texlive-build" "--with-system-zziplib"
- "--with-system-libgs" "--with-system-t1lib" "--with-system-freetype2" ]
+ "--with-system-libgs" "--with-system-t1lib" "--with-system-freetype2"
+ "--with-system-freetype=no" "--disable-ttf2pk" "--enable-ttf2pk2"
+ ]
++ ( if stdenv.isDarwin
# ironically, couldn't get xetex compiling on darwin
then [ "--disable-xetex" "--disable-xdv2pdf" "--disable-xdvipdfmx" ]
@@ -107,7 +123,7 @@ rec {
phaseNames = [ "addInputs" "doMainBuild" "doMakeInstall" "doPostInstall" ];
- name = "texlive-core-2012";
+ name = "texlive-core-2013";
meta = with stdenv.lib; {
description = "A TeX distribution";
diff --git a/pkgs/tools/typesetting/tex/texlive/extra.nix b/pkgs/tools/typesetting/tex/texlive/extra.nix
index 180019bb205f66d7334aa3e7631125a883c24e28..6613578e2c673aa32f34760a5753ce4c7ccb7525 100644
--- a/pkgs/tools/typesetting/tex/texlive/extra.nix
+++ b/pkgs/tools/typesetting/tex/texlive/extra.nix
@@ -1,9 +1,9 @@
args: with args;
rec {
- name = "texlive-extra-2012";
+ name = "texlive-extra-2013";
src = fetchurl {
- url = mirror://debian/pool/main/t/texlive-extra/texlive-extra_2012.20120611.orig.tar.xz;
- sha256 = "1wn2gwifb5ww6nb15zdbkk5yz5spynvwqscvrgxzb84p0z3hy8dq";
+ url = mirror://debian/pool/main/t/texlive-extra/texlive-extra_2013.20131010.orig.tar.xz;
+ sha256 = "1wciyjwp0swny22amwcnr6vvdwjy423856q7c3l1sd5b31xfbc18";
};
buildInputs = [texLive xz];
diff --git a/pkgs/tools/typesetting/tex/texlive/moderncv.nix b/pkgs/tools/typesetting/tex/texlive/moderncv.nix
index 28329cff91671886b9b9e1885ef0097f11c9cd8e..0ce1afbb41b3813e8e1987222801df428d7956eb 100644
--- a/pkgs/tools/typesetting/tex/texlive/moderncv.nix
+++ b/pkgs/tools/typesetting/tex/texlive/moderncv.nix
@@ -10,9 +10,9 @@ rec {
buildInputs = [texLive unzip];
phaseNames = ["doCopy"];
doCopy = fullDepEntry (''
- mkdir -p $out/texmf/tex/latex/moderncv $out/texmf/doc $out/share
- mv *.cls *.sty $out/texmf/tex/latex/moderncv/
- mv examples $out/texmf/doc/moderncv
+ mkdir -p $out/texmf-dist/tex/latex/moderncv $out/texmf-dist/doc $out/share
+ mv *.cls *.sty $out/texmf-dist/tex/latex/moderncv/
+ mv examples $out/texmf-dist/doc/moderncv
ln -s $out/texmf* $out/share/
'') ["minInit" "addInputs" "doUnpack" "defEnsureDir"];
diff --git a/pkgs/tools/typesetting/tex/texlive/moderntimeline.nix b/pkgs/tools/typesetting/tex/texlive/moderntimeline.nix
index d129cc62020e5eae59ed42bdfb5c149cfce106ef..4cb93794edfed7dbb7815ed525eeb9f9fc49c6a5 100644
--- a/pkgs/tools/typesetting/tex/texlive/moderntimeline.nix
+++ b/pkgs/tools/typesetting/tex/texlive/moderntimeline.nix
@@ -13,9 +13,9 @@ rec {
buildInputs = [texLive unzip];
phaseNames = ["doCopy"];
doCopy = fullDepEntry (''
- mkdir -p $out/texmf/tex/latex/moderntimeline $out/texmf/doc/moderntimeline $out/share
- mv *.dtx *.ins $out/texmf/tex/latex/moderntimeline/
- mv *.pdf $out/texmf/doc/moderntimeline/
+ mkdir -p $out/texmf-dist/tex/latex/moderntimeline $out/texmf-dist/doc/moderntimeline $out/share
+ mv *.dtx *.ins $out/texmf-dist/tex/latex/moderntimeline/
+ mv *.pdf $out/texmf-dist/doc/moderntimeline/
ln -s $out/texmf* $out/share/
'') ["minInit" "addInputs" "doUnpack" "defEnsureDir"];
diff --git a/pkgs/tools/typesetting/tex/texlive/pgf.nix b/pkgs/tools/typesetting/tex/texlive/pgf.nix
index 1f7abc126c3a8bf6161f0ba83fc67d3b2c5a8a63..b46229e98285320319ee1ab3ce7e3ffd08e5d3ee 100644
--- a/pkgs/tools/typesetting/tex/texlive/pgf.nix
+++ b/pkgs/tools/typesetting/tex/texlive/pgf.nix
@@ -14,8 +14,8 @@ rec {
phaseNames = ["doCopy"];
doCopy = fullDepEntry (''
mkdir -p $out/share/
- mkdir -p $out/texmf/tex/generic/pgf
- cp -r * $out/texmf/tex/generic/pgf
+ mkdir -p $out/texmf-dist/tex/generic/pgf
+ cp -r * $out/texmf-dist/tex/generic/pgf
ln -s $out/texmf* $out/share/
'') ["minInit" "doUnpack" "defEnsureDir" "addInputs"];
diff --git a/pkgs/tools/typesetting/tex/texlive/xcolor.nix b/pkgs/tools/typesetting/tex/texlive/xcolor.nix
index e59a58ce9b26ca2972bb28d296aae0d71f92cee6..892734afe4619cca30fc29a16ecca47dcd4ac5de 100644
--- a/pkgs/tools/typesetting/tex/texlive/xcolor.nix
+++ b/pkgs/tools/typesetting/tex/texlive/xcolor.nix
@@ -12,11 +12,11 @@ rec {
export HOME=$PWD
mkdir -p $out/share/
- mkdir -p $out/texmf/tex/latex/xcolor
- mkdir -p $out/texmf/dvips/xcolor
+ mkdir -p $out/texmf-dist/tex/latex/xcolor
+ mkdir -p $out/texmf-dist/dvips/xcolor
latex xcolor.ins
- cp *.sty *.def $out/texmf/tex/latex/xcolor
- cp *.pro $out/texmf/dvips/xcolor
+ cp *.sty *.def $out/texmf-dist/tex/latex/xcolor
+ cp *.pro $out/texmf-dist/dvips/xcolor
#latex xcolor.dtx
#latex xcolor.dtx
@@ -25,8 +25,8 @@ rec {
#latex xcolor.dtx
rm *.sty *.pro *.ins *.def *.dtx
- mkdir -p $out/texmf/doc/latex-xcolor
- cp * $out/texmf/doc/latex-xcolor
+ mkdir -p $out/texmf-dist/doc/latex-xcolor
+ cp * $out/texmf-dist/doc/latex-xcolor
ln -s $out/texmf* $out/share/
'') ["minInit" "doUnpack" "defEnsureDir" "addInputs"];
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index 7d129ac55a58675bca64ba5f200f1d2f4311bb8e..7ed4486c98c24728e1ad8ccaaa8a7661c8c99f16 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -46,7 +46,7 @@ let config_ = config; platform_ = platform; in # rename the function arguments
let
- lib = import ../lib;
+ lib = import ../../lib;
# The contents of the configuration file found at $NIXPKGS_CONFIG or
# $HOME/.nixpkgs/config.nix.
@@ -381,7 +381,7 @@ let
inherit pkgs;
};
- composableDerivation = (import ../lib/composable-derivation.nix) {
+ composableDerivation = (import ../../lib/composable-derivation.nix) {
inherit pkgs lib;
};
@@ -497,6 +497,10 @@ let
autojump = callPackage ../tools/misc/autojump { };
+ autorandr = callPackage ../tools/misc/autorandr {
+ inherit (xorg) xrandr xdpyinfo;
+ };
+
avahi = callPackage ../development/libraries/avahi {
qt4Support = config.avahi.qt4Support or false;
};
@@ -568,14 +572,20 @@ let
asciidoc = callPackage ../tools/typesetting/asciidoc {
inherit (pythonPackages) matplotlib numpy aafigure recursivePthLoader;
+ enableStandardFeatures = false;
};
+ asciidocFull = appendToName "full" (asciidoc.override {
+ inherit (pythonPackages) pygments;
+ enableStandardFeatures = true;
+ });
+
autossh = callPackage ../tools/networking/autossh { };
bacula = callPackage ../tools/backup/bacula { };
bgs = callPackage ../tools/X11/bgs { };
-
+
bibtextools = callPackage ../tools/typesetting/bibtex-tools {
inherit (strategoPackages016) strategoxt sdf;
};
@@ -825,6 +835,8 @@ let
ethtool = callPackage ../tools/misc/ethtool { };
+ ettercap = callPackage ../applications/networking/sniffers/ettercap { };
+
euca2ools = callPackage ../tools/virtualization/euca2ools { pythonPackages = python26Packages; };
evtest = callPackage ../applications/misc/evtest { };
@@ -959,9 +971,7 @@ let
gnupatch = callPackage ../tools/text/gnupatch { };
- gnupg1orig = callPackage ../tools/security/gnupg1 {
- ideaSupport = false;
- };
+ gnupg1orig = callPackage ../tools/security/gnupg1 { };
gnupg1compat = callPackage ../tools/security/gnupg1compat { };
@@ -1032,7 +1042,7 @@ let
gtmess = callPackage ../applications/networking/instant-messengers/gtmess { };
- gummiboot = callPackage ../tools/misc/gummiboot { };
+ gummiboot = callPackage ../tools/misc/gummiboot { stdenv = overrideGCC stdenv gcc47; };
gupnp = callPackage ../development/libraries/gupnp {
inherit (gnome) libsoup;
@@ -1050,6 +1060,8 @@ let
gzip = callPackage ../tools/compression/gzip { };
+ gzrt = callPackage ../tools/compression/gzrt { };
+
partclone = callPackage ../tools/backup/partclone { };
partimage = callPackage ../tools/backup/partimage { };
@@ -1058,6 +1070,8 @@ let
haproxy = callPackage ../tools/networking/haproxy { };
+ haveged = callPackage ../tools/security/haveged { };
+
hardlink = callPackage ../tools/system/hardlink { };
halibut = callPackage ../tools/typesetting/halibut { };
@@ -1549,6 +1563,8 @@ let
pk2cmd = callPackage ../tools/misc/pk2cmd { };
+ plantuml = callPackage ../tools/misc/plantuml { };
+
plan9port = callPackage ../tools/system/plan9port { };
ploticus = callPackage ../tools/graphics/ploticus {
@@ -1585,6 +1601,8 @@ let
pptp = callPackage ../tools/networking/pptp {};
+ prey-bash-client = callPackage ../tools/security/prey { };
+
proxychains = callPackage ../tools/networking/proxychains { };
proxytunnel = callPackage ../tools/misc/proxytunnel { };
@@ -1715,7 +1733,7 @@ let
sdcv = callPackage ../applications/misc/sdcv { };
- seccure = callPackage ../tools/security/seccure/0.4.nix { };
+ seccure = callPackage ../tools/security/seccure { };
setserial = builderDefsPackage (import ../tools/system/setserial) {
inherit groff;
@@ -1783,6 +1801,8 @@ let
sshfsFuse = callPackage ../tools/filesystems/sshfs-fuse { };
+ sshuttle = callPackage ../tools/security/sshuttle { };
+
sudo = callPackage ../tools/security/sudo { };
suidChroot = builderDefsPackage (import ../tools/system/suid-chroot) { };
@@ -1930,6 +1950,8 @@ let
htmlTidy = callPackage ../tools/text/html-tidy { };
+ html-xml-utils = callPackage ../tools/text/xml/html-xml-utils { };
+
tftp_hpa = callPackage ../tools/networking/tftp-hpa {};
tigervnc = callPackage ../tools/admin/tigervnc {
@@ -3171,6 +3193,8 @@ let
j = callPackage ../development/interpreters/j {};
+ jmeter = callPackage ../applications/networking/jmeter {};
+
kaffe = callPackage ../development/interpreters/kaffe { };
kona = callPackage ../development/interpreters/kona {};
@@ -4334,8 +4358,8 @@ let
gnet = callPackage ../development/libraries/gnet { };
- gnu_efi = callPackage ../development/libraries/gnu-efi {
- stdenv = overrideInStdenv stdenv [gnumake381];
+ gnu-efi = callPackage ../development/libraries/gnu-efi {
+ stdenv = overrideGCC stdenv gcc47;
};
gnutls = callPackage ../development/libraries/gnutls {
@@ -4346,6 +4370,10 @@ let
guileBindings = config.gnutls.guile or true;
};
+ gnutls32 = callPackage ../development/libraries/gnutls/3.2.nix {
+ guileBindings = config.gnutls.guile or true;
+ };
+
gnutls_without_guile = lowPrio (gnutls.override { guileBindings = false; });
gnutls2_without_guile = lowPrio (gnutls2.override { guileBindings = false; });
@@ -4445,6 +4473,8 @@ let
gts = callPackage ../development/libraries/gts { };
+ gurobi = callPackage ../development/libraries/gurobi {};
+
gvfs = callPackage ../development/libraries/gvfs { };
gwenhywfar = callPackage ../development/libraries/gwenhywfar { };
@@ -4454,7 +4484,10 @@ let
heimdal = callPackage ../development/libraries/kerberos/heimdal.nix { };
- harfbuzz = callPackage ../development/libraries/harfbuzz { };
+ harfbuzz = callPackage ../development/libraries/harfbuzz {
+ icu = null;
+ graphite2 = null;
+ };
hawknl = callPackage ../development/libraries/hawknl { };
@@ -4836,6 +4869,8 @@ let
libtool = libtool_1_5;
};
+ libjson_rpc_cpp = callPackage ../development/libraries/libjson-rpc-cpp { };
+
libkate = callPackage ../development/libraries/libkate { };
libksba = callPackage ../development/libraries/libksba { };
@@ -4889,6 +4924,8 @@ let
libmusicbrainz = libmusicbrainz3;
+ libnet = callPackage ../development/libraries/libnet { };
+
libnetfilter_conntrack = callPackage ../development/libraries/libnetfilter_conntrack { };
libnetfilter_queue = callPackage ../development/libraries/libnetfilter_queue { };
@@ -4963,6 +5000,8 @@ let
else stdenv;
};
+ libsodium = callPackage ../development/libraries/libsodium { };
+
libsoup = callPackage ../development/libraries/libsoup { };
libssh = callPackage ../development/libraries/libssh { };
@@ -4992,6 +5031,8 @@ let
else stdenv;
};
+ libtoxcore = callPackage ../development/libraries/libtoxcore { };
+
libtunepimp = callPackage ../development/libraries/libtunepimp { };
libtxc_dxtn = callPackage ../development/libraries/libtxc_dxtn { };
@@ -5098,6 +5139,9 @@ let
libyaml = callPackage ../development/libraries/libyaml { };
+ libyamlcpp = callPackage ../development/libraries/libyaml-cpp { };
+ libyamlcpp03 = callPackage ../development/libraries/libyaml-cpp/0.3.x.nix { };
+
libzip = callPackage ../development/libraries/libzip { };
libzrtpcpp = callPackage ../development/libraries/libzrtpcpp { };
@@ -5519,9 +5563,23 @@ let
SDL_ttf = callPackage ../development/libraries/SDL_ttf { };
+ SDL2 = callPackage ../development/libraries/SDL2 {
+ openglSupport = mesaSupported;
+ alsaSupport = true;
+ x11Support = true;
+ pulseaudioSupport = false; # better go through ALSA
+ };
+
+ SDL2_image = callPackage ../development/libraries/SDL2_image { };
+
+ SDL2_mixer = callPackage ../development/libraries/SDL2_mixer { };
+
+ SDL2_gfx = callPackage ../development/libraries/SDL2_gfx { };
+
serd = callPackage ../development/libraries/serd {};
silgraphite = callPackage ../development/libraries/silgraphite {};
+ graphite2 = callPackage ../development/libraries/silgraphite/graphite2.nix {};
simgear = callPackage ../development/libraries/simgear { };
@@ -5871,6 +5929,17 @@ let
jquery_ui = callPackage ../development/libraries/javascript/jquery-ui { };
+ ### DEVELOPMENT / LISP MODULES
+
+ asdf = callPackage ../development/lisp-modules/asdf {};
+ clwrapperFunction = callPackage ../development/lisp-modules/clwrapper;
+ wrapLisp = lisp: clwrapperFunction {lisp=lisp;};
+ lispPackagesFor = clwrapper: callPackage ../development/lisp-modules/lisp-packages.nix{
+ inherit clwrapper;
+ };
+ lispPackagesClisp = lispPackagesFor (wrapLisp clisp);
+ lispPackagesSBCL = lispPackagesFor (wrapLisp sbcl);
+ lispPackages = recurseIntoAttrs lispPackagesSBCL;
### DEVELOPMENT / PERL MODULES
@@ -6172,22 +6241,12 @@ let
riak = callPackage ../servers/nosql/riak/1.3.1.nix { };
- mysql4 = import ../servers/sql/mysql {
- inherit fetchurl stdenv ncurses zlib perl;
- ps = procps; /* !!! Linux only */
- };
-
- mysql5 = import ../servers/sql/mysql5 {
- inherit fetchurl stdenv ncurses zlib perl openssl;
- ps = procps; /* !!! Linux only */
- };
-
- mysql51 = import ../servers/sql/mysql51 {
+ mysql51 = import ../servers/sql/mysql/5.1.x.nix {
inherit fetchurl ncurses zlib perl openssl stdenv;
ps = procps; /* !!! Linux only */
};
- mysql55 = callPackage ../servers/sql/mysql55 { };
+ mysql55 = callPackage ../servers/sql/mysql/5.5.x.nix { };
mysql = mysql51;
@@ -6931,7 +6990,7 @@ let
systemd_with_lvm2 = pkgs.lib.overrideDerivation pkgs.systemd (p: {
name = p.name + "-with-lvm2";
postInstall = p.postInstall + ''
- cp ${pkgs.lvm2}/lib/systemd/system-generators/* $out/lib/systemd/system-generators
+ cp "${pkgs.lvm2}/lib/systemd/system-generators/"* $out/lib/systemd/system-generators
'';
});
@@ -6987,7 +7046,7 @@ let
upower = callPackage ../os-specific/linux/upower {
libusb1 = callPackage ../development/libraries/libusb1/1_0_9.nix {};
- };
+ };
upstart = callPackage ../os-specific/linux/upstart { };
@@ -7501,6 +7560,8 @@ let
dvswitch = callPackage ../applications/video/dvswitch { };
+ dwb = callPackage ../applications/networking/browsers/dwb { };
+
dwm = callPackage ../applications/window-managers/dwm {
patches = config.dwm.patches or [];
};
@@ -8256,7 +8317,7 @@ let
mpg123 = callPackage ../applications/audio/mpg123 { };
mpg321 = callPackage ../applications/audio/mpg321 { };
-
+
mpc_cli = callPackage ../applications/audio/mpc { };
ncmpcpp = callPackage ../applications/audio/ncmpcpp { };
@@ -8443,6 +8504,8 @@ let
pidginsipe = callPackage ../applications/networking/instant-messengers/pidgin-plugins/sipe { };
+ toxprpl = callPackage ../applications/networking/instant-messengers/pidgin-plugins/tox-prpl { };
+
pinfo = callPackage ../applications/misc/pinfo { };
pinta = callPackage ../applications/graphics/pinta {
@@ -8626,10 +8689,7 @@ let
stalonetray = callPackage ../applications/window-managers/stalonetray {};
- stumpwm = builderDefsPackage (import ../applications/window-managers/stumpwm) {
- texinfo = texinfo4; # otherwise error: @itemx must follow @item
- clisp = clisp_2_44_1;
- };
+ stumpwm = lispPackages.stumpwm;
sublime = callPackage ../applications/editors/sublime { };
@@ -8726,10 +8786,10 @@ let
wrapPython = pythonPackages.wrapPython;
};
- # This builds the gtk client
- transmission_260 = callPackage ../applications/networking/p2p/transmission/2.60.nix { };
+ toxic = callPackage ../applications/networking/instant-messengers/toxic { };
transmission = callPackage ../applications/networking/p2p/transmission { };
+ transmission_gtk = transmission.override { enableGTK3 = true; };
transmission_remote_gtk = callPackage ../applications/networking/p2p/transmission-remote-gtk {};
@@ -8843,7 +8903,10 @@ let
graphicsSupport = false;
};
- weechat = callPackage ../applications/networking/irc/weechat { };
+ weechat = callPackage ../applications/networking/irc/weechat {
+ # weechat crashes on /exit when using gnutls 3.1.x. gnutls 3.2.x works.
+ gnutls = gnutls32;
+ };
weston = callPackage ../applications/window-managers/weston {
cairo = cairo.override {
@@ -8896,7 +8959,7 @@ let
enableGnash = cfg.enableGnash or false;
in
import ../applications/networking/browsers/firefox/wrapper.nix {
- inherit stdenv makeWrapper makeDesktopItem browser browserName desktopName nameSuffix icon;
+ inherit stdenv lib makeWrapper makeDesktopItem browser browserName desktopName nameSuffix icon;
plugins =
assert !(enableGnash && enableAdobeFlash);
([ ]
@@ -8933,6 +8996,8 @@ let
xbmc = callPackage ../applications/video/xbmc { };
+ xca = callPackage ../applications/misc/xca { };
+
xcalib = callPackage ../tools/X11/xcalib { };
xcape = callPackage ../tools/X11/xcape { };
@@ -9092,7 +9157,17 @@ let
drumkv1 = callPackage ../applications/audio/drumkv1 { };
- dwarf_fortress = callPackage_i686 ../games/dwarf-fortress { };
+ dwarf_fortress = callPackage_i686 ../games/dwarf-fortress {
+ SDL_image = pkgsi686Linux.SDL_image.override {
+ libpng = pkgsi686Linux.libpng12;
+ };
+ };
+
+ dwarf_fortress_modable = appendToName "moddable" (dwarf_fortress.override {
+ copyDataDirectory = true;
+ });
+
+ dwarf-therapist = callPackage ../games/dwarf-therapist { };
d1x_rebirth = callPackage ../games/d1x-rebirth { };
@@ -9214,6 +9289,8 @@ let
scorched3d = callPackage ../games/scorched3d { };
+ sdlmame = callPackage ../games/sdlmame { };
+
sgtpuzzles = builderDefsPackage (import ../games/sgt-puzzles) {
inherit pkgconfig fetchsvn perl gtk;
inherit (xlibs) libX11;
@@ -9363,14 +9440,6 @@ let
kde4 = recurseIntoAttrs pkgs.kde410;
- kde48 = kdePackagesFor (pkgs.kde48 // {
- boost = boost149;
- eigen = eigen2;
- libotr = libotr_3_2;
- libgphoto2 = libgphoto2_4;
- libcanberra = libcanberra_kde;
- }) ../desktops/kde-4.8;
-
kde410 = kdePackagesFor (pkgs.kde410 // {
boost = boost149;
eigen = eigen2;
@@ -9420,6 +9489,8 @@ let
else
callPackage ../applications/graphics/digikam { };
+ eventlist = callPackage ../applications/office/eventlist {};
+
k3b = callPackage ../applications/misc/k3b { };
kadu = callPackage ../applications/networking/instant-messengers/kadu { };
@@ -9809,7 +9880,13 @@ let
dbacl = callPackage ../tools/misc/dbacl { };
- dblatex = callPackage ../tools/typesetting/tex/dblatex { };
+ dblatex = callPackage ../tools/typesetting/tex/dblatex {
+ enableAllFeatures = false;
+ };
+
+ dblatexFull = appendToName "full" (dblatex.override {
+ enableAllFeatures = true;
+ });
dosbox = callPackage ../misc/emulators/dosbox { };
@@ -9882,13 +9959,10 @@ let
stateDir = config.nix.stateDir or "/nix/var";
};
- nixUnstable = nixStable;
- /*
nixUnstable = callPackage ../tools/package-management/nix/unstable.nix {
storeDir = config.nix.storeDir or "/nix/store";
stateDir = config.nix.stateDir or "/nix/var";
};
- */
nixops = callPackage ../tools/package-management/nixops { };
@@ -9995,11 +10069,14 @@ let
texLive = builderDefsPackage (import ../tools/typesetting/tex/texlive) {
inherit builderDefs zlib bzip2 ncurses libpng ed lesstif ruby
- gd t1lib freetype icu perl expat curl xz pkgconfig zziplib
- libjpeg bison python fontconfig flex poppler silgraphite makeWrapper;
+ gd t1lib freetype icu perl expat curl xz pkgconfig zziplib texinfo
+ libjpeg bison python fontconfig flex poppler graphite2 makeWrapper;
inherit (xlibs) libXaw libX11 xproto libXt libXpm
libXmu libXext xextproto libSM libICE;
ghostscript = ghostscriptX;
+ harfbuzz = harfbuzz.override {
+ inherit icu graphite2;
+ };
};
texLiveFull = lib.setName "texlive-full" (texLiveAggregationFun {
@@ -10022,7 +10099,7 @@ let
*/
texLiveAggregationFun = params:
builderDefsPackage (import ../tools/typesetting/tex/texlive/aggregate.nix)
- ({inherit poppler makeWrapper;} // params);
+ ({inherit poppler perl makeWrapper;} // params);
texDisser = callPackage ../tools/typesetting/tex/disser {};
diff --git a/pkgs/top-level/haskell-packages.nix b/pkgs/top-level/haskell-packages.nix
index 9ea44e1d6cec23023a9df89cedf970259f6bd8d8..9a7c933fc4dc21935b8c3bbbfc8e48d322827776 100644
--- a/pkgs/top-level/haskell-packages.nix
+++ b/pkgs/top-level/haskell-packages.nix
@@ -145,7 +145,7 @@ let result = let callPackage = x : y : modifyPrio (newScope result.finalReturn x
HTTP = self.HTTP_4000_2_8;
HUnit = self.HUnit_1_2_5_2;
mtl = self.mtl_2_1_2;
- network = self.network_2_4_1_2;
+ network = self.network_2_4_2_0;
OpenGL = self.OpenGL_2_8_0_0;
OpenGLRaw = self.OpenGLRaw_1_4_0_0;
parallel = self.parallel_3_2_0_3;
@@ -590,6 +590,10 @@ let result = let callPackage = x : y : modifyPrio (newScope result.finalReturn x
bindingsDSL = callPackage ../development/libraries/haskell/bindings-DSL {};
+ bindingsLibusb = callPackage ../development/libraries/haskell/bindings-libusb {
+ libusb = pkgs.libusb1;
+ };
+
bindingsPosix = callPackage ../development/libraries/haskell/bindings-posix {};
bitarray = callPackage ../development/libraries/haskell/bitarray {};
@@ -648,7 +652,7 @@ let result = let callPackage = x : y : modifyPrio (newScope result.finalReturn x
Cabal_1_14_0 = callPackage ../development/libraries/haskell/Cabal/1.14.0.nix { cabal = self.cabal.override { Cabal = null; }; };
Cabal_1_16_0_3 = callPackage ../development/libraries/haskell/Cabal/1.16.0.3.nix { cabal = self.cabal.override { Cabal = null; }; };
- Cabal_1_18_1 = callPackage ../development/libraries/haskell/Cabal/1.18.1.nix {
+ Cabal_1_18_1_1 = callPackage ../development/libraries/haskell/Cabal/1.18.1.1.nix {
cabal = self.cabal.override { Cabal = null; };
deepseq = self.deepseq_1_3_0_1;
};
@@ -741,6 +745,8 @@ let result = let callPackage = x : y : modifyPrio (newScope result.finalReturn x
configurator = callPackage ../development/libraries/haskell/configurator {};
+ connection = callPackage ../development/libraries/haskell/connection {};
+
constraints = callPackage ../development/libraries/haskell/constraints {};
convertible = callPackage ../development/libraries/haskell/convertible {};
@@ -1147,7 +1153,7 @@ let result = let callPackage = x : y : modifyPrio (newScope result.finalReturn x
haskellSrcExts_1_13_5 = callPackage ../development/libraries/haskell/haskell-src-exts/1.13.5.nix {};
haskellSrcExts_1_14_0 = callPackage ../development/libraries/haskell/haskell-src-exts/1.14.0.nix {};
- haskellSrcExts = self.haskellSrcExts_1_13_5;
+ haskellSrcExts = self.haskellSrcExts_1_14_0;
haskellSrcMeta = callPackage ../development/libraries/haskell/haskell-src-meta {};
@@ -1242,7 +1248,9 @@ let result = let callPackage = x : y : modifyPrio (newScope result.finalReturn x
hsemail = callPackage ../development/libraries/haskell/hsemail {};
- hslua = callPackage ../development/libraries/haskell/hslua {};
+ hslua = callPackage ../development/libraries/haskell/hslua {
+ lua = pkgs.lua5_1;
+ };
HSH = callPackage ../development/libraries/haskell/HSH {};
@@ -1397,13 +1405,9 @@ let result = let callPackage = x : y : modifyPrio (newScope result.finalReturn x
ListZipper = callPackage ../development/libraries/haskell/ListZipper {};
- llvmGeneral_3_3_5 = callPackage ../development/libraries/haskell/llvm-general/3.3.5.nix {
+ llvmGeneral = callPackage ../development/libraries/haskell/llvm-general {
llvmConfig = pkgs.llvm;
};
- llvmGeneral_3_3_8_2 = callPackage ../development/libraries/haskell/llvm-general/3.3.8.2.nix {
- llvmConfig = pkgs.llvm;
- };
- llvmGeneral = self.llvmGeneral_3_3_8_2;
llvmGeneralPure = callPackage ../development/libraries/haskell/llvm-general-pure {};
@@ -1543,7 +1547,8 @@ let result = let callPackage = x : y : modifyPrio (newScope result.finalReturn x
network_2_3_0_13 = callPackage ../development/libraries/haskell/network/2.3.0.13.nix {};
network_2_3_1_0 = callPackage ../development/libraries/haskell/network/2.3.1.0.nix {};
network_2_4_1_2 = callPackage ../development/libraries/haskell/network/2.4.1.2.nix {};
- network = self.network_2_4_1_2;
+ network_2_4_2_0 = callPackage ../development/libraries/haskell/network/2.4.2.0.nix {};
+ network = self.network_2_4_2_0;
networkConduit = callPackage ../development/libraries/haskell/network-conduit {};
networkConduitTls = callPackage ../development/libraries/haskell/network-conduit-tls {};
@@ -2135,6 +2140,8 @@ let result = let callPackage = x : y : modifyPrio (newScope result.finalReturn x
urlencoded = callPackage ../development/libraries/haskell/urlencoded {};
+ usb = callPackage ../development/libraries/haskell/usb {};
+
utf8Light = callPackage ../development/libraries/haskell/utf8-light {};
utf8String = callPackage ../development/libraries/haskell/utf8-string {};
@@ -2421,9 +2428,7 @@ let result = let callPackage = x : y : modifyPrio (newScope result.finalReturn x
darcs = callPackage ../applications/version-management/darcs {};
- idris_plain = callPackage ../development/compilers/idris {
- llvmGeneral = self.llvmGeneral_3_3_5;
- };
+ idris_plain = callPackage ../development/compilers/idris {};
idris = callPackage ../development/compilers/idris/wrapper.nix {};
@@ -2456,7 +2461,7 @@ let result = let callPackage = x : y : modifyPrio (newScope result.finalReturn x
cabalInstall_0_14_0 = callPackage ../tools/package-management/cabal-install/0.14.0.nix {};
cabalInstall_1_16_0_2 = callPackage ../tools/package-management/cabal-install/1.16.0.2.nix {};
cabalInstall_1_18_0_2 = callPackage ../tools/package-management/cabal-install/1.18.0.2.nix {
- Cabal = self.Cabal_1_18_1;
+ Cabal = self.Cabal_1_18_1_1;
};
cabalInstall = self.cabalInstall_1_18_0_2;
diff --git a/pkgs/top-level/make-tarball.nix b/pkgs/top-level/make-tarball.nix
index ab15c201d92d808ae38d2cee3e8604a6f535e8f9..b50f064af0c62fb2d748fdb5c99d03ebabed8399 100644
--- a/pkgs/top-level/make-tarball.nix
+++ b/pkgs/top-level/make-tarball.nix
@@ -1,4 +1,4 @@
-/* Hydra job to build a tarball for Nixpkgs from a SVN checkout. It
+/* Hydra job to build a tarball for Nixpkgs from a Git checkout. It
also builds the documentation and tests whether the Nix expressions
evaluate correctly. */
@@ -6,13 +6,13 @@
with import nixpkgs.outPath {};
-releaseTools.sourceTarball {
+releaseTools.sourceTarball rec {
name = "nixpkgs-tarball";
src = nixpkgs;
- inherit officialRelease;
- version = builtins.readFile ../../VERSION;
- versionSuffix = if officialRelease then "" else "pre${toString nixpkgs.revCount}_${nixpkgs.shortRev}";
+ inherit officialRelease;
+ version = builtins.readFile ../../.version;
+ versionSuffix = "pre${toString nixpkgs.revCount}.${nixpkgs.shortRev}";
buildInputs = [
lzma
@@ -26,8 +26,8 @@ releaseTools.sourceTarball {
configurePhase = ''
eval "$preConfigure"
releaseName=nixpkgs-$VERSION$VERSION_SUFFIX
+ echo -n $VERSION_SUFFIX > .version-suffix
echo "release name is $releaseName"
- echo $releaseName > relname
'';
dontBuild = false;
@@ -47,7 +47,7 @@ releaseTools.sourceTarball {
nix-store --init
# Run the regression tests in `lib'.
- res="$(nix-instantiate --eval-only --strict --show-trace pkgs/lib/tests.nix)"
+ res="$(nix-instantiate --eval-only --strict --show-trace lib/tests.nix)"
if test "$res" != "[ ]"; then
echo "regression tests for lib failed, got: $res"
exit 1
@@ -63,8 +63,7 @@ releaseTools.sourceTarball {
done
header "checking eval-release.nix"
- nix-instantiate --eval-only --strict --xml --show-trace ./maintainers/scripts/eval-release.nix > $TMPDIR/out.xml
- xmllint --noout $TMPDIR/out.xml
+ nix-instantiate --eval-only --strict --show-trace ./maintainers/scripts/eval-release.nix > /dev/null
stopNest
'';
diff --git a/pkgs/top-level/node-packages-generated.nix b/pkgs/top-level/node-packages-generated.nix
index 4cc473fe29a9602c03ece56718b3fcc5bb6d9aab..52a9f33cafae51cae3e59e23731d466fcefd5ebc 100644
--- a/pkgs/top-level/node-packages-generated.nix
+++ b/pkgs/top-level/node-packages-generated.nix
@@ -165,6 +165,23 @@
passthru.names = [ "almond" ];
};
"almond" = self.full."almond"."*";
+ full."ambi"."~2.1.4" = lib.makeOverridable self.buildNodePackage {
+ name = "ambi-2.1.4";
+ src = [
+ (fetchurl {
+ url = "http://registry.npmjs.org/ambi/-/ambi-2.1.4.tgz";
+ sha1 = "1c0bafb3b1058754e1c3f9d7383948fc1b7c6926";
+ })
+ ];
+ buildInputs =
+ (self.nativeDeps."ambi"."~2.1.4" or []);
+ deps = [
+ self.full."typechecker"."~2.0.6"
+ ];
+ peerDependencies = [
+ ];
+ passthru.names = [ "ambi" ];
+ };
full."amdefine"."*" = lib.makeOverridable self.buildNodePackage {
name = "amdefine-0.0.8";
src = [
@@ -297,11 +314,11 @@
passthru.names = [ "apparatus" ];
};
full."archiver"."~0.4.6" = lib.makeOverridable self.buildNodePackage {
- name = "archiver-0.4.9";
+ name = "archiver-0.4.10";
src = [
(fetchurl {
- url = "http://registry.npmjs.org/archiver/-/archiver-0.4.9.tgz";
- sha1 = "7c8a5c8f186497b430698855b1a827af81ce94f1";
+ url = "http://registry.npmjs.org/archiver/-/archiver-0.4.10.tgz";
+ sha1 = "df0feac8f1d1295e5eceb3a205559072d21f4747";
})
];
buildInputs =
@@ -432,6 +449,22 @@
];
passthru.names = [ "assert-plus" ];
};
+ full."assertion-error"."1.0.0" = lib.makeOverridable self.buildNodePackage {
+ name = "assertion-error-1.0.0";
+ src = [
+ (fetchurl {
+ url = "http://registry.npmjs.org/assertion-error/-/assertion-error-1.0.0.tgz";
+ sha1 = "c7f85438fdd466bc7ca16ab90c81513797a5d23b";
+ })
+ ];
+ buildInputs =
+ (self.nativeDeps."assertion-error"."1.0.0" or []);
+ deps = [
+ ];
+ peerDependencies = [
+ ];
+ passthru.names = [ "assertion-error" ];
+ };
full."async"."*" = lib.makeOverridable self.buildNodePackage {
name = "async-0.2.9";
src = [
@@ -610,11 +643,11 @@
passthru.names = [ "async" ];
};
full."aws-sdk"."*" = lib.makeOverridable self.buildNodePackage {
- name = "aws-sdk-1.6.0";
+ name = "aws-sdk-1.7.1";
src = [
(self.patchLatest {
- url = "http://registry.npmjs.org/aws-sdk/-/aws-sdk-1.6.0.tgz";
- sha1 = "7541e3057a0a7bf9d749ddf2c10fffc7c24997ed";
+ url = "http://registry.npmjs.org/aws-sdk/-/aws-sdk-1.7.1.tgz";
+ sha1 = "802748ea85a6c508b8665bbf22050c879af17695";
})
];
buildInputs =
@@ -629,11 +662,11 @@
};
"aws-sdk" = self.full."aws-sdk"."*";
full."aws-sdk".">=1.2.0 <2" = lib.makeOverridable self.buildNodePackage {
- name = "aws-sdk-1.6.0";
+ name = "aws-sdk-1.7.1";
src = [
(self.patchLatest {
- url = "http://registry.npmjs.org/aws-sdk/-/aws-sdk-1.6.0.tgz";
- sha1 = "7541e3057a0a7bf9d749ddf2c10fffc7c24997ed";
+ url = "http://registry.npmjs.org/aws-sdk/-/aws-sdk-1.7.1.tgz";
+ sha1 = "802748ea85a6c508b8665bbf22050c879af17695";
})
];
buildInputs =
@@ -881,11 +914,11 @@
passthru.names = [ "boom" ];
};
full."bower"."*" = lib.makeOverridable self.buildNodePackage {
- name = "bower-1.2.6";
+ name = "bower-1.2.7";
src = [
(fetchurl {
- url = "http://registry.npmjs.org/bower/-/bower-1.2.6.tgz";
- sha1 = "a8b7bd344601554821957b9ab62fb436febc674d";
+ url = "http://registry.npmjs.org/bower/-/bower-1.2.7.tgz";
+ sha1 = "5b0505c8192bd61a752a7cf8b718d1b3054cd554";
})
];
buildInputs =
@@ -909,7 +942,7 @@
self.full."inquirer"."~0.3.0"
self.full."junk"."~0.2.0"
self.full."mkdirp"."~0.3.5"
- self.full."mout"."~0.6.0"
+ self.full."mout"."~0.7.0"
self.full."nopt"."~2.1.1"
self.full."lru-cache"."~2.3.0"
self.full."open"."~0.0.3"
@@ -935,11 +968,11 @@
};
"bower" = self.full."bower"."*";
full."bower".">=0.9.0" = lib.makeOverridable self.buildNodePackage {
- name = "bower-1.2.6";
+ name = "bower-1.2.7";
src = [
(fetchurl {
- url = "http://registry.npmjs.org/bower/-/bower-1.2.6.tgz";
- sha1 = "a8b7bd344601554821957b9ab62fb436febc674d";
+ url = "http://registry.npmjs.org/bower/-/bower-1.2.7.tgz";
+ sha1 = "5b0505c8192bd61a752a7cf8b718d1b3054cd554";
})
];
buildInputs =
@@ -963,7 +996,7 @@
self.full."inquirer"."~0.3.0"
self.full."junk"."~0.2.0"
self.full."mkdirp"."~0.3.5"
- self.full."mout"."~0.6.0"
+ self.full."mout"."~0.7.0"
self.full."nopt"."~2.1.1"
self.full."lru-cache"."~2.3.0"
self.full."open"."~0.0.3"
@@ -1079,11 +1112,11 @@
passthru.names = [ "bower-logger" ];
};
full."bower-registry-client"."~0.1.4" = lib.makeOverridable self.buildNodePackage {
- name = "bower-registry-client-0.1.4";
+ name = "bower-registry-client-0.1.5";
src = [
(fetchurl {
- url = "http://registry.npmjs.org/bower-registry-client/-/bower-registry-client-0.1.4.tgz";
- sha1 = "334669747ca0b60fdda24b0de1f4c3057429813c";
+ url = "http://registry.npmjs.org/bower-registry-client/-/bower-registry-client-0.1.5.tgz";
+ sha1 = "1c64d70bfca833c95121ffc23da48a54527912d3";
})
];
buildInputs =
@@ -1345,6 +1378,25 @@
];
passthru.names = [ "cardinal" ];
};
+ full."chai"."*" = lib.makeOverridable self.buildNodePackage {
+ name = "chai-1.8.0";
+ src = [
+ (fetchurl {
+ url = "http://registry.npmjs.org/chai/-/chai-1.8.0.tgz";
+ sha1 = "1f7accbe91e2e71a08d8208b31bbbdc6862699ac";
+ })
+ ];
+ buildInputs =
+ (self.nativeDeps."chai"."*" or []);
+ deps = [
+ self.full."assertion-error"."1.0.0"
+ self.full."deep-eql"."0.1.2"
+ ];
+ peerDependencies = [
+ ];
+ passthru.names = [ "chai" ];
+ };
+ "chai" = self.full."chai"."*";
full."chainsaw"."~0.1.0" = lib.makeOverridable self.buildNodePackage {
name = "chainsaw-0.1.0";
src = [
@@ -1453,11 +1505,11 @@
passthru.names = [ "cheerio" ];
};
full."cheerio"."~0.12.0" = lib.makeOverridable self.buildNodePackage {
- name = "cheerio-0.12.2";
+ name = "cheerio-0.12.3";
src = [
(fetchurl {
- url = "http://registry.npmjs.org/cheerio/-/cheerio-0.12.2.tgz";
- sha1 = "d9908e29679e6d1b501c2cfe0e4ada330ea278c7";
+ url = "http://registry.npmjs.org/cheerio/-/cheerio-0.12.3.tgz";
+ sha1 = "8eb05ace0a3fc72d9d9ce0b5d364fe8bb565d7fa";
})
];
buildInputs =
@@ -1473,11 +1525,11 @@
passthru.names = [ "cheerio" ];
};
full."cheerio"."~0.12.1" = lib.makeOverridable self.buildNodePackage {
- name = "cheerio-0.12.2";
+ name = "cheerio-0.12.3";
src = [
(fetchurl {
- url = "http://registry.npmjs.org/cheerio/-/cheerio-0.12.2.tgz";
- sha1 = "d9908e29679e6d1b501c2cfe0e4ada330ea278c7";
+ url = "http://registry.npmjs.org/cheerio/-/cheerio-0.12.3.tgz";
+ sha1 = "8eb05ace0a3fc72d9d9ce0b5d364fe8bb565d7fa";
})
];
buildInputs =
@@ -1574,11 +1626,11 @@
passthru.names = [ "chownr" ];
};
full."clean-css"."~1.1.1" = lib.makeOverridable self.buildNodePackage {
- name = "clean-css-1.1.1";
+ name = "clean-css-1.1.3";
src = [
(fetchurl {
- url = "http://registry.npmjs.org/clean-css/-/clean-css-1.1.1.tgz";
- sha1 = "c52afc4ea34c4f10392f0f350eba101ef17a8c51";
+ url = "http://registry.npmjs.org/clean-css/-/clean-css-1.1.3.tgz";
+ sha1 = "5442cbf45643e09bdcfae25f2b5d8eb36e168ae1";
})
];
buildInputs =
@@ -2355,6 +2407,24 @@
];
passthru.names = [ "connect-flash" ];
};
+ full."connect-jade-static"."*" = lib.makeOverridable self.buildNodePackage {
+ name = "connect-jade-static-0.1.1";
+ src = [
+ (fetchurl {
+ url = "http://registry.npmjs.org/connect-jade-static/-/connect-jade-static-0.1.1.tgz";
+ sha1 = "11d16fa00aca28cb004e89cd0a7d6b0fa0342cdb";
+ })
+ ];
+ buildInputs =
+ (self.nativeDeps."connect-jade-static"."*" or []);
+ deps = [
+ self.full."jade"."*"
+ ];
+ peerDependencies = [
+ ];
+ passthru.names = [ "connect-jade-static" ];
+ };
+ "connect-jade-static" = self.full."connect-jade-static"."*";
full."connect-mongo"."*" = lib.makeOverridable self.buildNodePackage {
name = "connect-mongo-0.3.3";
src = [
@@ -2866,6 +2936,23 @@
];
passthru.names = [ "debug" ];
};
+ full."deep-eql"."0.1.2" = lib.makeOverridable self.buildNodePackage {
+ name = "deep-eql-0.1.2";
+ src = [
+ (fetchurl {
+ url = "http://registry.npmjs.org/deep-eql/-/deep-eql-0.1.2.tgz";
+ sha1 = "b54feed3473a6448fbc198be6a6eca9b95d9c58a";
+ })
+ ];
+ buildInputs =
+ (self.nativeDeps."deep-eql"."0.1.2" or []);
+ deps = [
+ self.full."type-detect"."0.1.0"
+ ];
+ peerDependencies = [
+ ];
+ passthru.names = [ "deep-eql" ];
+ };
full."deep-equal"."*" = lib.makeOverridable self.buildNodePackage {
name = "deep-equal-0.0.0";
src = [
@@ -2914,37 +3001,37 @@
];
passthru.names = [ "deep-extend" ];
};
- full."delayed-stream"."0.0.5" = lib.makeOverridable self.buildNodePackage {
- name = "delayed-stream-0.0.5";
+ full."deep-extend"."~0.2.6" = lib.makeOverridable self.buildNodePackage {
+ name = "deep-extend-0.2.6";
src = [
(fetchurl {
- url = "http://registry.npmjs.org/delayed-stream/-/delayed-stream-0.0.5.tgz";
- sha1 = "d4b1f43a93e8296dfe02694f4680bc37a313c73f";
+ url = "http://registry.npmjs.org/deep-extend/-/deep-extend-0.2.6.tgz";
+ sha1 = "1f767e02b46d88d0a4087affa4b11b1b0b804250";
})
];
buildInputs =
- (self.nativeDeps."delayed-stream"."0.0.5" or []);
+ (self.nativeDeps."deep-extend"."~0.2.6" or []);
deps = [
];
peerDependencies = [
];
- passthru.names = [ "delayed-stream" ];
+ passthru.names = [ "deep-extend" ];
};
- full."dequeue"."1.0.3" = lib.makeOverridable self.buildNodePackage {
- name = "dequeue-1.0.3";
+ full."delayed-stream"."0.0.5" = lib.makeOverridable self.buildNodePackage {
+ name = "delayed-stream-0.0.5";
src = [
(fetchurl {
- url = "http://registry.npmjs.org/dequeue/-/dequeue-1.0.3.tgz";
- sha1 = "30b8f4da2fc240951a15d31b35283e29b2de8978";
+ url = "http://registry.npmjs.org/delayed-stream/-/delayed-stream-0.0.5.tgz";
+ sha1 = "d4b1f43a93e8296dfe02694f4680bc37a313c73f";
})
];
buildInputs =
- (self.nativeDeps."dequeue"."1.0.3" or []);
+ (self.nativeDeps."delayed-stream"."0.0.5" or []);
deps = [
];
peerDependencies = [
];
- passthru.names = [ "dequeue" ];
+ passthru.names = [ "delayed-stream" ];
};
full."di"."~0.0.1" = lib.makeOverridable self.buildNodePackage {
name = "di-0.0.1";
@@ -3669,6 +3756,23 @@
passthru.names = [ "extend" ];
};
"extend" = self.full."extend"."*";
+ full."extract-opts"."~2.2.0" = lib.makeOverridable self.buildNodePackage {
+ name = "extract-opts-2.2.0";
+ src = [
+ (fetchurl {
+ url = "http://registry.npmjs.org/extract-opts/-/extract-opts-2.2.0.tgz";
+ sha1 = "1fa28eba7352c6db480f885ceb71a46810be6d7d";
+ })
+ ];
+ buildInputs =
+ (self.nativeDeps."extract-opts"."~2.2.0" or []);
+ deps = [
+ self.full."typechecker"."~2.0.1"
+ ];
+ peerDependencies = [
+ ];
+ passthru.names = [ "extract-opts" ];
+ };
full."extsprintf"."1.0.0" = lib.makeOverridable self.buildNodePackage {
name = "extsprintf-1.0.0";
src = [
@@ -3864,6 +3968,23 @@
];
passthru.names = [ "flatiron" ];
};
+ full."follow-redirects"."0.0.3" = lib.makeOverridable self.buildNodePackage {
+ name = "follow-redirects-0.0.3";
+ src = [
+ (fetchurl {
+ url = "http://registry.npmjs.org/follow-redirects/-/follow-redirects-0.0.3.tgz";
+ sha1 = "6ce67a24db1fe13f226c1171a72a7ef2b17b8f65";
+ })
+ ];
+ buildInputs =
+ (self.nativeDeps."follow-redirects"."0.0.3" or []);
+ deps = [
+ self.full."underscore"."*"
+ ];
+ peerDependencies = [
+ ];
+ passthru.names = [ "follow-redirects" ];
+ };
full."forEachAsync"."~2.2" = lib.makeOverridable self.buildNodePackage {
name = "forEachAsync-2.2.0";
src = [
@@ -3943,18 +4064,18 @@
passthru.names = [ "forever-agent" ];
};
full."forever-monitor"."*" = lib.makeOverridable self.buildNodePackage {
- name = "forever-monitor-1.2.2";
+ name = "forever-monitor-1.2.3";
src = [
(fetchurl {
- url = "http://registry.npmjs.org/forever-monitor/-/forever-monitor-1.2.2.tgz";
- sha1 = "c1ad6c6ab837a89fa2d47bb439727ca968235684";
+ url = "http://registry.npmjs.org/forever-monitor/-/forever-monitor-1.2.3.tgz";
+ sha1 = "b27ac3acb6fdcc7315d6cd85830f2d004733028b";
})
];
buildInputs =
(self.nativeDeps."forever-monitor"."*" or []);
deps = [
self.full."broadway"."0.2.x"
- self.full."minimatch"."0.0.x"
+ self.full."minimatch"."0.2.x"
self.full."pkginfo"."0.x.x"
self.full."ps-tree"."0.0.x"
self.full."watch"."0.5.x"
@@ -4048,11 +4169,11 @@
passthru.names = [ "form-data" ];
};
full."form-data"."~0.1.0" = lib.makeOverridable self.buildNodePackage {
- name = "form-data-0.1.1";
+ name = "form-data-0.1.2";
src = [
(fetchurl {
- url = "http://registry.npmjs.org/form-data/-/form-data-0.1.1.tgz";
- sha1 = "0d5f2805647b45533ba10bc8a59cf17d1efa5f12";
+ url = "http://registry.npmjs.org/form-data/-/form-data-0.1.2.tgz";
+ sha1 = "1143c21357911a78dd7913b189b4bab5d5d57445";
})
];
buildInputs =
@@ -4412,11 +4533,11 @@
passthru.names = [ "generator-mocha" ];
};
full."generator-webapp"."*" = lib.makeOverridable self.buildNodePackage {
- name = "generator-webapp-0.4.2";
+ name = "generator-webapp-0.4.3";
src = [
(fetchurl {
- url = "http://registry.npmjs.org/generator-webapp/-/generator-webapp-0.4.2.tgz";
- sha1 = "41a856064a00ad952f9cbca79b176da9ab0aa969";
+ url = "http://registry.npmjs.org/generator-webapp/-/generator-webapp-0.4.3.tgz";
+ sha1 = "c0ad11753e0f4403d1d7fad1b298e52bfa5e231b";
})
];
buildInputs =
@@ -4432,6 +4553,25 @@
passthru.names = [ "generator-webapp" ];
};
"generator-webapp" = self.full."generator-webapp"."*";
+ full."getmac"."~1.0.5" = lib.makeOverridable self.buildNodePackage {
+ name = "getmac-1.0.5";
+ src = [
+ (fetchurl {
+ url = "http://registry.npmjs.org/getmac/-/getmac-1.0.5.tgz";
+ sha1 = "4ce0468a83e5fc2f2d337fc0c3c9be2c94a6344f";
+ })
+ ];
+ buildInputs =
+ (self.nativeDeps."getmac"."~1.0.5" or []);
+ deps = [
+ self.full."extract-opts"."~2.2.0"
+ self.full."joe".">=1.0.0-0 >=1.3.0-0 <1.4.0-0"
+ self.full."joe-reporter-console"."~1.2.1"
+ ];
+ peerDependencies = [
+ ];
+ passthru.names = [ "getmac" ];
+ };
full."github-url-from-git"."1.1.1" = lib.makeOverridable self.buildNodePackage {
name = "github-url-from-git-1.1.1";
src = [
@@ -5585,7 +5725,7 @@
src = [
(fetchurl {
url = "http://registry.npmjs.org/i18next/-/i18next-1.7.1.tgz";
- sha1 = "642c920e1b1a49d6212715a3d39ee49bf5129f11";
+ sha1 = "39616a1fe88258edbdd0da918b9ee49a1bd1e124";
})
];
buildInputs =
@@ -5835,11 +5975,11 @@
passthru.names = [ "inquirer" ];
};
full."inquirer"."~0.3.0" = lib.makeOverridable self.buildNodePackage {
- name = "inquirer-0.3.3";
+ name = "inquirer-0.3.4";
src = [
(fetchurl {
- url = "http://registry.npmjs.org/inquirer/-/inquirer-0.3.3.tgz";
- sha1 = "476dfc4b32c24010f4fdf5479dc59368264f2896";
+ url = "http://registry.npmjs.org/inquirer/-/inquirer-0.3.4.tgz";
+ sha1 = "af4673b3e1cb746b74d5dafe14ef55c3c1bf7222";
})
];
buildInputs =
@@ -5855,11 +5995,11 @@
passthru.names = [ "inquirer" ];
};
full."inquirer"."~0.3.1" = lib.makeOverridable self.buildNodePackage {
- name = "inquirer-0.3.3";
+ name = "inquirer-0.3.4";
src = [
(fetchurl {
- url = "http://registry.npmjs.org/inquirer/-/inquirer-0.3.3.tgz";
- sha1 = "476dfc4b32c24010f4fdf5479dc59368264f2896";
+ url = "http://registry.npmjs.org/inquirer/-/inquirer-0.3.4.tgz";
+ sha1 = "af4673b3e1cb746b74d5dafe14ef55c3c1bf7222";
})
];
buildInputs =
@@ -5913,11 +6053,11 @@
passthru.names = [ "intersect" ];
};
full."ironhorse"."*" = lib.makeOverridable self.buildNodePackage {
- name = "ironhorse-0.0.8";
+ name = "ironhorse-0.0.9";
src = [
(fetchurl {
- url = "http://registry.npmjs.org/ironhorse/-/ironhorse-0.0.8.tgz";
- sha1 = "b0c9c0908e6e22f7a48001be48533f12227c7980";
+ url = "http://registry.npmjs.org/ironhorse/-/ironhorse-0.0.9.tgz";
+ sha1 = "9cfaf75e464a0bf394d511a05c0a8b8de080a1d9";
})
];
buildInputs =
@@ -5932,7 +6072,7 @@
self.full."jade"."*"
self.full."passport"."*"
self.full."passport-http"."*"
- self.full."libyaml"."*"
+ self.full."js-yaml"."*"
self.full."mongoose"."3.6.x"
self.full."gridfs-stream"."*"
self.full."temp"."*"
@@ -5977,6 +6117,34 @@
];
passthru.names = [ "isbinaryfile" ];
};
+ full."istanbul"."*" = lib.makeOverridable self.buildNodePackage {
+ name = "istanbul-0.1.44";
+ src = [
+ (fetchurl {
+ url = "http://registry.npmjs.org/istanbul/-/istanbul-0.1.44.tgz";
+ sha1 = "7ea1d55e34234e7b7d8f2f61cceb29b59439d983";
+ })
+ ];
+ buildInputs =
+ (self.nativeDeps."istanbul"."*" or []);
+ deps = [
+ self.full."esprima"."1.0.x"
+ self.full."escodegen"."0.0.23"
+ self.full."handlebars"."1.0.x"
+ self.full."mkdirp"."0.3.x"
+ self.full."nopt"."2.1.x"
+ self.full."fileset"."0.1.x"
+ self.full."which"."1.0.x"
+ self.full."async"."0.2.x"
+ self.full."abbrev"."1.0.x"
+ self.full."wordwrap"."0.0.x"
+ self.full."resolve"."0.5.x"
+ ];
+ peerDependencies = [
+ ];
+ passthru.names = [ "istanbul" ];
+ };
+ "istanbul" = self.full."istanbul"."*";
full."istanbul"."~0.1.41" = lib.makeOverridable self.buildNodePackage {
name = "istanbul-0.1.44";
src = [
@@ -6087,12 +6255,81 @@
passthru.names = [ "jayschema" ];
};
"jayschema" = self.full."jayschema"."*";
+ full."joe"."1.x" = lib.makeOverridable self.buildNodePackage {
+ name = "joe-1.3.0";
+ src = [
+ (fetchurl {
+ url = "http://registry.npmjs.org/joe/-/joe-1.3.0.tgz";
+ sha1 = "dbde3133917f5f1683b67ba9dd5ca4d561306efa";
+ })
+ ];
+ buildInputs =
+ (self.nativeDeps."joe"."1.x" or []);
+ deps = [
+ self.full."taskgroup"."~3.2.0"
+ ];
+ peerDependencies = [
+ ];
+ passthru.names = [ "joe" ];
+ };
+ full."joe".">=1.0.0-0 >=1.3.0-0 <1.4.0-0" = lib.makeOverridable self.buildNodePackage {
+ name = "joe-1.3.0";
+ src = [
+ (fetchurl {
+ url = "http://registry.npmjs.org/joe/-/joe-1.3.0.tgz";
+ sha1 = "dbde3133917f5f1683b67ba9dd5ca4d561306efa";
+ })
+ ];
+ buildInputs =
+ (self.nativeDeps."joe".">=1.0.0-0 >=1.3.0-0 <1.4.0-0" or []);
+ deps = [
+ self.full."taskgroup"."~3.2.0"
+ ];
+ peerDependencies = [
+ ];
+ passthru.names = [ "joe" ];
+ };
+ full."joe"."~1.3.0" = lib.makeOverridable self.buildNodePackage {
+ name = "joe-1.3.0";
+ src = [
+ (fetchurl {
+ url = "http://registry.npmjs.org/joe/-/joe-1.3.0.tgz";
+ sha1 = "dbde3133917f5f1683b67ba9dd5ca4d561306efa";
+ })
+ ];
+ buildInputs =
+ (self.nativeDeps."joe"."~1.3.0" or []);
+ deps = [
+ self.full."taskgroup"."~3.2.0"
+ ];
+ peerDependencies = [
+ ];
+ passthru.names = [ "joe" ];
+ };
+ full."joe-reporter-console"."~1.2.1" = lib.makeOverridable self.buildNodePackage {
+ name = "joe-reporter-console-1.2.1";
+ src = [
+ (fetchurl {
+ url = "http://registry.npmjs.org/joe-reporter-console/-/joe-reporter-console-1.2.1.tgz";
+ sha1 = "6887fa067121b0e67b571672aa63b358055eddc1";
+ })
+ ];
+ buildInputs =
+ (self.nativeDeps."joe-reporter-console"."~1.2.1" or []);
+ deps = [
+ self.full."cli-color"."~0.2.2"
+ ];
+ peerDependencies = [
+ self.full."joe"."1.x"
+ ];
+ passthru.names = [ "joe-reporter-console" ];
+ };
full."js-yaml"."*" = lib.makeOverridable self.buildNodePackage {
- name = "js-yaml-2.1.0";
+ name = "js-yaml-2.1.2";
src = [
(fetchurl {
- url = "http://registry.npmjs.org/js-yaml/-/js-yaml-2.1.0.tgz";
- sha1 = "a55a6e4706b01d06326259a6f4bfc42e6ae38b1f";
+ url = "http://registry.npmjs.org/js-yaml/-/js-yaml-2.1.2.tgz";
+ sha1 = "5404d58972f70112763e0b7e97ced20c39138bbd";
})
];
buildInputs =
@@ -6159,11 +6396,11 @@
passthru.names = [ "js-yaml" ];
};
full."js-yaml"."~2.1.0" = lib.makeOverridable self.buildNodePackage {
- name = "js-yaml-2.1.0";
+ name = "js-yaml-2.1.2";
src = [
(fetchurl {
- url = "http://registry.npmjs.org/js-yaml/-/js-yaml-2.1.0.tgz";
- sha1 = "a55a6e4706b01d06326259a6f4bfc42e6ae38b1f";
+ url = "http://registry.npmjs.org/js-yaml/-/js-yaml-2.1.2.tgz";
+ sha1 = "5404d58972f70112763e0b7e97ced20c39138bbd";
})
];
buildInputs =
@@ -6856,227 +7093,711 @@
})
];
buildInputs =
- (self.nativeDeps."lazy"."~1.0.11" or []);
+ (self.nativeDeps."lazy"."~1.0.11" or []);
+ deps = [
+ ];
+ peerDependencies = [
+ ];
+ passthru.names = [ "lazy" ];
+ };
+ full."lcov-parse"."0.0.4" = lib.makeOverridable self.buildNodePackage {
+ name = "lcov-parse-0.0.4";
+ src = [
+ (fetchurl {
+ url = "http://registry.npmjs.org/lcov-parse/-/lcov-parse-0.0.4.tgz";
+ sha1 = "3853a4f132f04581db0e74c180542d90f0d1c66b";
+ })
+ ];
+ buildInputs =
+ (self.nativeDeps."lcov-parse"."0.0.4" or []);
+ deps = [
+ ];
+ peerDependencies = [
+ ];
+ passthru.names = [ "lcov-parse" ];
+ };
+ full."lcov-result-merger"."*" = lib.makeOverridable self.buildNodePackage {
+ name = "lcov-result-merger-0.0.1";
+ src = [
+ (fetchurl {
+ url = "http://registry.npmjs.org/lcov-result-merger/-/lcov-result-merger-0.0.1.tgz";
+ sha1 = "8b0e68a7f9136de084f62d92ecafcfa41ce9e4d9";
+ })
+ ];
+ buildInputs =
+ (self.nativeDeps."lcov-result-merger"."*" or []);
+ deps = [
+ self.full."glob"."~3.2.1"
+ ];
+ peerDependencies = [
+ ];
+ passthru.names = [ "lcov-result-merger" ];
+ };
+ "lcov-result-merger" = self.full."lcov-result-merger"."*";
+ full."less"."~1.4.0" = lib.makeOverridable self.buildNodePackage {
+ name = "less-1.4.2";
+ src = [
+ (fetchurl {
+ url = "http://registry.npmjs.org/less/-/less-1.4.2.tgz";
+ sha1 = "b7deefe98a3a87bee364411b3df2d1efe5a412d0";
+ })
+ ];
+ buildInputs =
+ (self.nativeDeps."less"."~1.4.0" or []);
+ deps = [
+ self.full."mime"."1.2.x"
+ self.full."request".">=2.12.0"
+ self.full."mkdirp"."~0.3.4"
+ self.full."ycssmin".">=1.0.1"
+ ];
+ peerDependencies = [
+ ];
+ passthru.names = [ "less" ];
+ };
+ full."libxmljs"."~0.8.1" = lib.makeOverridable self.buildNodePackage {
+ name = "libxmljs-0.8.1";
+ src = [
+ (fetchurl {
+ url = "http://registry.npmjs.org/libxmljs/-/libxmljs-0.8.1.tgz";
+ sha1 = "b8b1d3962a92dbc5be9dc798bac028e09db8d630";
+ })
+ ];
+ buildInputs =
+ (self.nativeDeps."libxmljs"."~0.8.1" or []);
+ deps = [
+ self.full."bindings"."1.0.0"
+ ];
+ peerDependencies = [
+ ];
+ passthru.names = [ "libxmljs" ];
+ };
+ full."libyaml"."*" = lib.makeOverridable self.buildNodePackage {
+ name = "libyaml-0.2.2";
+ src = [
+ (fetchurl {
+ url = "http://registry.npmjs.org/libyaml/-/libyaml-0.2.2.tgz";
+ sha1 = "a22d5f699911b6b622d6dc323fb62320c877c9c8";
+ })
+ ];
+ buildInputs =
+ (self.nativeDeps."libyaml"."*" or []);
+ deps = [
+ ];
+ peerDependencies = [
+ ];
+ passthru.names = [ "libyaml" ];
+ };
+ "libyaml" = self.full."libyaml"."*";
+ full."lockfile"."~0.3.2" = lib.makeOverridable self.buildNodePackage {
+ name = "lockfile-0.3.4";
+ src = [
+ (fetchurl {
+ url = "http://registry.npmjs.org/lockfile/-/lockfile-0.3.4.tgz";
+ sha1 = "932b63546e4915f81b71924b36187740358eda03";
+ })
+ ];
+ buildInputs =
+ (self.nativeDeps."lockfile"."~0.3.2" or []);
+ deps = [
+ ];
+ peerDependencies = [
+ ];
+ passthru.names = [ "lockfile" ];
+ };
+ full."lockfile"."~0.4.0" = lib.makeOverridable self.buildNodePackage {
+ name = "lockfile-0.4.2";
+ src = [
+ (fetchurl {
+ url = "http://registry.npmjs.org/lockfile/-/lockfile-0.4.2.tgz";
+ sha1 = "ab91f5d3745bc005ae4fa34d078910d1f2b9612d";
+ })
+ ];
+ buildInputs =
+ (self.nativeDeps."lockfile"."~0.4.0" or []);
+ deps = [
+ ];
+ peerDependencies = [
+ ];
+ passthru.names = [ "lockfile" ];
+ };
+ full."lodash"."~0.9.0" = lib.makeOverridable self.buildNodePackage {
+ name = "lodash-0.9.2";
+ src = [
+ (fetchurl {
+ url = "http://registry.npmjs.org/lodash/-/lodash-0.9.2.tgz";
+ sha1 = "8f3499c5245d346d682e5b0d3b40767e09f1a92c";
+ })
+ ];
+ buildInputs =
+ (self.nativeDeps."lodash"."~0.9.0" or []);
+ deps = [
+ ];
+ peerDependencies = [
+ ];
+ passthru.names = [ "lodash" ];
+ };
+ full."lodash"."~1.0.1" = lib.makeOverridable self.buildNodePackage {
+ name = "lodash-1.0.1";
+ src = [
+ (fetchurl {
+ url = "http://registry.npmjs.org/lodash/-/lodash-1.0.1.tgz";
+ sha1 = "57945732498d92310e5bd4b1ff4f273a79e6c9fc";
+ })
+ ];
+ buildInputs =
+ (self.nativeDeps."lodash"."~1.0.1" or []);
+ deps = [
+ ];
+ peerDependencies = [
+ ];
+ passthru.names = [ "lodash" ];
+ };
+ full."lodash"."~1.1" = lib.makeOverridable self.buildNodePackage {
+ name = "lodash-1.1.1";
+ src = [
+ (fetchurl {
+ url = "http://registry.npmjs.org/lodash/-/lodash-1.1.1.tgz";
+ sha1 = "41a2b2e9a00e64d6d1999f143ff6b0755f6bbb24";
+ })
+ ];
+ buildInputs =
+ (self.nativeDeps."lodash"."~1.1" or []);
+ deps = [
+ ];
+ peerDependencies = [
+ ];
+ passthru.names = [ "lodash" ];
+ };
+ full."lodash"."~1.1.1" = lib.makeOverridable self.buildNodePackage {
+ name = "lodash-1.1.1";
+ src = [
+ (fetchurl {
+ url = "http://registry.npmjs.org/lodash/-/lodash-1.1.1.tgz";
+ sha1 = "41a2b2e9a00e64d6d1999f143ff6b0755f6bbb24";
+ })
+ ];
+ buildInputs =
+ (self.nativeDeps."lodash"."~1.1.1" or []);
+ deps = [
+ ];
+ peerDependencies = [
+ ];
+ passthru.names = [ "lodash" ];
+ };
+ full."lodash"."~1.2.1" = lib.makeOverridable self.buildNodePackage {
+ name = "lodash-1.2.1";
+ src = [
+ (fetchurl {
+ url = "http://registry.npmjs.org/lodash/-/lodash-1.2.1.tgz";
+ sha1 = "ed47b16e46f06b2b40309b68e9163c17e93ea304";
+ })
+ ];
+ buildInputs =
+ (self.nativeDeps."lodash"."~1.2.1" or []);
+ deps = [
+ ];
+ peerDependencies = [
+ ];
+ passthru.names = [ "lodash" ];
+ };
+ full."lodash"."~1.3.0" = lib.makeOverridable self.buildNodePackage {
+ name = "lodash-1.3.1";
+ src = [
+ (fetchurl {
+ url = "http://registry.npmjs.org/lodash/-/lodash-1.3.1.tgz";
+ sha1 = "a4663b53686b895ff074e2ba504dfb76a8e2b770";
+ })
+ ];
+ buildInputs =
+ (self.nativeDeps."lodash"."~1.3.0" or []);
+ deps = [
+ ];
+ peerDependencies = [
+ ];
+ passthru.names = [ "lodash" ];
+ };
+ full."lodash"."~1.3.1" = lib.makeOverridable self.buildNodePackage {
+ name = "lodash-1.3.1";
+ src = [
+ (fetchurl {
+ url = "http://registry.npmjs.org/lodash/-/lodash-1.3.1.tgz";
+ sha1 = "a4663b53686b895ff074e2ba504dfb76a8e2b770";
+ })
+ ];
+ buildInputs =
+ (self.nativeDeps."lodash"."~1.3.1" or []);
+ deps = [
+ ];
+ peerDependencies = [
+ ];
+ passthru.names = [ "lodash" ];
+ };
+ full."lodash._arraypool"."~2.2.1" = lib.makeOverridable self.buildNodePackage {
+ name = "lodash._arraypool-2.2.1";
+ src = [
+ (fetchurl {
+ url = "http://registry.npmjs.org/lodash._arraypool/-/lodash._arraypool-2.2.1.tgz";
+ sha1 = "09c741461dde7a7bc467d826ee50c8b1216427f4";
+ })
+ ];
+ buildInputs =
+ (self.nativeDeps."lodash._arraypool"."~2.2.1" or []);
+ deps = [
+ ];
+ peerDependencies = [
+ ];
+ passthru.names = [ "lodash._arraypool" ];
+ };
+ full."lodash._basecreatecallback"."~2.2.1" = lib.makeOverridable self.buildNodePackage {
+ name = "lodash._basecreatecallback-2.2.1";
+ src = [
+ (fetchurl {
+ url = "http://registry.npmjs.org/lodash._basecreatecallback/-/lodash._basecreatecallback-2.2.1.tgz";
+ sha1 = "486940419a6f195996cb0f7644af71341c608ce4";
+ })
+ ];
+ buildInputs =
+ (self.nativeDeps."lodash._basecreatecallback"."~2.2.1" or []);
+ deps = [
+ self.full."lodash.bind"."~2.2.1"
+ self.full."lodash.identity"."~2.2.1"
+ self.full."lodash._setbinddata"."~2.2.1"
+ self.full."lodash.support"."~2.2.1"
+ ];
+ peerDependencies = [
+ ];
+ passthru.names = [ "lodash._basecreatecallback" ];
+ };
+ full."lodash._baseisequal"."~2.2.1" = lib.makeOverridable self.buildNodePackage {
+ name = "lodash._baseisequal-2.2.1";
+ src = [
+ (fetchurl {
+ url = "http://registry.npmjs.org/lodash._baseisequal/-/lodash._baseisequal-2.2.1.tgz";
+ sha1 = "8bd0156ad5c47d927b58d54456329922b24ce0e7";
+ })
+ ];
+ buildInputs =
+ (self.nativeDeps."lodash._baseisequal"."~2.2.1" or []);
+ deps = [
+ self.full."lodash.forin"."~2.2.1"
+ self.full."lodash._getarray"."~2.2.1"
+ self.full."lodash.isfunction"."~2.2.1"
+ self.full."lodash._objecttypes"."~2.2.1"
+ self.full."lodash._releasearray"."~2.2.1"
+ ];
+ peerDependencies = [
+ ];
+ passthru.names = [ "lodash._baseisequal" ];
+ };
+ full."lodash._createbound"."~2.2.1" = lib.makeOverridable self.buildNodePackage {
+ name = "lodash._createbound-2.2.1";
+ src = [
+ (fetchurl {
+ url = "http://registry.npmjs.org/lodash._createbound/-/lodash._createbound-2.2.1.tgz";
+ sha1 = "27218a40dc73eaf7a1bc90c3f86b0bf79c272ccc";
+ })
+ ];
+ buildInputs =
+ (self.nativeDeps."lodash._createbound"."~2.2.1" or []);
+ deps = [
+ self.full."lodash._createobject"."~2.2.1"
+ self.full."lodash.isfunction"."~2.2.1"
+ self.full."lodash.isobject"."~2.2.1"
+ self.full."lodash._renative"."~2.2.1"
+ self.full."lodash._setbinddata"."~2.2.1"
+ self.full."lodash.support"."~2.2.1"
+ ];
+ peerDependencies = [
+ ];
+ passthru.names = [ "lodash._createbound" ];
+ };
+ full."lodash._createobject"."~2.2.1" = lib.makeOverridable self.buildNodePackage {
+ name = "lodash._createobject-2.2.1";
+ src = [
+ (fetchurl {
+ url = "http://registry.npmjs.org/lodash._createobject/-/lodash._createobject-2.2.1.tgz";
+ sha1 = "8c38ad5d83de703537c863330b97059417fbfee9";
+ })
+ ];
+ buildInputs =
+ (self.nativeDeps."lodash._createobject"."~2.2.1" or []);
+ deps = [
+ self.full."lodash.isobject"."~2.2.1"
+ self.full."lodash._noop"."~2.2.1"
+ self.full."lodash._renative"."~2.2.1"
+ ];
+ peerDependencies = [
+ ];
+ passthru.names = [ "lodash._createobject" ];
+ };
+ full."lodash._getarray"."~2.2.1" = lib.makeOverridable self.buildNodePackage {
+ name = "lodash._getarray-2.2.1";
+ src = [
+ (fetchurl {
+ url = "http://registry.npmjs.org/lodash._getarray/-/lodash._getarray-2.2.1.tgz";
+ sha1 = "aa5caa269f1649a186811d5be4a78e56e70e9699";
+ })
+ ];
+ buildInputs =
+ (self.nativeDeps."lodash._getarray"."~2.2.1" or []);
+ deps = [
+ self.full."lodash._arraypool"."~2.2.1"
+ ];
+ peerDependencies = [
+ ];
+ passthru.names = [ "lodash._getarray" ];
+ };
+ full."lodash._maxpoolsize"."~2.2.1" = lib.makeOverridable self.buildNodePackage {
+ name = "lodash._maxpoolsize-2.2.1";
+ src = [
+ (fetchurl {
+ url = "http://registry.npmjs.org/lodash._maxpoolsize/-/lodash._maxpoolsize-2.2.1.tgz";
+ sha1 = "1e8b6d433271db7c12ec953d49604ea098542fa7";
+ })
+ ];
+ buildInputs =
+ (self.nativeDeps."lodash._maxpoolsize"."~2.2.1" or []);
+ deps = [
+ ];
+ peerDependencies = [
+ ];
+ passthru.names = [ "lodash._maxpoolsize" ];
+ };
+ full."lodash._noop"."~2.2.1" = lib.makeOverridable self.buildNodePackage {
+ name = "lodash._noop-2.2.1";
+ src = [
+ (fetchurl {
+ url = "http://registry.npmjs.org/lodash._noop/-/lodash._noop-2.2.1.tgz";
+ sha1 = "f790734f9f683c9fda8da9f4d8a8000a2201c6e9";
+ })
+ ];
+ buildInputs =
+ (self.nativeDeps."lodash._noop"."~2.2.1" or []);
+ deps = [
+ ];
+ peerDependencies = [
+ ];
+ passthru.names = [ "lodash._noop" ];
+ };
+ full."lodash._objecttypes"."~2.2.1" = lib.makeOverridable self.buildNodePackage {
+ name = "lodash._objecttypes-2.2.1";
+ src = [
+ (fetchurl {
+ url = "http://registry.npmjs.org/lodash._objecttypes/-/lodash._objecttypes-2.2.1.tgz";
+ sha1 = "c72d42a5dec0b55664f82162ed74c5f3f94942ba";
+ })
+ ];
+ buildInputs =
+ (self.nativeDeps."lodash._objecttypes"."~2.2.1" or []);
+ deps = [
+ ];
+ peerDependencies = [
+ ];
+ passthru.names = [ "lodash._objecttypes" ];
+ };
+ full."lodash._releasearray"."~2.2.1" = lib.makeOverridable self.buildNodePackage {
+ name = "lodash._releasearray-2.2.1";
+ src = [
+ (fetchurl {
+ url = "http://registry.npmjs.org/lodash._releasearray/-/lodash._releasearray-2.2.1.tgz";
+ sha1 = "81626c89e26ce2fbc90a11ce8f6ef26ea15c4b28";
+ })
+ ];
+ buildInputs =
+ (self.nativeDeps."lodash._releasearray"."~2.2.1" or []);
+ deps = [
+ self.full."lodash._arraypool"."~2.2.1"
+ self.full."lodash._maxpoolsize"."~2.2.1"
+ ];
+ peerDependencies = [
+ ];
+ passthru.names = [ "lodash._releasearray" ];
+ };
+ full."lodash._renative"."~2.2.1" = lib.makeOverridable self.buildNodePackage {
+ name = "lodash._renative-2.2.1";
+ src = [
+ (fetchurl {
+ url = "http://registry.npmjs.org/lodash._renative/-/lodash._renative-2.2.1.tgz";
+ sha1 = "ab77d711371ebae8ffdcf5c83b576d558d6bb522";
+ })
+ ];
+ buildInputs =
+ (self.nativeDeps."lodash._renative"."~2.2.1" or []);
+ deps = [
+ ];
+ peerDependencies = [
+ ];
+ passthru.names = [ "lodash._renative" ];
+ };
+ full."lodash._setbinddata"."~2.2.1" = lib.makeOverridable self.buildNodePackage {
+ name = "lodash._setbinddata-2.2.1";
+ src = [
+ (fetchurl {
+ url = "http://registry.npmjs.org/lodash._setbinddata/-/lodash._setbinddata-2.2.1.tgz";
+ sha1 = "df1d5228229c71e28185aae4f828f3b5e78f0904";
+ })
+ ];
+ buildInputs =
+ (self.nativeDeps."lodash._setbinddata"."~2.2.1" or []);
+ deps = [
+ self.full."lodash._noop"."~2.2.1"
+ self.full."lodash._renative"."~2.2.1"
+ ];
+ peerDependencies = [
+ ];
+ passthru.names = [ "lodash._setbinddata" ];
+ };
+ full."lodash._shimkeys"."~2.2.1" = lib.makeOverridable self.buildNodePackage {
+ name = "lodash._shimkeys-2.2.1";
+ src = [
+ (fetchurl {
+ url = "http://registry.npmjs.org/lodash._shimkeys/-/lodash._shimkeys-2.2.1.tgz";
+ sha1 = "ed4e4b5d61214b2685400b185a59fabf59343455";
+ })
+ ];
+ buildInputs =
+ (self.nativeDeps."lodash._shimkeys"."~2.2.1" or []);
deps = [
+ self.full."lodash._objecttypes"."~2.2.1"
];
peerDependencies = [
];
- passthru.names = [ "lazy" ];
+ passthru.names = [ "lodash._shimkeys" ];
};
- full."lcov-parse"."0.0.4" = lib.makeOverridable self.buildNodePackage {
- name = "lcov-parse-0.0.4";
+ full."lodash.bind"."~2.2.1" = lib.makeOverridable self.buildNodePackage {
+ name = "lodash.bind-2.2.1";
src = [
(fetchurl {
- url = "http://registry.npmjs.org/lcov-parse/-/lcov-parse-0.0.4.tgz";
- sha1 = "3853a4f132f04581db0e74c180542d90f0d1c66b";
+ url = "http://registry.npmjs.org/lodash.bind/-/lodash.bind-2.2.1.tgz";
+ sha1 = "4c24fe00b4c6fa277e4058d353edcf399b3755c2";
})
];
buildInputs =
- (self.nativeDeps."lcov-parse"."0.0.4" or []);
+ (self.nativeDeps."lodash.bind"."~2.2.1" or []);
deps = [
+ self.full."lodash._createbound"."~2.2.1"
+ self.full."lodash._renative"."~2.2.1"
];
peerDependencies = [
];
- passthru.names = [ "lcov-parse" ];
+ passthru.names = [ "lodash.bind" ];
};
- full."lcov-result-merger"."*" = lib.makeOverridable self.buildNodePackage {
- name = "lcov-result-merger-0.0.1";
+ full."lodash.createcallback"."~2.2.1" = lib.makeOverridable self.buildNodePackage {
+ name = "lodash.createcallback-2.2.1";
src = [
(fetchurl {
- url = "http://registry.npmjs.org/lcov-result-merger/-/lcov-result-merger-0.0.1.tgz";
- sha1 = "8b0e68a7f9136de084f62d92ecafcfa41ce9e4d9";
+ url = "http://registry.npmjs.org/lodash.createcallback/-/lodash.createcallback-2.2.1.tgz";
+ sha1 = "bb5291c473202a391c1a495a0806bf4b1d1842d2";
})
];
buildInputs =
- (self.nativeDeps."lcov-result-merger"."*" or []);
+ (self.nativeDeps."lodash.createcallback"."~2.2.1" or []);
deps = [
- self.full."glob"."~3.2.1"
+ self.full."lodash._basecreatecallback"."~2.2.1"
+ self.full."lodash._baseisequal"."~2.2.1"
+ self.full."lodash.isobject"."~2.2.1"
+ self.full."lodash.keys"."~2.2.1"
];
peerDependencies = [
];
- passthru.names = [ "lcov-result-merger" ];
+ passthru.names = [ "lodash.createcallback" ];
};
- "lcov-result-merger" = self.full."lcov-result-merger"."*";
- full."less"."~1.4.0" = lib.makeOverridable self.buildNodePackage {
- name = "less-1.4.2";
+ full."lodash.debounce"."~2.2.0" = lib.makeOverridable self.buildNodePackage {
+ name = "lodash.debounce-2.2.1";
src = [
(fetchurl {
- url = "http://registry.npmjs.org/less/-/less-1.4.2.tgz";
- sha1 = "b7deefe98a3a87bee364411b3df2d1efe5a412d0";
+ url = "http://registry.npmjs.org/lodash.debounce/-/lodash.debounce-2.2.1.tgz";
+ sha1 = "46e0ded9b392afa45a8fb54efac564a17fe78be0";
})
];
buildInputs =
- (self.nativeDeps."less"."~1.4.0" or []);
+ (self.nativeDeps."lodash.debounce"."~2.2.0" or []);
deps = [
- self.full."mime"."1.2.x"
- self.full."request".">=2.12.0"
- self.full."mkdirp"."~0.3.4"
- self.full."ycssmin".">=1.0.1"
+ self.full."lodash.isfunction"."~2.2.1"
+ self.full."lodash.isobject"."~2.2.1"
+ self.full."lodash._renative"."~2.2.1"
];
peerDependencies = [
];
- passthru.names = [ "less" ];
+ passthru.names = [ "lodash.debounce" ];
};
- full."libyaml"."*" = lib.makeOverridable self.buildNodePackage {
- name = "libyaml-0.2.2";
+ full."lodash.debounce"."~2.2.1" = lib.makeOverridable self.buildNodePackage {
+ name = "lodash.debounce-2.2.1";
src = [
(fetchurl {
- url = "http://registry.npmjs.org/libyaml/-/libyaml-0.2.2.tgz";
- sha1 = "a22d5f699911b6b622d6dc323fb62320c877c9c8";
+ url = "http://registry.npmjs.org/lodash.debounce/-/lodash.debounce-2.2.1.tgz";
+ sha1 = "46e0ded9b392afa45a8fb54efac564a17fe78be0";
})
];
buildInputs =
- (self.nativeDeps."libyaml"."*" or []);
+ (self.nativeDeps."lodash.debounce"."~2.2.1" or []);
deps = [
+ self.full."lodash.isfunction"."~2.2.1"
+ self.full."lodash.isobject"."~2.2.1"
+ self.full."lodash._renative"."~2.2.1"
];
peerDependencies = [
];
- passthru.names = [ "libyaml" ];
+ passthru.names = [ "lodash.debounce" ];
};
- "libyaml" = self.full."libyaml"."*";
- full."lockfile"."~0.3.2" = lib.makeOverridable self.buildNodePackage {
- name = "lockfile-0.3.4";
+ full."lodash.find"."~2.2.0" = lib.makeOverridable self.buildNodePackage {
+ name = "lodash.find-2.2.1";
src = [
(fetchurl {
- url = "http://registry.npmjs.org/lockfile/-/lockfile-0.3.4.tgz";
- sha1 = "932b63546e4915f81b71924b36187740358eda03";
+ url = "http://registry.npmjs.org/lodash.find/-/lodash.find-2.2.1.tgz";
+ sha1 = "768cc2149a589d2fd7b7203c6abe34bcb724d01a";
})
];
buildInputs =
- (self.nativeDeps."lockfile"."~0.3.2" or []);
+ (self.nativeDeps."lodash.find"."~2.2.0" or []);
deps = [
+ self.full."lodash.createcallback"."~2.2.1"
+ self.full."lodash.forown"."~2.2.1"
];
peerDependencies = [
];
- passthru.names = [ "lockfile" ];
+ passthru.names = [ "lodash.find" ];
};
- full."lockfile"."~0.4.0" = lib.makeOverridable self.buildNodePackage {
- name = "lockfile-0.4.2";
+ full."lodash.forin"."~2.2.1" = lib.makeOverridable self.buildNodePackage {
+ name = "lodash.forin-2.2.1";
src = [
(fetchurl {
- url = "http://registry.npmjs.org/lockfile/-/lockfile-0.4.2.tgz";
- sha1 = "ab91f5d3745bc005ae4fa34d078910d1f2b9612d";
+ url = "http://registry.npmjs.org/lodash.forin/-/lodash.forin-2.2.1.tgz";
+ sha1 = "d96a47f547002f322dcdc533b0f9e914cba7d050";
})
];
buildInputs =
- (self.nativeDeps."lockfile"."~0.4.0" or []);
+ (self.nativeDeps."lodash.forin"."~2.2.1" or []);
deps = [
+ self.full."lodash._basecreatecallback"."~2.2.1"
+ self.full."lodash._objecttypes"."~2.2.1"
];
peerDependencies = [
];
- passthru.names = [ "lockfile" ];
+ passthru.names = [ "lodash.forin" ];
};
- full."lodash"."~0.9.0" = lib.makeOverridable self.buildNodePackage {
- name = "lodash-0.9.2";
+ full."lodash.forown"."~2.2.1" = lib.makeOverridable self.buildNodePackage {
+ name = "lodash.forown-2.2.1";
src = [
(fetchurl {
- url = "http://registry.npmjs.org/lodash/-/lodash-0.9.2.tgz";
- sha1 = "8f3499c5245d346d682e5b0d3b40767e09f1a92c";
+ url = "http://registry.npmjs.org/lodash.forown/-/lodash.forown-2.2.1.tgz";
+ sha1 = "77ee0877c135b603dafe8f2d9ceff215b16458ea";
})
];
buildInputs =
- (self.nativeDeps."lodash"."~0.9.0" or []);
+ (self.nativeDeps."lodash.forown"."~2.2.1" or []);
deps = [
+ self.full."lodash._basecreatecallback"."~2.2.1"
+ self.full."lodash.keys"."~2.2.1"
+ self.full."lodash._objecttypes"."~2.2.1"
];
peerDependencies = [
];
- passthru.names = [ "lodash" ];
+ passthru.names = [ "lodash.forown" ];
};
- full."lodash"."~1.0.1" = lib.makeOverridable self.buildNodePackage {
- name = "lodash-1.0.1";
+ full."lodash.identity"."~2.2.1" = lib.makeOverridable self.buildNodePackage {
+ name = "lodash.identity-2.2.1";
src = [
(fetchurl {
- url = "http://registry.npmjs.org/lodash/-/lodash-1.0.1.tgz";
- sha1 = "57945732498d92310e5bd4b1ff4f273a79e6c9fc";
+ url = "http://registry.npmjs.org/lodash.identity/-/lodash.identity-2.2.1.tgz";
+ sha1 = "63518772143d450a772511f6671e23038c67bcae";
})
];
buildInputs =
- (self.nativeDeps."lodash"."~1.0.1" or []);
+ (self.nativeDeps."lodash.identity"."~2.2.1" or []);
deps = [
];
peerDependencies = [
];
- passthru.names = [ "lodash" ];
+ passthru.names = [ "lodash.identity" ];
};
- full."lodash"."~1.1" = lib.makeOverridable self.buildNodePackage {
- name = "lodash-1.1.1";
+ full."lodash.isfunction"."~2.2.1" = lib.makeOverridable self.buildNodePackage {
+ name = "lodash.isfunction-2.2.1";
src = [
(fetchurl {
- url = "http://registry.npmjs.org/lodash/-/lodash-1.1.1.tgz";
- sha1 = "41a2b2e9a00e64d6d1999f143ff6b0755f6bbb24";
+ url = "http://registry.npmjs.org/lodash.isfunction/-/lodash.isfunction-2.2.1.tgz";
+ sha1 = "fcfa79b7b2c072b320468ecdc0244bbbac5e49c0";
})
];
buildInputs =
- (self.nativeDeps."lodash"."~1.1" or []);
+ (self.nativeDeps."lodash.isfunction"."~2.2.1" or []);
deps = [
];
peerDependencies = [
];
- passthru.names = [ "lodash" ];
+ passthru.names = [ "lodash.isfunction" ];
};
- full."lodash"."~1.1.1" = lib.makeOverridable self.buildNodePackage {
- name = "lodash-1.1.1";
+ full."lodash.isobject"."~2.2.1" = lib.makeOverridable self.buildNodePackage {
+ name = "lodash.isobject-2.2.1";
src = [
(fetchurl {
- url = "http://registry.npmjs.org/lodash/-/lodash-1.1.1.tgz";
- sha1 = "41a2b2e9a00e64d6d1999f143ff6b0755f6bbb24";
+ url = "http://registry.npmjs.org/lodash.isobject/-/lodash.isobject-2.2.1.tgz";
+ sha1 = "cbce101e3e3b718cb51b1113e4597d6e8e038831";
})
];
buildInputs =
- (self.nativeDeps."lodash"."~1.1.1" or []);
+ (self.nativeDeps."lodash.isobject"."~2.2.1" or []);
deps = [
+ self.full."lodash._objecttypes"."~2.2.1"
];
peerDependencies = [
];
- passthru.names = [ "lodash" ];
+ passthru.names = [ "lodash.isobject" ];
};
- full."lodash"."~1.2.1" = lib.makeOverridable self.buildNodePackage {
- name = "lodash-1.2.1";
+ full."lodash.keys"."~2.2.1" = lib.makeOverridable self.buildNodePackage {
+ name = "lodash.keys-2.2.1";
src = [
(fetchurl {
- url = "http://registry.npmjs.org/lodash/-/lodash-1.2.1.tgz";
- sha1 = "ed47b16e46f06b2b40309b68e9163c17e93ea304";
+ url = "http://registry.npmjs.org/lodash.keys/-/lodash.keys-2.2.1.tgz";
+ sha1 = "f372597e6f411d7537e32ba0efc85b5f874d5cca";
})
];
buildInputs =
- (self.nativeDeps."lodash"."~1.2.1" or []);
+ (self.nativeDeps."lodash.keys"."~2.2.1" or []);
deps = [
+ self.full."lodash.isobject"."~2.2.1"
+ self.full."lodash._renative"."~2.2.1"
+ self.full."lodash._shimkeys"."~2.2.1"
];
peerDependencies = [
];
- passthru.names = [ "lodash" ];
+ passthru.names = [ "lodash.keys" ];
};
- full."lodash"."~1.3.0" = lib.makeOverridable self.buildNodePackage {
- name = "lodash-1.3.1";
+ full."lodash.support"."~2.2.1" = lib.makeOverridable self.buildNodePackage {
+ name = "lodash.support-2.2.1";
src = [
(fetchurl {
- url = "http://registry.npmjs.org/lodash/-/lodash-1.3.1.tgz";
- sha1 = "a4663b53686b895ff074e2ba504dfb76a8e2b770";
+ url = "http://registry.npmjs.org/lodash.support/-/lodash.support-2.2.1.tgz";
+ sha1 = "5b6c267c6fc5302011f0c14e4529c7fbc08e94ce";
})
];
buildInputs =
- (self.nativeDeps."lodash"."~1.3.0" or []);
+ (self.nativeDeps."lodash.support"."~2.2.1" or []);
deps = [
+ self.full."lodash._renative"."~2.2.1"
];
peerDependencies = [
];
- passthru.names = [ "lodash" ];
+ passthru.names = [ "lodash.support" ];
};
- full."lodash"."~1.3.1" = lib.makeOverridable self.buildNodePackage {
- name = "lodash-1.3.1";
+ full."lodash.throttle"."~2.2.0" = lib.makeOverridable self.buildNodePackage {
+ name = "lodash.throttle-2.2.1";
src = [
(fetchurl {
- url = "http://registry.npmjs.org/lodash/-/lodash-1.3.1.tgz";
- sha1 = "a4663b53686b895ff074e2ba504dfb76a8e2b770";
+ url = "http://registry.npmjs.org/lodash.throttle/-/lodash.throttle-2.2.1.tgz";
+ sha1 = "ae49bd6173b0cfb4e09d9645fdac507db77211f0";
})
];
buildInputs =
- (self.nativeDeps."lodash"."~1.3.1" or []);
+ (self.nativeDeps."lodash.throttle"."~2.2.0" or []);
deps = [
+ self.full."lodash.debounce"."~2.2.1"
+ self.full."lodash.isfunction"."~2.2.1"
+ self.full."lodash.isobject"."~2.2.1"
];
peerDependencies = [
];
- passthru.names = [ "lodash" ];
+ passthru.names = [ "lodash.throttle" ];
};
full."log-driver"."1.2.1" = lib.makeOverridable self.buildNodePackage {
name = "log-driver-1.2.1";
@@ -7095,18 +7816,17 @@
passthru.names = [ "log-driver" ];
};
full."log4js"."~0.6.3" = lib.makeOverridable self.buildNodePackage {
- name = "log4js-0.6.8";
+ name = "log4js-0.6.9";
src = [
(fetchurl {
- url = "http://registry.npmjs.org/log4js/-/log4js-0.6.8.tgz";
- sha1 = "86baebdcaf8ef989295d65a07773f7e32093d0b6";
+ url = "http://registry.npmjs.org/log4js/-/log4js-0.6.9.tgz";
+ sha1 = "2e327189c1c0dec17448ec5255f58cd0fddf4596";
})
];
buildInputs =
(self.nativeDeps."log4js"."~0.6.3" or []);
deps = [
self.full."async"."0.1.15"
- self.full."dequeue"."1.0.3"
self.full."semver"."~1.1.4"
self.full."readable-stream"."~1.0.2"
];
@@ -7227,11 +7947,11 @@
passthru.names = [ "lru-cache" ];
};
full."mailcomposer".">= 0.1.27" = lib.makeOverridable self.buildNodePackage {
- name = "mailcomposer-0.2.1";
+ name = "mailcomposer-0.2.2";
src = [
(fetchurl {
- url = "http://registry.npmjs.org/mailcomposer/-/mailcomposer-0.2.1.tgz";
- sha1 = "89e1326147fb2c222feb931b40e98b6be133f14a";
+ url = "http://registry.npmjs.org/mailcomposer/-/mailcomposer-0.2.2.tgz";
+ sha1 = "ce93bdea7cb51e60eb76491b6a64c39f382c20e5";
})
];
buildInputs =
@@ -7458,11 +8178,11 @@
passthru.names = [ "mime" ];
};
full."mimelib"."~0.2" = lib.makeOverridable self.buildNodePackage {
- name = "mimelib-0.2.12";
+ name = "mimelib-0.2.13";
src = [
(fetchurl {
- url = "http://registry.npmjs.org/mimelib/-/mimelib-0.2.12.tgz";
- sha1 = "5dcbb99c7369e5d62d7e12e71fa334179aebd748";
+ url = "http://registry.npmjs.org/mimelib/-/mimelib-0.2.13.tgz";
+ sha1 = "0668eb85e870c510be747a67ece43b9bbf8e20b0";
})
];
buildInputs =
@@ -7510,6 +8230,24 @@
];
passthru.names = [ "minimatch" ];
};
+ full."minimatch"."0.2.x" = lib.makeOverridable self.buildNodePackage {
+ name = "minimatch-0.2.12";
+ src = [
+ (fetchurl {
+ url = "http://registry.npmjs.org/minimatch/-/minimatch-0.2.12.tgz";
+ sha1 = "ea82a012ac662c7ddfaa144f1c147e6946f5dafb";
+ })
+ ];
+ buildInputs =
+ (self.nativeDeps."minimatch"."0.2.x" or []);
+ deps = [
+ self.full."lru-cache"."2"
+ self.full."sigmund"."~1.0.0"
+ ];
+ peerDependencies = [
+ ];
+ passthru.names = [ "minimatch" ];
+ };
full."minimatch"."0.x" = lib.makeOverridable self.buildNodePackage {
name = "minimatch-0.2.12";
src = [
@@ -7889,6 +8627,23 @@
passthru.names = [ "mocha" ];
};
"mocha" = self.full."mocha"."*";
+ full."mocha-unfunk-reporter"."*" = lib.makeOverridable self.buildNodePackage {
+ name = "mocha-unfunk-reporter-0.2.3";
+ src = [
+ (fetchurl {
+ url = "http://registry.npmjs.org/mocha-unfunk-reporter/-/mocha-unfunk-reporter-0.2.3.tgz";
+ sha1 = "41c2aa001dc44eef80d073404728d2e4d4a09c90";
+ })
+ ];
+ buildInputs =
+ (self.nativeDeps."mocha-unfunk-reporter"."*" or []);
+ deps = [
+ ];
+ peerDependencies = [
+ ];
+ passthru.names = [ "mocha-unfunk-reporter" ];
+ };
+ "mocha-unfunk-reporter" = self.full."mocha-unfunk-reporter"."*";
full."moment"."2.0.0" = lib.makeOverridable self.buildNodePackage {
name = "moment-2.0.0";
src = [
@@ -7993,11 +8748,11 @@
passthru.names = [ "mongodb" ];
};
full."mongoose"."*" = lib.makeOverridable self.buildNodePackage {
- name = "mongoose-3.7.3";
+ name = "mongoose-3.7.4";
src = [
(fetchurl {
- url = "http://registry.npmjs.org/mongoose/-/mongoose-3.7.3.tgz";
- sha1 = "32c707bd919db3ae534326042be0b9ef9ee7ff57";
+ url = "http://registry.npmjs.org/mongoose/-/mongoose-3.7.4.tgz";
+ sha1 = "5ed8cdbc91c92b18ab49ac3526c7ac5264c7b292";
})
];
buildInputs =
@@ -8011,7 +8766,7 @@
self.full."mpromise"."0.3.0"
self.full."mpath"."0.1.1"
self.full."regexp-clone"."0.0.1"
- self.full."mquery"."0.3.1"
+ self.full."mquery"."0.3.2"
];
peerDependencies = [
];
@@ -8082,11 +8837,11 @@
passthru.names = [ "mongoose-lifecycle" ];
};
full."mongoose-schema-extend"."*" = lib.makeOverridable self.buildNodePackage {
- name = "mongoose-schema-extend-0.1.4";
+ name = "mongoose-schema-extend-0.1.5";
src = [
(fetchurl {
- url = "http://registry.npmjs.org/mongoose-schema-extend/-/mongoose-schema-extend-0.1.4.tgz";
- sha1 = "9f61b2abba5352fcd3d7b1193ee4b4d9f2a83804";
+ url = "http://registry.npmjs.org/mongoose-schema-extend/-/mongoose-schema-extend-0.1.5.tgz";
+ sha1 = "d2ab3d2005033daaa215a806bbd3f6637c9c96c3";
})
];
buildInputs =
@@ -8132,6 +8887,22 @@
];
passthru.names = [ "mout" ];
};
+ full."mout"."~0.7.0" = lib.makeOverridable self.buildNodePackage {
+ name = "mout-0.7.1";
+ src = [
+ (fetchurl {
+ url = "http://registry.npmjs.org/mout/-/mout-0.7.1.tgz";
+ sha1 = "218de2b0880b220d99f4fbaee3fc0c3a5310bda8";
+ })
+ ];
+ buildInputs =
+ (self.nativeDeps."mout"."~0.7.0" or []);
+ deps = [
+ ];
+ peerDependencies = [
+ ];
+ passthru.names = [ "mout" ];
+ };
full."mpath"."0.1.1" = lib.makeOverridable self.buildNodePackage {
name = "mpath-0.1.1";
src = [
@@ -8182,16 +8953,16 @@
];
passthru.names = [ "mpromise" ];
};
- full."mquery"."0.3.1" = lib.makeOverridable self.buildNodePackage {
- name = "mquery-0.3.1";
+ full."mquery"."0.3.2" = lib.makeOverridable self.buildNodePackage {
+ name = "mquery-0.3.2";
src = [
(fetchurl {
- url = "http://registry.npmjs.org/mquery/-/mquery-0.3.1.tgz";
- sha1 = "b67051685b3ec71c9dc6d0ca41385297325c4c45";
+ url = "http://registry.npmjs.org/mquery/-/mquery-0.3.2.tgz";
+ sha1 = "074cb82c51ec1b15897d8afb80a7b3567a2f8eca";
})
];
buildInputs =
- (self.nativeDeps."mquery"."0.3.1" or []);
+ (self.nativeDeps."mquery"."0.3.2" or []);
deps = [
self.full."sliced"."0.0.5"
self.full."debug"."0.7.0"
@@ -8919,11 +9690,11 @@
passthru.names = [ "nopt" ];
};
full."normalize-package-data"."~0.2" = lib.makeOverridable self.buildNodePackage {
- name = "normalize-package-data-0.2.4";
+ name = "normalize-package-data-0.2.6";
src = [
(fetchurl {
- url = "http://registry.npmjs.org/normalize-package-data/-/normalize-package-data-0.2.4.tgz";
- sha1 = "75e20353f342759e0fa8790c87d9935e7563e528";
+ url = "http://registry.npmjs.org/normalize-package-data/-/normalize-package-data-0.2.6.tgz";
+ sha1 = "830bda1412f7ccae09b903fc080edbcdbb0947c0";
})
];
buildInputs =
@@ -9748,6 +10519,23 @@
];
passthru.names = [ "over" ];
};
+ full."owl-deepcopy"."*" = lib.makeOverridable self.buildNodePackage {
+ name = "owl-deepcopy-0.0.2";
+ src = [
+ (fetchurl {
+ url = "http://registry.npmjs.org/owl-deepcopy/-/owl-deepcopy-0.0.2.tgz";
+ sha1 = "056c40e1af73dff6e2c7afae983d2a7760fdff88";
+ })
+ ];
+ buildInputs =
+ (self.nativeDeps."owl-deepcopy"."*" or []);
+ deps = [
+ ];
+ peerDependencies = [
+ ];
+ passthru.names = [ "owl-deepcopy" ];
+ };
+ "owl-deepcopy" = self.full."owl-deepcopy"."*";
full."owl-deepcopy"."~0.0.1" = lib.makeOverridable self.buildNodePackage {
name = "owl-deepcopy-0.0.2";
src = [
@@ -9910,11 +10698,11 @@
passthru.names = [ "pause" ];
};
full."phantomjs"."~1.9" = lib.makeOverridable self.buildNodePackage {
- name = "phantomjs-1.9.2-1";
+ name = "phantomjs-1.9.2-2";
src = [
(fetchurl {
- url = "http://registry.npmjs.org/phantomjs/-/phantomjs-1.9.2-1.tgz";
- sha1 = "698d3fab823320a32516c27a1055c36e8ee25df3";
+ url = "http://registry.npmjs.org/phantomjs/-/phantomjs-1.9.2-2.tgz";
+ sha1 = "256228800bc18292395eb0f54b14cd42c8093889";
})
];
buildInputs =
@@ -9932,6 +10720,29 @@
];
passthru.names = [ "phantomjs" ];
};
+ full."phantomjs"."~1.9.1-2" = lib.makeOverridable self.buildNodePackage {
+ name = "phantomjs-1.9.2-2";
+ src = [
+ (fetchurl {
+ url = "http://registry.npmjs.org/phantomjs/-/phantomjs-1.9.2-2.tgz";
+ sha1 = "256228800bc18292395eb0f54b14cd42c8093889";
+ })
+ ];
+ buildInputs =
+ (self.nativeDeps."phantomjs"."~1.9.1-2" or []);
+ deps = [
+ self.full."adm-zip"."0.2.1"
+ self.full."kew"."~0.1.7"
+ self.full."ncp"."0.4.2"
+ self.full."npmconf"."0.0.24"
+ self.full."mkdirp"."0.3.5"
+ self.full."rimraf"."~2.0.2"
+ self.full."which"."~1.0.5"
+ ];
+ peerDependencies = [
+ ];
+ passthru.names = [ "phantomjs" ];
+ };
full."pkginfo"."0.2.x" = lib.makeOverridable self.buildNodePackage {
name = "pkginfo-0.2.3";
src = [
@@ -9996,6 +10807,24 @@
];
passthru.names = [ "pkginfo" ];
};
+ full."plist-native"."*" = lib.makeOverridable self.buildNodePackage {
+ name = "plist-native-0.2.2";
+ src = [
+ (fetchurl {
+ url = "http://registry.npmjs.org/plist-native/-/plist-native-0.2.2.tgz";
+ sha1 = "6abde856b07a52f0d6bc027f7750f4d97ff93858";
+ })
+ ];
+ buildInputs =
+ (self.nativeDeps."plist-native"."*" or []);
+ deps = [
+ self.full."libxmljs"."~0.8.1"
+ ];
+ peerDependencies = [
+ ];
+ passthru.names = [ "plist-native" ];
+ };
+ "plist-native" = self.full."plist-native"."*";
full."policyfile"."0.0.4" = lib.makeOverridable self.buildNodePackage {
name = "policyfile-0.0.4";
src = [
@@ -10700,11 +11529,11 @@
passthru.names = [ "redeyed" ];
};
full."redis"."*" = lib.makeOverridable self.buildNodePackage {
- name = "redis-0.8.4";
+ name = "redis-0.8.6";
src = [
(fetchurl {
- url = "http://registry.npmjs.org/redis/-/redis-0.8.4.tgz";
- sha1 = "14609f26414e211c31e3cd07dc79b04bf9ff1980";
+ url = "http://registry.npmjs.org/redis/-/redis-0.8.6.tgz";
+ sha1 = "a7ae8f0d6fad24bdeaffe28158d6cd1f1c9d30b8";
})
];
buildInputs =
@@ -10750,11 +11579,11 @@
passthru.names = [ "redis" ];
};
full."redis".">= 0.6.6" = lib.makeOverridable self.buildNodePackage {
- name = "redis-0.8.4";
+ name = "redis-0.8.6";
src = [
(fetchurl {
- url = "http://registry.npmjs.org/redis/-/redis-0.8.4.tgz";
- sha1 = "14609f26414e211c31e3cd07dc79b04bf9ff1980";
+ url = "http://registry.npmjs.org/redis/-/redis-0.8.6.tgz";
+ sha1 = "a7ae8f0d6fad24bdeaffe28158d6cd1f1c9d30b8";
})
];
buildInputs =
@@ -11536,6 +12365,23 @@
];
passthru.names = [ "sax" ];
};
+ full."selenium-webdriver"."*" = lib.makeOverridable self.buildNodePackage {
+ name = "selenium-webdriver-2.35.2";
+ src = [
+ (fetchurl {
+ url = "http://registry.npmjs.org/selenium-webdriver/-/selenium-webdriver-2.35.2.tgz";
+ sha1 = "e6bbb6ff26ea61224173caa006a8eb87d6a94c2d";
+ })
+ ];
+ buildInputs =
+ (self.nativeDeps."selenium-webdriver"."*" or []);
+ deps = [
+ ];
+ peerDependencies = [
+ ];
+ passthru.names = [ "selenium-webdriver" ];
+ };
+ "selenium-webdriver" = self.full."selenium-webdriver"."*";
full."semver"."*" = lib.makeOverridable self.buildNodePackage {
name = "semver-2.1.0";
src = [
@@ -12169,11 +13015,11 @@
passthru.names = [ "slide" ];
};
full."smartdc"."*" = lib.makeOverridable self.buildNodePackage {
- name = "smartdc-7.1.0";
+ name = "smartdc-7.1.1";
src = [
(fetchurl {
- url = "http://registry.npmjs.org/smartdc/-/smartdc-7.1.0.tgz";
- sha1 = "8c6e5ac34501d6997dcf0e1c49aff4655053ad0f";
+ url = "http://registry.npmjs.org/smartdc/-/smartdc-7.1.1.tgz";
+ sha1 = "acc4378e0967b43dd8ded8c67f99e6508277bfb9";
})
];
buildInputs =
@@ -12185,23 +13031,23 @@
self.full."restify"."2.4.1"
self.full."bunyan"."0.21.1"
self.full."clone"."0.1.6"
- self.full."smartdc-auth"."1.0.0"
+ self.full."smartdc-auth"."1.0.1"
];
peerDependencies = [
];
passthru.names = [ "smartdc" ];
};
"smartdc" = self.full."smartdc"."*";
- full."smartdc-auth"."1.0.0" = lib.makeOverridable self.buildNodePackage {
- name = "smartdc-auth-1.0.0";
+ full."smartdc-auth"."1.0.1" = lib.makeOverridable self.buildNodePackage {
+ name = "smartdc-auth-1.0.1";
src = [
(fetchurl {
- url = "http://registry.npmjs.org/smartdc-auth/-/smartdc-auth-1.0.0.tgz";
- sha1 = "9b8569b914f25da53816fe158f80b6571470f270";
+ url = "http://registry.npmjs.org/smartdc-auth/-/smartdc-auth-1.0.1.tgz";
+ sha1 = "520bbf918313bdf2da372927d33756d46356b87b";
})
];
buildInputs =
- (self.nativeDeps."smartdc-auth"."1.0.0" or []);
+ (self.nativeDeps."smartdc-auth"."1.0.1" or []);
deps = [
self.full."assert-plus"."0.1.2"
self.full."clone"."0.1.5"
@@ -12387,11 +13233,11 @@
};
"sockjs" = self.full."sockjs"."*";
full."source-map"."*" = lib.makeOverridable self.buildNodePackage {
- name = "source-map-0.1.29";
+ name = "source-map-0.1.30";
src = [
(fetchurl {
- url = "http://registry.npmjs.org/source-map/-/source-map-0.1.29.tgz";
- sha1 = "39d571a0988fb7a548a676c4de72db78914d173c";
+ url = "http://registry.npmjs.org/source-map/-/source-map-0.1.30.tgz";
+ sha1 = "182726b50671d8fccaefc5ec35bf2a65c1956afb";
})
];
buildInputs =
@@ -12405,11 +13251,11 @@
};
"source-map" = self.full."source-map"."*";
full."source-map".">= 0.1.2" = lib.makeOverridable self.buildNodePackage {
- name = "source-map-0.1.29";
+ name = "source-map-0.1.30";
src = [
(fetchurl {
- url = "http://registry.npmjs.org/source-map/-/source-map-0.1.29.tgz";
- sha1 = "39d571a0988fb7a548a676c4de72db78914d173c";
+ url = "http://registry.npmjs.org/source-map/-/source-map-0.1.30.tgz";
+ sha1 = "182726b50671d8fccaefc5ec35bf2a65c1956afb";
})
];
buildInputs =
@@ -12422,11 +13268,11 @@
passthru.names = [ "source-map" ];
};
full."source-map"."~0.1.7" = lib.makeOverridable self.buildNodePackage {
- name = "source-map-0.1.29";
+ name = "source-map-0.1.30";
src = [
(fetchurl {
- url = "http://registry.npmjs.org/source-map/-/source-map-0.1.29.tgz";
- sha1 = "39d571a0988fb7a548a676c4de72db78914d173c";
+ url = "http://registry.npmjs.org/source-map/-/source-map-0.1.30.tgz";
+ sha1 = "182726b50671d8fccaefc5ec35bf2a65c1956afb";
})
];
buildInputs =
@@ -12897,6 +13743,23 @@
];
passthru.names = [ "tar" ];
};
+ full."taskgroup"."~3.2.0" = lib.makeOverridable self.buildNodePackage {
+ name = "taskgroup-3.2.3";
+ src = [
+ (fetchurl {
+ url = "http://registry.npmjs.org/taskgroup/-/taskgroup-3.2.3.tgz";
+ sha1 = "5bbfa9fb0312f04251140f2f858f8f4ee0086958";
+ })
+ ];
+ buildInputs =
+ (self.nativeDeps."taskgroup"."~3.2.0" or []);
+ deps = [
+ self.full."ambi"."~2.1.4"
+ ];
+ peerDependencies = [
+ ];
+ passthru.names = [ "taskgroup" ];
+ };
full."temp"."*" = lib.makeOverridable self.buildNodePackage {
name = "temp-0.6.0";
src = [
@@ -13114,6 +13977,54 @@
];
passthru.names = [ "tunnel-agent" ];
};
+ full."type-detect"."0.1.0" = lib.makeOverridable self.buildNodePackage {
+ name = "type-detect-0.1.0";
+ src = [
+ (fetchurl {
+ url = "http://registry.npmjs.org/type-detect/-/type-detect-0.1.0.tgz";
+ sha1 = "81ed3ab764cd5139388b67d052eb01610edc1a57";
+ })
+ ];
+ buildInputs =
+ (self.nativeDeps."type-detect"."0.1.0" or []);
+ deps = [
+ ];
+ peerDependencies = [
+ ];
+ passthru.names = [ "type-detect" ];
+ };
+ full."typechecker"."~2.0.1" = lib.makeOverridable self.buildNodePackage {
+ name = "typechecker-2.0.6";
+ src = [
+ (fetchurl {
+ url = "http://registry.npmjs.org/typechecker/-/typechecker-2.0.6.tgz";
+ sha1 = "f9dc9a161d05957c5e8225b7470261e16a8409cb";
+ })
+ ];
+ buildInputs =
+ (self.nativeDeps."typechecker"."~2.0.1" or []);
+ deps = [
+ ];
+ peerDependencies = [
+ ];
+ passthru.names = [ "typechecker" ];
+ };
+ full."typechecker"."~2.0.6" = lib.makeOverridable self.buildNodePackage {
+ name = "typechecker-2.0.6";
+ src = [
+ (fetchurl {
+ url = "http://registry.npmjs.org/typechecker/-/typechecker-2.0.6.tgz";
+ sha1 = "f9dc9a161d05957c5e8225b7470261e16a8409cb";
+ })
+ ];
+ buildInputs =
+ (self.nativeDeps."typechecker"."~2.0.6" or []);
+ deps = [
+ ];
+ peerDependencies = [
+ ];
+ passthru.names = [ "typechecker" ];
+ };
full."uglify-js"."1.2.5" = lib.makeOverridable self.buildNodePackage {
name = "uglify-js-1.2.5";
src = [
@@ -13272,22 +14183,6 @@
passthru.names = [ "underscore" ];
};
"underscore" = self.full."underscore"."*";
- full."underscore"."1.4.4" = lib.makeOverridable self.buildNodePackage {
- name = "underscore-1.4.4";
- src = [
- (fetchurl {
- url = "http://registry.npmjs.org/underscore/-/underscore-1.4.4.tgz";
- sha1 = "61a6a32010622afa07963bf325203cf12239d604";
- })
- ];
- buildInputs =
- (self.nativeDeps."underscore"."1.4.4" or []);
- deps = [
- ];
- peerDependencies = [
- ];
- passthru.names = [ "underscore" ];
- };
full."underscore"."1.4.x" = lib.makeOverridable self.buildNodePackage {
name = "underscore-1.4.4";
src = [
@@ -13433,11 +14328,11 @@
passthru.names = [ "underscore.string" ];
};
full."ungit"."*" = lib.makeOverridable self.buildNodePackage {
- name = "ungit-0.2.1";
+ name = "ungit-0.3.1";
src = [
(fetchurl {
- url = "http://registry.npmjs.org/ungit/-/ungit-0.2.1.tgz";
- sha1 = "1aa4af1cbe881e6200fbd1726fc66341c3595f01";
+ url = "http://registry.npmjs.org/ungit/-/ungit-0.3.1.tgz";
+ sha1 = "9541d6ba8545ea4a914cf05a413890da61bdd7ff";
})
];
buildInputs =
@@ -13445,7 +14340,9 @@
deps = [
self.full."express"."3.2.6"
self.full."superagent"."0.14.7"
- self.full."underscore"."1.4.4"
+ self.full."lodash.debounce"."~2.2.0"
+ self.full."lodash.find"."~2.2.0"
+ self.full."lodash.throttle"."~2.2.0"
self.full."temp"."0.6.0"
self.full."socket.io"."0.9.16"
self.full."moment"."2.0.0"
@@ -13467,6 +14364,8 @@
self.full."blueimp-md5"."~1.0.3"
self.full."color"."~0.4.4"
self.full."keen.io"."0.0.3"
+ self.full."getmac"."~1.0.5"
+ self.full."deep-extend"."~0.2.6"
];
peerDependencies = [
];
@@ -13496,11 +14395,11 @@
passthru.names = [ "unzip" ];
};
full."update-notifier"."~0.1.3" = lib.makeOverridable self.buildNodePackage {
- name = "update-notifier-0.1.5";
+ name = "update-notifier-0.1.6";
src = [
(fetchurl {
- url = "http://registry.npmjs.org/update-notifier/-/update-notifier-0.1.5.tgz";
- sha1 = "adf98004c29bf521f242c2970c471f310b353b44";
+ url = "http://registry.npmjs.org/update-notifier/-/update-notifier-0.1.6.tgz";
+ sha1 = "c814e7eabaadaba789f75c3f652366db8efec471";
})
];
buildInputs =
@@ -13755,11 +14654,11 @@
passthru.names = [ "verror" ];
};
full."view-helpers"."*" = lib.makeOverridable self.buildNodePackage {
- name = "view-helpers-0.1.2";
+ name = "view-helpers-0.1.3";
src = [
(fetchurl {
- url = "http://registry.npmjs.org/view-helpers/-/view-helpers-0.1.2.tgz";
- sha1 = "20643e9f50d00cf46da754dc934d791d4f6e3bb2";
+ url = "http://registry.npmjs.org/view-helpers/-/view-helpers-0.1.3.tgz";
+ sha1 = "97b061548a753eff5b432e6c1598cb10417bff02";
})
];
buildInputs =
@@ -13861,6 +14760,30 @@
];
passthru.names = [ "wd" ];
};
+ full."webdrvr"."*" = lib.makeOverridable self.buildNodePackage {
+ name = "webdrvr-2.35.0-6";
+ src = [
+ (fetchurl {
+ url = "http://registry.npmjs.org/webdrvr/-/webdrvr-2.35.0-6.tgz";
+ sha1 = "1dffadb2960c82c7b9baba6512cd6f35f6e8d706";
+ })
+ ];
+ buildInputs =
+ (self.nativeDeps."webdrvr"."*" or []);
+ deps = [
+ self.full."adm-zip"."~0.4.3"
+ self.full."kew"."~0.1.7"
+ self.full."mkdirp"."~0.3.5"
+ self.full."npmconf"."~0.1.2"
+ self.full."phantomjs"."~1.9.1-2"
+ self.full."tmp"."~0.0.20"
+ self.full."follow-redirects"."0.0.3"
+ ];
+ peerDependencies = [
+ ];
+ passthru.names = [ "webdrvr" ];
+ };
+ "webdrvr" = self.full."webdrvr"."*";
full."websocket-driver".">=0.3.0" = lib.makeOverridable self.buildNodePackage {
name = "websocket-driver-0.3.0";
src = [
@@ -14154,6 +15077,23 @@
passthru.names = [ "wu" ];
};
"wu" = self.full."wu"."*";
+ full."x509"."*" = lib.makeOverridable self.buildNodePackage {
+ name = "x509-0.0.6";
+ src = [
+ (fetchurl {
+ url = "http://registry.npmjs.org/x509/-/x509-0.0.6.tgz";
+ sha1 = "b58747854ff33df7ff8f1653756bff6a32a8c838";
+ })
+ ];
+ buildInputs =
+ (self.nativeDeps."x509"."*" or []);
+ deps = [
+ ];
+ peerDependencies = [
+ ];
+ passthru.names = [ "x509" ];
+ };
+ "x509" = self.full."x509"."*";
full."xml2js"."0.2.4" = lib.makeOverridable self.buildNodePackage {
name = "xml2js-0.2.4";
src = [
diff --git a/pkgs/top-level/node-packages.json b/pkgs/top-level/node-packages.json
index b559b56376efe6c546b0f9e09a3be47ebac24072..3e16f4e3df41bbaa142d33ad71cb77afb13d6def 100644
--- a/pkgs/top-level/node-packages.json
+++ b/pkgs/top-level/node-packages.json
@@ -97,4 +97,13 @@
, "coveralls"
, "js-yaml"
, "node-inspector"
+, "istanbul"
+, "mocha-unfunk-reporter"
+, "chai"
+, "selenium-webdriver"
+, "webdrvr"
+, "connect-jade-static"
+, "plist-native"
+, "x509"
+, "owl-deepcopy"
]
diff --git a/pkgs/top-level/python-packages-generated.nix b/pkgs/top-level/python-packages-generated.nix
index fe75ea4098a581440415125dcd60c7bf7c065128..e7308e2b8164eccf636225075173206aefead79c 100644
--- a/pkgs/top-level/python-packages-generated.nix
+++ b/pkgs/top-level/python-packages-generated.nix
@@ -87,21 +87,21 @@ in
};
- "collective.z3cform.datetimewidget-1.2.5" = self.buildPythonPackage {
- name = "collective.z3cform.datetimewidget-1.2.5";
+ "plone.app.contentlisting-1.0.5" = self.buildPythonPackage {
+ name = "plone.app.contentlisting-1.0.5";
src = fetchurl {
- url = "https://pypi.python.org/packages/source/c/collective.z3cform.datetimewidget/collective.z3cform.datetimewidget-1.2.5.zip";
- md5 = "38fa463ea9b0b3cf5f61540250968214";
+ url = "https://pypi.python.org/packages/source/p/plone.app.contentlisting/plone.app.contentlisting-1.0.5.zip";
+ md5 = "9fc15b8ecad1c918778c3ea9a75bf533";
};
doCheck = false;
buildInputs = [ pkgs.unzip ];
- propagatedBuildInputs = [ self.setuptools self."z3c.form-3.0.2" self."zope.deprecation-3.4.1" self."zope.i18n__zcml-3.7.4" ];
+ propagatedBuildInputs = [ self."plone.uuid-1.0.3" self.setuptools ];
installCommand = ''easy_install --always-unzip --no-deps --prefix="$out" .'';
meta = {
description = ''
- z3c.form date and datetime widgets
+ Listing of content for the Plone CMS
'';
- homepage = "https://github.com/collective/collective.z3cform.datetimewidget";
+ homepage = "http://pypi.python.org/pypi/plone.app.contentlisting";
license = "GPL version 2";
};
};
@@ -147,22 +147,22 @@ in
};
- "plone.app.caching-1.1.6" = self.buildPythonPackage {
- name = "plone.app.caching-1.1.6";
+ "plone.z3cform-0.8.0" = self.buildPythonPackage {
+ name = "plone.z3cform-0.8.0";
src = fetchurl {
- url = "https://pypi.python.org/packages/source/p/plone.app.caching/plone.app.caching-1.1.6.zip";
- md5 = "52f817d67e6da1508bf6f1486e5466d2";
+ url = "https://pypi.python.org/packages/source/p/plone.z3cform/plone.z3cform-0.8.0.zip";
+ md5 = "bdb23dd162544964d2f8f8f5f002e874";
};
doCheck = false;
buildInputs = [ pkgs.unzip ];
- propagatedBuildInputs = [ self."Acquisition-2.13.8" self."plone.app.registry-1.2.3" self."plone.app.z3cform-0.7.4" self."plone.cachepurging-1.0.4" self."plone.caching-1.0" self."plone.memoize-1.1.1" self."plone.protect-2.0.2" self."plone.registry-1.0.1" self."Products.CMFCore-2.2.7" self."Products.CMFDynamicViewFTI-4.0.5" self."Products.GenericSetup-1.7.4" self."Products.statusmessages-4.0" self."python-dateutil-1.5" self.setuptools self."z3c.form-3.0.2" self."z3c.zcmlhook-1.0b1" self."zope.browserresource-3.10.3" self."zope.component__zcml-3.9.5" self."zope.interface-3.6.7" self."zope.pagetemplate-3.6.3" self."zope.publisher-3.12.6" self."Zope2-2.13.21" ];
+ propagatedBuildInputs = [ self."plone.batching-1.0" self.setuptools self."z3c.form-3.0.2" self."zope.browserpage-3.12.2" self."zope.component__zcml-3.9.5" self."zope.i18n__zcml-3.7.4" self."Zope2-2.13.21" ];
installCommand = ''easy_install --always-unzip --no-deps --prefix="$out" .'';
meta = {
description = ''
- Plone UI and default rules for plone.caching/z3c.caching
+ plone.z3cform is a library that allows use of z3c.form with Zope 2 and the CMF.
'';
- homepage = "http://pypi.python.org/pypi/plone.app.caching";
- license = "GPL version 2";
+ homepage = "http://pypi.python.org/pypi/plone.z3cform";
+ license = "ZPL 2.1";
};
};
@@ -216,7 +216,7 @@ in
doCheck = false;
buildInputs = [ ];
propagatedBuildInputs = [ self.setuptools self."zope.proxy-3.6.1" ];
- installCommand = ''easy_install --always-unzip --no-deps --prefix="$out" .'';
+ installCommand = ''easy_install --always-unzip --prefix="$out" .'';
meta = {
description = ''
zope.deferredimport allows you to perform imports names that will only be resolved when used in the code.
@@ -267,11 +267,11 @@ in
};
- "coverage-3.6" = self.buildPythonPackage {
- name = "coverage-3.6";
+ "coverage-3.7" = self.buildPythonPackage {
+ name = "coverage-3.7";
src = fetchurl {
- url = "https://pypi.python.org/packages/source/c/coverage/coverage-3.6.tar.gz";
- md5 = "67d4e393f4c6a5ffc18605409d2aa1ac";
+ url = "https://pypi.python.org/packages/source/c/coverage/coverage-3.7.tar.gz";
+ md5 = "055d82e6849d882ec6cf2ae1faca8e56";
};
doCheck = true;
buildInputs = [ ];
@@ -287,26 +287,6 @@ in
};
- "plone.app.textfield-1.2.2" = self.buildPythonPackage {
- name = "plone.app.textfield-1.2.2";
- src = fetchurl {
- url = "https://pypi.python.org/packages/source/p/plone.app.textfield/plone.app.textfield-1.2.2.zip";
- md5 = "f832887a40826d6f68c48b48f071fb9c";
- };
- doCheck = false;
- buildInputs = [ pkgs.unzip ];
- propagatedBuildInputs = [ self.setuptools self."ZODB3-3.10.5" self."zope.component__zcml-3.9.5" self."zope.interface-3.6.7" self."zope.schema-4.2.2" ];
- installCommand = ''easy_install --always-unzip --no-deps --prefix="$out" .'';
- meta = {
- description = ''
- Text field with MIME type support
- '';
- homepage = "http://pypi.python.org/pypi/plone.app.textfield";
- license = "GPL";
- };
- };
-
-
"Products.CMFUid-2.2.1" = self.buildPythonPackage {
name = "Products.CMFUid-2.2.1";
src = fetchurl {
@@ -387,26 +367,6 @@ in
};
- "Products.GenericSetup-1.7.4" = self.buildPythonPackage {
- name = "Products.GenericSetup-1.7.4";
- src = fetchurl {
- url = "https://pypi.python.org/packages/source/P/Products.GenericSetup/Products.GenericSetup-1.7.4.tar.gz";
- md5 = "f93251ed519e8c4aea0bc001416027b1";
- };
- doCheck = false;
- buildInputs = [ ];
- propagatedBuildInputs = [ self."five.localsitemanager-2.0.5" self.setuptools self."zope.formlib-4.0.6" self."Zope2-2.13.21" ];
- installCommand = ''easy_install --always-unzip --no-deps --prefix="$out" .'';
- meta = {
- description = ''
- Read Zope configuration state from profile dirs / tarballs
- '';
- homepage = "http://pypi.python.org/pypi/Products.GenericSetup";
- license = "ZPL 2.1 (http://www.zope.org/Resources/License/ZPL-2.1)";
- };
- };
-
-
"plone.app.redirector-1.2" = self.buildPythonPackage {
name = "plone.app.redirector-1.2";
src = fetchurl {
@@ -476,7 +436,7 @@ in
doCheck = false;
buildInputs = [ ];
propagatedBuildInputs = [ self."mechanize-0.2.5" self."pytz-2013b" self.setuptools self."zope.interface-3.6.7" self."zope.schema-4.2.2" ];
- installCommand = ''easy_install --always-unzip --no-deps --prefix="$out" .'';
+ installCommand = ''easy_install --always-unzip --prefix="$out" .'';
meta = {
description = ''
Programmable browser for functional black-box tests
@@ -516,7 +476,7 @@ in
doCheck = false;
buildInputs = [ ];
propagatedBuildInputs = [ self.setuptools self."zope.annotation-3.5.0" self."zope.component__zcml-3.9.5" self."zope.container-3.11.2" self."zope.event-3.5.2" self."zope.interface-3.6.7" self."zope.lifecycleevent-3.6.2" self."zope.location-3.9.1" self."zope.security__untrustedpython-3.7.4" ];
- installCommand = ''easy_install --always-unzip --no-deps --prefix="$out" .'';
+ installCommand = ''easy_install --always-unzip --prefix="$out" .'';
meta = {
description = ''
Local registries for zope component architecture
@@ -547,26 +507,6 @@ in
};
- "mechanize-0.2.5" = self.buildPythonPackage {
- name = "mechanize-0.2.5";
- src = fetchurl {
- url = "https://pypi.python.org/packages/source/m/mechanize/mechanize-0.2.5.tar.gz";
- md5 = "32657f139fc2fb75bcf193b63b8c60b2";
- };
- doCheck = false;
- buildInputs = [ ];
- propagatedBuildInputs = [ ];
- installCommand = ''easy_install --always-unzip --no-deps --prefix="$out" .'';
- meta = {
- description = ''
- Stateful programmatic web browsing.
- '';
- homepage = "http://wwwsearch.sourceforge.net/mechanize/";
- license = "BSD";
- };
- };
-
-
"Products.PlacelessTranslationService-2.0.4" = self.buildPythonPackage {
name = "Products.PlacelessTranslationService-2.0.4";
src = fetchurl {
@@ -624,7 +564,7 @@ in
doCheck = false;
buildInputs = [ ];
propagatedBuildInputs = [ ];
- installCommand = ''easy_install --always-unzip --no-deps --prefix="$out" .'';
+ installCommand = ''easy_install --always-unzip --prefix="$out" .'';
meta = {
description = ''
Structured Configuration Library
@@ -744,7 +684,7 @@ in
doCheck = false;
buildInputs = [ pkgs.unzip ];
propagatedBuildInputs = [ self.setuptools self."zope.interface-3.6.7" ];
- installCommand = ''easy_install --always-unzip --no-deps --prefix="$out" .'';
+ installCommand = ''easy_install --always-unzip --prefix="$out" .'';
meta = {
description = ''
Generic Transparent Proxies
@@ -864,7 +804,7 @@ in
doCheck = false;
buildInputs = [ pkgs.unzip ];
propagatedBuildInputs = [ self."ExtensionClass-2.13.2" ];
- installCommand = ''easy_install --always-unzip --no-deps --prefix="$out" .'';
+ installCommand = ''easy_install --always-unzip --prefix="$out" .'';
meta = {
description = ''
Special MultiMapping objects used in Zope2.
@@ -915,22 +855,24 @@ in
};
- "plone.indexer-1.0.2" = self.buildPythonPackage {
- name = "plone.indexer-1.0.2";
+ "plone.recipe.zope2instance" = self."plone.recipe.zope2instance-4.2.13";
+
+ "plone.recipe.zope2instance-4.2.13" = self.buildPythonPackage {
+ name = "plone.recipe.zope2instance-4.2.13";
src = fetchurl {
- url = "https://pypi.python.org/packages/source/p/plone.indexer/plone.indexer-1.0.2.zip";
- md5 = "538aeee1f9db78bc8c85ae1bcb0153ed";
+ url = "https://pypi.python.org/packages/source/p/plone.recipe.zope2instance/plone.recipe.zope2instance-4.2.13.zip";
+ md5 = "1ff990a15e77a92a7339b5092bfb9cc3";
};
doCheck = false;
buildInputs = [ pkgs.unzip ];
- propagatedBuildInputs = [ self."Products.CMFCore-2.2.7" self.setuptools self."zope.component__zcml-3.9.5" self."zope.interface-3.6.7" ];
- installCommand = ''easy_install --always-unzip --no-deps --prefix="$out" .'';
+ propagatedBuildInputs = [ self."mailinglogger-3.7.0" self.setuptools self."zc.buildout-1.7.1" self."zc.recipe.egg-1.3.2" self."ZODB3-3.10.5" self."Zope2-2.13.21" ];
+ installCommand = ''easy_install --always-unzip --prefix="$out" .'';
meta = {
description = ''
- Hooks to facilitate managing custom index values in Zope 2/CMF applications
+ Buildout recipe for creating a Zope 2 instance
'';
- homepage = "http://pypi.python.org/pypi/plone.indexer";
- license = "BSD";
+ homepage = "http://pypi.python.org/pypi/plone.recipe.zope2instance";
+ license = "ZPL 2.1";
};
};
@@ -1044,7 +986,7 @@ in
doCheck = false;
buildInputs = [ ];
propagatedBuildInputs = [ self.setuptools self."zope.interface-3.6.7" ];
- installCommand = ''easy_install --always-unzip --no-deps --prefix="$out" .'';
+ installCommand = ''easy_install --always-unzip --prefix="$out" .'';
meta = {
description = ''
Zope process lifetime events
@@ -1115,22 +1057,22 @@ in
};
- "tempstorage-2.12.2" = self.buildPythonPackage {
- name = "tempstorage-2.12.2";
+ "plone.stringinterp-1.0.10" = self.buildPythonPackage {
+ name = "plone.stringinterp-1.0.10";
src = fetchurl {
- url = "https://pypi.python.org/packages/source/t/tempstorage/tempstorage-2.12.2.zip";
- md5 = "7a2b76b39839e229249b1bb175604480";
+ url = "https://pypi.python.org/packages/source/p/plone.stringinterp/plone.stringinterp-1.0.10.zip";
+ md5 = "595074e94944ad6860e2105a020a3b9a";
};
doCheck = false;
buildInputs = [ pkgs.unzip ];
- propagatedBuildInputs = [ self.setuptools self."ZODB3-3.10.5" self."zope.testing-3.9.7" ];
+ propagatedBuildInputs = [ self."Products.CMFCore-2.2.7" self.setuptools self."zope.i18n__zcml-3.7.4" ];
installCommand = ''easy_install --always-unzip --no-deps --prefix="$out" .'';
meta = {
description = ''
- A RAM-based storage for ZODB
+ Adaptable string interpolation
'';
- homepage = "http://pypi.python.org/pypi/tempstorage";
- license = "ZPL 2.1";
+ homepage = "http://pypi.python.org/pypi/plone.stringinterp";
+ license = "GPL version 2";
};
};
@@ -1184,7 +1126,7 @@ in
doCheck = false;
buildInputs = [ ];
propagatedBuildInputs = [ self.setuptools ];
- installCommand = ''easy_install --always-unzip --no-deps --prefix="$out" .'';
+ installCommand = ''easy_install --always-unzip --prefix="$out" .'';
meta = {
description = ''
Sequence Sorting
@@ -1215,6 +1157,26 @@ in
};
+ "plone.resourceeditor-1.0" = self.buildPythonPackage {
+ name = "plone.resourceeditor-1.0";
+ src = fetchurl {
+ url = "https://pypi.python.org/packages/source/p/plone.resourceeditor/plone.resourceeditor-1.0.zip";
+ md5 = "443ff0a0ad83b94fc08cac46ee3b2ad4";
+ };
+ doCheck = false;
+ buildInputs = [ pkgs.unzip ];
+ propagatedBuildInputs = [ self."plone.resource-1.0.2" self.setuptools self."zope.component__zcml-3.9.5" self."zope.interface-3.6.7" self."zope.publisher-3.12.6" self."zope.schema-4.2.2" self."Zope2-2.13.21" ];
+ installCommand = ''easy_install --always-unzip --no-deps --prefix="$out" .'';
+ meta = {
+ description = ''
+ UNKNOWN
+ '';
+ homepage = "https://github.com/plone/plone.resourceeditor";
+ license = "GPL";
+ };
+ };
+
+
"zope.app.publication-3.12.0" = self.buildPythonPackage {
name = "zope.app.publication-3.12.0";
src = fetchurl {
@@ -1244,7 +1206,7 @@ in
doCheck = false;
buildInputs = [ ];
propagatedBuildInputs = [ self.setuptools self."zope.event-3.5.2" self."zope.interface-3.6.7" ];
- installCommand = ''easy_install --always-unzip --no-deps --prefix="$out" .'';
+ installCommand = ''easy_install --always-unzip --prefix="$out" .'';
meta = {
description = ''
zope.interface extension for defining data schemas
@@ -1335,22 +1297,22 @@ in
};
- "Persistence-2.13.2" = self.buildPythonPackage {
- name = "Persistence-2.13.2";
+ "plone.dexterity-2.1.3" = self.buildPythonPackage {
+ name = "plone.dexterity-2.1.3";
src = fetchurl {
- url = "https://pypi.python.org/packages/source/P/Persistence/Persistence-2.13.2.zip";
- md5 = "92693648ccdc59c8fc71f7f06b1d228c";
+ url = "https://pypi.python.org/packages/source/p/plone.dexterity/plone.dexterity-2.1.3.zip";
+ md5 = "7f6444a2c26488e4068217266fd243b7";
};
doCheck = false;
buildInputs = [ pkgs.unzip ];
- propagatedBuildInputs = [ self."ExtensionClass-2.13.2" self."ZODB3-3.10.5" ];
+ propagatedBuildInputs = [ self."plone.alterego-1.0" self."plone.autoform-1.5" self."plone.behavior-1.0.2" self."plone.folder-1.0.4" self."plone.memoize-1.1.1" self."plone.rfc822-1.1" self."plone.supermodel-1.2.3" self."plone.synchronize-1.0.1" self."plone.uuid-1.0.3" self."plone.z3cform-0.8.0" self."Products.CMFCore-2.2.7" self."Products.CMFDefault-2.2.3" self."Products.CMFDynamicViewFTI-4.0.5" self."Products.statusmessages-4.0" self.setuptools self."ZODB3-3.10.5" self."zope.annotation-3.5.0" self."zope.browser-1.3" self."zope.component__zcml-3.9.5" self."zope.container-3.11.2" self."zope.dottedname-3.4.6" self."zope.filerepresentation-3.6.1" self."zope.interface-3.6.7" self."zope.lifecycleevent-3.6.2" self."zope.location-3.9.1" self."zope.publisher-3.12.6" self."zope.schema-4.2.2" self."zope.security__untrustedpython-3.7.4" self."zope.size-3.4.1" self."Zope2-2.13.21" ];
installCommand = ''easy_install --always-unzip --no-deps --prefix="$out" .'';
meta = {
description = ''
- Persistent ExtensionClass
+ Flexible CMF content
'';
- homepage = "http://pypi.python.org/pypi/Persistence";
- license = "ZPL 2.1";
+ homepage = "http://code.google.com/p/dexterity";
+ license = "GPL version 2";
};
};
@@ -1408,7 +1370,7 @@ in
doCheck = false;
buildInputs = [ ];
propagatedBuildInputs = [ self.setuptools ];
- installCommand = ''easy_install --always-unzip --no-deps --prefix="$out" .'';
+ installCommand = ''easy_install --always-unzip --prefix="$out" .'';
meta = {
description = ''
Basic inter-process locks
@@ -1428,7 +1390,7 @@ in
doCheck = false;
buildInputs = [ ];
propagatedBuildInputs = [ self.setuptools self."zope.interface-3.6.7" self."zope.tal-3.5.2" ];
- installCommand = ''easy_install --always-unzip --no-deps --prefix="$out" .'';
+ installCommand = ''easy_install --always-unzip --prefix="$out" .'';
meta = {
description = ''
Zope Template Application Language Expression Syntax (TALES)
@@ -1448,7 +1410,7 @@ in
doCheck = false;
buildInputs = [ pkgs.unzip ];
propagatedBuildInputs = [ self."pytz-2013b" self."zope.interface-3.6.7" ];
- installCommand = ''easy_install --always-unzip --no-deps --prefix="$out" .'';
+ installCommand = ''easy_install --always-unzip --prefix="$out" .'';
meta = {
description = ''
This package provides a DateTime data type, as known from Zope 2.Unless you need to communicate with Zope 2 APIs, you're probablybetter off using Python's built-in datetime module.
@@ -1488,7 +1450,7 @@ in
doCheck = false;
buildInputs = [ ];
propagatedBuildInputs = [ ];
- installCommand = ''easy_install --always-unzip --no-deps --prefix="$out" .'';
+ installCommand = ''easy_install --always-unzip --prefix="$out" .'';
meta = {
description = ''
World timezone definitions, modern and historical
@@ -1508,7 +1470,7 @@ in
doCheck = false;
buildInputs = [ pkgs.unzip ];
propagatedBuildInputs = [ self.setuptools self."zope.i18nmessageid-3.5.3" self."zope.interface-3.6.7" self."zope.schema-4.2.2" ];
- installCommand = ''easy_install --always-unzip --no-deps --prefix="$out" .'';
+ installCommand = ''easy_install --always-unzip --prefix="$out" .'';
meta = {
description = ''
Zope Configuration Markup Language (ZCML)
@@ -1519,26 +1481,6 @@ in
};
- "Missing-2.13.1" = self.buildPythonPackage {
- name = "Missing-2.13.1";
- src = fetchurl {
- url = "https://pypi.python.org/packages/source/M/Missing/Missing-2.13.1.zip";
- md5 = "9823cff54444cbbcaef8fc45d8e42572";
- };
- doCheck = false;
- buildInputs = [ pkgs.unzip ];
- propagatedBuildInputs = [ self."ExtensionClass-2.13.2" ];
- installCommand = ''easy_install --always-unzip --no-deps --prefix="$out" .'';
- meta = {
- description = ''
- Special Missing objects used in Zope2.
- '';
- homepage = "http://pypi.python.org/pypi/Missing";
- license = "ZPL 2.1";
- };
- };
-
-
"plone.app.iterate-2.1.10" = self.buildPythonPackage {
name = "plone.app.iterate-2.1.10";
src = fetchurl {
@@ -1599,6 +1541,26 @@ in
};
+ "zope.broken-3.6.0" = self.buildPythonPackage {
+ name = "zope.broken-3.6.0";
+ src = fetchurl {
+ url = "https://pypi.python.org/packages/source/z/zope.broken/zope.broken-3.6.0.zip";
+ md5 = "eff24d7918099a3e899ee63a9c31bee6";
+ };
+ doCheck = false;
+ buildInputs = [ pkgs.unzip ];
+ propagatedBuildInputs = [ self.setuptools self."zope.interface-3.6.7" ];
+ installCommand = ''easy_install --always-unzip --prefix="$out" .'';
+ meta = {
+ description = ''
+ Zope Broken Object Interfaces
+ '';
+ homepage = "http://pypi.python.org/pypi/zope.broken";
+ license = "ZPL 2.1";
+ };
+ };
+
+
"lxml-3.2.3" = self.buildPythonPackage {
name = "lxml-3.2.3";
src = fetchurl {
@@ -1668,7 +1630,7 @@ in
doCheck = false;
buildInputs = [ ];
propagatedBuildInputs = [ self.setuptools self."zope.browserresource-3.10.3" self."zope.interface-3.6.7" self."zope.pagetemplate-3.6.3" self."zope.publisher-3.12.6" self."zope.security__untrustedpython-3.7.4" ];
- installCommand = ''easy_install --always-unzip --no-deps --prefix="$out" .'';
+ installCommand = ''easy_install --always-unzip --prefix="$out" .'';
meta = {
description = ''
Page template resource plugin for zope.browserresource
@@ -1688,7 +1650,7 @@ in
doCheck = false;
buildInputs = [ ];
propagatedBuildInputs = [ ];
- installCommand = ''easy_install --always-unzip --no-deps --prefix="$out" .'';
+ installCommand = ''easy_install --always-unzip --prefix="$out" .'';
meta = {
description = ''
Docutils -- Python Documentation Utilities
@@ -1699,11 +1661,11 @@ in
};
- "beautifulsoup4-4.3.1" = self.buildPythonPackage {
- name = "beautifulsoup4-4.3.1";
+ "beautifulsoup4-4.3.2" = self.buildPythonPackage {
+ name = "beautifulsoup4-4.3.2";
src = fetchurl {
- url = "https://pypi.python.org/packages/source/b/beautifulsoup4/beautifulsoup4-4.3.1.tar.gz";
- md5 = "508095f2784c64114e06856edc1dafed";
+ url = "https://pypi.python.org/packages/source/b/beautifulsoup4/beautifulsoup4-4.3.2.tar.gz";
+ md5 = "b8d157a204d56512a4cc196e53e7d8ee";
};
doCheck = false;
buildInputs = [ ];
@@ -1711,7 +1673,7 @@ in
installCommand = ''easy_install --always-unzip --prefix="$out" .'';
meta = {
description = ''
- UNKNOWN
+ Screen-scraping library
'';
homepage = "http://www.crummy.com/software/BeautifulSoup/bs4/";
license = "MIT";
@@ -1719,22 +1681,22 @@ in
};
- "plone.app.upgrade-1.3.4" = self.buildPythonPackage {
- name = "plone.app.upgrade-1.3.4";
+ "Products.PloneLanguageTool-3.2.7" = self.buildPythonPackage {
+ name = "Products.PloneLanguageTool-3.2.7";
src = fetchurl {
- url = "https://pypi.python.org/packages/source/p/plone.app.upgrade/plone.app.upgrade-1.3.4.zip";
- md5 = "10c192ee4a2422f901e020fd5b39879a";
+ url = "https://pypi.python.org/packages/source/P/Products.PloneLanguageTool/Products.PloneLanguageTool-3.2.7.zip";
+ md5 = "bd9eb6278bf76e8cbce99437ca362164";
};
doCheck = false;
buildInputs = [ pkgs.unzip ];
- propagatedBuildInputs = [ self."Acquisition-2.13.8" self."borg.localrole-3.0.2" self."five.localsitemanager-2.0.5" self."plone.app.folder-1.0.5" self."plone.app.portlets-2.4.5" self."plone.portlets-2.2" self."plone.session-3.5.3" self."Products.Archetypes-1.9.4" self."Products.CMFActionIcons-2.1.3" self."Products.CMFCalendar-2.2.2" self."Products.CMFCore-2.2.7" self."Products.CMFDefault-2.2.3" self."Products.CMFDiffTool-2.1" self."Products.CMFEditions-2.2.8" self."Products.CMFFormController-3.0.3" self."Products.CMFQuickInstallerTool-3.0.6" self."Products.CMFUid-2.2.1" self."Products.contentmigration-2.1.5" self."Products.DCWorkflow-2.2.4" self."Products.GenericSetup-1.7.4" self."Products.MimetypesRegistry-2.0.5" self."Products.PloneLanguageTool-3.2.7" self."Products.PlonePAS-4.1.1" self."Products.PluggableAuthService-1.10.0" self."Products.PortalTransforms-2.1.2" self."Products.ResourceRegistries-2.2.9" self."Products.SecureMailHost-1.1.2" self."Products.ZCatalog-2.13.23" self.setuptools self."transaction-1.1.1" self."zope.component__zcml-3.9.5" self."zope.interface-3.6.7" self."zope.location-3.9.1" self."zope.ramcache-1.0" self."zope.site-3.9.2" self."Zope2-2.13.21" ];
+ propagatedBuildInputs = [ self.setuptools ];
installCommand = ''easy_install --always-unzip --no-deps --prefix="$out" .'';
meta = {
description = ''
- Upgrade machinery for Plone.
+ PloneLanguageTool allows you to set the available languages in your Plone site, select various fallback mechanisms, and control the use of flags for language selection and translations.
'';
- homepage = "http://pypi.python.org/pypi/plone.app.upgrade";
- license = "GPL version 2";
+ homepage = "http://pypi.python.org/pypi/Products.PloneLanguageTool";
+ license = "GPL";
};
};
@@ -1879,42 +1841,44 @@ in
};
- "Products.PluggableAuthService-1.10.0" = self.buildPythonPackage {
- name = "Products.PluggableAuthService-1.10.0";
+ "Plone" = self."Plone-4.3.2";
+
+ "Plone-4.3.2" = self.buildPythonPackage {
+ name = "Plone-4.3.2";
src = fetchurl {
- url = "https://pypi.python.org/packages/source/P/Products.PluggableAuthService/Products.PluggableAuthService-1.10.0.tar.gz";
- md5 = "1a1db6b1d9dd34f8b93a8a3104385a37";
+ url = "https://pypi.python.org/packages/source/P/Plone/Plone-4.3.2.zip";
+ md5 = "809f9fe8b8d23b49778e8ce304ea34f6";
};
doCheck = false;
- buildInputs = [ ];
- propagatedBuildInputs = [ self."Products.GenericSetup-1.7.4" self."Products.PluginRegistry-1.3" self.setuptools self."Zope2-2.13.21" ];
- installCommand = ''easy_install --always-unzip --no-deps --prefix="$out" .'';
+ buildInputs = [ pkgs.unzip ];
+ propagatedBuildInputs = [ self."plone.app.caching-1.1.6" self."plone.app.dexterity-2.0.9" self."plone.app.iterate-2.1.10" self."plone.app.openid-2.0.2" self."plone.app.theming-1.1.1" self."Products.CMFPlacefulWorkflow-1.5.9" self."Products.CMFPlone-4.3.2" self.setuptools self."wicked-1.1.10" ];
+ installCommand = ''easy_install --always-unzip --no-deps --prefix="$out" .'';
meta = {
description = ''
- Pluggable Zope2 authentication / authorization framework
+ The Plone Content Management System
'';
- homepage = "http://pypi.python.org/pypi/Products.PluggableAuthService";
- license = "ZPL 2.1 (http://www.zope.org/Resources/License/ZPL-2.1)";
+ homepage = "http://plone.org/";
+ license = "GPL version 2";
};
};
- "plone.dexterity-2.1.3" = self.buildPythonPackage {
- name = "plone.dexterity-2.1.3";
+ "Persistence-2.13.2" = self.buildPythonPackage {
+ name = "Persistence-2.13.2";
src = fetchurl {
- url = "https://pypi.python.org/packages/source/p/plone.dexterity/plone.dexterity-2.1.3.zip";
- md5 = "7f6444a2c26488e4068217266fd243b7";
+ url = "https://pypi.python.org/packages/source/P/Persistence/Persistence-2.13.2.zip";
+ md5 = "92693648ccdc59c8fc71f7f06b1d228c";
};
doCheck = false;
buildInputs = [ pkgs.unzip ];
- propagatedBuildInputs = [ self."plone.alterego-1.0" self."plone.autoform-1.5" self."plone.behavior-1.0.2" self."plone.folder-1.0.4" self."plone.memoize-1.1.1" self."plone.rfc822-1.1" self."plone.supermodel-1.2.3" self."plone.synchronize-1.0.1" self."plone.uuid-1.0.3" self."plone.z3cform-0.8.0" self."Products.CMFCore-2.2.7" self."Products.CMFDefault-2.2.3" self."Products.CMFDynamicViewFTI-4.0.5" self."Products.statusmessages-4.0" self.setuptools self."ZODB3-3.10.5" self."zope.annotation-3.5.0" self."zope.browser-1.3" self."zope.component__zcml-3.9.5" self."zope.container-3.11.2" self."zope.dottedname-3.4.6" self."zope.filerepresentation-3.6.1" self."zope.interface-3.6.7" self."zope.lifecycleevent-3.6.2" self."zope.location-3.9.1" self."zope.publisher-3.12.6" self."zope.schema-4.2.2" self."zope.security__untrustedpython-3.7.4" self."zope.size-3.4.1" self."Zope2-2.13.21" ];
- installCommand = ''easy_install --always-unzip --no-deps --prefix="$out" .'';
+ propagatedBuildInputs = [ self."ExtensionClass-2.13.2" self."ZODB3-3.10.5" ];
+ installCommand = ''easy_install --always-unzip --prefix="$out" .'';
meta = {
description = ''
- Flexible CMF content
+ Persistent ExtensionClass
'';
- homepage = "http://code.google.com/p/dexterity";
- license = "GPL version 2";
+ homepage = "http://pypi.python.org/pypi/Persistence";
+ license = "ZPL 2.1";
};
};
@@ -1939,22 +1903,62 @@ in
};
- "wicked-1.1.10" = self.buildPythonPackage {
- name = "wicked-1.1.10";
+ "zc.recipe.egg-1.3.2" = self.buildPythonPackage {
+ name = "zc.recipe.egg-1.3.2";
src = fetchurl {
- url = "https://pypi.python.org/packages/source/w/wicked/wicked-1.1.10.zip";
- md5 = "f65611f11d547d7dc8e623bf87d3929d";
+ url = "https://pypi.python.org/packages/source/z/zc.recipe.egg/zc.recipe.egg-1.3.2.tar.gz";
+ md5 = "1cb6af73f527490dde461d3614a36475";
+ };
+ doCheck = false;
+ buildInputs = [ ];
+ propagatedBuildInputs = [ self.setuptools self."zc.buildout-1.7.1" ];
+ installCommand = ''easy_install --always-unzip --prefix="$out" .'';
+ meta = {
+ description = ''
+ Recipe for installing Python package distributions as eggs
+ '';
+ homepage = "http://cheeseshop.python.org/pypi/zc.recipe.egg";
+ license = "ZPL 2.1";
+ };
+ };
+
+
+ "mailinglogger-3.7.0" = self.buildPythonPackage {
+ name = "mailinglogger-3.7.0";
+ src = fetchurl {
+ url = "https://pypi.python.org/packages/source/m/mailinglogger/mailinglogger-3.7.0.tar.gz";
+ md5 = "f865f0df6059ce23062b7457d01dbac5";
+ };
+ doCheck = false;
+ buildInputs = [ ];
+ propagatedBuildInputs = [ ];
+ installCommand = ''easy_install --always-unzip --prefix="$out" .'';
+ meta = {
+ description = ''
+ Enhanced emailing handlers for the python logging package.
+ '';
+ homepage = "http://www.simplistix.co.uk/software/python/mailinglogger";
+ license = "MIT";
+ };
+ };
+
+
+ "plone.app.jquerytools-1.5.6" = self.buildPythonPackage {
+ name = "plone.app.jquerytools-1.5.6";
+ src = fetchurl {
+ url = "https://pypi.python.org/packages/source/p/plone.app.jquerytools/plone.app.jquerytools-1.5.6.zip";
+ md5 = "4ae9a72baa8e9899c1706b4fedbb516b";
};
doCheck = false;
buildInputs = [ pkgs.unzip ];
- propagatedBuildInputs = [ self.setuptools self."zope.container-3.11.2" self."zope.lifecycleevent-3.6.2" self."zope.schema-4.2.2" self."zope.traversing-3.13.2" ];
+ propagatedBuildInputs = [ self."Products.CMFCore-2.2.7" self."Products.GenericSetup-1.7.4" self.setuptools self."zope.component__zcml-3.9.5" self."Zope2-2.13.21" ];
installCommand = ''easy_install --always-unzip --no-deps --prefix="$out" .'';
meta = {
description = ''
- wicked is a compact syntax for doing wiki-like content linking and creation in zope and plone
+ jQuery Tools integration for Plone plus overlay and AJAX form helpers.
'';
- homepage = "http://pypi.python.org/pypi/wicked";
- license = "GPL";
+ homepage = "http://pypi.python.org/pypi/plone.app.jquerytools";
+ license = "GPL version 2";
};
};
@@ -1979,22 +1983,22 @@ in
};
- "Products.MIMETools-2.13.0" = self.buildPythonPackage {
- name = "Products.MIMETools-2.13.0";
+ "plone.locking-2.0.4" = self.buildPythonPackage {
+ name = "plone.locking-2.0.4";
src = fetchurl {
- url = "https://pypi.python.org/packages/source/P/Products.MIMETools/Products.MIMETools-2.13.0.zip";
- md5 = "ad5372fc1190599a19493db0864448ec";
+ url = "https://pypi.python.org/packages/source/p/plone.locking/plone.locking-2.0.4.zip";
+ md5 = "a7f8b8db78f57272d351d7fe0d067eb2";
};
doCheck = false;
buildInputs = [ pkgs.unzip ];
- propagatedBuildInputs = [ self."DocumentTemplate-2.13.2" self.setuptools ];
+ propagatedBuildInputs = [ self."Acquisition-2.13.8" self."DateTime-3.0.3" self."Products.CMFCore-2.2.7" self.setuptools self."ZODB3-3.10.5" self."zope.annotation-3.5.0" self."zope.component__zcml-3.9.5" self."zope.i18nmessageid-3.5.3" self."zope.interface-3.6.7" self."zope.schema-4.2.2" self."zope.viewlet-3.7.2" self."Zope2-2.13.21" ];
installCommand = ''easy_install --always-unzip --no-deps --prefix="$out" .'';
meta = {
description = ''
- MIMETools provides the <!--#mime--> tag for DocumentTemplate.
+ webdav locking support
'';
- homepage = "http://pypi.python.org/pypi/Products.MIMETools";
- license = "ZPL 2.1";
+ homepage = "http://pypi.python.org/pypi/plone.locking";
+ license = "GPL version 2";
};
};
@@ -2028,7 +2032,7 @@ in
doCheck = false;
buildInputs = [ ];
propagatedBuildInputs = [ self.setuptools self."zope.exceptions-3.6.2" self."zope.interface-3.6.7" ];
- installCommand = ''easy_install --always-unzip --no-deps --prefix="$out" .'';
+ installCommand = ''easy_install --always-unzip --prefix="$out" .'';
meta = {
description = ''
Zope testing framework, including the testrunner script.
@@ -2048,7 +2052,7 @@ in
doCheck = false;
buildInputs = [ ];
propagatedBuildInputs = [ self.setuptools self."zope.component__zcml-3.9.5" self."zope.event-3.5.2" self."zope.interface-3.6.7" ];
- installCommand = ''easy_install --always-unzip --no-deps --prefix="$out" .'';
+ installCommand = ''easy_install --always-unzip --prefix="$out" .'';
meta = {
description = ''
Object life-cycle events
@@ -2059,22 +2063,22 @@ in
};
- "plone.app.viewletmanager-2.0.4" = self.buildPythonPackage {
- name = "plone.app.viewletmanager-2.0.4";
+ "ExtensionClass-2.13.2" = self.buildPythonPackage {
+ name = "ExtensionClass-2.13.2";
src = fetchurl {
- url = "https://pypi.python.org/packages/source/p/plone.app.viewletmanager/plone.app.viewletmanager-2.0.4.zip";
- md5 = "565a12ac71d20b2823b9e44daebe432f";
+ url = "https://pypi.python.org/packages/source/E/ExtensionClass/ExtensionClass-2.13.2.zip";
+ md5 = "0236e6d7da9e8b87b9ba45f1b8f930b8";
};
doCheck = false;
buildInputs = [ pkgs.unzip ];
- propagatedBuildInputs = [ self."Acquisition-2.13.8" self."plone.app.vocabularies-2.1.11" self."Products.GenericSetup-1.7.4" self.setuptools self."ZODB3-3.10.5" self."zope.component__zcml-3.9.5" self."zope.contentprovider-3.7.2" self."zope.interface-3.6.7" self."zope.site-3.9.2" self."zope.viewlet-3.7.2" self."Zope2-2.13.21" ];
- installCommand = ''easy_install --always-unzip --no-deps --prefix="$out" .'';
+ propagatedBuildInputs = [ ];
+ installCommand = ''easy_install --always-unzip --prefix="$out" .'';
meta = {
description = ''
- configurable viewlet manager
+ Metaclass for subclassable extension types
'';
- homepage = "http://pypi.python.org/pypi/plone.app.viewletmanager";
- license = "GPL version 2";
+ homepage = "http://pypi.python.org/pypi/ExtensionClass";
+ license = "ZPL 2.1";
};
};
@@ -2148,7 +2152,7 @@ in
doCheck = false;
buildInputs = [ pkgs.unzip ];
propagatedBuildInputs = [ self.setuptools self."zope.component__zcml-3.9.5" self."zope.i18n__zcml-3.7.4" self."zope.i18nmessageid-3.5.3" self."zope.interface-3.6.7" self."zope.security__untrustedpython-3.7.4" self."zope.tal-3.5.2" self."zope.tales-3.5.3" self."zope.traversing-3.13.2" ];
- installCommand = ''easy_install --always-unzip --no-deps --prefix="$out" .'';
+ installCommand = ''easy_install --always-unzip --prefix="$out" .'';
meta = {
description = ''
Zope Page Templates
@@ -2188,7 +2192,7 @@ in
doCheck = false;
buildInputs = [ ];
propagatedBuildInputs = [ self.setuptools ];
- installCommand = ''easy_install --always-unzip --no-deps --prefix="$out" .'';
+ installCommand = ''easy_install --always-unzip --prefix="$out" .'';
meta = {
description = ''
System for managing development buildouts
@@ -2228,7 +2232,7 @@ in
doCheck = false;
buildInputs = [ pkgs.unzip ];
propagatedBuildInputs = [ self.setuptools self."zope.i18nmessageid-3.5.3" self."zope.interface-3.6.7" ];
- installCommand = ''easy_install --always-unzip --no-deps --prefix="$out" .'';
+ installCommand = ''easy_install --always-unzip --prefix="$out" .'';
meta = {
description = ''
Zope 3 Template Application Languate (TAL)
@@ -2259,11 +2263,11 @@ in
};
- "cssselect-0.8" = self.buildPythonPackage {
- name = "cssselect-0.8";
+ "cssselect-0.9" = self.buildPythonPackage {
+ name = "cssselect-0.9";
src = fetchurl {
- url = "https://pypi.python.org/packages/source/c/cssselect/cssselect-0.8.tar.gz";
- md5 = "c4683e050351abcbbd5990b01f5344e2";
+ url = "https://pypi.python.org/packages/source/c/cssselect/cssselect-0.9.tar.gz";
+ md5 = "3aba1e431787da957a9cd1e2c2e0bf1c";
};
doCheck = false;
buildInputs = [ ];
@@ -2308,7 +2312,7 @@ in
doCheck = false;
buildInputs = [ ];
propagatedBuildInputs = [ self.setuptools self."ZODB3-3.10.5" self."zope.broken-3.6.0" self."zope.component__zcml-3.9.5" self."zope.dottedname-3.4.6" self."zope.event-3.5.2" self."zope.filerepresentation-3.6.1" self."zope.i18nmessageid-3.5.3" self."zope.interface-3.6.7" self."zope.lifecycleevent-3.6.2" self."zope.location-3.9.1" self."zope.publisher-3.12.6" self."zope.schema-4.2.2" self."zope.security__untrustedpython-3.7.4" self."zope.size-3.4.1" self."zope.traversing-3.13.2" ];
- installCommand = ''easy_install --always-unzip --no-deps --prefix="$out" .'';
+ installCommand = ''easy_install --always-unzip --prefix="$out" .'';
meta = {
description = ''
Zope Container
@@ -2368,7 +2372,7 @@ in
doCheck = false;
buildInputs = [ pkgs.unzip ];
propagatedBuildInputs = [ self.setuptools self."zope.interface-3.6.7" self."zope.publisher-3.12.6" self."zope.security__untrustedpython-3.7.4" ];
- installCommand = ''easy_install --always-unzip --no-deps --prefix="$out" .'';
+ installCommand = ''easy_install --always-unzip --prefix="$out" .'';
meta = {
description = ''
zExceptions contains common exceptions used in Zope2.
@@ -2408,7 +2412,7 @@ in
doCheck = false;
buildInputs = [ ];
propagatedBuildInputs = [ self.setuptools self."zope.browser-1.3" self."zope.component__zcml-3.9.5" self."zope.configuration-3.7.4" self."zope.contenttype-3.5.5" self."zope.event-3.5.2" self."zope.exceptions-3.6.2" self."zope.i18n__zcml-3.7.4" self."zope.interface-3.6.7" self."zope.location-3.9.1" self."zope.proxy-3.6.1" self."zope.security__untrustedpython-3.7.4" ];
- installCommand = ''easy_install --always-unzip --no-deps --prefix="$out" .'';
+ installCommand = ''easy_install --always-unzip --prefix="$out" .'';
meta = {
description = ''
The Zope publisher publishes Python objects on the web.
@@ -2468,7 +2472,7 @@ in
doCheck = false;
buildInputs = [ ];
propagatedBuildInputs = [ self.setuptools self."zope.component__zcml-3.9.5" self."zope.configuration-3.7.4" self."zope.i18nmessageid-3.5.3" self."zope.interface-3.6.7" self."zope.location-3.9.1" self."zope.proxy-3.6.1" self."zope.schema-4.2.2" self."RestrictedPython-3.6.0" ];
- installCommand = ''easy_install --always-unzip --no-deps --prefix="$out" .'';
+ installCommand = ''easy_install --always-unzip --prefix="$out" .'';
meta = {
description = ''
Zope Security Framework
@@ -2528,7 +2532,7 @@ in
doCheck = false;
buildInputs = [ ];
propagatedBuildInputs = [ self.setuptools self."zope.event-3.5.2" self."zope.interface-3.6.7" self."zope.configuration-3.7.4" self."zope.i18nmessageid-3.5.3" ];
- installCommand = ''easy_install --always-unzip --no-deps --prefix="$out" .'';
+ installCommand = ''easy_install --always-unzip --prefix="$out" .'';
meta = {
description = ''
Zope Component Architecture
@@ -2539,6 +2543,28 @@ in
};
+ "psycopg2" = self."psycopg2-2.5.1";
+
+ "psycopg2-2.5.1" = self.buildPythonPackage {
+ name = "psycopg2-2.5.1";
+ src = fetchurl {
+ url = "https://pypi.python.org/packages/source/p/psycopg2/psycopg2-2.5.1.tar.gz";
+ md5 = "1b433f83d50d1bc61e09026e906d84c7";
+ };
+ doCheck = false;
+ buildInputs = [ ];
+ propagatedBuildInputs = [ ];
+ installCommand = ''easy_install --always-unzip --prefix="$out" .'';
+ meta = {
+ description = ''
+ Python-PostgreSQL Database Adapter
+ '';
+ homepage = "http://initd.org/psycopg/";
+ license = "GPL with exceptions or ZPL";
+ };
+ };
+
+
"plone.rfc822-1.1" = self.buildPythonPackage {
name = "plone.rfc822-1.1";
src = fetchurl {
@@ -2568,7 +2594,7 @@ in
doCheck = false;
buildInputs = [ ];
propagatedBuildInputs = [ self.setuptools self."zope.browserpage-3.12.2" self."zope.component__zcml-3.9.5" self."zope.configuration-3.7.4" self."zope.contentprovider-3.7.2" self."zope.event-3.5.2" self."zope.i18nmessageid-3.5.3" self."zope.interface-3.6.7" self."zope.location-3.9.1" self."zope.publisher-3.12.6" self."zope.schema-4.2.2" self."zope.security__untrustedpython-3.7.4" self."zope.traversing-3.13.2" ];
- installCommand = ''easy_install --always-unzip --no-deps --prefix="$out" .'';
+ installCommand = ''easy_install --always-unzip --prefix="$out" .'';
meta = {
description = ''
Zope Viewlets
@@ -2588,7 +2614,7 @@ in
doCheck = false;
buildInputs = [ ];
propagatedBuildInputs = [ self."pytz-2013b" self.setuptools self."zope.component__zcml-3.9.5" self."zope.i18nmessageid-3.5.3" self."zope.schema-4.2.2" self."zope.configuration-3.7.4" ];
- installCommand = ''easy_install --always-unzip --no-deps --prefix="$out" .'';
+ installCommand = ''easy_install --always-unzip --prefix="$out" .'';
meta = {
description = ''
Zope Internationalization Support
@@ -2648,7 +2674,7 @@ in
doCheck = false;
buildInputs = [ pkgs.unzip ];
propagatedBuildInputs = [ self.setuptools self."zope.component__zcml-3.9.5" self."zope.configuration-3.7.4" self."zope.contenttype-3.5.5" self."zope.i18n__zcml-3.7.4" self."zope.interface-3.6.7" self."zope.location-3.9.1" self."zope.publisher-3.12.6" self."zope.schema-4.2.2" self."zope.traversing-3.13.2" ];
- installCommand = ''easy_install --always-unzip --no-deps --prefix="$out" .'';
+ installCommand = ''easy_install --always-unzip --prefix="$out" .'';
meta = {
description = ''
Browser resources implementation for Zope.
@@ -2659,6 +2685,28 @@ in
};
+ "RelStorage" = self."RelStorage-1.5.1";
+
+ "RelStorage-1.5.1" = self.buildPythonPackage {
+ name = "RelStorage-1.5.1";
+ src = fetchurl {
+ url = "https://pypi.python.org/packages/source/R/RelStorage/RelStorage-1.5.1.tar.gz";
+ md5 = "2454211d086ac02a4af10f7292e260ec";
+ };
+ doCheck = false;
+ buildInputs = [ ];
+ propagatedBuildInputs = [ self."zc.lockfile-1.0.2" self."ZODB3-3.10.5" self."zope.interface-3.6.7" ];
+ installCommand = ''easy_install --always-unzip --prefix="$out" .'';
+ meta = {
+ description = ''
+ A backend for ZODB that stores pickles in a relational database.
+ '';
+ homepage = "http://pypi.python.org/pypi/RelStorage";
+ license = "ZPL 2.1";
+ };
+ };
+
+
"Products.ResourceRegistries-2.2.9" = self.buildPythonPackage {
name = "Products.ResourceRegistries-2.2.9";
src = fetchurl {
@@ -2741,6 +2789,26 @@ in
};
+ "Products.contentmigration-2.1.5" = self.buildPythonPackage {
+ name = "Products.contentmigration-2.1.5";
+ src = fetchurl {
+ url = "https://pypi.python.org/packages/source/P/Products.contentmigration/Products.contentmigration-2.1.5.zip";
+ md5 = "f08e5f2572fc6f4c61b930a17f99418f";
+ };
+ doCheck = false;
+ buildInputs = [ pkgs.unzip ];
+ propagatedBuildInputs = [ self.setuptools ];
+ installCommand = ''easy_install --always-unzip --no-deps --prefix="$out" .'';
+ meta = {
+ description = ''
+ A generic content migration framework for Plone.
+ '';
+ homepage = "http://pypi.python.org/pypi/Products.contentmigration";
+ license = "LGPL";
+ };
+ };
+
+
"Products.MimetypesRegistry-2.0.5" = self.buildPythonPackage {
name = "Products.MimetypesRegistry-2.0.5";
src = fetchurl {
@@ -2781,22 +2849,22 @@ in
};
- "Products.PloneLanguageTool-3.2.7" = self.buildPythonPackage {
- name = "Products.PloneLanguageTool-3.2.7";
+ "plone.app.upgrade-1.3.4" = self.buildPythonPackage {
+ name = "plone.app.upgrade-1.3.4";
src = fetchurl {
- url = "https://pypi.python.org/packages/source/P/Products.PloneLanguageTool/Products.PloneLanguageTool-3.2.7.zip";
- md5 = "bd9eb6278bf76e8cbce99437ca362164";
+ url = "https://pypi.python.org/packages/source/p/plone.app.upgrade/plone.app.upgrade-1.3.4.zip";
+ md5 = "10c192ee4a2422f901e020fd5b39879a";
};
doCheck = false;
buildInputs = [ pkgs.unzip ];
- propagatedBuildInputs = [ self.setuptools ];
+ propagatedBuildInputs = [ self."Acquisition-2.13.8" self."borg.localrole-3.0.2" self."five.localsitemanager-2.0.5" self."plone.app.folder-1.0.5" self."plone.app.portlets-2.4.5" self."plone.portlets-2.2" self."plone.session-3.5.3" self."Products.Archetypes-1.9.4" self."Products.CMFActionIcons-2.1.3" self."Products.CMFCalendar-2.2.2" self."Products.CMFCore-2.2.7" self."Products.CMFDefault-2.2.3" self."Products.CMFDiffTool-2.1" self."Products.CMFEditions-2.2.8" self."Products.CMFFormController-3.0.3" self."Products.CMFQuickInstallerTool-3.0.6" self."Products.CMFUid-2.2.1" self."Products.contentmigration-2.1.5" self."Products.DCWorkflow-2.2.4" self."Products.GenericSetup-1.7.4" self."Products.MimetypesRegistry-2.0.5" self."Products.PloneLanguageTool-3.2.7" self."Products.PlonePAS-4.1.1" self."Products.PluggableAuthService-1.10.0" self."Products.PortalTransforms-2.1.2" self."Products.ResourceRegistries-2.2.9" self."Products.SecureMailHost-1.1.2" self."Products.ZCatalog-2.13.23" self.setuptools self."transaction-1.1.1" self."zope.component__zcml-3.9.5" self."zope.interface-3.6.7" self."zope.location-3.9.1" self."zope.ramcache-1.0" self."zope.site-3.9.2" self."Zope2-2.13.21" ];
installCommand = ''easy_install --always-unzip --no-deps --prefix="$out" .'';
meta = {
description = ''
- PloneLanguageTool allows you to set the available languages in your Plone site, select various fallback mechanisms, and control the use of flags for language selection and translations.
+ Upgrade machinery for Plone.
'';
- homepage = "http://pypi.python.org/pypi/Products.PloneLanguageTool";
- license = "GPL";
+ homepage = "http://pypi.python.org/pypi/plone.app.upgrade";
+ license = "GPL version 2";
};
};
@@ -2850,7 +2918,7 @@ in
doCheck = false;
buildInputs = [ pkgs.unzip ];
propagatedBuildInputs = [ self.setuptools ];
- installCommand = ''easy_install --always-unzip --no-deps --prefix="$out" .'';
+ installCommand = ''easy_install --always-unzip --prefix="$out" .'';
meta = {
description = ''
Zope contenttype
@@ -2881,26 +2949,6 @@ in
};
- "plone.app.theming-1.1.1" = self.buildPythonPackage {
- name = "plone.app.theming-1.1.1";
- src = fetchurl {
- url = "https://pypi.python.org/packages/source/p/plone.app.theming/plone.app.theming-1.1.1.zip";
- md5 = "a694b7a050b6e7c25d720d1e99bb73fa";
- };
- doCheck = false;
- buildInputs = [ pkgs.unzip ];
- propagatedBuildInputs = [ self."diazo-1.0.4" self."docutils-0.9.1" self."five.globalrequest-1.0" self."lxml-2.3.6" self."plone.app.registry-1.2.3" self."plone.resource-1.0.2" self."plone.resourceeditor-1.0" self."plone.subrequest-1.6.7" self."plone.transformchain-1.0.3" self."Products.CMFPlone-4.3.2" self."repoze.xmliter-0.5" self."roman-1.4.0" self.setuptools self."zope.traversing-3.13.2" ];
- installCommand = ''easy_install --always-unzip --no-deps --prefix="$out" .'';
- meta = {
- description = ''
- Integrates the Diazo theming engine with Plone
- '';
- homepage = "http://pypi.python.org/pypi/plone.app.theming";
- license = "GPL";
- };
- };
-
-
"zope.globalrequest-1.0" = self.buildPythonPackage {
name = "zope.globalrequest-1.0";
src = fetchurl {
@@ -2930,7 +2978,7 @@ in
doCheck = false;
buildInputs = [ ];
propagatedBuildInputs = [ self.setuptools self."transaction-1.1.1" self."zope.component__zcml-3.9.5" self."zope.configuration-3.7.4" self."zope.i18nmessageid-3.5.3" self."zope.interface-3.6.7" self."zope.schema-4.2.2" ];
- installCommand = ''easy_install --always-unzip --no-deps --prefix="$out" .'';
+ installCommand = ''easy_install --always-unzip --prefix="$out" .'';
meta = {
description = ''
Zope sendmail
@@ -2941,6 +2989,26 @@ in
};
+ "Products.MIMETools-2.13.0" = self.buildPythonPackage {
+ name = "Products.MIMETools-2.13.0";
+ src = fetchurl {
+ url = "https://pypi.python.org/packages/source/P/Products.MIMETools/Products.MIMETools-2.13.0.zip";
+ md5 = "ad5372fc1190599a19493db0864448ec";
+ };
+ doCheck = false;
+ buildInputs = [ pkgs.unzip ];
+ propagatedBuildInputs = [ self."DocumentTemplate-2.13.2" self.setuptools ];
+ installCommand = ''easy_install --always-unzip --prefix="$out" .'';
+ meta = {
+ description = ''
+ MIMETools provides the <!--#mime--> tag for DocumentTemplate.
+ '';
+ homepage = "http://pypi.python.org/pypi/Products.MIMETools";
+ license = "ZPL 2.1";
+ };
+ };
+
+
"zope.annotation-3.5.0" = self.buildPythonPackage {
name = "zope.annotation-3.5.0";
src = fetchurl {
@@ -2950,7 +3018,7 @@ in
doCheck = false;
buildInputs = [ ];
propagatedBuildInputs = [ self.setuptools self."ZODB3-3.10.5" self."zope.component__zcml-3.9.5" self."zope.interface-3.6.7" self."zope.location-3.9.1" self."zope.proxy-3.6.1" ];
- installCommand = ''easy_install --always-unzip --no-deps --prefix="$out" .'';
+ installCommand = ''easy_install --always-unzip --prefix="$out" .'';
meta = {
description = ''
Object annotation mechanism
@@ -3061,26 +3129,6 @@ in
};
- "Products.CMFPlacefulWorkflow-1.5.9" = self.buildPythonPackage {
- name = "Products.CMFPlacefulWorkflow-1.5.9";
- src = fetchurl {
- url = "https://pypi.python.org/packages/source/P/Products.CMFPlacefulWorkflow/Products.CMFPlacefulWorkflow-1.5.9.zip";
- md5 = "9041e1f52eab5b348c0dfa85be438722";
- };
- doCheck = false;
- buildInputs = [ pkgs.unzip ];
- propagatedBuildInputs = [ self."Products.CMFCore-2.2.7" self."Products.CMFPlone-4.3.2" self."Products.GenericSetup-1.7.4" self."Products.PloneTestCase-0.9.17" self.setuptools self."zope.component__zcml-3.9.5" self."zope.i18nmessageid-3.5.3" self."zope.interface-3.6.7" self."zope.testing-3.9.7" ];
- installCommand = ''easy_install --always-unzip --no-deps --prefix="$out" .'';
- meta = {
- description = ''
- Workflow policies for CMF and Plone
- '';
- homepage = "http://pypi.python.org/pypi/Products.CMFPlacefulWorkflow";
- license = "GPL";
- };
- };
-
-
"zope.filerepresentation-3.6.1" = self.buildPythonPackage {
name = "zope.filerepresentation-3.6.1";
src = fetchurl {
@@ -3090,7 +3138,7 @@ in
doCheck = false;
buildInputs = [ ];
propagatedBuildInputs = [ self.setuptools self."zope.interface-3.6.7" self."zope.schema-4.2.2" ];
- installCommand = ''easy_install --always-unzip --no-deps --prefix="$out" .'';
+ installCommand = ''easy_install --always-unzip --prefix="$out" .'';
meta = {
description = ''
File-system Representation Interfaces
@@ -3130,7 +3178,7 @@ in
doCheck = false;
buildInputs = [ pkgs.unzip ];
propagatedBuildInputs = [ self.setuptools ];
- installCommand = ''easy_install --always-unzip --no-deps --prefix="$out" .'';
+ installCommand = ''easy_install --always-unzip --prefix="$out" .'';
meta = {
description = ''
Interfaces for Python
@@ -3150,7 +3198,7 @@ in
doCheck = false;
buildInputs = [ ];
propagatedBuildInputs = [ self.setuptools self."zope.i18nmessageid-3.5.3" self."zope.interface-3.6.7" ];
- installCommand = ''easy_install --always-unzip --no-deps --prefix="$out" .'';
+ installCommand = ''easy_install --always-unzip --prefix="$out" .'';
meta = {
description = ''
Interfaces and simple adapter that give the size of an object
@@ -3161,21 +3209,21 @@ in
};
- "archetypes.referencebrowserwidget-2.4.19" = self.buildPythonPackage {
- name = "archetypes.referencebrowserwidget-2.4.19";
+ "ZODB3-3.10.5" = self.buildPythonPackage {
+ name = "ZODB3-3.10.5";
src = fetchurl {
- url = "https://pypi.python.org/packages/source/a/archetypes.referencebrowserwidget/archetypes.referencebrowserwidget-2.4.19.zip";
- md5 = "b70af6b2da6d8c57c1138a52e94e588c";
+ url = "https://pypi.python.org/packages/source/Z/ZODB3/ZODB3-3.10.5.tar.gz";
+ md5 = "6f180c6897a1820948fee2a6290503cd";
};
doCheck = false;
- buildInputs = [ pkgs.unzip ];
- propagatedBuildInputs = [ self."plone.app.form-2.2.3" self."plone.app.jquerytools-1.5.6" self.setuptools self."zope.component__zcml-3.9.5" self."zope.formlib-4.0.6" self."zope.interface-3.6.7" ];
- installCommand = ''easy_install --always-unzip --no-deps --prefix="$out" .'';
+ buildInputs = [ ];
+ propagatedBuildInputs = [ self."transaction-1.1.1" self."zc.lockfile-1.0.2" self."ZConfig-2.9.1" self."zdaemon-2.0.7" self."zope.event-3.5.2" self."zope.interface-3.6.7" ];
+ installCommand = ''easy_install --always-unzip --prefix="$out" .'';
meta = {
description = ''
- A referencebrowser implementation for Archetypes
+ Zope Object Database: object database and persistence
'';
- homepage = "http://pypi.python.org/pypi/archetypes.referencebrowserwidget";
+ homepage = "UNKNOWN";
license = "ZPL 2.1";
};
};
@@ -3210,7 +3258,7 @@ in
doCheck = false;
buildInputs = [ ];
propagatedBuildInputs = [ self.setuptools ];
- installCommand = ''easy_install --always-unzip --no-deps --prefix="$out" .'';
+ installCommand = ''easy_install --always-unzip --prefix="$out" .'';
meta = {
description = ''
Resolver for Python dotted names.
@@ -3281,21 +3329,21 @@ in
};
- "plone.app.contentlisting-1.0.5" = self.buildPythonPackage {
- name = "plone.app.contentlisting-1.0.5";
+ "collective.z3cform.datetimewidget-1.2.5" = self.buildPythonPackage {
+ name = "collective.z3cform.datetimewidget-1.2.5";
src = fetchurl {
- url = "https://pypi.python.org/packages/source/p/plone.app.contentlisting/plone.app.contentlisting-1.0.5.zip";
- md5 = "9fc15b8ecad1c918778c3ea9a75bf533";
+ url = "https://pypi.python.org/packages/source/c/collective.z3cform.datetimewidget/collective.z3cform.datetimewidget-1.2.5.zip";
+ md5 = "38fa463ea9b0b3cf5f61540250968214";
};
doCheck = false;
buildInputs = [ pkgs.unzip ];
- propagatedBuildInputs = [ self."plone.uuid-1.0.3" self.setuptools ];
+ propagatedBuildInputs = [ self.setuptools self."z3c.form-3.0.2" self."zope.deprecation-3.4.1" self."zope.i18n__zcml-3.7.4" ];
installCommand = ''easy_install --always-unzip --no-deps --prefix="$out" .'';
meta = {
description = ''
- Listing of content for the Plone CMS
+ z3c.form date and datetime widgets
'';
- homepage = "http://pypi.python.org/pypi/plone.app.contentlisting";
+ homepage = "https://github.com/collective/collective.z3cform.datetimewidget";
license = "GPL version 2";
};
};
@@ -3310,7 +3358,7 @@ in
doCheck = false;
buildInputs = [ pkgs.unzip ];
propagatedBuildInputs = [ self."AccessControl-3.0.8" self."Acquisition-2.13.8" self."DateTime-3.0.3" self."DocumentTemplate-2.13.2" self."docutils-0.9.1" self."ExtensionClass-2.13.2" self."initgroups-2.13.0" self."Missing-2.13.1" self."MultiMapping-2.13.0" self."Persistence-2.13.2" self."Products.BTreeFolder2-2.13.3" self."Products.ExternalMethod-2.13.0" self."Products.MailHost-2.13.1" self."Products.MIMETools-2.13.0" self."Products.OFSP-2.13.2" self."Products.PythonScripts-2.13.2" self."Products.StandardCacheManagers-2.13.0" self."Products.ZCatalog-2.13.23" self."Products.ZCTextIndex-2.13.4" self."pytz-2013b" self."Record-2.13.0" self."RestrictedPython-3.6.0" self.setuptools self."tempstorage-2.12.2" self."transaction-1.1.1" self."ZConfig-2.9.1" self."zdaemon-2.0.7" self."zExceptions-2.13.0" self."zLOG-2.11.1" self."ZODB3-3.10.5" self."zope.browser-1.3" self."zope.browsermenu-3.9.1" self."zope.browserpage-3.12.2" self."zope.browserresource-3.10.3" self."zope.component__zcml-3.9.5" self."zope.configuration-3.7.4" self."zope.container-3.11.2" self."zope.contentprovider-3.7.2" self."zope.contenttype-3.5.5" self."zope.deferredimport-3.5.3" self."zope.event-3.5.2" self."zope.exceptions-3.6.2" self."zope.i18n__zcml-3.7.4" self."zope.i18nmessageid-3.5.3" self."zope.interface-3.6.7" self."zope.lifecycleevent-3.6.2" self."zope.location-3.9.1" self."zope.pagetemplate-3.6.3" self."zope.processlifetime-1.0" self."zope.proxy-3.6.1" self."zope.ptresource-3.9.0" self."zope.publisher-3.12.6" self."zope.schema-4.2.2" self."zope.security__untrustedpython-3.7.4" self."zope.sendmail-3.7.5" self."zope.sequencesort-3.4.0" self."zope.site-3.9.2" self."zope.size-3.4.1" self."zope.structuredtext-3.5.1" self."zope.tal-3.5.2" self."zope.tales-3.5.3" self."zope.testbrowser-3.11.1" self."zope.testing-3.9.7" self."zope.traversing-3.13.2" self."zope.viewlet-3.7.2" self."ZopeUndo-2.12.0" ];
- installCommand = ''easy_install --always-unzip --no-deps --prefix="$out" .'';
+ installCommand = ''easy_install --always-unzip --prefix="$out" .'';
meta = {
description = ''
Zope2 application server / web framework
@@ -3450,7 +3498,7 @@ in
doCheck = false;
buildInputs = [ pkgs.unzip ];
propagatedBuildInputs = [ self.setuptools ];
- installCommand = ''easy_install --always-unzip --no-deps --prefix="$out" .'';
+ installCommand = ''easy_install --always-unzip --prefix="$out" .'';
meta = {
description = ''
RestrictedPython provides a restricted execution environment for Python, e.g. for running untrusted code.
@@ -3461,22 +3509,22 @@ in
};
- "plone.stringinterp-1.0.10" = self.buildPythonPackage {
- name = "plone.stringinterp-1.0.10";
+ "tempstorage-2.12.2" = self.buildPythonPackage {
+ name = "tempstorage-2.12.2";
src = fetchurl {
- url = "https://pypi.python.org/packages/source/p/plone.stringinterp/plone.stringinterp-1.0.10.zip";
- md5 = "595074e94944ad6860e2105a020a3b9a";
+ url = "https://pypi.python.org/packages/source/t/tempstorage/tempstorage-2.12.2.zip";
+ md5 = "7a2b76b39839e229249b1bb175604480";
};
doCheck = false;
buildInputs = [ pkgs.unzip ];
- propagatedBuildInputs = [ self."Products.CMFCore-2.2.7" self.setuptools self."zope.i18n__zcml-3.7.4" ];
- installCommand = ''easy_install --always-unzip --no-deps --prefix="$out" .'';
+ propagatedBuildInputs = [ self.setuptools self."ZODB3-3.10.5" self."zope.testing-3.9.7" ];
+ installCommand = ''easy_install --always-unzip --prefix="$out" .'';
meta = {
description = ''
- Adaptable string interpolation
+ A RAM-based storage for ZODB
'';
- homepage = "http://pypi.python.org/pypi/plone.stringinterp";
- license = "GPL version 2";
+ homepage = "http://pypi.python.org/pypi/tempstorage";
+ license = "ZPL 2.1";
};
};
@@ -3501,22 +3549,22 @@ in
};
- "Products.PluginRegistry-1.3" = self.buildPythonPackage {
- name = "Products.PluginRegistry-1.3";
+ "Acquisition-2.13.8" = self.buildPythonPackage {
+ name = "Acquisition-2.13.8";
src = fetchurl {
- url = "https://pypi.python.org/packages/source/P/Products.PluginRegistry/Products.PluginRegistry-1.3.tar.gz";
- md5 = "5b166193ca1eb84dfb402051f779ebab";
+ url = "https://pypi.python.org/packages/source/A/Acquisition/Acquisition-2.13.8.zip";
+ md5 = "8c33160c157b50649e2b2b3224622579";
};
doCheck = false;
- buildInputs = [ ];
- propagatedBuildInputs = [ self."Products.GenericSetup-1.7.4" self.setuptools self."Zope2-2.13.21" ];
- installCommand = ''easy_install --always-unzip --no-deps --prefix="$out" .'';
+ buildInputs = [ pkgs.unzip ];
+ propagatedBuildInputs = [ self."ExtensionClass-2.13.2" self."zope.interface-3.6.7" ];
+ installCommand = ''easy_install --always-unzip --prefix="$out" .'';
meta = {
description = ''
- Configure application plugins based on interfaces
+ Acquisition is a mechanism that allows objects to obtain attributes from the containment hierarchy they're in.
'';
- homepage = "http://pypi.python.org/pypi/Products.PluginRegistry";
- license = "ZPL 2.1 (http://www.zope.org/Resources/License/ZPL-2.1)";
+ homepage = "http://pypi.python.org/pypi/Acquisition";
+ license = "ZPL 2.1";
};
};
@@ -3641,6 +3689,26 @@ in
};
+ "plone.indexer-1.0.2" = self.buildPythonPackage {
+ name = "plone.indexer-1.0.2";
+ src = fetchurl {
+ url = "https://pypi.python.org/packages/source/p/plone.indexer/plone.indexer-1.0.2.zip";
+ md5 = "538aeee1f9db78bc8c85ae1bcb0153ed";
+ };
+ doCheck = false;
+ buildInputs = [ pkgs.unzip ];
+ propagatedBuildInputs = [ self."Products.CMFCore-2.2.7" self.setuptools self."zope.component__zcml-3.9.5" self."zope.interface-3.6.7" ];
+ installCommand = ''easy_install --always-unzip --no-deps --prefix="$out" .'';
+ meta = {
+ description = ''
+ Hooks to facilitate managing custom index values in Zope 2/CMF applications
+ '';
+ homepage = "http://pypi.python.org/pypi/plone.indexer";
+ license = "BSD";
+ };
+ };
+
+
"plone.app.layout-2.3.7" = self.buildPythonPackage {
name = "plone.app.layout-2.3.7";
src = fetchurl {
@@ -3681,22 +3749,22 @@ in
};
- "plone.locking-2.0.4" = self.buildPythonPackage {
- name = "plone.locking-2.0.4";
+ "mechanize-0.2.5" = self.buildPythonPackage {
+ name = "mechanize-0.2.5";
src = fetchurl {
- url = "https://pypi.python.org/packages/source/p/plone.locking/plone.locking-2.0.4.zip";
- md5 = "a7f8b8db78f57272d351d7fe0d067eb2";
+ url = "https://pypi.python.org/packages/source/m/mechanize/mechanize-0.2.5.tar.gz";
+ md5 = "32657f139fc2fb75bcf193b63b8c60b2";
};
doCheck = false;
- buildInputs = [ pkgs.unzip ];
- propagatedBuildInputs = [ self."Acquisition-2.13.8" self."DateTime-3.0.3" self."Products.CMFCore-2.2.7" self.setuptools self."ZODB3-3.10.5" self."zope.annotation-3.5.0" self."zope.component__zcml-3.9.5" self."zope.i18nmessageid-3.5.3" self."zope.interface-3.6.7" self."zope.schema-4.2.2" self."zope.viewlet-3.7.2" self."Zope2-2.13.21" ];
- installCommand = ''easy_install --always-unzip --no-deps --prefix="$out" .'';
+ buildInputs = [ ];
+ propagatedBuildInputs = [ ];
+ installCommand = ''easy_install --always-unzip --prefix="$out" .'';
meta = {
description = ''
- webdav locking support
+ Stateful programmatic web browsing.
'';
- homepage = "http://pypi.python.org/pypi/plone.locking";
- license = "GPL version 2";
+ homepage = "http://wwwsearch.sourceforge.net/mechanize/";
+ license = "BSD";
};
};
@@ -3801,6 +3869,26 @@ in
};
+ "plone.portlet.static-2.0.2" = self.buildPythonPackage {
+ name = "plone.portlet.static-2.0.2";
+ src = fetchurl {
+ url = "https://pypi.python.org/packages/source/p/plone.portlet.static/plone.portlet.static-2.0.2.zip";
+ md5 = "ec0dc691b4191a41ff97779b117f9985";
+ };
+ doCheck = false;
+ buildInputs = [ pkgs.unzip ];
+ propagatedBuildInputs = [ self."plone.app.form-2.2.3" self."plone.app.portlets-2.4.5" self."plone.i18n-2.0.9" self."plone.portlets-2.2" self.setuptools self."zope.component__zcml-3.9.5" self."zope.formlib-4.0.6" self."zope.i18nmessageid-3.5.3" self."zope.interface-3.6.7" self."zope.schema-4.2.2" self."Zope2-2.13.21" ];
+ installCommand = ''easy_install --always-unzip --no-deps --prefix="$out" .'';
+ meta = {
+ description = ''
+ A simple static HTML portlet for Plone.
+ '';
+ homepage = "http://pypi.python.org/pypi/plone.portlet.static";
+ license = "GPL version 2";
+ };
+ };
+
+
"plone.i18n-2.0.9" = self.buildPythonPackage {
name = "plone.i18n-2.0.9";
src = fetchurl {
@@ -3821,11 +3909,31 @@ in
};
- "Products.contentmigration-2.1.5" = self.buildPythonPackage {
- name = "Products.contentmigration-2.1.5";
+ "Missing-2.13.1" = self.buildPythonPackage {
+ name = "Missing-2.13.1";
src = fetchurl {
- url = "https://pypi.python.org/packages/source/P/Products.contentmigration/Products.contentmigration-2.1.5.zip";
- md5 = "f08e5f2572fc6f4c61b930a17f99418f";
+ url = "https://pypi.python.org/packages/source/M/Missing/Missing-2.13.1.zip";
+ md5 = "9823cff54444cbbcaef8fc45d8e42572";
+ };
+ doCheck = false;
+ buildInputs = [ pkgs.unzip ];
+ propagatedBuildInputs = [ self."ExtensionClass-2.13.2" ];
+ installCommand = ''easy_install --always-unzip --prefix="$out" .'';
+ meta = {
+ description = ''
+ Special Missing objects used in Zope2.
+ '';
+ homepage = "http://pypi.python.org/pypi/Missing";
+ license = "ZPL 2.1";
+ };
+ };
+
+
+ "zope.cachedescriptors-3.5.1" = self.buildPythonPackage {
+ name = "zope.cachedescriptors-3.5.1";
+ src = fetchurl {
+ url = "https://pypi.python.org/packages/source/z/zope.cachedescriptors/zope.cachedescriptors-3.5.1.zip";
+ md5 = "263459a95238fd61d17e815d97ca49ce";
};
doCheck = false;
buildInputs = [ pkgs.unzip ];
@@ -3833,10 +3941,10 @@ in
installCommand = ''easy_install --always-unzip --no-deps --prefix="$out" .'';
meta = {
description = ''
- A generic content migration framework for Plone.
+ Method and property caching decorators
'';
- homepage = "http://pypi.python.org/pypi/Products.contentmigration";
- license = "LGPL";
+ homepage = "http://pypi.python.org/pypi/zope.cachedescriptors";
+ license = "ZPL 2.1";
};
};
@@ -3850,7 +3958,7 @@ in
doCheck = false;
buildInputs = [ pkgs.unzip ];
propagatedBuildInputs = [ self.setuptools self."zope.browser-1.3" self."zope.component__zcml-3.9.5" self."zope.configuration-3.7.4" self."zope.i18nmessageid-3.5.3" self."zope.interface-3.6.7" self."zope.pagetemplate-3.6.3" self."zope.publisher-3.12.6" self."zope.schema-4.2.2" self."zope.security__untrustedpython-3.7.4" self."zope.traversing-3.13.2" ];
- installCommand = ''easy_install --always-unzip --no-deps --prefix="$out" .'';
+ installCommand = ''easy_install --always-unzip --prefix="$out" .'';
meta = {
description = ''
Browser menu implementation for Zope.
@@ -3861,21 +3969,21 @@ in
};
- "ZODB3-3.10.5" = self.buildPythonPackage {
- name = "ZODB3-3.10.5";
+ "archetypes.referencebrowserwidget-2.4.19" = self.buildPythonPackage {
+ name = "archetypes.referencebrowserwidget-2.4.19";
src = fetchurl {
- url = "https://pypi.python.org/packages/source/Z/ZODB3/ZODB3-3.10.5.tar.gz";
- md5 = "6f180c6897a1820948fee2a6290503cd";
+ url = "https://pypi.python.org/packages/source/a/archetypes.referencebrowserwidget/archetypes.referencebrowserwidget-2.4.19.zip";
+ md5 = "b70af6b2da6d8c57c1138a52e94e588c";
};
doCheck = false;
- buildInputs = [ ];
- propagatedBuildInputs = [ self."transaction-1.1.1" self."zc.lockfile-1.0.2" self."ZConfig-2.9.1" self."zdaemon-2.0.7" self."zope.event-3.5.2" self."zope.interface-3.6.7" ];
+ buildInputs = [ pkgs.unzip ];
+ propagatedBuildInputs = [ self."plone.app.form-2.2.3" self."plone.app.jquerytools-1.5.6" self.setuptools self."zope.component__zcml-3.9.5" self."zope.formlib-4.0.6" self."zope.interface-3.6.7" ];
installCommand = ''easy_install --always-unzip --no-deps --prefix="$out" .'';
meta = {
description = ''
- Zope Object Database: object database and persistence
+ A referencebrowser implementation for Archetypes
'';
- homepage = "UNKNOWN";
+ homepage = "http://pypi.python.org/pypi/archetypes.referencebrowserwidget";
license = "ZPL 2.1";
};
};
@@ -3928,8 +4036,8 @@ in
md5 = "bf0a04fcf8b2cdcaa13b04324cefb53d";
};
doCheck = true;
- buildInputs = [ self."nose-1.3.0" self."unittest2-0.5.1" self."pyquery-1.2.4" self."WSGIProxy2-0.3" self."PasteDeploy-1.5.0" self."mock-1.0.1" self."coverage-3.6" pkgs.unzip ];
- propagatedBuildInputs = [ self."beautifulsoup4-4.3.1" self."six-1.4.1" self."waitress-0.8.7" self."WebOb-1.2.3" ];
+ buildInputs = [ self."nose-1.3.0" self."unittest2-0.5.1" self."pyquery-1.2.6" self."WSGIProxy2-0.3" self."PasteDeploy-1.5.0" self."mock-1.0.1" self."coverage-3.7" pkgs.unzip ];
+ propagatedBuildInputs = [ self."beautifulsoup4-4.3.2" self."six-1.4.1" self."waitress-0.8.7" self."WebOb-1.2.3" ];
installCommand = ''easy_install --always-unzip --prefix="$out" .'';
meta = {
description = ''
@@ -4010,7 +4118,7 @@ in
doCheck = false;
buildInputs = [ ];
propagatedBuildInputs = [ self."zope.interface-3.6.7" ];
- installCommand = ''easy_install --always-unzip --no-deps --prefix="$out" .'';
+ installCommand = ''easy_install --always-unzip --prefix="$out" .'';
meta = {
description = ''
Transaction management for Python
@@ -4021,22 +4129,22 @@ in
};
- "zope.cachedescriptors-3.5.1" = self.buildPythonPackage {
- name = "zope.cachedescriptors-3.5.1";
+ "plone.app.theming-1.1.1" = self.buildPythonPackage {
+ name = "plone.app.theming-1.1.1";
src = fetchurl {
- url = "https://pypi.python.org/packages/source/z/zope.cachedescriptors/zope.cachedescriptors-3.5.1.zip";
- md5 = "263459a95238fd61d17e815d97ca49ce";
+ url = "https://pypi.python.org/packages/source/p/plone.app.theming/plone.app.theming-1.1.1.zip";
+ md5 = "a694b7a050b6e7c25d720d1e99bb73fa";
};
doCheck = false;
buildInputs = [ pkgs.unzip ];
- propagatedBuildInputs = [ self.setuptools ];
+ propagatedBuildInputs = [ self."diazo-1.0.4" self."docutils-0.9.1" self."five.globalrequest-1.0" self."lxml-2.3.6" self."plone.app.registry-1.2.3" self."plone.resource-1.0.2" self."plone.resourceeditor-1.0" self."plone.subrequest-1.6.7" self."plone.transformchain-1.0.3" self."Products.CMFPlone-4.3.2" self."repoze.xmliter-0.5" self."roman-1.4.0" self.setuptools self."zope.traversing-3.13.2" ];
installCommand = ''easy_install --always-unzip --no-deps --prefix="$out" .'';
meta = {
description = ''
- Method and property caching decorators
+ Integrates the Diazo theming engine with Plone
'';
- homepage = "http://pypi.python.org/pypi/zope.cachedescriptors";
- license = "ZPL 2.1";
+ homepage = "http://pypi.python.org/pypi/plone.app.theming";
+ license = "GPL";
};
};
@@ -4150,7 +4258,7 @@ in
doCheck = false;
buildInputs = [ ];
propagatedBuildInputs = [ self.setuptools self."zope.interface-3.6.7" ];
- installCommand = ''easy_install --always-unzip --no-deps --prefix="$out" .'';
+ installCommand = ''easy_install --always-unzip --prefix="$out" .'';
meta = {
description = ''
Zope Exceptions
@@ -4181,22 +4289,22 @@ in
};
- "plone.z3cform-0.8.0" = self.buildPythonPackage {
- name = "plone.z3cform-0.8.0";
+ "plone.app.caching-1.1.6" = self.buildPythonPackage {
+ name = "plone.app.caching-1.1.6";
src = fetchurl {
- url = "https://pypi.python.org/packages/source/p/plone.z3cform/plone.z3cform-0.8.0.zip";
- md5 = "bdb23dd162544964d2f8f8f5f002e874";
+ url = "https://pypi.python.org/packages/source/p/plone.app.caching/plone.app.caching-1.1.6.zip";
+ md5 = "52f817d67e6da1508bf6f1486e5466d2";
};
doCheck = false;
buildInputs = [ pkgs.unzip ];
- propagatedBuildInputs = [ self."plone.batching-1.0" self.setuptools self."z3c.form-3.0.2" self."zope.browserpage-3.12.2" self."zope.component__zcml-3.9.5" self."zope.i18n__zcml-3.7.4" self."Zope2-2.13.21" ];
+ propagatedBuildInputs = [ self."Acquisition-2.13.8" self."plone.app.registry-1.2.3" self."plone.app.z3cform-0.7.4" self."plone.cachepurging-1.0.4" self."plone.caching-1.0" self."plone.memoize-1.1.1" self."plone.protect-2.0.2" self."plone.registry-1.0.1" self."Products.CMFCore-2.2.7" self."Products.CMFDynamicViewFTI-4.0.5" self."Products.GenericSetup-1.7.4" self."Products.statusmessages-4.0" self."python-dateutil-1.5" self.setuptools self."z3c.form-3.0.2" self."z3c.zcmlhook-1.0b1" self."zope.browserresource-3.10.3" self."zope.component__zcml-3.9.5" self."zope.interface-3.6.7" self."zope.pagetemplate-3.6.3" self."zope.publisher-3.12.6" self."Zope2-2.13.21" ];
installCommand = ''easy_install --always-unzip --no-deps --prefix="$out" .'';
meta = {
description = ''
- plone.z3cform is a library that allows use of z3c.form with Zope 2 and the CMF.
+ Plone UI and default rules for plone.caching/z3c.caching
'';
- homepage = "http://pypi.python.org/pypi/plone.z3cform";
- license = "ZPL 2.1";
+ homepage = "http://pypi.python.org/pypi/plone.app.caching";
+ license = "GPL version 2";
};
};
@@ -4210,7 +4318,7 @@ in
doCheck = false;
buildInputs = [ pkgs.unzip ];
propagatedBuildInputs = [ self."Acquisition-2.13.8" self."DateTime-3.0.3" self."ExtensionClass-2.13.2" self."Persistence-2.13.2" self."Record-2.13.0" self."RestrictedPython-3.6.0" self."transaction-1.1.1" self."zExceptions-2.13.0" self."ZODB3-3.10.5" self."zope.component__zcml-3.9.5" self."zope.configuration-3.7.4" self."zope.deferredimport-3.5.3" self."zope.interface-3.6.7" self."zope.publisher-3.12.6" self."zope.schema-4.2.2" self."zope.security__untrustedpython-3.7.4" self."zope.testing-3.9.7" ];
- installCommand = ''easy_install --always-unzip --no-deps --prefix="$out" .'';
+ installCommand = ''easy_install --always-unzip --prefix="$out" .'';
meta = {
description = ''
Security framework for Zope2.
@@ -4230,7 +4338,7 @@ in
doCheck = false;
buildInputs = [ pkgs.unzip ];
propagatedBuildInputs = [ self."ExtensionClass-2.13.2" ];
- installCommand = ''easy_install --always-unzip --no-deps --prefix="$out" .'';
+ installCommand = ''easy_install --always-unzip --prefix="$out" .'';
meta = {
description = ''
Special Record objects used in Zope2.
@@ -4261,55 +4369,55 @@ in
};
- "plone.resourceeditor-1.0" = self.buildPythonPackage {
- name = "plone.resourceeditor-1.0";
+ "Products.CMFPlacefulWorkflow-1.5.9" = self.buildPythonPackage {
+ name = "Products.CMFPlacefulWorkflow-1.5.9";
src = fetchurl {
- url = "https://pypi.python.org/packages/source/p/plone.resourceeditor/plone.resourceeditor-1.0.zip";
- md5 = "443ff0a0ad83b94fc08cac46ee3b2ad4";
+ url = "https://pypi.python.org/packages/source/P/Products.CMFPlacefulWorkflow/Products.CMFPlacefulWorkflow-1.5.9.zip";
+ md5 = "9041e1f52eab5b348c0dfa85be438722";
};
doCheck = false;
buildInputs = [ pkgs.unzip ];
- propagatedBuildInputs = [ self."plone.resource-1.0.2" self.setuptools self."zope.component__zcml-3.9.5" self."zope.interface-3.6.7" self."zope.publisher-3.12.6" self."zope.schema-4.2.2" self."Zope2-2.13.21" ];
+ propagatedBuildInputs = [ self."Products.CMFCore-2.2.7" self."Products.CMFPlone-4.3.2" self."Products.GenericSetup-1.7.4" self."Products.PloneTestCase-0.9.17" self.setuptools self."zope.component__zcml-3.9.5" self."zope.i18nmessageid-3.5.3" self."zope.interface-3.6.7" self."zope.testing-3.9.7" ];
installCommand = ''easy_install --always-unzip --no-deps --prefix="$out" .'';
meta = {
description = ''
- UNKNOWN
+ Workflow policies for CMF and Plone
'';
- homepage = "https://github.com/plone/plone.resourceeditor";
+ homepage = "http://pypi.python.org/pypi/Products.CMFPlacefulWorkflow";
license = "GPL";
};
};
- "zope.event-3.5.2" = self.buildPythonPackage {
- name = "zope.event-3.5.2";
+ "plone.app.textfield-1.2.2" = self.buildPythonPackage {
+ name = "plone.app.textfield-1.2.2";
src = fetchurl {
- url = "https://pypi.python.org/packages/source/z/zope.event/zope.event-3.5.2.tar.gz";
- md5 = "6e8af2a16157a74885d4f0d88137cefb";
+ url = "https://pypi.python.org/packages/source/p/plone.app.textfield/plone.app.textfield-1.2.2.zip";
+ md5 = "f832887a40826d6f68c48b48f071fb9c";
};
doCheck = false;
- buildInputs = [ ];
- propagatedBuildInputs = [ self.setuptools ];
+ buildInputs = [ pkgs.unzip ];
+ propagatedBuildInputs = [ self.setuptools self."ZODB3-3.10.5" self."zope.component__zcml-3.9.5" self."zope.interface-3.6.7" self."zope.schema-4.2.2" ];
installCommand = ''easy_install --always-unzip --no-deps --prefix="$out" .'';
meta = {
description = ''
- Very basic event publishing system
+ Text field with MIME type support
'';
- homepage = "http://pypi.python.org/pypi/zope.event";
- license = "ZPL 2.1";
+ homepage = "http://pypi.python.org/pypi/plone.app.textfield";
+ license = "GPL";
};
};
- "pyquery-1.2.4" = self.buildPythonPackage {
- name = "pyquery-1.2.4";
+ "pyquery-1.2.6" = self.buildPythonPackage {
+ name = "pyquery-1.2.6";
src = fetchurl {
- url = "https://pypi.python.org/packages/source/p/pyquery/pyquery-1.2.4.tar.gz";
- md5 = "268f08258738d21bc1920d7522f2a63b";
+ url = "https://pypi.python.org/packages/source/p/pyquery/pyquery-1.2.6.zip";
+ md5 = "af51aa835f24eef06175c48dc1218029";
};
doCheck = true;
- buildInputs = [ ];
- propagatedBuildInputs = [ self."cssselect-0.8" self."lxml-3.2.3" ];
+ buildInputs = [ pkgs.unzip ];
+ propagatedBuildInputs = [ self."cssselect-0.9" self."lxml-3.2.3" ];
installCommand = ''easy_install --always-unzip --prefix="$out" .'';
meta = {
description = ''
@@ -4321,6 +4429,26 @@ in
};
+ "zope.event-3.5.2" = self.buildPythonPackage {
+ name = "zope.event-3.5.2";
+ src = fetchurl {
+ url = "https://pypi.python.org/packages/source/z/zope.event/zope.event-3.5.2.tar.gz";
+ md5 = "6e8af2a16157a74885d4f0d88137cefb";
+ };
+ doCheck = false;
+ buildInputs = [ ];
+ propagatedBuildInputs = [ self.setuptools ];
+ installCommand = ''easy_install --always-unzip --prefix="$out" .'';
+ meta = {
+ description = ''
+ Very basic event publishing system
+ '';
+ homepage = "http://pypi.python.org/pypi/zope.event";
+ license = "ZPL 2.1";
+ };
+ };
+
+
"initgroups-2.13.0" = self.buildPythonPackage {
name = "initgroups-2.13.0";
src = fetchurl {
@@ -4330,7 +4458,7 @@ in
doCheck = false;
buildInputs = [ pkgs.unzip ];
propagatedBuildInputs = [ ];
- installCommand = ''easy_install --always-unzip --no-deps --prefix="$out" .'';
+ installCommand = ''easy_install --always-unzip --prefix="$out" .'';
meta = {
description = ''
Convenience uid/gid helper function used in Zope2.
@@ -4350,7 +4478,7 @@ in
doCheck = false;
buildInputs = [ ];
propagatedBuildInputs = [ self."ZConfig-2.9.1" ];
- installCommand = ''easy_install --always-unzip --no-deps --prefix="$out" .'';
+ installCommand = ''easy_install --always-unzip --prefix="$out" .'';
meta = {
description = ''
Daemon process control library and tools for Unix-based systems
@@ -4470,7 +4598,7 @@ in
doCheck = false;
buildInputs = [ pkgs.unzip ];
propagatedBuildInputs = [ self.setuptools self."zope.interface-3.6.7" ];
- installCommand = ''easy_install --always-unzip --no-deps --prefix="$out" .'';
+ installCommand = ''easy_install --always-unzip --prefix="$out" .'';
meta = {
description = ''
Shared Zope Toolkit browser components
@@ -4521,84 +4649,82 @@ in
};
- "Plone" = self."Plone-4.3.2";
-
- "Plone-4.3.2" = self.buildPythonPackage {
- name = "Plone-4.3.2";
+ "Products.PluggableAuthService-1.10.0" = self.buildPythonPackage {
+ name = "Products.PluggableAuthService-1.10.0";
src = fetchurl {
- url = "https://pypi.python.org/packages/source/P/Plone/Plone-4.3.2.zip";
- md5 = "809f9fe8b8d23b49778e8ce304ea34f6";
+ url = "https://pypi.python.org/packages/source/P/Products.PluggableAuthService/Products.PluggableAuthService-1.10.0.tar.gz";
+ md5 = "1a1db6b1d9dd34f8b93a8a3104385a37";
};
doCheck = false;
- buildInputs = [ pkgs.unzip ];
- propagatedBuildInputs = [ self."plone.app.caching-1.1.6" self."plone.app.dexterity-2.0.9" self."plone.app.iterate-2.1.10" self."plone.app.openid-2.0.2" self."plone.app.theming-1.1.1" self."Products.CMFPlacefulWorkflow-1.5.9" self."Products.CMFPlone-4.3.2" self.setuptools self."wicked-1.1.10" ];
+ buildInputs = [ ];
+ propagatedBuildInputs = [ self."Products.GenericSetup-1.7.4" self."Products.PluginRegistry-1.3" self.setuptools self."Zope2-2.13.21" ];
installCommand = ''easy_install --always-unzip --no-deps --prefix="$out" .'';
meta = {
description = ''
- The Plone Content Management System
+ Pluggable Zope2 authentication / authorization framework
'';
- homepage = "http://plone.org/";
- license = "GPL version 2";
+ homepage = "http://pypi.python.org/pypi/Products.PluggableAuthService";
+ license = "ZPL 2.1 (http://www.zope.org/Resources/License/ZPL-2.1)";
};
};
- "plone.app.jquerytools-1.5.6" = self.buildPythonPackage {
- name = "plone.app.jquerytools-1.5.6";
+ "wicked-1.1.10" = self.buildPythonPackage {
+ name = "wicked-1.1.10";
src = fetchurl {
- url = "https://pypi.python.org/packages/source/p/plone.app.jquerytools/plone.app.jquerytools-1.5.6.zip";
- md5 = "4ae9a72baa8e9899c1706b4fedbb516b";
+ url = "https://pypi.python.org/packages/source/w/wicked/wicked-1.1.10.zip";
+ md5 = "f65611f11d547d7dc8e623bf87d3929d";
};
doCheck = false;
buildInputs = [ pkgs.unzip ];
- propagatedBuildInputs = [ self."Products.CMFCore-2.2.7" self."Products.GenericSetup-1.7.4" self.setuptools self."zope.component__zcml-3.9.5" self."Zope2-2.13.21" ];
+ propagatedBuildInputs = [ self.setuptools self."zope.container-3.11.2" self."zope.lifecycleevent-3.6.2" self."zope.schema-4.2.2" self."zope.traversing-3.13.2" ];
installCommand = ''easy_install --always-unzip --no-deps --prefix="$out" .'';
meta = {
description = ''
- jQuery Tools integration for Plone plus overlay and AJAX form helpers.
+ wicked is a compact syntax for doing wiki-like content linking and creation in zope and plone
'';
- homepage = "http://pypi.python.org/pypi/plone.app.jquerytools";
- license = "GPL version 2";
+ homepage = "http://pypi.python.org/pypi/wicked";
+ license = "GPL";
};
};
- "zope.broken-3.6.0" = self.buildPythonPackage {
- name = "zope.broken-3.6.0";
+ "Products.GenericSetup-1.7.4" = self.buildPythonPackage {
+ name = "Products.GenericSetup-1.7.4";
src = fetchurl {
- url = "https://pypi.python.org/packages/source/z/zope.broken/zope.broken-3.6.0.zip";
- md5 = "eff24d7918099a3e899ee63a9c31bee6";
+ url = "https://pypi.python.org/packages/source/P/Products.GenericSetup/Products.GenericSetup-1.7.4.tar.gz";
+ md5 = "f93251ed519e8c4aea0bc001416027b1";
};
doCheck = false;
- buildInputs = [ pkgs.unzip ];
- propagatedBuildInputs = [ self.setuptools self."zope.interface-3.6.7" ];
+ buildInputs = [ ];
+ propagatedBuildInputs = [ self."five.localsitemanager-2.0.5" self.setuptools self."zope.formlib-4.0.6" self."Zope2-2.13.21" ];
installCommand = ''easy_install --always-unzip --no-deps --prefix="$out" .'';
meta = {
description = ''
- Zope Broken Object Interfaces
+ Read Zope configuration state from profile dirs / tarballs
'';
- homepage = "http://pypi.python.org/pypi/zope.broken";
- license = "ZPL 2.1";
+ homepage = "http://pypi.python.org/pypi/Products.GenericSetup";
+ license = "ZPL 2.1 (http://www.zope.org/Resources/License/ZPL-2.1)";
};
};
- "ExtensionClass-2.13.2" = self.buildPythonPackage {
- name = "ExtensionClass-2.13.2";
+ "plone.app.viewletmanager-2.0.4" = self.buildPythonPackage {
+ name = "plone.app.viewletmanager-2.0.4";
src = fetchurl {
- url = "https://pypi.python.org/packages/source/E/ExtensionClass/ExtensionClass-2.13.2.zip";
- md5 = "0236e6d7da9e8b87b9ba45f1b8f930b8";
+ url = "https://pypi.python.org/packages/source/p/plone.app.viewletmanager/plone.app.viewletmanager-2.0.4.zip";
+ md5 = "565a12ac71d20b2823b9e44daebe432f";
};
doCheck = false;
buildInputs = [ pkgs.unzip ];
- propagatedBuildInputs = [ ];
+ propagatedBuildInputs = [ self."Acquisition-2.13.8" self."plone.app.vocabularies-2.1.11" self."Products.GenericSetup-1.7.4" self.setuptools self."ZODB3-3.10.5" self."zope.component__zcml-3.9.5" self."zope.contentprovider-3.7.2" self."zope.interface-3.6.7" self."zope.site-3.9.2" self."zope.viewlet-3.7.2" self."Zope2-2.13.21" ];
installCommand = ''easy_install --always-unzip --no-deps --prefix="$out" .'';
meta = {
description = ''
- Metaclass for subclassable extension types
+ configurable viewlet manager
'';
- homepage = "http://pypi.python.org/pypi/ExtensionClass";
- license = "ZPL 2.1";
+ homepage = "http://pypi.python.org/pypi/plone.app.viewletmanager";
+ license = "GPL version 2";
};
};
@@ -4623,26 +4749,6 @@ in
};
- "zope.browserpage-3.12.2" = self.buildPythonPackage {
- name = "zope.browserpage-3.12.2";
- src = fetchurl {
- url = "https://pypi.python.org/packages/source/z/zope.browserpage/zope.browserpage-3.12.2.tar.gz";
- md5 = "a543ef3cb1b42f7233b3fca23dc9ea60";
- };
- doCheck = false;
- buildInputs = [ ];
- propagatedBuildInputs = [ self.setuptools self."zope.component__zcml-3.9.5" self."zope.configuration-3.7.4" self."zope.interface-3.6.7" self."zope.pagetemplate-3.6.3" self."zope.publisher-3.12.6" self."zope.schema-4.2.2" self."zope.security__untrustedpython-3.7.4" self."zope.traversing-3.13.2" ];
- installCommand = ''easy_install --always-unzip --no-deps --prefix="$out" .'';
- meta = {
- description = ''
- ZCML directives for configuring browser views for Zope.
- '';
- homepage = "http://pypi.python.org/pypi/zope.browserpage/";
- license = "ZPL 2.1";
- };
- };
-
-
"zope.structuredtext-3.5.1" = self.buildPythonPackage {
name = "zope.structuredtext-3.5.1";
src = fetchurl {
@@ -4652,7 +4758,7 @@ in
doCheck = false;
buildInputs = [ ];
propagatedBuildInputs = [ self.setuptools ];
- installCommand = ''easy_install --always-unzip --no-deps --prefix="$out" .'';
+ installCommand = ''easy_install --always-unzip --prefix="$out" .'';
meta = {
description = ''
StructuredText parser
@@ -4692,7 +4798,7 @@ in
doCheck = false;
buildInputs = [ pkgs.unzip ];
propagatedBuildInputs = [ ];
- installCommand = ''easy_install --always-unzip --no-deps --prefix="$out" .'';
+ installCommand = ''easy_install --always-unzip --prefix="$out" .'';
meta = {
description = ''
ZODB undo support for Zope2.
@@ -4712,7 +4818,7 @@ in
doCheck = false;
buildInputs = [ pkgs.unzip ];
propagatedBuildInputs = [ self.setuptools self."zope.component__zcml-3.9.5" self."zope.i18n__zcml-3.7.4" self."zope.i18nmessageid-3.5.3" self."zope.interface-3.6.7" self."zope.location-3.9.1" self."zope.proxy-3.6.1" self."zope.publisher-3.12.6" self."zope.security__untrustedpython-3.7.4" ];
- installCommand = ''easy_install --always-unzip --no-deps --prefix="$out" .'';
+ installCommand = ''easy_install --always-unzip --prefix="$out" .'';
meta = {
description = ''
Resolving paths in the object hierarchy
@@ -4732,7 +4838,7 @@ in
doCheck = false;
buildInputs = [ ];
propagatedBuildInputs = [ self.setuptools self."zope.component__zcml-3.9.5" self."zope.event-3.5.2" self."zope.interface-3.6.7" self."zope.location-3.9.1" self."zope.publisher-3.12.6" self."zope.schema-4.2.2" self."zope.tales-3.5.3" ];
- installCommand = ''easy_install --always-unzip --no-deps --prefix="$out" .'';
+ installCommand = ''easy_install --always-unzip --prefix="$out" .'';
meta = {
description = ''
Content Provider Framework for Zope Templates
@@ -4783,22 +4889,22 @@ in
};
- "plone.portlet.static-2.0.2" = self.buildPythonPackage {
- name = "plone.portlet.static-2.0.2";
+ "zope.browserpage-3.12.2" = self.buildPythonPackage {
+ name = "zope.browserpage-3.12.2";
src = fetchurl {
- url = "https://pypi.python.org/packages/source/p/plone.portlet.static/plone.portlet.static-2.0.2.zip";
- md5 = "ec0dc691b4191a41ff97779b117f9985";
+ url = "https://pypi.python.org/packages/source/z/zope.browserpage/zope.browserpage-3.12.2.tar.gz";
+ md5 = "a543ef3cb1b42f7233b3fca23dc9ea60";
};
doCheck = false;
- buildInputs = [ pkgs.unzip ];
- propagatedBuildInputs = [ self."plone.app.form-2.2.3" self."plone.app.portlets-2.4.5" self."plone.i18n-2.0.9" self."plone.portlets-2.2" self.setuptools self."zope.component__zcml-3.9.5" self."zope.formlib-4.0.6" self."zope.i18nmessageid-3.5.3" self."zope.interface-3.6.7" self."zope.schema-4.2.2" self."Zope2-2.13.21" ];
- installCommand = ''easy_install --always-unzip --no-deps --prefix="$out" .'';
+ buildInputs = [ ];
+ propagatedBuildInputs = [ self.setuptools self."zope.component__zcml-3.9.5" self."zope.configuration-3.7.4" self."zope.interface-3.6.7" self."zope.pagetemplate-3.6.3" self."zope.publisher-3.12.6" self."zope.schema-4.2.2" self."zope.security__untrustedpython-3.7.4" self."zope.traversing-3.13.2" ];
+ installCommand = ''easy_install --always-unzip --prefix="$out" .'';
meta = {
description = ''
- A simple static HTML portlet for Plone.
+ ZCML directives for configuring browser views for Zope.
'';
- homepage = "http://pypi.python.org/pypi/plone.portlet.static";
- license = "GPL version 2";
+ homepage = "http://pypi.python.org/pypi/zope.browserpage/";
+ license = "ZPL 2.1";
};
};
@@ -4883,22 +4989,22 @@ in
};
- "Acquisition-2.13.8" = self.buildPythonPackage {
- name = "Acquisition-2.13.8";
+ "Products.PluginRegistry-1.3" = self.buildPythonPackage {
+ name = "Products.PluginRegistry-1.3";
src = fetchurl {
- url = "https://pypi.python.org/packages/source/A/Acquisition/Acquisition-2.13.8.zip";
- md5 = "8c33160c157b50649e2b2b3224622579";
+ url = "https://pypi.python.org/packages/source/P/Products.PluginRegistry/Products.PluginRegistry-1.3.tar.gz";
+ md5 = "5b166193ca1eb84dfb402051f779ebab";
};
doCheck = false;
- buildInputs = [ pkgs.unzip ];
- propagatedBuildInputs = [ self."ExtensionClass-2.13.2" self."zope.interface-3.6.7" ];
+ buildInputs = [ ];
+ propagatedBuildInputs = [ self."Products.GenericSetup-1.7.4" self.setuptools self."Zope2-2.13.21" ];
installCommand = ''easy_install --always-unzip --no-deps --prefix="$out" .'';
meta = {
description = ''
- Acquisition is a mechanism that allows objects to obtain attributes from the containment hierarchy they're in.
+ Configure application plugins based on interfaces
'';
- homepage = "http://pypi.python.org/pypi/Acquisition";
- license = "ZPL 2.1";
+ homepage = "http://pypi.python.org/pypi/Products.PluginRegistry";
+ license = "ZPL 2.1 (http://www.zope.org/Resources/License/ZPL-2.1)";
};
};
@@ -4932,7 +5038,7 @@ in
doCheck = false;
buildInputs = [ ];
propagatedBuildInputs = [ self."ZConfig-2.9.1" ];
- installCommand = ''easy_install --always-unzip --no-deps --prefix="$out" .'';
+ installCommand = ''easy_install --always-unzip --prefix="$out" .'';
meta = {
description = ''
A general logging facility
@@ -4952,7 +5058,7 @@ in
doCheck = false;
buildInputs = [ ];
propagatedBuildInputs = [ self.setuptools self."zope.component__zcml-3.9.5" self."zope.interface-3.6.7" self."zope.proxy-3.6.1" self."zope.schema-4.2.2" ];
- installCommand = ''easy_install --always-unzip --no-deps --prefix="$out" .'';
+ installCommand = ''easy_install --always-unzip --prefix="$out" .'';
meta = {
description = ''
Zope Location
@@ -5072,7 +5178,7 @@ in
doCheck = false;
buildInputs = [ pkgs.unzip ];
propagatedBuildInputs = [ self."AccessControl-3.0.8" self."Acquisition-2.13.8" self."ExtensionClass-2.13.2" self."RestrictedPython-3.6.0" self."zExceptions-2.13.0" self."zope.sequencesort-3.4.0" self."zope.structuredtext-3.5.1" ];
- installCommand = ''easy_install --always-unzip --no-deps --prefix="$out" .'';
+ installCommand = ''easy_install --always-unzip --prefix="$out" .'';
meta = {
description = ''
Document Templating Markup Language (DTML)
@@ -5132,7 +5238,7 @@ in
doCheck = false;
buildInputs = [ ];
propagatedBuildInputs = [ self.setuptools ];
- installCommand = ''easy_install --always-unzip --no-deps --prefix="$out" .'';
+ installCommand = ''easy_install --always-unzip --prefix="$out" .'';
meta = {
description = ''
Message Identifiers for internationalization
diff --git a/pkgs/top-level/python-packages.json b/pkgs/top-level/python-packages.json
index f6733ace2e861ed6b75c8e908559e5bc646c15bb..aefd911a55834e2f97b6fc3ff9ed62635c6e74db 100644
--- a/pkgs/top-level/python-packages.json
+++ b/pkgs/top-level/python-packages.json
@@ -122,5 +122,18 @@
]
}
}
+ },
+ { "name": "plone.recipe.zope2instance",
+ "extends": "http://dist.plone.org/release/4.3.2/versions.cfg",
+ "doCheck": false
+ },
+ { "name": "RelStorage",
+ "extends": "http://dist.plone.org/release/4.3.2/versions.cfg",
+ "doCheck": false
+ },
+ { "name": "psycopg2",
+ "buildInputs": [ "pkgs.postgresql" ],
+ "doCheck": false
}
+
]
diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix
index 9d0b7d80f76967dbb4b70b41232432780b2ca8eb..8baaa25d3031da6c8dcdb1efd9d22a450cdb5b93 100644
--- a/pkgs/top-level/python-packages.nix
+++ b/pkgs/top-level/python-packages.nix
@@ -5,7 +5,7 @@ isPy26 = python.majorVersion == "2.6";
isPy27 = python.majorVersion == "2.7";
optional = pkgs.lib.optional;
optionals = pkgs.lib.optionals;
-modules = python.modules or { readline = null; sqlite3 = null; curses = null; ssl = null; crypt = null; };
+modules = python.modules or { readline = null; sqlite3 = null; curses = null; curses_panel = null; ssl = null; crypt = null; };
pythonPackages = modules // import ./python-packages-generated.nix {
inherit pkgs python;
@@ -1347,6 +1347,7 @@ pythonPackages = modules // import ./python-packages-generated.nix {
homepage = http://pythonhosted.org/evdev;
license = licenses.bsd3;
maintainers = [ maintainers.goibhniu ];
+ platforms = stdenv.lib.platforms.linux;
};
};
@@ -2667,6 +2668,31 @@ pythonPackages = modules // import ./python-packages-generated.nix {
};
};
+ glances = buildPythonPackage rec {
+ name = "glances-${meta.version}";
+
+ src = fetchurl {
+ url = "https://github.com/nicolargo/glances/archive/v${meta.version}.tar.gz";
+ sha256 = "0g2yg9qf7qgjwv13x0rx51rzhn99pcmjpb3vk0g3gmmdsqyqi0d6";
+ };
+
+ buildInputs = [ pkgs.hddtemp ];
+
+ propagatedBuildInputs = [ psutil jinja2 modules.curses modules.curses_panel];
+
+ doCheck = false;
+
+ preConfigure = ''
+ sed -i -r -e '/data_files.append[(][(](conf|etc)_path/ietc_path="etc/glances"; conf_path="etc/glances"' setup.py;
+ '';
+
+ meta = {
+ version = "1.7.1";
+ homepage = "http://nicolargo.github.io/glances/";
+ description = "Cross-platform curses-based monitoring tool";
+ };
+ };
+
greenlet = buildPythonPackage rec {
name = "greenlet-0.3.1";
@@ -4628,6 +4654,7 @@ pythonPackages = modules // import ./python-packages-generated.nix {
homepage = "http://www.pyglet.org/";
description = "A cross-platform windowing and multimedia library";
license = stdenv.lib.licenses.bsd3;
+ platforms = stdenv.lib.platforms.mesaPlatforms;
};
};
@@ -4795,7 +4822,8 @@ pythonPackages = modules // import ./python-packages-generated.nix {
meta = {
homepage = "https://fedorahosted.org/pyparted/";
description = "Python interface for libparted";
- license = pkgs.lib.licenses.gpl2Plus;
+ license = stdenv.lib.licenses.gpl2Plus;
+ platforms = stdenv.lib.platforms.linux;
};
};
@@ -4851,6 +4879,7 @@ pythonPackages = modules // import ./python-packages-generated.nix {
homepage = "http://pyudev.readthedocs.org/";
description = "Pure Python libudev binding";
license = stdenv.lib.licenses.lgpl21Plus;
+ platforms = stdenv.lib.platforms.linux;
};
};
@@ -4974,6 +5003,7 @@ pythonPackages = modules // import ./python-packages-generated.nix {
'';
license = "BSD-style";
+ platforms = stdenv.lib.platforms.mesaPlatforms;
};
};