diff --git a/doc/meta.xml b/doc/meta.xml
index 00e9b8ac67a..6c8e458509a 100644
--- a/doc/meta.xml
+++ b/doc/meta.xml
@@ -164,7 +164,7 @@ meta.hydraPlatforms = [];
If set to true, the package is
marked as “broken”, meaning that it won’t show up in
nix-env -qa, and cannot be built or installed.
- Sush packages should be removed from Nixpkgs eventually unless
+ Such packages should be removed from Nixpkgs eventually unless
they are fixed.
diff --git a/doc/quick-start.xml b/doc/quick-start.xml
index 35983f0b114..49c674052b9 100644
--- a/doc/quick-start.xml
+++ b/doc/quick-start.xml
@@ -71,7 +71,7 @@ $ git add pkgs/development/libraries/libfoo/default.nix
GNU Multiple Precision arithmetic library (GMP): pkgs/development/libraries/gmp/5.1.1.nix.
+ xlink:href="https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/libraries/gmp/5.1.x.nix">pkgs/development/libraries/gmp/5.1.x.nix.
Also done by the generic builder, but has a dependency on
m4.
diff --git a/doc/stdenv.xml b/doc/stdenv.xml
index 1846886919d..74eb63b4b49 100644
--- a/doc/stdenv.xml
+++ b/doc/stdenv.xml
@@ -298,6 +298,13 @@ executed and in what order:
+
+ preFixupPhases
+
+ Additional phases executed just before the fixup phase.
+
+
+
preDistPhases
diff --git a/lib/licenses.nix b/lib/licenses.nix
index 603fddcb857..20c1b220031 100644
--- a/lib/licenses.nix
+++ b/lib/licenses.nix
@@ -64,6 +64,12 @@
url = https://fedoraproject.org/wiki/Licensing/BSD;
};
+ cc-by-30 = {
+ shortName = "CC BY 3.0";
+ fullName = "Creative Commons Attribution 3.0";
+ url = http://creativecommons.org/licenses/by/3.0;
+ };
+
cddl = {
shortName = "CDDL";
fullName = "Common Development Distribution License ";
diff --git a/lib/lists.nix b/lib/lists.nix
index 71a89702796..4b5f04a6758 100644
--- a/lib/lists.nix
+++ b/lib/lists.nix
@@ -226,4 +226,5 @@ in rec {
deepSeqList = xs: y: if any (x: deepSeq x false) xs then y else y;
crossLists = f: foldl (fs: args: concatMap (f: map f args) fs) [f];
+
}
diff --git a/lib/maintainers.nix b/lib/maintainers.nix
index 944935425e3..78355eff004 100644
--- a/lib/maintainers.nix
+++ b/lib/maintainers.nix
@@ -28,7 +28,8 @@
coroa = "Jonas Hörsch ";
edwtjo = "Edward Tjörnhammar ";
eelco = "Eelco Dolstra ";
- ertes = "Ertugrul Söylemez ";
+ emery = "Emery Hemingawy ";
+ ertes = "Ertugrul Söylemez ";
falsifian = "James Cook ";
garbas = "Rok Garbas ";
goibhniu = "Cillian de Róiste ";
@@ -38,6 +39,7 @@
iElectric = "Domen Kozar ";
iyzsong = "Song Wenwu ";
jcumming = "Jack Cummings ";
+ jwiegley = "John Wiegley ";
kkallio = "Karn Kallio ";
ktosiek = "Tomasz Kontusz ";
lethalman = "Luca Bruno ";
diff --git a/maintainers/scripts/nixpkgs-lint.pl b/maintainers/scripts/nixpkgs-lint.pl
index d74f5c740f5..7e9ff91ebe0 100755
--- a/maintainers/scripts/nixpkgs-lint.pl
+++ b/maintainers/scripts/nixpkgs-lint.pl
@@ -31,8 +31,7 @@ GetOptions("package|p=s" => \$filter,
"maintainer|m=s" => \$maintainer,
"file|f=s" => \$path,
"help" => sub { showHelp() }
- )
- or die("syntax: $0 ...\n");
+ ) or exit 1;
# Evaluate Nixpkgs into an XML representation.
my $xml = `nix-env -f '$path' -qa '$filter' --xml --meta --drv-path`;
diff --git a/nixos/doc/manual/configuration.xml b/nixos/doc/manual/configuration.xml
index 246ab11587a..1dff9d2f21e 100644
--- a/nixos/doc/manual/configuration.xml
+++ b/nixos/doc/manual/configuration.xml
@@ -237,7 +237,7 @@ postgresql.package = pkgs.postgresql90;
-Abstractions
+Abstractions
If you find yourself repeating yourself over and over, it’s time
to abstract. Take, for instance, this Apache HTTP Server configuration:
@@ -399,7 +399,7 @@ of an expression to be spliced into a string.
-Modularity
+Modularity
The NixOS configuration mechanism is modular. If your
configuration.nix becomes too big, you can split
@@ -538,7 +538,7 @@ nix-repl> map (x: x.hostName) config.services.httpd.virtualHosts
-Syntax summary
+Syntax summary
Below is a summary of the most important syntactic constructs in
the Nix expression language. It’s not complete. In particular, there
@@ -730,7 +730,7 @@ manual for the rest.
-Package management
+Package management
This section describes how to add additional packages to your
system. NixOS has two distinct styles of package management:
@@ -1183,7 +1183,7 @@ fileSystems."/".device = "/dev/mapper/crypted";
-X Window System
+X Window System
The X Window System (X11) provides the basis of NixOS’ graphical
user interface. It can be enabled as follows:
@@ -1275,9 +1275,9 @@ services.xserver.synaptics.twoFingerScroll = true;
-Networking
+Networking
-Secure shell access
+Secure shell access
Secure shell (SSH) access to your machine can be enabled by
setting:
@@ -1305,7 +1305,7 @@ users.extraUsers.alice.openssh.authorizedKeys.keys =
-IPv4 configuration
+IPv4 configuration
By default, NixOS uses DHCP (specifically,
dhcpcd) to automatically configure network
@@ -1348,7 +1348,7 @@ provide the host name.
-IPv6 configuration
+IPv6 configuration
IPv6 is enabled by default. Stateless address autoconfiguration
is used to automatically assign IPv6 addresses to all interfaces. You
@@ -1363,17 +1363,19 @@ networking.enableIPv6 = false;
-Firewall
+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:
+both IPv4 and IPv6 traffic. It is enabled by default. It can be
+disabled as follows:
-networking.firewall.enable = true;
+networking.firewall.enable = false;
-You can open specific TCP ports to the outside world:
+If the firewall is enabled, you can open specific TCP ports to the
+outside world:
networking.firewall.allowedTCPPorts = [ 80 443 ];
@@ -1395,7 +1397,7 @@ always allowed.)
-Wireless networks
+Wireless networks
NixOS will start wpa_supplicant for you if you enable this setting:
@@ -1456,7 +1458,7 @@ networking.localCommands =
-Linux kernel
+Linux kernel
You can override the Linux kernel and associated packages using
the option . For instance, this
diff --git a/nixos/doc/manual/containers.xml b/nixos/doc/manual/containers.xml
new file mode 100644
index 00000000000..b8f170fc614
--- /dev/null
+++ b/nixos/doc/manual/containers.xml
@@ -0,0 +1,242 @@
+
+
+Containers
+
+NixOS allows you to easily run other NixOS instances as
+containers. Containers are a light-weight
+approach to virtualisation that runs software in the container at the
+same speed as in the host system. NixOS containers share the Nix store
+of the host, making container creation very efficient.
+
+Currently, NixOS containers are not perfectly isolated
+from the host system. This means that a user with root access to the
+container can do things that affect the host. So you should not give
+container root access to untrusted users.
+
+NixOS containers can be created in two ways: imperatively, using
+the command nixos-container, and declaratively, by
+specifying them in your configuration.nix. The
+declarative approach implies that containers get upgraded along with
+your host system when you run nixos-rebuild, which
+is often not what you want. By contrast, in the imperative approach,
+containers are configured and updated independently from the host
+system.
+
+
+Imperative container management
+
+We’ll cover imperative container management using
+nixos-container first. You create a container with
+identifier foo as follows:
+
+
+$ nixos-container create foo
+
+
+This creates the container’s root directory in
+/var/lib/containers/foo and a small configuration
+file in /etc/containers/foo.conf. It also builds
+the container’s initial system configuration and stores it in
+/nix/var/nix/profiles/per-container/foo/system. You
+can modify the initial configuration of the container on the command
+line. For instance, to create a container that has
+sshd running, with the given public key for
+root:
+
+
+$ nixos-container create foo --config 'services.openssh.enable = true; \
+ users.extraUsers.root.openssh.authorizedKeys.keys = ["ssh-dss AAAAB3N…"];'
+
+
+
+
+Creating a container does not start it. To start the container,
+run:
+
+
+$ nixos-container start foo
+
+
+This command will return as soon as the container has booted and has
+reached multi-user.target. On the host, the
+container runs within a systemd unit called
+container@container-name.service.
+Thus, if something went wrong, you can get status info using
+systemctl:
+
+
+$ systemctl status container@foo
+
+
+
+
+If the container has started succesfully, you can log in as
+root using the root-login operation:
+
+
+$ nixos-container root-login foo
+[root@foo:~]#
+
+
+Note that only root on the host can do this (since there is no
+authentication). You can also get a regular login prompt using the
+login operation, which is available to all users on
+the host:
+
+
+$ nixos-container login foo
+foo login: alice
+Password: ***
+
+
+With nixos-container run, you can execute arbitrary
+commands in the container:
+
+
+$ nixos-container run foo -- uname -a
+Linux foo 3.4.82 #1-NixOS SMP Thu Mar 20 14:44:05 UTC 2014 x86_64 GNU/Linux
+
+
+
+
+There are several ways to change the configuration of the
+container. First, on the host, you can edit
+/var/lib/container/name/etc/nixos/configuration.nix,
+and run
+
+
+$ nixos-container update foo
+
+
+This will build and activate the new configuration. You can also
+specify a new configuration on the command line:
+
+
+$ nixos-container update foo --config 'services.httpd.enable = true; \
+ services.httpd.adminAddr = "foo@example.org";'
+
+$ curl http://$(nixos-container show-ip foo)/
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">…
+
+
+However, note that this will overwrite the container’s
+/etc/nixos/configuration.nix.
+
+Alternatively, you can change the configuration from within the
+container itself by running nixos-rebuild switch
+inside the container. Note that the container by default does not have
+a copy of the NixOS channel, so you should run nix-channel
+--update first.
+
+Containers can be stopped and started using
+nixos-container stop and nixos-container
+start, respectively, or by using
+systemctl on the container’s service unit. To
+destroy a container, including its file system, do
+
+
+$ nixos-container destroy foo
+
+
+
+
+
+
+
+Declarative container specification
+
+You can also specify containers and their configuration in the
+host’s configuration.nix. For example, the
+following specifies that there shall be a container named
+database running PostgreSQL:
+
+
+containers.database =
+ { config =
+ { config, pkgs, ... }:
+ { services.postgresql.enable = true;
+ services.postgresql.package = pkgs.postgresql92;
+ };
+ };
+
+
+If you run nixos-rebuild switch, the container will
+be built and started. If the container was already running, it will be
+updated in place, without rebooting.
+
+By default, declarative containers share the network namespace
+of the host, meaning that they can listen on (privileged)
+ports. However, they cannot change the network configuration. You can
+give a container its own network as follows:
+
+
+containers.database =
+ { privateNetwork = true;
+ hostAddress = "192.168.100.10";
+ localAddress = "192.168.100.11";
+ };
+
+
+This gives the container a private virtual Ethernet interface with IP
+address 192.168.100.11, which is hooked up to a
+virtual Ethernet interface on the host with IP address
+192.168.100.10. (See the next section for details
+on container networking.)
+
+To disable the container, just remove it from
+configuration.nix and run nixos-rebuild
+switch. Note that this will not delete the root directory of
+the container in /var/lib/containers.
+
+
+
+
+Networking
+
+When you create a container using nixos-container
+create, it gets it own private IPv4 address in the range
+10.233.0.0/16. You can get the container’s IPv4
+address as follows:
+
+
+$ nixos-container show-ip foo
+10.233.4.2
+
+$ ping -c1 10.233.4.2
+64 bytes from 10.233.4.2: icmp_seq=1 ttl=64 time=0.106 ms
+
+
+
+
+Networking is implemented using a pair of virtual Ethernet
+devices. The network interface in the container is called
+eth0, while the matching interface in the host is
+called c-container-name
+(e.g., c-foo). The container has its own network
+namespace and the CAP_NET_ADMIN capability, so it
+can perform arbitrary network configuration such as setting up
+firewall rules, without affecting or having access to the host’s
+network.
+
+By default, containers cannot talk to the outside network. If
+you want that, you should set up Network Address Translation (NAT)
+rules on the host to rewrite container traffic to use your external
+IP address. This can be accomplished using the following configuration
+on the host:
+
+
+networking.nat.enable = true;
+networking.nat.internalInterfaces = ["c-+"];
+networking.nat.externalInterface = "eth0";
+
+where eth0 should be replaced with the desired
+external interface. Note that c-+ is a wildcard
+that matches all container interfaces.
+
+
+
+
+
+
diff --git a/nixos/doc/manual/development.xml b/nixos/doc/manual/development.xml
index be1cbc97d5e..a93b4b163bd 100644
--- a/nixos/doc/manual/development.xml
+++ b/nixos/doc/manual/development.xml
@@ -1,5 +1,6 @@
+ xmlns:xlink="http://www.w3.org/1999/xlink"
+ xml:id="ch-development">
Development
@@ -9,7 +10,7 @@ NixOS.
-
+
Getting the sources
@@ -74,7 +75,7 @@ in nixos/ as packages.
-
+
Writing NixOS modules
@@ -188,9 +189,9 @@ commands to be executed periodically by cron).
NixOS module for the “locate” service
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
let locatedb = "/var/cache/locatedb"; in
@@ -579,7 +580,7 @@ systemd.services.dhcpcd =
-
+
Building specific parts of NixOS
@@ -692,7 +693,7 @@ $ systemctl start tmp-httpd.service
-
+
Building your own NixOS CD
@@ -748,57 +749,310 @@ $ ./result/bin/nixos-install
-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.
+NixOS tests
-
-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:
+When you add some feature to NixOS, you should write a test for
+it. NixOS tests are kept in the directory nixos/tests,
+and are executed (using Nix) by a testing framework that automatically
+starts one or more virtual machines containing the NixOS system(s)
+required for the test.
+
+Writing tests
+
+A NixOS test is a Nix expression that has the following structure:
+
+
+import ./make-test.nix {
+
+ # Either the configuration of a single machine:
+ machine =
+ { config, pkgs, ... }:
+ { configuration…
+ };
+
+ # Or a set of machines:
+ nodes =
+ { machine1 =
+ { config, pkgs, ... }: { … };
+ machine2 =
+ { config, pkgs, ... }: { … };
+ …
+ };
+
+ testScript =
+ ''
+ Perl code…
+ '';
+}
+
+
+The attribute testScript is a bit of Perl code that
+executes the test (described below). During the test, it will start
+one or more virtual machines, the configuration of which is described
+by the attribute machine (if you need only one
+machine in your test) or by the attribute nodes (if
+you need multiple machines). For instance, login.nix
+only needs a single machine to test whether users can log in on the
+virtual console, whether device ownership is correctly maintained when
+switching between consoles, and so on. On the other hand, nfs.nix,
+which tests NFS client and server functionality in the Linux kernel
+(including whether locks are maintained across server crashes),
+requires three machines: a server and two clients.
+
+There are a few special NixOS configuration options for test
+VMs:
+
+
+
+
+
+
+
+ The memory of the VM in
+ megabytes.
+
+
+
+
+ The virtual networks to which the VM is
+ connected. See nat.nix
+ for an example.
+
+
+
+
+ By default, the Nix store in the VM is not
+ writable. If you enable this option, a writable union file system
+ is mounted on top of the Nix store to make it appear
+ writable. This is necessary for tests that run Nix operations that
+ modify the store.
+
+
+
+
+For more options, see the module qemu-vm.nix.
+
+The test script is a sequence of Perl statements that perform
+various actions, such as starting VMs, executing commands in the VMs,
+and so on. Each virtual machine is represented as an object stored in
+the variable $name,
+where name is the identifier of the machine
+(which is just machine if you didn’t specify
+multiple machines using the nodes attribute). For
+instance, the following starts the machine, waits until it has
+finished booting, then executes a command and checks that the output
+is more-or-less correct:
+
+
+$machine->start;
+$machine->waitForUnit("default.target");
+$machine->succeed("uname") =~ /Linux/;
+
+
+The first line is actually unnecessary; machines are implicitly
+started when you first execute an action on them (such as
+waitForUnit or succeed). If you
+have multiple machines, you can speed up the test by starting them in
+parallel:
+
+
+startAll;
+
+
+
+
+The following methods are available on machine objects:
+
+
+
+
+ start
+ Start the virtual machine. This method is
+ asynchronous — it does not wait for the machine to finish
+ booting.
+
+
+
+ shutdown
+ Shut down the machine, waiting for the VM to
+ exit.
+
+
+
+ crash
+ Simulate a sudden power failure, by telling the VM
+ to exit immediately.
+
+
+
+ block
+ Simulate unplugging the Ethernet cable that
+ connects the machine to the other machines.
+
+
+
+ unblock
+ Undo the effect of
+ block.
+
+
+
+ screenshot
+ Take a picture of the display of the virtual
+ machine, in PNG format. The screenshot is linked from the HTML
+ log.
+
+
+
+ sendMonitorCommand
+ Send a command to the QEMU monitor. This is rarely
+ used, but allows doing stuff such as attaching virtual USB disks
+ to a running machine.
+
+
+
+ sendKeys
+ Simulate pressing keys on the virtual keyboard,
+ e.g., sendKeys("ctrl-alt-delete").
+
+
+
+ sendChars
+ Simulate typing a sequence of characters on the
+ virtual keyboard, e.g., sendKeys("foobar\n")
+ will type the string foobar followed by the
+ Enter key.
+
+
+
+ execute
+ Execute a shell command, returning a list
+ (status,
+ stdout).
+
+
+
+ succeed
+ Execute a shell command, raising an exception if
+ the exit status is not zero, otherwise returning the standard
+ output.
+
+
+
+ fail
+ Like succeed, but raising
+ an exception if the command returns a zero status.
+
+
+
+ waitUntilSucceeds
+ Repeat a shell command with 1-second intervals
+ until it succeeds.
+
+
+
+ waitUntilFails
+ Repeat a shell command with 1-second intervals
+ until it fails.
+
+
+
+ waitForUnit
+ Wait until the specified systemd unit has reached
+ the “active” state.
+
+
+
+ waitForFile
+ Wait until the specified file
+ exists.
+
+
+
+ waitForOpenPort
+ Wait until a process is listening on the given TCP
+ port (on localhost, at least).
+
+
+
+ waitForClosedPort
+ Wait until nobody is listening on the given TCP
+ port.
+
+
+
+ waitForX
+ Wait until the X11 server is accepting
+ connections.
+
+
+
+ waitForWindow
+ Wait until an X11 window has appeared whose name
+ matches the given regular expression, e.g.,
+ waitForWindow(qr/Terminal/).
+
+
+
+
+
+
+
+
+
+Running tests
+
+You can run tests using nix-build. For
+example, to run the test login.nix,
+you just do:
-$ nix-build tests/ -A nfs.test
+$ nix-build '<nixpkgs/nixos/tests/login.nix>'
-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:
+or, if you don’t want to rely on NIX_PATH:
+
+
+$ cd /my/nixpkgs/nixos/tests
+$ nix-build login.nix
+…
+running the VM test script
+machine: QEMU running (pid 8841)
+…
+6 out of 6 tests succeeded
+
+
+After building/downloading all required dependencies, this will
+perform a build that starts a QEMU/KVM virtual machine containing a
+NixOS system. The virtual machine mounts the Nix store of the host;
+this makes VM creation very fast, as no disk image needs to be
+created. Afterwards, you can view a pretty-printed log of the test:
$ 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
+$ nix-build login.nix -A 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
+The script nixos-run-vms starts the virtual
+machines defined by test. 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
@@ -811,17 +1065,11 @@ starting VDE switch for network 1
>
-Perl statements can now be typed in to start or manipulate the VMs:
+You can then take any Perl statement, e.g.
-> 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");
+> startAll
+> $machine->succeed("touch /tmp/foo")
The function testScript executes the entire test
@@ -829,54 +1077,7 @@ 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
index f6b477ed69b..03540aa83aa 100644
--- a/nixos/doc/manual/installation.xml
+++ b/nixos/doc/manual/installation.xml
@@ -1,13 +1,13 @@
+ xml:id="ch-installation">
Installing NixOS
-
+
Obtaining NixOS
@@ -51,7 +51,7 @@ running NixOS system through several other means:
-
+
Installation
@@ -339,7 +339,7 @@ changes:
-Booting from a USB stick
+Booting from a USB stick
For systems withoua CD drive, the NixOS livecd can be booted from
a usb stick. For non-UEFI installations,
diff --git a/nixos/doc/manual/manual.xml b/nixos/doc/manual/manual.xml
index f9775f4f017..8d7c28dee73 100644
--- a/nixos/doc/manual/manual.xml
+++ b/nixos/doc/manual/manual.xml
@@ -54,12 +54,13 @@
+
- List of options
+ Configuration options
diff --git a/nixos/doc/manual/options-to-docbook.xsl b/nixos/doc/manual/options-to-docbook.xsl
index 9647aae0f2f..bb65a49217f 100644
--- a/nixos/doc/manual/options-to-docbook.xsl
+++ b/nixos/doc/manual/options-to-docbook.xsl
@@ -18,13 +18,12 @@
+
-
+
+
diff --git a/nixos/doc/manual/release-notes.xml b/nixos/doc/manual/release-notes.xml
index 8899cbb2149..7995497708e 100644
--- a/nixos/doc/manual/release-notes.xml
+++ b/nixos/doc/manual/release-notes.xml
@@ -5,9 +5,9 @@
-
+
-Release 14.02 (“Baboon”, 2014/02/??)
+Release 14.04 (“Baboon”, 2014/04/??)
This is the second stable release branch of NixOS. The main
enhancements are the following:
@@ -18,13 +18,9 @@ enhancements are the following:
for
details.
- NixOS is now based on Glibc 2.18 and GCC
+ NixOS is now based on Glibc 2.19 and GCC
4.8.
- The mysql55 service has been merged into the
- mysql service, which no longer sets a default for the 'package
- option.
-
@@ -34,10 +30,41 @@ following incompatible changes:
+ Nixpkgs no longer exposes unfree packages by
+ default. If your NixOS configuration requires unfree packages from
+ Nixpkgs, you need to enable support for them explicitly by setting:
+
+
+nixpkgs.config.allowUnfree = true;
+
+
+ Otherwise, you get an error message such as:
+
+
+error: package ‘nvidia-x11-331.49-3.12.17’ in ‘…/nvidia-x11/default.nix:56’
+ has an unfree license, refusing to evaluate
+
+
+
+
+ The firewall is now enabled by default. If you don’t
+ want this, you need to disable it explicitly:
+
+
+networking.firewall.enable = false;
+
+
+
+
The option
has been renamed to
.
+ The mysql55 service has been
+ merged into the mysql service, which no longer
+ sets a default for the option
+ .
+
diff --git a/nixos/doc/manual/running.xml b/nixos/doc/manual/running.xml
index e50099707cc..e1a358df2aa 100644
--- a/nixos/doc/manual/running.xml
+++ b/nixos/doc/manual/running.xml
@@ -11,7 +11,7 @@ service manager.
-Service management
+Service management
In NixOS, all system services are started and monitored using
the systemd program. Systemd is the “init” process of the system
@@ -92,7 +92,7 @@ necessary).
-Rebooting and shutting down
+Rebooting and shutting down
The system can be shut down (and automatically powered off) by
doing:
@@ -134,7 +134,7 @@ authentication.
-User sessions
+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
@@ -185,7 +185,7 @@ $ loginctl terminate-session c3
-Control groups
+Control groups
To keep track of the processes in a running system, systemd uses
control groups (cgroups). A control group is a
@@ -258,7 +258,7 @@ usage.
-Logging
+Logging
System-wide logging is provided by systemd’s
journal, which subsumes traditional logging
@@ -308,7 +308,7 @@ groups. All users have a private journal that can be read using
-Cleaning up the Nix store
+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
diff --git a/nixos/doc/manual/troubleshooting.xml b/nixos/doc/manual/troubleshooting.xml
index c6e0a3a7888..c7d65112b64 100644
--- a/nixos/doc/manual/troubleshooting.xml
+++ b/nixos/doc/manual/troubleshooting.xml
@@ -1,12 +1,13 @@
+ xmlns:xlink="http://www.w3.org/1999/xlink"
+ xml:id="ch-troubleshooting">
Troubleshooting
-Boot problems
+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
@@ -69,7 +70,7 @@ unless something is very wrong.)
-Maintenance mode
+Maintenance mode
You can enter rescue mode by running:
@@ -85,7 +86,7 @@ just exit from the rescue shell.
-Rolling back configuration changes
+Rolling back configuration changes
After running nixos-rebuild to switch to a
new configuration, you may find that the new configuration doesn’t
@@ -131,7 +132,7 @@ lrwxrwxrwx 1 root root 78 Aug 12 13:54 /nix/var/nix/profiles/system-268-link ->
-Nix store corruption
+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
@@ -166,7 +167,7 @@ binary cache; otherwise, they cannot be repaired.
-Nix network issues
+Nix network issues
Nix uses a so-called binary cache to
optimise building a package from source into downloading it as a
diff --git a/nixos/lib/eval-config.nix b/nixos/lib/eval-config.nix
index 4b8c7354a7e..e082b174454 100644
--- a/nixos/lib/eval-config.nix
+++ b/nixos/lib/eval-config.nix
@@ -26,10 +26,15 @@ rec {
# These are the extra arguments passed to every module. In
# particular, Nixpkgs is passed through the "pkgs" argument.
+ # FIXME: we enable config.allowUnfree to make packages like
+ # nvidia-x11 available. This isn't a problem because if the user has
+ # ‘nixpkgs.config.allowUnfree = false’, then evaluation will fail on
+ # the 64-bit package anyway. However, it would be cleaner to respect
+ # nixpkgs.config here.
extraArgs = extraArgs_ // {
inherit pkgs modules baseModules;
modulesPath = ../modules;
- pkgs_i686 = import ./nixpkgs.nix { system = "i686-linux"; };
+ pkgs_i686 = import ./nixpkgs.nix { system = "i686-linux"; config.allowUnfree = true; };
utils = import ./utils.nix pkgs;
};
diff --git a/nixos/lib/test-driver/test-driver.pl b/nixos/lib/test-driver/test-driver.pl
index 31f3281cefe..358c29e515f 100644
--- a/nixos/lib/test-driver/test-driver.pl
+++ b/nixos/lib/test-driver/test-driver.pl
@@ -147,7 +147,7 @@ sub runTests {
$log->nest("syncing", sub {
foreach my $vm (values %vms) {
next unless $vm->isUp();
- $vm->execute("sync /tmp/xchg");
+ $vm->execute("sync");
}
});
diff --git a/nixos/lib/testing.nix b/nixos/lib/testing.nix
index d5338bc04ca..8d17958b9d2 100644
--- a/nixos/lib/testing.nix
+++ b/nixos/lib/testing.nix
@@ -67,57 +67,55 @@ rec {
};
- makeTest = testFun: complete (call testFun);
- makeTests = testsFun: lib.mapAttrs (name: complete) (call testsFun);
+ makeTest =
+ { testScript, makeCoverageReport ? false, ... } @ t:
- apply = makeTest; # compatibility
- call = f: f { inherit pkgs system; };
+ let
- complete = { testScript, ... } @ t: t // rec {
+ nodes = buildVirtualNetwork (
+ t.nodes or (if t ? machine then { machine = t.machine; } else { }));
- nodes = buildVirtualNetwork (
- t.nodes or (if t ? machine then { machine = t.machine; } else { }));
+ testScript' =
+ # Call the test script with the computed nodes.
+ if builtins.isFunction testScript
+ then testScript { inherit nodes; }
+ else testScript;
- 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);
- vlans = map (m: m.config.virtualisation.vlans) (lib.attrValues nodes);
+ vms = map (m: m.config.system.build.vm) (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];
+ testScript = 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"}
+ ''; # "
- # 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;
- test = runTests driver;
+ report = releaseTools.gcovReport { coverageRuns = [ test ]; };
- report = releaseTools.gcovReport { coverageRuns = [ test ]; };
- };
+ in (if makeCoverageReport then report else test) // { inherit driver test; };
runInMachine =
@@ -147,7 +145,7 @@ rec {
exit $?
'';
- testscript = ''
+ testScript = ''
startAll;
$client->waitForUnit("multi-user.target");
${preBuild}
@@ -160,7 +158,7 @@ rec {
${coreutils}/bin/mkdir $out
${coreutils}/bin/mkdir -p vm-state-client/xchg
export > vm-state-client/xchg/saved-env
- export tests='${testscript}'
+ export tests='${testScript}'
${testDriver}/bin/nixos-test-driver ${vm.config.system.build.vm}/bin/run-*-vm
''; # */
diff --git a/nixos/maintainers/scripts/gce/create-gce.sh b/nixos/maintainers/scripts/gce/create-gce.sh
new file mode 100755
index 00000000000..8bf36f33c7d
--- /dev/null
+++ b/nixos/maintainers/scripts/gce/create-gce.sh
@@ -0,0 +1,14 @@
+#! /bin/sh -e
+
+export NIX_PATH=nixpkgs=../../../..
+export NIXOS_CONFIG=$(dirname $(readlink -f $0))/../../../modules/virtualisation/google-compute-image.nix
+export TIMESTAMP=$(date +%Y%m%d%H%M)
+
+nix-build '' \
+ -A config.system.build.googleComputeImage --argstr system x86_64-linux -o gce --option extra-binary-caches http://hydra.nixos.org -j 10
+
+img=$(echo gce/*.tar.gz)
+if ! gsutil ls gs://nixos/$(basename $img); then
+ gsutil cp $img gs://nixos/$(basename $img)
+fi
+gcutil addimage $(basename $img .raw.tar.gz | sed 's|\.|-|' | sed 's|_|-|') gs://nixos/$(basename $img)
diff --git a/nixos/modules/config/fonts/corefonts.nix b/nixos/modules/config/fonts/corefonts.nix
index 7de95200cfa..51a6676fe4a 100644
--- a/nixos/modules/config/fonts/corefonts.nix
+++ b/nixos/modules/config/fonts/corefonts.nix
@@ -1,6 +1,6 @@
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
{
diff --git a/nixos/modules/config/fonts/fontconfig.nix b/nixos/modules/config/fonts/fontconfig.nix
index 987bb1088c0..cf70ca264d6 100644
--- a/nixos/modules/config/fonts/fontconfig.nix
+++ b/nixos/modules/config/fonts/fontconfig.nix
@@ -1,6 +1,6 @@
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
{
diff --git a/nixos/modules/config/fonts/fontdir.nix b/nixos/modules/config/fonts/fontdir.nix
index a4f69809b2a..c78b52fe29e 100644
--- a/nixos/modules/config/fonts/fontdir.nix
+++ b/nixos/modules/config/fonts/fontdir.nix
@@ -1,6 +1,6 @@
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
let
diff --git a/nixos/modules/config/fonts/fonts.nix b/nixos/modules/config/fonts/fonts.nix
index f43784f6d03..16df197d87f 100644
--- a/nixos/modules/config/fonts/fonts.nix
+++ b/nixos/modules/config/fonts/fonts.nix
@@ -1,6 +1,6 @@
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
{
diff --git a/nixos/modules/config/fonts/ghostscript.nix b/nixos/modules/config/fonts/ghostscript.nix
index 9ef00396808..a41f00a76c5 100644
--- a/nixos/modules/config/fonts/ghostscript.nix
+++ b/nixos/modules/config/fonts/ghostscript.nix
@@ -1,6 +1,6 @@
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
{
diff --git a/nixos/modules/config/gnu.nix b/nixos/modules/config/gnu.nix
index 6f5d2950463..092828fed0d 100644
--- a/nixos/modules/config/gnu.nix
+++ b/nixos/modules/config/gnu.nix
@@ -1,6 +1,6 @@
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
{
options = {
diff --git a/nixos/modules/config/i18n.nix b/nixos/modules/config/i18n.nix
index 310739aa170..dd5e0ae2550 100644
--- a/nixos/modules/config/i18n.nix
+++ b/nixos/modules/config/i18n.nix
@@ -1,6 +1,6 @@
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
let
diff --git a/nixos/modules/config/krb5.nix b/nixos/modules/config/krb5.nix
index 3323046ac5b..bb5a95ebc84 100644
--- a/nixos/modules/config/krb5.nix
+++ b/nixos/modules/config/krb5.nix
@@ -1,6 +1,6 @@
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
let
diff --git a/nixos/modules/config/ldap.nix b/nixos/modules/config/ldap.nix
index 113f5d8bcbd..8171f460385 100644
--- a/nixos/modules/config/ldap.nix
+++ b/nixos/modules/config/ldap.nix
@@ -1,6 +1,6 @@
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
with pkgs;
let
diff --git a/nixos/modules/config/networking.nix b/nixos/modules/config/networking.nix
index 9ac68b42819..43717697ebd 100644
--- a/nixos/modules/config/networking.nix
+++ b/nixos/modules/config/networking.nix
@@ -1,8 +1,8 @@
# /etc files related to networking, such as /etc/services.
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
let
diff --git a/nixos/modules/config/no-x-libs.nix b/nixos/modules/config/no-x-libs.nix
index ec7bf3fea7b..4b791c109d7 100644
--- a/nixos/modules/config/no-x-libs.nix
+++ b/nixos/modules/config/no-x-libs.nix
@@ -1,6 +1,6 @@
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
{
options = {
diff --git a/nixos/modules/config/nsswitch.nix b/nixos/modules/config/nsswitch.nix
index 2e2125d44f7..45695d9cb89 100644
--- a/nixos/modules/config/nsswitch.nix
+++ b/nixos/modules/config/nsswitch.nix
@@ -1,8 +1,8 @@
# Configuration for the Name Service Switch (/etc/nsswitch.conf).
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
let
diff --git a/nixos/modules/config/power-management.nix b/nixos/modules/config/power-management.nix
index c80b1ec3ddc..4984c0cd826 100644
--- a/nixos/modules/config/power-management.nix
+++ b/nixos/modules/config/power-management.nix
@@ -1,6 +1,6 @@
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
let
diff --git a/nixos/modules/config/pulseaudio.nix b/nixos/modules/config/pulseaudio.nix
index db4f1b43a11..eedc4ca2b2f 100644
--- a/nixos/modules/config/pulseaudio.nix
+++ b/nixos/modules/config/pulseaudio.nix
@@ -1,6 +1,6 @@
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
with pkgs;
let
diff --git a/nixos/modules/config/shells-environment.nix b/nixos/modules/config/shells-environment.nix
index 0b4f75a3521..9e212847e48 100644
--- a/nixos/modules/config/shells-environment.nix
+++ b/nixos/modules/config/shells-environment.nix
@@ -1,9 +1,9 @@
# This module defines a global environment configuration and
# a common configuration for all shells.
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
let
diff --git a/nixos/modules/config/swap.nix b/nixos/modules/config/swap.nix
index 65d7722abfa..427b2519cbd 100644
--- a/nixos/modules/config/swap.nix
+++ b/nixos/modules/config/swap.nix
@@ -1,6 +1,6 @@
-{ config, pkgs, utils, ... }:
+{ config, lib, pkgs, utils, ... }:
-with pkgs.lib;
+with lib;
with utils;
{
diff --git a/nixos/modules/config/sysctl.nix b/nixos/modules/config/sysctl.nix
index 8f9b31dccff..b4cd22caa79 100644
--- a/nixos/modules/config/sysctl.nix
+++ b/nixos/modules/config/sysctl.nix
@@ -1,12 +1,12 @@
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
let
sysctlOption = mkOptionType {
name = "sysctl option value";
- check = x: isBool x || isString x || isInt x;
+ check = x: isBool x || isString x || isInt x || isNull x;
merge = args: defs: (last defs).value; # FIXME: hacky way to allow overriding in configuration.nix.
};
@@ -29,8 +29,9 @@ in
8. Note that sysctl
parameters names must be enclosed in quotes
(e.g. "vm.swappiness" instead of
- vm.swappiness). The value of each parameter
- may be a string, integer or Boolean.
+ vm.swappiness). The value of each
+ parameter may be a string, integer, boolean, or null
+ (signifying the option will not appear at all).
'';
};
@@ -39,7 +40,9 @@ in
config = {
environment.etc."sysctl.d/nixos.conf".text =
- concatStrings (mapAttrsToList (n: v: "${n}=${if v == false then "0" else toString v}\n") config.boot.kernel.sysctl);
+ concatStrings (mapAttrsToList (n: v:
+ optionalString (v != null) "${n}=${if v == false then "0" else toString v}\n"
+ ) config.boot.kernel.sysctl);
systemd.services.systemd-sysctl =
{ description = "Apply Kernel Variables";
@@ -65,8 +68,9 @@ in
# Hide kernel pointers (e.g. in /proc/modules) for unprivileged
# users as these make it easier to exploit kernel vulnerabilities.
- boot.kernel.sysctl."kernel.kptr_restrict" = 1;
-
+ #
+ # Removed under grsecurity.
+ boot.kernel.sysctl."kernel.kptr_restrict" =
+ if config.security.grsecurity.enable then null else 1;
};
-
}
diff --git a/nixos/modules/config/system-path.nix b/nixos/modules/config/system-path.nix
index 2f61947c3bc..2ea998bbb63 100644
--- a/nixos/modules/config/system-path.nix
+++ b/nixos/modules/config/system-path.nix
@@ -1,9 +1,9 @@
# This module defines the packages that appear in
# /run/current-system/sw.
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
let
@@ -46,6 +46,7 @@ let
pkgs.rsync
pkgs.strace
pkgs.sysvtools
+ pkgs.su
pkgs.time
pkgs.usbutils
pkgs.utillinux
@@ -134,6 +135,10 @@ in
if [ -x $out/bin/glib-compile-schemas -a -w $out/share/glib-2.0/schemas ]; then
$out/bin/glib-compile-schemas $out/share/glib-2.0/schemas
fi
+
+ if [ -x $out/bin/update-desktop-database -a -w $out/share/applications ]; then
+ $out/bin/update-desktop-database $out/share/applications
+ fi
'';
};
diff --git a/nixos/modules/config/timezone.nix b/nixos/modules/config/timezone.nix
index 42fbe841d07..88aa7866c2b 100644
--- a/nixos/modules/config/timezone.nix
+++ b/nixos/modules/config/timezone.nix
@@ -1,6 +1,6 @@
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
{
options = {
diff --git a/nixos/modules/config/unix-odbc-drivers.nix b/nixos/modules/config/unix-odbc-drivers.nix
index 0f608469058..b725e6cae73 100644
--- a/nixos/modules/config/unix-odbc-drivers.nix
+++ b/nixos/modules/config/unix-odbc-drivers.nix
@@ -1,6 +1,6 @@
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
# unixODBC drivers (this solution is not perfect.. Because the user has to
# ask the admin to add a driver.. but it's simple and works
diff --git a/nixos/modules/config/users-groups.nix b/nixos/modules/config/users-groups.nix
index 2d9b941a2ca..8b8f6bd909e 100644
--- a/nixos/modules/config/users-groups.nix
+++ b/nixos/modules/config/users-groups.nix
@@ -1,12 +1,15 @@
-{pkgs, config, ...}:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
let
ids = config.ids;
cfg = config.users;
+ nonUidUsers = filterAttrs (n: u: u.createUser && u.uid == null) cfg.extraUsers;
+ nonGidGroups = filterAttrs (n: g: g.gid == null) cfg.extraGroups;
+
passwordDescription = ''
The options hashedPassword,
password and passwordFile
@@ -31,7 +34,10 @@ let
name = mkOption {
type = types.str;
- description = "The name of the user account. If undefined, the name of the attribute set will be used.";
+ description = ''
+ The name of the user account. If undefined, the name of the
+ attribute set will be used.
+ '';
};
description = mkOption {
@@ -46,8 +52,14 @@ let
};
uid = mkOption {
- type = with types; uniq int;
- description = "The account UID.";
+ type = with types; nullOr int;
+ default = null;
+ description = ''
+ The account UID. If the mutableUsers option
+ is false, the UID cannot be null. Otherwise, the UID might be
+ null, in which case a free UID is picked on activation (by the
+ useradd command).
+ '';
};
group = mkOption {
@@ -151,12 +163,21 @@ let
name = mkOption {
type = types.str;
- description = "The name of the group. If undefined, the name of the attribute set will be used.";
+ description = ''
+ The name of the group. If undefined, the name of the attribute set
+ will be used.
+ '';
};
gid = mkOption {
- type = with types; uniq int;
- description = "The GID of the group.";
+ type = with types; nullOr int;
+ default = null;
+ description = ''
+ The group GID. If the mutableUsers option
+ is false, the GID cannot be null. Otherwise, the GID might be
+ null, in which case a free GID is picked on activation (by the
+ groupadd command).
+ '';
};
members = mkOption {
@@ -218,13 +239,15 @@ let
groupFile = pkgs.writeText "group" (
concatStringsSep "\n" (map (g: mkGroupEntry g.name) (
- sortOn "gid" (attrValues cfg.extraGroups)
+ let f = g: g.gid != null; in
+ sortOn "gid" (filter f (attrValues cfg.extraGroups))
))
);
passwdFile = pkgs.writeText "passwd" (
concatStringsSep "\n" (map (u: mkPasswdEntry u.name) (
- sortOn "uid" (filter (u: u.createUser) (attrValues cfg.extraUsers))
+ let f = u: u.createUser && (u.uid != null); in
+ sortOn "uid" (filter f (attrValues cfg.extraUsers))
))
);
@@ -261,11 +284,11 @@ let
then builtins.trace "Duplicate ${idAttr} ${id}" { dup = true; acc = null; }
else { dup = false; acc = newAcc; }
) { dup = false; acc = {}; } (builtins.attrNames set)).dup;
- uidsAreUnique = idsAreUnique cfg.extraUsers "uid";
- gidsAreUnique = idsAreUnique cfg.extraGroups "gid";
-in
-{
+ uidsAreUnique = idsAreUnique (filterAttrs (n: u: u.uid != null) cfg.extraUsers) "uid";
+ gidsAreUnique = idsAreUnique (filterAttrs (n: g: g.gid != null) cfg.extraGroups) "gid";
+
+in {
###### interface
@@ -369,6 +392,7 @@ in
home = "/root";
shell = cfg.defaultUserShell;
group = "root";
+ extraGroups = [ "grsecurity" ];
hashedPassword = mkDefault config.security.initialRootPassword;
};
nobody = {
@@ -397,6 +421,7 @@ in
nixbld.gid = ids.gids.nixbld;
utmp.gid = ids.gids.utmp;
adm.gid = ids.gids.adm;
+ grsecurity.gid = ids.gids.grsecurity;
};
system.activationScripts.users =
@@ -424,16 +449,31 @@ in
}
fi
'';
- mkhome = n: u:
- let
- uid = toString u.uid;
- gid = toString ((getGroup u.group).gid);
- h = u.home;
- in ''
- test -a "${h}" || mkdir -p "${h}" || true
- test "$(stat -c %u "${h}")" = ${uid} || chown ${uid} "${h}" || true
- test "$(stat -c %g "${h}")" = ${gid} || chgrp ${gid} "${h}" || true
- '';
+ mkhome = n: u: ''
+ uid="$(id -u ${u.name})"
+ gid="$(id -g ${u.name})"
+ h="${u.home}"
+ test -a "$h" || mkdir -p "$h" || true
+ test "$(stat -c %u "$h")" = $uid || chown $uid "$h" || true
+ test "$(stat -c %g "$h")" = $gid || chgrp $gid "$h" || true
+ '';
+ groupadd = n: g: ''
+ if [ -z "$(getent group "${g.name}")" ]; then
+ echo "Adding group ${g.name}"
+ ${pkgs.shadow}/sbin/groupadd "${g.name}"
+ fi
+ '';
+ useradd = n: u: ''
+ if ! id "${u.name}" &>/dev/null; then
+ echo "Adding user ${u.name}"
+ ${pkgs.shadow}/sbin/useradd \
+ -g "${u.group}" \
+ -s "${u.shell}" \
+ -d "${u.home}" \
+ "${u.name}"
+ echo "${u.name}:x" | ${pkgs.shadow}/sbin/chpasswd -e
+ fi
+ '';
in stringAfter [ "etc" ] ''
touch /etc/group
touch /etc/passwd
@@ -441,6 +481,8 @@ in
VISUAL=${merger passwdFile} ${pkgs.shadow}/sbin/vipw &>/dev/null
${pkgs.shadow}/sbin/grpconv
${pkgs.shadow}/sbin/pwconv
+ ${concatStrings (mapAttrsToList groupadd nonGidGroups)}
+ ${concatStrings (mapAttrsToList useradd nonUidUsers)}
${concatStrings (mapAttrsToList mkhome mkhomeUsers)}
${concatStrings (mapAttrsToList setpw setpwUsers)}
'';
@@ -448,7 +490,17 @@ in
# for backwards compatibility
system.activationScripts.groups = stringAfter [ "users" ] "";
- assertions = [ { assertion = !cfg.enforceIdUniqueness || (uidsAreUnique && gidsAreUnique); message = "uids and gids must be unique!"; } ];
+ assertions = [
+ { assertion = !cfg.enforceIdUniqueness || (uidsAreUnique && gidsAreUnique);
+ message = "uids and gids must be unique!";
+ }
+ { assertion = cfg.mutableUsers || (nonUidUsers == {});
+ message = "When mutableUsers is false, no uid can be null";
+ }
+ { assertion = cfg.mutableUsers || (nonGidGroups == {});
+ message = "When mutableUsers is false, no gid can be null";
+ }
+ ];
};
diff --git a/nixos/modules/hardware/all-firmware.nix b/nixos/modules/hardware/all-firmware.nix
index 027dd827b4d..3820a95b12e 100644
--- a/nixos/modules/hardware/all-firmware.nix
+++ b/nixos/modules/hardware/all-firmware.nix
@@ -1,6 +1,6 @@
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
{
diff --git a/nixos/modules/hardware/cpu/amd-microcode.nix b/nixos/modules/hardware/cpu/amd-microcode.nix
index 5720a63834f..86a3df5da21 100644
--- a/nixos/modules/hardware/cpu/amd-microcode.nix
+++ b/nixos/modules/hardware/cpu/amd-microcode.nix
@@ -1,6 +1,6 @@
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
{
diff --git a/nixos/modules/hardware/cpu/intel-microcode.nix b/nixos/modules/hardware/cpu/intel-microcode.nix
index 9046ddf83bb..800c391b293 100644
--- a/nixos/modules/hardware/cpu/intel-microcode.nix
+++ b/nixos/modules/hardware/cpu/intel-microcode.nix
@@ -1,6 +1,6 @@
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
{
diff --git a/nixos/modules/hardware/network/b43.nix b/nixos/modules/hardware/network/b43.nix
index 03f81f92ef0..e63f2d04d1a 100644
--- a/nixos/modules/hardware/network/b43.nix
+++ b/nixos/modules/hardware/network/b43.nix
@@ -1,6 +1,6 @@
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
let kernelVersion = config.boot.kernelPackages.kernel.version; in
diff --git a/nixos/modules/hardware/opengl.nix b/nixos/modules/hardware/opengl.nix
index 603012cb109..485ac008dd8 100644
--- a/nixos/modules/hardware/opengl.nix
+++ b/nixos/modules/hardware/opengl.nix
@@ -39,8 +39,7 @@ in {
default = false;
description = ''
Make S3TC(S3 Texture Compression) via libtxc_dxtn available
- to OpenGL drivers. It is essential for many games to work
- with FOSS GPU drivers.
+ to OpenGL drivers instead of the patent-free S2TC replacement.
Using this library may require a patent license depending on your location.
'';
@@ -89,17 +88,25 @@ in {
else if elem "ati_unfree" cfg.videoDrivers then
"ln -sf ${kernelPackages.ati_drivers_x11} /run/opengl-driver"
else
+ let
+ lib_fun = p: p.buildEnv {
+ name = "mesa-drivers+txc-${p.mesa_drivers.version}";
+ paths = [
+ p.mesa_drivers
+ p.mesa_noglu # mainly for libGL
+ (if cfg.s3tcSupport then p.libtxc_dxtn else p.libtxc_dxtn_s2tc)
+ ];
+ };
+ in
''
- ${optionalString cfg.driSupport "ln -sf ${pkgs.mesa_drivers} /run/opengl-driver"}
+ ${optionalString cfg.driSupport "ln -sf ${lib_fun pkgs} /run/opengl-driver"}
${optionalString cfg.driSupport32Bit
- "ln -sf ${pkgs_i686.mesa_drivers} /run/opengl-driver-32"}
+ "ln -sf ${lib_fun pkgs_i686} /run/opengl-driver-32"}
''
);
environment.variables.LD_LIBRARY_PATH =
- [ "/run/opengl-driver/lib" "/run/opengl-driver-32/lib" ]
- ++ optional cfg.s3tcSupport "${pkgs.libtxc_dxtn}/lib"
- ++ optional (cfg.s3tcSupport && cfg.driSupport32Bit) "${pkgs_i686.libtxc_dxtn}/lib";
+ [ "/run/opengl-driver/lib" "/run/opengl-driver-32/lib" ];
boot.extraModulePackages =
optional (elem "nvidia" cfg.videoDrivers) kernelPackages.nvidia_x11 ++
diff --git a/nixos/modules/hardware/pcmcia.nix b/nixos/modules/hardware/pcmcia.nix
index 20684656750..d7d002ae6c8 100644
--- a/nixos/modules/hardware/pcmcia.nix
+++ b/nixos/modules/hardware/pcmcia.nix
@@ -1,6 +1,6 @@
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
let
diff --git a/nixos/modules/hardware/video/bumblebee.nix b/nixos/modules/hardware/video/bumblebee.nix
index 504da2cde85..f06139adc44 100644
--- a/nixos/modules/hardware/video/bumblebee.nix
+++ b/nixos/modules/hardware/video/bumblebee.nix
@@ -1,7 +1,7 @@
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
let kernel = config.boot.kernelPackages; in
-with pkgs.lib;
+with lib;
{
diff --git a/nixos/modules/installer/cd-dvd/channel.nix b/nixos/modules/installer/cd-dvd/channel.nix
index 9aca5b89d25..ca0e233f9e3 100644
--- a/nixos/modules/installer/cd-dvd/channel.nix
+++ b/nixos/modules/installer/cd-dvd/channel.nix
@@ -1,9 +1,9 @@
# Provide an initial copy of the NixOS channel so that the user
# doesn't need to run "nix-channel --update" first.
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
let
@@ -28,7 +28,7 @@ in
{
# Provide the NixOS/Nixpkgs sources in /etc/nixos. This is required
# for nixos-install.
- boot.postBootCommands =
+ boot.postBootCommands = mkAfter
''
if ! [ -e /var/lib/nixos/did-channel-init ]; then
echo "unpacking the NixOS/Nixpkgs sources..."
diff --git a/nixos/modules/installer/cd-dvd/installation-cd-base.nix b/nixos/modules/installer/cd-dvd/installation-cd-base.nix
index 07c054b391a..a120a01041b 100644
--- a/nixos/modules/installer/cd-dvd/installation-cd-base.nix
+++ b/nixos/modules/installer/cd-dvd/installation-cd-base.nix
@@ -1,9 +1,9 @@
# This module contains the basic configuration for building a NixOS
# installation CD.
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
{
imports =
@@ -29,8 +29,9 @@ with pkgs.lib;
boot.kernel.sysctl."vm.overcommit_memory" = "1";
# To speed up installation a little bit, include the complete stdenv
- # in the Nix store on the CD.
- isoImage.storeContents = [ pkgs.stdenv pkgs.busybox ];
+ # in the Nix store on the CD. Archive::Cpio is needed for the
+ # initrd builder.
+ isoImage.storeContents = [ pkgs.stdenv pkgs.busybox pkgs.perlPackages.ArchiveCpio ];
# EFI booting
isoImage.makeEfiBootable = true;
diff --git a/nixos/modules/installer/cd-dvd/installation-cd-graphical.nix b/nixos/modules/installer/cd-dvd/installation-cd-graphical.nix
index debf3e7db90..65aa1167089 100644
--- a/nixos/modules/installer/cd-dvd/installation-cd-graphical.nix
+++ b/nixos/modules/installer/cd-dvd/installation-cd-graphical.nix
@@ -1,9 +1,9 @@
# This module defines a NixOS installation CD that contains X11 and
# KDE 4.
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
{
imports = [ ./installation-cd-base.nix ../../profiles/graphical.nix ];
diff --git a/nixos/modules/installer/cd-dvd/iso-image.nix b/nixos/modules/installer/cd-dvd/iso-image.nix
index 00a9e91c733..00f5fae8434 100644
--- a/nixos/modules/installer/cd-dvd/iso-image.nix
+++ b/nixos/modules/installer/cd-dvd/iso-image.nix
@@ -2,9 +2,9 @@
# configuration. The derivation for the ISO image will be placed in
# config.system.build.isoImage.
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
let
diff --git a/nixos/modules/installer/cd-dvd/system-tarball-fuloong2f.nix b/nixos/modules/installer/cd-dvd/system-tarball-fuloong2f.nix
index 13ed95d4ceb..c274970c553 100644
--- a/nixos/modules/installer/cd-dvd/system-tarball-fuloong2f.nix
+++ b/nixos/modules/installer/cd-dvd/system-tarball-fuloong2f.nix
@@ -1,6 +1,6 @@
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
let
diff --git a/nixos/modules/installer/cd-dvd/system-tarball-pc.nix b/nixos/modules/installer/cd-dvd/system-tarball-pc.nix
index fcb96f7a24f..0357bf80196 100644
--- a/nixos/modules/installer/cd-dvd/system-tarball-pc.nix
+++ b/nixos/modules/installer/cd-dvd/system-tarball-pc.nix
@@ -1,9 +1,9 @@
# This module contains the basic configuration for building a NixOS
# tarball, that can directly boot, maybe using PXE or unpacking on a fs.
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
let
diff --git a/nixos/modules/installer/cd-dvd/system-tarball-sheevaplug.nix b/nixos/modules/installer/cd-dvd/system-tarball-sheevaplug.nix
index c3ced849001..1008bd5d3d0 100644
--- a/nixos/modules/installer/cd-dvd/system-tarball-sheevaplug.nix
+++ b/nixos/modules/installer/cd-dvd/system-tarball-sheevaplug.nix
@@ -1,9 +1,9 @@
# This module contains the basic configuration for building a NixOS
# tarball for the sheevaplug.
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
let
diff --git a/nixos/modules/installer/cd-dvd/system-tarball.nix b/nixos/modules/installer/cd-dvd/system-tarball.nix
index 8d678fba71f..eaecbe1381f 100644
--- a/nixos/modules/installer/cd-dvd/system-tarball.nix
+++ b/nixos/modules/installer/cd-dvd/system-tarball.nix
@@ -2,9 +2,9 @@
# configuration. The derivation for the ISO image will be placed in
# config.system.build.tarball.
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
let
diff --git a/nixos/modules/installer/scan/detected.nix b/nixos/modules/installer/scan/detected.nix
index 09d04608e68..f350cd986af 100644
--- a/nixos/modules/installer/scan/detected.nix
+++ b/nixos/modules/installer/scan/detected.nix
@@ -1,8 +1,8 @@
# List all devices which are detected by nixos-hardware-scan.
# Common devices are enabled by default.
-{config, pkgs, ...}:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
{
config = mkDefault {
diff --git a/nixos/modules/installer/scan/not-detected.nix b/nixos/modules/installer/scan/not-detected.nix
index 814858fdffd..b30c569ed2a 100644
--- a/nixos/modules/installer/scan/not-detected.nix
+++ b/nixos/modules/installer/scan/not-detected.nix
@@ -1,8 +1,8 @@
# List all devices which are _not_ detected by nixos-hardware-scan.
# Common devices are enabled by default.
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
{
hardware.enableAllFirmware = true;
diff --git a/nixos/modules/installer/tools/nixos-checkout.nix b/nixos/modules/installer/tools/nixos-checkout.nix
index 41899855686..3338e5119ac 100644
--- a/nixos/modules/installer/tools/nixos-checkout.nix
+++ b/nixos/modules/installer/tools/nixos-checkout.nix
@@ -1,9 +1,9 @@
# This module generates the nixos-checkout script, which replaces the
# Nixpkgs source trees in /etc/nixos/nixpkgs with a Git checkout.
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
let
diff --git a/nixos/modules/installer/tools/nixos-generate-config.pl b/nixos/modules/installer/tools/nixos-generate-config.pl
index d42c4c1f1dc..da1d2688277 100644
--- a/nixos/modules/installer/tools/nixos-generate-config.pl
+++ b/nixos/modules/installer/tools/nixos-generate-config.pl
@@ -96,9 +96,9 @@ my $videoDriver;
sub pciCheck {
my $path = shift;
- my $vendor = read_file "$path/vendor";
- my $device = read_file "$path/device";
- my $class = read_file "$path/class";
+ my $vendor = read_file "$path/vendor"; chomp $vendor;
+ my $device = read_file "$path/device"; chomp $device;
+ my $class = read_file "$path/class"; chomp $class;
my $module;
if (-e "$path/driver/module") {
@@ -130,6 +130,7 @@ sub pciCheck {
# broadcom STA driver (wl.ko)
# list taken from http://www.broadcom.com/docs/linux_sta/README.txt
+ # FIXME: still needed?
if ($vendor eq "0x14e4" &&
($device eq "0x4311" || $device eq "0x4312" || $device eq "0x4313" ||
$device eq "0x4315" || $device eq "0x4327" || $device eq "0x4328" ||
@@ -156,6 +157,7 @@ sub pciCheck {
# Assume that all NVIDIA cards are supported by the NVIDIA driver.
# There may be exceptions (e.g. old cards).
+ # FIXME: do we want to enable an unfree driver here?
$videoDriver = "nvidia" if $vendor eq "0x10de" && $class =~ /^0x03/;
}
@@ -170,9 +172,9 @@ push @attrs, "hardware.opengl.videoDrivers = [ \"$videoDriver\" ];" if $videoDri
sub usbCheck {
my $path = shift;
- my $class = read_file "$path/bInterfaceClass";
- my $subclass = read_file "$path/bInterfaceSubClass";
- my $protocol = read_file "$path/bInterfaceProtocol";
+ my $class = read_file "$path/bInterfaceClass"; chomp $class;
+ my $subclass = read_file "$path/bInterfaceSubClass"; chomp $subclass;
+ my $protocol = read_file "$path/bInterfaceProtocol"; chomp $protocol;
my $module;
if (-e "$path/driver/module") {
diff --git a/nixos/modules/installer/tools/nixos-rebuild.sh b/nixos/modules/installer/tools/nixos-rebuild.sh
index 2a1c397553b..2d137dd52ad 100644
--- a/nixos/modules/installer/tools/nixos-rebuild.sh
+++ b/nixos/modules/installer/tools/nixos-rebuild.sh
@@ -1,4 +1,6 @@
-#! @shell@ -e
+#! @shell@
+
+set -e
showSyntax() {
exec man nixos-rebuild
@@ -7,6 +9,7 @@ showSyntax() {
# Parse the command line.
+origArgs=("$@")
extraBuildFlags=()
action=
buildNix=1
@@ -76,8 +79,30 @@ done
if [ -z "$action" ]; then showSyntax; fi
-if [ -n "$rollback" ]; then
- buildNix=
+# Only run shell scripts from the Nixpkgs tree if the action is
+# "switch", "boot", or "test". With other actions (such as "build"),
+# the user may reasonably expect that no code from the Nixpkgs tree is
+# executed, so it's safe to run nixos-rebuild against a potentially
+# untrusted tree.
+canRun=
+if [ "$action" = switch -o "$action" = boot -o "$action" = test ]; then
+ canRun=1
+fi
+
+
+# If ‘--upgrade’ is given, run ‘nix-channel --update nixos’.
+if [ -n "$upgrade" -a -z "$_NIXOS_REBUILD_REEXEC" ]; then
+ nix-channel --update nixos
+fi
+
+
+# Re-execute nixos-rebuild from the Nixpkgs tree.
+if [ -z "$_NIXOS_REBUILD_REEXEC" -a -n "$canRun" ]; then
+ if p=$(nix-instantiate --find-file nixpkgs/nixos/modules/installer/tools/nixos-rebuild.sh "${extraBuildFlags[@]}"); then
+ export _NIXOS_REBUILD_REEXEC=1
+ exec $SHELL -e $p "${origArgs[@]}"
+ exit 1
+ fi
fi
@@ -98,20 +123,33 @@ if [ -z "$repair" ] && systemctl show nix-daemon.socket nix-daemon.service | gre
fi
-# If ‘--upgrade’ is given, run ‘nix-channel --update nixos’.
-if [ -n "$upgrade" ]; then
- nix-channel --update nixos
+# First build Nix, since NixOS may require a newer version than the
+# current one.
+if [ -n "$rollback" -o "$action" = dry-run ]; then
+ buildNix=
fi
-
-# First build Nix, since NixOS may require a newer version than the
-# current one. Of course, the same goes for Nixpkgs, but Nixpkgs is
-# more conservative.
-if [ "$action" != dry-run -a -n "$buildNix" ]; then
+if [ -n "$buildNix" ]; then
echo "building Nix..." >&2
if ! nix-build '' -A config.nix.package -o $tmpDir/nix "${extraBuildFlags[@]}" > /dev/null; then
if ! nix-build '' -A nixFallback -o $tmpDir/nix "${extraBuildFlags[@]}" > /dev/null; then
- nix-build '' -A nixUnstable -o $tmpDir/nix "${extraBuildFlags[@]}" > /dev/null
+ if ! nix-build '' -A nix -o $tmpDir/nix "${extraBuildFlags[@]}" > /dev/null; then
+ machine="$(uname -m)"
+ if [ "$machine" = x86_64 ]; then
+ nixStorePath=/nix/store/d34q3q2zj9nriq4ifhn3dnnngqvinjb3-nix-1.7
+ elif [[ "$machine" =~ i.86 ]]; then
+ nixStorePath=/nix/store/qlah0darpcn6sf3lr2226rl04l1gn4xz-nix-1.7
+ else
+ echo "$0: unsupported platform"
+ exit 1
+ fi
+ if ! nix-store -r $nixStorePath --add-root $tmpDir/nix --indirect \
+ --option extra-binary-caches http://cache.nixos.org/; then
+ echo "warning: don't know how to get latest Nix" >&2
+ fi
+ # Older version of nix-store -r don't support --add-root.
+ [ -e $tmpDir/nix ] || ln -sf $nixStorePath $tmpDir/nix
+ fi
fi
fi
PATH=$tmpDir/nix/bin:$PATH
@@ -120,10 +158,12 @@ fi
# Update the version suffix if we're building from Git (so that
# nixos-version shows something useful).
-if nixpkgs=$(nix-instantiate --find-file nixpkgs "${extraBuildFlags[@]}"); then
- suffix=$(@shell@ $nixpkgs/nixos/modules/installer/tools/get-version-suffix "${extraBuildFlags[@]}" || true)
- if [ -n "$suffix" ]; then
- echo -n "$suffix" > "$nixpkgs/.version-suffix" || true
+if [ -n "$canRun" ]; then
+ if nixpkgs=$(nix-instantiate --find-file nixpkgs "${extraBuildFlags[@]}"); then
+ suffix=$($SHELL $nixpkgs/nixos/modules/installer/tools/get-version-suffix "${extraBuildFlags[@]}" || true)
+ if [ -n "$suffix" ]; then
+ echo -n "$suffix" > "$nixpkgs/.version-suffix" || true
+ fi
fi
fi
diff --git a/nixos/modules/installer/tools/tools.nix b/nixos/modules/installer/tools/tools.nix
index 652bfa917df..7dbcc261485 100644
--- a/nixos/modules/installer/tools/tools.nix
+++ b/nixos/modules/installer/tools/tools.nix
@@ -80,9 +80,9 @@ in
/*
options = {
- installer.enableGraphicalTools = pkgs.lib.mkOption {
+ installer.enableGraphicalTools = mkOption {
default = false;
- type = with pkgs.lib.types; bool;
+ type = types.bool;
example = true;
description = ''
Enable the installation of graphical tools.
diff --git a/nixos/modules/installer/virtualbox-demo.nix b/nixos/modules/installer/virtualbox-demo.nix
index 9ef41e47074..0a52cbea289 100644
--- a/nixos/modules/installer/virtualbox-demo.nix
+++ b/nixos/modules/installer/virtualbox-demo.nix
@@ -1,6 +1,6 @@
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
{
imports =
diff --git a/nixos/modules/misc/assertions.nix b/nixos/modules/misc/assertions.nix
index 5fb88308b77..786ec7d250c 100644
--- a/nixos/modules/misc/assertions.nix
+++ b/nixos/modules/misc/assertions.nix
@@ -1,6 +1,6 @@
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
let
diff --git a/nixos/modules/misc/check-config.nix b/nixos/modules/misc/check-config.nix
index f759c88d3a1..e9803de2196 100644
--- a/nixos/modules/misc/check-config.nix
+++ b/nixos/modules/misc/check-config.nix
@@ -1,6 +1,6 @@
-{ pkgs, ... }:
+{ lib, ... }:
-with pkgs.lib;
+with lib;
{
options = {
diff --git a/nixos/modules/misc/crashdump.nix b/nixos/modules/misc/crashdump.nix
index 6e71baa9a43..d68f38bae2f 100644
--- a/nixos/modules/misc/crashdump.nix
+++ b/nixos/modules/misc/crashdump.nix
@@ -1,6 +1,6 @@
-{pkgs, config, ...}:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
let
crashdump = config.boot.crashDump;
diff --git a/nixos/modules/misc/ids.nix b/nixos/modules/misc/ids.nix
index 9c413e36d56..2d9ea1450ff 100644
--- a/nixos/modules/misc/ids.nix
+++ b/nixos/modules/misc/ids.nix
@@ -123,6 +123,14 @@
ngircd = 112;
btsync = 113;
minecraft = 114;
+ monetdb = 115;
+ rippled = 116;
+ murmur = 117;
+ foundationdb = 118;
+ newrelic = 119;
+ starbound = 120;
+ hydra = 122;
+ spiped = 123;
# When adding a uid, make sure it doesn't match an existing gid.
@@ -221,6 +229,13 @@
jenkins = 109;
systemd-journal-gateway = 110;
notbit = 111;
+ monetdb = 115;
+ foundationdb = 118;
+ newrelic = 119;
+ starbound = 120;
+ grsecurity = 121;
+ hydra = 122;
+ spiped = 123;
# When adding a gid, make sure it doesn't match an existing uid.
diff --git a/nixos/modules/misc/locate.nix b/nixos/modules/misc/locate.nix
index b6408be5844..45da0df7967 100644
--- a/nixos/modules/misc/locate.nix
+++ b/nixos/modules/misc/locate.nix
@@ -1,6 +1,6 @@
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
let
diff --git a/nixos/modules/misc/nixpkgs.nix b/nixos/modules/misc/nixpkgs.nix
index 7433fab168e..a5dad7dd907 100644
--- a/nixos/modules/misc/nixpkgs.nix
+++ b/nixos/modules/misc/nixpkgs.nix
@@ -1,6 +1,6 @@
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
let
isConfig = x:
diff --git a/nixos/modules/misc/version.nix b/nixos/modules/misc/version.nix
index ae9fb5fb2a0..67bafac4c45 100644
--- a/nixos/modules/misc/version.nix
+++ b/nixos/modules/misc/version.nix
@@ -1,6 +1,6 @@
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
{
diff --git a/nixos/modules/module-list.nix b/nixos/modules/module-list.nix
index 652a99e7c5a..5c30d74be69 100644
--- a/nixos/modules/module-list.nix
+++ b/nixos/modules/module-list.nix
@@ -62,6 +62,7 @@
./security/apparmor-suid.nix
./security/ca.nix
./security/duosec.nix
+ ./security/grsecurity.nix
./security/pam.nix
./security/pam_usb.nix
./security/polkit.nix
@@ -95,6 +96,16 @@
./services/databases/openldap.nix
./services/databases/postgresql.nix
./services/databases/virtuoso.nix
+ ./services/databases/monetdb.nix
+ ./services/desktops/accountservice.nix
+ ./services/desktops/gnome3/at-spi2-core.nix
+ ./services/desktops/gnome3/evolution-data-server.nix
+ ./services/desktops/gnome3/gnome-keyring.nix
+ ./services/desktops/gnome3/gnome-online-accounts.nix
+ ./services/desktops/gnome3/gnome-user-share.nix
+ ./services/desktops/gnome3/sushi.nix
+ ./services/desktops/gnome3/tracker.nix
+ ./services/desktops/telepathy.nix
./services/games/ghost-one.nix
./services/games/minecraft-server.nix
./services/hardware/acpid.nix
@@ -132,6 +143,7 @@
./services/misc/nix-gc.nix
./services/misc/nix-ssh-serve.nix
./services/misc/nixos-manual.nix
+ ./services/misc/rippled.nix
./services/misc/rogue.nix
./services/misc/svnserve.nix
./services/misc/synergy.nix
@@ -151,12 +163,14 @@
./services/network-filesystems/drbd.nix
./services/network-filesystems/nfsd.nix
./services/network-filesystems/openafs-client/default.nix
+ ./services/network-filesystems/rsyncd.nix
./services/network-filesystems/samba.nix
./services/networking/amuled.nix
./services/networking/avahi-daemon.nix
./services/networking/bind.nix
./services/networking/bitlbee.nix
./services/networking/btsync.nix
+ ./services/networking/cjdns.nix
./services/networking/connman.nix
./services/networking/cntlm.nix
./services/networking/chrony.nix
@@ -180,6 +194,7 @@
./services/networking/ircd-hybrid/default.nix
./services/networking/kippo.nix
./services/networking/minidlna.nix
+ ./services/networking/murmur.nix
./services/networking/nat.nix
./services/networking/networkmanager.nix
./services/networking/ngircd.nix
@@ -197,7 +212,9 @@
./services/networking/rpcbind.nix
./services/networking/sabnzbd.nix
./services/networking/searx.nix
+ ./services/networking/spiped.nix
./services/networking/supybot.nix
+ ./services/networking/syncthing.nix
./services/networking/ssh/lshd.nix
./services/networking/ssh/sshd.nix
./services/networking/tftpd.nix
@@ -297,6 +314,7 @@
./tasks/scsi-link-power-management.nix
./tasks/swraid.nix
./testing/service-runner.nix
+ ./virtualisation/container-config.nix
./virtualisation/containers.nix
./virtualisation/libvirtd.nix
#./virtualisation/nova.nix
diff --git a/nixos/modules/profiles/clone-config.nix b/nixos/modules/profiles/clone-config.nix
index 04ee76d8d3e..f0d60bb6c42 100644
--- a/nixos/modules/profiles/clone-config.nix
+++ b/nixos/modules/profiles/clone-config.nix
@@ -1,6 +1,6 @@
-{ config, pkgs, modules, ... }:
+{ config, lib, pkgs, modules, ... }:
-with pkgs.lib;
+with lib;
let
diff --git a/nixos/modules/profiles/headless.nix b/nixos/modules/profiles/headless.nix
index 541c46ca50c..14fc905f783 100644
--- a/nixos/modules/profiles/headless.nix
+++ b/nixos/modules/profiles/headless.nix
@@ -1,9 +1,9 @@
# Common configuration for headless machines (e.g., Amazon EC2
# instances).
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
{
sound.enable = false;
diff --git a/nixos/modules/profiles/installation-device.nix b/nixos/modules/profiles/installation-device.nix
index 3b058c6e971..5aab2a2954e 100644
--- a/nixos/modules/profiles/installation-device.nix
+++ b/nixos/modules/profiles/installation-device.nix
@@ -1,7 +1,7 @@
# Provide a basic configuration for installation devices like CDs.
-{ config, pkgs, modules, ... }:
+{ config, lib, ... }:
-with pkgs.lib;
+with lib;
{
imports =
@@ -45,7 +45,7 @@ with pkgs.lib;
# Enable wpa_supplicant, but don't start it by default.
networking.wireless.enable = true;
- jobs.wpa_supplicant.startOn = pkgs.lib.mkOverride 50 "";
+ jobs.wpa_supplicant.startOn = mkOverride 50 "";
# Tell the Nix evaluator to garbage collect more aggressively.
# This is desirable in memory-constrained environments that don't
diff --git a/nixos/modules/programs/atop.nix b/nixos/modules/programs/atop.nix
index 7fdaab9d67d..e457db22333 100644
--- a/nixos/modules/programs/atop.nix
+++ b/nixos/modules/programs/atop.nix
@@ -1,8 +1,8 @@
# Global configuration for atop.
-{config, pkgs, ...}:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
let cfg = config.programs.atop;
diff --git a/nixos/modules/programs/bash/bash.nix b/nixos/modules/programs/bash/bash.nix
index 9d33e26c495..9584f07b094 100644
--- a/nixos/modules/programs/bash/bash.nix
+++ b/nixos/modules/programs/bash/bash.nix
@@ -1,9 +1,9 @@
# This module defines global configuration for the Bash shell, in
# particular /etc/bashrc and /etc/profile.
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
let
diff --git a/nixos/modules/programs/bash/command-not-found.nix b/nixos/modules/programs/bash/command-not-found.nix
index 502320446a3..8c86d48b080 100644
--- a/nixos/modules/programs/bash/command-not-found.nix
+++ b/nixos/modules/programs/bash/command-not-found.nix
@@ -3,9 +3,9 @@
# SQLite database that maps program names to Nix package names (e.g.,
# "pdflatex" is mapped to "tetex").
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
let
diff --git a/nixos/modules/programs/environment.nix b/nixos/modules/programs/environment.nix
index 489a7a4d269..831c04f1ad8 100644
--- a/nixos/modules/programs/environment.nix
+++ b/nixos/modules/programs/environment.nix
@@ -2,9 +2,9 @@
# Most of the stuff here should probably be moved elsewhere sometime.
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
let
diff --git a/nixos/modules/programs/shadow.nix b/nixos/modules/programs/shadow.nix
index 15b083b72d2..a2435099499 100644
--- a/nixos/modules/programs/shadow.nix
+++ b/nixos/modules/programs/shadow.nix
@@ -1,8 +1,8 @@
# Configuration for the pwdutils suite of tools: passwd, useradd, etc.
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
let
diff --git a/nixos/modules/programs/shell.nix b/nixos/modules/programs/shell.nix
index 226105a0c97..80d40a7c708 100644
--- a/nixos/modules/programs/shell.nix
+++ b/nixos/modules/programs/shell.nix
@@ -1,8 +1,8 @@
# This module defines a standard configuration for NixOS shells.
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
let
diff --git a/nixos/modules/programs/ssh.nix b/nixos/modules/programs/ssh.nix
index a66679dff90..27db667e440 100644
--- a/nixos/modules/programs/ssh.nix
+++ b/nixos/modules/programs/ssh.nix
@@ -1,8 +1,8 @@
# Global configuration for the SSH client.
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
let cfg = config.programs.ssh;
cfgd = config.services.openssh;
@@ -31,7 +31,7 @@ in
setXAuthLocation = mkOption {
type = types.bool;
- default = true;
+ default = config.services.xserver.enable;
description = ''
Whether to set the path to xauth for X11-forwarded connections.
This causes a dependency on X11 packages.
diff --git a/nixos/modules/programs/ssmtp.nix b/nixos/modules/programs/ssmtp.nix
index 904989d57a0..34eafd4fa84 100644
--- a/nixos/modules/programs/ssmtp.nix
+++ b/nixos/modules/programs/ssmtp.nix
@@ -3,9 +3,9 @@
# directly to an SMTP server defined in its configuration file, wihout
# queueing mail locally.
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
let
diff --git a/nixos/modules/programs/venus.nix b/nixos/modules/programs/venus.nix
index 7ab653dd19f..2b70a795f4f 100644
--- a/nixos/modules/programs/venus.nix
+++ b/nixos/modules/programs/venus.nix
@@ -1,6 +1,6 @@
-{config, pkgs, ...}:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
let
cfg = config.services.venus;
diff --git a/nixos/modules/programs/virtualbox.nix b/nixos/modules/programs/virtualbox.nix
index 340fec0496a..10e657abd3c 100644
--- a/nixos/modules/programs/virtualbox.nix
+++ b/nixos/modules/programs/virtualbox.nix
@@ -1,6 +1,6 @@
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
let virtualbox = config.boot.kernelPackages.virtualbox; in
diff --git a/nixos/modules/programs/wvdial.nix b/nixos/modules/programs/wvdial.nix
index da3f7dce98a..8e7d0e51a4e 100644
--- a/nixos/modules/programs/wvdial.nix
+++ b/nixos/modules/programs/wvdial.nix
@@ -1,8 +1,8 @@
# Global configuration for wvdial.
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
let
diff --git a/nixos/modules/programs/zsh/zsh.nix b/nixos/modules/programs/zsh/zsh.nix
index 69a56ff69a0..7bcf8da2c65 100644
--- a/nixos/modules/programs/zsh/zsh.nix
+++ b/nixos/modules/programs/zsh/zsh.nix
@@ -1,8 +1,8 @@
# This module defines global configuration for the zshell.
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
let
diff --git a/nixos/modules/rename.nix b/nixos/modules/rename.nix
index 72093aab5cd..aa3cefdcad1 100644
--- a/nixos/modules/rename.nix
+++ b/nixos/modules/rename.nix
@@ -1,6 +1,6 @@
-{ config, pkgs, options, ... }:
+{ config, lib, options, ... }:
-with pkgs.lib;
+with lib;
let
diff --git a/nixos/modules/security/apparmor-suid.nix b/nixos/modules/security/apparmor-suid.nix
index bc661164fdc..b89b379ae66 100644
--- a/nixos/modules/security/apparmor-suid.nix
+++ b/nixos/modules/security/apparmor-suid.nix
@@ -1,8 +1,8 @@
-{pkgs, config, ...}:
+{ config, lib, pkgs, ... }:
let
cfg = config.security.apparmor;
in
-with pkgs.lib;
+with lib;
{
options.security.apparmor.confineSUIDApplications = mkOption {
diff --git a/nixos/modules/security/apparmor.nix b/nixos/modules/security/apparmor.nix
index b9f15159002..da7c93beee9 100644
--- a/nixos/modules/security/apparmor.nix
+++ b/nixos/modules/security/apparmor.nix
@@ -1,55 +1,39 @@
-{pkgs, config, ...}:
+{ config, lib, pkgs, ... }:
+
+with lib;
let
cfg = config.security.apparmor;
in
-
-with pkgs.lib;
-
{
-
- ###### interface
-
options = {
-
security.apparmor = {
-
enable = mkOption {
type = types.bool;
default = false;
- description = ''
- Enable AppArmor application security system. Enable only if
- you want to further improve AppArmor.
- '';
+ description = "Enable the AppArmor Mandatory Access Control system.";
};
profiles = mkOption {
type = types.listOf types.path;
default = [];
- description = ''
- List of file names of AppArmor profiles.
- '';
+ description = "List of files containing AppArmor profiles.";
};
-
};
};
-
- ###### implementation
-
- config = mkIf (cfg.enable) {
-
- assertions = [ { assertion = config.boot.kernelPackages.kernel.features ? apparmor
- && config.boot.kernelPackages.kernel.features.apparmor;
- message = "AppArmor is enabled, but the kernel doesn't have AppArmor support"; }
- ];
+ config = mkIf cfg.enable {
+ assertions =
+ [ { assertion = config.boot.kernelPackages.kernel.features ? apparmor
+ && config.boot.kernelPackages.kernel.features.apparmor;
+ message = "Your selected kernel does not have AppArmor support";
+ }
+ ];
environment.systemPackages = [ pkgs.apparmor ];
-
systemd.services.apparmor = {
- #wantedBy = [ "basic.target" ];
wantedBy = [ "local-fs.target" ];
- path = [ pkgs.apparmor ];
+ path = [ pkgs.apparmor ];
serviceConfig = {
Type = "oneshot";
@@ -61,9 +45,6 @@ with pkgs.lib;
''${pkgs.apparmor}/sbin/apparmor_parser -Rv -I ${pkgs.apparmor}/etc/apparmor.d/ "${profile}" ; ''
) cfg.profiles;
};
-
};
-
};
-
}
diff --git a/nixos/modules/security/ca.nix b/nixos/modules/security/ca.nix
index 05cd1c3ecc1..f159e359f96 100644
--- a/nixos/modules/security/ca.nix
+++ b/nixos/modules/security/ca.nix
@@ -1,6 +1,6 @@
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
{
diff --git a/nixos/modules/security/duosec.nix b/nixos/modules/security/duosec.nix
index 989bd13d101..bd961138482 100644
--- a/nixos/modules/security/duosec.nix
+++ b/nixos/modules/security/duosec.nix
@@ -1,6 +1,6 @@
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
let
cfg = config.security.duosec;
diff --git a/nixos/modules/security/grsecurity.nix b/nixos/modules/security/grsecurity.nix
new file mode 100644
index 00000000000..90462a2d6d0
--- /dev/null
+++ b/nixos/modules/security/grsecurity.nix
@@ -0,0 +1,443 @@
+{ config, lib, pkgs, ... }:
+
+with lib;
+
+let
+ cfg = config.security.grsecurity;
+
+ mkKernel = kernel: patch:
+ assert patch.kversion == kernel.version;
+ { inherit kernel patch;
+ inherit (patch) grversion revision;
+ };
+
+ stable-patch = with pkgs.kernelPatches;
+ if cfg.vserver then grsecurity_vserver else grsecurity_stable;
+ stableKernel = mkKernel pkgs.linux_3_2 stable-patch;
+ testKernel = mkKernel pkgs.linux_3_13 pkgs.kernelPatches.grsecurity_unstable;
+
+ ## -- grsecurity configuration -----------------------------------------------
+
+ grsecPrioCfg =
+ if cfg.config.priority == "security" then
+ "GRKERNSEC_CONFIG_PRIORITY_SECURITY y"
+ else
+ "GRKERNSEC_CONFIG_PRIORITY_PERF y";
+
+ grsecSystemCfg =
+ if cfg.config.system == "desktop" then
+ "GRKERNSEC_CONFIG_DESKTOP y"
+ else
+ "GRKERNSEC_CONFIG_SERVER y";
+
+ grsecVirtCfg =
+ if cfg.config.virtualisationConfig == "none" then
+ "GRKERNSEC_CONFIG_VIRT_NONE y"
+ else if cfg.config.virtualisationConfig == "host" then
+ "GRKERNSEC_CONFIG_VIRT_HOST y"
+ else
+ "GRKERNSEC_CONFIG_VIRT_GUEST y";
+
+ grsecHwvirtCfg = if cfg.config.virtualisationConfig == "none" then "" else
+ if cfg.config.hardwareVirtualisation == true then
+ "GRKERNSEC_CONFIG_VIRT_EPT y"
+ else
+ "GRKERNSEC_CONFIG_VIRT_SOFT y";
+
+ grsecVirtswCfg =
+ let virtCfg = opt: "GRKERNSEC_CONFIG_VIRT_"+opt+" y";
+ in
+ if cfg.config.virtualisationConfig == "none" then ""
+ else if cfg.config.virtualisationSoftware == "xen" then virtCfg "XEN"
+ else if cfg.config.virtualisationSoftware == "kvm" then virtCfg "KVM"
+ else if cfg.config.virtualisationSoftware == "vmware" then virtCfg "VMWARE"
+ else virtCfg "VIRTUALBOX";
+
+ grsecMainConfig = if cfg.config.mode == "custom" then "" else ''
+ GRKERNSEC_CONFIG_AUTO y
+ ${grsecPrioCfg}
+ ${grsecSystemCfg}
+ ${grsecVirtCfg}
+ ${grsecHwvirtCfg}
+ ${grsecVirtswCfg}
+ '';
+
+ grsecConfig =
+ let boolToKernOpt = b: if b then "y" else "n";
+ # Disable RANDSTRUCT under virtualbox, as it has some kind of
+ # breakage with the vbox guest drivers
+ randstruct = optionalString config.services.virtualbox.enable
+ "GRKERNSEC_RANDSTRUCT n";
+ # Disable restricting links under the testing kernel, as something
+ # has changed causing it to fail miserably during boot.
+ restrictLinks = optionalString cfg.testing
+ "GRKERNSEC_LINK n";
+ in ''
+ SECURITY_APPARMOR y
+ DEFAULT_SECURITY_APPARMOR y
+ GRKERNSEC y
+ ${grsecMainConfig}
+
+ ${if cfg.config.restrictProc then
+ "GRKERNSEC_PROC_USER y"
+ else
+ optionalString cfg.config.restrictProcWithGroup ''
+ GRKERNSEC_PROC_USERGROUP y
+ GRKERNSEC_PROC_GID ${toString cfg.config.unrestrictProcGid}
+ ''
+ }
+
+ GRKERNSEC_SYSCTL ${boolToKernOpt cfg.config.sysctl}
+ GRKERNSEC_CHROOT_CHMOD ${boolToKernOpt cfg.config.denyChrootChmod}
+ GRKERNSEC_NO_RBAC ${boolToKernOpt cfg.config.disableRBAC}
+ ${randstruct}
+ ${restrictLinks}
+
+ ${cfg.config.kernelExtraConfig}
+ '';
+
+ ## -- grsecurity kernel packages ---------------------------------------------
+
+ localver = grkern:
+ "-grsec" + optionalString cfg.config.verboseVersion
+ "-${grkern.grversion}-${grkern.revision}";
+
+ grsecurityOverrider = args: grkern: {
+ # Apparently as of gcc 4.6, gcc-plugin headers (which are needed by PaX plugins)
+ # include libgmp headers, so we need these extra tweaks
+ buildInputs = args.buildInputs ++ [ pkgs.gmp ];
+ preConfigure = ''
+ ${args.preConfigure or ""}
+ sed -i 's|-I|-I${pkgs.gmp}/include -I|' scripts/gcc-plugin.sh
+ sed -i 's|HOST_EXTRACFLAGS +=|HOST_EXTRACFLAGS += -I${pkgs.gmp}/include|' tools/gcc/Makefile
+ sed -i 's|HOST_EXTRACXXFLAGS +=|HOST_EXTRACXXFLAGS += -I${pkgs.gmp}/include|' tools/gcc/Makefile
+ rm localversion-grsec
+ echo ${localver grkern} > localversion-grsec
+ '';
+ };
+
+ mkGrsecPkg = grkern:
+ let kernelPkg = lowPrio (overrideDerivation (grkern.kernel.override (args: {
+ kernelPatches = args.kernelPatches ++ [ grkern.patch pkgs.kernelPatches.grsec_fix_path ];
+ argsOverride = {
+ modDirVersion = "${grkern.kernel.modDirVersion}${localver grkern}";
+ };
+ extraConfig = grsecConfig;
+ })) (args: grsecurityOverrider args grkern));
+ in pkgs.linuxPackagesFor kernelPkg (mkGrsecPkg grkern);
+
+ grsecPackage = mkGrsecPkg (if cfg.stable then stableKernel else testKernel);
+in
+{
+ options = {
+ security.grsecurity = {
+ enable = mkOption {
+ type = types.bool;
+ default = false;
+ description = ''
+ Enable grsecurity support. This enables advanced exploit
+ hardening for the Linux kernel, and adds support for
+ administrative Role-Based Acess Control (RBAC) via
+ gradm. It also includes traditional
+ utilities for PaX.
+ '';
+ };
+
+ stable = mkOption {
+ type = types.bool;
+ default = false;
+ description = ''
+ Enable the stable grsecurity patch, based on Linux 3.2.
+ '';
+ };
+
+ vserver = mkOption {
+ type = types.bool;
+ default = false;
+ description = ''
+ Enable the stable grsecurity/vserver patches, based on Linux 3.2.
+ '';
+ };
+
+ testing = mkOption {
+ type = types.bool;
+ default = false;
+ description = ''
+ Enable the testing grsecurity patch, based on Linux 3.13.
+ '';
+ };
+
+ config = {
+ mode = mkOption {
+ type = types.str;
+ default = "auto";
+ example = "custom";
+ description = ''
+ grsecurity configuration mode. This specifies whether
+ grsecurity is auto-configured or otherwise completely
+ manually configured. Can either by
+ custom or auto.
+
+ auto is recommended.
+ '';
+ };
+
+ priority = mkOption {
+ type = types.str;
+ default = "security";
+ example = "performance";
+ description = ''
+ grsecurity configuration priority. This specifies whether
+ the kernel configuration should emphasize speed or
+ security. Can either by security or
+ performance.
+ '';
+ };
+
+ system = mkOption {
+ type = types.str;
+ default = "";
+ example = "desktop";
+ description = ''
+ grsecurity system configuration. This specifies whether
+ the kernel configuration should be suitable for a Desktop
+ or a Server. Can either by server or
+ desktop.
+ '';
+ };
+
+ virtualisationConfig = mkOption {
+ type = types.str;
+ default = "none";
+ example = "host";
+ description = ''
+ grsecurity virtualisation configuration. This specifies
+ the virtualisation role of the machine - that is, whether
+ it will be a virtual machine guest, a virtual machine
+ host, or neither. Can be one of none,
+ host, or guest.
+ '';
+ };
+
+ hardwareVirtualisation = mkOption {
+ type = types.nullOr types.bool;
+ default = null;
+ example = true;
+ description = ''
+ grsecurity hardware virtualisation configuration. Set to
+ true if your machine supports hardware
+ accelerated virtualisation.
+ '';
+ };
+
+ virtualisationSoftware = mkOption {
+ type = types.str;
+ default = "";
+ example = "kvm";
+ description = ''
+ grsecurity virtualisation software. Set this to the
+ specified virtual machine technology if the machine is
+ running as a guest, or a host.
+
+ Can be one of kvm,
+ xen, vmware or
+ virtualbox.
+ '';
+ };
+
+ sysctl = mkOption {
+ type = types.bool;
+ default = false;
+ description = ''
+ If true, then set GRKERN_SYSCTL y. If
+ enabled then grsecurity can be controlled using sysctl
+ (and turned off). You are advised to *never* enable this,
+ but if you do, make sure to always set the sysctl
+ kernel.grsecurity.grsec_lock to
+ non-zero as soon as all sysctl options are set. *THIS IS
+ EXTREMELY IMPORTANT*!
+
+ If disabled, this also turns off the
+ systemd-sysctl service.
+ '';
+ };
+
+ denyChrootChmod = mkOption {
+ type = types.bool;
+ default = false;
+ description = ''
+ If true, then set GRKERN_CHROOT_CHMOD
+ y. If enabled, this denies processes inside a
+ chroot from setting the suid or sgid bits using
+ chmod or fchmod.
+
+ By default this protection is disabled - it makes it
+ impossible to use Nix to build software on your system,
+ which is what most users want.
+
+ If you are using NixOps to deploy your software to a
+ remote machine, you're encouraged to enable this as you
+ won't need to compile code.
+ '';
+ };
+
+ restrictProc = mkOption {
+ type = types.bool;
+ default = false;
+ description = ''
+ If true, then set GRKERN_PROC_USER
+ y. This restricts non-root users to only viewing
+ their own processes and restricts network-related
+ information, kernel symbols, and module information.
+ '';
+ };
+
+ restrictProcWithGroup = mkOption {
+ type = types.bool;
+ default = true;
+ description = ''
+ If true, then set GRKERN_PROC_USERGROUP
+ y. This is similar to
+ restrictProc except it allows a special
+ group (specified by unrestrictProcGid)
+ to still access otherwise classified information in
+ /proc.
+ '';
+ };
+
+ unrestrictProcGid = mkOption {
+ type = types.int;
+ default = config.ids.gids.grsecurity;
+ description = ''
+ If set, specifies a GID which is exempt from
+ /proc restrictions (set by
+ GRKERN_PROC_USERGROUP). By default,
+ this is set to the GID for grsecurity,
+ a predefined NixOS group, which the
+ root account is a member of. You may
+ conveniently add other users to this group if you need
+ access to /proc
+ '';
+ };
+
+ disableRBAC = mkOption {
+ type = types.bool;
+ default = false;
+ description = ''
+ If true, then set GRKERN_NO_RBAC
+ y. This disables the
+ /dev/grsec device, which in turn
+ disables the RBAC system (and gradm).
+ '';
+ };
+
+ verboseVersion = mkOption {
+ type = types.bool;
+ default = false;
+ description = "Use verbose version in kernel localversion.";
+ };
+
+ kernelExtraConfig = mkOption {
+ type = types.str;
+ default = "";
+ description = "Extra kernel configuration parameters.";
+ };
+ };
+ };
+ };
+
+ config = mkIf cfg.enable {
+ assertions =
+ [ { assertion = cfg.stable || cfg.testing;
+ message = ''
+ If grsecurity is enabled, you must select either the
+ stable patch (with kernel 3.2), or the testing patch (with
+ kernel 3.13) to continue.
+ '';
+ }
+ { assertion = (cfg.stable -> !cfg.testing) || (cfg.testing -> !cfg.stable);
+ message = ''
+ You must select either the stable or testing patch, not
+ both.
+ '';
+ }
+ { assertion = (cfg.testing -> !cfg.vserver);
+ message = "The vserver patches are only supported in the stable kernel.";
+ }
+ { assertion = (cfg.config.restrictProc -> !cfg.config.restrictProcWithGroup) ||
+ (cfg.config.restrictProcWithGroup -> !cfg.config.restrictProc);
+ message = "You cannot enable both restrictProc and restrictProcWithGroup";
+ }
+ { assertion = config.boot.kernelPackages.kernel.features ? grsecurity
+ && config.boot.kernelPackages.kernel.features.grsecurity;
+ message = "grsecurity enabled, but kernel doesn't have grsec support";
+ }
+ { assertion = elem cfg.config.mode [ "auto" "custom" ];
+ message = "grsecurity mode must either be 'auto' or 'custom'.";
+ }
+ { assertion = cfg.config.mode == "auto" -> elem cfg.config.system [ "desktop" "server" ];
+ message = "when using auto grsec mode, system must be either 'desktop' or 'server'";
+ }
+ { assertion = cfg.config.mode == "auto" -> elem cfg.config.priority [ "performance" "security" ];
+ message = "when using auto grsec mode, priority must be 'performance' or 'security'.";
+ }
+ { assertion = cfg.config.mode == "auto" -> elem cfg.config.virtualisationConfig [ "host" "guest" "none" ];
+ message = "when using auto grsec mode, 'virt' must be 'host', 'guest' or 'none'.";
+ }
+ { assertion = (cfg.config.mode == "auto" && (elem cfg.config.virtualisationConfig [ "host" "guest" ])) ->
+ cfg.config.hardwareVirtualisation != null;
+ message = "when using auto grsec mode with virtualisation, you must specify if your hardware has virtualisation extensions";
+ }
+ { assertion = (cfg.config.mode == "auto" && (elem cfg.config.virtualisationConfig [ "host" "guest" ])) ->
+ elem cfg.config.virtualisationSoftware [ "kvm" "xen" "virtualbox" "vmware" ];
+ message = "virtualisation software must be 'kvm', 'xen', 'vmware' or 'virtualbox'";
+ }
+ ];
+
+ systemd.services.grsec-lock = mkIf cfg.config.sysctl {
+ description = "grsecurity sysctl-lock Service";
+ requires = [ "sysctl.service" ];
+ wantedBy = [ "multi-user.target" ];
+ serviceConfig.Type = "oneshot";
+ serviceConfig.RemainAfterExit = "yes";
+ script = ''
+ locked=`cat /proc/sys/kernel/grsecurity/grsec_lock`
+ if [ "$locked" == "0" ]; then
+ echo 1 > /proc/sys/kernel/grsecurity/grsec_lock
+ echo grsecurity sysctl lock - enabled
+ else
+ echo grsecurity sysctl lock already enabled - doing nothing
+ fi
+ '';
+ };
+
+# systemd.services.grsec-learn = {
+# description = "grsecurity learning Service";
+# wantedBy = [ "local-fs.target" ];
+# serviceConfig = {
+# Type = "oneshot";
+# RemainAfterExit = "yes";
+# ExecStart = "${pkgs.gradm}/sbin/gradm -VFL /etc/grsec/learning.logs";
+# ExecStop = "${pkgs.gradm}/sbin/gradm -D";
+# };
+# };
+
+ system.activationScripts.grsec =
+ ''
+ mkdir -p /etc/grsec
+ if [ ! -f /etc/grsec/learn_config ]; then
+ cp ${pkgs.gradm}/etc/grsec/learn_config /etc/grsec
+ fi
+ if [ ! -f /etc/grsec/policy ]; then
+ cp ${pkgs.gradm}/etc/grsec/policy /etc/grsec
+ fi
+ chmod -R 0600 /etc/grsec
+ '';
+
+ # Enable apparmor support, gradm udev rules, and utilities
+ security.apparmor.enable = true;
+ boot.kernelPackages = grsecPackage;
+ services.udev.packages = [ pkgs.gradm ];
+ environment.systemPackages = [ pkgs.gradm pkgs.paxctl pkgs.pax-utils ];
+ };
+}
diff --git a/nixos/modules/security/pam.nix b/nixos/modules/security/pam.nix
index 93d12d292e4..0d205ce07e5 100644
--- a/nixos/modules/security/pam.nix
+++ b/nixos/modules/security/pam.nix
@@ -1,9 +1,9 @@
# This module provides configuration for the PAM (Pluggable
# Authentication Modules) system.
-{config, pkgs, ...}:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
let
diff --git a/nixos/modules/security/pam_usb.nix b/nixos/modules/security/pam_usb.nix
index 4cc99995fbc..11708a1f016 100644
--- a/nixos/modules/security/pam_usb.nix
+++ b/nixos/modules/security/pam_usb.nix
@@ -1,6 +1,6 @@
-{config, pkgs, ...}:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
let
diff --git a/nixos/modules/security/polkit.nix b/nixos/modules/security/polkit.nix
index dbec4ad98d1..054d39c4785 100644
--- a/nixos/modules/security/polkit.nix
+++ b/nixos/modules/security/polkit.nix
@@ -1,6 +1,6 @@
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
let
diff --git a/nixos/modules/security/prey.nix b/nixos/modules/security/prey.nix
index 75b95d5fbb0..e29fa5395a1 100644
--- a/nixos/modules/security/prey.nix
+++ b/nixos/modules/security/prey.nix
@@ -1,6 +1,6 @@
-{config, pkgs, ...}:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
let
cfg = config.services.prey;
diff --git a/nixos/modules/security/rngd.nix b/nixos/modules/security/rngd.nix
index 720ac02f2e8..c31e57e6f6f 100644
--- a/nixos/modules/security/rngd.nix
+++ b/nixos/modules/security/rngd.nix
@@ -1,6 +1,6 @@
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
{
options = {
diff --git a/nixos/modules/security/rtkit.nix b/nixos/modules/security/rtkit.nix
index 164ad9b3aa7..ba07591bb77 100644
--- a/nixos/modules/security/rtkit.nix
+++ b/nixos/modules/security/rtkit.nix
@@ -1,9 +1,9 @@
# A module for ‘rtkit’, a DBus system service that hands out realtime
# scheduling priority to processes that ask for it.
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
{
diff --git a/nixos/modules/security/setuid-wrappers.nix b/nixos/modules/security/setuid-wrappers.nix
index 62df85816e5..109e61df79e 100644
--- a/nixos/modules/security/setuid-wrappers.nix
+++ b/nixos/modules/security/setuid-wrappers.nix
@@ -1,6 +1,6 @@
-{pkgs, config, ...}:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
let
@@ -46,6 +46,7 @@ in
group = "postdrop";
setuid = false;
setgid = true;
+ permissions = "u+rx,g+x,o+x";
}
];
description = ''
diff --git a/nixos/modules/security/sudo.nix b/nixos/modules/security/sudo.nix
index 215a8ecd601..956856c6499 100644
--- a/nixos/modules/security/sudo.nix
+++ b/nixos/modules/security/sudo.nix
@@ -1,6 +1,6 @@
-{pkgs, config, ...}:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
let
diff --git a/nixos/modules/services/amqp/activemq/default.nix b/nixos/modules/services/amqp/activemq/default.nix
index 915d179e699..f1f3d005f30 100644
--- a/nixos/modules/services/amqp/activemq/default.nix
+++ b/nixos/modules/services/amqp/activemq/default.nix
@@ -1,6 +1,6 @@
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
with pkgs;
let
diff --git a/nixos/modules/services/amqp/rabbitmq.nix b/nixos/modules/services/amqp/rabbitmq.nix
index dc1a68aefbb..bef15fb64b7 100644
--- a/nixos/modules/services/amqp/rabbitmq.nix
+++ b/nixos/modules/services/amqp/rabbitmq.nix
@@ -1,6 +1,6 @@
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
let
cfg = config.services.rabbitmq;
diff --git a/nixos/modules/services/audio/alsa.nix b/nixos/modules/services/audio/alsa.nix
index c9a2ef4589b..9a70d9edfa7 100644
--- a/nixos/modules/services/audio/alsa.nix
+++ b/nixos/modules/services/audio/alsa.nix
@@ -1,7 +1,7 @@
# ALSA sound support.
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
let
diff --git a/nixos/modules/services/audio/fuppes.nix b/nixos/modules/services/audio/fuppes.nix
index 3eb0732bae2..4a975ed5f53 100644
--- a/nixos/modules/services/audio/fuppes.nix
+++ b/nixos/modules/services/audio/fuppes.nix
@@ -1,10 +1,10 @@
-{config, pkgs, ...}:
+{ config, lib, pkgs, ... }:
let
cfg = config.services.fuppesd;
in
-with pkgs.lib;
+with lib;
{
options = {
diff --git a/nixos/modules/services/audio/mpd.nix b/nixos/modules/services/audio/mpd.nix
index a9880dee20c..1b50f06bf30 100644
--- a/nixos/modules/services/audio/mpd.nix
+++ b/nixos/modules/services/audio/mpd.nix
@@ -1,6 +1,6 @@
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
let
diff --git a/nixos/modules/services/backup/almir.nix b/nixos/modules/services/backup/almir.nix
index 8fdcdd6c7be..5ce215c5c4b 100644
--- a/nixos/modules/services/backup/almir.nix
+++ b/nixos/modules/services/backup/almir.nix
@@ -1,6 +1,6 @@
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
let
cfg = config.services.almir;
diff --git a/nixos/modules/services/backup/bacula.nix b/nixos/modules/services/backup/bacula.nix
index 272903c99e3..c2255f68818 100644
--- a/nixos/modules/services/backup/bacula.nix
+++ b/nixos/modules/services/backup/bacula.nix
@@ -1,9 +1,9 @@
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
# TODO: test configuration when building nixexpr (use -t parameter)
# TODO: support sqlite3 (it's deprecate?) and mysql
-with pkgs.lib;
+with lib;
let
libDir = "/var/lib/bacula";
diff --git a/nixos/modules/services/backup/mysql-backup.nix b/nixos/modules/services/backup/mysql-backup.nix
index 3ff9978fbb9..28f607861f7 100644
--- a/nixos/modules/services/backup/mysql-backup.nix
+++ b/nixos/modules/services/backup/mysql-backup.nix
@@ -1,6 +1,6 @@
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
let
diff --git a/nixos/modules/services/backup/postgresql-backup.nix b/nixos/modules/services/backup/postgresql-backup.nix
index e68ad794a96..1f7b123eca3 100644
--- a/nixos/modules/services/backup/postgresql-backup.nix
+++ b/nixos/modules/services/backup/postgresql-backup.nix
@@ -1,6 +1,6 @@
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
let
inherit (pkgs) postgresql gzip;
diff --git a/nixos/modules/services/backup/rsnapshot.nix b/nixos/modules/services/backup/rsnapshot.nix
index 178ba3ec720..48ad7582b7e 100644
--- a/nixos/modules/services/backup/rsnapshot.nix
+++ b/nixos/modules/services/backup/rsnapshot.nix
@@ -1,6 +1,6 @@
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
let cfg = config.services.rsnapshot;
in
diff --git a/nixos/modules/services/backup/sitecopy-backup.nix b/nixos/modules/services/backup/sitecopy-backup.nix
index 5c7f7ffae5b..5d3675fa3e9 100644
--- a/nixos/modules/services/backup/sitecopy-backup.nix
+++ b/nixos/modules/services/backup/sitecopy-backup.nix
@@ -1,6 +1,6 @@
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
let
inherit (pkgs) sitecopy;
diff --git a/nixos/modules/services/backup/tarsnap.nix b/nixos/modules/services/backup/tarsnap.nix
index ac8f008069a..1966242e3dc 100644
--- a/nixos/modules/services/backup/tarsnap.nix
+++ b/nixos/modules/services/backup/tarsnap.nix
@@ -1,6 +1,6 @@
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
let
cfg = config.services.tarsnap;
diff --git a/nixos/modules/services/continuous-integration/jenkins/default.nix b/nixos/modules/services/continuous-integration/jenkins/default.nix
index c3dc59a9fbd..b01b5c3245a 100644
--- a/nixos/modules/services/continuous-integration/jenkins/default.nix
+++ b/nixos/modules/services/continuous-integration/jenkins/default.nix
@@ -1,5 +1,5 @@
-{ config, pkgs, ... }:
-with pkgs.lib;
+{ config, lib, pkgs, ... }:
+with lib;
let
cfg = config.services.jenkins;
in {
@@ -25,7 +25,8 @@ in {
default = "jenkins";
type = with types; string;
description = ''
- User the jenkins server should execute under.
+ If the default user "jenkins" is configured then this is the primary
+ group of that user.
'';
};
@@ -42,7 +43,7 @@ in {
default = 8080;
type = types.uniq types.int;
description = ''
- Specifies port number on which the jenkins HTTP interface listens. The default is 8080
+ Specifies port number on which the jenkins HTTP interface listens. The default is 8080.
'';
};
diff --git a/nixos/modules/services/continuous-integration/jenkins/slave.nix b/nixos/modules/services/continuous-integration/jenkins/slave.nix
index 1d31ab830f6..5836d92a4fc 100644
--- a/nixos/modules/services/continuous-integration/jenkins/slave.nix
+++ b/nixos/modules/services/continuous-integration/jenkins/slave.nix
@@ -1,5 +1,5 @@
-{ config, pkgs, ... }:
-with pkgs.lib;
+{ config, lib, pkgs, ... }:
+with lib;
let
cfg = config.services.jenkinsSlave;
masterCfg = config.services.jenkins;
@@ -33,7 +33,8 @@ in {
default = "jenkins";
type = with types; string;
description = ''
- User the jenkins slave agent should execute under.
+ If the default slave agent user "jenkins" is configured then this is
+ the primary group of that user.
'';
};
diff --git a/nixos/modules/services/databases/4store-endpoint.nix b/nixos/modules/services/databases/4store-endpoint.nix
index 7872ea2dc6a..68913f15f95 100644
--- a/nixos/modules/services/databases/4store-endpoint.nix
+++ b/nixos/modules/services/databases/4store-endpoint.nix
@@ -1,10 +1,10 @@
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
let
cfg = config.services.fourStoreEndpoint;
endpointUser = "fourstorehttp";
run = "${pkgs.su}/bin/su -s ${pkgs.stdenv.shell} ${endpointUser} -c";
in
-with pkgs.lib;
+with lib;
{
###### interface
diff --git a/nixos/modules/services/databases/4store.nix b/nixos/modules/services/databases/4store.nix
index 412d14b050c..1725672a659 100644
--- a/nixos/modules/services/databases/4store.nix
+++ b/nixos/modules/services/databases/4store.nix
@@ -1,11 +1,11 @@
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
let
cfg = config.services.fourStore;
stateDir = "/var/lib/4store";
fourStoreUser = "fourstore";
run = "${pkgs.su}/bin/su -s ${pkgs.stdenv.shell} ${fourStoreUser}";
in
-with pkgs.lib;
+with lib;
{
###### interface
diff --git a/nixos/modules/services/databases/couchdb.nix b/nixos/modules/services/databases/couchdb.nix
index b48d3a64767..5088c741681 100644
--- a/nixos/modules/services/databases/couchdb.nix
+++ b/nixos/modules/services/databases/couchdb.nix
@@ -1,5 +1,6 @@
-{ config, pkgs, ... }:
- with pkgs.lib;
+{ config, lib, pkgs, ... }:
+
+with lib;
let
cfg = config.services.couchdb;
diff --git a/nixos/modules/services/databases/firebird.nix b/nixos/modules/services/databases/firebird.nix
index f9f7e9d7c51..83dd4951170 100644
--- a/nixos/modules/services/databases/firebird.nix
+++ b/nixos/modules/services/databases/firebird.nix
@@ -1,4 +1,4 @@
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
# TODO: This may file may need additional review, eg which configuartions to
# expose to the user.
@@ -19,7 +19,7 @@
# Eg superserver is said to be most efficiently using resources according to
# http://www.firebirdsql.org/manual/qsg25-classic-or-super.html
-with pkgs.lib;
+with lib;
let
diff --git a/nixos/modules/services/databases/memcached.nix b/nixos/modules/services/databases/memcached.nix
index 505253229c9..c6875af506d 100644
--- a/nixos/modules/services/databases/memcached.nix
+++ b/nixos/modules/services/databases/memcached.nix
@@ -1,6 +1,6 @@
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
let
diff --git a/nixos/modules/services/databases/monetdb.nix b/nixos/modules/services/databases/monetdb.nix
new file mode 100644
index 00000000000..9f09c71e005
--- /dev/null
+++ b/nixos/modules/services/databases/monetdb.nix
@@ -0,0 +1,88 @@
+{ config, lib, pkgs, ... }:
+let
+ cfg = config.services.monetdb;
+ monetdbUser = "monetdb";
+in
+with lib;
+{
+
+ ###### interface
+
+ options = {
+
+ services.monetdb = {
+
+ enable = mkOption {
+ type = types.bool;
+ default = false;
+ description = "Whether to enable MonetDB database server.";
+ };
+
+ package = mkOption {
+ type = types.path;
+ description = "MonetDB package to use.";
+ };
+
+ dbfarmDir = mkOption {
+ type = types.path;
+ default = "/var/lib/monetdb";
+ description = ''
+ Specifies location of Monetdb dbfarm (keeps database and auxiliary files).
+ '';
+ };
+
+ port = mkOption {
+ default = "50000";
+ example = "50000";
+ description = "Port to listen on.";
+ };
+ };
+
+ };
+
+
+ ###### implementation
+
+ config = mkIf cfg.enable {
+
+ users.extraUsers.monetdb =
+ { name = monetdbUser;
+ uid = config.ids.uids.monetdb;
+ description = "monetdb user";
+ home = cfg.dbfarmDir;
+ };
+
+ users.extraGroups.monetdb.gid = config.ids.gids.monetdb;
+
+ environment.systemPackages = [ cfg.package ];
+
+ systemd.services.monetdb =
+ { description = "MonetDB Server";
+
+ wantedBy = [ "multi-user.target" ];
+
+ after = [ "network.target" ];
+
+ path = [ cfg.package ];
+
+ preStart =
+ ''
+ # Initialise the database.
+ if ! test -e ${cfg.dbfarmDir}/.merovingian_properties; then
+ mkdir -m 0700 -p ${cfg.dbfarmDir}
+ chown -R ${monetdbUser} ${cfg.dbfarmDir}
+ ${cfg.package}/bin/monetdbd create ${cfg.dbfarmDir}
+ ${cfg.package}/bin/monetdbd set port=${cfg.port} ${cfg.dbfarmDir}
+ fi
+ '';
+
+ serviceConfig.ExecStart = "${cfg.package}/bin/monetdbd start -n ${cfg.dbfarmDir}";
+
+ serviceConfig.ExecStop = "${cfg.package}/bin/monetdbd stop ${cfg.dbfarmDir}";
+
+ unitConfig.RequiresMountsFor = "${cfg.dbfarmDir}";
+ };
+
+ };
+
+}
diff --git a/nixos/modules/services/databases/mongodb.nix b/nixos/modules/services/databases/mongodb.nix
index a2f2593e797..fe82ca430e1 100644
--- a/nixos/modules/services/databases/mongodb.nix
+++ b/nixos/modules/services/databases/mongodb.nix
@@ -1,6 +1,6 @@
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
let
diff --git a/nixos/modules/services/databases/mysql.nix b/nixos/modules/services/databases/mysql.nix
index 44fb0062f92..1ca45d90f89 100644
--- a/nixos/modules/services/databases/mysql.nix
+++ b/nixos/modules/services/databases/mysql.nix
@@ -1,6 +1,6 @@
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
let
diff --git a/nixos/modules/services/databases/openldap.nix b/nixos/modules/services/databases/openldap.nix
index 0fc8b88c652..c95238b3451 100644
--- a/nixos/modules/services/databases/openldap.nix
+++ b/nixos/modules/services/databases/openldap.nix
@@ -1,6 +1,6 @@
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
let
diff --git a/nixos/modules/services/databases/postgresql.nix b/nixos/modules/services/databases/postgresql.nix
index 33ee7244e3f..2960ad91362 100644
--- a/nixos/modules/services/databases/postgresql.nix
+++ b/nixos/modules/services/databases/postgresql.nix
@@ -1,6 +1,6 @@
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
let
@@ -190,7 +190,7 @@ in
mkdir -m 0700 -p ${cfg.dataDir}
if [ "$(id -u)" = 0 ]; then
chown -R postgres ${cfg.dataDir}
- su -s ${pkgs.stdenv.shell} postgres -c initdb
+ su -s ${pkgs.stdenv.shell} postgres -c 'initdb -U root'
else
# For non-root operation.
initdb
@@ -225,14 +225,14 @@ in
# Wait for PostgreSQL to be ready to accept connections.
postStart =
''
- while ! su -s ${pkgs.stdenv.shell} postgres -c 'psql postgres -c ""' 2> /dev/null; do
+ while ! psql postgres -c "" 2> /dev/null; do
if ! kill -0 "$MAINPID"; then exit 1; fi
sleep 0.1
done
if test -e "${cfg.dataDir}/.first_startup"; then
${optionalString (cfg.initialScript != null) ''
- cat "${cfg.initialScript}" | su -s ${pkgs.stdenv.shell} postgres -c 'psql postgres'
+ cat "${cfg.initialScript}" | psql postgres
''}
rm -f "${cfg.dataDir}/.first_startup"
fi
diff --git a/nixos/modules/services/databases/redis.nix b/nixos/modules/services/databases/redis.nix
index 9a4ce36a5cb..4ef48df9831 100644
--- a/nixos/modules/services/databases/redis.nix
+++ b/nixos/modules/services/databases/redis.nix
@@ -1,6 +1,6 @@
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
let
cfg = config.services.redis;
diff --git a/nixos/modules/services/databases/virtuoso.nix b/nixos/modules/services/databases/virtuoso.nix
index 6a29fc13211..f955cb74b6b 100644
--- a/nixos/modules/services/databases/virtuoso.nix
+++ b/nixos/modules/services/databases/virtuoso.nix
@@ -1,10 +1,10 @@
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
let
cfg = config.services.virtuoso;
virtuosoUser = "virtuoso";
stateDir = "/var/lib/virtuoso";
in
-with pkgs.lib;
+with lib;
{
###### interface
diff --git a/nixos/modules/services/desktops/accountservice.nix b/nixos/modules/services/desktops/accountservice.nix
new file mode 100644
index 00000000000..386dfe98bd2
--- /dev/null
+++ b/nixos/modules/services/desktops/accountservice.nix
@@ -0,0 +1,40 @@
+# AccountsService daemon.
+
+{ config, lib, pkgs, ... }:
+
+with lib;
+
+{
+
+ ###### interface
+
+ options = {
+
+ services.accounts-daemon = {
+
+ enable = mkOption {
+ type = types.bool;
+ default = false;
+ description = ''
+ Whether to enable AccountsService, a DBus service for accessing
+ the list of user accounts and information attached to those accounts.
+ '';
+ };
+
+ };
+
+ };
+
+
+ ###### implementation
+
+ config = mkIf config.services.accounts-daemon.enable {
+
+ environment.systemPackages = [ pkgs.accountservice ];
+
+ services.dbus.packages = [ pkgs.accountservice ];
+
+ systemd.packages = [ pkgs.accountservice ];
+ };
+
+}
diff --git a/nixos/modules/services/desktops/gnome3/at-spi2-core.nix b/nixos/modules/services/desktops/gnome3/at-spi2-core.nix
new file mode 100644
index 00000000000..22a54f511d1
--- /dev/null
+++ b/nixos/modules/services/desktops/gnome3/at-spi2-core.nix
@@ -0,0 +1,39 @@
+# at-spi2-core daemon.
+
+{ config, lib, pkgs, ... }:
+
+with lib;
+
+{
+
+ ###### interface
+
+ options = {
+
+ services.gnome3.at-spi2-core = {
+
+ enable = mkOption {
+ type = types.bool;
+ default = false;
+ description = ''
+ Whether to enable at-spi2-core, a service for the Assistive Technologies
+ available on the GNOME platform.
+ '';
+ };
+
+ };
+
+ };
+
+
+ ###### implementation
+
+ config = mkIf config.services.gnome3.at-spi2-core.enable {
+
+ environment.systemPackages = [ pkgs.gnome3.at_spi2_core ];
+
+ services.dbus.packages = [ pkgs.gnome3.at_spi2_core ];
+
+ };
+
+}
diff --git a/nixos/modules/services/desktops/gnome3/evolution-data-server.nix b/nixos/modules/services/desktops/gnome3/evolution-data-server.nix
new file mode 100644
index 00000000000..a49b5b47768
--- /dev/null
+++ b/nixos/modules/services/desktops/gnome3/evolution-data-server.nix
@@ -0,0 +1,39 @@
+# Evolution Data Server daemon.
+
+{ config, lib, pkgs, ... }:
+
+with lib;
+
+{
+
+ ###### interface
+
+ options = {
+
+ services.gnome3.evolution-data-server = {
+
+ enable = mkOption {
+ type = types.bool;
+ default = false;
+ description = ''
+ Whether to enable Evolution Data Server, a collection of services for
+ storing addressbooks and calendars.
+ '';
+ };
+
+ };
+
+ };
+
+
+ ###### implementation
+
+ config = mkIf config.services.gnome3.evolution-data-server.enable {
+
+ environment.systemPackages = [ pkgs.evolution_data_server ];
+
+ services.dbus.packages = [ pkgs.evolution_data_server ];
+
+ };
+
+}
diff --git a/nixos/modules/services/desktops/gnome3/gnome-keyring.nix b/nixos/modules/services/desktops/gnome3/gnome-keyring.nix
new file mode 100644
index 00000000000..447fd783f14
--- /dev/null
+++ b/nixos/modules/services/desktops/gnome3/gnome-keyring.nix
@@ -0,0 +1,40 @@
+# GNOME Keyring daemon.
+
+{ config, pkgs, ... }:
+
+with pkgs.lib;
+
+{
+
+ ###### interface
+
+ options = {
+
+ services.gnome3.gnome-keyring = {
+
+ enable = mkOption {
+ type = types.bool;
+ default = false;
+ description = ''
+ Whether to enable GNOME Keyring daemon, a service designed to
+ take care of the user's security credentials,
+ such as user names and passwordsa search engine.
+ '';
+ };
+
+ };
+
+ };
+
+
+ ###### implementation
+
+ config = mkIf config.services.gnome3.gnome-keyring.enable {
+
+ environment.systemPackages = [ pkgs.gnome3.gnome_keyring ];
+
+ services.dbus.packages = [ pkgs.gnome3.gnome_keyring ];
+
+ };
+
+}
diff --git a/nixos/modules/services/desktops/gnome3/gnome-online-accounts.nix b/nixos/modules/services/desktops/gnome3/gnome-online-accounts.nix
new file mode 100644
index 00000000000..365e19c15bb
--- /dev/null
+++ b/nixos/modules/services/desktops/gnome3/gnome-online-accounts.nix
@@ -0,0 +1,39 @@
+# GNOME Online Accounts daemon.
+
+{ config, pkgs, ... }:
+
+with pkgs.lib;
+
+{
+
+ ###### interface
+
+ options = {
+
+ services.gnome3.gnome-online-accounts = {
+
+ enable = mkOption {
+ type = types.bool;
+ default = false;
+ description = ''
+ Whether to enable GNOME Online Accounts daemon, a service that provides
+ a single sign-on framework for the GNOME desktop.
+ '';
+ };
+
+ };
+
+ };
+
+
+ ###### implementation
+
+ config = mkIf config.services.gnome3.gnome-online-accounts.enable {
+
+ environment.systemPackages = [ pkgs.gnome3.gnome_online_accounts ];
+
+ services.dbus.packages = [ pkgs.gnome3.gnome_online_accounts ];
+
+ };
+
+}
diff --git a/nixos/modules/services/desktops/gnome3/gnome-user-share.nix b/nixos/modules/services/desktops/gnome3/gnome-user-share.nix
new file mode 100644
index 00000000000..df796ed77ff
--- /dev/null
+++ b/nixos/modules/services/desktops/gnome3/gnome-user-share.nix
@@ -0,0 +1,42 @@
+# GNOME User Share daemon.
+
+{ config, pkgs, ... }:
+
+with pkgs.lib;
+
+{
+
+ ###### interface
+
+ options = {
+
+ services.gnome3.gnome-user-share = {
+
+ enable = mkOption {
+ type = types.bool;
+ default = false;
+ description = ''
+ Whether to enable GNOME User Share, a service that exports the
+ contents of the Public folder in your home directory on the local network.
+ '';
+ };
+
+ };
+
+ };
+
+
+ ###### implementation
+
+ config = mkIf config.services.gnome3.gnome-user-share.enable {
+
+ environment.systemPackages = [ pkgs.gnome3.gnome-user-share ];
+
+ services.xserver.displayManager.sessionCommands = with pkgs.gnome3; ''
+ # Don't let gnome-control-center depend upon gnome-user-share
+ export XDG_DATA_DIRS=$XDG_DATA_DIRS''${XDG_DATA_DIRS:+:}${gnome-user-share}/share/gsettings-schemas/${gnome-user-share.name}
+ '';
+
+ };
+
+}
diff --git a/nixos/modules/services/desktops/gnome3/sushi.nix b/nixos/modules/services/desktops/gnome3/sushi.nix
new file mode 100644
index 00000000000..7a4389038b2
--- /dev/null
+++ b/nixos/modules/services/desktops/gnome3/sushi.nix
@@ -0,0 +1,38 @@
+# GNOME Sushi daemon.
+
+{ config, lib, pkgs, ... }:
+
+with lib;
+
+{
+
+ ###### interface
+
+ options = {
+
+ services.gnome3.sushi = {
+
+ enable = mkOption {
+ type = types.bool;
+ default = false;
+ description = ''
+ Whether to enable Sushi, a quick previewer for nautilus.
+ '';
+ };
+
+ };
+
+ };
+
+
+ ###### implementation
+
+ config = mkIf config.services.gnome3.sushi.enable {
+
+ environment.systemPackages = [ pkgs.gnome3.sushi ];
+
+ services.dbus.packages = [ pkgs.gnome3.sushi ];
+
+ };
+
+}
diff --git a/nixos/modules/services/desktops/gnome3/tracker.nix b/nixos/modules/services/desktops/gnome3/tracker.nix
new file mode 100644
index 00000000000..94a22d0c881
--- /dev/null
+++ b/nixos/modules/services/desktops/gnome3/tracker.nix
@@ -0,0 +1,39 @@
+# Tracker daemon.
+
+{ config, pkgs, ... }:
+
+with pkgs.lib;
+
+{
+
+ ###### interface
+
+ options = {
+
+ services.gnome3.tracker = {
+
+ enable = mkOption {
+ type = types.bool;
+ default = false;
+ description = ''
+ Whether to enable Tracker services, a search engine,
+ search tool and metadata storage system.
+ '';
+ };
+
+ };
+
+ };
+
+
+ ###### implementation
+
+ config = mkIf config.services.gnome3.tracker.enable {
+
+ environment.systemPackages = [ pkgs.gnome3.tracker ];
+
+ services.dbus.packages = [ pkgs.gnome3.tracker ];
+
+ };
+
+}
diff --git a/nixos/modules/services/desktops/telepathy.nix b/nixos/modules/services/desktops/telepathy.nix
new file mode 100644
index 00000000000..2554f3a1666
--- /dev/null
+++ b/nixos/modules/services/desktops/telepathy.nix
@@ -0,0 +1,39 @@
+# Telepathy daemon.
+
+{ config, lib, pkgs, ... }:
+
+with lib;
+
+{
+
+ ###### interface
+
+ options = {
+
+ services.telepathy = {
+
+ enable = mkOption {
+ type = types.bool;
+ default = false;
+ description = ''
+ Whether to enable Telepathy service, a communications framework
+ that enables real-time communication via pluggable protocol backends.
+ '';
+ };
+
+ };
+
+ };
+
+
+ ###### implementation
+
+ config = mkIf config.services.telepathy.enable {
+
+ environment.systemPackages = [ pkgs.telepathy_mission_control ];
+
+ services.dbus.packages = [ pkgs.telepathy_mission_control ];
+
+ };
+
+}
diff --git a/nixos/modules/services/games/ghost-one.nix b/nixos/modules/services/games/ghost-one.nix
index 92c9112eeb6..7a3ecebec39 100644
--- a/nixos/modules/services/games/ghost-one.nix
+++ b/nixos/modules/services/games/ghost-one.nix
@@ -1,5 +1,5 @@
-{pkgs, config, ...}:
-with pkgs.lib;
+{ config, lib, pkgs, ... }:
+with lib;
let
cfg = config.services.ghostOne;
diff --git a/nixos/modules/services/games/minecraft-server.nix b/nixos/modules/services/games/minecraft-server.nix
index ac70bc53473..4c734aefa46 100644
--- a/nixos/modules/services/games/minecraft-server.nix
+++ b/nixos/modules/services/games/minecraft-server.nix
@@ -1,6 +1,6 @@
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
let
cfg = config.services.minecraft-server;
diff --git a/nixos/modules/services/hardware/acpid.nix b/nixos/modules/services/hardware/acpid.nix
index 2329f38dfc2..a710636c140 100644
--- a/nixos/modules/services/hardware/acpid.nix
+++ b/nixos/modules/services/hardware/acpid.nix
@@ -1,6 +1,6 @@
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
let
diff --git a/nixos/modules/services/hardware/bluetooth.nix b/nixos/modules/services/hardware/bluetooth.nix
index a70a66c2ba0..68d0406e63b 100644
--- a/nixos/modules/services/hardware/bluetooth.nix
+++ b/nixos/modules/services/hardware/bluetooth.nix
@@ -1,6 +1,6 @@
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
{
diff --git a/nixos/modules/services/hardware/pcscd.nix b/nixos/modules/services/hardware/pcscd.nix
index 6d429c94b28..119761c7a44 100644
--- a/nixos/modules/services/hardware/pcscd.nix
+++ b/nixos/modules/services/hardware/pcscd.nix
@@ -1,10 +1,10 @@
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
let
cfgFile = pkgs.writeText "reader.conf" "";
in
-with pkgs.lib;
+with lib;
{
diff --git a/nixos/modules/services/hardware/pommed.nix b/nixos/modules/services/hardware/pommed.nix
index 32599554fc1..04db46999b0 100644
--- a/nixos/modules/services/hardware/pommed.nix
+++ b/nixos/modules/services/hardware/pommed.nix
@@ -1,6 +1,6 @@
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
{
diff --git a/nixos/modules/services/hardware/sane.nix b/nixos/modules/services/hardware/sane.nix
index 5979feb8240..01d910575bb 100644
--- a/nixos/modules/services/hardware/sane.nix
+++ b/nixos/modules/services/hardware/sane.nix
@@ -1,6 +1,6 @@
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
let
diff --git a/nixos/modules/services/hardware/thinkfan.nix b/nixos/modules/services/hardware/thinkfan.nix
index b39c9cb1d9b..16c31aab2d5 100644
--- a/nixos/modules/services/hardware/thinkfan.nix
+++ b/nixos/modules/services/hardware/thinkfan.nix
@@ -1,6 +1,6 @@
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
let
diff --git a/nixos/modules/services/hardware/udev.nix b/nixos/modules/services/hardware/udev.nix
index 52b3ad43579..d218aa1e5e1 100644
--- a/nixos/modules/services/hardware/udev.nix
+++ b/nixos/modules/services/hardware/udev.nix
@@ -1,6 +1,6 @@
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
let
diff --git a/nixos/modules/services/hardware/udisks.nix b/nixos/modules/services/hardware/udisks.nix
index a3527468cce..c9d11bcfc68 100644
--- a/nixos/modules/services/hardware/udisks.nix
+++ b/nixos/modules/services/hardware/udisks.nix
@@ -1,8 +1,8 @@
# Udisks daemon.
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
{
@@ -40,8 +40,6 @@ with pkgs.lib;
'';
services.udev.packages = [ pkgs.udisks ];
-
- systemd.packages = [ pkgs.udisks ];
};
}
diff --git a/nixos/modules/services/hardware/udisks2.nix b/nixos/modules/services/hardware/udisks2.nix
index 178ec379ff1..0f61f20c33c 100644
--- a/nixos/modules/services/hardware/udisks2.nix
+++ b/nixos/modules/services/hardware/udisks2.nix
@@ -1,8 +1,8 @@
# Udisks daemon.
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
{
diff --git a/nixos/modules/services/hardware/upower.nix b/nixos/modules/services/hardware/upower.nix
index 4a9b13d4aa0..a202d82f646 100644
--- a/nixos/modules/services/hardware/upower.nix
+++ b/nixos/modules/services/hardware/upower.nix
@@ -1,8 +1,8 @@
# Upower daemon.
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
{
diff --git a/nixos/modules/services/logging/klogd.nix b/nixos/modules/services/logging/klogd.nix
index 36b530d0077..f69e08152b5 100644
--- a/nixos/modules/services/logging/klogd.nix
+++ b/nixos/modules/services/logging/klogd.nix
@@ -1,6 +1,6 @@
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
{
###### interface
diff --git a/nixos/modules/services/logging/logcheck.nix b/nixos/modules/services/logging/logcheck.nix
index ef147f95358..1cd032ffa76 100644
--- a/nixos/modules/services/logging/logcheck.nix
+++ b/nixos/modules/services/logging/logcheck.nix
@@ -1,6 +1,6 @@
-{config, pkgs, ...}:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
let
cfg = config.services.logcheck;
diff --git a/nixos/modules/services/logging/logrotate.nix b/nixos/modules/services/logging/logrotate.nix
index c6c0d2ea238..804f9a0847f 100644
--- a/nixos/modules/services/logging/logrotate.nix
+++ b/nixos/modules/services/logging/logrotate.nix
@@ -1,6 +1,6 @@
-{config, pkgs, ...}:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
let
cfg = config.services.logrotate;
diff --git a/nixos/modules/services/logging/logstash.nix b/nixos/modules/services/logging/logstash.nix
index 21128779e8f..480e35a1156 100644
--- a/nixos/modules/services/logging/logstash.nix
+++ b/nixos/modules/services/logging/logstash.nix
@@ -1,6 +1,6 @@
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
let
cfg = config.services.logstash;
diff --git a/nixos/modules/services/logging/rsyslogd.nix b/nixos/modules/services/logging/rsyslogd.nix
index 680c7a912c1..d4b7aa809f0 100644
--- a/nixos/modules/services/logging/rsyslogd.nix
+++ b/nixos/modules/services/logging/rsyslogd.nix
@@ -1,6 +1,6 @@
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
let
diff --git a/nixos/modules/services/logging/syslogd.nix b/nixos/modules/services/logging/syslogd.nix
index 36a0ace927a..325868079e2 100644
--- a/nixos/modules/services/logging/syslogd.nix
+++ b/nixos/modules/services/logging/syslogd.nix
@@ -1,6 +1,6 @@
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
let
diff --git a/nixos/modules/services/mail/dovecot.nix b/nixos/modules/services/mail/dovecot.nix
index 92682d644f4..1fb7102e7f3 100644
--- a/nixos/modules/services/mail/dovecot.nix
+++ b/nixos/modules/services/mail/dovecot.nix
@@ -1,6 +1,6 @@
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
let
diff --git a/nixos/modules/services/mail/freepops.nix b/nixos/modules/services/mail/freepops.nix
index 79f211ad86e..2dd27a2033a 100644
--- a/nixos/modules/services/mail/freepops.nix
+++ b/nixos/modules/services/mail/freepops.nix
@@ -1,6 +1,6 @@
-{config, pkgs, ...}:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
let
cfg = config.services.mail.freepopsd;
diff --git a/nixos/modules/services/mail/mail.nix b/nixos/modules/services/mail/mail.nix
index bad0b22625d..b7e1d295f2c 100644
--- a/nixos/modules/services/mail/mail.nix
+++ b/nixos/modules/services/mail/mail.nix
@@ -1,6 +1,6 @@
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
{
diff --git a/nixos/modules/services/mail/opensmtpd.nix b/nixos/modules/services/mail/opensmtpd.nix
index 0c18c464520..fbc4b1d7d8a 100644
--- a/nixos/modules/services/mail/opensmtpd.nix
+++ b/nixos/modules/services/mail/opensmtpd.nix
@@ -1,7 +1,7 @@
-{ pkgs, config, ... }:
+{ config, lib, pkgs, ... }:
with pkgs;
-with pkgs.lib;
+with lib;
let
diff --git a/nixos/modules/services/mail/postfix.nix b/nixos/modules/services/mail/postfix.nix
index 2633289b46d..8f75bd8ab5d 100644
--- a/nixos/modules/services/mail/postfix.nix
+++ b/nixos/modules/services/mail/postfix.nix
@@ -1,6 +1,6 @@
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
let
diff --git a/nixos/modules/services/mail/spamassassin.nix b/nixos/modules/services/mail/spamassassin.nix
index aaf1dfcc210..a3ac9e37242 100644
--- a/nixos/modules/services/mail/spamassassin.nix
+++ b/nixos/modules/services/mail/spamassassin.nix
@@ -1,6 +1,6 @@
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
let
diff --git a/nixos/modules/services/misc/autofs.nix b/nixos/modules/services/misc/autofs.nix
index 50491c556e8..e645bd25a66 100644
--- a/nixos/modules/services/misc/autofs.nix
+++ b/nixos/modules/services/misc/autofs.nix
@@ -1,6 +1,6 @@
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
let
diff --git a/nixos/modules/services/misc/cgminer.nix b/nixos/modules/services/misc/cgminer.nix
index 20b7c34e886..8f25df809cd 100644
--- a/nixos/modules/services/misc/cgminer.nix
+++ b/nixos/modules/services/misc/cgminer.nix
@@ -1,6 +1,6 @@
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
let
cfg = config.services.cgminer;
diff --git a/nixos/modules/services/misc/dictd.nix b/nixos/modules/services/misc/dictd.nix
index fd68f847010..552e0a435ef 100644
--- a/nixos/modules/services/misc/dictd.nix
+++ b/nixos/modules/services/misc/dictd.nix
@@ -1,6 +1,6 @@
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
{
diff --git a/nixos/modules/services/misc/disnix.nix b/nixos/modules/services/misc/disnix.nix
index 82526b154e7..94d0caaa76b 100644
--- a/nixos/modules/services/misc/disnix.nix
+++ b/nixos/modules/services/misc/disnix.nix
@@ -1,7 +1,7 @@
# Disnix server
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
let
diff --git a/nixos/modules/services/misc/felix.nix b/nixos/modules/services/misc/felix.nix
index 2da50fc8595..a01c7f08b91 100644
--- a/nixos/modules/services/misc/felix.nix
+++ b/nixos/modules/services/misc/felix.nix
@@ -1,7 +1,7 @@
# Felix server
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
let
diff --git a/nixos/modules/services/misc/folding-at-home.nix b/nixos/modules/services/misc/folding-at-home.nix
index 9f4c4645279..0093e3c0c33 100644
--- a/nixos/modules/services/misc/folding-at-home.nix
+++ b/nixos/modules/services/misc/folding-at-home.nix
@@ -1,5 +1,5 @@
-{ config, pkgs, ... }:
-with pkgs.lib;
+{ config, lib, pkgs, ... }:
+with lib;
let
stateDir = "/var/lib/foldingathome";
cfg = config.services.foldingAtHome;
diff --git a/nixos/modules/services/misc/gpsd.nix b/nixos/modules/services/misc/gpsd.nix
index 99b733d399e..4a677f33fa0 100644
--- a/nixos/modules/services/misc/gpsd.nix
+++ b/nixos/modules/services/misc/gpsd.nix
@@ -1,6 +1,6 @@
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
let
diff --git a/nixos/modules/services/misc/nix-daemon.nix b/nixos/modules/services/misc/nix-daemon.nix
index 785d4397347..1516736dc2e 100644
--- a/nixos/modules/services/misc/nix-daemon.nix
+++ b/nixos/modules/services/misc/nix-daemon.nix
@@ -1,6 +1,6 @@
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
let
@@ -253,7 +253,7 @@ in
config = {
- nix.chrootDirs = [ "/dev" "/dev/pts" "/proc" "/bin" ];
+ nix.chrootDirs = [ "/bin" ];
environment.etc."nix/nix.conf".source = nixConf;
diff --git a/nixos/modules/services/misc/nix-gc.nix b/nixos/modules/services/misc/nix-gc.nix
index fa20e0956f5..6a7a7f4cee7 100644
--- a/nixos/modules/services/misc/nix-gc.nix
+++ b/nixos/modules/services/misc/nix-gc.nix
@@ -1,6 +1,6 @@
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
let
cfg = config.nix.gc;
diff --git a/nixos/modules/services/misc/nixos-manual.nix b/nixos/modules/services/misc/nixos-manual.nix
index 1a8b85db329..808c5dcbdc6 100644
--- a/nixos/modules/services/misc/nixos-manual.nix
+++ b/nixos/modules/services/misc/nixos-manual.nix
@@ -3,9 +3,9 @@
# of the virtual consoles. The latter is useful for the installation
# CD.
-{ config, pkgs, baseModules, ... } @ extraArgs:
+{ config, lib, pkgs, baseModules, ... } @ extraArgs:
-with pkgs.lib;
+with lib;
let
diff --git a/nixos/modules/services/misc/rippled.nix b/nixos/modules/services/misc/rippled.nix
new file mode 100644
index 00000000000..2c1fec9f6d7
--- /dev/null
+++ b/nixos/modules/services/misc/rippled.nix
@@ -0,0 +1,314 @@
+# configuration building is commented out until better tested.
+
+{ config, lib, pkgs, ... }:
+
+with lib;
+
+let
+ cfg = config.services.rippled;
+
+ rippledStateCfgFile = "/var/lib/rippled/rippled.cfg";
+
+ rippledCfg = ''
+ [node_db]
+ type=HyperLevelDB
+ path=/var/lib/rippled/db/hyperldb
+
+ [debug_logfile]
+ /var/log/rippled/debug.log
+
+ ''
+ + optionalString (cfg.peerIp != null) ''
+ [peer_ip]
+ ${cfg.peerIp}
+
+ [peer_port]
+ ${toString cfg.peerPort}
+
+ ''
+ + cfg.extraConfig;
+
+ rippledCfgFile = pkgs.writeText "rippled.cfg" rippledCfg;
+
+in
+
+{
+
+ ###### interface
+
+ options = {
+
+ services.rippled = {
+
+ enable = mkOption {
+ default = false;
+ description = "Whether to enable rippled";
+ };
+
+ #
+ # Rippled has a simple configuration file layout that is easy to
+ # build with nix. Many of the options are defined here but are
+ # commented out until the code to append them to the config above
+ # is written and they are tested.
+ #
+ # If you find a yourself implementing more options, please submit a
+ # pull request.
+ #
+
+ /*
+ ips = mkOption {
+ default = [ "r.ripple.com 51235" ];
+ example = [ "192.168.0.1" "192.168.0.1 3939" "r.ripple.com 51235" ];
+ description = ''
+ List of hostnames or ips where the Ripple protocol is served.
+ For a starter list, you can either copy entries from:
+ https://ripple.com/ripple.txt or if you prefer you can let it
+ default to r.ripple.com 51235
+
+ A port may optionally be specified after adding a space to the
+ address. By convention, if known, IPs are listed in from most
+ to least trusted.
+ '';
+ };
+
+ ipsFixed = mkOption {
+ default = null;
+ example = [ "192.168.0.1" "192.168.0.1 3939" "r.ripple.com 51235" ];
+ description = ''
+ List of IP addresses or hostnames to which rippled should always
+ attempt to maintain peer connections with. This is useful for
+ manually forming private networks, for example to configure a
+ validation server that connects to the Ripple network through a
+ public-facing server, or for building a set of cluster peers.
+
+ A port may optionally be specified after adding a space to the address
+ '';
+ };
+ */
+
+ peerIp = mkOption {
+ default = null;
+ example = "0.0.0.0";
+ description = ''
+ IP address or domain to bind to allow external connections from peers.
+ Defaults to not binding, which disallows external connections from peers.
+ '';
+ };
+
+ peerPort = mkOption {
+ default = 51235;
+ description = ''
+ If peerIp is supplied, corresponding port to bind to for peer connections.
+ '';
+ };
+
+ /*
+ peerPortProxy = mkOption {
+ type = types.int;
+ example = 51236;
+ description = ''
+ An optional, additional listening port number for peers. Incoming
+ connections on this port will be required to provide a PROXY Protocol
+ handshake, described in this document (external link):
+
+ http://haproxy.1wt.eu/download/1.5/doc/proxy-protocol.txt
+
+ The PROXY Protocol is a popular method used by elastic load balancing
+ service providers such as Amazon, to identify the true IP address and
+ port number of external incoming connections.
+
+ In addition to enabling this setting, it will also be required to
+ use your provider-specific control panel or administrative web page
+ to configure your server instance to receive PROXY Protocol handshakes,
+ and also to restrict access to your instance to the Elastic Load Balancer.
+ '';
+ };
+
+ peerPrivate = mkOption {
+ default = null;
+ example = 0;
+ description = ''
+ 0: Request peers to broadcast your address. Normal outbound peer connections [default]
+ 1: Request peers not broadcast your address. Only connect to configured peers.
+ '';
+ };
+
+ peerSslCipherList = mkOption {
+ default = null;
+ example = "ALL:!LOW:!EXP:!MD5:@STRENGTH";
+ description = ''
+ A colon delimited string with the allowed SSL cipher modes for peer. The
+ choices for for ciphers are defined by the OpenSSL API function
+ SSL_CTX_set_cipher_list, documented here (external link):
+
+ http://pic.dhe.ibm.com/infocenter/tpfhelp/current/index.jsp?topic=%2Fcom.ibm.ztpf-ztpfdf.doc_put.cur%2Fgtpc2%2Fcpp_ssl_ctx_set_cipher_list.html
+
+ The default setting of "ALL:!LOW:!EXP:!MD5:@STRENGTH", which allows
+ non-authenticated peer connections (they are, however, secure).
+ '';
+ };
+
+ nodeSeed = mkOption {
+ default = null;
+ example = "RASH BUSH MILK LOOK BAD BRIM AVID GAFF BAIT ROT POD LOVE";
+ description = ''
+ This is used for clustering. To force a particular node seed or key, the
+ key can be set here. The format is the same as the validation_seed field.
+ To obtain a validation seed, use the rippled validation_create command.
+ '';
+ };
+
+ clusterNodes = mkOption {
+ default = null;
+ example = [ "n9KorY8QtTdRx7TVDpwnG9NvyxsDwHUKUEeDLY3AkiGncVaSXZi5" ];
+ description = ''
+ To extend full trust to other nodes, place their node public keys here.
+ Generally, you should only do this for nodes under common administration.
+ Node public keys start with an 'n'. To give a node a name for identification
+ place a space after the public key and then the name.
+ '';
+ };
+
+ sntpServers = mkOption {
+ default = null;
+ example = [ "time.nist.gov" "pool.ntp.org" ];
+ description = ''
+ IP address or domain of NTP servers to use for time synchronization.
+ '';
+ };
+
+ # TODO: websocket options
+
+ rpcAllowRemote = mkOption {
+ default = false;
+ description = ''
+ false: Allow RPC connections only from 127.0.0.1. [default]
+ true: Allow RPC connections from any IP.
+ '';
+ };
+
+ rpcAdminAllow = mkOption {
+ example = [ "10.0.0.4" ];
+ description = ''
+ List of IP addresses allowed to have admin access.
+ '';
+ };
+
+ rpcAdminUser = mkOption {
+ type = types.str;
+ description = ''
+ As a server, require this as the admin user to be specified. Also, require
+ rpc_admin_user and rpc_admin_password to be checked for RPC admin functions.
+ The request must specify these as the admin_user and admin_password in the
+ request object.
+ '';
+ };
+
+ rpcAdminPassword = mkOption {
+ type = types.str;
+ description = ''
+ As a server, require this as the admin pasword to be specified. Also,
+ require rpc_admin_user and rpc_admin_password to be checked for RPC admin
+ functions. The request must specify these as the admin_user and
+ admin_password in the request object.
+ '';
+ };
+
+ rpcIp = mkOption {
+ type = types.str;
+ description = ''
+ IP address or domain to bind to allow insecure RPC connections.
+ Defaults to not binding, which disallows RPC connections.
+ '';
+ };
+
+ rpcPort = mkOption {
+ type = types.int;
+ description = ''
+ If rpcIp is supplied, corresponding port to bind to for peer connections.
+ '';
+ };
+
+ rpcUser = mkOption {
+ type = types.str;
+ description = ''
+ Require a this user to specified and require rpcPassword to
+ be checked for RPC access via the rpcIp and rpcPort. The user and password
+ must be specified via HTTP's basic authentication method.
+ As a client, supply this to the server via HTTP's basic authentication
+ method.
+ '';
+ };
+
+ rpcPassword = mkOption {
+ type = types.str;
+ description = ''
+ Require a this password to specified and require rpc_user to
+ be checked for RPC access via the rpcIp and rpcPort. The user and password
+ must be specified via HTTP's basic authentication method.
+ As a client, supply this to the server via HTTP's basic authentication
+ method.
+ '';
+ };
+
+ rpcStartup = mkOption {
+ example = [ ''"command" : "log_level"'' ''"partition" : "ripplecalc"'' ''"severity" : "trace"'' ];
+ description = "List of RPC commands to run at startup.";
+ };
+
+ rpcSecure = mkOption {
+ default = false;
+ description = ''
+ false: Server certificates are not provided for RPC clients using SSL [default]
+ true: Client RPC connections wil be provided with SSL certificates.
+
+ Note that if rpc_secure is enabled, it will also be necessasry to configure the
+ certificate file settings located in rpcSslCert, rpcSslChain, and rpcSslKey
+ '';
+ };
+ */
+
+ extraConfig = mkOption {
+ default = "";
+ description = ''
+ Extra lines to be added verbatim to the rippled.cfg configuration file.
+ '';
+ };
+
+ };
+
+ };
+
+
+ ###### implementation
+
+ config = mkIf cfg.enable {
+
+ users.extraUsers = singleton
+ { name = "rippled";
+ description = "Ripple server user";
+ uid = config.ids.uids.rippled;
+ home = "/var/lib/rippled";
+ };
+
+ systemd.services.rippled = {
+ path = [ pkgs.rippled ];
+
+ after = [ "network.target" ];
+ wantedBy = [ "multi-user.target" ];
+
+ serviceConfig = {
+ ExecStart = "${pkgs.rippled}/bin/rippled --fg -q --conf ${rippledStateCfgFile}";
+ WorkingDirectory = "/var/lib/rippled";
+ };
+ };
+
+ networking.firewall.allowedTCPPorts = mkIf (cfg.peerIp != null) [ cfg.peerPort ];
+
+ system.activationScripts.rippled = ''
+ mkdir -p /var/{lib,log}/rippled
+ chown -R rippled /var/{lib,log}/rippled
+ ln -sf ${rippledCfgFile} ${rippledStateCfgFile}
+ '';
+ };
+}
diff --git a/nixos/modules/services/misc/rogue.nix b/nixos/modules/services/misc/rogue.nix
index de25cc0fb98..ed8da8a518f 100644
--- a/nixos/modules/services/misc/rogue.nix
+++ b/nixos/modules/services/misc/rogue.nix
@@ -1,9 +1,9 @@
# Execute the game `rogue' on tty 9. Mostly used by the NixOS
# installation CD.
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
let
diff --git a/nixos/modules/services/misc/svnserve.nix b/nixos/modules/services/misc/svnserve.nix
index b0806d14738..848905ca457 100644
--- a/nixos/modules/services/misc/svnserve.nix
+++ b/nixos/modules/services/misc/svnserve.nix
@@ -1,7 +1,7 @@
# SVN server
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
let
diff --git a/nixos/modules/services/misc/synergy.nix b/nixos/modules/services/misc/synergy.nix
index 63e7c7667e5..ec8ff426f0a 100644
--- a/nixos/modules/services/misc/synergy.nix
+++ b/nixos/modules/services/misc/synergy.nix
@@ -1,6 +1,6 @@
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
let
diff --git a/nixos/modules/services/monitoring/apcupsd.nix b/nixos/modules/services/monitoring/apcupsd.nix
index 38fd53653d6..6cc0c122ec6 100644
--- a/nixos/modules/services/monitoring/apcupsd.nix
+++ b/nixos/modules/services/monitoring/apcupsd.nix
@@ -1,6 +1,6 @@
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
let
cfg = config.services.apcupsd;
diff --git a/nixos/modules/services/monitoring/dd-agent.nix b/nixos/modules/services/monitoring/dd-agent.nix
index 37ce1c099df..bddf102ee51 100644
--- a/nixos/modules/services/monitoring/dd-agent.nix
+++ b/nixos/modules/services/monitoring/dd-agent.nix
@@ -1,6 +1,6 @@
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
let
cfg = config.services.dd-agent;
diff --git a/nixos/modules/services/monitoring/graphite.nix b/nixos/modules/services/monitoring/graphite.nix
index 3e2e7e9df6e..cb67b9d4fcb 100644
--- a/nixos/modules/services/monitoring/graphite.nix
+++ b/nixos/modules/services/monitoring/graphite.nix
@@ -1,6 +1,6 @@
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
let
cfg = config.services.graphite;
diff --git a/nixos/modules/services/monitoring/munin.nix b/nixos/modules/services/monitoring/munin.nix
index 39c4fb1aefa..966c2eca282 100644
--- a/nixos/modules/services/monitoring/munin.nix
+++ b/nixos/modules/services/monitoring/munin.nix
@@ -1,4 +1,4 @@
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
# TODO: support munin-async
# TODO: LWP/Pg perl libs aren't recognized
@@ -11,7 +11,7 @@
# nginx http://munin.readthedocs.org/en/latest/example/webserver/nginx.html
-with pkgs.lib;
+with lib;
let
nodeCfg = config.services.munin-node;
diff --git a/nixos/modules/services/monitoring/nagios/default.nix b/nixos/modules/services/monitoring/nagios/default.nix
index c809a3b8457..2eeddf78250 100644
--- a/nixos/modules/services/monitoring/nagios/default.nix
+++ b/nixos/modules/services/monitoring/nagios/default.nix
@@ -1,7 +1,7 @@
# Nagios system/network monitoring daemon.
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
let
diff --git a/nixos/modules/services/monitoring/smartd.nix b/nixos/modules/services/monitoring/smartd.nix
index 512e639721e..250035fe447 100644
--- a/nixos/modules/services/monitoring/smartd.nix
+++ b/nixos/modules/services/monitoring/smartd.nix
@@ -1,6 +1,6 @@
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
let
diff --git a/nixos/modules/services/monitoring/statsd.nix b/nixos/modules/services/monitoring/statsd.nix
index 54b7e79f82e..05950639c1e 100644
--- a/nixos/modules/services/monitoring/statsd.nix
+++ b/nixos/modules/services/monitoring/statsd.nix
@@ -1,6 +1,6 @@
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
let
diff --git a/nixos/modules/services/monitoring/systemhealth.nix b/nixos/modules/services/monitoring/systemhealth.nix
index 0a3e666ad4e..b0e59595e13 100644
--- a/nixos/modules/services/monitoring/systemhealth.nix
+++ b/nixos/modules/services/monitoring/systemhealth.nix
@@ -1,6 +1,6 @@
-{config, pkgs, ...}:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
let
cfg = config.services.systemhealth;
diff --git a/nixos/modules/services/monitoring/ups.nix b/nixos/modules/services/monitoring/ups.nix
index c00f4bad935..cc9026f768a 100644
--- a/nixos/modules/services/monitoring/ups.nix
+++ b/nixos/modules/services/monitoring/ups.nix
@@ -1,8 +1,8 @@
-{config, pkgs, ...}:
+{ config, lib, pkgs, ... }:
# TODO: This is not secure, have a look at the file docs/security.txt inside
# the project sources.
-with pkgs.lib;
+with lib;
let
cfg = config.power.ups;
diff --git a/nixos/modules/services/monitoring/zabbix-agent.nix b/nixos/modules/services/monitoring/zabbix-agent.nix
index 229236c1bbd..481298f763a 100644
--- a/nixos/modules/services/monitoring/zabbix-agent.nix
+++ b/nixos/modules/services/monitoring/zabbix-agent.nix
@@ -1,7 +1,7 @@
# Zabbix agent daemon.
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
let
diff --git a/nixos/modules/services/monitoring/zabbix-server.nix b/nixos/modules/services/monitoring/zabbix-server.nix
index 6735b4ca327..ca283ea2a99 100644
--- a/nixos/modules/services/monitoring/zabbix-server.nix
+++ b/nixos/modules/services/monitoring/zabbix-server.nix
@@ -1,7 +1,7 @@
# Zabbix server daemon.
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
let
diff --git a/nixos/modules/services/network-filesystems/drbd.nix b/nixos/modules/services/network-filesystems/drbd.nix
index 1a00ccab0a6..b914724abfe 100644
--- a/nixos/modules/services/network-filesystems/drbd.nix
+++ b/nixos/modules/services/network-filesystems/drbd.nix
@@ -1,8 +1,8 @@
# Support for DRBD, the Distributed Replicated Block Device.
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
let cfg = config.services.drbd; in
diff --git a/nixos/modules/services/network-filesystems/nfsd.nix b/nixos/modules/services/network-filesystems/nfsd.nix
index 4daa5e9d063..2217fec3b0f 100644
--- a/nixos/modules/services/network-filesystems/nfsd.nix
+++ b/nixos/modules/services/network-filesystems/nfsd.nix
@@ -1,6 +1,6 @@
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
let
diff --git a/nixos/modules/services/network-filesystems/rsyncd.nix b/nixos/modules/services/network-filesystems/rsyncd.nix
new file mode 100644
index 00000000000..bc17add809b
--- /dev/null
+++ b/nixos/modules/services/network-filesystems/rsyncd.nix
@@ -0,0 +1,139 @@
+{ config, pkgs, ... }:
+
+with pkgs.lib;
+
+let
+
+ cfg = config.services.rsyncd;
+
+ motdFile = pkgs.writeText "rsyncd-motd" cfg.motd;
+
+ rsyncdCfg = ""
+ + optionalString (cfg.motd != "") "motd file = ${motdFile}\n"
+ + optionalString (cfg.address != "") "address = ${cfg.address}\n"
+ + optionalString (cfg.port != 873) "port = ${toString cfg.port}\n"
+ + cfg.extraConfig
+ + "\n"
+ + flip concatMapStrings cfg.modules (m: "[${m.name}]\n\tpath = ${m.path}\n"
+ + optionalString (m.comment != "") "\tcomment = ${m.comment}\n"
+ + m.extraConfig
+ + "\n"
+ );
+
+ rsyncdCfgFile = pkgs.writeText "rsyncd.conf" rsyncdCfg;
+
+in
+
+{
+ options = {
+
+ services.rsyncd = {
+
+ enable = mkOption {
+ default = false;
+ description = "Whether to enable the rsync daemon.";
+ };
+
+ motd = mkOption {
+ type = types.string;
+ default = "";
+ description = ''
+ Message of the day to display to clients on each connect.
+ This usually contains site information and any legal notices.
+ '';
+ };
+
+ port = mkOption {
+ default = 873;
+ type = types.int;
+ description = "TCP port the daemon will listen on.";
+ };
+
+ address = mkOption {
+ default = "";
+ example = "192.168.1.2";
+ description = ''
+ IP address the daemon will listen on; rsyncd will listen on
+ all addresses if this is not specified.
+ '';
+ };
+
+ extraConfig = mkOption {
+ type = types.lines;
+ default = "";
+ description = ''
+ Lines of configuration to add to rsyncd globally.
+ See man rsyncd.conf for more options.
+ '';
+ };
+
+ modules = mkOption {
+ default = [ ];
+ example = [
+ { name = "ftp";
+ path = "/home/ftp";
+ comment = "ftp export area";
+ extraConfig = ''
+ secrets file = /etc/rsyncd.secrets
+ '';
+ }
+ ];
+ description = "The list of file paths to export.";
+ type = types.listOf types.optionSet;
+
+ options = {
+
+ name = mkOption {
+ example = "ftp";
+ type = types.string;
+ description = "Name of export module.";
+ };
+
+ comment = mkOption {
+ default = "";
+ description = ''
+ Description string that is displayed next to the module name
+ when clients obtain a list of available modules.
+ '';
+ };
+
+ path = mkOption {
+ example = "/home/ftp";
+ type = types.string;
+ description = "Directory to make available in this module.";
+ };
+
+ extraConfig = mkOption {
+ type = types.lines;
+ default = "";
+ description = ''
+ Lines of configuration to add to this module.
+ See man rsyncd.conf for more options.
+ '';
+ };
+ };
+ };
+ };
+ };
+
+ ###### implementation
+
+ config = mkIf cfg.enable {
+
+ environment.etc = singleton
+ { source = rsyncdCfgFile;
+ target = "rsyncd.conf";
+ };
+
+ systemd.services.rsyncd = {
+ description = "Rsync daemon";
+ wantedBy = [ "multi-user.target" ];
+
+ path = [ pkgs.rsync ];
+
+ serviceConfig.ExecStart = "${pkgs.rsync}/bin/rsync --daemon --no-detach";
+ };
+
+ networking.firewall.allowedTCPPorts = [ cfg.port ];
+ };
+}
\ No newline at end of file
diff --git a/nixos/modules/services/network-filesystems/samba.nix b/nixos/modules/services/network-filesystems/samba.nix
index 4f6fce6cd52..51a4d193d50 100644
--- a/nixos/modules/services/network-filesystems/samba.nix
+++ b/nixos/modules/services/network-filesystems/samba.nix
@@ -1,6 +1,6 @@
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
let
diff --git a/nixos/modules/services/networking/amuled.nix b/nixos/modules/services/networking/amuled.nix
index 8652d0daf4c..516238fdddf 100644
--- a/nixos/modules/services/networking/amuled.nix
+++ b/nixos/modules/services/networking/amuled.nix
@@ -1,6 +1,6 @@
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
let
cfg = config.services.amule;
diff --git a/nixos/modules/services/networking/avahi-daemon.nix b/nixos/modules/services/networking/avahi-daemon.nix
index 2256de89630..284b2b84e6c 100644
--- a/nixos/modules/services/networking/avahi-daemon.nix
+++ b/nixos/modules/services/networking/avahi-daemon.nix
@@ -1,7 +1,7 @@
# Avahi daemon.
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
let
@@ -142,6 +142,10 @@ in
services.dbus.enable = true;
services.dbus.packages = [avahi];
+ # Enabling Avahi without exposing it in the firewall doesn't make
+ # sense.
+ networking.firewall.allowedUDPPorts = [ 5353 ];
+
};
}
diff --git a/nixos/modules/services/networking/bind.nix b/nixos/modules/services/networking/bind.nix
index 765dc014dcb..57547da1006 100644
--- a/nixos/modules/services/networking/bind.nix
+++ b/nixos/modules/services/networking/bind.nix
@@ -1,6 +1,6 @@
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
let
diff --git a/nixos/modules/services/networking/bitlbee.nix b/nixos/modules/services/networking/bitlbee.nix
index fe37e8ea012..7276603da16 100644
--- a/nixos/modules/services/networking/bitlbee.nix
+++ b/nixos/modules/services/networking/bitlbee.nix
@@ -1,6 +1,6 @@
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
let
diff --git a/nixos/modules/services/networking/btsync.nix b/nixos/modules/services/networking/btsync.nix
index e7fb471ccf4..8b288a713c6 100644
--- a/nixos/modules/services/networking/btsync.nix
+++ b/nixos/modules/services/networking/btsync.nix
@@ -1,6 +1,6 @@
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
let
cfg = config.services.btsync;
@@ -24,7 +24,7 @@ let
optionalString (e ? "knownHosts")
(concatStringsSep "," (map (v: "\"${v}\"") e."knownHosts"));
- sharedFoldersRecord = with pkgs.lib;
+ sharedFoldersRecord =
concatStringsSep "," (map (entry:
let helper = attr: v:
if (entry ? attr) then boolStr entry.attr else boolStr v;
diff --git a/nixos/modules/services/networking/chrony.nix b/nixos/modules/services/networking/chrony.nix
index 5e9818858e0..d1684dd9f05 100644
--- a/nixos/modules/services/networking/chrony.nix
+++ b/nixos/modules/services/networking/chrony.nix
@@ -1,6 +1,6 @@
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
let
diff --git a/nixos/modules/services/networking/cjdns.nix b/nixos/modules/services/networking/cjdns.nix
new file mode 100644
index 00000000000..9306ffd5a18
--- /dev/null
+++ b/nixos/modules/services/networking/cjdns.nix
@@ -0,0 +1,207 @@
+# You may notice the commented out sections in this file,
+# it would be great to configure cjdns from nix, but cjdns
+# reads its configuration from stdin, including the private
+# key and admin password, all nested in a JSON structure.
+#
+# Until a good method of storing the keys outside the nix
+# store and mixing them back into a string is devised
+# (without too much shell hackery), a skeleton of the
+# configuration building lies commented out.
+
+{ config, lib, pkgs, ... }:
+
+with lib;
+
+let
+
+ cfg = config.services.cjdns;
+
+ /*
+ # can't keep keys and passwords in the nix store,
+ # but don't want to deal with this stdin quagmire.
+
+ cjdrouteConf = '' {
+ "admin": {"bind": "${cfg.admin.bind}", "password": "\${CJDNS_ADMIN}" },
+ "privateKey": "\${CJDNS_KEY}",
+
+ "interfaces": {
+ ''
+
+ + optionalString (cfg.interfaces.udp.bind.address != null) ''
+ "UDPInterface": [ {
+ "bind": "${cfg.interfaces.udp.bind.address}:"''
+ ${if cfg.interfaces.upd.bind.port != null
+ then ${toString cfg.interfaces.udp.bind.port}
+ else ${RANDOM}
+ fi)
+ + '' } ]''
+
+ + (if cfg.interfaces.eth.bind != null then ''
+ "ETHInterface": [ {
+ "bind": "${cfg.interfaces.eth.bind}",
+ "beacon": ${toString cfg.interfaces.eth.beacon}
+ } ]
+ '' fi )
+ + ''
+ },
+ "router": { "interface": { "type": "TUNInterface" }, },
+ "security": [ { "setuser": "nobody" } ]
+ }
+ '';
+
+ cjdrouteConfFile = pkgs.writeText "cjdroute.conf" cjdrouteConf
+ */
+in
+
+{
+ options = {
+
+ services.cjdns = {
+
+ enable = mkOption {
+ type = types.bool;
+ default = false;
+ description = ''
+ Enable this option to start a instance of the
+ cjdns network encryption and and routing engine.
+ Configuration will be read from confFile.
+ '';
+ };
+
+ confFile = mkOption {
+ default = "/etc/cjdroute.conf";
+ description = ''
+ Configuration file to pipe to cjdroute.
+ '';
+ };
+
+ /*
+ admin = {
+ bind = mkOption {
+ default = "127.0.0.1:11234";
+ description = ''
+ Bind the administration port to this address and port.
+ '';
+ };
+
+ passwordFile = mkOption {
+ example = "/root/cjdns.adminPassword";
+ description = ''
+ File containing a password to the administration port.
+ '';
+ };
+ };
+
+ keyFile = mkOption {
+ type = types.str;
+ example = "/root/cjdns.key";
+ description = ''
+ Path to a file containing a cjdns private key on a single line.
+ '';
+ };
+
+ passwordsFile = mkOption {
+ type = types.str;
+ default = null;
+ example = "/root/cjdns.authorizedPasswords";
+ description = ''
+ A file containing a list of json dictionaries with passwords.
+ For example:
+ {"password": "s8xf5z7znl4jt05g922n3wpk75wkypk"},
+ { "name": "nice guy",
+ "password": "xhthk1mglz8tpjrbbvdlhyc092rhpx5"},
+ {"password": "3qfxyhmrht7uwzq29pmhbdm9w4bnc8w"}
+ '';
+ };
+
+ interfaces = {
+ udp = {
+ bind = {
+ address = mkOption {
+ default = "0.0.0.0";
+ description = ''
+ Address to bind UDP tunnels to; disable by setting to null;
+ '';
+ };
+ port = mkOption {
+ type = types.int;
+ default = null;
+ description = ''
+ Port to bind UDP tunnels to.
+ A port will be choosen at random if this is not set.
+ This option is required to act as the server end of
+ a tunnel.
+ '';
+ };
+ };
+ };
+
+ eth = {
+ bind = mkOption {
+ default = null;
+ example = "eth0";
+ description = ''
+ Bind to this device and operate with native wire format.
+ '';
+ };
+
+ beacon = mkOption {
+ default = 2;
+ description = ''
+ Auto-connect to other cjdns nodes on the same network.
+ Options:
+ 0 -- Disabled.
+
+ 1 -- Accept beacons, this will cause cjdns to accept incoming
+ beacon messages and try connecting to the sender.
+
+ 2 -- Accept and send beacons, this will cause cjdns to broadcast
+ messages on the local network which contain a randomly
+ generated per-session password, other nodes which have this
+ set to 1 or 2 will hear the beacon messages and connect
+ automatically.
+ '';
+ };
+
+ connectTo = mkOption {
+ type = types.listOf types.str;
+ default = [];
+ description = ''
+ Credentials for connecting look similar to UDP credientials
+ except they begin with the mac address, for example:
+ "01:02:03:04:05:06":{"password":"a","publicKey":"b"}
+ '';
+ };
+ };
+ };
+ */
+ };
+ };
+
+ config = mkIf config.services.cjdns.enable {
+
+ boot.kernelModules = [ "tun" ];
+
+ /*
+ networking.firewall.allowedUDPPorts = mkIf (cfg.udp.bind.port != null) [
+ cfg.udp.bind.port
+ ];
+ */
+
+ systemd.services.cjdns = {
+ description = "encrypted networking for everybody";
+ wantedBy = [ "multi-user.target" ];
+ wants = [ "network.target" ];
+ before = [ "network.target" ];
+ path = [ pkgs.cjdns ];
+
+ serviceConfig = {
+ Type = "forking";
+ ExecStart = ''
+ ${pkgs.stdenv.shell} -c "${pkgs.cjdns}/sbin/cjdroute < ${cfg.confFile}"
+ '';
+ Restart = "on-failure";
+ };
+ };
+ };
+}
diff --git a/nixos/modules/services/networking/cntlm.nix b/nixos/modules/services/networking/cntlm.nix
index 96396878afc..a50aa4d0636 100644
--- a/nixos/modules/services/networking/cntlm.nix
+++ b/nixos/modules/services/networking/cntlm.nix
@@ -1,6 +1,6 @@
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
let
@@ -34,7 +34,7 @@ in
password = mkOption {
default = "/etc/cntlm.password";
- type = with pkgs.lib.types; string;
+ type = types.str;
description = ''Proxy account password. Note: use chmod 0600 on /etc/cntlm.password for security.'';
};
diff --git a/nixos/modules/services/networking/connman.nix b/nixos/modules/services/networking/connman.nix
index 2b26fe88129..7ed1e4805d8 100644
--- a/nixos/modules/services/networking/connman.nix
+++ b/nixos/modules/services/networking/connman.nix
@@ -1,6 +1,6 @@
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
with pkgs;
let
diff --git a/nixos/modules/services/networking/dhcpcd.nix b/nixos/modules/services/networking/dhcpcd.nix
index 37f607b0815..8c3f651e434 100644
--- a/nixos/modules/services/networking/dhcpcd.nix
+++ b/nixos/modules/services/networking/dhcpcd.nix
@@ -1,6 +1,6 @@
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
let
@@ -34,8 +34,9 @@ let
# 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*
+ # (Xen) and virbr* and vnet* (libvirt) and c-* and ctmp-* (NixOS
+ # containers).
+ denyinterfaces ${toString ignoredInterfaces} peth* vif* tap* tun* virbr* vnet* vboxnet* c-* ctmp-*
${config.networking.dhcpcd.extraConfig}
'';
diff --git a/nixos/modules/services/networking/dhcpd.nix b/nixos/modules/services/networking/dhcpd.nix
index 5b2058e4e12..89f686c2870 100644
--- a/nixos/modules/services/networking/dhcpd.nix
+++ b/nixos/modules/services/networking/dhcpd.nix
@@ -1,6 +1,6 @@
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
let
diff --git a/nixos/modules/services/networking/dnsmasq.nix b/nixos/modules/services/networking/dnsmasq.nix
index b726493d421..8e38b9d017a 100644
--- a/nixos/modules/services/networking/dnsmasq.nix
+++ b/nixos/modules/services/networking/dnsmasq.nix
@@ -1,6 +1,6 @@
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
let
cfg = config.services.dnsmasq;
diff --git a/nixos/modules/services/networking/ejabberd.nix b/nixos/modules/services/networking/ejabberd.nix
index 8a01c217eb5..28b8e234a5c 100644
--- a/nixos/modules/services/networking/ejabberd.nix
+++ b/nixos/modules/services/networking/ejabberd.nix
@@ -1,6 +1,6 @@
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
let
diff --git a/nixos/modules/services/networking/firewall.nix b/nixos/modules/services/networking/firewall.nix
index 07e05fa6d05..c2941e12261 100644
--- a/nixos/modules/services/networking/firewall.nix
+++ b/nixos/modules/services/networking/firewall.nix
@@ -20,9 +20,9 @@
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
let
@@ -32,9 +32,9 @@ let
''
# Helper command to manipulate both the IPv4 and IPv6 tables.
ip46tables() {
- iptables "$@"
+ iptables -w "$@"
${optionalString config.networking.enableIPv6 ''
- ip6tables "$@"
+ ip6tables -w "$@"
''}
}
'';
@@ -54,7 +54,7 @@ in
networking.firewall.enable = mkOption {
type = types.bool;
- default = false;
+ default = true;
description =
''
Whether to enable the firewall. This is a simple stateful
@@ -386,7 +386,7 @@ in
# Optionally respond to ICMPv4 pings.
${optionalString cfg.allowPing ''
- iptables -A nixos-fw -p icmp --icmp-type echo-request ${optionalString (cfg.pingLimit != null)
+ iptables -w -A nixos-fw -p icmp --icmp-type echo-request ${optionalString (cfg.pingLimit != null)
"-m limit ${cfg.pingLimit} "
}-j nixos-fw-accept
''}
diff --git a/nixos/modules/services/networking/flashpolicyd.nix b/nixos/modules/services/networking/flashpolicyd.nix
index f5bc550ab5f..5ba85178179 100644
--- a/nixos/modules/services/networking/flashpolicyd.nix
+++ b/nixos/modules/services/networking/flashpolicyd.nix
@@ -1,6 +1,6 @@
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
let
diff --git a/nixos/modules/services/networking/freenet.nix b/nixos/modules/services/networking/freenet.nix
index a4bd2098986..e9cacf4a16e 100644
--- a/nixos/modules/services/networking/freenet.nix
+++ b/nixos/modules/services/networking/freenet.nix
@@ -1,8 +1,8 @@
# NixOS module for Freenet daemon
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
let
diff --git a/nixos/modules/services/networking/git-daemon.nix b/nixos/modules/services/networking/git-daemon.nix
index 2e7c9c68e2f..5864efaca51 100644
--- a/nixos/modules/services/networking/git-daemon.nix
+++ b/nixos/modules/services/networking/git-daemon.nix
@@ -1,5 +1,5 @@
-{pkgs, config, ...}:
-with pkgs.lib;
+{ config, lib, pkgs, ... }:
+with lib;
let
cfg = config.services.gitDaemon;
diff --git a/nixos/modules/services/networking/gnunet.nix b/nixos/modules/services/networking/gnunet.nix
index 421c0d9bb69..03ee54af433 100644
--- a/nixos/modules/services/networking/gnunet.nix
+++ b/nixos/modules/services/networking/gnunet.nix
@@ -1,6 +1,6 @@
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
let
diff --git a/nixos/modules/services/networking/gogoclient.nix b/nixos/modules/services/networking/gogoclient.nix
index 3b92eb8b06b..41600794197 100644
--- a/nixos/modules/services/networking/gogoclient.nix
+++ b/nixos/modules/services/networking/gogoclient.nix
@@ -1,6 +1,6 @@
-{pkgs, config, ...}:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
let cfg = config.services.gogoclient;
in
diff --git a/nixos/modules/services/networking/haproxy.nix b/nixos/modules/services/networking/haproxy.nix
index c8345a528a7..c2e2c2d7a41 100644
--- a/nixos/modules/services/networking/haproxy.nix
+++ b/nixos/modules/services/networking/haproxy.nix
@@ -1,9 +1,9 @@
-{ config, pkgs, ...}:
+{ config, lib, pkgs, ... }:
let
cfg = config.services.haproxy;
haproxyCfg = pkgs.writeText "haproxy.conf" cfg.config;
in
-with pkgs.lib;
+with lib;
{
options = {
services.haproxy = {
diff --git a/nixos/modules/services/networking/hostapd.nix b/nixos/modules/services/networking/hostapd.nix
index 4edea12b6be..2adbb0a5c4e 100644
--- a/nixos/modules/services/networking/hostapd.nix
+++ b/nixos/modules/services/networking/hostapd.nix
@@ -1,4 +1,4 @@
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
# TODO:
#
@@ -9,7 +9,7 @@
# 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;
+with lib;
let
diff --git a/nixos/modules/services/networking/ifplugd.nix b/nixos/modules/services/networking/ifplugd.nix
index 4e939d60354..20bfca8f872 100644
--- a/nixos/modules/services/networking/ifplugd.nix
+++ b/nixos/modules/services/networking/ifplugd.nix
@@ -1,6 +1,6 @@
-{pkgs, config, ...}:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
let
diff --git a/nixos/modules/services/networking/iodined.nix b/nixos/modules/services/networking/iodined.nix
index cd150fe63fd..bc0fbb42c99 100644
--- a/nixos/modules/services/networking/iodined.nix
+++ b/nixos/modules/services/networking/iodined.nix
@@ -1,8 +1,8 @@
# NixOS module for iodine, ip over dns daemon
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
let
cfg = config.services.iodined;
diff --git a/nixos/modules/services/networking/ircd-hybrid/default.nix b/nixos/modules/services/networking/ircd-hybrid/default.nix
index cd82a41ef7a..a3d5b71740f 100644
--- a/nixos/modules/services/networking/ircd-hybrid/default.nix
+++ b/nixos/modules/services/networking/ircd-hybrid/default.nix
@@ -1,6 +1,6 @@
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
let
diff --git a/nixos/modules/services/networking/kippo.nix b/nixos/modules/services/networking/kippo.nix
index 164c38940f7..d2045c9efc5 100644
--- a/nixos/modules/services/networking/kippo.nix
+++ b/nixos/modules/services/networking/kippo.nix
@@ -6,8 +6,8 @@
# iptables -t nat -A PREROUTING -i IN_IFACE -p tcp --dport 22 -j REDIRECT --to-port 2222'';
#
# Lastly: use this service at your own risk. I am working on a way to run this inside a VM.
-{ pkgs, config, ... }:
-with pkgs.lib;
+{ config, lib, pkgs, ... }:
+with lib;
let
cfg = config.services.kippo;
in
diff --git a/nixos/modules/services/networking/minidlna.nix b/nixos/modules/services/networking/minidlna.nix
index 73fcb1eeea8..a519857d6a0 100644
--- a/nixos/modules/services/networking/minidlna.nix
+++ b/nixos/modules/services/networking/minidlna.nix
@@ -1,8 +1,8 @@
# Module for MiniDLNA, a simple DLNA server.
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
let
diff --git a/nixos/modules/services/networking/murmur.nix b/nixos/modules/services/networking/murmur.nix
new file mode 100644
index 00000000000..4f91a494747
--- /dev/null
+++ b/nixos/modules/services/networking/murmur.nix
@@ -0,0 +1,253 @@
+{ config, lib, pkgs, ... }:
+
+with lib;
+
+let
+ cfg = config.services.murmur;
+ configFile = pkgs.writeText "murmurd.ini" ''
+ database=/var/lib/murmur/murmur.sqlite
+ dbDriver=QSQLITE
+
+ autobanAttempts=${toString cfg.autobanAttempts}
+ autobanTimeframe=${toString cfg.autobanTimeframe}
+ autobanTime=${toString cfg.autobanTime}
+
+ logfile=/var/log/murmur/murmurd.log
+ pidfile=${cfg.pidfile}
+
+ welcome="${cfg.welcome}"
+ port=${toString cfg.port}
+
+ ${if cfg.hostName == "" then "" else "host="+cfg.hostName}
+ ${if cfg.password == "" then "" else "serverpassword="+cfg.password}
+
+ bandwidth=${toString cfg.bandwidth}
+ users=${toString cfg.users}
+
+ textmessagelength=${toString cfg.textMsgLength}
+ imagemessagelength=${toString cfg.imgMsgLength}
+ allowhtml=${if cfg.allowHtml then "true" else "false"}
+ logdays=${toString cfg.logDays}
+ bonjour=${if cfg.bonjour then "true" else "false"}
+ sendversion=${if cfg.sendVersion then "true" else "false"}
+
+ ${if cfg.registerName == "" then "" else "registerName="+cfg.registerName}
+ ${if cfg.registerPassword == "" then "" else "registerPassword="+cfg.registerPassword}
+ ${if cfg.registerUrl == "" then "" else "registerUrl="+cfg.registerUrl}
+ ${if cfg.registerHostname == "" then "" else "registerHostname="+cfg.registerHostname}
+
+ certrequired=${if cfg.clientCertRequired then "true" else "false"}
+ ${if cfg.sslCert == "" then "" else "sslCert="+cfg.sslCert}
+ ${if cfg.sslKey == "" then "" else "sslKey="+cfg.sslKey}
+ '';
+in
+{
+ options = {
+ services.murmur = {
+ enable = mkOption {
+ type = types.bool;
+ default = false;
+ description = "If enabled, start the Murmur Service.";
+ };
+
+ autobanAttempts = mkOption {
+ type = types.int;
+ default = 10;
+ description = ''
+ Number of attempts a client is allowed to make in
+ autobanTimeframe seconds, before being
+ banned for autobanTime.
+ '';
+ };
+
+ autobanTimeframe = mkOption {
+ type = types.int;
+ default = 120;
+ description = ''
+ Timeframe in which a client can connect without being banned
+ for repeated attempts (in seconds).
+ '';
+ };
+
+ autobanTime = mkOption {
+ type = types.int;
+ default = 300;
+ description = "The amount of time an IP ban lasts (in seconds).";
+ };
+
+ pidfile = mkOption {
+ type = types.path;
+ default = "/tmp/murmurd.pid";
+ description = "Path to PID file for Murmur daemon.";
+ };
+
+ welcome = mkOption {
+ type = types.str;
+ default = "";
+ description = "Welcome message for connected clients.";
+ };
+
+ port = mkOption {
+ type = types.int;
+ default = 64738;
+ description = "Ports to bind to (UDP and TCP).";
+ };
+
+ hostName = mkOption {
+ type = types.str;
+ default = "";
+ description = "Host to bind to. Defaults binding on all addresses.";
+ };
+
+ password = mkOption {
+ type = types.str;
+ default = "";
+ description = "Required password to join server, if specified.";
+ };
+
+ bandwidth = mkOption {
+ type = types.int;
+ default = 72000;
+ description = ''
+ Maximum bandwidth (in bits per second) that clients may send
+ speech at.
+ '';
+ };
+
+ users = mkOption {
+ type = types.int;
+ default = 100;
+ description = "Maximum number of concurrent clients allowed.";
+ };
+
+ textMsgLength = mkOption {
+ type = types.int;
+ default = 5000;
+ description = "Max length of text messages. Set 0 for no limit.";
+ };
+
+ imgMsgLength = mkOption {
+ type = types.int;
+ default = 131072;
+ description = "Max length of image messages. Set 0 for no limit.";
+ };
+
+ allowHtml = mkOption {
+ type = types.bool;
+ default = true;
+ description = ''
+ Allow HTML in client messages, comments, and channel
+ descriptions.
+ '';
+ };
+
+ logDays = mkOption {
+ type = types.int;
+ default = 31;
+ description = ''
+ How long to store RPC logs for in the database. Set 0 to
+ keep logs forever, or -1 to disable DB logging.
+ '';
+ };
+
+ bonjour = mkOption {
+ type = types.bool;
+ default = false;
+ description = ''
+ Enable Bonjour auto-discovery, which allows clients over
+ your LAN to automatically discover Murmur servers.
+ '';
+ };
+
+ sendVersion = mkOption {
+ type = types.bool;
+ default = true;
+ description = "Send Murmur version in UDP response.";
+ };
+
+ registerName = mkOption {
+ type = types.str;
+ default = "";
+ description = ''
+ Public server registration name, and also the name of the
+ Root channel. Even if you don't publicly register your
+ server, you probably still want to set this.
+ '';
+ };
+
+ registerPassword = mkOption {
+ type = types.str;
+ default = "";
+ description = ''
+ Public server registry password, used authenticate your
+ server to the registry to prevent impersonation; required for
+ subsequent registry updates.
+ '';
+ };
+
+ registerUrl = mkOption {
+ type = types.str;
+ default = "";
+ description = "URL website for your server.";
+ };
+
+ registerHostname = mkOption {
+ type = types.str;
+ default = "";
+ description = ''
+ DNS hostname where your server can be reached. This is only
+ needed if you want your server to be accessed by its
+ hostname and not IP - but the name *must* resolve on the
+ internet properly.
+ '';
+ };
+
+ clientCertRequired = mkOption {
+ type = types.bool;
+ default = false;
+ description = "Require clients to authenticate via certificates.";
+ };
+
+ sslCert = mkOption {
+ type = types.str;
+ default = "";
+ description = "Path to your SSL certificate.";
+ };
+
+ sslKey = mkOption {
+ type = types.str;
+ default = "";
+ description = "Path to your SSL key.";
+ };
+ };
+ };
+
+ config = mkIf cfg.enable {
+ users.extraUsers.murmur = {
+ description = "Murmur Service user";
+ home = "/var/lib/murmur";
+ createHome = true;
+ uid = config.ids.uids.murmur;
+ };
+
+ systemd.services.murmur = {
+ description = "Murmur Chat Service";
+ wantedBy = [ "multi-user.target" ];
+ after = [ "network.target "];
+
+ serviceConfig = {
+ Type = "forking";
+ PIDFile = cfg.pidfile;
+ Restart = "always";
+ User = "murmur";
+ ExecStart = "${pkgs.murmur}/bin/murmurd -ini ${configFile}";
+ PermissionsStartOnly = true;
+ };
+
+ preStart = ''
+ mkdir -p /var/log/murmur
+ chown -R murmur /var/log/murmur
+ '';
+ };
+ };
+}
diff --git a/nixos/modules/services/networking/nat.nix b/nixos/modules/services/networking/nat.nix
index ce28f018828..e8d9d00cc0a 100644
--- a/nixos/modules/services/networking/nat.nix
+++ b/nixos/modules/services/networking/nat.nix
@@ -2,14 +2,16 @@
# XXX: todo: support multiple upstream links
# see http://yesican.chsoft.biz/lartc/MultihomedLinuxNetworking.html
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
let
cfg = config.networking.nat;
+ dest = if cfg.externalIP == null then "-j MASQUERADE" else "-j SNAT --to-source ${cfg.externalIP}";
+
in
{
@@ -27,14 +29,27 @@ in
'';
};
+ networking.nat.internalInterfaces = mkOption {
+ type = types.listOf types.str;
+ default = [];
+ example = [ "eth0" ];
+ description =
+ ''
+ The interfaces for which to perform NAT. Packets coming from
+ these interface and destined for the external interface will
+ be rewritten.
+ '';
+ };
+
networking.nat.internalIPs = mkOption {
type = types.listOf types.str;
- example = [ "192.168.1.0/24" ] ;
+ default = [];
+ 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.
+ coming from these addresses (on any interface) and destined
+ for the external interface will be rewritten.
'';
};
@@ -80,25 +95,37 @@ in
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 == null
- then "-j MASQUERADE"
- else "-j SNAT --to-source ${cfg.externalIP}"}
- ''
- ) cfg.internalIPs) +
- ''
+ iptables -w -t nat -F PREROUTING
+ iptables -w -t nat -F POSTROUTING
+ iptables -w -t nat -X
+
+ # We can't match on incoming interface in POSTROUTING, so
+ # mark packets coming from the external interfaces.
+ ${concatMapStrings (iface: ''
+ iptables -w -t nat -A PREROUTING \
+ -i '${iface}' -j MARK --set-mark 1
+ '') cfg.internalInterfaces}
+
+ # NAT the marked packets.
+ ${optionalString (cfg.internalInterfaces != []) ''
+ iptables -w -t nat -A POSTROUTING -m mark --mark 1 \
+ -o ${cfg.externalInterface} ${dest}
+ ''}
+
+ # NAT packets coming from the internal IPs.
+ ${concatMapStrings (range: ''
+ iptables -w -t nat -A POSTROUTING \
+ -s '${range}' -o ${cfg.externalInterface} ${dest}
+ '') cfg.internalIPs}
+
echo 1 > /proc/sys/net/ipv4/ip_forward
'';
postStop =
''
- iptables -t nat -F POSTROUTING
+ iptables -w -t nat -F PREROUTING
+ iptables -w -t nat -F POSTROUTING
+ iptables -w -t nat -X
'';
};
};
diff --git a/nixos/modules/services/networking/networkmanager.nix b/nixos/modules/services/networking/networkmanager.nix
index fd5ff5e4498..54bdf19373d 100644
--- a/nixos/modules/services/networking/networkmanager.nix
+++ b/nixos/modules/services/networking/networkmanager.nix
@@ -1,6 +1,6 @@
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
with pkgs;
let
diff --git a/nixos/modules/services/networking/notbit.nix b/nixos/modules/services/networking/notbit.nix
index 83dafd08379..b9743504239 100644
--- a/nixos/modules/services/networking/notbit.nix
+++ b/nixos/modules/services/networking/notbit.nix
@@ -1,4 +1,4 @@
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
let
cfg = config.services.notbit;
@@ -16,7 +16,7 @@ let
};
in
-with pkgs.lib;
+with lib;
{
### configuration
diff --git a/nixos/modules/services/networking/ntopng.nix b/nixos/modules/services/networking/ntopng.nix
index 156a6b32a6a..ab86f1a5b2b 100644
--- a/nixos/modules/services/networking/ntopng.nix
+++ b/nixos/modules/services/networking/ntopng.nix
@@ -1,6 +1,6 @@
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
let
diff --git a/nixos/modules/services/networking/ntpd.nix b/nixos/modules/services/networking/ntpd.nix
index 3d388cb1064..2f638904406 100644
--- a/nixos/modules/services/networking/ntpd.nix
+++ b/nixos/modules/services/networking/ntpd.nix
@@ -1,6 +1,6 @@
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
let
@@ -36,7 +36,7 @@ in
services.ntp = {
enable = mkOption {
- default = true;
+ default = !config.boot.isContainer;
description = ''
Whether to synchronise your machine's time using the NTP
protocol.
diff --git a/nixos/modules/services/networking/oidentd.nix b/nixos/modules/services/networking/oidentd.nix
index a2a555a8ad1..923e7cd0986 100644
--- a/nixos/modules/services/networking/oidentd.nix
+++ b/nixos/modules/services/networking/oidentd.nix
@@ -1,6 +1,6 @@
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
{
diff --git a/nixos/modules/services/networking/openfire.nix b/nixos/modules/services/networking/openfire.nix
index b2efb5e9c12..c3b4ba90b4e 100644
--- a/nixos/modules/services/networking/openfire.nix
+++ b/nixos/modules/services/networking/openfire.nix
@@ -1,6 +1,6 @@
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
let
diff --git a/nixos/modules/services/networking/openvpn.nix b/nixos/modules/services/networking/openvpn.nix
index 292d45f4347..e3998b1e5b2 100644
--- a/nixos/modules/services/networking/openvpn.nix
+++ b/nixos/modules/services/networking/openvpn.nix
@@ -1,6 +1,6 @@
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
let
diff --git a/nixos/modules/services/networking/prayer.nix b/nixos/modules/services/networking/prayer.nix
index fb541bf101a..ad0fb0af01c 100644
--- a/nixos/modules/services/networking/prayer.nix
+++ b/nixos/modules/services/networking/prayer.nix
@@ -1,6 +1,6 @@
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
let
diff --git a/nixos/modules/services/networking/privoxy.nix b/nixos/modules/services/networking/privoxy.nix
index 89c40c53157..950112b2dab 100644
--- a/nixos/modules/services/networking/privoxy.nix
+++ b/nixos/modules/services/networking/privoxy.nix
@@ -1,6 +1,6 @@
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
let
diff --git a/nixos/modules/services/networking/quassel.nix b/nixos/modules/services/networking/quassel.nix
index f3a4e457ec8..749e5dcebb6 100644
--- a/nixos/modules/services/networking/quassel.nix
+++ b/nixos/modules/services/networking/quassel.nix
@@ -1,6 +1,6 @@
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
let
quassel = pkgs.kde4.quasselDaemon;
diff --git a/nixos/modules/services/networking/radvd.nix b/nixos/modules/services/networking/radvd.nix
index 8d586ce6e46..08762c9c837 100644
--- a/nixos/modules/services/networking/radvd.nix
+++ b/nixos/modules/services/networking/radvd.nix
@@ -1,8 +1,8 @@
# Module for the IPv6 Router Advertisement Daemon.
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
let
diff --git a/nixos/modules/services/networking/rdnssd.nix b/nixos/modules/services/networking/rdnssd.nix
index f797206ad5c..4c1891816e3 100644
--- a/nixos/modules/services/networking/rdnssd.nix
+++ b/nixos/modules/services/networking/rdnssd.nix
@@ -1,9 +1,9 @@
# Module for rdnssd, a daemon that configures DNS servers in
# /etc/resolv/conf from IPv6 RDNSS advertisements.
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
{
diff --git a/nixos/modules/services/networking/rpcbind.nix b/nixos/modules/services/networking/rpcbind.nix
index c966f85e260..eef1e8e8cd8 100644
--- a/nixos/modules/services/networking/rpcbind.nix
+++ b/nixos/modules/services/networking/rpcbind.nix
@@ -1,6 +1,6 @@
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
let
diff --git a/nixos/modules/services/networking/sabnzbd.nix b/nixos/modules/services/networking/sabnzbd.nix
index 8816ac0d2f8..83db0841b34 100644
--- a/nixos/modules/services/networking/sabnzbd.nix
+++ b/nixos/modules/services/networking/sabnzbd.nix
@@ -1,6 +1,6 @@
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
let
diff --git a/nixos/modules/services/networking/searx.nix b/nixos/modules/services/networking/searx.nix
index 30f21151a76..b29db58af99 100644
--- a/nixos/modules/services/networking/searx.nix
+++ b/nixos/modules/services/networking/searx.nix
@@ -1,6 +1,6 @@
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
let
diff --git a/nixos/modules/services/networking/spiped.nix b/nixos/modules/services/networking/spiped.nix
new file mode 100644
index 00000000000..ec5908b182f
--- /dev/null
+++ b/nixos/modules/services/networking/spiped.nix
@@ -0,0 +1,212 @@
+{ config, lib, pkgs, ... }:
+
+with lib;
+
+let
+ cfg = config.services.spiped;
+in
+{
+ options = {
+ services.spiped = mkOption {
+ type = types.attrsOf (types.submodule (
+ {
+ options = {
+ encrypt = mkOption {
+ type = types.bool;
+ default = false;
+ description = ''
+ Take unencrypted connections from the
+ source socket and send encrypted
+ connections to the target socket.
+ '';
+ };
+
+ decrypt = mkOption {
+ type = types.bool;
+ default = false;
+ description = ''
+ Take encrypted connections from the
+ source socket and send unencrypted
+ connections to the target socket.
+ '';
+ };
+
+ source = mkOption {
+ type = types.str;
+ description = ''
+ Address on which spiped should listen for incoming
+ connections. Must be in one of the following formats:
+ /absolute/path/to/unix/socket,
+ host.name:port,
+ [ip.v4.ad.dr]:port or
+ [ipv6::addr]:port - note that
+ hostnames are resolved when spiped is launched and are
+ not re-resolved later; thus if DNS entries change
+ spiped will continue to connect to the expired
+ address.
+ '';
+ };
+
+ target = mkOption {
+ type = types.str;
+ description = "Address to which spiped should connect.";
+ };
+
+ keyfile = mkOption {
+ type = types.path;
+ description = ''
+ Name of a file containing the spiped key. As the
+ daemon runs as the spiped user, the
+ key file must be somewhere owned by that user. By
+ default, we recommend putting the keys for any spipe
+ services in /var/lib/spiped.
+ '';
+ };
+
+ timeout = mkOption {
+ type = types.int;
+ default = 5;
+ description = ''
+ Timeout, in seconds, after which an attempt to connect to
+ the target or a protocol handshake will be aborted (and the
+ connection dropped) if not completed
+ '';
+ };
+
+ maxConns = mkOption {
+ type = types.int;
+ default = 100;
+ description = ''
+ Limit on the number of simultaneous connections allowed.
+ '';
+ };
+
+ waitForDNS = mkOption {
+ type = types.bool;
+ default = false;
+ description = ''
+ Wait for DNS. Normally when spiped is
+ launched it resolves addresses and binds to its source
+ socket before the parent process returns; with this option
+ it will daemonize first and retry failed DNS lookups until
+ they succeed. This allows spiped to
+ launch even if DNS isn't set up yet, but at the expense of
+ losing the guarantee that once spiped has
+ finished launching it will be ready to create pipes.
+ '';
+ };
+
+ disableKeepalives = mkOption {
+ type = types.bool;
+ default = false;
+ description = "Disable transport layer keep-alives.";
+ };
+
+ weakHandshake = mkOption {
+ type = types.bool;
+ default = false;
+ description = ''
+ Use fast/weak handshaking: This reduces the CPU time spent
+ in the initial connection setup, at the expense of losing
+ perfect forward secrecy.
+ '';
+ };
+
+ resolveRefresh = mkOption {
+ type = types.int;
+ default = 60;
+ description = ''
+ Resolution refresh time for the target socket, in seconds.
+ '';
+ };
+
+ disableReresolution = mkOption {
+ type = types.bool;
+ default = false;
+ description = "Disable target address re-resolution.";
+ };
+ };
+ }
+ ));
+
+ default = {};
+
+ example = literalExample ''
+ {
+ pipe1 =
+ { keyfile = "/var/lib/spiped/pipe1.key";
+ encrypt = true;
+ source = "localhost:6000";
+ target = "endpoint.example.com:7000";
+ };
+ pipe2 =
+ { keyfile = "/var/lib/spiped/pipe2.key";
+ decrypt = true;
+ source = "0.0.0.0:7000";
+ target = "localhost:3000";
+ };
+ }
+ '';
+
+ description = ''
+ Configuration for a secure pipe daemon. The daemon can be
+ started, stopped, or examined using
+ systemctl, under the name
+ spiped@foo.
+ '';
+ };
+ };
+
+ config = {
+ assertions = mapAttrsToList (name: c: {
+ assertion = (c.encrypt -> !c.decrypt) || (c.decrypt -> c.encrypt);
+ message = "A pipe must either encrypt or decrypt";
+ }) cfg;
+
+ users.extraGroups.spiped.gid = config.ids.gids.spiped;
+ users.extraUsers.spiped = {
+ description = "Secure Pipe Service user";
+ group = "spiped";
+ uid = config.ids.uids.spiped;
+ };
+
+ systemd.services."spiped@" = {
+ description = "Secure pipe '%i'";
+ after = [ "network.target" ];
+
+ serviceConfig = {
+ Restart = "always";
+ User = "spiped";
+ PermissionsStartOnly = true;
+ };
+
+ preStart = ''
+ cd /var/lib/spiped
+ chmod -R 0660 *
+ chown -R spiped:spiped *
+ '';
+ scriptArgs = "%i";
+ script = "exec ${pkgs.spiped}/bin/spiped -F `cat /etc/spiped/$1.spec`";
+ };
+
+ system.activationScripts.spiped = optionalString (cfg != {})
+ "mkdir -p /var/lib/spiped";
+
+ # Setup spiped config files
+ environment.etc = mapAttrs' (name: cfg: nameValuePair "spiped/${name}.spec"
+ { text = concatStringsSep " "
+ [ (if cfg.encrypt then "-e" else "-d") # Mode
+ "-s ${cfg.source}" # Source
+ "-t ${cfg.target}" # Target
+ "-k ${cfg.keyfile}" # Keyfile
+ "-n ${toString cfg.maxConns}" # Max number of conns
+ "-o ${toString cfg.timeout}" # Timeout
+ (optionalString cfg.waitForDNS "-D") # Wait for DNS
+ (optionalString cfg.weakHandshake "-f") # No PFS
+ (optionalString cfg.disableKeepalives "-j") # Keepalives
+ (if cfg.disableReresolution then "-R"
+ else "-r ${toString cfg.resolveRefresh}")
+ ];
+ }) cfg;
+ };
+}
diff --git a/nixos/modules/services/networking/ssh/lshd.nix b/nixos/modules/services/networking/ssh/lshd.nix
index 04ef76f1e4d..fca30a1fe49 100644
--- a/nixos/modules/services/networking/ssh/lshd.nix
+++ b/nixos/modules/services/networking/ssh/lshd.nix
@@ -1,6 +1,6 @@
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
let
diff --git a/nixos/modules/services/networking/ssh/sshd.nix b/nixos/modules/services/networking/ssh/sshd.nix
index 537fe0848ea..5bc140ca242 100644
--- a/nixos/modules/services/networking/ssh/sshd.nix
+++ b/nixos/modules/services/networking/ssh/sshd.nix
@@ -1,6 +1,6 @@
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
let
diff --git a/nixos/modules/services/networking/supybot.nix b/nixos/modules/services/networking/supybot.nix
index fa8b7556de5..2cfb9fc9b92 100644
--- a/nixos/modules/services/networking/supybot.nix
+++ b/nixos/modules/services/networking/supybot.nix
@@ -1,6 +1,6 @@
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
let
diff --git a/nixos/modules/services/networking/syncthing.nix b/nixos/modules/services/networking/syncthing.nix
new file mode 100644
index 00000000000..02572c1e27d
--- /dev/null
+++ b/nixos/modules/services/networking/syncthing.nix
@@ -0,0 +1,78 @@
+{ config, lib, pkgs, ... }:
+
+with lib;
+
+let
+
+ cfg = config.services.syncthing;
+
+in
+
+{
+
+ ###### interface
+
+ options = {
+
+ services.syncthing = {
+
+ enable = mkOption {
+ default = false;
+ description = ''
+ Whether to enable the Syncthing, self-hosted open-source alternative
+ to Dropbox and BittorrentSync. Initial interface will be
+ available on http://127.0.0.1:8080/.
+ '';
+ };
+
+ user = mkOption {
+ default = "syncthing";
+ description = ''
+ Syncthing will be run under this user (user must exist,
+ this can be your user name).
+ '';
+ };
+
+ dataDir = mkOption {
+ default = "/var/lib/syncthing";
+ description = ''
+ Path where the `.syncthing` (settings and keys) and `Sync`
+ (your synced files) directories will exist. This can be your home
+ directory.
+ '';
+ };
+
+ };
+
+ };
+
+
+ ###### implementation
+
+ config = mkIf cfg.enable {
+
+ systemd.services.syncthing =
+ {
+ description = "Syncthing service";
+ after = [ "network.target" ];
+ wantedBy = [ "multi-user.target" ];
+ environment.STNORESTART = "placeholder"; # do not self-restart
+ environment.HOME = "${cfg.dataDir}";
+ serviceConfig = {
+ User = "${cfg.user}";
+ PermissionsStartOnly = true;
+ Restart = "always";
+ ExecStart = "${pkgs.syncthing}/bin/syncthing -home=${cfg.dataDir}/.syncthing";
+ };
+ preStart = ''
+ mkdir -p ${cfg.dataDir}
+ chown ${cfg.user} ${cfg.dataDir}
+ '';
+
+ };
+
+ environment.systemPackages = [ pkgs.syncthing ];
+
+ };
+
+}
diff --git a/nixos/modules/services/networking/tcpcrypt.nix b/nixos/modules/services/networking/tcpcrypt.nix
index 48cb884f246..1359006aef4 100644
--- a/nixos/modules/services/networking/tcpcrypt.nix
+++ b/nixos/modules/services/networking/tcpcrypt.nix
@@ -1,6 +1,6 @@
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
let
diff --git a/nixos/modules/services/networking/tftpd.nix b/nixos/modules/services/networking/tftpd.nix
index 37935496c59..a2f7ff06ea6 100644
--- a/nixos/modules/services/networking/tftpd.nix
+++ b/nixos/modules/services/networking/tftpd.nix
@@ -1,6 +1,6 @@
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
{
diff --git a/nixos/modules/services/networking/unbound.nix b/nixos/modules/services/networking/unbound.nix
index fb75b4ed069..30ce4b49fa8 100644
--- a/nixos/modules/services/networking/unbound.nix
+++ b/nixos/modules/services/networking/unbound.nix
@@ -1,6 +1,6 @@
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
let
diff --git a/nixos/modules/services/networking/vsftpd.nix b/nixos/modules/services/networking/vsftpd.nix
index 763fa8dc3c4..62b6027c012 100644
--- a/nixos/modules/services/networking/vsftpd.nix
+++ b/nixos/modules/services/networking/vsftpd.nix
@@ -1,6 +1,6 @@
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
let
diff --git a/nixos/modules/services/networking/wakeonlan.nix b/nixos/modules/services/networking/wakeonlan.nix
index 1fc54986b16..11bb7e92525 100644
--- a/nixos/modules/services/networking/wakeonlan.nix
+++ b/nixos/modules/services/networking/wakeonlan.nix
@@ -1,6 +1,6 @@
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
let
interfaces = config.services.wakeonlan.interfaces;
diff --git a/nixos/modules/services/networking/websockify.nix b/nixos/modules/services/networking/websockify.nix
index 12042bbad6c..4b76350ecf8 100644
--- a/nixos/modules/services/networking/websockify.nix
+++ b/nixos/modules/services/networking/websockify.nix
@@ -1,6 +1,6 @@
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
let cfg = config.services.networking.websockify; in {
options = {
diff --git a/nixos/modules/services/networking/wicd.nix b/nixos/modules/services/networking/wicd.nix
index 8e012273216..18258084fc2 100644
--- a/nixos/modules/services/networking/wicd.nix
+++ b/nixos/modules/services/networking/wicd.nix
@@ -1,6 +1,6 @@
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
{
diff --git a/nixos/modules/services/networking/wpa_supplicant.nix b/nixos/modules/services/networking/wpa_supplicant.nix
index 5e5f81ed5a0..eb721ec3455 100644
--- a/nixos/modules/services/networking/wpa_supplicant.nix
+++ b/nixos/modules/services/networking/wpa_supplicant.nix
@@ -1,6 +1,6 @@
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
let
diff --git a/nixos/modules/services/networking/xinetd.nix b/nixos/modules/services/networking/xinetd.nix
index 626183b810f..14ee52ae52e 100644
--- a/nixos/modules/services/networking/xinetd.nix
+++ b/nixos/modules/services/networking/xinetd.nix
@@ -1,6 +1,6 @@
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
let
diff --git a/nixos/modules/services/printing/cupsd.nix b/nixos/modules/services/printing/cupsd.nix
index fb8923e107a..4b758608cb6 100644
--- a/nixos/modules/services/printing/cupsd.nix
+++ b/nixos/modules/services/printing/cupsd.nix
@@ -1,6 +1,6 @@
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
let
diff --git a/nixos/modules/services/scheduling/atd.nix b/nixos/modules/services/scheduling/atd.nix
index c516c5889f1..c6f128ec402 100644
--- a/nixos/modules/services/scheduling/atd.nix
+++ b/nixos/modules/services/scheduling/atd.nix
@@ -1,6 +1,6 @@
-{pkgs, config, ...}:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
let
diff --git a/nixos/modules/services/scheduling/cron.nix b/nixos/modules/services/scheduling/cron.nix
index 44ed1ba5a07..5da71b12dd7 100644
--- a/nixos/modules/services/scheduling/cron.nix
+++ b/nixos/modules/services/scheduling/cron.nix
@@ -1,6 +1,6 @@
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
let
diff --git a/nixos/modules/services/scheduling/fcron.nix b/nixos/modules/services/scheduling/fcron.nix
index fda29ca0482..346a64f2c3c 100644
--- a/nixos/modules/services/scheduling/fcron.nix
+++ b/nixos/modules/services/scheduling/fcron.nix
@@ -1,6 +1,6 @@
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
let
diff --git a/nixos/modules/services/search/elasticsearch.nix b/nixos/modules/services/search/elasticsearch.nix
index d647301889a..b7a3566f95d 100644
--- a/nixos/modules/services/search/elasticsearch.nix
+++ b/nixos/modules/services/search/elasticsearch.nix
@@ -1,6 +1,6 @@
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
let
cfg = config.services.elasticsearch;
diff --git a/nixos/modules/services/search/solr.nix b/nixos/modules/services/search/solr.nix
index a79b1194c80..38d9dedbe3c 100644
--- a/nixos/modules/services/search/solr.nix
+++ b/nixos/modules/services/search/solr.nix
@@ -1,6 +1,6 @@
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
let
@@ -23,6 +23,10 @@ let
ln -s ${pkgs.ant}/lib/ant/lib/ant.jar $out/lib/
ln -s ${cfg.solrPackage}/lib/ext/* $out/lib/
ln -s ${pkgs.openjdk}/lib/openjdk/lib/tools.jar $out/lib/
+ '' + optionalString (cfg.extraJars != []) ''
+ for f in ${concatStringsSep " " cfg.extraJars}; do
+ cp $f $out/lib
+ done
'';
};
@@ -54,6 +58,14 @@ in {
'';
};
+ extraJars = mkOption {
+ type = types.listOf types.path;
+ default = [];
+ description = ''
+ List of paths pointing to jars. Jars are copied to commonLibFolder to be available to java/solr.
+ '';
+ };
+
log4jConfiguration = mkOption {
type = types.lines;
default = ''
diff --git a/nixos/modules/services/security/clamav.nix b/nixos/modules/services/security/clamav.nix
index 5ccb4927fcb..057891a6047 100644
--- a/nixos/modules/services/security/clamav.nix
+++ b/nixos/modules/services/security/clamav.nix
@@ -1,5 +1,5 @@
-{ config, pkgs, ... }:
-with pkgs.lib;
+{ config, lib, pkgs, ... }:
+with lib;
let
clamavUser = "clamav";
stateDir = "/var/lib/clamav";
diff --git a/nixos/modules/services/security/fail2ban.nix b/nixos/modules/services/security/fail2ban.nix
index ae1fd22d23e..af545016637 100644
--- a/nixos/modules/services/security/fail2ban.nix
+++ b/nixos/modules/services/security/fail2ban.nix
@@ -1,6 +1,6 @@
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
let
diff --git a/nixos/modules/services/security/fprot.nix b/nixos/modules/services/security/fprot.nix
index 9f1fc4ed6d8..7270a9f9814 100644
--- a/nixos/modules/services/security/fprot.nix
+++ b/nixos/modules/services/security/fprot.nix
@@ -1,5 +1,5 @@
-{ config, pkgs, ... }:
-with pkgs.lib;
+{ config, lib, pkgs, ... }:
+with lib;
let
fprotUser = "fprot";
stateDir = "/var/lib/fprot";
@@ -10,33 +10,31 @@ in {
services.fprot = {
updater = {
- enable = mkOption {
- default = false;
- description = ''
- Whether to enable automatic F-Prot virus definitions database updates.
- '';
- };
+ 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.
- '';
- };
+ productData = mkOption {
+ description = ''
+ product.data file. Defaults to the one supplied with installation package.
+ '';
+ };
- frequency = mkOption {
- default = 30;
- description = ''
- Update virus definitions every X minutes.
- '';
- };
+ 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.
- '';
- };
+ licenseKeyfile = mkOption {
+ description = ''
+ License keyfile. Defaults to the one supplied with installation package.
+ '';
+ };
};
};
@@ -45,6 +43,10 @@ in {
###### implementation
config = mkIf cfg.updater.enable {
+
+ services.fprot.updater.productData = mkDefault "${pkgs.fprot}/opt/f-prot/product.data";
+ services.fprot.updater.licenseKeyfile = mkDefault "${pkgs.fprot}/opt/f-prot/license.key";
+
environment.systemPackages = [ pkgs.fprot ];
environment.etc = singleton {
source = "${pkgs.fprot}/opt/f-prot/f-prot.conf";
@@ -67,22 +69,22 @@ in {
jobs = {
fprot_updater = {
- name = "fprot-updater";
- task = true;
+ name = "fprot-updater";
+ task = true;
- # have to copy fpupdate executable because it insists on storing the virus database in the same dir
+ # 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
+ cp ${pkgs.fprot}/opt/f-prot/fpupdate ${stateDir}
+ ln -sf ${cfg.updater.productData} ${stateDir}/product.data
'';
- #setuid = fprotUser;
- #setgid = fprotGroup;
+ #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/haveged.nix b/nixos/modules/services/security/haveged.nix
index c3ea3fb03ed..1d52ed55dbd 100644
--- a/nixos/modules/services/security/haveged.nix
+++ b/nixos/modules/services/security/haveged.nix
@@ -1,6 +1,6 @@
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
let
diff --git a/nixos/modules/services/security/tor.nix b/nixos/modules/services/security/tor.nix
index e70eb8511a6..582dd124c29 100644
--- a/nixos/modules/services/security/tor.nix
+++ b/nixos/modules/services/security/tor.nix
@@ -1,6 +1,6 @@
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
let
diff --git a/nixos/modules/services/security/torify.nix b/nixos/modules/services/security/torify.nix
index 1c158906a91..53f48a714b4 100644
--- a/nixos/modules/services/security/torify.nix
+++ b/nixos/modules/services/security/torify.nix
@@ -1,5 +1,5 @@
-{ config, pkgs, ... }:
-with pkgs.lib;
+{ config, lib, pkgs, ... }:
+with lib;
let
cfg = config.services.tor;
diff --git a/nixos/modules/services/security/torsocks.nix b/nixos/modules/services/security/torsocks.nix
index d6974282a6b..ede6c983677 100644
--- a/nixos/modules/services/security/torsocks.nix
+++ b/nixos/modules/services/security/torsocks.nix
@@ -1,5 +1,5 @@
-{ config, pkgs, ... }:
-with pkgs.lib;
+{ config, lib, pkgs, ... }:
+with lib;
let
cfg = config.services.tor;
diff --git a/nixos/modules/services/system/dbus.nix b/nixos/modules/services/system/dbus.nix
index cb5110f6feb..8cc655803c5 100644
--- a/nixos/modules/services/system/dbus.nix
+++ b/nixos/modules/services/system/dbus.nix
@@ -1,8 +1,8 @@
# D-Bus configuration and system bus daemon.
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
let
diff --git a/nixos/modules/services/system/nscd.nix b/nixos/modules/services/system/nscd.nix
index 3259bdbbe12..f357eb4e1fc 100644
--- a/nixos/modules/services/system/nscd.nix
+++ b/nixos/modules/services/system/nscd.nix
@@ -1,6 +1,6 @@
-{pkgs, config, ...}:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
let
diff --git a/nixos/modules/services/torrent/deluge.nix b/nixos/modules/services/torrent/deluge.nix
index e0c212e5661..00df4042d89 100644
--- a/nixos/modules/services/torrent/deluge.nix
+++ b/nixos/modules/services/torrent/deluge.nix
@@ -1,6 +1,6 @@
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
let
cfg = config.services.deluge;
diff --git a/nixos/modules/services/torrent/transmission.nix b/nixos/modules/services/torrent/transmission.nix
index 68f9b0647c0..5cdecd1eb57 100644
--- a/nixos/modules/services/torrent/transmission.nix
+++ b/nixos/modules/services/torrent/transmission.nix
@@ -1,13 +1,14 @@
-# NixOS module for Transmission BitTorrent daemon
+{ config, lib, pkgs, ... }:
-{ config, pkgs, ... }:
-
-with pkgs.lib;
+with lib;
let
-
cfg = config.services.transmission;
+ apparmor = config.security.apparmor.enable;
+
homeDir = "/var/lib/transmission";
+ downloadDir = "${homeDir}/Downloads";
+ incompleteDir = "${homeDir}/.incomplete";
settingsDir = "${homeDir}/.config/transmission-daemon";
settingsFile = "${settingsDir}/settings.json";
@@ -31,16 +32,12 @@ let
(if isList value then value else [value]))
as));
+ # for users in group "transmission" to have access to torrents
+ fullSettings = cfg.settings // { umask = 2; };
in
-
{
-
- ### configuration
-
options = {
-
services.transmission = {
-
enable = mkOption {
type = types.uniq types.bool;
default = false;
@@ -59,65 +56,48 @@ in
type = types.attrs;
default =
{
- # for users in group "transmission" to have access to torrents
- umask = 2;
- }
- ;
+ download-dir = downloadDir;
+ incomplete-dir = incompleteDir;
+ incomplete-dir-enabled = true;
+ };
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}."
+ See https://trac.transmissionbt.com/wiki/EditConfigFiles for
+ documentation and/or look at ${settingsFile}.
'';
};
- rpc_port = mkOption {
+ 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" ];
+ description = "Transmission BitTorrent Service";
+ after = [ "network.target" ] ++ optional apparmor "apparmor.service";
+ requires = mkIf 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.ExecStartPre = ''
+ ${pkgs.stdenv.shell} -c "chmod 770 ${homeDir} && mkdir -p ${settingsDir} ${downloadDir} ${incompleteDir} && ${pkgs.transmission}/bin/transmission-daemon -d |& sed ${attrsToSedArgs fullSettings} > ${settingsFile}.tmp && mv ${settingsFile}.tmp ${settingsFile}"
+ '';
+ serviceConfig.ExecStart = "${pkgs.transmission}/bin/transmission-daemon -f --port ${toString config.services.transmission.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)
@@ -127,6 +107,7 @@ in
# It's useful to have transmission in path, e.g. for remote control
environment.systemPackages = [ pkgs.transmission ];
+ users.extraGroups.transmission.gid = config.ids.gids.transmission;
users.extraUsers.transmission = {
group = "transmission";
uid = config.ids.uids.transmission;
@@ -135,10 +116,8 @@ in
createHome = true;
};
- users.extraGroups.transmission.gid = config.ids.gids.transmission;
-
# AppArmor profile
- security.apparmor.profiles = mkIf (config.security.apparmor.enable && cfg.apparmor) [
+ security.apparmor.profiles = mkIf apparmor [
(pkgs.writeText "apparmor-transmission-daemon" ''
#include
@@ -161,9 +140,9 @@ in
owner ${settingsDir}/** rw,
- ${cfg.settings.download-dir}/** rw,
- ${optionalString cfg.settings.incomplete-dir-enabled ''
- ${cfg.settings.incomplete-dir}/** rw,
+ ${fullSettings.download-dir}/** rw,
+ ${optionalString fullSettings.incomplete-dir-enabled ''
+ ${fullSettings.incomplete-dir}/** rw,
''}
}
'')
diff --git a/nixos/modules/services/ttys/agetty.nix b/nixos/modules/services/ttys/agetty.nix
index ca4fbeb0add..442774af251 100644
--- a/nixos/modules/services/ttys/agetty.nix
+++ b/nixos/modules/services/ttys/agetty.nix
@@ -1,6 +1,6 @@
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
{
diff --git a/nixos/modules/services/ttys/gpm.nix b/nixos/modules/services/ttys/gpm.nix
index 74cee67aeae..12fe4e2f84f 100644
--- a/nixos/modules/services/ttys/gpm.nix
+++ b/nixos/modules/services/ttys/gpm.nix
@@ -1,6 +1,6 @@
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
let
diff --git a/nixos/modules/services/web-servers/apache-httpd/default.nix b/nixos/modules/services/web-servers/apache-httpd/default.nix
index a22ef10312d..eced13444de 100644
--- a/nixos/modules/services/web-servers/apache-httpd/default.nix
+++ b/nixos/modules/services/web-servers/apache-httpd/default.nix
@@ -1,6 +1,6 @@
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
let
@@ -65,7 +65,7 @@ let
options = {};
documentRoot = null;
};
- res = defaults // svcFunction { inherit config pkgs serverInfo php; };
+ res = defaults // svcFunction { inherit config lib pkgs serverInfo php; };
in res;
in map f defs;
@@ -510,7 +510,7 @@ in
virtualHosts = mkOption {
type = types.listOf (types.submodule (
{ options = import ./per-server-options.nix {
- inherit pkgs;
+ inherit lib;
forMainServer = false;
};
}));
@@ -577,7 +577,7 @@ in
# Include the options shared between the main server and virtual hosts.
// (import ./per-server-options.nix {
- inherit pkgs;
+ inherit lib;
forMainServer = true;
});
@@ -621,7 +621,7 @@ in
{ description = "Apache HTTPD";
wantedBy = [ "multi-user.target" ];
- requires = [ "keys.target" ];
+ wants = [ "keys.target" ];
after = [ "network.target" "fs.target" "postgresql.service" "keys.target" ];
path =
diff --git a/nixos/modules/services/web-servers/apache-httpd/mediawiki.nix b/nixos/modules/services/web-servers/apache-httpd/mediawiki.nix
index f5669faebc9..7d59c13b957 100644
--- a/nixos/modules/services/web-servers/apache-httpd/mediawiki.nix
+++ b/nixos/modules/services/web-servers/apache-httpd/mediawiki.nix
@@ -1,6 +1,6 @@
-{ config, pkgs, serverInfo, php, ... }:
+{ config, lib, pkgs, serverInfo, php, ... }:
-with pkgs.lib;
+with lib;
let
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
index 53f34e28c27..b8e86334539 100644
--- a/nixos/modules/services/web-servers/apache-httpd/per-server-options.nix
+++ b/nixos/modules/services/web-servers/apache-httpd/per-server-options.nix
@@ -3,9 +3,9 @@
# has additional options that affect the web server as a whole, like
# the user/group to run under.)
-{ forMainServer, pkgs }:
+{ forMainServer, lib }:
-with pkgs.lib;
+with lib;
{
diff --git a/nixos/modules/services/web-servers/apache-httpd/trac.nix b/nixos/modules/services/web-servers/apache-httpd/trac.nix
index dc82fd34f2f..ad791d7d958 100644
--- a/nixos/modules/services/web-servers/apache-httpd/trac.nix
+++ b/nixos/modules/services/web-servers/apache-httpd/trac.nix
@@ -1,6 +1,6 @@
-{ config, pkgs, serverInfo, ... }:
+{ config, lib, pkgs, serverInfo, ... }:
-with pkgs.lib;
+with lib;
let
diff --git a/nixos/modules/services/web-servers/apache-httpd/zabbix.nix b/nixos/modules/services/web-servers/apache-httpd/zabbix.nix
index a6e6042fdf6..cab16593bcb 100644
--- a/nixos/modules/services/web-servers/apache-httpd/zabbix.nix
+++ b/nixos/modules/services/web-servers/apache-httpd/zabbix.nix
@@ -1,4 +1,6 @@
-{ config, pkgs, serverInfo, ... }:
+{ config, lib, pkgs, serverInfo, ... }:
+
+with lib;
let
@@ -51,7 +53,7 @@ in
options = {
- urlPrefix = pkgs.lib.mkOption {
+ urlPrefix = mkOption {
default = "/zabbix";
description = "
The URL prefix under which the Zabbix service appears.
@@ -59,9 +61,9 @@ in
";
};
- configFile = pkgs.lib.mkOption {
+ configFile = mkOption {
default = null;
- type = with pkgs.lib.types; nullOr path;
+ type = types.nullOr types.path;
description = ''
The configuration file (zabbix.conf.php) which contains the database
connection settings. If not set, the configuration settings will created
@@ -69,7 +71,7 @@ in
'';
};
- stateDir = pkgs.lib.mkOption {
+ stateDir = mkOption {
default = "/var/lib/zabbix/frontend";
description = "
Directory where the dynamically generated configuration data
diff --git a/nixos/modules/services/web-servers/jboss/default.nix b/nixos/modules/services/web-servers/jboss/default.nix
index e1bcede6563..8a292ad6791 100644
--- a/nixos/modules/services/web-servers/jboss/default.nix
+++ b/nixos/modules/services/web-servers/jboss/default.nix
@@ -1,6 +1,6 @@
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
let
diff --git a/nixos/modules/services/web-servers/lighttpd/cgit.nix b/nixos/modules/services/web-servers/lighttpd/cgit.nix
index 62264f1db45..dbff565bd8a 100644
--- a/nixos/modules/services/web-servers/lighttpd/cgit.nix
+++ b/nixos/modules/services/web-servers/lighttpd/cgit.nix
@@ -1,6 +1,6 @@
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
let
cfg = config.services.lighttpd.cgit;
diff --git a/nixos/modules/services/web-servers/lighttpd/default.nix b/nixos/modules/services/web-servers/lighttpd/default.nix
index 4cc34c65d84..3ba934c72bf 100644
--- a/nixos/modules/services/web-servers/lighttpd/default.nix
+++ b/nixos/modules/services/web-servers/lighttpd/default.nix
@@ -1,8 +1,8 @@
# NixOS module for lighttpd web server
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
let
diff --git a/nixos/modules/services/web-servers/lighttpd/gitweb.nix b/nixos/modules/services/web-servers/lighttpd/gitweb.nix
index f02bd4db264..d49278be09a 100644
--- a/nixos/modules/services/web-servers/lighttpd/gitweb.nix
+++ b/nixos/modules/services/web-servers/lighttpd/gitweb.nix
@@ -1,6 +1,6 @@
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
let
cfg = config.services.lighttpd.gitweb;
diff --git a/nixos/modules/services/web-servers/nginx/default.nix b/nixos/modules/services/web-servers/nginx/default.nix
index 62153613355..ff94ee42d28 100644
--- a/nixos/modules/services/web-servers/nginx/default.nix
+++ b/nixos/modules/services/web-servers/nginx/default.nix
@@ -1,6 +1,6 @@
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
let
cfg = config.services.nginx;
diff --git a/nixos/modules/services/web-servers/phpfpm.nix b/nixos/modules/services/web-servers/phpfpm.nix
index 76ec4124462..4a14f9b41a4 100644
--- a/nixos/modules/services/web-servers/phpfpm.nix
+++ b/nixos/modules/services/web-servers/phpfpm.nix
@@ -1,6 +1,6 @@
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
let
cfg = config.services.phpfpm;
@@ -35,6 +35,13 @@ in {
'';
};
+ phpPackage = mkOption {
+ default = pkgs.php54;
+ description = ''
+ The PHP package to use for running the FPM service.
+ '';
+ };
+
poolConfigs = mkOption {
type = types.attrsOf types.lines;
default = {};
@@ -68,7 +75,7 @@ in {
mkdir -p "${stateDir}"
'';
serviceConfig = {
- ExecStart = "${pkgs.php54}/sbin/php-fpm -y ${cfgFile}";
+ ExecStart = "${cfg.phpPackage}/sbin/php-fpm -y ${cfgFile}";
PIDFile = pidFile;
};
};
diff --git a/nixos/modules/services/web-servers/tomcat.nix b/nixos/modules/services/web-servers/tomcat.nix
index a68828de5d8..b5eee8f8be8 100644
--- a/nixos/modules/services/web-servers/tomcat.nix
+++ b/nixos/modules/services/web-servers/tomcat.nix
@@ -1,6 +1,6 @@
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
let
diff --git a/nixos/modules/services/web-servers/varnish/default.nix b/nixos/modules/services/web-servers/varnish/default.nix
index 7e327120c3d..364f6c68fac 100644
--- a/nixos/modules/services/web-servers/varnish/default.nix
+++ b/nixos/modules/services/web-servers/varnish/default.nix
@@ -1,9 +1,9 @@
-{ config, pkgs, ...}:
+{ config, lib, pkgs, ...}:
let
cfg = config.services.varnish;
in
-with pkgs.lib;
+with lib;
{
options = {
services.varnish = {
diff --git a/nixos/modules/services/web-servers/winstone.nix b/nixos/modules/services/web-servers/winstone.nix
index 33c7e730118..7f48012f158 100644
--- a/nixos/modules/services/web-servers/winstone.nix
+++ b/nixos/modules/services/web-servers/winstone.nix
@@ -1,6 +1,6 @@
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
let
diff --git a/nixos/modules/services/web-servers/zope2.nix b/nixos/modules/services/web-servers/zope2.nix
index 576f4b08fb9..21117118457 100644
--- a/nixos/modules/services/web-servers/zope2.nix
+++ b/nixos/modules/services/web-servers/zope2.nix
@@ -1,6 +1,6 @@
-{ pkgs, config, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
let
diff --git a/nixos/modules/services/x11/desktop-managers/default.nix b/nixos/modules/services/x11/desktop-managers/default.nix
index 753babf6a22..b82398ccf9d 100644
--- a/nixos/modules/services/x11/desktop-managers/default.nix
+++ b/nixos/modules/services/x11/desktop-managers/default.nix
@@ -1,6 +1,6 @@
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
let
diff --git a/nixos/modules/services/x11/desktop-managers/e17.nix b/nixos/modules/services/x11/desktop-managers/e17.nix
index 3d91617c62a..4cac53c9c75 100644
--- a/nixos/modules/services/x11/desktop-managers/e17.nix
+++ b/nixos/modules/services/x11/desktop-managers/e17.nix
@@ -1,6 +1,6 @@
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
let
diff --git a/nixos/modules/services/x11/desktop-managers/gnome3.nix b/nixos/modules/services/x11/desktop-managers/gnome3.nix
index 85be61bfc1e..4620bc6722a 100644
--- a/nixos/modules/services/x11/desktop-managers/gnome3.nix
+++ b/nixos/modules/services/x11/desktop-managers/gnome3.nix
@@ -1,10 +1,20 @@
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
let
cfg = config.services.xserver.desktopManager.gnome3;
gnome3 = pkgs.gnome3;
+
+ # Remove packages of ys from xs, based on their names
+ removePackagesByName = xs: ys:
+ let
+ pkgName = drv: (builtins.parseDrvName drv.name).name;
+ ysNames = map pkgName ys;
+ res = (filter (x: !(builtins.elem (pkgName x) ysNames)) xs);
+ in
+ filter (x: !(builtins.elem (pkgName x) ysNames)) xs;
+
in {
options = {
@@ -15,6 +25,13 @@ in {
description = "Enable Gnome 3 desktop manager.";
};
+ environment.gnome3.excludePackages = mkOption {
+ default = [];
+ example = "[ pkgs.gnome3.totem ]";
+ type = types.listOf types.package;
+ description = "Which packages gnome should exclude from the default environment";
+ };
+
};
config = mkIf cfg.enable {
@@ -22,6 +39,16 @@ in {
# Enable helpful DBus services.
security.polkit.enable = true;
services.udisks2.enable = true;
+ services.accounts-daemon.enable = true;
+ services.gnome3.at-spi2-core.enable = true;
+ services.gnome3.evolution-data-server.enable = true;
+ services.gnome3.gnome-keyring.enable = true;
+ services.gnome3.gnome-online-accounts.enable = mkDefault true;
+ services.gnome3.gnome-user-share.enable = mkDefault true;
+ services.gnome3.sushi.enable = mkDefault true;
+ services.gnome3.tracker.enable = mkDefault true;
+ hardware.pulseaudio.enable = mkDefault true;
+ services.telepathy.enable = mkDefault true;
networking.networkmanager.enable = true;
services.upower.enable = config.powerManagement.enable;
@@ -38,30 +65,64 @@ in {
export XDG_MENU_PREFIX=gnome
+ # Don't let epiphany depend upon gnome-shell
+ export XDG_DATA_DIRS=$XDG_DATA_DIRS''${XDG_DATA_DIRS:+:}${pkgs.gnome3.gnome_shell}/share/gsettings-schemas/${pkgs.gnome3.gnome_shell.name}
+
+ # Let gnome-control-center find gnome-shell search providers
+ export GNOME_SEARCH_PROVIDERS_DIR=${config.system.path}/share/gnome-shell/search-providers/
+
+ # Update user dirs as described in http://freedesktop.org/wiki/Software/xdg-user-dirs/
+ ${pkgs.xdg-user-dirs}/bin/xdg-user-dirs-update
+
${gnome3.gnome_session}/bin/gnome-session&
waitPID=$!
'';
};
- environment.variables.GIO_EXTRA_MODULES = [ "${gnome3.dconf}/lib/gio/modules" ];
+ environment.variables.GIO_EXTRA_MODULES = [ "${gnome3.dconf}/lib/gio/modules"
+ "${pkgs.glib_networking}/lib/gio/modules" ];
environment.systemPackages =
- [ gnome3.evince
- gnome3.eog
+ [ pkgs.desktop_file_utils
+ pkgs.glib_networking
+ pkgs.gtk3 # for gtk-update-icon-cache
+ pkgs.ibus
+ pkgs.shared_mime_info # for update-mime-database
gnome3.dconf
- gnome3.vino
- gnome3.epiphany
+ gnome3.gnome-backgrounds
+ gnome3.gnome_control_center
+ gnome3.gnome_icon_theme
+ gnome3.gnome-menus
+ gnome3.gnome_settings_daemon
+ gnome3.gnome_shell
+ gnome3.gnome_themes_standard
+ ] ++ (removePackagesByName [
gnome3.baobab
+ gnome3.empathy
+ gnome3.eog
+ gnome3.epiphany
+ gnome3.evince
gnome3.gucharmap
gnome3.nautilus
+ gnome3.totem
+ gnome3.vino
gnome3.yelp
- pkgs.ibus
- gnome3.gnome_shell
- gnome3.gnome_settings_daemon
+ gnome3.gnome-calculator
+ gnome3.gnome-contacts
+ gnome3.gnome-font-viewer
+ gnome3.gnome-screenshot
+ gnome3.gnome-shell-extensions
+ gnome3.gnome-system-log
+ gnome3.gnome-system-monitor
gnome3.gnome_terminal
- gnome3.gnome_icon_theme
- gnome3.gnome_themes_standard
- gnome3.gnome_control_center
- ];
+ gnome3.gnome-user-docs
+
+ gnome3.file-roller
+ gnome3.gnome-tweak-tool
+ ] config.environment.gnome3.excludePackages);
+
+ # Needed for themes and backgrounds
+ environment.pathsToLink = [ "/share" ];
+
};
diff --git a/nixos/modules/services/x11/desktop-managers/kde4.nix b/nixos/modules/services/x11/desktop-managers/kde4.nix
index 108b52bb951..c70dbf3b911 100644
--- a/nixos/modules/services/x11/desktop-managers/kde4.nix
+++ b/nixos/modules/services/x11/desktop-managers/kde4.nix
@@ -1,6 +1,6 @@
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
let
diff --git a/nixos/modules/services/x11/desktop-managers/xbmc.nix b/nixos/modules/services/x11/desktop-managers/xbmc.nix
index 51278c5fadb..97e966ca019 100644
--- a/nixos/modules/services/x11/desktop-managers/xbmc.nix
+++ b/nixos/modules/services/x11/desktop-managers/xbmc.nix
@@ -1,6 +1,6 @@
-{ pkgs, config, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
let
cfg = config.services.xserver.desktopManager.xbmc;
diff --git a/nixos/modules/services/x11/desktop-managers/xfce.nix b/nixos/modules/services/x11/desktop-managers/xfce.nix
index 9ce7744b065..a72eea76239 100644
--- a/nixos/modules/services/x11/desktop-managers/xfce.nix
+++ b/nixos/modules/services/x11/desktop-managers/xfce.nix
@@ -1,6 +1,6 @@
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
let
diff --git a/nixos/modules/services/x11/desktop-managers/xterm.nix b/nixos/modules/services/x11/desktop-managers/xterm.nix
index edc61c103ea..eab91407141 100644
--- a/nixos/modules/services/x11/desktop-managers/xterm.nix
+++ b/nixos/modules/services/x11/desktop-managers/xterm.nix
@@ -1,6 +1,6 @@
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
let
@@ -19,7 +19,7 @@ in
};
- config = mkIf cfg.enable {
+ config = mkIf (config.services.xserver.enable && cfg.enable) {
services.xserver.desktopManager.session = singleton
{ name = "xterm";
diff --git a/nixos/modules/services/x11/display-managers/auto.nix b/nixos/modules/services/x11/display-managers/auto.nix
index 33d97e0e07a..c02ccdf12b6 100644
--- a/nixos/modules/services/x11/display-managers/auto.nix
+++ b/nixos/modules/services/x11/display-managers/auto.nix
@@ -1,6 +1,6 @@
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
let
diff --git a/nixos/modules/services/x11/display-managers/default.nix b/nixos/modules/services/x11/display-managers/default.nix
index 575386bac0a..2deff602982 100644
--- a/nixos/modules/services/x11/display-managers/default.nix
+++ b/nixos/modules/services/x11/display-managers/default.nix
@@ -7,9 +7,9 @@
# (e.g., KDE, Gnome or a plain xterm), and optionally the *window
# manager* (e.g. kwin or twm).
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
let
diff --git a/nixos/modules/services/x11/display-managers/kdm.nix b/nixos/modules/services/x11/display-managers/kdm.nix
index c51e7edfddf..7ec489ae3e7 100644
--- a/nixos/modules/services/x11/display-managers/kdm.nix
+++ b/nixos/modules/services/x11/display-managers/kdm.nix
@@ -1,6 +1,6 @@
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
let
diff --git a/nixos/modules/services/x11/display-managers/lightdm.nix b/nixos/modules/services/x11/display-managers/lightdm.nix
index 0fa16a77c1b..d459c59b048 100644
--- a/nixos/modules/services/x11/display-managers/lightdm.nix
+++ b/nixos/modules/services/x11/display-managers/lightdm.nix
@@ -1,6 +1,6 @@
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
let
diff --git a/nixos/modules/services/x11/display-managers/slim.nix b/nixos/modules/services/x11/display-managers/slim.nix
index cfe3ee53224..114d34557a0 100644
--- a/nixos/modules/services/x11/display-managers/slim.nix
+++ b/nixos/modules/services/x11/display-managers/slim.nix
@@ -1,6 +1,6 @@
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
let
diff --git a/nixos/modules/services/x11/hardware/multitouch.nix b/nixos/modules/services/x11/hardware/multitouch.nix
index 4f9048bfd91..6e6e88e6721 100644
--- a/nixos/modules/services/x11/hardware/multitouch.nix
+++ b/nixos/modules/services/x11/hardware/multitouch.nix
@@ -1,6 +1,6 @@
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
let cfg = config.services.xserver.multitouch; in
diff --git a/nixos/modules/services/x11/hardware/synaptics.nix b/nixos/modules/services/x11/hardware/synaptics.nix
index fe9dcd51a7a..f2227a34a20 100644
--- a/nixos/modules/services/x11/hardware/synaptics.nix
+++ b/nixos/modules/services/x11/hardware/synaptics.nix
@@ -1,6 +1,6 @@
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
let cfg = config.services.xserver.synaptics;
tapConfig = if cfg.tapButtons then enabledTapConfig else disabledTapConfig;
diff --git a/nixos/modules/services/x11/hardware/wacom.nix b/nixos/modules/services/x11/hardware/wacom.nix
index dfc588cd213..540ed168b48 100644
--- a/nixos/modules/services/x11/hardware/wacom.nix
+++ b/nixos/modules/services/x11/hardware/wacom.nix
@@ -1,6 +1,6 @@
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
let
diff --git a/nixos/modules/services/x11/redshift.nix b/nixos/modules/services/x11/redshift.nix
index 02416f5ef12..d73b58de6c0 100644
--- a/nixos/modules/services/x11/redshift.nix
+++ b/nixos/modules/services/x11/redshift.nix
@@ -1,5 +1,5 @@
-{ config, pkgs, ... }:
-with pkgs.lib;
+{ config, lib, pkgs, ... }:
+with lib;
let
cfg = config.services.redshift;
diff --git a/nixos/modules/services/x11/terminal-server.nix b/nixos/modules/services/x11/terminal-server.nix
index f16a424b457..bdc23c0acd1 100644
--- a/nixos/modules/services/x11/terminal-server.nix
+++ b/nixos/modules/services/x11/terminal-server.nix
@@ -5,9 +5,9 @@
# not, a X server (Xvfb) is started for that user. The Xvfb instances
# persist across VNC sessions.
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
let
diff --git a/nixos/modules/services/x11/window-managers/awesome.nix b/nixos/modules/services/x11/window-managers/awesome.nix
index 1c61419a44c..9b2f042a87a 100644
--- a/nixos/modules/services/x11/window-managers/awesome.nix
+++ b/nixos/modules/services/x11/window-managers/awesome.nix
@@ -1,6 +1,6 @@
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
let
diff --git a/nixos/modules/services/x11/window-managers/compiz.nix b/nixos/modules/services/x11/window-managers/compiz.nix
index 209401f2646..ffd71e5f91e 100644
--- a/nixos/modules/services/x11/window-managers/compiz.nix
+++ b/nixos/modules/services/x11/window-managers/compiz.nix
@@ -1,6 +1,6 @@
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
let
diff --git a/nixos/modules/services/x11/window-managers/default.nix b/nixos/modules/services/x11/window-managers/default.nix
index 1c10333462c..f27ba366141 100644
--- a/nixos/modules/services/x11/window-managers/default.nix
+++ b/nixos/modules/services/x11/window-managers/default.nix
@@ -1,6 +1,6 @@
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
let
cfg = config.services.xserver.windowManager;
diff --git a/nixos/modules/services/x11/window-managers/herbstluftwm.nix b/nixos/modules/services/x11/window-managers/herbstluftwm.nix
index 9480abba43b..6cda910b6b3 100644
--- a/nixos/modules/services/x11/window-managers/herbstluftwm.nix
+++ b/nixos/modules/services/x11/window-managers/herbstluftwm.nix
@@ -1,6 +1,6 @@
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
let
cfg = config.services.xserver.windowManager.herbstluftwm;
diff --git a/nixos/modules/services/x11/window-managers/i3.nix b/nixos/modules/services/x11/window-managers/i3.nix
index e53d86187ae..e85c3bce591 100644
--- a/nixos/modules/services/x11/window-managers/i3.nix
+++ b/nixos/modules/services/x11/window-managers/i3.nix
@@ -1,6 +1,6 @@
-{ pkgs, config, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
let
cfg = config.services.xserver.windowManager.i3;
diff --git a/nixos/modules/services/x11/window-managers/icewm.nix b/nixos/modules/services/x11/window-managers/icewm.nix
index b7da4051c14..36028da453a 100644
--- a/nixos/modules/services/x11/window-managers/icewm.nix
+++ b/nixos/modules/services/x11/window-managers/icewm.nix
@@ -1,6 +1,6 @@
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
let
diff --git a/nixos/modules/services/x11/window-managers/metacity.nix b/nixos/modules/services/x11/window-managers/metacity.nix
index 712e2038594..d13cbcfe40e 100644
--- a/nixos/modules/services/x11/window-managers/metacity.nix
+++ b/nixos/modules/services/x11/window-managers/metacity.nix
@@ -1,6 +1,6 @@
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
let
diff --git a/nixos/modules/services/x11/window-managers/twm.nix b/nixos/modules/services/x11/window-managers/twm.nix
index d80ffe4942f..684b34c2f24 100644
--- a/nixos/modules/services/x11/window-managers/twm.nix
+++ b/nixos/modules/services/x11/window-managers/twm.nix
@@ -1,6 +1,6 @@
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
let
diff --git a/nixos/modules/services/x11/window-managers/wmii.nix b/nixos/modules/services/x11/window-managers/wmii.nix
index b61521274fb..75f6fdfe3bc 100644
--- a/nixos/modules/services/x11/window-managers/wmii.nix
+++ b/nixos/modules/services/x11/window-managers/wmii.nix
@@ -1,6 +1,6 @@
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
let
diff --git a/nixos/modules/services/x11/xfs.nix b/nixos/modules/services/x11/xfs.nix
index 44c1d533c3a..196f3beb41e 100644
--- a/nixos/modules/services/x11/xfs.nix
+++ b/nixos/modules/services/x11/xfs.nix
@@ -1,6 +1,6 @@
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
let
diff --git a/nixos/modules/services/x11/xserver.nix b/nixos/modules/services/x11/xserver.nix
index 2985e55e787..1f02bfd6ef3 100644
--- a/nixos/modules/services/x11/xserver.nix
+++ b/nixos/modules/services/x11/xserver.nix
@@ -1,6 +1,6 @@
-{ config, pkgs, pkgs_i686, ... }:
+{ config, lib, pkgs, pkgs_i686, ... }:
-with pkgs.lib;
+with lib;
let
diff --git a/nixos/modules/system/activation/activation-script.nix b/nixos/modules/system/activation/activation-script.nix
index 1545bcb8a1f..41fe7d309a5 100644
--- a/nixos/modules/system/activation/activation-script.nix
+++ b/nixos/modules/system/activation/activation-script.nix
@@ -1,7 +1,7 @@
# generate the script used to activate the configuration.
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
let
diff --git a/nixos/modules/system/activation/no-clone.nix b/nixos/modules/system/activation/no-clone.nix
index c9ab691ce47..7f458443526 100644
--- a/nixos/modules/system/activation/no-clone.nix
+++ b/nixos/modules/system/activation/no-clone.nix
@@ -1,6 +1,6 @@
-{pkgs, ...}:
+{ lib, ... }:
-with pkgs.lib;
+with lib;
{
boot.loader.grub.device = mkOverride 0 "nodev";
diff --git a/nixos/modules/system/activation/switch-to-configuration.pl b/nixos/modules/system/activation/switch-to-configuration.pl
index e0649448c83..fd2b5b7950d 100644
--- a/nixos/modules/system/activation/switch-to-configuration.pl
+++ b/nixos/modules/system/activation/switch-to-configuration.pl
@@ -26,7 +26,10 @@ EOF
exit 1;
}
-die "This is not a NixOS installation (/etc/NIXOS is missing)!\n" unless -f "/etc/NIXOS";
+# This is a NixOS installation if it has /etc/NIXOS or a proper
+# /etc/os-release.
+die "This is not a NixOS installation!\n" unless
+ -f "/etc/NIXOS" || (read_file("/etc/os-release", err_mode => 'quiet') // "") =~ /ID=nixos/s;
openlog("nixos", "", LOG_USER);
@@ -173,7 +176,10 @@ while (my ($unit, $state) = each %{$activePrev}) {
# FIXME: do something?
} else {
my $unitInfo = parseUnit($newUnitFile);
- if (!boolIsTrue($unitInfo->{'X-RestartIfChanged'} // "yes")) {
+ if (boolIsTrue($unitInfo->{'X-ReloadIfChanged'} // "no")) {
+ write_file($reloadListFile, { append => 1 }, "$unit\n");
+ }
+ elsif (!boolIsTrue($unitInfo->{'X-RestartIfChanged'} // "yes")) {
push @unitsToSkip, $unit;
} else {
# If this unit is socket-activated, then stop the
@@ -321,7 +327,7 @@ if (scalar @restart > 0) {
# 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') // ""));
+my @start = unique("default.target", "timers.target", "sockets.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);
diff --git a/nixos/modules/system/activation/top-level.nix b/nixos/modules/system/activation/top-level.nix
index d9891f434cc..a4a0d14df6a 100644
--- a/nixos/modules/system/activation/top-level.nix
+++ b/nixos/modules/system/activation/top-level.nix
@@ -1,6 +1,6 @@
-{ config, pkgs, modules, baseModules, ... }:
+{ config, lib, pkgs, modules, baseModules, ... }:
-with pkgs.lib;
+with lib;
let
@@ -11,7 +11,7 @@ let
# 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;
+ cloner = inheritParent: list:
map (childConfig:
(import ../../../lib/eval-config.nix {
inherit baseModules;
diff --git a/nixos/modules/system/boot/kernel.nix b/nixos/modules/system/boot/kernel.nix
index 4cfd8a0b618..cff7c08579f 100644
--- a/nixos/modules/system/boot/kernel.nix
+++ b/nixos/modules/system/boot/kernel.nix
@@ -1,6 +1,6 @@
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
let
diff --git a/nixos/modules/system/boot/loader/efi.nix b/nixos/modules/system/boot/loader/efi.nix
index 7e739173f9a..241cfc7e836 100644
--- a/nixos/modules/system/boot/loader/efi.nix
+++ b/nixos/modules/system/boot/loader/efi.nix
@@ -1,6 +1,6 @@
-{ pkgs, ... }:
+{ lib, ... }:
-with pkgs.lib;
+with lib;
{
options.boot.loader.efi = {
diff --git a/nixos/modules/system/boot/loader/generations-dir/generations-dir.nix b/nixos/modules/system/boot/loader/generations-dir/generations-dir.nix
index 9855c8c19dd..4b5e84f53c1 100644
--- a/nixos/modules/system/boot/loader/generations-dir/generations-dir.nix
+++ b/nixos/modules/system/boot/loader/generations-dir/generations-dir.nix
@@ -1,6 +1,6 @@
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
let
diff --git a/nixos/modules/system/boot/loader/grub/grub.nix b/nixos/modules/system/boot/loader/grub/grub.nix
index ef6ff71ed77..d7f2319975c 100644
--- a/nixos/modules/system/boot/loader/grub/grub.nix
+++ b/nixos/modules/system/boot/loader/grub/grub.nix
@@ -1,6 +1,6 @@
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
let
diff --git a/nixos/modules/system/boot/loader/grub/memtest.nix b/nixos/modules/system/boot/loader/grub/memtest.nix
index afe194e672a..94e5a14174b 100644
--- a/nixos/modules/system/boot/loader/grub/memtest.nix
+++ b/nixos/modules/system/boot/loader/grub/memtest.nix
@@ -1,8 +1,8 @@
# This module adds Memtest86+ to the GRUB boot menu.
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
let
memtest86 = pkgs.memtest86plus;
diff --git a/nixos/modules/system/boot/loader/gummiboot/gummiboot.nix b/nixos/modules/system/boot/loader/gummiboot/gummiboot.nix
index 7edc3077637..19c613a7c94 100644
--- a/nixos/modules/system/boot/loader/gummiboot/gummiboot.nix
+++ b/nixos/modules/system/boot/loader/gummiboot/gummiboot.nix
@@ -1,6 +1,6 @@
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
let
cfg = config.boot.loader.gummiboot;
diff --git a/nixos/modules/system/boot/loader/init-script/init-script.nix b/nixos/modules/system/boot/loader/init-script/init-script.nix
index 4b0fcd85b4b..3b33d42b4ae 100644
--- a/nixos/modules/system/boot/loader/init-script/init-script.nix
+++ b/nixos/modules/system/boot/loader/init-script/init-script.nix
@@ -1,6 +1,6 @@
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
let
diff --git a/nixos/modules/system/boot/loader/raspberrypi/raspberrypi.nix b/nixos/modules/system/boot/loader/raspberrypi/raspberrypi.nix
index 5bc856c3df0..d3f32418a64 100644
--- a/nixos/modules/system/boot/loader/raspberrypi/raspberrypi.nix
+++ b/nixos/modules/system/boot/loader/raspberrypi/raspberrypi.nix
@@ -1,6 +1,6 @@
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
let
diff --git a/nixos/modules/system/boot/luksroot.nix b/nixos/modules/system/boot/luksroot.nix
index 117c526fcd3..c923cc49c44 100644
--- a/nixos/modules/system/boot/luksroot.nix
+++ b/nixos/modules/system/boot/luksroot.nix
@@ -1,6 +1,6 @@
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
let
luks = config.boot.initrd.luks;
diff --git a/nixos/modules/system/boot/modprobe.nix b/nixos/modules/system/boot/modprobe.nix
index f694fd29dd0..7b214cd1e1f 100644
--- a/nixos/modules/system/boot/modprobe.nix
+++ b/nixos/modules/system/boot/modprobe.nix
@@ -1,6 +1,6 @@
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
{
diff --git a/nixos/modules/system/boot/shutdown.nix b/nixos/modules/system/boot/shutdown.nix
index 44cadcd64a7..68bc936c5b0 100644
--- a/nixos/modules/system/boot/shutdown.nix
+++ b/nixos/modules/system/boot/shutdown.nix
@@ -1,6 +1,6 @@
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
{
diff --git a/nixos/modules/system/boot/stage-1.nix b/nixos/modules/system/boot/stage-1.nix
index 8ed3aecb691..f69e6cfe54c 100644
--- a/nixos/modules/system/boot/stage-1.nix
+++ b/nixos/modules/system/boot/stage-1.nix
@@ -3,9 +3,9 @@
# 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, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
let
diff --git a/nixos/modules/system/boot/stage-2.nix b/nixos/modules/system/boot/stage-2.nix
index aa0d7e0c138..2616c8649d5 100644
--- a/nixos/modules/system/boot/stage-2.nix
+++ b/nixos/modules/system/boot/stage-2.nix
@@ -1,6 +1,6 @@
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
let
diff --git a/nixos/modules/system/boot/systemd-unit-options.nix b/nixos/modules/system/boot/systemd-unit-options.nix
index d9dc6549f36..20ea0ba874d 100644
--- a/nixos/modules/system/boot/systemd-unit-options.nix
+++ b/nixos/modules/system/boot/systemd-unit-options.nix
@@ -1,6 +1,6 @@
-{ config, pkgs }:
+{ config, lib }:
-with pkgs.lib;
+with lib;
let
@@ -243,6 +243,17 @@ in rec {
'';
};
+ reloadIfChanged = mkOption {
+ type = types.bool;
+ default = false;
+ description = ''
+ Whether the service should be reloaded during a NixOS
+ configuration switch if its definition has changed. If
+ enabled, the value of is
+ ignored.
+ '';
+ };
+
stopIfChanged = mkOption {
type = types.bool;
default = true;
diff --git a/nixos/modules/system/boot/systemd.nix b/nixos/modules/system/boot/systemd.nix
index 72d72402409..3582694a181 100644
--- a/nixos/modules/system/boot/systemd.nix
+++ b/nixos/modules/system/boot/systemd.nix
@@ -1,8 +1,8 @@
-{ config, pkgs, utils, ... }:
+{ config, lib, pkgs, utils, ... }:
-with pkgs.lib;
+with lib;
with utils;
-with import ./systemd-unit-options.nix { inherit config pkgs; };
+with import ./systemd-unit-options.nix { inherit config lib; };
let
@@ -279,7 +279,11 @@ let
[Service]
${let env = cfg.globalEnvironment // def.environment;
in concatMapStrings (n: "Environment=\"${n}=${getAttr n env}\"\n") (attrNames env)}
- ${optionalString (!def.restartIfChanged) "X-RestartIfChanged=false"}
+ ${if def.reloadIfChanged then ''
+ X-ReloadIfChanged=true
+ '' else if !def.restartIfChanged then ''
+ X-RestartIfChanged=false
+ '' else ""}
${optionalString (!def.stopIfChanged) "X-StopIfChanged=false"}
${attrsToSection def.serviceConfig}
'';
diff --git a/nixos/modules/system/etc/etc.nix b/nixos/modules/system/etc/etc.nix
index e9c03df2ba3..22d55a9e246 100644
--- a/nixos/modules/system/etc/etc.nix
+++ b/nixos/modules/system/etc/etc.nix
@@ -1,8 +1,8 @@
# Management of static files in /etc.
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
let
diff --git a/nixos/modules/system/upstart/upstart.nix b/nixos/modules/system/upstart/upstart.nix
index aa5c8dfe64b..1ad4885edf5 100644
--- a/nixos/modules/system/upstart/upstart.nix
+++ b/nixos/modules/system/upstart/upstart.nix
@@ -1,7 +1,7 @@
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
-with import ../boot/systemd-unit-options.nix { inherit config pkgs; };
+with lib;
+with import ../boot/systemd-unit-options.nix { inherit config lib; };
let
diff --git a/nixos/modules/tasks/cpu-freq.nix b/nixos/modules/tasks/cpu-freq.nix
index 705ec93a136..3df9b58c524 100644
--- a/nixos/modules/tasks/cpu-freq.nix
+++ b/nixos/modules/tasks/cpu-freq.nix
@@ -1,6 +1,6 @@
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
{
###### interface
diff --git a/nixos/modules/tasks/filesystems.nix b/nixos/modules/tasks/filesystems.nix
index b0bcd2eb373..954d0b0781f 100644
--- a/nixos/modules/tasks/filesystems.nix
+++ b/nixos/modules/tasks/filesystems.nix
@@ -1,6 +1,6 @@
-{ config, pkgs, utils, ... }:
+{ config, lib, pkgs, utils, ... }:
-with pkgs.lib;
+with lib;
with utils;
let
@@ -148,7 +148,7 @@ in
system.fsPackages = [ pkgs.dosfstools ];
environment.systemPackages =
- [ pkgs.ntfs3g pkgs.cifs_utils ]
+ [ pkgs.ntfs3g pkgs.cifs_utils pkgs.fuse ]
++ config.system.fsPackages;
environment.etc.fstab.text =
diff --git a/nixos/modules/tasks/filesystems/btrfs.nix b/nixos/modules/tasks/filesystems/btrfs.nix
index d95a32e2e3f..d0a2ac645e0 100644
--- a/nixos/modules/tasks/filesystems/btrfs.nix
+++ b/nixos/modules/tasks/filesystems/btrfs.nix
@@ -1,6 +1,6 @@
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
let
diff --git a/nixos/modules/tasks/filesystems/nfs.nix b/nixos/modules/tasks/filesystems/nfs.nix
index 2b720a93b89..e8c3d8ab56d 100644
--- a/nixos/modules/tasks/filesystems/nfs.nix
+++ b/nixos/modules/tasks/filesystems/nfs.nix
@@ -1,6 +1,6 @@
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
let
diff --git a/nixos/modules/tasks/filesystems/reiserfs.nix b/nixos/modules/tasks/filesystems/reiserfs.nix
index f8c6a700004..a3bfb3fed8e 100644
--- a/nixos/modules/tasks/filesystems/reiserfs.nix
+++ b/nixos/modules/tasks/filesystems/reiserfs.nix
@@ -1,6 +1,6 @@
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
let
diff --git a/nixos/modules/tasks/filesystems/vfat.nix b/nixos/modules/tasks/filesystems/vfat.nix
index 5ca72f142b7..4cfe6e208f7 100644
--- a/nixos/modules/tasks/filesystems/vfat.nix
+++ b/nixos/modules/tasks/filesystems/vfat.nix
@@ -1,6 +1,6 @@
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
let
diff --git a/nixos/modules/tasks/filesystems/xfs.nix b/nixos/modules/tasks/filesystems/xfs.nix
index 6800696a05a..5225b62a88c 100644
--- a/nixos/modules/tasks/filesystems/xfs.nix
+++ b/nixos/modules/tasks/filesystems/xfs.nix
@@ -1,6 +1,6 @@
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
let
diff --git a/nixos/modules/tasks/filesystems/zfs.nix b/nixos/modules/tasks/filesystems/zfs.nix
index 32e3da6a273..1d75a24692c 100644
--- a/nixos/modules/tasks/filesystems/zfs.nix
+++ b/nixos/modules/tasks/filesystems/zfs.nix
@@ -1,4 +1,4 @@
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
#
# todo:
# - crontab for scrubs, etc
@@ -6,7 +6,7 @@
# - /etc/zfs/zpool.cache handling
-with pkgs.lib;
+with lib;
let
diff --git a/nixos/modules/tasks/kbd.nix b/nixos/modules/tasks/kbd.nix
index 1083fb784fc..df4737305da 100644
--- a/nixos/modules/tasks/kbd.nix
+++ b/nixos/modules/tasks/kbd.nix
@@ -1,6 +1,6 @@
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
let
diff --git a/nixos/modules/tasks/network-interfaces.nix b/nixos/modules/tasks/network-interfaces.nix
index 548685377a9..a33b571d437 100644
--- a/nixos/modules/tasks/network-interfaces.nix
+++ b/nixos/modules/tasks/network-interfaces.nix
@@ -1,6 +1,6 @@
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
let
diff --git a/nixos/modules/tasks/scsi-link-power-management.nix b/nixos/modules/tasks/scsi-link-power-management.nix
index 071a8086598..a74023dec21 100644
--- a/nixos/modules/tasks/scsi-link-power-management.nix
+++ b/nixos/modules/tasks/scsi-link-power-management.nix
@@ -1,6 +1,6 @@
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
{
###### interface
diff --git a/nixos/modules/testing/service-runner.nix b/nixos/modules/testing/service-runner.nix
index 6f17ed77dad..dfe8b430e04 100644
--- a/nixos/modules/testing/service-runner.nix
+++ b/nixos/modules/testing/service-runner.nix
@@ -1,6 +1,6 @@
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
let
diff --git a/nixos/modules/testing/test-instrumentation.nix b/nixos/modules/testing/test-instrumentation.nix
index 28494e1c7b2..7b4e5a8cac0 100644
--- a/nixos/modules/testing/test-instrumentation.nix
+++ b/nixos/modules/testing/test-instrumentation.nix
@@ -1,9 +1,9 @@
# This module allows the test driver to connect to the virtual machine
# via a root shell attached to port 514.
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
let kernel = config.boot.kernelPackages.kernel; in
diff --git a/nixos/modules/virtualisation/amazon-image.nix b/nixos/modules/virtualisation/amazon-image.nix
index 99d6f927ef0..18b18dd4b23 100644
--- a/nixos/modules/virtualisation/amazon-image.nix
+++ b/nixos/modules/virtualisation/amazon-image.nix
@@ -1,6 +1,6 @@
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
{
imports = [ ../profiles/headless.nix ./ec2-data.nix ];
diff --git a/nixos/modules/virtualisation/container-config.nix b/nixos/modules/virtualisation/container-config.nix
new file mode 100644
index 00000000000..da80e44f2c3
--- /dev/null
+++ b/nixos/modules/virtualisation/container-config.nix
@@ -0,0 +1,107 @@
+{ config, pkgs, lib, ... }:
+
+with lib;
+
+{
+
+ config = mkIf config.boot.isContainer {
+
+ # Provide a login prompt on /var/lib/login.socket. On the host,
+ # you can connect to it by running ‘socat
+ # unix:/var/lib/login.socket -,echo=0,raw’.
+ systemd.sockets.login =
+ { description = "Login Socket";
+ wantedBy = [ "sockets.target" ];
+ socketConfig =
+ { ListenStream = "/var/lib/login.socket";
+ SocketMode = "0666";
+ Accept = true;
+ };
+ };
+
+ systemd.services."login@" =
+ { description = "Login %i";
+ environment.TERM = "linux";
+ serviceConfig =
+ { Type = "simple";
+ StandardInput = "socket";
+ ExecStart = "${pkgs.socat}/bin/socat -t0 - exec:${pkgs.shadow}/bin/login,pty,setsid,setpgid,stderr,ctty";
+ TimeoutStopSec = 1; # FIXME
+ };
+ restartIfChanged = false;
+ };
+
+ # Also provide a root login prompt on /var/lib/root-login.socket
+ # that doesn't ask for a password. This socket can only be used by
+ # root on the host.
+ systemd.sockets.root-login =
+ { description = "Root Login Socket";
+ wantedBy = [ "sockets.target" ];
+ socketConfig =
+ { ListenStream = "/var/lib/root-login.socket";
+ SocketMode = "0600";
+ Accept = true;
+ };
+ };
+
+ systemd.services."root-login@" =
+ { description = "Root Login %i";
+ environment.TERM = "linux";
+ serviceConfig =
+ { Type = "simple";
+ StandardInput = "socket";
+ ExecStart = "${pkgs.socat}/bin/socat -t0 - \"exec:${pkgs.shadow}/bin/login -f root,pty,setsid,setpgid,stderr,ctty\"";
+ TimeoutStopSec = 1; # FIXME
+ };
+ restartIfChanged = false;
+ };
+
+ # Provide a daemon on /var/lib/run-command.socket that reads a
+ # command from stdin and executes it.
+ systemd.sockets.run-command =
+ { description = "Run Command Socket";
+ wantedBy = [ "sockets.target" ];
+ socketConfig =
+ { ListenStream = "/var/lib/run-command.socket";
+ SocketMode = "0600"; # only root can connect
+ Accept = true;
+ };
+ };
+
+ systemd.services."run-command@" =
+ { description = "Run Command %i";
+ environment.TERM = "linux";
+ serviceConfig =
+ { Type = "simple";
+ StandardInput = "socket";
+ TimeoutStopSec = 1; # FIXME
+ };
+ script =
+ ''
+ #! ${pkgs.stdenv.shell} -e
+ source /etc/bashrc
+ read c
+ eval "command=($c)"
+ exec "''${command[@]}"
+ '';
+ restartIfChanged = false;
+ };
+
+ systemd.services.container-startup-done =
+ { description = "Container Startup Notification";
+ wantedBy = [ "multi-user.target" ];
+ after = [ "multi-user.target" ];
+ script =
+ ''
+ if [ -p /var/lib/startup-done ]; then
+ echo done > /var/lib/startup-done
+ fi
+ '';
+ serviceConfig.Type = "oneshot";
+ serviceConfig.RemainAfterExit = true;
+ restartIfChanged = false;
+ };
+
+ };
+
+}
diff --git a/nixos/modules/virtualisation/containers.nix b/nixos/modules/virtualisation/containers.nix
index d87284de4fc..065c4dc50d2 100644
--- a/nixos/modules/virtualisation/containers.nix
+++ b/nixos/modules/virtualisation/containers.nix
@@ -1,6 +1,31 @@
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
+
+let
+
+ runInNetns = pkgs.stdenv.mkDerivation {
+ name = "run-in-netns";
+ unpackPhase = "true";
+ buildPhase = ''
+ mkdir -p $out/bin
+ gcc ${./run-in-netns.c} -o $out/bin/run-in-netns
+ '';
+ installPhase = "true";
+ };
+
+ nixos-container = pkgs.substituteAll {
+ name = "nixos-container";
+ dir = "bin";
+ isExecutable = true;
+ src = ./nixos-container.pl;
+ perl = "${pkgs.perl}/bin/perl -I${pkgs.perlPackages.FileSlurp}/lib/perl5/site_perl";
+ inherit (pkgs) socat;
+ };
+
+ system = config.nixpkgs.system;
+
+in
{
options = {
@@ -14,19 +39,12 @@ with pkgs.lib;
'';
};
- systemd.containers = mkOption {
+ containers = mkOption {
type = types.attrsOf (types.submodule (
{ config, options, name, ... }:
{
options = {
- root = mkOption {
- type = types.path;
- description = ''
- The root directory of the container.
- '';
- };
-
config = mkOption {
description = ''
A specification of the desired configuration of this
@@ -45,21 +63,54 @@ with pkgs.lib;
'';
};
+ privateNetwork = mkOption {
+ type = types.bool;
+ default = false;
+ description = ''
+ Whether to give the container its own private virtual
+ Ethernet interface. The interface is called
+ eth0, and is hooked up to the interface
+ c-container-name
+ on the host. If this option is not set, then the
+ container shares the network interfaces of the host,
+ and can bind to any port on any interface.
+ '';
+ };
+
+ hostAddress = mkOption {
+ type = types.nullOr types.string;
+ default = null;
+ example = "10.231.136.1";
+ description = ''
+ The IPv4 address assigned to the host interface.
+ '';
+ };
+
+ localAddress = mkOption {
+ type = types.nullOr types.string;
+ default = null;
+ example = "10.231.136.2";
+ description = ''
+ The IPv4 address assigned to eth0
+ in the container.
+ '';
+ };
+
};
config = mkMerge
- [ { root = mkDefault "/var/lib/containers/${name}";
- }
- (mkIf options.config.isDefined {
+ [ (mkIf options.config.isDefined {
path = (import ../../lib/eval-config.nix {
+ inherit system;
modules =
let extraConfig =
{ boot.isContainer = true;
security.initialRootPassword = mkDefault "!";
networking.hostName = mkDefault name;
+ networking.useDHCP = false;
};
in [ extraConfig config.config ];
- prefix = [ "systemd" "containers" name ];
+ prefix = [ "containers" name ];
}).config.system.build.toplevel;
})
];
@@ -69,12 +120,10 @@ with pkgs.lib;
example = literalExample
''
{ webserver =
- { root = "/containers/webserver";
- path = "/nix/var/nix/profiles/webserver";
+ { path = "/nix/var/nix/profiles/webserver";
};
database =
- { root = "/containers/database";
- config =
+ { config =
{ config, pkgs, ... }:
{ services.postgresql.enable = true;
services.postgresql.package = pkgs.postgresql92;
@@ -94,29 +143,97 @@ with pkgs.lib;
};
- config = {
+ config = mkIf (!config.boot.isContainer) {
- systemd.services = mapAttrs' (name: container: nameValuePair "container-${name}"
- { description = "Container '${name}'";
+ systemd.services."container@" =
+ { description = "Container '%i'";
- wantedBy = [ "multi-user.target" ];
+ unitConfig.RequiresMountsFor = [ "/var/lib/containers/%i" ];
- unitConfig.RequiresMountsFor = [ container.root ];
+ path = [ pkgs.iproute ];
+
+ environment.INSTANCE = "%i";
+ environment.root = "/var/lib/containers/%i";
preStart =
''
- mkdir -p -m 0755 ${container.root}/etc
- if ! [ -e ${container.root}/etc/os-release ]; then
- touch ${container.root}/etc/os-release
+ mkdir -p -m 0755 $root/var/lib
+
+ # Create a named pipe to get a signal when the container
+ # has finished booting.
+ rm -f $root/var/lib/startup-done
+ mkfifo -m 0600 $root/var/lib/startup-done
+ '';
+
+ script =
+ ''
+ mkdir -p -m 0755 "$root/etc" "$root/var/lib"
+ if ! [ -e "$root/etc/os-release" ]; then
+ touch "$root/etc/os-release"
fi
+
+ mkdir -p -m 0755 \
+ "/nix/var/nix/profiles/per-container/$INSTANCE" \
+ "/nix/var/nix/gcroots/per-container/$INSTANCE"
+
+ SYSTEM_PATH=/nix/var/nix/profiles/system
+ if [ -f "/etc/containers/$INSTANCE.conf" ]; then
+ . "/etc/containers/$INSTANCE.conf"
+ fi
+
+ # Cleanup from last time.
+ ifaceHost=c-$INSTANCE
+ ifaceCont=ctmp-$INSTANCE
+ ns=net-$INSTANCE
+ ip netns del $ns 2> /dev/null || true
+ ip link del $ifaceHost 2> /dev/null || true
+ ip link del $ifaceCont 2> /dev/null || true
+
+ if [ "$PRIVATE_NETWORK" = 1 ]; then
+ # Create a pair of virtual ethernet devices. On the host,
+ # we get ‘c- [--config ] [--ensure-unique-name]
+ nixos-container destroy
+ nixos-container start
+ nixos-container stop
+ nixos-container login
+ nixos-container root-login
+ nixos-container run -- args...
+ nixos-container set-root-password
+ nixos-container show-ip
+EOF
+ exit 0;
+}
+
+my $ensureUniqueName = 0;
+my $extraConfig = "";
+
+GetOptions(
+ "help" => sub { showHelp() },
+ "ensure-unique-name" => \$ensureUniqueName,
+ "config=s" => \$extraConfig
+ ) or exit 1;
+
+my $action = $ARGV[0] or die "$0: no action specified\n";
+
+
+# Execute the selected action.
+
+mkpath("/etc/containers", 0, 0755);
+mkpath("/var/lib/containers", 0, 0700);
+
+if ($action eq "list") {
+ foreach my $confFile (glob "/etc/containers/*.conf") {
+ $confFile =~ /\/([^\/]+).conf$/ or next;
+ print "$1\n";
+ }
+ exit 0;
+}
+
+my $containerName = $ARGV[1] or die "$0: no container name specified\n";
+$containerName =~ /^[a-zA-Z0-9\-]+$/ or die "$0: invalid container name\n";
+
+sub writeNixOSConfig {
+ my ($nixosConfigFile) = @_;
+
+ my $nixosConfig = <>', $lockFN) or die "$0: opening $lockFN: $!";
+ flock($lock, LOCK_EX) or die "$0: could not lock $lockFN: $!";
+
+ my $confFile = "/etc/containers/$containerName.conf";
+ my $root = "/var/lib/containers/$containerName";
+
+ # Maybe generate a unique name.
+ if ($ensureUniqueName) {
+ my $base = $containerName;
+ for (my $nr = 0; ; $nr++) {
+ $containerName = "$base-$nr";
+ $confFile = "/etc/containers/$containerName.conf";
+ $root = "/var/lib/containers/$containerName";
+ last unless -e $confFile || -e $root;
+ }
+ }
+
+ die "$0: container ‘$containerName’ already exists\n" if -e $confFile;
+
+ # Get an unused IP address.
+ my %usedIPs;
+ foreach my $confFile2 (glob "/etc/containers/*.conf") {
+ my $s = read_file($confFile2) or die;
+ $usedIPs{$1} = 1 if $s =~ /^HOST_ADDRESS=([0-9\.]+)$/m;
+ $usedIPs{$1} = 1 if $s =~ /^LOCAL_ADDRESS=([0-9\.]+)$/m;
+ }
+
+ my ($ipPrefix, $hostAddress, $localAddress);
+ for (my $nr = 1; $nr < 255; $nr++) {
+ $ipPrefix = "10.233.$nr";
+ $hostAddress = "$ipPrefix.1";
+ $localAddress = "$ipPrefix.2";
+ last unless $usedIPs{$hostAddress} || $usedIPs{$localAddress};
+ $ipPrefix = undef;
+ }
+
+ die "$0: out of IP addresses\n" unless defined $ipPrefix;
+
+ my @conf;
+ push @conf, "PRIVATE_NETWORK=1\n";
+ push @conf, "HOST_ADDRESS=$hostAddress\n";
+ push @conf, "LOCAL_ADDRESS=$localAddress\n";
+ write_file($confFile, \@conf);
+
+ close($lock);
+
+ print STDERR "host IP is $hostAddress, container IP is $localAddress\n";
+
+ mkpath("$root/etc/nixos", 0, 0755);
+
+ my $nixosConfigFile = "$root/etc/nixos/configuration.nix";
+ writeNixOSConfig $nixosConfigFile;
+
+ # The per-container directory is restricted to prevent users on
+ # the host from messing with guest users who happen to have the
+ # same uid.
+ my $profileDir = "/nix/var/nix/profiles/per-container";
+ mkpath($profileDir, 0, 0700);
+ $profileDir = "$profileDir/$containerName";
+ mkpath($profileDir, 0, 0755);
+
+ system("nix-env", "-p", "$profileDir/system",
+ "-I", "nixos-config=$nixosConfigFile", "-f", "",
+ "--set", "-A", "system") == 0
+ or die "$0: failed to build initial container configuration\n";
+
+ print "$containerName\n" if $ensureUniqueName;
+ exit 0;
+}
+
+my $root = "/var/lib/containers/$containerName";
+my $profileDir = "/nix/var/nix/profiles/per-container/$containerName";
+my $confFile = "/etc/containers/$containerName.conf";
+die "$0: container ‘$containerName’ does not exist\n" if !-e $confFile;
+
+sub isContainerRunning {
+ my $status = `systemctl show 'container\@$containerName'`;
+ return $status =~ /ActiveState=active/;
+}
+
+sub stopContainer {
+ system("systemctl", "stop", "container\@$containerName") == 0
+ or die "$0: failed to stop container\n";
+}
+
+if ($action eq "destroy") {
+ die "$0: cannot destroy declarative container (remove it from your configuration.nix instead)\n"
+ unless POSIX::access($confFile, &POSIX::W_OK);
+
+ stopContainer if isContainerRunning;
+
+ rmtree($profileDir) if -e $profileDir;
+ rmtree($root) if -e $root;
+ unlink($confFile) or die;
+}
+
+elsif ($action eq "start") {
+ system("systemctl", "start", "container\@$containerName") == 0
+ or die "$0: failed to start container\n";
+}
+
+elsif ($action eq "stop") {
+ stopContainer;
+}
+
+elsif ($action eq "update") {
+ my $nixosConfigFile = "$root/etc/nixos/configuration.nix";
+
+ # FIXME: may want to be more careful about clobbering the existing
+ # configuration.nix.
+ writeNixOSConfig $nixosConfigFile if defined $extraConfig;
+
+ system("nix-env", "-p", "$profileDir/system",
+ "-I", "nixos-config=$nixosConfigFile", "-f", "",
+ "--set", "-A", "system") == 0
+ or die "$0: failed to build container configuration\n";
+
+ if (isContainerRunning) {
+ print STDERR "reloading container...\n";
+ system("systemctl", "reload", "container\@$containerName") == 0
+ or die "$0: failed to reload container\n";
+ }
+}
+
+elsif ($action eq "login") {
+ exec($socat, "unix:$root/var/lib/login.socket", "-,echo=0,raw");
+}
+
+elsif ($action eq "root-login") {
+ exec($socat, "unix:$root/var/lib/root-login.socket", "-,echo=0,raw");
+}
+
+elsif ($action eq "run") {
+ shift @ARGV; shift @ARGV;
+ open(SOCAT, "|-", $socat, "unix:$root/var/lib/run-command.socket", "-");
+ print SOCAT join(' ', map { "'$_'" } @ARGV), "\n";
+ close(SOCAT);
+}
+
+elsif ($action eq "set-root-password") {
+ # FIXME: don't get password from the command line.
+ my $password = $ARGV[2] or die "$0: no password given\n";
+ open(SOCAT, "|-", $socat, "unix:$root/var/lib/run-command.socket", "-");
+ print SOCAT "passwd\n";
+ print SOCAT "$password\n";
+ print SOCAT "$password\n";
+ close(SOCAT);
+}
+
+elsif ($action eq "show-ip") {
+ my $s = read_file($confFile) or die;
+ $s =~ /^LOCAL_ADDRESS=([0-9\.]+)$/m or die "$0: cannot get IP address\n";
+ print "$1\n";
+}
+
+else {
+ die "$0: unknown action ‘$action’\n";
+}
diff --git a/nixos/modules/virtualisation/nova-image.nix b/nixos/modules/virtualisation/nova-image.nix
index 5c9481b7127..2523dacc0b5 100644
--- a/nixos/modules/virtualisation/nova-image.nix
+++ b/nixos/modules/virtualisation/nova-image.nix
@@ -1,6 +1,6 @@
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
{
imports = [ ../profiles/qemu-guest.nix ../profiles/headless.nix ./ec2-data.nix ];
diff --git a/nixos/modules/virtualisation/nova.nix b/nixos/modules/virtualisation/nova.nix
index e0d25183574..8795b5b52d5 100644
--- a/nixos/modules/virtualisation/nova.nix
+++ b/nixos/modules/virtualisation/nova.nix
@@ -1,8 +1,8 @@
# Module for Nova, a.k.a. OpenStack Compute.
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
let
diff --git a/nixos/modules/virtualisation/qemu-vm.nix b/nixos/modules/virtualisation/qemu-vm.nix
index a866b513f0f..7662427854e 100644
--- a/nixos/modules/virtualisation/qemu-vm.nix
+++ b/nixos/modules/virtualisation/qemu-vm.nix
@@ -7,9 +7,9 @@
# the VM in the host. On the other hand, the root filesystem is a
# read/writable disk image persistent across VM reboots.
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
let
diff --git a/nixos/modules/virtualisation/run-in-netns.c b/nixos/modules/virtualisation/run-in-netns.c
new file mode 100644
index 00000000000..d375bddf2e6
--- /dev/null
+++ b/nixos/modules/virtualisation/run-in-netns.c
@@ -0,0 +1,50 @@
+#define _GNU_SOURCE
+
+#include
+#include
+#include
+
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+
+int main(int argc, char * * argv)
+{
+ if (argc < 3) {
+ fprintf(stderr, "%s: missing arguments\n", argv[0]);
+ return 1;
+ }
+
+ char nsPath[PATH_MAX];
+
+ sprintf(nsPath, "/run/netns/%s", argv[1]);
+
+ int fd = open(nsPath, O_RDONLY);
+ if (fd == -1) {
+ fprintf(stderr, "%s: opening network namespace: %s\n", argv[0], strerror(errno));
+ return 1;
+ }
+
+ if (setns(fd, CLONE_NEWNET) == -1) {
+ fprintf(stderr, "%s: setting network namespace: %s\n", argv[0], strerror(errno));
+ return 1;
+ }
+
+ umount2(nsPath, MNT_DETACH);
+ if (unlink(nsPath) == -1) {
+ fprintf(stderr, "%s: unlinking network namespace: %s\n", argv[0], strerror(errno));
+ return 1;
+ }
+
+ /* FIXME: Remount /sys so that /sys/class/net reflects the
+ interfaces visible in the network namespace. This requires
+ bind-mounting /sys/fs/cgroups etc. */
+
+ execv(argv[2], argv + 2);
+ fprintf(stderr, "%s: running command: %s\n", argv[0], strerror(errno));
+ return 1;
+}
diff --git a/nixos/modules/virtualisation/virtualbox-guest.nix b/nixos/modules/virtualisation/virtualbox-guest.nix
index b06ae94438e..96354f1d81d 100644
--- a/nixos/modules/virtualisation/virtualbox-guest.nix
+++ b/nixos/modules/virtualisation/virtualbox-guest.nix
@@ -1,8 +1,8 @@
# Module for VirtualBox guests.
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
let
diff --git a/nixos/modules/virtualisation/virtualbox-image.nix b/nixos/modules/virtualisation/virtualbox-image.nix
index 8323325dabf..3247881784e 100644
--- a/nixos/modules/virtualisation/virtualbox-image.nix
+++ b/nixos/modules/virtualisation/virtualbox-image.nix
@@ -1,6 +1,6 @@
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
{
system.build.virtualBoxImage =
diff --git a/nixos/modules/virtualisation/xen-dom0.nix b/nixos/modules/virtualisation/xen-dom0.nix
index 40f6929be4f..566059472c9 100644
--- a/nixos/modules/virtualisation/xen-dom0.nix
+++ b/nixos/modules/virtualisation/xen-dom0.nix
@@ -1,8 +1,8 @@
# Xen hypervisor (Dom0) support.
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-with pkgs.lib;
+with lib;
let
diff --git a/nixos/release-combined.nix b/nixos/release-combined.nix
index 94bc2f796eb..741ab62bbc0 100644
--- a/nixos/release-combined.nix
+++ b/nixos/release-combined.nix
@@ -60,8 +60,8 @@ in rec {
(all nixos.tests.openssh)
(all nixos.tests.printing)
(all nixos.tests.proxy)
+ (all nixos.tests.udisks)
(all nixos.tests.xfce)
- (all nixos.tests.gnome3)
nixpkgs.tarball
(all nixpkgs.emacs)
diff --git a/nixos/release.nix b/nixos/release.nix
index b98976c2cce..45c37570c1b 100644
--- a/nixos/release.nix
+++ b/nixos/release.nix
@@ -14,6 +14,8 @@ let
forAllSystems = pkgs.lib.genAttrs systems;
+ callTest = fn: args: forAllSystems (system: import fn ({ inherit system; } // args));
+
pkgs = import nixpkgs { system = "x86_64-linux"; };
lib = pkgs.lib;
@@ -207,14 +209,42 @@ in rec {
*/
- # 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 lib;
- let
- testsFor = system:
- mapAttrsRecursiveCond (x: !x ? test)
- (n: v: listToAttrs [(nameValuePair system (if v.makeCoverageReport or false then v.report else v.test))])
- (import ./tests { inherit nixpkgs system; });
- in fold recursiveUpdate {} (map testsFor systems);
+ # Run the tests for each platform. You can run a test by doing
+ # e.g. ‘nix-build -A tests.login.x86_64-linux’, or equivalently,
+ # ‘nix-build tests/login.nix -A result’.
+ tests.avahi = callTest tests/avahi.nix {};
+ tests.bittorrent = callTest tests/bittorrent.nix {};
+ tests.containers = callTest tests/containers.nix {};
+ tests.firefox = callTest tests/firefox.nix {};
+ tests.firewall = callTest tests/firewall.nix {};
+ tests.gnome3 = callTest tests/gnome3.nix {};
+ tests.installer.grub1 = forAllSystems (system: (import tests/installer.nix { inherit system; }).grub1.test);
+ tests.installer.lvm = forAllSystems (system: (import tests/installer.nix { inherit system; }).lvm.test);
+ tests.installer.rebuildCD = forAllSystems (system: (import tests/installer.nix { inherit system; }).rebuildCD.test);
+ tests.installer.separateBoot = forAllSystems (system: (import tests/installer.nix { inherit system; }).separateBoot.test);
+ tests.installer.simple = forAllSystems (system: (import tests/installer.nix { inherit system; }).simple.test);
+ tests.ipv6 = callTest tests/ipv6.nix {};
+ tests.jenkins = callTest tests/jenkins.nix {};
+ tests.kde4 = callTest tests/kde4.nix {};
+ tests.latestKernel.login = callTest tests/login.nix { latestKernel = true; };
+ tests.login = callTest tests/login.nix {};
+ tests.logstash = callTest tests/logstash.nix {};
+ tests.misc = callTest tests/misc.nix {};
+ tests.mumble = callTest tests/mumble.nix {};
+ tests.munin = callTest tests/munin.nix {};
+ tests.mysql = callTest tests/mysql.nix {};
+ tests.mysqlReplication = callTest tests/mysql-replication.nix {};
+ tests.nat = callTest tests/nat.nix {};
+ tests.nfs3 = callTest tests/nfs.nix { version = 3; };
+ tests.openssh = callTest tests/openssh.nix {};
+ tests.printing = callTest tests/printing.nix {};
+ tests.proxy = callTest tests/proxy.nix {};
+ tests.quake3 = callTest tests/quake3.nix {};
+ tests.rabbitmq = callTest tests/rabbitmq.nix {};
+ tests.runInMachine = callTest tests/run-in-machine.nix {};
+ tests.simple = callTest tests/simple.nix {};
+ tests.tomcat = callTest tests/tomcat.nix {};
+ tests.udisks = callTest tests/udisks.nix {};
+ tests.xfce = callTest tests/xfce.nix {};
+
}
diff --git a/nixos/tests/avahi.nix b/nixos/tests/avahi.nix
index d95361dcd83..4091e7ece50 100644
--- a/nixos/tests/avahi.nix
+++ b/nixos/tests/avahi.nix
@@ -1,8 +1,7 @@
-{ pkgs, ... }:
+# Test whether `avahi-daemon' and `libnss-mdns' work as expected.
-with pkgs;
+import ./make-test.nix {
-{
nodes = {
one =
{ config, pkgs, ... }: {
@@ -17,7 +16,6 @@ with pkgs;
};
};
- # Test whether `avahi-daemon' and `libnss-mdns' work as expected.
testScript =
'' startAll;
diff --git a/nixos/tests/bittorrent.nix b/nixos/tests/bittorrent.nix
index 6e67edb0b82..b58657a5ecd 100644
--- a/nixos/tests/bittorrent.nix
+++ b/nixos/tests/bittorrent.nix
@@ -6,7 +6,7 @@
# which only works if the first client successfully uses the UPnP-IGD
# protocol to poke a hole in the NAT.
-{ pkgs, ... }:
+import ./make-test.nix ({ pkgs, ... }:
let
@@ -33,6 +33,8 @@ in
services.httpd.enable = true;
services.httpd.adminAddr = "foo@example.org";
services.httpd.documentRoot = "/tmp";
+
+ networking.firewall.enable = false; # FIXME: figure out what ports we actually need
};
router =
@@ -40,8 +42,9 @@ in
{ environment.systemPackages = [ pkgs.miniupnpd ];
virtualisation.vlans = [ 1 2 ];
networking.nat.enable = true;
- networking.nat.internalIPs = [ "192.168.2.0/24" ];
+ networking.nat.internalInterfaces = [ "eth2" ];
networking.nat.externalInterface = "eth1";
+ networking.firewall.enable = false;
};
client1 =
@@ -50,11 +53,13 @@ in
virtualisation.vlans = [ 2 ];
networking.defaultGateway =
nodes.router.config.networking.interfaces.eth2.ipAddress;
+ networking.firewall.enable = false;
};
client2 =
{ config, pkgs, ... }:
{ environment.systemPackages = [ pkgs.transmission ];
+ networking.firewall.enable = false;
};
};
@@ -66,8 +71,8 @@ in
# 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",
+ "iptables -w -t nat -N MINIUPNPD",
+ "iptables -w -t nat -A PREROUTING -i eth1 -j MINIUPNPD",
"echo 1 > /proc/sys/net/ipv4/ip_forward",
"miniupnpd -f ${miniupnpdConf nodes}"
);
@@ -75,7 +80,7 @@ in
# 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("transmission-create /tmp/data/test.tar.bz2 -t http://${nodes.tracker.config.networking.interfaces.eth1.ipAddress}:6969/announce -o /tmp/test.torrent");
$tracker->succeed("chmod 644 /tmp/test.torrent");
# Start the tracker. !!! use a less crappy tracker
@@ -104,4 +109,4 @@ in
$client2->succeed("cmp /tmp/test.tar.bz2 ${file}");
'';
-}
+})
diff --git a/nixos/tests/containers.nix b/nixos/tests/containers.nix
new file mode 100644
index 00000000000..9580f18189a
--- /dev/null
+++ b/nixos/tests/containers.nix
@@ -0,0 +1,79 @@
+# Test for NixOS' container support.
+
+import ./make-test.nix {
+
+ machine =
+ { config, pkgs, ... }:
+ { imports = [ ../modules/installer/cd-dvd/channel.nix ];
+ virtualisation.writableStore = true;
+ virtualisation.memorySize = 768;
+
+ containers.webserver =
+ { privateNetwork = true;
+ hostAddress = "10.231.136.1";
+ localAddress = "10.231.136.2";
+ config =
+ { services.httpd.enable = true;
+ services.httpd.adminAddr = "foo@example.org";
+ networking.firewall.allowedTCPPorts = [ 80 ];
+ networking.firewall.allowPing = true;
+ };
+ };
+
+ virtualisation.pathsInNixDB = [ pkgs.stdenv ];
+ };
+
+ testScript =
+ ''
+ $machine->succeed("nixos-container list") =~ /webserver/;
+
+ # Start the webserver container.
+ $machine->succeed("nixos-container start webserver");
+
+ # Since "start" returns after the container has reached
+ # multi-user.target, we should now be able to access it.
+ my $ip = $machine->succeed("nixos-container show-ip webserver");
+ chomp $ip;
+ $machine->succeed("ping -c1 $ip");
+ $machine->succeed("curl --fail http://$ip/ > /dev/null");
+
+ # Stop the container.
+ $machine->succeed("nixos-container stop webserver");
+ $machine->fail("curl --fail --connect-timeout 2 http://$ip/ > /dev/null");
+
+ # Make sure we have a NixOS tree (required by ‘nixos-container create’).
+ $machine->succeed("nix-env -qa -A nixos.pkgs.hello >&2");
+
+ # Create some containers imperatively.
+ my $id1 = $machine->succeed("nixos-container create foo --ensure-unique-name");
+ chomp $id1;
+ $machine->log("created container $id1");
+
+ my $id2 = $machine->succeed("nixos-container create foo --ensure-unique-name");
+ chomp $id2;
+ $machine->log("created container $id2");
+
+ die if $id1 eq $id2;
+
+ my $ip1 = $machine->succeed("nixos-container show-ip $id1");
+ chomp $ip1;
+ my $ip2 = $machine->succeed("nixos-container show-ip $id2");
+ chomp $ip2;
+ die if $ip1 eq $ip2;
+
+ # Start one of them.
+ $machine->succeed("nixos-container start $id1");
+
+ # Execute commands via the root shell.
+ $machine->succeed("nixos-container run $id1 -- uname") =~ /Linux/;
+ $machine->succeed("nixos-container set-root-password $id1 foobar");
+
+ # Destroy the containers.
+ $machine->succeed("nixos-container destroy $id1");
+ $machine->succeed("nixos-container destroy $id2");
+
+ # Destroying a declarative container should fail.
+ $machine->fail("nixos-container destroy webserver");
+ '';
+
+}
diff --git a/nixos/tests/default.nix b/nixos/tests/default.nix
deleted file mode 100644
index 4aeb7f55ac3..00000000000
--- a/nixos/tests/default.nix
+++ /dev/null
@@ -1,43 +0,0 @@
-{ 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);
- gnome3 = makeTest (import ./gnome3.nix);
- ipv6 = makeTest (import ./ipv6.nix);
- jenkins = makeTest (import ./jenkins.nix);
- kde4 = makeTest (import ./kde4.nix);
- #kexec = makeTest (import ./kexec.nix);
- login = makeTest (import ./login.nix {});
- logstash = makeTest (import ./logstash.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);
- munin = makeTest (import ./munin.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);
- rabbitmq = makeTest (import ./rabbitmq.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/firefox.nix b/nixos/tests/firefox.nix
index d6599be13c9..b42d473b802 100644
--- a/nixos/tests/firefox.nix
+++ b/nixos/tests/firefox.nix
@@ -1,6 +1,4 @@
-{ pkgs, ... }:
-
-{
+import ./make-test.nix ({ pkgs, ... }: {
machine =
{ config, pkgs, ... }:
@@ -18,4 +16,4 @@
$machine->screenshot("screen");
'';
-}
+})
diff --git a/nixos/tests/firewall.nix b/nixos/tests/firewall.nix
index de32b98e5d2..d10e10b1d91 100644
--- a/nixos/tests/firewall.nix
+++ b/nixos/tests/firewall.nix
@@ -1,8 +1,6 @@
# Test the firewall module.
-{ pkgs, ... }:
-
-{
+import ./make-test.nix {
nodes =
{ walled =
@@ -17,6 +15,7 @@
{ config, pkgs, ... }:
{ services.httpd.enable = true;
services.httpd.adminAddr = "foo@example.org";
+ networking.firewall.enable = false;
};
};
@@ -33,7 +32,7 @@
$walled->succeed("curl -v http://localhost/ >&2");
# Connections to the firewalled machine should fail.
- $attacker->fail("curl -v http://walled/ >&2");
+ $attacker->fail("curl --fail --connect-timeout 2 http://walled/ >&2");
$attacker->fail("ping -c 1 walled >&2");
# Outgoing connections/pings should still work.
diff --git a/nixos/tests/gnome3.nix b/nixos/tests/gnome3.nix
index 98a76137842..f1a6ce63331 100644
--- a/nixos/tests/gnome3.nix
+++ b/nixos/tests/gnome3.nix
@@ -1,6 +1,4 @@
-{ pkgs, ... }:
-
-{
+import ./make-test.nix {
machine =
{ config, pkgs, ... }:
diff --git a/nixos/tests/installer.nix b/nixos/tests/installer.nix
index 151458fbd5e..43bea22d852 100644
--- a/nixos/tests/installer.nix
+++ b/nixos/tests/installer.nix
@@ -1,7 +1,8 @@
-{ pkgs, system, ... }:
+{ system ? builtins.currentSystem }:
-with pkgs.lib;
+with import ../lib/testing.nix { inherit system; };
with import ../lib/qemu-flags.nix;
+with pkgs.lib;
let
@@ -79,6 +80,8 @@ let
virtualisation.writableStore = true;
virtualisation.pathsInNixDB = channelContents ++ [ pkgs.hello.src ];
virtualisation.memorySize = 768;
+
+ networking.firewall.allowedTCPPorts = [ 80 ];
};
channelContents = [ pkgs.rlwrap ];
@@ -97,7 +100,7 @@ let
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"}'});
+ qemuFlags => '${optionalString testChannel (toString (qemuNICFlags 1 1 2))} ${optionalString (iso.system == "x86_64-linux") "-cpu kvm64"}'});
$machine->start;
${optionalString testChannel ''
@@ -188,8 +191,10 @@ let
'';
- makeTest = { createPartitions, fileSystems, testChannel ? false, grubVersion ? 2, grubDevice ? "/dev/vda" }:
- { inherit iso;
+ makeInstallerTest =
+ { createPartitions, fileSystems, testChannel ? false, grubVersion ? 2, grubDevice ? "/dev/vda" }:
+ makeTest {
+ inherit iso;
nodes = if testChannel then { inherit webserver; } else { };
testScript = testScriptFun {
inherit createPartitions fileSystems testChannel grubVersion grubDevice;
@@ -204,7 +209,7 @@ in {
# The (almost) simplest partitioning scheme: a swap partition and
# one big filesystem partition.
- simple = makeTest
+ simple = makeInstallerTest
{ createPartitions =
''
$machine->succeed(
@@ -223,7 +228,7 @@ in {
};
# Same as the previous, but now with a separate /boot partition.
- separateBoot = makeTest
+ separateBoot = makeInstallerTest
{ createPartitions =
''
$machine->succeed(
@@ -246,7 +251,7 @@ in {
# Create two physical LVM partitions combined into one volume group
# that contains the logical swap and root partitions.
- lvm = makeTest
+ lvm = makeInstallerTest
{ createPartitions =
''
$machine->succeed(
@@ -269,8 +274,7 @@ in {
fileSystems = rootFS;
};
- /*
- swraid = makeTest
+ swraid = makeInstallerTest
{ createPartitions =
''
$machine->succeed(
@@ -302,10 +306,9 @@ in {
'';
fileSystems = rootFS + bootFS;
};
- */
# Test a basic install using GRUB 1.
- grub1 = makeTest
+ grub1 = makeInstallerTest
{ createPartitions =
''
$machine->succeed(
@@ -326,7 +329,7 @@ in {
};
# Rebuild the CD configuration with a little modification.
- rebuildCD =
+ rebuildCD = makeTest
{ inherit iso;
nodes = { };
testScript =
diff --git a/nixos/tests/ipv6.nix b/nixos/tests/ipv6.nix
index 29d675e180a..eb15363d3c3 100644
--- a/nixos/tests/ipv6.nix
+++ b/nixos/tests/ipv6.nix
@@ -1,9 +1,7 @@
# Test of IPv6 functionality in NixOS, including whether router
# solicication/advertisement using radvd works.
-{ pkgs, ... }:
-
-{
+import ./make-test.nix {
nodes =
{ client = { config, pkgs, ... }: { };
@@ -12,6 +10,7 @@
{ config, pkgs, ... }:
{ services.httpd.enable = true;
services.httpd.adminAddr = "foo@example.org";
+ networking.firewall.allowedTCPPorts = [ 80 ];
};
router =
diff --git a/nixos/tests/jenkins.nix b/nixos/tests/jenkins.nix
index e6524ec5653..9d3f76ca3e1 100644
--- a/nixos/tests/jenkins.nix
+++ b/nixos/tests/jenkins.nix
@@ -2,22 +2,28 @@
# 1. jenkins service starts on master node
# 2. jenkins user can be extended on both master and slave
# 3. jenkins service not started on slave node
-{ pkgs, ... }:
-{
+
+import ./make-test.nix {
+
nodes = {
- master = { pkgs, config, ... }: {
- services.jenkins.enable = true;
+
+ master =
+ { config, pkgs, ... }:
+ { services.jenkins.enable = true;
# should have no effect
services.jenkinsSlave.enable = true;
users.extraUsers.jenkins.extraGroups = [ "users" ];
};
- slave = { pkgs, config, ... }: {
- services.jenkinsSlave.enable = true;
+
+ slave =
+ { config, pkgs, ... }:
+ { services.jenkinsSlave.enable = true;
users.extraUsers.jenkins.extraGroups = [ "users" ];
};
+
};
testScript = ''
diff --git a/nixos/tests/kde4.nix b/nixos/tests/kde4.nix
index 3fb35bbab09..725759ab758 100644
--- a/nixos/tests/kde4.nix
+++ b/nixos/tests/kde4.nix
@@ -1,6 +1,4 @@
-{ pkgs, ... }:
-
-{
+import ./make-test.nix ({ pkgs, ... }: {
machine =
{ config, pkgs, ... }:
@@ -64,4 +62,4 @@
$machine->screenshot("screen");
'';
-}
+})
diff --git a/nixos/tests/kexec.nix b/nixos/tests/kexec.nix
index b8da332b919..b09287682c0 100644
--- a/nixos/tests/kexec.nix
+++ b/nixos/tests/kexec.nix
@@ -1,8 +1,6 @@
# Test whether fast reboots via kexec work.
-{ pkgs, ... }:
-
-{
+import ./make-test.nix {
machine = { config, pkgs, ... }:
{ virtualisation.vlans = [ ]; };
diff --git a/nixos/tests/login.nix b/nixos/tests/login.nix
index ed7d9786717..0a7d25c37ac 100644
--- a/nixos/tests/login.nix
+++ b/nixos/tests/login.nix
@@ -1,8 +1,11 @@
-config: { pkgs, ... }:
+import ./make-test.nix ({ pkgs, latestKernel ? false, ... }:
{
- machine = config;
+ machine =
+ { config, pkgs, lib, ... }:
+ { boot.kernelPackages = lib.mkIf latestKernel pkgs.linuxPackages_latest;
+ };
testScript =
''
@@ -58,4 +61,4 @@ config: { pkgs, ... }:
};
'';
-}
+})
diff --git a/nixos/tests/logstash.nix b/nixos/tests/logstash.nix
index ee309d39f87..e6aba7a1012 100644
--- a/nixos/tests/logstash.nix
+++ b/nixos/tests/logstash.nix
@@ -1,9 +1,8 @@
-{ pkgs, ... }:
+# This test runs logstash and checks if messages flows and
+# elasticsearch is started.
-# This test runs logstash and checks if messages flows and elasticsearch is
-# started
+import ./make-test.nix {
-{
nodes = {
one =
{ config, pkgs, ... }:
@@ -28,10 +27,10 @@
};
};
};
-
+
testScript = ''
startAll;
-
+
$one->waitForUnit("logstash.service");
$one->waitUntilSucceeds("journalctl -n 20 _SYSTEMD_UNIT=logstash.service | grep flowers");
$one->fail("journalctl -n 20 _SYSTEMD_UNIT=logstash.service | grep dragons");
diff --git a/nixos/tests/make-test.nix b/nixos/tests/make-test.nix
new file mode 100644
index 00000000000..285ca5b71d6
--- /dev/null
+++ b/nixos/tests/make-test.nix
@@ -0,0 +1,5 @@
+f: { system ? builtins.currentSystem, ... } @ args:
+
+with import ../lib/testing.nix { inherit system; };
+
+makeTest (if builtins.isFunction f then f (args // { inherit pkgs; }) else f)
diff --git a/nixos/tests/misc.nix b/nixos/tests/misc.nix
index d355d705a24..0f57b9f6126 100644
--- a/nixos/tests/misc.nix
+++ b/nixos/tests/misc.nix
@@ -1,8 +1,6 @@
# Miscellaneous small tests that don't warrant their own VM run.
-{ pkgs, ... }:
-
-{
+import ./make-test.nix {
machine =
{ config, pkgs, ... }:
diff --git a/nixos/tests/mpich.nix b/nixos/tests/mpich.nix
index d57512ebdfe..13cd0960d07 100644
--- a/nixos/tests/mpich.nix
+++ b/nixos/tests/mpich.nix
@@ -1,10 +1,6 @@
# Simple example to showcase distributed tests using NixOS VMs.
-{ pkgs, ... }:
-
-with pkgs;
-
-{
+import ./make-test.nix {
nodes = {
master =
{ config, pkgs, ... }: {
diff --git a/nixos/tests/mumble.nix b/nixos/tests/mumble.nix
new file mode 100644
index 00000000000..8896830b0c2
--- /dev/null
+++ b/nixos/tests/mumble.nix
@@ -0,0 +1,55 @@
+import ./make-test.nix (
+
+let
+ client = { config, pkgs, ... }: {
+ imports = [ ./common/x11.nix ];
+ environment.systemPackages = [ pkgs.mumble ];
+ };
+in
+{
+ nodes = {
+ server = { config, pkgs, ... }: {
+ services.murmur.enable = true;
+ services.murmur.registerName = "NixOS tests";
+ networking.firewall.allowedTCPPorts = [ config.services.murmur.port ];
+ };
+
+ client1 = client;
+ client2 = client;
+ };
+
+ testScript = ''
+ startAll;
+
+ $server->waitForUnit("murmur.service");
+ $client1->waitForX;
+ $client2->waitForX;
+
+ $client1->execute("mumble mumble://client1\@server/test &");
+ $client2->execute("mumble mumble://client2\@server/test &");
+
+ $server->sleep(10); # Wait for Mumble UI to pop up
+
+ # cancel client audio configuration
+ $client1->sendKeys("esc");
+ $client2->sendKeys("esc");
+ $server->sleep(1);
+
+ # cancel client cert configuration
+ $client1->sendKeys("esc");
+ $client2->sendKeys("esc");
+ $server->sleep(1);
+
+ # accept server certificate
+ $client1->sendChars("y");
+ $client2->sendChars("y");
+
+ # Find clients in logs
+ $server->waitUntilSucceeds("grep -q 'client1' /var/log/murmur/murmurd.log");
+ $server->waitUntilSucceeds("grep -q 'client2' /var/log/murmur/murmurd.log");
+
+ $server->sleep(5); # wait to get screenshot
+ $client1->screenshot("screen1");
+ $client2->screenshot("screen2");
+ '';
+})
diff --git a/nixos/tests/munin.nix b/nixos/tests/munin.nix
index 66ae1c0d87f..acc4b949ab5 100644
--- a/nixos/tests/munin.nix
+++ b/nixos/tests/munin.nix
@@ -1,13 +1,12 @@
-{ pkgs, ... }:
-
# This test runs basic munin setup with node and cron job running on the same
# machine.
-{
- nodes = {
+import ./make-test.nix {
+
+ nodes = {
one =
{ config, pkgs, ... }:
- {
+ {
services = {
munin-node.enable = true;
munin-cron = {
@@ -20,10 +19,10 @@
};
};
};
-
+
testScript = ''
startAll;
-
+
$one->waitForUnit("munin-node.service");
$one->waitForFile("/var/lib/munin/one/one-uptime-uptime-g.rrd");
$one->waitForFile("/var/www/munin/one/index.html");
diff --git a/nixos/tests/mysql-replication.nix b/nixos/tests/mysql-replication.nix
index f8c82f7ce9c..7d0cf6d85a1 100644
--- a/nixos/tests/mysql-replication.nix
+++ b/nixos/tests/mysql-replication.nix
@@ -1,9 +1,10 @@
-{ pkgs, ... }:
+import ./make-test.nix (
let
replicateUser = "replicate";
replicatePassword = "secret";
in
+
{
nodes = {
master =
@@ -15,10 +16,11 @@ in
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}'@'%';
- '';
+ ''
+ create user '${replicateUser}'@'%' identified by '${replicatePassword}';
+ grant replication slave on *.* to '${replicateUser}'@'%';
+ '';
+ networking.firewall.allowedTCPPorts = [ 3306 ];
};
slave1 =
@@ -57,4 +59,4 @@ in
$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
index bceeb8beabc..566d03baf36 100644
--- a/nixos/tests/mysql.nix
+++ b/nixos/tests/mysql.nix
@@ -1,6 +1,5 @@
-{ pkgs, ... }:
+import ./make-test.nix {
-{
nodes = {
master =
{ pkgs, config, ... }:
diff --git a/nixos/tests/nat.nix b/nixos/tests/nat.nix
index a13714d60a9..02981469e10 100644
--- a/nixos/tests/nat.nix
+++ b/nixos/tests/nat.nix
@@ -4,14 +4,13 @@
# router connected to both that performs Network Address Translation
# for the client.
-{ pkgs, ... }:
-
-{
+import ./make-test.nix {
nodes =
{ client =
{ config, pkgs, nodes, ... }:
{ virtualisation.vlans = [ 1 ];
+ networking.firewall.allowPing = true;
networking.defaultGateway =
nodes.router.config.networking.interfaces.eth2.ipAddress;
};
@@ -19,6 +18,7 @@
router =
{ config, pkgs, ... }:
{ virtualisation.vlans = [ 2 1 ];
+ networking.firewall.allowPing = true;
networking.nat.enable = true;
networking.nat.internalIPs = [ "192.168.1.0/24" ];
networking.nat.externalInterface = "eth1";
@@ -27,6 +27,7 @@
server =
{ config, pkgs, ... }:
{ virtualisation.vlans = [ 2 ];
+ networking.firewall.enable = false;
services.httpd.enable = true;
services.httpd.adminAddr = "foo@example.org";
services.vsftpd.enable = true;
diff --git a/nixos/tests/nfs.nix b/nixos/tests/nfs.nix
index 51abf57e1b7..864d05626b6 100644
--- a/nixos/tests/nfs.nix
+++ b/nixos/tests/nfs.nix
@@ -1,6 +1,4 @@
-{ version }:
-
-{ pkgs, ... }:
+import ./make-test.nix ({ version, ... }:
let
@@ -13,6 +11,7 @@ let
options = "vers=${toString version}";
}
];
+ networking.firewall.enable = false; # FIXME: only open statd
};
in
@@ -31,6 +30,7 @@ in
/data 192.168.1.0/255.255.255.0(rw,no_root_squash,no_subtree_check,fsid=0)
'';
services.nfs.server.createMountPoints = true;
+ networking.firewall.enable = false; # FIXME: figure out what ports need to be allowed
};
};
@@ -82,4 +82,4 @@ in
die "shutdown took too long ($duration seconds)" if $duration > 30;
'';
-}
+})
diff --git a/nixos/tests/openssh.nix b/nixos/tests/openssh.nix
index 49d92fbde90..0b9714c275d 100644
--- a/nixos/tests/openssh.nix
+++ b/nixos/tests/openssh.nix
@@ -1,6 +1,5 @@
-{ pkgs, ... }:
+import ./make-test.nix ({ pkgs, ... }: {
-{
nodes = {
server =
@@ -35,4 +34,4 @@
$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
index 7126e7255ef..309afa4ce9d 100644
--- a/nixos/tests/partition.nix
+++ b/nixos/tests/partition.nix
@@ -1,4 +1,4 @@
-{ pkgs, system, ... }:
+import ./make-test.nix ({ pkgs, ... }:
with pkgs.lib;
@@ -224,4 +224,4 @@ in {
ensureMountPoint("/mnt/boot");
};
'';
-}
+})
diff --git a/nixos/tests/printing.nix b/nixos/tests/printing.nix
index 13cc3115d50..9ef28dcfcd4 100644
--- a/nixos/tests/printing.nix
+++ b/nixos/tests/printing.nix
@@ -1,8 +1,6 @@
# Test printing via CUPS.
-{ pkgs, ... }:
-
-{
+import ./make-test.nix ({pkgs, ... }: {
nodes = {
@@ -17,6 +15,7 @@
Allow from all
'';
+ networking.firewall.allowedTCPPorts = [ 631 ];
};
client =
@@ -37,7 +36,7 @@
$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/");
+ $server->fail("curl --fail --connect-timeout 2 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");
@@ -87,4 +86,4 @@
}
'';
-}
+})
diff --git a/nixos/tests/proxy.nix b/nixos/tests/proxy.nix
index 3b79c16ea2c..88dbdb2720f 100644
--- a/nixos/tests/proxy.nix
+++ b/nixos/tests/proxy.nix
@@ -1,16 +1,14 @@
-{ pkgs, ... }:
+import ./make-test.nix (
let
backend =
{ config, pkgs, ... }:
- {
- services.openssh.enable = true;
-
- services.httpd.enable = true;
+ { services.httpd.enable = true;
services.httpd.adminAddr = "foo@example.org";
services.httpd.documentRoot = "${pkgs.valgrind}/share/doc/valgrind/html";
+ networking.firewall.allowedTCPPorts = [ 80 ];
};
in
@@ -21,8 +19,7 @@ in
{ proxy =
{ config, pkgs, nodes, ... }:
- {
- services.httpd.enable = true;
+ { services.httpd.enable = true;
services.httpd.adminAddr = "bar@example.org";
services.httpd.extraModules = ["proxy_balancer"];
@@ -50,6 +47,8 @@ in
# For testing; don't want to wait forever for dead backend servers.
ProxyTimeout 5
'';
+
+ networking.firewall.allowedTCPPorts = [ 80 ];
};
backend1 = backend;
@@ -91,4 +90,4 @@ in
$client->succeed("curl --fail http://proxy/");
'';
-}
+})
diff --git a/nixos/tests/quake3.nix b/nixos/tests/quake3.nix
index fefbd75b4a3..3ff12fd57c0 100644
--- a/nixos/tests/quake3.nix
+++ b/nixos/tests/quake3.nix
@@ -1,4 +1,4 @@
-{ pkgs, ... }:
+import ./make-test.nix (
let
@@ -37,6 +37,7 @@ rec {
"'+map q3dm7' '+addbot grunt' '+addbot daemia' 2> /tmp/log";
};
nixpkgs.config.packageOverrides = overrides;
+ networking.firewall.allowedUDPPorts = [ 27960 ];
};
client1 = client;
@@ -78,4 +79,4 @@ rec {
$server->stopJob("quake3-server");
'';
-}
+})
diff --git a/nixos/tests/rabbitmq.nix b/nixos/tests/rabbitmq.nix
index 271661f0682..ffcdde9d87f 100644
--- a/nixos/tests/rabbitmq.nix
+++ b/nixos/tests/rabbitmq.nix
@@ -1,8 +1,7 @@
-{ pkgs, ... }:
+# This test runs rabbitmq and checks if rabbitmq is up and running.
-# This test runs rabbitmq and checks if rabbitmq is up and running
+import ./make-test.nix ({ pkgs, ... }: {
-{
nodes = {
one = { config, pkgs, ... }: {
services.rabbitmq.enable = true;
@@ -11,8 +10,8 @@
testScript = ''
startAll;
-
+
$one->waitForUnit("rabbitmq.service");
$one->waitUntilSucceeds("su -s ${pkgs.stdenv.shell} rabbitmq -c \"rabbitmqctl status\"");
'';
-}
+})
diff --git a/nixos/tests/run-in-machine.nix b/nixos/tests/run-in-machine.nix
index 8efe26c1708..7f6e6a6dc57 100644
--- a/nixos/tests/run-in-machine.nix
+++ b/nixos/tests/run-in-machine.nix
@@ -2,7 +2,9 @@
with import ../lib/testing.nix { inherit system; };
-runInMachine {
- drv = pkgs.patchelf;
- machine = { config, pkgs, ... }: { services.sshd.enable = true; };
+{
+ test = runInMachine {
+ drv = pkgs.hello;
+ machine = { config, pkgs, ... }: { /* services.sshd.enable = true; */ };
+ };
}
diff --git a/nixos/tests/simple.nix b/nixos/tests/simple.nix
index eee13a10133..e21b919cdf8 100644
--- a/nixos/tests/simple.nix
+++ b/nixos/tests/simple.nix
@@ -1,11 +1,11 @@
-{ pkgs, ... }:
+import ./make-test.nix {
-{
machine = { config, pkgs, ... }: { };
testScript =
''
startAll;
+ $machine->waitForUnit("multi-user.target");
$machine->shutdown;
'';
}
diff --git a/nixos/tests/subversion.nix b/nixos/tests/subversion.nix
index 49450c78f3b..e6746dc0828 100644
--- a/nixos/tests/subversion.nix
+++ b/nixos/tests/subversion.nix
@@ -1,4 +1,4 @@
-{ pkgs, ... }:
+import ./make-test.nix (
let
@@ -114,4 +114,4 @@ in
$webserver->stopJob("httpd");
'';
-}
+})
diff --git a/nixos/tests/tomcat.nix b/nixos/tests/tomcat.nix
index 6bc88ec82fa..3b0b1bb7911 100644
--- a/nixos/tests/tomcat.nix
+++ b/nixos/tests/tomcat.nix
@@ -1,17 +1,15 @@
-{ pkgs, ... }:
+import ./make-test.nix {
-{
nodes = {
server =
{ pkgs, config, ... }:
- {
- services.tomcat.enable = true;
+ { services.tomcat.enable = true;
services.httpd.enable = true;
services.httpd.adminAddr = "foo@bar.com";
- services.httpd.extraSubservices = [
- { serviceType = "tomcat-connector"; }
- ];
+ services.httpd.extraSubservices =
+ [ { serviceType = "tomcat-connector"; } ];
+ networking.firewall.allowedTCPPorts = [ 80 ];
};
client = { };
@@ -26,4 +24,5 @@
$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
index e0d256f5701..3f17dafaca1 100644
--- a/nixos/tests/trac.nix
+++ b/nixos/tests/trac.nix
@@ -1,6 +1,5 @@
-{ pkgs, ... }:
+import ./make-test.nix ({ pkgs, ... }: {
-{
nodes = {
storage =
{ config, pkgs, ... }:
@@ -68,4 +67,4 @@
$client->screenshot("screen");
'';
-}
+})
diff --git a/nixos/tests/udisks.nix b/nixos/tests/udisks.nix
new file mode 100644
index 00000000000..2354c310661
--- /dev/null
+++ b/nixos/tests/udisks.nix
@@ -0,0 +1,56 @@
+import ./make-test.nix ({ pkgs, ... }:
+
+let
+
+ stick = pkgs.fetchurl {
+ url = http://nixos.org/~eelco/nix/udisks-test.img.xz;
+ sha256 = "0was1xgjkjad91nipzclaz5biv3m4b2nk029ga6nk7iklwi19l8b";
+ };
+
+in
+
+{
+
+ machine =
+ { config, pkgs, ... }:
+ { services.udisks.enable = true;
+ imports = [ ./common/user-account.nix ];
+
+ security.polkit.extraConfig =
+ ''
+ polkit.addRule(function(action, subject) {
+ if (subject.user == "alice") return "yes";
+ });
+ '';
+ };
+
+ testScript =
+ ''
+ my $stick = $machine->stateDir . "/usbstick.img";
+ system("xz -d < ${stick} > $stick") == 0 or die;
+
+ $machine->succeed("udisks --enumerate | grep /org/freedesktop/UDisks/devices/vda");
+ $machine->fail("udisks --enumerate | grep /org/freedesktop/UDisks/devices/sda1");
+
+ # Attach a USB stick and wait for it to show up.
+ $machine->sendMonitorCommand("usb_add disk:$stick");
+ $machine->waitUntilSucceeds("udisks --enumerate | grep /org/freedesktop/UDisks/devices/sda1");
+ $machine->succeed("udisks --show-info /dev/sda1 | grep 'label:.*USBSTICK'");
+
+ # Mount the stick as a non-root user and do some stuff with it.
+ $machine->succeed("su - alice -c 'udisks --enumerate | grep /org/freedesktop/UDisks/devices/sda1'");
+ $machine->succeed("su - alice -c 'udisks --mount /dev/sda1'");
+ $machine->succeed("su - alice -c 'cat /media/USBSTICK/test.txt'") =~ /Hello World/;
+ $machine->succeed("su - alice -c 'echo foo > /media/USBSTICK/bar.txt'");
+
+ # Unmounting the stick should make the mountpoint disappear.
+ $machine->succeed("su - alice -c 'udisks --unmount /dev/sda1'");
+ $machine->fail("[ -d /media/USBSTICK ]");
+
+ # Remove the USB stick.
+ $machine->sendMonitorCommand("usb_del 0.3"); # FIXME
+ $machine->waitUntilFails("udisks --enumerate | grep /org/freedesktop/UDisks/devices/sda1");
+ $machine->fail("[ -e /dev/sda ]");
+ '';
+
+})
diff --git a/nixos/tests/xfce.nix b/nixos/tests/xfce.nix
index 50ce54c918b..ded37943e51 100644
--- a/nixos/tests/xfce.nix
+++ b/nixos/tests/xfce.nix
@@ -1,6 +1,4 @@
-{ pkgs, ... }:
-
-{
+import ./make-test.nix {
machine =
{ config, pkgs, ... }:
diff --git a/pkgs/applications/audio/audacious/default.nix b/pkgs/applications/audio/audacious/default.nix
index d838d29e8be..409a831727b 100644
--- a/pkgs/applications/audio/audacious/default.nix
+++ b/pkgs/applications/audio/audacious/default.nix
@@ -49,7 +49,7 @@ stdenv.mkDerivation {
source $stdenv/setup
# gsettings schemas for file dialogues
for file in "$out/bin/"*; do
- wrapProgram "$file" --prefix XDG_DATA_DIRS : "$XDG_ADD"
+ wrapProgram "$file" --prefix XDG_DATA_DIRS : "$XDG_ADD:$GSETTINGS_SCHEMAS_PATH"
done
)
'';
diff --git a/pkgs/applications/audio/drumkv1/default.nix b/pkgs/applications/audio/drumkv1/default.nix
index 9a812fd261a..39f6ae0ded4 100644
--- a/pkgs/applications/audio/drumkv1/default.nix
+++ b/pkgs/applications/audio/drumkv1/default.nix
@@ -2,11 +2,11 @@
stdenv.mkDerivation rec {
name = "drumkv1-${version}";
- version = "0.4.0";
+ version = "0.4.1";
src = fetchurl {
url = "mirror://sourceforge/drumkv1/${name}.tar.gz";
- sha256 = "0bhj4liv6c0rw0gsh1zygj4a9vmwl3jdz2j6zzdxbqdk21xq4zpz";
+ sha256 = "0wxbn5qm3dn9spwbm618flgrwvls7bipg0nhgn0lv4za2g823g56";
};
buildInputs = [ jackaudio libsndfile lv2 qt4 ];
diff --git a/pkgs/applications/audio/pamixer/default.nix b/pkgs/applications/audio/pamixer/default.nix
new file mode 100644
index 00000000000..acdda1799d0
--- /dev/null
+++ b/pkgs/applications/audio/pamixer/default.nix
@@ -0,0 +1,38 @@
+{ stdenv, fetchgit, pulseaudio, boost }:
+
+let
+ tag = "1.1";
+in
+
+stdenv.mkDerivation rec {
+
+ name = "pamixer-${tag}";
+
+ src = fetchgit {
+ url = git://github.com/cdemoulins/pamixer;
+ rev = "refs/tags/${tag}";
+ sha256 = "03r0sbfj85wp6yxa87pjg69ivmk0mxxa2nykr8gf2c607igmb034";
+ };
+
+ buildInputs = [ pulseaudio boost ];
+
+ installPhase = ''
+ mkdir -p $out/bin
+ cp pamixer $out/bin
+ '';
+
+ meta = with stdenv.lib; {
+ description = "pamixer is like amixer but for pulseaudio.";
+ longDescription = "Features:
+ - Get the current volume of the default sink, the default source or a selected one by his id
+ - Set the volume for the default sink, the default source or any other device
+ - List the sinks
+ - List the sources
+ - Increase / Decrease the volume for a device
+ - Mute or unmute a device";
+ homepage = https://github.com/cdemoulins/pamixer;
+ license = licenses.gpl3;
+ platforms = platforms.linux;
+ maintainers = [ maintainers._1126 ];
+ };
+}
diff --git a/pkgs/applications/audio/qmmp/default.nix b/pkgs/applications/audio/qmmp/default.nix
index 122b7ed7867..a18ef97dd60 100644
--- a/pkgs/applications/audio/qmmp/default.nix
+++ b/pkgs/applications/audio/qmmp/default.nix
@@ -28,11 +28,11 @@
# handle that.
stdenv.mkDerivation rec {
- name = "qmmp-0.7.5";
+ name = "qmmp-0.7.6";
src = fetchurl {
url = "http://qmmp.ylsoftware.com/files/${name}.tar.bz2";
- sha256 = "0ryg4hns5zi9swn2q4vxjya3i4drdqfzycngwzd6fdl176lswrk0";
+ sha256 = "1hq08ii06lyfg516jrvxdfcjj509gvglvdlsr96aqi1fh8v4k5p9";
};
buildInputs =
diff --git a/pkgs/applications/audio/samplv1/default.nix b/pkgs/applications/audio/samplv1/default.nix
index 2748dfd5db4..f1d3be317d1 100644
--- a/pkgs/applications/audio/samplv1/default.nix
+++ b/pkgs/applications/audio/samplv1/default.nix
@@ -2,11 +2,11 @@
stdenv.mkDerivation rec {
name = "samplv1-${version}";
- version = "0.4.0";
+ version = "0.4.1";
src = fetchurl {
url = "mirror://sourceforge/samplv1/${name}.tar.gz";
- sha256 = "04vldwpm4059czwd4i5yv07daqjnzs2zsrld779likans9ib3ri8";
+ sha256 = "1cx3qs9vrdwmym2qsghqq53bshnjqgpqypsilr1m2i1cpfnfrr6x";
};
buildInputs = [ jackaudio libsndfile lv2 qt4 ];
diff --git a/pkgs/applications/audio/synthv1/default.nix b/pkgs/applications/audio/synthv1/default.nix
index 229d4fdac14..4037b88ecb7 100644
--- a/pkgs/applications/audio/synthv1/default.nix
+++ b/pkgs/applications/audio/synthv1/default.nix
@@ -2,11 +2,11 @@
stdenv.mkDerivation rec {
name = "synthv1-${version}";
- version = "0.4.0";
+ version = "0.4.1";
src = fetchurl {
url = "mirror://sourceforge/synthv1/${name}.tar.gz";
- sha256 = "0zyxja1s74fr95qbwsyykggs3af2ndm2hz1l0avb645xgm93vcfv";
+ sha256 = "1j1x8n3rlwrh373wqmm6mj3cgyk3apvnpqygx1700fl4cf249agl";
};
buildInputs = [ qt4 jackaudio lv2 ];
diff --git a/pkgs/applications/editors/emacs-modes/cryptol/default.nix b/pkgs/applications/editors/emacs-modes/cryptol/default.nix
new file mode 100644
index 00000000000..3290041178e
--- /dev/null
+++ b/pkgs/applications/editors/emacs-modes/cryptol/default.nix
@@ -0,0 +1,27 @@
+{ stdenv, fetchgit, emacs }:
+
+stdenv.mkDerivation rec {
+ name = "cryptol-mode-${version}";
+ version = "20141010";
+
+ src = fetchgit {
+ url = "https://github.com/thoughtpolice/cryptol-mode.git";
+ rev = "50075d49d7c4ec4b03ce31b634424410262c1ad4";
+ sha256 = "6ecd4904b7f3b1cd0721591ce45f16fe11cd1dd5fd7af8110d1f84b133ed4aec";
+ };
+
+ buildInputs = [ emacs ];
+
+ installPhase = ''
+ install -d $out/share/emacs/site-lisp
+ install *.el *.elc $out/share/emacs/site-lisp
+ '';
+
+ meta = {
+ description = "Emacs major mode for Cryptol";
+ homepage = "https://thoughtpolice/cryptol-mode";
+ license = stdenv.lib.licenses.gpl3Plus;
+ platforms = stdenv.lib.platforms.all;
+ maintainers = [ stdenv.lib.maintainers.thoughtpolice ];
+ };
+}
diff --git a/pkgs/applications/editors/emacs-modes/flymake-cursor/default.nix b/pkgs/applications/editors/emacs-modes/flymake-cursor/default.nix
index 4b2692a5e22..eae338d241d 100644
--- a/pkgs/applications/editors/emacs-modes/flymake-cursor/default.nix
+++ b/pkgs/applications/editors/emacs-modes/flymake-cursor/default.nix
@@ -5,7 +5,7 @@ stdenv.mkDerivation rec {
src = fetchurl {
url = "http://www.emacswiki.org/emacs/download/flymake-cursor.el";
- sha256 = "1qqppd1786w8pl1avjb01n23lwihb7m0hr23abjklsxz03gmp4qz";
+ sha256 = "10cpzrd588ya52blghxss5zkn6x8hc7bx1h0qbcdlybbmkjgpkxr";
};
phases = [ "buildPhase" "installPhase"];
@@ -26,7 +26,5 @@ stdenv.mkDerivation rec {
description = "Displays flymake error msg in minibuffer after delay";
homepage = http://www.emacswiki.org/emacs/flymake-cursor.el;
license = stdenv.lib.licenses.publicDomain;
-
- platforms = stdenv.lib.platforms.all;
};
}
diff --git a/pkgs/applications/editors/emacs-modes/idris/default.nix b/pkgs/applications/editors/emacs-modes/idris/default.nix
index 289c8868876..8671a926f67 100644
--- a/pkgs/applications/editors/emacs-modes/idris/default.nix
+++ b/pkgs/applications/editors/emacs-modes/idris/default.nix
@@ -1,12 +1,12 @@
{ stdenv, fetchgit, emacs }:
stdenv.mkDerivation rec {
- name = "idris-mode-20140223";
+ name = "idris-mode-20140405";
src = fetchgit {
url = https://github.com/idris-hackers/idris-mode.git;
- rev = "486470533e74c55192e92a1afa050475915ee1e7";
- sha256 = "ff2e6bd8fbf421e8f2db0789d2ff56c5103775b911b99bab64e4652d332bad43";
+ rev = "2e2d18fb757da4b42940ebe2a57d7a117175489f";
+ sha256 = "d4b52c6c43c038c94a7464cd9c849cd40c01696c440da8b057c00a9be22f9ac0";
};
buildInputs = [ emacs ];
diff --git a/pkgs/applications/editors/yi/yi-contrib.nix b/pkgs/applications/editors/yi/yi-contrib.nix
index 6dd75301187..c7d3f094016 100644
--- a/pkgs/applications/editors/yi/yi-contrib.nix
+++ b/pkgs/applications/editors/yi/yi-contrib.nix
@@ -1,10 +1,12 @@
-{ cabal, dataAccessor, filepath, mtl, split, yi }:
+{ cabal, filepath, lens, mtl, split, time, transformersBase, yi }:
cabal.mkDerivation (self: {
pname = "yi-contrib";
- version = "0.7.2";
- sha256 = "074cq1y0pp66r2fqqszd8w2pws8jbfwq9g39w3rsgjnw83058fr8";
- buildDepends = [ dataAccessor filepath mtl split yi ];
+ version = "0.8.1";
+ sha256 = "0jsbga30x302mr708vj5y7cpc961vh85dshpq2zlrf44dh0kmpvf";
+ buildDepends = [
+ filepath lens mtl split time transformersBase yi
+ ];
meta = {
homepage = "http://haskell.org/haskellwiki/Yi";
description = "Add-ons to Yi, the Haskell-Scriptable Editor";
diff --git a/pkgs/applications/editors/yi/yi.nix b/pkgs/applications/editors/yi/yi.nix
index b358f5488dc..96e4a06965c 100644
--- a/pkgs/applications/editors/yi/yi.nix
+++ b/pkgs/applications/editors/yi/yi.nix
@@ -1,31 +1,30 @@
{ cabal, alex, binary, Cabal, cautiousFile, concreteTyperep
-, dataAccessor, dataAccessorMtl, dataAccessorTemplate, derive, Diff
-, dlist, dyre, filepath, fingertree, glib, gtk, hashable, hint
-, HUnit, mtl, pango, parsec, pointedlist, QuickCheck, random
-, regexBase, regexTdfa, split, testFramework, testFrameworkHunit
-, time, uniplate, unixCompat, unorderedContainers, utf8String, vty
+, dataDefault, derive, Diff, dlist, dyre, filepath, fingertree
+, glib, gtk, hashable, hint, HUnit, lens, mtl, pango, parsec
+, pointedlist, QuickCheck, random, regexBase, regexTdfa, safe
+, split, tasty, tastyHunit, tastyQuickcheck, time, transformersBase
+, uniplate, unixCompat, unorderedContainers, utf8String, vty
, xdgBasedir
}:
cabal.mkDerivation (self: {
pname = "yi";
- version = "0.7.2";
- sha256 = "0g0hvr4zqcrmdl6mbdmrfxd5m51fhkhslvl9piwq83g2wirxqbvm";
+ version = "0.8.1";
+ sha256 = "1hyqlydc0na9pkb3fkbp13c6vnp4f80z8237bvrv12wkk5syyn23";
isLibrary = true;
isExecutable = true;
buildDepends = [
- binary Cabal cautiousFile concreteTyperep dataAccessor
- dataAccessorMtl dataAccessorTemplate derive Diff dlist dyre
- filepath fingertree glib gtk hashable hint mtl pango parsec
- pointedlist QuickCheck random regexBase regexTdfa split time
- uniplate unixCompat unorderedContainers utf8String vty xdgBasedir
+ binary Cabal cautiousFile concreteTyperep dataDefault derive Diff
+ dlist dyre filepath fingertree glib gtk hashable hint lens mtl
+ pango parsec pointedlist QuickCheck random regexBase regexTdfa safe
+ split time transformersBase uniplate unixCompat unorderedContainers
+ utf8String vty xdgBasedir
];
testDepends = [
- filepath HUnit QuickCheck testFramework testFrameworkHunit
+ filepath HUnit QuickCheck tasty tastyHunit tastyQuickcheck
];
buildTools = [ alex ];
configureFlags = "-fpango";
- jailbreak = true;
doCheck = false;
meta = {
homepage = "http://haskell.org/haskellwiki/Yi";
diff --git a/pkgs/applications/graphics/ImageMagick/default.nix b/pkgs/applications/graphics/ImageMagick/default.nix
index 35659cbfe6f..64b1f5b3b2c 100644
--- a/pkgs/applications/graphics/ImageMagick/default.nix
+++ b/pkgs/applications/graphics/ImageMagick/default.nix
@@ -18,14 +18,14 @@
}:
let
- version = "6.8.8-7";
+ version = "6.8.9-0";
in
stdenv.mkDerivation rec {
name = "ImageMagick-${version}";
src = fetchurl {
url = "mirror://imagemagick/${name}.tar.xz";
- sha256 = "1x5jkbrlc10rx7vm344j7xrs74c80xk3n1akqx8w5c194fj56mza";
+ sha256 = "1lapn2798fkc2wn81slpms5p21kq4dsyg45khsk7n8p69cvrmw2b";
};
enableParallelBuilding = true;
diff --git a/pkgs/applications/graphics/shotwell/default.nix b/pkgs/applications/graphics/shotwell/default.nix
index 2a3ed77609f..1953f951d16 100644
--- a/pkgs/applications/graphics/shotwell/default.nix
+++ b/pkgs/applications/graphics/shotwell/default.nix
@@ -33,11 +33,17 @@ in stdenv.mkDerivation rec {
preConfigure = ''
patchShebangs .
'';
-
+
postInstall = ''
+ mkdir -p $out/share/gsettings-schemas/$name
+ mv $out/share/glib-2.0 $out/share/gsettings-schemas/$name/
+ '';
+
+ preFixup = ''
wrapProgram "$out/bin/shotwell" \
--set GDK_PIXBUF_MODULE_FILE "$GDK_PIXBUF_MODULE_FILE" \
- --prefix XDG_DATA_DIRS : "$XDG_ICON_DIRS:${gnome3.gsettings_desktop_schemas}/share:${gtk3}/share:$out/share"
+ --prefix XDG_DATA_DIRS : "$XDG_ICON_DIRS:${gtk3}/share:$out/share:$GSETTINGS_SCHEMAS_PATH"
+ rm $out/share/icons/hicolor/icon-theme.cache
'';
diff --git a/pkgs/applications/misc/bitcoin/default.nix b/pkgs/applications/misc/bitcoin/default.nix
index 1785526d14a..118b56c55b0 100644
--- a/pkgs/applications/misc/bitcoin/default.nix
+++ b/pkgs/applications/misc/bitcoin/default.nix
@@ -1,26 +1,39 @@
-{ fetchurl, stdenv, openssl, db, boost, zlib, miniupnpc, qt4 }:
+{ fetchurl, stdenv, openssl, db48, boost, zlib, miniupnpc, qt4, utillinux
+, pkgconfig, protobuf, qrencode }:
stdenv.mkDerivation rec {
- version = "0.8.6";
+ version = "0.9.1";
name = "bitcoin-${version}";
src = fetchurl {
- url = "mirror://sourceforge/bitcoin/${name}-linux.tar.gz";
- sha256 = "036xx06gyrfh65rpdapff3viz1f38vzkj7lnhil6fc0s7pjmsjbk";
+ url = "https://bitcoin.org/bin/${version}/${name}-linux.tar.gz";
+ sha256 = "3fabc1c629007b465a278525883663d41a2ba62699f2773536a8bf59ca210425";
};
- buildInputs = [ openssl db boost zlib miniupnpc qt4 ];
+ # hexdump from utillinux is required for tests
+ buildInputs = [
+ openssl db48 boost zlib miniupnpc qt4 utillinux pkgconfig protobuf qrencode
+ ];
- configurePhase = ''
- cd src
- qmake
+ unpackPhase = ''
+ mkdir tmp-extract && (cd tmp-extract && tar xf $src)
+ tar xf tmp-extract/bitcoin*/src/bitcoin*.tar*
+ cd bitcoin*
'';
- installPhase = ''
- mkdir -p $out/bin
- cp bitcoin-qt $out/bin
+ configureFlags = [
+ "--with-boost=${boost}"
+ ];
+
+ preCheck = ''
+ # At least one test requires writing in $HOME
+ HOME=$TMPDIR
'';
+ doCheck = true;
+
+ enableParallelBuilding = true;
+
meta = {
description = "Bitcoin is a peer-to-peer currency";
longDescription= ''
diff --git a/pkgs/applications/misc/calibre/default.nix b/pkgs/applications/misc/calibre/default.nix
index f3d7c26fe5c..c2d8e7979e4 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.25.0";
+ name = "calibre-1.31.0";
src = fetchurl {
url = "mirror://sourceforge/calibre/${name}.tar.xz";
- sha256 = "1y221r5vgq426ldqjrx3qvgf3j3v2wncwzra747psvhwf95zd5fd";
+ sha256 = "1fl42y8ppw8s51v66dqsrg1ib28yi6z5779r9wfvdbl9v1clilfc";
};
inherit python;
diff --git a/pkgs/applications/misc/gnuradio/default.nix b/pkgs/applications/misc/gnuradio/default.nix
index 7e67682f17f..1a0dea586d0 100644
--- a/pkgs/applications/misc/gnuradio/default.nix
+++ b/pkgs/applications/misc/gnuradio/default.nix
@@ -23,11 +23,11 @@
stdenv.mkDerivation rec {
name = "gnuradio-${version}";
- version = "3.7.2.1";
+ version = "3.7.3";
src = fetchurl {
url = "http://gnuradio.org/releases/gnuradio/${name}.tar.gz";
- sha256 = "101wr19nxfc5x7i4s10vgrypaa0vj2pkg8b2vn5j5s9iv8gpwswc";
+ sha256 = "0caj7dqppav53nhn0ima106hpsn0sakw57v1ihac9fk7ka0x2w8w";
};
buildInputs = [
diff --git a/pkgs/applications/misc/ikiwiki/default.nix b/pkgs/applications/misc/ikiwiki/default.nix
index c0dce81c803..b347f971ee0 100644
--- a/pkgs/applications/misc/ikiwiki/default.nix
+++ b/pkgs/applications/misc/ikiwiki/default.nix
@@ -23,7 +23,7 @@ assert mercurialSupport -> (mercurial != null);
let
name = "ikiwiki";
- version = "3.20140125";
+ version = "3.20140227";
lib = stdenv.lib;
in
@@ -32,7 +32,7 @@ stdenv.mkDerivation {
src = fetchurl {
url = "http://ftp.de.debian.org/debian/pool/main/i/ikiwiki/${name}_${version}.tar.gz";
- sha256 = "06r95xhm8pnvswgmkf3j7h4n6b1nmk0v0znmnzblkdx7xh12m0hd";
+ sha256 = "1bbpqs4c1la1yqcxcxj3xip3wadjnjq0wawv19j6d6baymm66cr3";
};
buildInputs = [ perl TextMarkdown URI HTMLParser HTMLScrubber HTMLTemplate
diff --git a/pkgs/applications/misc/keepassx/2.0.nix b/pkgs/applications/misc/keepassx/2.0.nix
index 6d54032bb38..1a79af7cb57 100644
--- a/pkgs/applications/misc/keepassx/2.0.nix
+++ b/pkgs/applications/misc/keepassx/2.0.nix
@@ -1,7 +1,7 @@
{ stdenv, fetchurl, cmake, libgcrypt, qt4, xlibs, ... }:
stdenv.mkDerivation {
- name = "keepassx-2.0alpha5";
+ name = "keepassx2-2.0alpha5";
src = fetchurl {
url = "https://github.com/keepassx/keepassx/archive/2.0-alpha5.tar.gz";
sha256 = "1vxj306zhrr38mvsy3vpjlg6d0xwlcvsi3l69nhhwzkccsc4smfm";
diff --git a/pkgs/applications/misc/mupdf/default.nix b/pkgs/applications/misc/mupdf/default.nix
index 57ac7da9b78..ef7571f5d14 100644
--- a/pkgs/applications/misc/mupdf/default.nix
+++ b/pkgs/applications/misc/mupdf/default.nix
@@ -39,6 +39,7 @@ stdenv.mkDerivation rec {
meta = {
homepage = http://mupdf.com/;
+ repositories.git = git://git.ghostscript.com/mupdf.git;
description = "Lightweight PDF viewer and toolkit written in portable C";
license = "GPLv3+";
maintainers = with stdenv.lib.maintainers; [ viric ];
diff --git a/pkgs/applications/misc/spacefm/default.nix b/pkgs/applications/misc/spacefm/default.nix
index e1f98fceace..7dbe723d9eb 100644
--- a/pkgs/applications/misc/spacefm/default.nix
+++ b/pkgs/applications/misc/spacefm/default.nix
@@ -15,9 +15,9 @@ in stdenv.mkDerivation rec {
buildInputs = [ gtk3 udev desktop_file_utils shared_mime_info intltool pkgconfig makeWrapper ];
- postInstall = ''
+ preFixup = ''
wrapProgram "$out/bin/spacefm" \
- --prefix XDG_DATA_DIRS : "${gtk3}/share"
+ --prefix XDG_DATA_DIRS : "$GSETTINGS_SCHEMAS_PATH"
'';
meta = {
diff --git a/pkgs/applications/misc/surf/default.nix b/pkgs/applications/misc/surf/default.nix
index 42792ba8f91..651cfcca406 100644
--- a/pkgs/applications/misc/surf/default.nix
+++ b/pkgs/applications/misc/surf/default.nix
@@ -9,7 +9,7 @@ stdenv.mkDerivation rec {
sha256 = "01b8hq8z2wd7ssym5bypx2b15mrs1lhgkrcgxf700kswxvxcrhgx";
};
- buildInputs = [ gtk makeWrapper webkit pkgconfig glib libsoup ];
+ buildInputs = [ gtk makeWrapper webkit gsettings_desktop_schemas pkgconfig glib libsoup ];
# Allow users set their own list of patches
inherit patches;
@@ -21,9 +21,12 @@ stdenv.mkDerivation rec {
preConfigure = [ ''sed -i "s@PREFIX = /usr/local@PREFIX = $out@g" config.mk'' ];
installPhase = ''
make PREFIX=/ DESTDIR=$out install
+ '';
+
+ preFixup = ''
wrapProgram "$out/bin/surf" \
--prefix GIO_EXTRA_MODULES : ${glib_networking}/lib/gio/modules \
- --prefix XDG_DATA_DIRS : "${gsettings_desktop_schemas}/share"
+ --prefix XDG_DATA_DIRS : "$GSETTINGS_SCHEMAS_PATH"
'';
meta = {
diff --git a/pkgs/applications/misc/synergy/cryptopp.patch b/pkgs/applications/misc/synergy/cryptopp.patch
index d0aebb87261..1c296423acd 100644
--- a/pkgs/applications/misc/synergy/cryptopp.patch
+++ b/pkgs/applications/misc/synergy/cryptopp.patch
@@ -1,32 +1,30 @@
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 3b61fc0..2206646 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -133,6 +133,9 @@ if (UNIX)
+diff -urN synergy-1.4.17-Source/CMakeLists.txt synergy-1.4.17-Source-fix/CMakeLists.txt
+--- synergy-1.4.17-Source/CMakeLists.txt 2014-03-14 21:34:19.000000000 +0100
++++ synergy-1.4.17-Source-fix/CMakeLists.txt 2014-04-11 13:37:18.839338710 +0200
+@@ -145,6 +145,9 @@
check_type_size(long SIZEOF_LONG)
check_type_size(short SIZEOF_SHORT)
-+ # let's just assume cryptopp exists (provided by the Nix expression)
-+ list(APPEND libs cryptopp)
++ # let's just assume cryptopp exists (provided by the Nix expression)
++ list(APPEND libs cryptopp)
+
# pthread is used on both Linux and Mac
check_library_exists("pthread" pthread_create "" HAVE_PTHREAD)
if (HAVE_PTHREAD)
-@@ -303,7 +306,6 @@ if (VNC_SUPPORT)
+@@ -317,7 +320,6 @@
endif()
add_subdirectory(src)
--add_subdirectory(tools)
+-add_subdirectory(ext)
if (WIN32)
- # add /analyze in order to unconver potential bugs in the source code
-diff --git a/src/lib/io/CCryptoMode.h b/src/lib/io/CCryptoMode.h
-index 9b7e8ad..0d659ac 100644
---- a/src/lib/io/CCryptoMode.h
-+++ b/src/lib/io/CCryptoMode.h
-@@ -17,9 +17,9 @@
-
- #pragma once
+ # TODO: consider using /analyze to uncover potential bugs in the source code.
+diff -urN synergy-1.4.17-Source/src/lib/io/CryptoMode_cryptopp.h synergy-1.4.17-Source-fix/src/lib/io/CryptoMode_cryptopp.h
+--- synergy-1.4.17-Source/src/lib/io/CryptoMode_cryptopp.h 2014-02-28 13:36:45.000000000 +0100
++++ synergy-1.4.17-Source-fix/src/lib/io/CryptoMode_cryptopp.h 2014-04-11 13:36:01.111985556 +0200
+@@ -25,6 +25,6 @@
+ # pragma GCC system_header
+ #endif
-#include
-#include
@@ -34,21 +32,14 @@ index 9b7e8ad..0d659ac 100644
+#include
+#include
+#include
- #include "ECryptoMode.h"
- #include "CString.h"
+diff -urN synergy-1.4.17-Source/src/lib/io/CryptoStream_cryptopp.h synergy-1.4.17-Source-fix/src/lib/io/CryptoStream_cryptopp.h
+--- synergy-1.4.17-Source/src/lib/io/CryptoStream_cryptopp.h 2014-02-28 13:36:45.000000000 +0100
++++ synergy-1.4.17-Source-fix/src/lib/io/CryptoStream_cryptopp.h 2014-04-11 13:36:07.173013005 +0200
+@@ -25,5 +25,5 @@
+ # pragma GCC system_header
+ #endif
-diff --git a/src/lib/io/CCryptoStream.h b/src/lib/io/CCryptoStream.h
-index 104b1f6..09c4dc4 100644
---- a/src/lib/io/CCryptoStream.h
-+++ b/src/lib/io/CCryptoStream.h
-@@ -20,8 +20,8 @@
- #include "BasicTypes.h"
- #include "CStreamFilter.h"
- #include "CCryptoMode.h"
-#include
-#include
+#include
+#include
-
- class CCryptoOptions;
-
diff --git a/pkgs/applications/misc/synergy/default.nix b/pkgs/applications/misc/synergy/default.nix
index c01d67943e5..834b514148b 100644
--- a/pkgs/applications/misc/synergy/default.nix
+++ b/pkgs/applications/misc/synergy/default.nix
@@ -1,29 +1,31 @@
-{ stdenv, fetchurl, cmake, x11, libX11, libXi, libXtst, libXrandr, xinput
-, cryptopp ? null, unzip ? null }:
+{ stdenv, fetchurl, cmake, x11, libX11, libXi, libXtst, libXrandr, xinput, curl
+, cryptopp ? null, unzip }:
assert stdenv.isLinux -> cryptopp != null;
-assert !stdenv.isLinux -> unzip != null;
with stdenv.lib;
stdenv.mkDerivation rec {
- name = "synergy-1.4.15";
+ name = "synergy-1.4.17";
src = fetchurl {
- url = "http://synergy.googlecode.com/files/${name}-Source.tar.gz";
- sha256 = "0l1mxxky9hacyva0npzkgkwg4wkmihzq3abdrds0w5f6is44adv4";
+ url = "http://fossfiles.com/synergy/${name}-r2055-Source.tar.gz";
+ sha256 = "1mwaapvq9vsm0rdpq99fyzcw6wbp83rg6cylcqcgjjd21c6y9iwm";
};
patches = optional stdenv.isLinux ./cryptopp.patch;
- postPatch = if stdenv.isLinux then ''
+ postPatch = (if stdenv.isLinux then ''
sed -i -e '/HAVE_X11_EXTENSIONS_XRANDR_H/c \
set(HAVE_X11_EXTENSIONS_XRANDR_H true)' CMakeLists.txt
'' else ''
- ${unzip}/bin/unzip -d tools/cryptopp562 tools/cryptopp562.zip
+ ${unzip}/bin/unzip -d ext/cryptopp562 ext/cryptopp562.zip
+ '') + ''
+ ${unzip}/bin/unzip -d ext/gmock-1.6.0 ext/gmock-1.6.0.zip
+ ${unzip}/bin/unzip -d ext/gtest-1.6.0 ext/gtest-1.6.0.zip
'';
- buildInputs = [ cmake x11 libX11 libXi libXtst libXrandr xinput ]
+ buildInputs = [ cmake x11 libX11 libXi libXtst libXrandr xinput curl ]
++ optional stdenv.isLinux cryptopp;
# At this moment make install doesn't work for synergy
diff --git a/pkgs/applications/networking/bittorrentsync/default.nix b/pkgs/applications/networking/bittorrentsync/default.nix
index c6277da704e..d0611d5b602 100644
--- a/pkgs/applications/networking/bittorrentsync/default.nix
+++ b/pkgs/applications/networking/bittorrentsync/default.nix
@@ -1,47 +1,42 @@
{ stdenv, fetchurl, patchelf }:
-# this package contains the daemon version of bittorrent sync
-# it's unfortunately closed source.
-
let
- # TODO: arm, ppc, osx
-
arch = if stdenv.system == "x86_64-linux" then "x64"
else if stdenv.system == "i686-linux" then "i386"
else throw "Bittorrent Sync for: ${stdenv.system} not supported!";
-
- interpreter = if stdenv.system == "x86_64-linux" then "ld-linux-x86-64.so.2"
- else if stdenv.system == "i686-linux" then "ld-linux.so.2"
+
+ sha256 = if stdenv.system == "x86_64-linux" then "16jdnip51fsnc2g0vib2zb4f06z5p1myzv9brrp42lq63l4skylj"
+ else if stdenv.system == "i686-linux" then "15bspn9frm2n7bzj7pdgbpd7gjjcxp0yx2sksa4ly6wmlv9lvf1j"
else throw "Bittorrent Sync for: ${stdenv.system} not supported!";
- version = "1.2.91";
- sha256 = if stdenv.system == "x86_64-linux" then "1rx5mmk3ffkh6dbm0m33nyx6spsxqjw9djclcf9x9bs3zfyzgmnd"
- else if stdenv.system == "i686-linux" then "1566mp01149gsb57dv87420w1vq2f3adp6g1c90xdxjxzd67yqpw"
- else throw "Bittorrent Sync for: ${stdenv.system} not supported!";
+ libPath = stdenv.lib.makeLibraryPath [ stdenv.gcc.libc ];
+in
+stdenv.mkDerivation rec {
+ name = "btsync-${version}";
+ version = "1.3.87";
-in stdenv.mkDerivation {
- name = "btsync-bin-${version}";
- src = fetchurl {
- url = "http://syncapp.bittorrent.com/${version}/btsync_${arch}-${version}.tar.gz";
+ src = fetchurl {
+ url = "http://syncapp.bittorrent.com/${version}/btsync_${arch}-${version}.tar.gz";
inherit sha256;
};
- sourceRoot = ".";
+ dontStrip = true; # Don't strip, otherwise patching the rpaths breaks
+ sourceRoot = ".";
+ buildInputs = [ patchelf ];
installPhase = ''
ensureDir "$out/bin/"
cp -r "btsync" "$out/bin/"
- patchelf --set-interpreter ${stdenv.glibc}/lib/${interpreter} \
- "$out/bin/btsync"
+ patchelf --interpreter "$(cat $NIX_GCC/nix-support/dynamic-linker)" \
+ --set-rpath ${libPath} "$out/bin/btsync"
'';
- buildInputs = [ patchelf ];
-
meta = {
- homepage = "http://labs.bittorrent.com/experiments/sync.html";
description = "Automatically sync files via secure, distributed technology";
- license = stdenv.lib.licenses.unfree;
- maintainers = [ stdenv.lib.maintainers.iElectric ];
+ homepage = "http://www.bittorrent.com/sync";
+ license = stdenv.lib.licenses.unfreeRedistributable;
+ platforms = stdenv.lib.platforms.linux;
+ maintainers = with stdenv.lib.maintainers; [ iElectric thoughtpolice ];
};
}
diff --git a/pkgs/applications/networking/browsers/chromium/default.nix b/pkgs/applications/networking/browsers/chromium/default.nix
index c4040ec0356..213e75ee6ef 100644
--- a/pkgs/applications/networking/browsers/chromium/default.nix
+++ b/pkgs/applications/networking/browsers/chromium/default.nix
@@ -55,7 +55,7 @@ let
-e 's/-f(stack-protector)(-all)?/-fno-\1/' \
-e 's|/bin/echo|echo|' \
-e "/python_arch/s/: *'[^']*'/: '""'/" \
- build/common.gypi
+ build/common.gypi chrome/chrome_tests.gypi
sed -i '/not RunGN/,+1d' build/gyp_chromium
sed -i -e 's|/usr/bin/gcc|gcc|' \
third_party/WebKit/Source/build/scripts/scripts.gypi \
diff --git a/pkgs/applications/networking/browsers/chromium/sources.nix b/pkgs/applications/networking/browsers/chromium/sources.nix
index 782356640c8..49b5e2b4221 100644
--- a/pkgs/applications/networking/browsers/chromium/sources.nix
+++ b/pkgs/applications/networking/browsers/chromium/sources.nix
@@ -11,8 +11,8 @@
sha256 = "1na5d6z4a0wkabn7cj62vyiv3mmvcb6qdvrkyy6fj79h7gk2hb7k";
};
stable = {
- version = "33.0.1750.152";
- url = "http://commondatastorage.googleapis.com/chromium-browser-official/chromium-33.0.1750.152.tar.xz";
- sha256 = "0byc23vwn9alsva0jqvwvgnbx2bm7x48m3jln02y4fpf1f265m4z";
+ version = "34.0.1847.116";
+ url = "http://commondatastorage.googleapis.com/chromium-browser-official/chromium-34.0.1847.116.tar.xz";
+ sha256 = "04cpfav5rqa117igvzmrw0045r2ljxg5fqb46qgqvkgff30pjrfx";
};
}
diff --git a/pkgs/applications/networking/browsers/dillo/default.nix b/pkgs/applications/networking/browsers/dillo/default.nix
new file mode 100644
index 00000000000..0cf23f38b0f
--- /dev/null
+++ b/pkgs/applications/networking/browsers/dillo/default.nix
@@ -0,0 +1,31 @@
+{ stdenv, fetchurl
+, fltk
+, openssl
+, libjpeg, libpng
+, perl
+, libXcursor, libXi, libXinerama
+}:
+
+stdenv.mkDerivation rec {
+ version = "3.0.4";
+ name = "dillo-${version}";
+
+ src = fetchurl {
+ url = "http://www.dillo.org/download/${name}.tar.bz2";
+ sha256 = "0ffz481vgl7f12f575pmbagm8swgxgv9s9c0p8c7plhd04jsnazf";
+ };
+
+ buildInputs = with stdenv.lib;
+ [ fltk openssl libjpeg libpng libXcursor libXi libXinerama ];
+
+ nativeBuildInputs = [ perl ];
+
+ configureFlags = "--enable-ssl";
+
+ meta = {
+ homepage = http://www.dillo.org/;
+ description = "A fast graphical web browser with a small footprint";
+ maintainers = [ stdenv.lib.maintainers.AndersonTorres ];
+ platforms = stdenv.lib.platforms.linux;
+ };
+}
diff --git a/pkgs/applications/networking/browsers/dwb/default.nix b/pkgs/applications/networking/browsers/dwb/default.nix
index e14996d35f4..dcdbe724194 100644
--- a/pkgs/applications/networking/browsers/dwb/default.nix
+++ b/pkgs/applications/networking/browsers/dwb/default.nix
@@ -10,17 +10,17 @@ stdenv.mkDerivation {
sha256 = "145sq2wv0s0n32cwpwgy59ff6ppcv80ialak7nnj1rpqicfqb72h";
};
- buildInputs = [ pkgconfig makeWrapper libsoup webkit gtk3 gnutls json_c m4 ];
+ buildInputs = [ pkgconfig makeWrapper gsettings_desktop_schemas 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=''
+ preFixup=''
wrapProgram "$out/bin/dwb" \
--prefix GIO_EXTRA_MODULES : "${glib_networking}/lib/gio/modules" \
- --prefix XDG_DATA_DIRS : "${gsettings_desktop_schemas}/share:$out/share"
+ --prefix XDG_DATA_DIRS : "$GSETTINGS_SCHEMAS_PATH:$out/share"
wrapProgram "$out/bin/dwbem" \
--prefix GIO_EXTRA_MODULES : "${glib_networking}/lib/gio/modules"
'';
diff --git a/pkgs/applications/networking/browsers/midori/default.nix b/pkgs/applications/networking/browsers/midori/default.nix
index db9e1c24cb5..d3135e0be8e 100644
--- a/pkgs/applications/networking/browsers/midori/default.nix
+++ b/pkgs/applications/networking/browsers/midori/default.nix
@@ -32,9 +32,9 @@ stdenv.mkDerivation rec {
-DUSE_ZEITGEIST=OFF
'';
- postInstall = ''
+ preFixup = ''
wrapProgram $out/bin/midori \
--prefix GIO_EXTRA_MODULES : "${glib_networking}/lib/gio/modules" \
- --prefix XDG_DATA_DIRS : "${gtk3}/share:${gsettings_desktop_schemas}/share"
+ --prefix XDG_DATA_DIRS : "$GSETTINGS_SCHEMAS_PATH"
'';
}
diff --git a/pkgs/applications/networking/browsers/mozilla-plugins/flashplayer-11/default.nix b/pkgs/applications/networking/browsers/mozilla-plugins/flashplayer-11/default.nix
index a33c879ad92..a78ab7d27f7 100644
--- a/pkgs/applications/networking/browsers/mozilla-plugins/flashplayer-11/default.nix
+++ b/pkgs/applications/networking/browsers/mozilla-plugins/flashplayer-11/default.nix
@@ -36,7 +36,7 @@
let
# -> http://get.adobe.com/flashplayer/
- version = "11.2.202.346";
+ version = "11.2.202.350";
src =
if stdenv.system == "x86_64-linux" then
@@ -47,7 +47,7 @@ let
else rec {
inherit version;
url = "http://fpdownload.macromedia.com/get/flashplayer/pdc/${version}/install_flash_player_11_linux.x86_64.tar.gz";
- sha256 = "19jgiw5f0ksxqgi6jkla4qq7gx9gnn9jmpjgqanb7mhl5fdl0v55";
+ sha256 = "0f5y05c0acvdzd7a7qi93kd17byazf9swm6gml5rph5bc25aw77l";
}
else if stdenv.system == "i686-linux" then
if debug then {
@@ -58,7 +58,7 @@ let
} else rec {
inherit version;
url = "http://fpdownload.macromedia.com/get/flashplayer/pdc/${version}/install_flash_player_11_linux.i386.tar.gz";
- sha256 = "01f4zady0r0n5rfqq2285svc13wiypmfrm8fnirmr5lpwl5d89ra";
+ sha256 = "0nsrj56xbpn8r4365zby8qbc38cl2anb5ky0h7jwyh7xyrs9xmml";
}
else throw "Flash Player is not supported on this platform";
diff --git a/pkgs/applications/networking/browsers/uzbl/default.nix b/pkgs/applications/networking/browsers/uzbl/default.nix
index 4c6458d909f..ba9c8bde37a 100644
--- a/pkgs/applications/networking/browsers/uzbl/default.nix
+++ b/pkgs/applications/networking/browsers/uzbl/default.nix
@@ -1,45 +1,36 @@
-a :
-let
- fetchgit = a.fetchgit;
+{ stdenv, fetchurl, pkgconfig, python, makeWrapper
+, webkit, glib_networking, gsettings_desktop_schemas
+}:
- buildInputs = with a; [
- libsoup pkgconfig webkit gtk makeWrapper
- kbproto glib pango cairo gdk_pixbuf atk
- python3
- ];
-in
-rec {
- src = fetchgit {
- url = "https://github.com/Dieterbe/uzbl.git";
- rev = "refs/tags/2012.05.14";
- sha256 = "1crvikb0qqsx5qb003i4w7ywh72psl37gjslrj5hx2fd2f215l0l";
- };
+stdenv.mkDerivation rec {
+ name = "uzbl-20120514";
- name = "uzbl-git";
-
- inherit buildInputs;
- configureFlags = [];
-
- /* doConfigure should be removed if not needed */
- phaseNames = ["addInputs" "setVars" "doMakeInstall" "doWrap"];
-
- setVars = a.noDepEntry (''
- export NIX_LDFLAGS="$NIX_LDFLAGS -L${a.libX11}/lib -lX11"
- '');
-
- doWrap = a.makeManyWrappers "$out/bin/uzbl-core"
- ''
- --prefix GST_PLUGIN_PATH : ${a.webkit.gstreamer}/lib/gstreamer-* \
- --prefix GST_PLUGIN_PATH : ${a.webkit.gst_plugins_base}/lib/gstreamer-* \
- --prefix GST_PLUGIN_PATH : ${a.webkit.gst_plugins_good}/lib/gstreamer-* \
- --prefix GST_PLUGIN_PATH : ${a.webkit.gst_ffmpeg}/lib/gstreamer-* \
- --prefix GIO_EXTRA_MODULES : ${a.glib_networking}/lib/gio/modules
- '';
-
- installFlags = "PREFIX=$out PYINSTALL_EXTRA=\"--prefix=$out\"";
-
- meta = {
+ meta = with stdenv.lib; {
description = "Tiny externally controllable webkit browser";
- maintainers = [a.lib.maintainers.raskin];
+ homepage = "http://uzbl.org/";
+ license = licenses.gpl3;
+ platforms = platforms.linux;
+ maintainers = with maintainers; [ raskin ];
};
+
+ src = fetchurl {
+ name = "${name}.tar.gz";
+ url = "https://github.com/uzbl/uzbl/archive/2012.05.14.tar.gz";
+ sha256 = "1flpf0rg0c3n9bjifr37zxljn9yxslg8vkll7ghkm341x76cbkwn";
+ };
+
+ preConfigure = ''
+ makeFlags="$makeFlags PREFIX=$out"
+ makeFlags="$makeFlags PYINSTALL_EXTRA=--prefix=$out"
+ '';
+
+ postInstall = ''
+ wrapProgram $out/bin/uzbl-core \
+ --prefix GIO_EXTRA_MODULES : "${glib_networking}/lib/gio/modules" \
+ --prefix XDG_DATA_DIRS : "${gsettings_desktop_schemas}/share:$out/share"
+ '';
+
+ nativeBuildInputs = [ pkgconfig python makeWrapper ];
+
+ buildInputs = [ webkit ];
}
diff --git a/pkgs/applications/networking/browsers/vimb/default.nix b/pkgs/applications/networking/browsers/vimb/default.nix
index 10bca4848dd..6cb52be775c 100644
--- a/pkgs/applications/networking/browsers/vimb/default.nix
+++ b/pkgs/applications/networking/browsers/vimb/default.nix
@@ -16,14 +16,14 @@ stdenv.mkDerivation rec {
sed -i s,/etc/ssl/certs/ca-certificates.crt,/etc/ssl/certs/ca-bundle.crt, src/default.h
'';
- buildInputs = [ makeWrapper gtk libsoup pkgconfig webkit ];
+ buildInputs = [ makeWrapper gtk libsoup pkgconfig webkit gsettings_desktop_schemas ];
makeFlags = [ "PREFIX=$(out)" ];
- postInstall = ''
+ preFixup = ''
wrapProgram "$out/bin/vimb" \
--prefix GIO_EXTRA_MODULES : "${glib_networking}/lib/gio/modules" \
- --prefix XDG_DATA_DIRS : "${gsettings_desktop_schemas}/share"
+ --prefix XDG_DATA_DIRS : "$GSETTINGS_SCHEMAS_PATH"
'';
meta = {
diff --git a/pkgs/applications/networking/browsers/vimprobable2/default.nix b/pkgs/applications/networking/browsers/vimprobable2/default.nix
index 2a44449c750..8e1e00795d2 100644
--- a/pkgs/applications/networking/browsers/vimprobable2/default.nix
+++ b/pkgs/applications/networking/browsers/vimprobable2/default.nix
@@ -2,11 +2,11 @@
pkgconfig, webkit, gsettings_desktop_schemas }:
stdenv.mkDerivation rec {
- version = "1.2.1";
+ version = "1.4.2";
name = "vimprobable2-${version}";
src = fetchurl {
url = "mirror://sourceforge/vimprobable/vimprobable2_${version}.tar.bz2";
- sha256 = "19zx1k3s2gnhzzd2wpyqsk151w9p52ifl64xaz9a6qkgvrxlli8p";
+ sha256 = "13jdximksh9r3cgd2f8vms0pbsn3x0gxvyqdqiw16xp5fmdx5kzr";
};
# Nixos default ca bundle
@@ -14,13 +14,16 @@ stdenv.mkDerivation rec {
sed -i s,/etc/ssl/certs/ca-certificates.crt,/etc/ssl/certs/ca-bundle.crt, config.h
'';
- buildInputs = [ makeWrapper gtk libsoup libX11 perl pkgconfig webkit ];
+ buildInputs = [ makeWrapper gtk libsoup libX11 perl pkgconfig webkit gsettings_desktop_schemas ];
installPhase = ''
make PREFIX=/ DESTDIR=$out install
+ '';
+
+ preFixup = ''
wrapProgram "$out/bin/vimprobable2" \
--prefix GIO_EXTRA_MODULES : "${glib_networking}/lib/gio/modules" \
- --prefix XDG_DATA_DIRS : "${gsettings_desktop_schemas}/share"
+ --prefix XDG_DATA_DIRS : "$GSETTINGS_SCHEMAS_PATH"
'';
meta = {
diff --git a/pkgs/applications/networking/esniper/default.nix b/pkgs/applications/networking/esniper/default.nix
index ee263245218..0a9703d5e34 100644
--- a/pkgs/applications/networking/esniper/default.nix
+++ b/pkgs/applications/networking/esniper/default.nix
@@ -1,18 +1,18 @@
{ stdenv, fetchurl, openssl, curl, coreutils, gawk, bash, which }:
stdenv.mkDerivation {
- name = "esniper-2.28.0";
+ name = "esniper-2.29.0";
src = fetchurl {
- url = "mirror://sourceforge/esniper/esniper-2-28-0.tgz";
- sha256 = "c2b0ccb757616b32f2d6cf54a4a5e367405fa7bcd6e6ed11835fe4f8a06a016b";
+ url = "mirror://sourceforge/esniper/esniper-2-29-0.tgz";
+ sha256 = "052jfbzm0a88h3hss2vg1vfdrhibjwhbcdnwsbkk5i1z0jj16xxc";
};
buildInputs = [ openssl curl ];
# Add support for CURL_CA_BUNDLE variable.
# Fix .
- patches = [ ./find-ca-bundle.patch ./fix-ebay-login.patch ];
+ patches = [ ./find-ca-bundle.patch ];
postInstall = ''
sed <"frontends/snipe" >"$out/bin/snipe" \
diff --git a/pkgs/applications/networking/esniper/fix-ebay-login.patch b/pkgs/applications/networking/esniper/fix-ebay-login.patch
deleted file mode 100644
index 07d0a577a08..00000000000
--- a/pkgs/applications/networking/esniper/fix-ebay-login.patch
+++ /dev/null
@@ -1,13 +0,0 @@
---- esniper-orig/auction.c 2014-03-23 22:28:46.684289574 +0100
-+++ esniper/auction.c 2014-03-23 22:24:00.540568653 +0100
-@@ -424,7 +424,9 @@
- if ((pp->srcId && !strcmp(pp->srcId, "SignInAlertSupressor"))||
- (pp->pageName &&
- (!strncasecmp(pp->pageName, "MyeBay", 6) ||
-- !strncasecmp(pp->pageName, "My eBay", 7))
-+ !strncasecmp(pp->pageName, "My eBay", 7) ||
-+ !strncasecmp(pp->pageName, "Watch list", 10) ||
-+ !strncasecmp(pp->pageName, "User Agreement", 10))
- ))
- loginTime = time(NULL);
- else if (pp->pageName &&
diff --git a/pkgs/applications/networking/instant-messengers/pidgin/default.nix b/pkgs/applications/networking/instant-messengers/pidgin/default.nix
index 41a1abc5ee7..6e6fd6d0eb6 100644
--- a/pkgs/applications/networking/instant-messengers/pidgin/default.nix
+++ b/pkgs/applications/networking/instant-messengers/pidgin/default.nix
@@ -56,5 +56,6 @@ stdenv.mkDerivation rec {
homepage = http://pidgin.im;
license = licenses.gpl2Plus;
platforms = platforms.linux;
+ maintainers = [ maintainers.vcunat ];
};
}
diff --git a/pkgs/applications/networking/instant-messengers/sflphone/default.nix b/pkgs/applications/networking/instant-messengers/sflphone/default.nix
index 2401d796bfd..a31a682abf8 100644
--- a/pkgs/applications/networking/instant-messengers/sflphone/default.nix
+++ b/pkgs/applications/networking/instant-messengers/sflphone/default.nix
@@ -75,8 +75,10 @@ rec {
'';
# gtk3 programs have the runtime dependency on XDG_DATA_DIRS
- postInstall = ''
- wrapProgram $out/bin/sflphone* --prefix XDG_DATA_DIRS ":" ${gtk}/share
+ preFixup = ''
+ for f in "$out/bin/sflphone" "$out/bin/sflphone-client-gnome"; do
+ wrapProgram $f --prefix XDG_DATA_DIRS ":" "${gtk}/share:$GSETTINGS_SCHEMAS_PATH"
+ done
'';
buildInputs = [ daemon pkgconfig gtk glib dbus_glib libnotify intltool makeWrapper ];
diff --git a/pkgs/applications/networking/instant-messengers/telepathy/logger/default.nix b/pkgs/applications/networking/instant-messengers/telepathy/logger/default.nix
index bd8cffd40e4..173dfe9c929 100644
--- a/pkgs/applications/networking/instant-messengers/telepathy/logger/default.nix
+++ b/pkgs/applications/networking/instant-messengers/telepathy/logger/default.nix
@@ -19,8 +19,6 @@ stdenv.mkDerivation rec {
configureFlags = "--enable-call";
- installFlags = "gsettingsschemadir=\${out}/share/telepathy/logger/glib-2.0/schemas/";
-
meta = {
description = "Logger service for Telepathy framework";
homepage = http://telepathy.freedesktop.org/wiki/Logger ;
diff --git a/pkgs/applications/networking/instant-messengers/telepathy/mission-control/default.nix b/pkgs/applications/networking/instant-messengers/telepathy/mission-control/default.nix
index 5d44f97a1be..a8142fc1e5c 100644
--- a/pkgs/applications/networking/instant-messengers/telepathy/mission-control/default.nix
+++ b/pkgs/applications/networking/instant-messengers/telepathy/mission-control/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, pkgconfig, telepathy_glib, libxslt }:
+{ stdenv, fetchurl, pkgconfig, telepathy_glib, libxslt, makeWrapper }:
stdenv.mkDerivation rec {
name = "${pname}-5.16.0";
@@ -9,7 +9,12 @@ stdenv.mkDerivation rec {
sha256 = "1l61w6j04mbrjsbcfrlc0safh9nlsjnj0z6lszal64r9bhkcghzd";
};
- buildInputs = [ telepathy_glib ];
+ buildInputs = [ telepathy_glib makeWrapper ];
nativeBuildInputs = [ pkgconfig libxslt ];
+
+ preFixup = ''
+ wrapProgram "$out/libexec/mission-control-5" \
+ --prefix XDG_DATA_DIRS : "$GSETTINGS_SCHEMAS_PATH"
+ '';
}
diff --git a/pkgs/applications/networking/irc/weechat/devel.nix b/pkgs/applications/networking/irc/weechat/devel.nix
new file mode 100644
index 00000000000..cf52838b78c
--- /dev/null
+++ b/pkgs/applications/networking/irc/weechat/devel.nix
@@ -0,0 +1,35 @@
+{ stdenv, fetchgit, ncurses, openssl, perl, python, aspell, gnutls
+, zlib, curl , pkgconfig, libgcrypt, ruby, lua5, tcl, guile
+, pythonPackages, cacert, cmake, makeWrapper }:
+
+stdenv.mkDerivation rec {
+ rev = "6f64ee699ba46c90b55d3b99c60e4807819e2b7b";
+ version = "0.4.4-rev${rev}";
+ name = "weechat-${version}";
+
+ src = fetchgit {
+ inherit rev;
+ url = "git://github.com/weechat/weechat.git";
+ sha256 = "1w58gir48kxvscf6njy3kmfxbjlnsf2byw3g3w6r47zjkgyxcf1z";
+ };
+
+ buildInputs =
+ [ ncurses perl python openssl aspell gnutls zlib curl pkgconfig
+ libgcrypt ruby lua5 tcl guile pythonPackages.pycrypto makeWrapper
+ cacert cmake
+ ];
+
+ postInstall = ''
+ wrapProgram "$out/bin/weechat" \
+ --prefix PYTHONPATH : "$PYTHONPATH" \
+ --prefix PYTHONPATH : "$out/lib/${python.libPrefix}/site-packages"
+ '';
+
+ meta = {
+ homepage = http://www.weechat.org/;
+ description = "A fast, light and extensible chat client";
+ license = stdenv.lib.licenses.gpl3;
+ maintainers = with stdenv.lib.maintainers; [ garbas the-kenny ];
+ platforms = stdenv.lib.platforms.linux;
+ };
+}
diff --git a/pkgs/applications/networking/mailreaders/thunderbird-bin/default.nix b/pkgs/applications/networking/mailreaders/thunderbird-bin/default.nix
new file mode 100644
index 00000000000..1e8a7e301ed
--- /dev/null
+++ b/pkgs/applications/networking/mailreaders/thunderbird-bin/default.nix
@@ -0,0 +1,264 @@
+{ stdenv, fetchurl, config
+, gconf
+, alsaLib
+, at_spi2_atk
+, atk
+, cairo
+, cups
+, curl
+, dbus_glib
+, dbus_libs
+, fontconfig
+, freetype
+, gdk_pixbuf
+, glib
+, glibc
+, gst_plugins_base
+, gstreamer
+, gtk
+, kerberos
+, libX11
+, libXScrnSaver
+, libXext
+, libXinerama
+, libXrender
+, libXt
+, libcanberra
+, libgnome
+, libgnomeui
+, mesa
+, nspr
+, nss
+, pango
+}:
+
+let
+ version = "24.4.0";
+
+ sources = [
+ { locale = "ar"; arch = "linux-x86_64"; sha256 = "dd570da273c047e0b4bf29a7ed4bb4356dcbdd8de62ecb65fcddfecaf156966f"; }
+ { locale = "ar"; arch = "linux-i686"; sha256 = "f96c30ad874adf10608f818e0d986070b2a577de4d9aeb6c8dc7ea1ccd6e72f1"; }
+ { locale = "ast"; arch = "linux-x86_64"; sha256 = "8a50ff6a4f0d2bf68f989c2d3e0bca75c9fbcfc73c37b6cc16d935c1e3c1a9cf"; }
+ { locale = "ast"; arch = "linux-i686"; sha256 = "ace08104be64c038f5337e5178a79cb3f909c233f8722f7d54db04aef87935f9"; }
+ { locale = "be"; arch = "linux-x86_64"; sha256 = "793c07b33e861a5e29ce906a9764d980a82238b7c078391b96480592f526f323"; }
+ { locale = "be"; arch = "linux-i686"; sha256 = "98f2a5390572df625e0600ab224d5171d0357e187a3743ad72ec94d31533d993"; }
+ { locale = "bg"; arch = "linux-i686"; sha256 = "7d2fbb1ecad6e7a81c481a6697429809dc76809bba537ab8bc576b19ba5938f5"; }
+ { locale = "bg"; arch = "linux-x86_64"; sha256 = "a0a551d1790969b11ad2dcfc277f487645abff2497f2e9104235e77c45e5120c"; }
+ { locale = "bn-BD"; arch = "linux-x86_64"; sha256 = "cb2a5549c3cdc9e159181cb9417c7f53158820f722e48d3ce2e4dcf10dea32d2"; }
+ { locale = "bn-BD"; arch = "linux-i686"; sha256 = "e395d07fb7b13443ccc97433d38a8845969cf854ace807950a364319c17861d6"; }
+ { locale = "br"; arch = "linux-i686"; sha256 = "8637d47dfb9b685a1034f5449d3481a5c62f74158f1a6318fe94504ad779dbb2"; }
+ { locale = "br"; arch = "linux-x86_64"; sha256 = "f36f6d2041a110ffc621249e6d92ec09f3b2bb7a1cf08b7892a0eb998b8a2bb3"; }
+ { locale = "ca"; arch = "linux-x86_64"; sha256 = "427a09458fe0d631a360b871db637d33bc0ad443ec443b7193db409321ab72da"; }
+ { locale = "ca"; arch = "linux-i686"; sha256 = "8531078cb31cb3035fdfd7397159cd42a6439868e954e1c9bd6eb7f9cd564bdb"; }
+ { locale = "cs"; arch = "linux-x86_64"; sha256 = "6fea39c9416357ec2902ed3dff84650a683dbe136790fa83cbca5d8bf869dc48"; }
+ { locale = "cs"; arch = "linux-i686"; sha256 = "c9e8d50e04dccd647ef7a566e68a3fe8374f86e9c1b7fe2001e3690270c5e7b9"; }
+ { locale = "da"; arch = "linux-x86_64"; sha256 = "41debf8c221063c4a5eafc3b769aabada6f3cebf35a354b7837c2ad737fa9b0f"; }
+ { locale = "da"; arch = "linux-i686"; sha256 = "77aa022e8c58dc60595f4600849da795faea4c20da6d5514f57e1b0033cda27c"; }
+ { locale = "de"; arch = "linux-x86_64"; sha256 = "05ec3d776de6060a82eea595b022b73c05ab7016419be5989929bd10ae282d27"; }
+ { locale = "de"; arch = "linux-i686"; sha256 = "471288d8660536508fe04b236eb72a7c245d27cadd59841a9bab0e73db271005"; }
+ { locale = "el"; arch = "linux-x86_64"; sha256 = "901c0097fb8072a37787a77758a0d6a2ced66acdf5a3588a0a6df3584034c309"; }
+ { locale = "el"; arch = "linux-i686"; sha256 = "da658a5f18a7162d513f8e0aac8d1648b18404bac7888a2f66c850f2084a54c5"; }
+ { locale = "en-GB"; arch = "linux-i686"; sha256 = "61c637e3b63a10d3c3eff91e9dcbd8558887a41d8e359aa637541bc4424a328a"; }
+ { locale = "en-GB"; arch = "linux-x86_64"; sha256 = "dcf399192062a7e3075125f550b0889fb4943c595814b8f6e755e9aa7e4656b1"; }
+ { locale = "en-US"; arch = "linux-i686"; sha256 = "376ab51e3c424db7e235b2e94494d48ce2fa9a8f1fbf5ef5cf9e367bbaf7422d"; }
+ { locale = "en-US"; arch = "linux-x86_64"; sha256 = "57917aa608131da4d569e791fc8167f4df54975b74c64d6df641858400dd4c1b"; }
+ { locale = "es-AR"; arch = "linux-x86_64"; sha256 = "47ecdb633bf1b246df84e796395a668fd98ac52a82177507da010b0174aa74d8"; }
+ { locale = "es-AR"; arch = "linux-i686"; sha256 = "9155d96fb14795bc5a22e10105ba0226a7b9c87a4d6ffa5cf7835dc77d69fa30"; }
+ { locale = "es-ES"; arch = "linux-i686"; sha256 = "3c41656512f1859b28abdf81d356dd90b720efd489d7021270114a9d28c54b38"; }
+ { locale = "es-ES"; arch = "linux-x86_64"; sha256 = "bad476b65d71744b9562a8548ca6cd608da92e62f45057688fef29ac77eb060e"; }
+ { locale = "et"; arch = "linux-i686"; sha256 = "06fdb2df4bcca189736fc6ae2fee6ba87f6b19d0b64f21bdb2b07e478fe6a0ba"; }
+ { locale = "et"; arch = "linux-x86_64"; sha256 = "f110d0940905e2cbe4ab14c1370ff88e533e030fb5a408bf4f06f517351d5979"; }
+ { locale = "eu"; arch = "linux-x86_64"; sha256 = "02bbb72fea711772d0dba0137641acb9f0293313a552e554443118324737fba4"; }
+ { locale = "eu"; arch = "linux-i686"; sha256 = "3a94fc161e98282691d668b68b3a8e7bf035dc87ec0d07be6eb1844b2a79cd39"; }
+ { locale = "fi"; arch = "linux-i686"; sha256 = "3f9c44306991554cf48fee4da86dec6ab06cb863baa8157d7adf29f6f8b0119f"; }
+ { locale = "fi"; arch = "linux-x86_64"; sha256 = "9883bfa54e331c17338bdf7e835a0a0f71a9366ad99ddc0fda12fd9d062f071b"; }
+ { locale = "fr"; arch = "linux-x86_64"; sha256 = "60e59c9b9ac78cba5604a051784a8721f84bfd10899d9575a4591ae4e5c48afc"; }
+ { locale = "fr"; arch = "linux-i686"; sha256 = "d16908d799fe667032d317b01db91cdfcd0b23654061203df84f5cb67d6ae837"; }
+ { locale = "fy-NL"; arch = "linux-x86_64"; sha256 = "21e209179135fd97207e878c415d112e6c01bd7686f45eef2891cd8508dd8f9c"; }
+ { locale = "fy-NL"; arch = "linux-i686"; sha256 = "c8463a38d5fc454ad80a519a9828c1c8808688aa140b5d5276b53a659ae7bf7d"; }
+ { locale = "ga-IE"; arch = "linux-x86_64"; sha256 = "22d6d90cd7490e36ef5df2106ba84bcd49038cecf70a60cebd4bf552a01bfdd7"; }
+ { locale = "ga-IE"; arch = "linux-i686"; sha256 = "5a7fcc013bcd09d327e40e5b0001057067f9e509e52f38681893f1a16cf8520a"; }
+ { locale = "gd"; arch = "linux-i686"; sha256 = "14c7d9a846a5d2a409089a16afdc97309d6818f97097d73757245b29cdeb73ae"; }
+ { locale = "gd"; arch = "linux-x86_64"; sha256 = "e4d3b093da2d80e2a2c02be8d03831c6a89e8969d3261a39f153a6d96f20c7eb"; }
+ { locale = "gl"; arch = "linux-i686"; sha256 = "73515b65314f8aa28fdb8708e821c01ba6edab5474e5140266b8ee8c0206807f"; }
+ { locale = "gl"; arch = "linux-x86_64"; sha256 = "7dd646cde4969243178237ea7fdf7b3c7c369e735a42f21292e8fcc3bce2c6ac"; }
+ { locale = "he"; arch = "linux-x86_64"; sha256 = "3fdf3750727f47628ffe4e7b28e8b7f180194be5985f4a10c703d3322a563e55"; }
+ { locale = "he"; arch = "linux-i686"; sha256 = "e4385cded8a13776890320780c6aa265c9562a6301f8f5ee7f4fbeb4aa54acf8"; }
+ { locale = "hr"; arch = "linux-x86_64"; sha256 = "ada94d6612f20642e6294a17334afb8d31b419132e725618a376728a6028454e"; }
+ { locale = "hr"; arch = "linux-i686"; sha256 = "bcbb85910f983145ff8df79574087cebaac6537600aa9a479f55298a7d6bc1c2"; }
+ { locale = "hu"; arch = "linux-i686"; sha256 = "0f41a925ee5c3ad59f24a6b59eed066d1fb37ea8ec81ab4bac70280437be2589"; }
+ { locale = "hu"; arch = "linux-x86_64"; sha256 = "9038e0358bb63a147835cacf91a7e7db888fc7b93662cca4919110e2a5daed76"; }
+ { locale = "hy-AM"; arch = "linux-i686"; sha256 = "24af2ffa71d5810f8e947de27e77a70310c22dc1cc89640b67416fe74a4a14b3"; }
+ { locale = "hy-AM"; arch = "linux-x86_64"; sha256 = "62cfce68247f5afd2c68a97ed230b515c1515ecd279a753bf9c728c552683f6c"; }
+ { locale = "id"; arch = "linux-i686"; sha256 = "a5e2d72cb0841848cd5a947d4cda2e84db1eae97a0735974690176ccd966eeea"; }
+ { locale = "id"; arch = "linux-x86_64"; sha256 = "f1d539fe69b8121205c5411096554cab41ae4f42a2018af6ba020a2d8fe660dc"; }
+ { locale = "is"; arch = "linux-i686"; sha256 = "6eacbd0b4b9f47f67818d6021600b5dddc79d2a38edac5c47f61ac039ed5cdb6"; }
+ { locale = "is"; arch = "linux-x86_64"; sha256 = "fcc86ac738b190012d38d32c6cee3c35d57f6a3b80867c0107f4b8a2717961bb"; }
+ { locale = "it"; arch = "linux-x86_64"; sha256 = "9b668a501c7da55c630761dbf89ae8fe2e32038af8ce4c10fc646eae7c2d08e2"; }
+ { locale = "it"; arch = "linux-i686"; sha256 = "f610b7d4a34635e7c3b5c355873b65558537224d5a241b92605a49499ba4d5e6"; }
+ { locale = "ja"; arch = "linux-i686"; sha256 = "185ee26eb9a33ba534805b5b3547b3524bf11c94614adc252f7d17b41279d312"; }
+ { locale = "ja"; arch = "linux-x86_64"; sha256 = "1be85c39fa8b09a6bc2b11a47d04f0447628c3ed8a775d27c8e04577627ed63e"; }
+ { locale = "ko"; arch = "linux-i686"; sha256 = "e868d431d77b419bae6fcc7e1e137815ca8cbad6673074469005c606023d7983"; }
+ { locale = "ko"; arch = "linux-x86_64"; sha256 = "fa4db6ff8047a5e11411e507df4f84baac5511a1709d5685a2a6e8da0d2e1f25"; }
+ { locale = "lt"; arch = "linux-i686"; sha256 = "40c1eeabbd9d877750bee7f5f4a6b6f2108aa364ace8eefff26806a5bafca5eb"; }
+ { locale = "lt"; arch = "linux-x86_64"; sha256 = "4bdff4418bc0c9acc7d3b00ccc6500d51e65a501c2438e99e22c03bbeb36dfff"; }
+ { locale = "nb-NO"; arch = "linux-i686"; sha256 = "541b5f434e6354bb6a4c50abb828a49383b1d1a9fb31d6b99c1f052ef73bc2f2"; }
+ { locale = "nb-NO"; arch = "linux-x86_64"; sha256 = "9e954408406762e55fd40487cad589c876285145931f8a12ff6ced29d9583cde"; }
+ { locale = "nl"; arch = "linux-i686"; sha256 = "06a57772563456d5283b9a36b9e6cbb5efb4f33e4ea29ac2446055e0a965b8c9"; }
+ { locale = "nl"; arch = "linux-x86_64"; sha256 = "42a8d995ac906c7fb4a1952db62d1717aa7c4660a2e7e794da3aae6aaac6f9c9"; }
+ { locale = "nn-NO"; arch = "linux-i686"; sha256 = "6fed1e74c6323d2909caf471ca733df46224afcb0c632d5fa0f0d80d6157efd3"; }
+ { locale = "nn-NO"; arch = "linux-x86_64"; sha256 = "c29d8ff69ec2a8b5f508b7c56cd8679fe3b322f7e2e87f10303fd8bca1b93230"; }
+ { locale = "pa-IN"; arch = "linux-i686"; sha256 = "a69a7ceb4fa85cc43c367f1ddebafa76808e83d3044c158287a5923b82fc3093"; }
+ { locale = "pa-IN"; arch = "linux-x86_64"; sha256 = "e38e75976891204fde647d389b6c89c807d378a534d6e04582024755a3cb6139"; }
+ { locale = "pl"; arch = "linux-x86_64"; sha256 = "39a0d3f865c462b5d3ae569825befd61dbf3ee5a6b2b81d3b9d31f4c98cf7b72"; }
+ { locale = "pl"; arch = "linux-i686"; sha256 = "3ccedf1ad79135d825f762dd09da88be23901591b27ea7e61a887d5398284a46"; }
+ { locale = "pt-BR"; arch = "linux-x86_64"; sha256 = "ea29e40d41442ab373855acd7b40927fc5a0408f9d3bb4a0c6a2021cd8b0fca2"; }
+ { locale = "pt-BR"; arch = "linux-i686"; sha256 = "f6170909b6527e935584673a17d1245c33142a755a9db45dda2de240871fc6c0"; }
+ { locale = "pt-PT"; arch = "linux-i686"; sha256 = "15531f4e4652d533fd8cb8d3be8b5e24717240160d885629eecc7f08d8cd0701"; }
+ { locale = "pt-PT"; arch = "linux-x86_64"; sha256 = "9100cdf6ba87959dfbdf756c925f6a2f35fc0c6ed453625a23eccc48f0bdf331"; }
+ { locale = "rm"; arch = "linux-x86_64"; sha256 = "9bd00e4e2634e9f922d6c1d4ef82dcba53f88fa6d7d1986037665a42109d39d2"; }
+ { locale = "rm"; arch = "linux-i686"; sha256 = "e2ca3832625efa908c6d88627960e1d98255d14095a36033cddaa50065172da0"; }
+ { locale = "ro"; arch = "linux-x86_64"; sha256 = "676120061a33c1bbbd381ea1d84b271c6e21d4a531ba776f67f7a02fd91fb99e"; }
+ { locale = "ro"; arch = "linux-i686"; sha256 = "c69d6b8a8de474e460c89ba442e25aa39fe761225f7c4b12eb1df88021a6b6c3"; }
+ { locale = "ru"; arch = "linux-x86_64"; sha256 = "5a6af10060b8ea8acd3955a4056765574873e9341e4627ddcbf9811724f5eac0"; }
+ { locale = "ru"; arch = "linux-i686"; sha256 = "92ce7cb5db9d94e291d7275b8817640c68dc061a3947317cba76ceb263a4b614"; }
+ { locale = "si"; arch = "linux-i686"; sha256 = "39849a4d38a96ebca9727b65093c36d8d50cadddcdea7ea404ee4aeff10fec0d"; }
+ { locale = "si"; arch = "linux-x86_64"; sha256 = "fa42ef419e173181166c6797e37571df6b7c25797a5caf8ca44c34b4f2faacdb"; }
+ { locale = "sk"; arch = "linux-x86_64"; sha256 = "2c9c81db8c15116e6061de0b44dcb34579ce305ca30af284cf9eac52630fef55"; }
+ { locale = "sk"; arch = "linux-i686"; sha256 = "b253607b29565169d74c491772ba2887c3e2c0dfcc3a7cedf91afa0bb073ff72"; }
+ { locale = "sl"; arch = "linux-x86_64"; sha256 = "03e7781cd0c3fef0596e55ba8a711ef8b8f300e48297ef3cad7885b2b118864f"; }
+ { locale = "sl"; arch = "linux-i686"; sha256 = "18fe799b1b675e5513ddf9edbe845bfaaafd67162e9d34250a31d0ee05bc9bba"; }
+ { locale = "sq"; arch = "linux-i686"; sha256 = "4fd1be2d2c6a703544b82bf977ea63df3e295c16c9ea97573ee57945e07639ee"; }
+ { locale = "sq"; arch = "linux-x86_64"; sha256 = "e96f7302d47897c3fc58a2777aed666aca29641500e912cee1bc59406df8e500"; }
+ { locale = "sr"; arch = "linux-x86_64"; sha256 = "ede709c9e6014edbc543511d99a61acfb0d40b796ed5ab42267ae7f8efb6583c"; }
+ { locale = "sr"; arch = "linux-i686"; sha256 = "fbfc0d476817c7076a72fd6fe2519c6a347fb062f696a8fe0c969182750d1d11"; }
+ { locale = "sv-SE"; arch = "linux-i686"; sha256 = "d30dda991111ae5bbf7252d889cef53258317d3570e56360db3d7676a8fc7602"; }
+ { locale = "sv-SE"; arch = "linux-x86_64"; sha256 = "eba61a1417ba4cb4885732d2eb621f5a385b4b433f706d52bd1b401d2298985e"; }
+ { locale = "ta-LK"; arch = "linux-i686"; sha256 = "92dc3a2aaf30c5bb16462ee7d73a5df6f8b5d2d1530f5d1fb4b90460e84dc77f"; }
+ { locale = "ta-LK"; arch = "linux-x86_64"; sha256 = "e5db15f32c819d3b0e670ac975d7afc118915abeaf4a9f0a02a5b67c490605d7"; }
+ { locale = "tr"; arch = "linux-x86_64"; sha256 = "0c689f622a0770a0b0d8f87d35513f9fbc110ca507d0b8b3bd426f763a0f77c4"; }
+ { locale = "tr"; arch = "linux-i686"; sha256 = "f49e5f3bf1b4616f52e82c480f9a4752269f393d79de2274fc0562cfe9fef1ea"; }
+ { locale = "uk"; arch = "linux-x86_64"; sha256 = "06100c2a82b3c31ea85f1f1d8856db62f2a73142fd1263e3db5df679f8843d8f"; }
+ { locale = "uk"; arch = "linux-i686"; sha256 = "8358a935935215fea5eb75c69cf63bb5fc5c22bcce76939cfb804f3ee9f89e54"; }
+ { locale = "vi"; arch = "linux-i686"; sha256 = "16a0f71efcf71640234501e3c8a3bd1befe15e1bb0bacc83ff590d6c780a0e5b"; }
+ { locale = "vi"; arch = "linux-x86_64"; sha256 = "d5d0371ade5603cb725d6677983df037da06acb13207550b8a1a88c2948e992b"; }
+ { locale = "zh-CN"; arch = "linux-x86_64"; sha256 = "287b1fda3bb2d8d27ea22ea4c8c21d7ee0b3a5d439ea32e72dfc882fd64c5765"; }
+ { locale = "zh-CN"; arch = "linux-i686"; sha256 = "3bddd9f4e742ad80bb6d35f3db8ea50cd496ad1be06003e67b4fcc290945bab8"; }
+ { locale = "zh-TW"; arch = "linux-x86_64"; sha256 = "5a5cb16f45d1c3ccd9e0fd0b21a7b55e90b49f0b37cd550bd89cb6c00d92046c"; }
+ { locale = "zh-TW"; arch = "linux-i686"; sha256 = "aea52fd5f8d8d5b720e1fde907b9a7b7638b384b71d01295b08749df06c578bc"; }
+ ];
+
+ arch = if stdenv.system == "i686-linux"
+ then "linux-i686"
+ else "linux-x86_64";
+
+ isPrefixOf = prefix: string:
+ builtins.substring 0 (builtins.stringLength prefix) string == prefix;
+
+ sourceMatches = locale: source:
+ (isPrefixOf source.locale locale) && source.arch == arch;
+
+ systemLocale = config.i18n.defaultLocale or "en-US";
+
+ defaultSource = stdenv.lib.findFirst (sourceMatches "en-US") {} sources;
+
+ source = stdenv.lib.findFirst (sourceMatches systemLocale) defaultSource sources;
+
+in
+
+stdenv.mkDerivation {
+ name = "thunderbird-bin-${version}";
+
+ src = fetchurl {
+ url = "http://download-installer.cdn.mozilla.net/pub/thunderbird/releases/${version}/${source.arch}/${source.locale}/thunderbird-${version}.tar.bz2";
+ inherit (source) sha256;
+ };
+
+ phases = "unpackPhase installPhase";
+
+ libPath = stdenv.lib.makeLibraryPath
+ [ stdenv.gcc.gcc
+ gconf
+ alsaLib
+ at_spi2_atk
+ atk
+ cairo
+ cups
+ curl
+ dbus_glib
+ dbus_libs
+ fontconfig
+ freetype
+ gdk_pixbuf
+ glib
+ glibc
+ gst_plugins_base
+ gstreamer
+ gtk
+ kerberos
+ libX11
+ libXScrnSaver
+ libXext
+ libXinerama
+ libXrender
+ libXt
+ libcanberra
+ libgnome
+ libgnomeui
+ mesa
+ nspr
+ nss
+ pango
+ ] + ":" + stdenv.lib.makeSearchPath "lib64" [
+ stdenv.gcc.gcc
+ ];
+
+ installPhase =
+ ''
+ mkdir -p "$prefix/usr/lib/thunderbird-bin-${version}"
+ cp -r * "$prefix/usr/lib/thunderbird-bin-${version}"
+
+ mkdir -p "$out/bin"
+ ln -s "$prefix/usr/lib/thunderbird-bin-${version}/thunderbird" "$out/bin/"
+
+ for executable in \
+ thunderbird mozilla-xremote-client thunderbird-bin plugin-container \
+ updater
+ do
+ patchelf --interpreter "$(cat $NIX_GCC/nix-support/dynamic-linker)" \
+ "$out/usr/lib/thunderbird-bin-${version}/$executable"
+ done
+
+ for executable in \
+ thunderbird mozilla-xremote-client thunderbird-bin plugin-container \
+ updater libxul.so
+ do
+ patchelf --set-rpath "$libPath" \
+ "$out/usr/lib/thunderbird-bin-${version}/$executable"
+ done
+
+ # Create a desktop item.
+ mkdir -p $out/share/applications
+ cat > $out/share/applications/thunderbird.desktop < $out/bin/teamviewer << EOF
#!${bash}/bin/sh
+ # Teamviewer puts symlinks to nix store paths in ~/.teamviewer. When those
+ # paths become garbage collected, teamviewer crashes upon start because of
+ # those broken symlinks. An easy workaround to this behaviour is simply to
+ # delete all symlinks before we start teamviewer. Teamviewer will fixup the
+ # symlinks, just like it did the first time the user ran it.
+ ${findutils}/bin/find "\$HOME"/.teamviewer/*/*/"Program Files/TeamViewer/" -type l -print0 | ${findutils}/bin/xargs -0 ${coreutils}/bin/rm
+
export LD_LIBRARY_PATH=${toldpath}\''${LD_LIBRARY_PATH:+:\$LD_LIBRARY_PATH}
export PATH=${topath}\''${PATH:+:\$PATH}
$out/share/teamviewer/wrapper wine "c:\Program Files\TeamViewer\Version7\TeamViewer.exe" "\$@"
diff --git a/pkgs/applications/networking/sniffers/wireshark/default.nix b/pkgs/applications/networking/sniffers/wireshark/default.nix
index ed2ce4c12c0..256681ec54e 100644
--- a/pkgs/applications/networking/sniffers/wireshark/default.nix
+++ b/pkgs/applications/networking/sniffers/wireshark/default.nix
@@ -17,6 +17,10 @@ stdenv.mkDerivation {
geoip libnl c-ares gtk python
];
+ preConfigure = ''
+ sed -re 's/g_memmove/memmove/' -i $(grep -rl g_memmove .)
+ '';
+
configureFlags = "--disable-usr-local --disable-silent-rules --with-gtk2 --without-gtk3 --without-qt --with-ssl";
desktopItem = makeDesktopItem {
diff --git a/pkgs/applications/networking/sync/rsync/default.nix b/pkgs/applications/networking/sync/rsync/default.nix
index 5447b21009f..5265faf87b6 100644
--- a/pkgs/applications/networking/sync/rsync/default.nix
+++ b/pkgs/applications/networking/sync/rsync/default.nix
@@ -6,16 +6,17 @@
assert enableACLs -> acl != null;
stdenv.mkDerivation rec {
- name = "rsync-3.0.9";
+ name = "rsync-${version}";
+ version = "3.1.0";
mainSrc = fetchurl {
- url = http://rsync.samba.org/ftp/rsync/src/rsync-3.0.9.tar.gz;
- sha256 = "01bw4klqsrlhh3i9lazd485sd9qx5djvnwa21lj2h3a9sn6hzw9h";
+ url = "http://rsync.samba.org/ftp/rsync/src/rsync-${version}.tar.gz";
+ sha256 = "0kirw8wglqvwi1v8bwxp373g03xg857h59j5k3mmgff9gzvj7jl1";
};
patchesSrc = fetchurl {
- url = http://rsync.samba.org/ftp/rsync/rsync-patches-3.0.9.tar.gz;
- sha256 = "0c1e9b56e99667dfc47641124460bac61a04c5d2ee89f575c6bc78c7a69005a9";
+ url = "http://rsync.samba.org/ftp/rsync/rsync-patches-${version}.tar.gz";
+ sha256 = "0sl8aadpjblvbb05vgais40z90yzhr09rwz0cykjdiv452gli75p";
};
srcs = [mainSrc] ++ stdenv.lib.optional enableCopyDevicesPatch patchesSrc;
@@ -30,6 +31,6 @@ stdenv.mkDerivation rec {
license = stdenv.lib.licenses.gpl3Plus;
platforms = stdenv.lib.platforms.unix;
- maintainers = [ stdenv.lib.maintainers.simons ];
+ maintainers = [ stdenv.lib.maintainers.simons stdenv.lib.maintainers.emery ];
};
}
diff --git a/pkgs/applications/networking/syncthing/default.nix b/pkgs/applications/networking/syncthing/default.nix
new file mode 100644
index 00000000000..50bc61eeeff
--- /dev/null
+++ b/pkgs/applications/networking/syncthing/default.nix
@@ -0,0 +1,51 @@
+{ stdenv, fetchurl, fetchgit, go }:
+
+stdenv.mkDerivation rec {
+ name = "syncthing-${version}";
+ version = "0.7.1";
+
+ src = fetchgit {
+ url = "git://github.com/calmh/syncthing.git";
+ rev = "refs/tags/v${version}";
+ sha256 = "1rja837kimiq15km8cridbm5yxvkm6mkvkwywdi76qf9rm0pcjl1";
+ };
+
+ buildInputs = [ go ];
+
+ buildPhase = ''
+ mkdir -p "./dependencies/src/github.com/calmh/syncthing"
+
+ cp -r "./auto" "./dependencies/src/github.com/calmh/syncthing"
+ cp -r "./buffers" "./dependencies/src/github.com/calmh/syncthing"
+ cp -r "./cid" "./dependencies/src/github.com/calmh/syncthing"
+ cp -r "./discover" "./dependencies/src/github.com/calmh/syncthing"
+ cp -r "./files" "./dependencies/src/github.com/calmh/syncthing"
+ cp -r "./lamport" "./dependencies/src/github.com/calmh/syncthing"
+ cp -r "./protocol" "./dependencies/src/github.com/calmh/syncthing"
+ cp -r "./scanner" "./dependencies/src/github.com/calmh/syncthing"
+ cp -r "./mc" "./dependencies/src/github.com/calmh/syncthing"
+ cp -r "./xdr" "./dependencies/src/github.com/calmh/syncthing"
+
+ export GOPATH="`pwd`/Godeps/_workspace:`pwd`/dependencies"
+
+ go test -cpu=1,2,4 ./...
+
+ mkdir ./bin
+
+ go build -o ./bin/syncthing -ldflags "-w -X main.Version v${version}" ./cmd/syncthing
+ go build -o ./bin/stcli -ldflags "-w -X main.Version v${version}" ./cmd/stcli
+ '';
+
+ installPhase = ''
+ ensureDir $out/bin
+ cp -r ./bin $out
+ '';
+
+ meta = {
+ homepage = http://syncthing.net/;
+ description = "Syncthing replaces Dropbox and BitTorrent Sync with something open, trustworthy and decentralized";
+ license = with stdenv.lib.licenses; mit;
+ maintainers = with stdenv.lib.maintainers; [ matejc ];
+ platforms = with stdenv.lib.platforms; linux;
+ };
+}
diff --git a/pkgs/applications/office/gnumeric/default.nix b/pkgs/applications/office/gnumeric/default.nix
index 0ae27e322b7..014aa5bf0fd 100644
--- a/pkgs/applications/office/gnumeric/default.nix
+++ b/pkgs/applications/office/gnumeric/default.nix
@@ -20,9 +20,12 @@ stdenv.mkDerivation rec {
goffice gtk3 makeWrapper
];
- postInstall = ''
- wrapProgram "$out"/bin/gnumeric-* \
- --prefix XDG_DATA_DIRS : "${gtk3}/share:${gnome_icon_theme}/share"
+ preFixup = ''
+ for f in "$out"/bin/gnumeric-*; do
+ wrapProgram $f \
+ --prefix XDG_DATA_DIRS : "$XDG_ICON_DIRS:$GSETTINGS_SCHEMAS_PATH"
+ done
+ rm $out/share/icons/hicolor/icon-theme.cache
'';
meta = with stdenv.lib; {
diff --git a/pkgs/applications/office/ledger/3.0.nix b/pkgs/applications/office/ledger/3.0.nix
index 1afa3a979e3..44cf87b7929 100644
--- a/pkgs/applications/office/ledger/3.0.nix
+++ b/pkgs/applications/office/ledger/3.0.nix
@@ -1,21 +1,21 @@
-{ stdenv, fetchgit, cmake, boost, gmp, mpfr, libedit, python, texinfo }:
+{ stdenv, fetchgit, cmake, boost, gmp, mpfr, libedit, python
+, texinfo, gnused }:
let
- rev = "3b5f496536";
+ rev = "a0c5addbbd";
in
+
stdenv.mkDerivation {
- name = "ledger3-2013.12.${rev}";
+ name = "ledger-3.0.2.${rev}";
src = fetchgit {
- url = "https://github.com/ledger/ledger.git";
+ url = "git://github.com/ledger/ledger.git";
inherit rev;
- sha256 = "0r36zsdsyy6aylfcwyqra4796y4abi3b27wv5fvk3g2bmyzqzx4j";
+ sha256 = "1yr4i8gpby67j4vl7xk109dwb14z8a424nwgva8rbms8115w4ps5";
};
- buildInputs = [ cmake boost gmp mpfr libedit python texinfo ];
+ buildInputs = [ cmake boost gmp mpfr libedit python texinfo gnused ];
- # Tests on Darwin are failing
- doCheck = !stdenv.isDarwin;
enableParallelBuilding = true;
# Skip byte-compiling of emacs-lisp files because this is currently
@@ -38,6 +38,6 @@ stdenv.mkDerivation {
'';
platforms = stdenv.lib.platforms.all;
- maintainers = with stdenv.lib.maintainers; [ simons the-kenny ];
+ maintainers = with stdenv.lib.maintainers; [ simons the-kenny jwiegley ];
};
}
diff --git a/pkgs/applications/science/logic/boolector/default.nix b/pkgs/applications/science/logic/boolector/default.nix
new file mode 100644
index 00000000000..3879ee8ef47
--- /dev/null
+++ b/pkgs/applications/science/logic/boolector/default.nix
@@ -0,0 +1,47 @@
+{ stdenv, fetchurl, zlib, useV16 ? false }:
+
+let
+ v15 = rec {
+ name = "boolector-${version}";
+ version = "1.5.118";
+ src = fetchurl {
+ url = "http://fmv.jku.at/boolector/${name}-with-sat-solvers.tar.gz";
+ sha256 = "17j7q02rryvfwgvglxnhx0kv8hxwy8wbhzawn48lw05i98vxlmk9";
+ };
+ };
+
+ v16 = rec {
+ name = "boolector-${version}";
+ version = "1.6.0";
+ src = fetchurl {
+ url = "http://fmv.jku.at/boolector/${name}-with-sat-solvers.tar.gz";
+ sha256 = "0jka4r6bc3i24axgdp6qbq6gjadwz9kvi11s2c5sbwmdnjd7cp85";
+ };
+ };
+
+ boolectorPkg = if useV16 then v16 else v15;
+ license = with stdenv.lib.licenses; if useV16 then unfreeRedistributable else gpl3;
+in
+stdenv.mkDerivation (boolectorPkg // {
+ buildInputs = [ zlib ];
+ enableParallelBuilding = false;
+
+ buildPhase = "./build.sh";
+
+ installPhase = ''
+ mkdir -p $out/bin $out/lib $out/include
+ cp boolector/boolector $out/bin
+ cp boolector/deltabtor $out/bin
+ cp boolector/synthebtor $out/bin
+ cp boolector/libboolector.a $out/lib
+ cp boolector/boolector.h $out/include
+ '';
+
+ meta = {
+ inherit license;
+ description = "An extremely fast SMT solver for bit-vectors and arrays";
+ homepage = "http://fmv.jku.at/boolector";
+ platforms = stdenv.lib.platforms.linux;
+ maintainers = [ stdenv.lib.maintainers.thoughtpolice ];
+ };
+})
diff --git a/pkgs/applications/science/math/R/default.nix b/pkgs/applications/science/math/R/default.nix
index 88f4653cf7b..4a58c15941c 100644
--- a/pkgs/applications/science/math/R/default.nix
+++ b/pkgs/applications/science/math/R/default.nix
@@ -5,11 +5,11 @@
}:
stdenv.mkDerivation rec {
- name = "R-3.0.3";
+ name = "R-3.1.0";
src = fetchurl {
url = "http://cran.r-project.org/src/base/R-3/${name}.tar.gz";
- sha256 = "1mp6zp25nycn8bxnnq97gq6n21c6vprm6qc4drwap57j82azsz5r";
+ sha256 = "1qjzbw341bvi1h4jwbvdkvq8j0z9l3m85mpgrlfw0n2cz2806s4a";
};
buildInputs = [ blas bzip2 gfortran liblapack libX11 libXmu libXt
diff --git a/pkgs/applications/science/math/maxima/default.nix b/pkgs/applications/science/math/maxima/default.nix
index 684ac321900..7123b476f35 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.32.1";
+ version = "5.33.0";
searchPath =
stdenv.lib.makeSearchPath "bin"
@@ -13,7 +13,7 @@ stdenv.mkDerivation {
src = fetchurl {
url = "mirror://sourceforge/${name}/${name}-${version}.tar.gz";
- sha256 = "0krxha1jckgw5s52bjasf7bnkcnq81qyi2k1bcglgqzfp79b44gw";
+ sha256 = "13axm11xw0f3frx5b0qdidi7igkn1524fzz77s9rbpl2yy2nrbz2";
};
buildInputs = [sbcl texinfo perl makeWrapper];
diff --git a/pkgs/applications/science/misc/megam/default.nix b/pkgs/applications/science/misc/megam/default.nix
new file mode 100644
index 00000000000..a0ee505dc97
--- /dev/null
+++ b/pkgs/applications/science/misc/megam/default.nix
@@ -0,0 +1,46 @@
+{ fetchurl, stdenv, ocaml, makeWrapper, ncurses }:
+
+let version = "0.92"; in
+stdenv.mkDerivation rec {
+ name = "megam-${version}";
+
+ src = fetchurl {
+ url = "http://hal3.name/megam/megam_src.tgz";
+ sha256 = "dc0e9f59ff8513449fe3bd40b260141f89c88a4edf6ddc8b8a394c758e49724e";
+ };
+
+ patches = [ ./ocaml-includes.patch ./ocaml-3.12.patch ];
+
+ buildInputs = [ ocaml ncurses ];
+
+ nativeBuildInputs = [ makeWrapper ];
+
+ makeFlags = "CAML_INCLUDES=${ocaml}/lib/ocaml/caml";
+
+ # see https://bugzilla.redhat.com/show_bug.cgi?id=435559
+ dontStrip = true;
+
+ installPhase = ''
+ mkdir -pv $out/bin
+ cp -Rv megam $out/bin
+ '';
+
+
+ meta = {
+ description = "MEGA Model Optimization Package";
+
+ longDescription =
+ '' The software here is an implementation of maximum likelihood
+ and maximum a posterior optimization of the parameters of
+ these models. The algorithms used are much more efficient
+ than the iterative scaling techniques used in almost every
+ other maxent package out there. '';
+
+ homepage = http://www.umiacs.umd.edu/~hal/megam;
+
+ license = "non-commercial";
+
+ maintainers = [ ];
+ platforms = stdenv.lib.platforms.gnu; # arbitrary choice
+ };
+}
diff --git a/pkgs/applications/science/misc/megam/ocaml-3.12.patch b/pkgs/applications/science/misc/megam/ocaml-3.12.patch
new file mode 100644
index 00000000000..8265acf6e4a
--- /dev/null
+++ b/pkgs/applications/science/misc/megam/ocaml-3.12.patch
@@ -0,0 +1,12 @@
+diff -ru megam_0.92/Makefile megam_0.92-b/Makefile
+--- megam_0.92/Makefile 2007-10-08 18:06:04.000000000 +0100
++++ megam_0.92-b/Makefile 2013-11-25 10:14:20.000000000 +0000
+@@ -59,7 +59,7 @@
+
+ WITHUNIX =unix.cma -cclib -lunix
+
+-WITHSTR =str.cma -cclib -lstr
++WITHSTR =str.cma -cclib -lcamlstr
+
+ WITHBIGARRAY =bigarray.cma -cclib -lbigarray
+
diff --git a/pkgs/applications/science/misc/megam/ocaml-includes.patch b/pkgs/applications/science/misc/megam/ocaml-includes.patch
new file mode 100644
index 00000000000..b3a56643448
--- /dev/null
+++ b/pkgs/applications/science/misc/megam/ocaml-includes.patch
@@ -0,0 +1,21 @@
+diff -ru megam_0.92/Makefile megam_0.92-b/Makefile
+--- megam_0.92/Makefile 2007-10-08 18:06:04.000000000 +0100
++++ megam_0.92-b/Makefile 2013-11-25 10:14:20.000000000 +0000
+@@ -41,7 +41,7 @@
+ #
+ # The Caml compilers. #
+ # You may fix here the path to access the Caml compiler on your machine
+-CAMLC = ocamlc -g
++CAMLC = ocamlc -g $(WITHCLIBS)
+ CAMLOPT = ocamlopt -unsafe -ccopt -O4 -ccopt -ffast-math -inline 99999
+ CAMLDEP = ocamldep
+ CAMLLEX = ocamllex
+@@ -70,7 +70,7 @@
+ WITHDBM =dbm.cma -cclib -lmldbm -cclib -lndbm
+
+ #WITHCLIBS =-I /usr/lib/ocaml/3.09.2/caml
+-WITHCLIBS =-I /usr/lib/ocaml/caml
++WITHCLIBS =-I $(CAML_INCLUDES)
+
+ ################ End of user's variables #####################
+
diff --git a/pkgs/applications/version-management/git-and-tools/cgit/default.nix b/pkgs/applications/version-management/git-and-tools/cgit/default.nix
index 8a1201815ae..47fa80cb901 100644
--- a/pkgs/applications/version-management/git-and-tools/cgit/default.nix
+++ b/pkgs/applications/version-management/git-and-tools/cgit/default.nix
@@ -4,7 +4,8 @@
}:
stdenv.mkDerivation rec {
- name = "cgit-0.10.1";
+ name = "cgit-${version}";
+ version = "0.10.1";
src = fetchurl {
url = "http://git.zx2c4.com/cgit/snapshot/${name}.tar.xz";
@@ -15,9 +16,11 @@ stdenv.mkDerivation rec {
# The cgit-0.10 Makefile has GIT_VER = 1.8.5, so use that version.
# IMPORTANT: Remember to check which git version cgit needs on every version
# bump.
+ # NOTE: as of 0.10.1, the git version is compatible from 1.9.0 to
+ # 1.9.2 (see the repository history)
gitSrc = fetchurl {
- url = https://git-core.googlecode.com/files/git-1.8.5.tar.gz;
- sha256 = "08vbq8y3jx1da417hkqmrkdkysac1sqjvrjmaj1v56dmkghm43w7";
+ url = "https://www.kernel.org/pub/software/scm/git/git-1.9.2.tar.xz";
+ sha256 = "1x4rb06vw4ckdflmn01r5l9spvn7cng4i5mm3sbd0n8cz0n6xz13";
};
buildInputs = [
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 d64230aa50d..dcf76160ec6 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
@@ -1,9 +1,9 @@
{ cabal, aeson, async, blazeBuilder, bloomfilter, bup, byteable
, caseInsensitive, clientsession, cryptoApi, cryptohash, curl
, dataDefault, dataenc, DAV, dbus, dlist, dns, editDistance
-, extensibleExceptions, feed, filepath, git, gnupg1, gnutls, hamlet
-, hinotify, hS3, hslogger, HTTP, httpClient, httpConduit, httpTypes
-, IfElse, json, liftedBase, lsof, MissingH
+, extensibleExceptions, fdoNotify, feed, filepath, git, gnupg1
+, gnutls, hamlet, hinotify, hS3, hslogger, HTTP, httpClient
+, httpConduit, httpTypes, IfElse, json, liftedBase, lsof, MissingH
, MonadCatchIOTransformers, monadControl, mtl, network
, networkConduit, networkInfo, networkMulticast
, networkProtocolXmpp, openssh, optparseApplicative, perl
@@ -16,16 +16,16 @@
cabal.mkDerivation (self: {
pname = "git-annex";
- version = "5.20140320";
- sha256 = "0jhg5nbvdsiaprpj4h57fpfskhx0nqva4yx6krfd90i9gwgkm8l5";
+ version = "5.20140405";
+ sha256 = "0nbfnv9z2jhx2jr2nma0y1znvbaa09rv1drl6wk27j6xsbiq3p3k";
isLibrary = false;
isExecutable = true;
buildDepends = [
aeson async blazeBuilder bloomfilter byteable caseInsensitive
clientsession cryptoApi cryptohash dataDefault dataenc DAV dbus
- dlist dns editDistance extensibleExceptions feed filepath gnutls
- hamlet hinotify hS3 hslogger HTTP httpClient httpConduit httpTypes
- IfElse json liftedBase MissingH MonadCatchIOTransformers
+ dlist dns editDistance extensibleExceptions fdoNotify feed filepath
+ gnutls hamlet hinotify hS3 hslogger HTTP httpClient httpConduit
+ httpTypes IfElse json liftedBase MissingH MonadCatchIOTransformers
monadControl mtl network networkConduit networkInfo
networkMulticast networkProtocolXmpp optparseApplicative QuickCheck
random regexTdfa SafeSemaphore securemem SHA stm tasty tastyHunit
diff --git a/pkgs/applications/version-management/git-and-tools/git/cert-path.patch b/pkgs/applications/version-management/git-and-tools/git/cert-path.patch
new file mode 100644
index 00000000000..846752f5bfe
--- /dev/null
+++ b/pkgs/applications/version-management/git-and-tools/git/cert-path.patch
@@ -0,0 +1,12 @@
+diff -ru -x '*~' git-1.9.2-orig/git-send-email.perl git-1.9.2/git-send-email.perl
+--- git-1.9.2-orig/git-send-email.perl 2014-04-09 21:09:34.000000000 +0200
++++ git-1.9.2/git-send-email.perl 2014-04-16 18:35:05.861132282 +0200
+@@ -1094,6 +1094,8 @@
+ return;
+ }
+
++ $smtp_ssl_cert_path //= $ENV{'OPENSSL_X509_CERT_FILE'};
++
+ if (!defined $smtp_ssl_cert_path) {
+ # use the OpenSSL defaults
+ return (SSL_verify_mode => SSL_VERIFY_PEER());
diff --git a/pkgs/applications/version-management/git-and-tools/git/default.nix b/pkgs/applications/version-management/git-and-tools/git/default.nix
index 9be32b9accd..861030bae99 100644
--- a/pkgs/applications/version-management/git-and-tools/git/default.nix
+++ b/pkgs/applications/version-management/git-and-tools/git/default.nix
@@ -10,7 +10,7 @@
let
- version = "1.9.1";
+ version = "1.9.2";
svn = subversionClient.override { perlBindings = true; };
@@ -21,10 +21,10 @@ stdenv.mkDerivation {
src = fetchurl {
url = "https://www.kernel.org/pub/software/scm/git/git-${version}.tar.xz";
- sha256 = "0yx7qf9hqgfvrliqvk775pw3zh982nx5r16iw7n997q4ik7gnqpr";
+ sha256 = "1x4rb06vw4ckdflmn01r5l9spvn7cng4i5mm3sbd0n8cz0n6xz13";
};
- patches = [ ./docbook2texi.patch ./symlinks-in-bin.patch ];
+ patches = [ ./docbook2texi.patch ./symlinks-in-bin.patch ./cert-path.patch ];
buildInputs = [curl openssl zlib expat gettext cpio makeWrapper]
++ stdenv.lib.optionals withManual [ asciidoc texinfo xmlto docbook2x
@@ -36,7 +36,9 @@ stdenv.mkDerivation {
makeFlags = "prefix=\${out} sysconfdir=/etc/ PERL_PATH=${perl}/bin/perl SHELL_PATH=${stdenv.shell} "
+ (if pythonSupport then "PYTHON_PATH=${python}/bin/python" else "NO_PYTHON=1")
- + (if stdenv.isSunOS then " INSTALL=install NO_INET_NTOP= NO_INET_PTON=" else "");
+ + (if stdenv.isSunOS then " INSTALL=install NO_INET_NTOP= NO_INET_PTON=" else "")
+ + (if stdenv.isDarwin then " NO_APPLE_COMMON_CRYPTO=1" else "");
+
# FIXME: "make check" requires Sparse; the Makefile must be tweaked
# so that `SPARSE_FLAGS' corresponds to the current architecture...
@@ -47,8 +49,7 @@ stdenv.mkDerivation {
postInstall =
''
notSupported() {
- echo -e "#\!/bin/sh\necho '`basename $1` not supported, $2'\nexit 1" > "$1"
- chmod +x $1
+ unlink $1 || true
}
# Install git-subtree.
@@ -94,7 +95,7 @@ stdenv.mkDerivation {
--set GITPERLLIB "$gitperllib" \
--prefix PATH : "${svn}/bin" ''
else '' # replace git-svn by notification script
- notSupported $out/libexec/git-core/git-svn "reinstall with config git = { svnSupport = true } set"
+ notSupported $out/libexec/git-core/git-svn
'')
+ (if sendEmailSupport then
@@ -106,7 +107,7 @@ stdenv.mkDerivation {
wrapProgram $out/libexec/git-core/git-send-email \
--set GITPERLLIB "$gitperllib" ''
else '' # replace git-send-email by notification script
- notSupported $out/libexec/git-core/git-send-email "reinstall with config git = { sendEmailSupport = true } set"
+ notSupported $out/libexec/git-core/git-send-email
'')
+ stdenv.lib.optionalString withManual ''# Install man pages and Info manual
@@ -123,8 +124,7 @@ stdenv.mkDerivation {
'' else ''
# Don't wrap Tcl/Tk, replace them by notification scripts
for prog in bin/gitk libexec/git-core/git-gui; do
- notSupported "$out/$prog" \
- "reinstall with config git = { guiSupport = true; } set"
+ notSupported "$out/$prog"
done
'');
diff --git a/pkgs/applications/version-management/git-and-tools/stgit/default.nix b/pkgs/applications/version-management/git-and-tools/stgit/default.nix
index 6518f32ef7c..d4b74390c4c 100644
--- a/pkgs/applications/version-management/git-and-tools/stgit/default.nix
+++ b/pkgs/applications/version-management/git-and-tools/stgit/default.nix
@@ -1,14 +1,14 @@
{ stdenv, fetchurl, python, git }:
let
- name = "stgit-0.16";
+ name = "stgit-0.17.1";
in
stdenv.mkDerivation {
inherit name;
src = fetchurl {
url = "http://download.gna.org/stgit/${name}.tar.gz";
- sha256 = "0hla6401g2kicaakz4awk67yf8fhqbw1shn1p9ma5x6ca29s3w82";
+ sha256 = "1pka0ns9x0kabn036zsf0mwmwiynckhnva51kgxsch9fqah6acyl";
};
buildInputs = [ python git ];
diff --git a/pkgs/applications/version-management/git-and-tools/svn2git/default.nix b/pkgs/applications/version-management/git-and-tools/svn2git/default.nix
index 0053a1dfafb..b0cfcaeb110 100644
--- a/pkgs/applications/version-management/git-and-tools/svn2git/default.nix
+++ b/pkgs/applications/version-management/git-and-tools/svn2git/default.nix
@@ -1,14 +1,14 @@
{ stdenv, fetchurl, ruby, makeWrapper, git }:
let
- version = "2.2.2";
+ version = "2.2.5";
in
stdenv.mkDerivation {
name = "svn2git-${version}";
src = fetchurl {
url = "https://github.com/nirvdrum/svn2git/archive/v${version}.tar.gz";
- sha256 = "14zinkpgybz15jvbfw0sb432w6f5w4sa5pdqycjwva8v8lxqn9mh";
+ sha256 = "1afmrr80357pg3kawyghhc55z1pszaq8fyrrjmxa6nr9dcrqjwwh";
};
buildInputs = [ ruby makeWrapper ];
diff --git a/pkgs/applications/version-management/git-and-tools/tig/default.nix b/pkgs/applications/version-management/git-and-tools/tig/default.nix
index 23009efdbd5..fd9011130e3 100644
--- a/pkgs/applications/version-management/git-and-tools/tig/default.nix
+++ b/pkgs/applications/version-management/git-and-tools/tig/default.nix
@@ -26,6 +26,6 @@ stdenv.mkDerivation rec {
description = "Text-mode interface for git";
maintainers = with maintainers; [ garbas bjornfor iElectric ];
license = licenses.gpl2;
- platforms = platforms.linux;
+ platforms = platforms.unix;
};
}
diff --git a/pkgs/applications/version-management/mercurial/default.nix b/pkgs/applications/version-management/mercurial/default.nix
index 609e2654d59..5fdafe8ac2a 100644
--- a/pkgs/applications/version-management/mercurial/default.nix
+++ b/pkgs/applications/version-management/mercurial/default.nix
@@ -2,7 +2,7 @@
, guiSupport ? false, tk ? null, curses }:
let
- name = "mercurial-2.9.1";
+ name = "mercurial-2.9.2";
in
stdenv.mkDerivation {
@@ -10,7 +10,7 @@ stdenv.mkDerivation {
src = fetchurl {
url = "http://mercurial.selenic.com/release/${name}.tar.gz";
- sha256 = "06n07di6cf57bglnbh8szimngclyvf9c5ismz470gnyb9r1v23x2";
+ sha256 = "0lwgncim4cy91ly8389h2bbhl4nbi8xjgp0kx37kgq8q2lx2nil6";
};
inherit python; # pass it so that the same version can be used in hg2git
diff --git a/pkgs/applications/video/avidemux/default.nix b/pkgs/applications/video/avidemux/default.nix
index d706d16241c..485d8c54eb3 100644
--- a/pkgs/applications/video/avidemux/default.nix
+++ b/pkgs/applications/video/avidemux/default.nix
@@ -1,20 +1,23 @@
{stdenv, fetchurl, cmake, pkgconfig, libxml2, qt4, gtk, gettext, SDL,
libXv, pixman, libpthreadstubs, libXau, libXdmcp, libxslt, x264,
-alsaLib, lame, faac, faad2, libvorbis, yasm, libvpx, xvidcore, libva }:
+alsaLib, lame, faad2, libvorbis, yasm, libvpx, xvidcore, libva,
+faac ? null, faacSupport ? false }:
assert stdenv ? glibc;
+assert faacSupport -> faac != null;
stdenv.mkDerivation {
name = "avidemux-2.5.6";
-
+
src = fetchurl {
url = mirror://sourceforge/avidemux/avidemux_2.5.6.tar.gz;
sha256 = "12wvxz0n2g85f079d8mdkkp2zm279d34m9v7qgcqndh48cn7znnn";
};
-
+
buildInputs = [ cmake pkgconfig libxml2 qt4 gtk gettext SDL libXv
- pixman libpthreadstubs libXau libXdmcp libxslt x264 alsaLib
- lame faac faad2 libvorbis yasm libvpx xvidcore libva ];
+ pixman libpthreadstubs libXau libXdmcp libxslt x264 alsaLib
+ lame faad2 libvorbis yasm libvpx xvidcore libva
+ ] ++ stdenv.lib.optional faacSupport faac;
cmakeFlags = "-DPTHREAD_INCLUDE_DIR=${stdenv.glibc}/include" +
" -DGETTEXT_INCLUDE_DIR=${gettext}/include" +
@@ -34,7 +37,7 @@ stdenv.mkDerivation {
make install
'';
- meta = {
+ meta = {
homepage = http://fixounet.free.fr/avidemux/;
description = "Free video editor designed for simple video editing tasks";
maintainers = with stdenv.lib.maintainers; [viric];
diff --git a/pkgs/applications/video/miro/default.nix b/pkgs/applications/video/miro/default.nix
index 14aeca62a71..528eeff7e23 100644
--- a/pkgs/applications/video/miro/default.nix
+++ b/pkgs/applications/video/miro/default.nix
@@ -1,7 +1,7 @@
{ stdenv, fetchurl, python, buildPythonPackage, pythonPackages, pkgconfig
-, pyrex096, ffmpeg, boost, glib, pygobject, gtk2, webkit_gtk2, libsoup, pygtk
+, pyrex096, ffmpeg, boost, glib, pygobject, gtk2, webkitgtk2, libsoup, pygtk
, taglib, pysqlite, pycurl, mutagen, pycairo, pythonDBus, pywebkitgtk
-, libtorrentRasterbar
+, libtorrentRasterbar, glib_networking, gsettings_desktop_schemas
, gst_python, gst_plugins_base, gst_plugins_good, gst_ffmpeg
}:
@@ -22,9 +22,6 @@ buildPythonPackage rec {
patches = [ ./gconf.patch ];
postPatch = ''
- sed -i -e '2i import os; os.environ["GST_PLUGIN_PATH"] = \\\
- '"'$GST_PLUGIN_PATH'" miro.real
-
sed -i -e 's/\$(shell which python)/python/' Makefile
sed -i -e 's|/usr/bin/||' -e 's|/usr||' \
-e 's/BUILD_TIME[^,]*/BUILD_TIME=0/' setup.py
@@ -55,10 +52,14 @@ buildPythonPackage rec {
postInstall = ''
mv "$out/bin/miro.real" "$out/bin/miro"
+ wrapProgram "$out/bin/miro" \
+ --prefix GST_PLUGIN_SYSTEM_PATH : "$GST_PLUGIN_SYSTEM_PATH" \
+ --prefix GIO_EXTRA_MODULES : "${glib_networking}/lib/gio/modules" \
+ --prefix XDG_DATA_DIRS : "${gsettings_desktop_schemas}/share:$out/share"
'';
buildInputs = [
- pkgconfig pyrex096 ffmpeg boost glib pygobject gtk2 webkit_gtk2 libsoup
+ pkgconfig pyrex096 ffmpeg boost glib pygobject gtk2 webkitgtk2 libsoup
pygtk taglib
];
diff --git a/pkgs/applications/video/mpv/default.nix b/pkgs/applications/video/mpv/default.nix
index f059472aa9b..b37a8a87630 100644
--- a/pkgs/applications/video/mpv/default.nix
+++ b/pkgs/applications/video/mpv/default.nix
@@ -52,7 +52,7 @@ let
sha256 = "03cc750049350ee01cdbc584b70924e333fcc17ba4a2d04648dab1535538a873";
};
- version = "0.3.2";
+ version = "0.3.7";
in
@@ -61,7 +61,7 @@ stdenv.mkDerivation rec {
src = fetchurl {
url = "https://github.com/mpv-player/mpv/archive/v${version}.tar.gz";
- sha256 = "1vzdhzry2adyp2yh2dmy1qznqhnzar7g24rhi0vv624jgd20qax2";
+ sha256 = "1qmwmjvgdwh88l2caw2xy1d2h1cdg2w1hl4q5iwx2c0q7a99h41m";
};
buildInputs = with stdenv.lib;
diff --git a/pkgs/applications/video/pitivi/default.nix b/pkgs/applications/video/pitivi/default.nix
index 947d2517808..7f53aa07db6 100644
--- a/pkgs/applications/video/pitivi/default.nix
+++ b/pkgs/applications/video/pitivi/default.nix
@@ -1,7 +1,7 @@
{ stdenv, fetchurl, pkgconfig, intltool, itstool, makeWrapper
, pythonPackages, gst, clutter-gst, clutter-gtk
, gobjectIntrospection, clutter, gtk3, librsvg
-, gnome_icon_theme, gnome_icon_theme_symbolic
+, gnome_icon_theme, gnome_icon_theme_symbolic, gnome3
}:
let
@@ -39,20 +39,18 @@ in stdenv.mkDerivation rec {
python pygobject3 pyxdg numpy pycairo sqlite3
]);
- postInstall = with stdenv.lib; with gst; let
+ preFixup = with stdenv.lib; with gst; let
libraryPath = makeLibraryPath [
gstreamer gst-editing-services
clutter-gst clutter-gtk clutter gtk3
- ];
-
- xdgDataDirs = makeSearchPath "share" [
- gtk3 gnome_icon_theme gnome_icon_theme_symbolic
+ gnome3.gnome_desktop
];
in ''
wrapProgram "$out/bin/pitivi" \
--set GDK_PIXBUF_MODULE_FILE "$GDK_PIXBUF_MODULE_FILE" \
--prefix LD_LIBRARY_PATH : "${libraryPath}" \
--prefix GST_PLUGIN_SYSTEM_PATH_1_0 : "$GST_PLUGIN_SYSTEM_PATH_1_0" \
- --prefix XDG_DATA_DIRS : "\$XDG_ICON_DIRS:${xdgDataDirs}:$out/share"
+ --prefix XDG_DATA_DIRS : "\$XDG_ICON_DIRS:$out/share:$GSETTINGS_SCHEMAS_PATH"
+ rm $out/share/icons/hicolor/icon-theme.cache
'';
}
diff --git a/pkgs/applications/video/vlc/default.nix b/pkgs/applications/video/vlc/default.nix
index de2615d8334..2c5b53c596a 100644
--- a/pkgs/applications/video/vlc/default.nix
+++ b/pkgs/applications/video/vlc/default.nix
@@ -6,6 +6,7 @@
, mpeg2dec, udev, gnutls, avahi, libcddb, jackaudio, SDL, SDL_image
, libmtp, unzip, taglib, libkate, libtiger, libv4l, samba, liboggz
, libass, libva, libdvbpsi, libdc1394, libraw1394, libopus
+, libvdpau
}:
stdenv.mkDerivation rec {
@@ -24,7 +25,7 @@ stdenv.mkDerivation rec {
udev gnutls avahi libcddb jackaudio SDL SDL_image libmtp unzip taglib
libkate libtiger libv4l samba liboggz libass libdvbpsi libva
xlibs.xlibs xlibs.libXv xlibs.libXvMC xlibs.libXpm xlibs.xcbutilkeysyms
- libdc1394 libraw1394 libopus libebml libmatroska
+ libdc1394 libraw1394 libopus libebml libmatroska libvdpau
];
nativeBuildInputs = [ pkgconfig ];
@@ -34,6 +35,7 @@ stdenv.mkDerivation rec {
"--with-kde-solid=$out/share/apps/solid/actions"
"--enable-dc1394"
"--enable-ncurses"
+ "--enable-vdpau"
];
preConfigure = ''sed -e "s@/bin/echo@echo@g" -i configure'';
diff --git a/pkgs/applications/virtualization/docker/default.nix b/pkgs/applications/virtualization/docker/default.nix
index b718d89c8c7..40385d9d36a 100644
--- a/pkgs/applications/virtualization/docker/default.nix
+++ b/pkgs/applications/virtualization/docker/default.nix
@@ -1,36 +1,33 @@
-{ stdenv, fetchurl, makeWrapper, go, lxc, sqlite, iproute, iptables, lvm2
-, bash}:
+{ stdenv, fetchurl, makeWrapper, go, lxc, sqlite, iproute, bridge_utils, devicemapper,
+btrfsProgs, iptables, bash}:
stdenv.mkDerivation rec {
name = "docker-${version}";
- version = "0.7.6";
+ version = "0.9.1";
src = fetchurl {
url = "https://github.com/dotcloud/docker/archive/v${version}.tar.gz";
- sha256 = "0anlzba2vm1fs5nf0dl2svrgj3ddsbl5iyhsm8vfbi3f23vppkfv";
+ sha256 = "0m4s21dxd1bj08xrmi7iw77djj3cpxvjsin12p6v6v1qnigm18ww";
};
phases = ["unpackPhase" "preBuild" "buildPhase" "installPhase"];
- buildInputs = [ makeWrapper go sqlite lxc iproute lvm2 iptables ];
+ buildInputs = [ makeWrapper go sqlite lxc iproute bridge_utils devicemapper btrfsProgs iptables ];
preBuild = ''
patchShebangs ./hack
'';
buildPhase = ''
- mkdir -p src/github.com/dotcloud
- ln -sn "../../../" "src/github.com/dotcloud/docker"
- export GOPATH="$(pwd):$(pwd)/vendor"
- export DOCKER_GITCOMMIT="bc3b2ec0622f50879ae96f042056b6bd2e0b4fba"
- export DOCKER_INITPATH="$out/libexec/docker/dockerinit"
+ export AUTO_GOPATH=1
+ export DOCKER_GITCOMMIT="867b2a90c228f62cdcd44907ceef279a2d8f1ac5"
./hack/make.sh dynbinary
'';
installPhase = ''
install -Dm755 ./bundles/${version}/dynbinary/docker-${version} $out/bin/docker
- install -Dm755 ./bundles/${version}/dynbinary/dockerinit-${version} $out/libexec/docker/dockerinit
- wrapProgram $out/bin/docker --prefix PATH : "${iproute}/sbin:${lvm2}:sbin:${lxc}/bin:${iptables}/sbin"
+ install -Dm755 ./bundles/${version}/dynbinary/dockerinit-${version} $out/bin/dockerinit
+ wrapProgram $out/bin/docker --prefix PATH : "${iproute}/sbin:sbin:${lxc}/bin:${iptables}/sbin"
# systemd
install -Dm644 ./contrib/init/systemd/docker.service $out/etc/systemd/system/docker.service
diff --git a/pkgs/applications/virtualization/qemu/default.nix b/pkgs/applications/virtualization/qemu/default.nix
index 7f3bf8fafc8..b6e28d44411 100644
--- a/pkgs/applications/virtualization/qemu/default.nix
+++ b/pkgs/applications/virtualization/qemu/default.nix
@@ -3,18 +3,18 @@
, makeWrapper
, sdlSupport ? true, SDL
, vncSupport ? true, libjpeg, libpng
-, spiceSupport ? true, spice, spice_protocol
+, spiceSupport ? true, spice, spice_protocol, usbredir
, x86Only ? false
}:
-let n = "qemu-1.7.0"; in
+let n = "qemu-1.7.1"; in
stdenv.mkDerivation rec {
name = n + (if x86Only then "-x86-only" else "");
src = fetchurl {
url = "http://wiki.qemu.org/download/${n}.tar.bz2";
- sha256 = "050kq9mz8c2jcshm7nn7dldypsk8jr590ybnlw2wc51dbyl37wri";
+ sha256 = "1x5y06zhp0gc97g1sb98vf7dkawg63xywv0mbnpfnbi20jh452fn";
};
buildInputs =
@@ -23,7 +23,7 @@ stdenv.mkDerivation rec {
]
++ stdenv.lib.optionals sdlSupport [ SDL ]
++ stdenv.lib.optionals vncSupport [ libjpeg libpng ]
- ++ stdenv.lib.optionals spiceSupport [ spice_protocol spice ];
+ ++ stdenv.lib.optionals spiceSupport [ spice_protocol spice usbredir ];
enableParallelBuilding = true;
diff --git a/pkgs/applications/virtualization/virt-manager/default.nix b/pkgs/applications/virtualization/virt-manager/default.nix
index fb2dde66442..dba0d11b425 100644
--- a/pkgs/applications/virtualization/virt-manager/default.nix
+++ b/pkgs/applications/virtualization/virt-manager/default.nix
@@ -1,74 +1,67 @@
{ stdenv, fetchurl, pythonPackages, intltool, libxml2Python, curl, python
, makeWrapper, virtinst, pyGtkGlade, pythonDBus, gnome_python, gtkvnc, vte
-, spiceSupport ? true, spice_gtk
+, gtk3, gobjectIntrospection, libvirt-glib, gsettings_desktop_schemas, glib
+, avahi, dconf, spiceSupport ? true, spice_gtk
}:
with stdenv.lib;
+with pythonPackages;
-let version = "0.9.5"; in
-
-stdenv.mkDerivation rec {
+buildPythonPackage rec {
name = "virt-manager-${version}";
+ version = "1.0.1";
+ namePrefix = "";
src = fetchurl {
- url = "http://virt-manager.et.redhat.com/download/sources/virt-manager/virt-manager-${version}.tar.gz";
- sha256 = "0gc06cdbq6c2a06l939516lvjii7lr0wng90kqgl1i5q5wlgnajx";
+ url = "http://virt-manager.org/download/sources/virt-manager/${name}.tar.gz";
+ sha256 = "1n248kack1fni8y17ysgq5xhvffcgy4l62hnd0zvr4kjw0579qq8";
};
- pythonPath = with pythonPackages;
- [ setuptools eventlet greenlet gflags netaddr sqlalchemy carrot routes
+ propagatedBuildInputs =
+ [ eventlet greenlet gflags netaddr sqlalchemy carrot routes
paste_deploy m2crypto ipy boto_1_9 twisted sqlalchemy_migrate
distutils_extra simplejson readline glance cheetah lockfile httplib2
- # !!! should libvirt be a build-time dependency? Note that
- # libxml2Python is a dependency of libvirt.py.
- libvirt libxml2Python urlgrabber virtinst pyGtkGlade pythonDBus gnome_python
- gtkvnc vte
+ urlgrabber virtinst pyGtkGlade pythonDBus gnome_python pygobject3
+ libvirt libxml2Python ipaddr vte
] ++ optional spiceSupport spice_gtk;
buildInputs =
- [ pythonPackages.python
- pythonPackages.wrapPython
- pythonPackages.mox
- pythonPackages.urlgrabber
+ [ mox
intltool
- pyGtkGlade
- pythonDBus
- gnome_python
gtkvnc
- ] ++ pythonPath;
+ gtk3
+ libvirt-glib
+ avahi
+ glib
+ gobjectIntrospection
+ ];
- buildPhase = "make";
-
- nativeBuildInputs = [ makeWrapper pythonPackages.wrapPython ];
-
- # TODO
- # virt-manager -> import gtk.glade -> No module named glade --> fixed by removing 'pygtk' and by only using pyGtkGlade
- # -> import gconf -> ImportError: No module named gconf
- # -> pfad um gtk-2.0 erweitern in virt-manger runner -> /nix/store/hnyxc9i4yz2mc42n44ms13mn8n486s5h-gnome-python-2.28.1/lib/python2.7/site-packages/gtk-2.0
- # -> Error starting Virtual Machine Manager: Failed to contact configuration server; the most common cause is a missing or misconfigured D-Bus session bus daemon. See http://projects.gnome.org/gconf/ for information. (Details - 1: GetIOR failed: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.gnome.GConf was not provided by any .service files)
-
-#Traceback (most recent call last):
-# File "/nix/store/y9rcdiv6686sqcv4r39p575s37jzc2cz-virt-manager-0.9.1/share/virt-manager/virt-manager.py", line 383, in
-# main()
-# File "/nix/store/y9rcdiv6686sqcv4r39p575s37jzc2cz-virt-manager-0.9.1/share/virt-manager/virt-manager.py", line 315, in main
-# config = virtManager.config.vmmConfig(appname, appversion, glade_dir)
-# File "/nix/store/y9rcdiv6686sqcv4r39p575s37jzc2cz-virt-manager-0.9.1/share/virt-manager/virtManager/config.py", line 98, in __init__
-# self.conf.add_dir(self.conf_dir, gconf.CLIENT_PRELOAD_NONE)
-#GError: Failed to contact configuration server; the most common cause is a missing or misconfigured D-Bus session bus daemon. See http://projects.gnome.org/gconf/ for information. (Details - 1: GetIOR failed: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.gnome.GConf was not provided by any .service files)
-# -> fixed by http://nixos.org/wiki/Solve_GConf_errors_when_running_GNOME_applications & a restart
- # virt-manager-tui -> ImportError: No module named newt_syrup.dialogscreen
-
- installPhase = ''
- make install
-
- # A hack, but the most reliable method so far
- echo "#!/usr/bin/env python" | cat - src/virt-manager.py > $out/bin/virt-manager
- echo "#!/usr/bin/env python" | cat - src/virt-manager-tui.py > $out/bin/virt-manager-tui
-
- wrapPythonPrograms
+ configurePhase = ''
+ sed -i 's/from distutils.core/from setuptools/g' setup.py
+ sed -i 's/from distutils.command.install/from setuptools.command.install/g' setup.py
+ python setup.py configure --prefix=$out
'';
- meta = {
+ buildPhase = "true";
+
+ postInstall = ''
+ # GI_TYPELIB_PATH is needed at runtime for GObject stuff to work
+ for file in "$out"/bin/*; do
+ wrapProgram "$file" \
+ --prefix GI_TYPELIB_PATH : $GI_TYPELIB_PATH \
+ --prefix GIO_EXTRA_MODULES : "${dconf}/lib/gio/modules" \
+ --prefix GSETTINGS_SCHEMA_DIR : $out/share/glib-2.0/schemas \
+ --prefix LD_LIBRARY_PATH : ${gtk3}/lib/:${libvirt-glib}/lib/:${vte}/lib:${gtkvnc}/lib${optionalString spiceSupport ":${spice_gtk}/lib"} \
+ --prefix XDG_DATA_DIRS : "$out/share:${gsettings_desktop_schemas}/share:${gtk3}/share:\$XDG_DATA_DIRS"
+ done
+
+ ${glib}/bin/glib-compile-schemas "$out"/share/glib-2.0/schemas
+ '';
+
+ # Failed tests
+ doCheck = false;
+
+ meta = with stdenv.lib; {
homepage = http://virt-manager.org;
description = "Desktop user interface for managing virtual machines";
longDescription = ''
@@ -76,7 +69,7 @@ stdenv.mkDerivation rec {
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];
+ license = licenses.gpl2;
+ maintainers = with maintainers; [qknight offline];
};
}
diff --git a/pkgs/build-support/build-fhs-chrootenv/default.nix b/pkgs/build-support/build-fhs-chrootenv/default.nix
index 8756c4835b2..2f3aa14c6a0 100644
--- a/pkgs/build-support/build-fhs-chrootenv/default.nix
+++ b/pkgs/build-support/build-fhs-chrootenv/default.nix
@@ -1,10 +1,12 @@
{stdenv, glibc, glibcLocales, gcc, coreutils, diffutils, findutils, gnused, gnugrep, gnutar, gzip, bzip2,
-bashInteractive, xz, shadow, gawk, less, buildEnv}:
+bashInteractive, xz, shadow, gawk, less, su, buildEnv}:
{name, pkgs ? [], profile ? ""}:
let
- basePkgs = [ glibc glibcLocales gcc coreutils diffutils findutils gnused gnugrep gnutar gzip bzip2
-bashInteractive xz shadow gawk less ];
+ basePkgs = [
+ glibc glibcLocales gcc coreutils diffutils findutils gnused gnugrep gnutar
+ gzip bzip2 bashInteractive xz shadow gawk less su
+ ];
# Compose a global profile for the chroot environment
profilePkg = stdenv.mkDerivation {
@@ -31,16 +33,16 @@ bashInteractive xz shadow gawk less ];
mountSh = ./mount.sh.in;
loadSh = ./load.sh.in;
umountSh = ./umount.sh.in;
- destroySh = ./destroy.sh.in;
-in
-stdenv.mkDerivation {
- name = "${name}-chrootenv";
- buildCommand = ''
- mkdir -p $out/sw
- cd $out/sw
-
- for i in ${staticUsrProfile}/{etc,bin,lib{,32,64},sbin,var}
- do
+ destroySh = ./destroy.sh.in;
+in
+stdenv.mkDerivation {
+ name = "${name}-chrootenv";
+ buildCommand = ''
+ mkdir -p $out/sw
+ cd $out/sw
+
+ for i in ${staticUsrProfile}/{etc,bin,lib{,32,64},sbin,var}
+ do
if [ -x "$i" ]
then
ln -s "$i"
diff --git a/pkgs/build-support/cabal/default.nix b/pkgs/build-support/cabal/default.nix
index 5e028863b06..ed7ca30db13 100644
--- a/pkgs/build-support/cabal/default.nix
+++ b/pkgs/build-support/cabal/default.nix
@@ -195,10 +195,6 @@ assert !enableStaticLibraries -> versionOlder "7.7" ghc.version;
done
done
- ${optionalString self.enableSharedExecutables ''
- configureFlags+=" --ghc-option=-optl=-Wl,-rpath=$out/lib/${ghc.ghc.name}/${self.pname}-${self.version}";
- ''}
-
echo "configure flags: $extraConfigureFlags $configureFlags"
./Setup configure --verbose --prefix="$out" --libdir='$prefix/lib/$compiler' \
--libsubdir='$pkgid' $extraConfigureFlags $configureFlags 2>&1 \
diff --git a/pkgs/build-support/gcc-cross-wrapper/builder.sh b/pkgs/build-support/gcc-cross-wrapper/builder.sh
index 5a5bd45a8f8..2dfa315d168 100644
--- a/pkgs/build-support/gcc-cross-wrapper/builder.sh
+++ b/pkgs/build-support/gcc-cross-wrapper/builder.sh
@@ -87,6 +87,8 @@ mkGccWrapper $out/bin/$crossConfig-gcc $gccPath/$crossConfig-gcc
mkGccWrapper $out/bin/$crossConfig-g++ $gccPath/$crossConfig-g++
ln -s $crossConfig-g++ $out/bin/$crossConfig-c++
+mkGccWrapper $out/bin/$crossConfig-cpp $gccPath/$crossConfig-cpp
+
mkGccWrapper $out/bin/$crossConfig-g77 $gccPath/$crossConfig-g77
ln -s $crossConfig-g77 $out/bin/$crossConfig-f77
diff --git a/pkgs/build-support/gcc-wrapper/builder.sh b/pkgs/build-support/gcc-wrapper/builder.sh
index e7c3400e9f7..c79680712ee 100644
--- a/pkgs/build-support/gcc-wrapper/builder.sh
+++ b/pkgs/build-support/gcc-wrapper/builder.sh
@@ -154,6 +154,8 @@ then
ln -sv g++ $out/bin/c++
fi
+mkGccWrapper $out/bin/cpp $gccPath/cpp || true
+
if mkGccWrapper $out/bin/gfortran $gccPath/gfortran
then
ln -sv gfortran $out/bin/g77
diff --git a/pkgs/build-support/gcc-wrapper/default.nix b/pkgs/build-support/gcc-wrapper/default.nix
index 1f521f40585..8e8b0b90945 100644
--- a/pkgs/build-support/gcc-wrapper/default.nix
+++ b/pkgs/build-support/gcc-wrapper/default.nix
@@ -73,6 +73,8 @@ stdenv.mkDerivation {
abort "don't know the name of the dynamic linker for this platform");
};
+ preferLocalBuild = true;
+
meta =
let gcc_ = if gcc != null then gcc else {}; in
(if gcc_ ? meta then removeAttrs gcc.meta ["priority"] else {}) //
diff --git a/pkgs/build-support/kernel/cpio-clean.pl b/pkgs/build-support/kernel/cpio-clean.pl
new file mode 100644
index 00000000000..ddc6435a5a8
--- /dev/null
+++ b/pkgs/build-support/kernel/cpio-clean.pl
@@ -0,0 +1,17 @@
+use strict;
+
+# Make inode number, link info and mtime consistent in order to get a consistent hash.
+#
+# Author: Alexander Kjeldaas
+
+use Archive::Cpio;
+
+my $cpio = Archive::Cpio->new;
+my $IN = \*STDIN;
+my $ino = 1;
+$cpio->read_with_handler($IN, sub {
+ my ($e) = @_;
+ $e->{mtime} = 1;
+ $cpio->write_one(\*STDOUT, $e);
+ });
+$cpio->write_trailer(\*STDOUT);
diff --git a/pkgs/build-support/kernel/make-initrd.nix b/pkgs/build-support/kernel/make-initrd.nix
index 4ddf0706e03..0582ca55301 100644
--- a/pkgs/build-support/kernel/make-initrd.nix
+++ b/pkgs/build-support/kernel/make-initrd.nix
@@ -12,10 +12,10 @@
# `contents = {object = ...; symlink = /init;}' is a typical
# argument.
-{stdenv, perl, cpio, contents, ubootChooser, compressor}:
+{stdenv, perl, perlArchiveCpio, cpio, contents, ubootChooser, compressor}:
let
- inputsFun = ubootName : [perl cpio]
+ inputsFun = ubootName : [perl cpio perlArchiveCpio ]
++ stdenv.lib.optional (ubootName != null) [ (ubootChooser ubootName) ];
makeUInitrdFun = ubootName : (ubootName != null);
in
@@ -35,6 +35,7 @@ stdenv.mkDerivation {
exportReferencesGraph =
map (x: [("closure-" + baseNameOf x.symlink) x.object]) contents;
pathsFromGraph = ./paths-from-graph.pl;
+ cpioClean = ./cpio-clean.pl;
crossAttrs = {
nativeBuildInputs = inputsFun stdenv.cross.platform.uboot;
diff --git a/pkgs/build-support/kernel/make-initrd.sh b/pkgs/build-support/kernel/make-initrd.sh
index f6cadaf0281..17b261f9840 100644
--- a/pkgs/build-support/kernel/make-initrd.sh
+++ b/pkgs/build-support/kernel/make-initrd.sh
@@ -36,7 +36,7 @@ storePaths=$(perl $pathsFromGraph closure-*)
# Put the closure in a gzipped cpio archive.
mkdir -p $out
-(cd root && find * -print0 | cpio -o -H newc --null | $compressor > $out/initrd)
+(cd root && find * -print0 | cpio -o -H newc --null | perl $cpioClean | $compressor > $out/initrd)
if [ -n "$makeUInitrd" ]; then
mv $out/initrd $out/initrd.gz
diff --git a/pkgs/data/documentation/man-pages/default.nix b/pkgs/data/documentation/man-pages/default.nix
index b43cc8a7995..5fc0b4752bc 100644
--- a/pkgs/data/documentation/man-pages/default.nix
+++ b/pkgs/data/documentation/man-pages/default.nix
@@ -1,11 +1,11 @@
{ stdenv, fetchurl }:
stdenv.mkDerivation rec {
- name = "man-pages-3.62";
+ name = "man-pages-3.64";
src = fetchurl {
url = "mirror://kernel/linux/docs/man-pages/${name}.tar.xz";
- sha256 = "1pxnbznrzckzdnlfbdsg9hjd2g93q6b433l4gp095kdxxjqm1mgk";
+ sha256 = "1p9zk130c852gqci6dyw57yaqx4v871n8n82kkccdpj7y63xr4bl";
};
preBuild =
@@ -16,5 +16,6 @@ stdenv.mkDerivation rec {
meta = {
description = "Linux development manual pages";
homepage = http://www.kernel.org/doc/man-pages/;
+ repositories.git = http://git.kernel.org/pub/scm/docs/man-pages/man-pages;
};
}
diff --git a/pkgs/data/sgml+xml/stylesheets/xslt/docbook-xsl-ns/default.nix b/pkgs/data/sgml+xml/stylesheets/xslt/docbook-xsl-ns/default.nix
index c143ce16698..bfe454a49fe 100644
--- a/pkgs/data/sgml+xml/stylesheets/xslt/docbook-xsl-ns/default.nix
+++ b/pkgs/data/sgml+xml/stylesheets/xslt/docbook-xsl-ns/default.nix
@@ -1,11 +1,11 @@
{stdenv, fetchurl}:
stdenv.mkDerivation rec {
- name = "docbook-xsl-ns-1.75.2";
+ name = "docbook-xsl-ns-1.78.1";
src = fetchurl {
url = "mirror://sourceforge/docbook/${name}.tar.bz2";
- sha256 = "1pr7m0hmqilk25hjx33kq2vqn2xf6cx6zhxqm35fdvnjccazlxg2";
+ sha256 = "1x3sc0axk9z3i6n0jhlsmzlmb723a4sjgslm9g12by6phirdx3ng";
};
buildPhase = "true";
diff --git a/pkgs/desktops/cinnamon/automount-plugin.patch b/pkgs/desktops/cinnamon/automount-plugin.patch
new file mode 100644
index 00000000000..3d90da99f08
--- /dev/null
+++ b/pkgs/desktops/cinnamon/automount-plugin.patch
@@ -0,0 +1,448 @@
+
+diff -Naur cinnamon-settings-daemon-2.0.1.orig/data/org.cinnamon.settings-daemon.plugins.gschema.xml.in.in cinnamon-settings-daemon-2.0.1/data/org.cinnamon.settings-daemon.plugins.gschema.xml.in.in
+--- cinnamon-settings-daemon-2.0.6.orig/data/org.cinnamon.settings-daemon.plugins.gschema.xml.in.in 2013-11-03 10:50:04.000000000 -0500
++++ cinnamon-settings-daemon-2.0.6/data/org.cinnamon.settings-daemon.plugins.gschema.xml.in.in 2013-11-05 15:33:21.112912392 -0500
+@@ -2,6 +2,7 @@
+
+
+
++
+
+
+
+@@ -42,6 +43,18 @@
+ <_summary>Priority to use for this plugin
+ <_description>Priority to use for this plugin in cinnamon-settings-daemon startup queue
+
++
++
++
++ true
++ <_summary>Activation of this plugin
++ <_description>Whether this plugin would be activated by cinnamon-settings-daemon or not
++
++
++ 97
++ <_summary>Priority to use for this plugin
++ <_description>Priority to use for this plugin in cinnamon-settings-daemon startup queue
++
+
+
+
+diff -Naur cinnamon-settings-daemon-2.0.1.orig/plugins/automount/automount.cinnamon-settings-plugin.in cinnamon-settings-daemon-2.0.1/plugins/automount/automount.cinnamon-settings-plugin.in
+--- cinnamon-settings-daemon-2.0.1.orig/plugins/automount/automount.cinnamon-settings-plugin.in 1970-01-01 01:00:00.000000000 +0100
++++ cinnamon-settings-daemon-2.0.1/plugins/automount/automount.cinnamon-settings-plugin.in 2013-10-08 22:35:10.771472456 +0200
+@@ -0,0 +1,8 @@
++[Cinnamon Settings Plugin]
++Module=automount
++IAge=0
++_Name=Automount
++_Description=Automounter plugin
++Authors=Tomas Bzatek
++Copyright=Copyright © 2010 Red Hat, Inc.
++Website=
+diff -Naur cinnamon-settings-daemon-2.0.1.orig/plugins/automount/cinnamon-fallback-mount-helper.c cinnamon-settings-daemon-2.0.1/plugins/automount/cinnamon-fallback-mount-helper.c
+--- cinnamon-settings-daemon-2.0.1.orig/plugins/automount/cinnamon-fallback-mount-helper.c 2013-10-02 16:13:56.000000000 +0200
++++ cinnamon-settings-daemon-2.0.1/plugins/automount/cinnamon-fallback-mount-helper.c 1970-01-01 01:00:00.000000000 +0100
+@@ -1,65 +0,0 @@
+-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*-
+- *
+- * Copyright (C) 2010 Red Hat, Inc.
+- *
+- * This program is free software; you can redistribute it and/or modify
+- * it under the terms of the GNU General Public License as published by
+- * the Free Software Foundation; either version 2 of the License, or
+- * (at your option) any later version.
+- *
+- * This program is distributed in the hope that it will be useful,
+- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+- * GNU General Public License for more details.
+- *
+- * You should have received a copy of the GNU General Public License
+- * along with this program; if not, write to the Free Software
+- * Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA
+- *
+- * Author: Tomas Bzatek
+- */
+-
+-#include "config.h"
+-
+-#include
+-#include
+-#include
+-#include
+-
+-#include "csd-automount-manager.h"
+-
+-int
+-main (int argc,
+- char **argv)
+-{
+- GMainLoop *loop;
+- CsdAutomountManager *manager;
+- GError *error = NULL;
+-
+- g_type_init ();
+- gtk_init (&argc, &argv);
+-
+- bindtextdomain (GETTEXT_PACKAGE, CINNAMON_SETTINGS_LOCALEDIR);
+- bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
+- textdomain (GETTEXT_PACKAGE);
+-
+- loop = g_main_loop_new (NULL, FALSE);
+- manager = csd_automount_manager_new ();
+-
+- csd_automount_manager_start (manager, &error);
+-
+- if (error != NULL) {
+- g_printerr ("Unable to start the mount manager: %s",
+- error->message);
+-
+- g_error_free (error);
+- _exit (1);
+- }
+-
+- g_main_loop_run (loop);
+-
+- csd_automount_manager_stop (manager);
+- g_main_loop_unref (loop);
+-
+- return 0;
+-}
+diff -Naur cinnamon-settings-daemon-2.0.1.orig/plugins/automount/cinnamon-fallback-mount-helper.desktop.in.in cinnamon-settings-daemon-2.0.1/plugins/automount/cinnamon-fallback-mount-helper.desktop.in.in
+--- cinnamon-settings-daemon-2.0.1.orig/plugins/automount/cinnamon-fallback-mount-helper.desktop.in.in 2013-10-02 16:13:56.000000000 +0200
++++ cinnamon-settings-daemon-2.0.1/plugins/automount/cinnamon-fallback-mount-helper.desktop.in.in 1970-01-01 01:00:00.000000000 +0100
+@@ -1,12 +0,0 @@
+-[Desktop Entry]
+-_Name=Mount Helper
+-_Comment=Automount and autorun plugged devices
+-Exec=@LIBEXECDIR@/cinnamon-fallback-mount-helper
+-Icon=drive-optical
+-Terminal=false
+-Type=Application
+-Categories=
+-NoDisplay=true
+-OnlyShowIn=GNOME;
+-X-GNOME-Autostart-Notify=true
+-
+diff -Naur cinnamon-settings-daemon-2.0.1.orig/plugins/automount/csd-automount-plugin.c cinnamon-settings-daemon-2.0.1/plugins/automount/csd-automount-plugin.c
+--- cinnamon-settings-daemon-2.0.1.orig/plugins/automount/csd-automount-plugin.c 1970-01-01 01:00:00.000000000 +0100
++++ cinnamon-settings-daemon-2.0.1/plugins/automount/csd-automount-plugin.c 2013-10-08 22:35:10.771472456 +0200
+@@ -0,0 +1,106 @@
++/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*-
++ *
++ * Copyright (C) 2010 Red Hat, Inc.
++ *
++ * This program is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License as published by
++ * the Free Software Foundation; either version 2 of the License, or
++ * (at your option) any later version.
++ *
++ * This program is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ * GNU General Public License for more details.
++ *
++ * You should have received a copy of the GNU General Public License
++ * along with this program; if not, write to the Free Software
++ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
++ *
++ * Author: Tomas Bzatek
++ */
++
++#include "config.h"
++
++#include
++#include
++
++#include "cinnamon-settings-plugin.h"
++#include "csd-automount-plugin.h"
++#include "csd-automount-manager.h"
++
++struct CsdAutomountPluginPrivate {
++ CsdAutomountManager *manager;
++};
++
++#define CSD_AUTOMOUNT_PLUGIN_GET_PRIVATE(object) (G_TYPE_INSTANCE_GET_PRIVATE ((object), CSD_TYPE_AUTOMOUNT_PLUGIN, CsdAutomountPluginPrivate))
++
++CINNAMON_SETTINGS_PLUGIN_REGISTER (CsdAutomountPlugin, csd_automount_plugin)
++
++static void
++csd_automount_plugin_init (CsdAutomountPlugin *plugin)
++{
++ plugin->priv = CSD_AUTOMOUNT_PLUGIN_GET_PRIVATE (plugin);
++
++ g_debug ("Automount plugin initializing");
++
++ plugin->priv->manager = csd_automount_manager_new ();
++}
++
++static void
++csd_automount_plugin_finalize (GObject *object)
++{
++ CsdAutomountPlugin *plugin;
++
++ g_return_if_fail (object != NULL);
++ g_return_if_fail (CSD_IS_AUTOMOUNT_PLUGIN (object));
++
++ g_debug ("Automount plugin finalizing");
++
++ plugin = CSD_AUTOMOUNT_PLUGIN (object);
++
++ g_return_if_fail (plugin->priv != NULL);
++
++ if (plugin->priv->manager != NULL) {
++ g_object_unref (plugin->priv->manager);
++ }
++
++ G_OBJECT_CLASS (csd_automount_plugin_parent_class)->finalize (object);
++}
++
++static void
++impl_activate (CinnamonSettingsPlugin *plugin)
++{
++ gboolean res;
++ GError *error;
++
++ g_debug ("Activating automount plugin");
++
++ error = NULL;
++ res = csd_automount_manager_start (CSD_AUTOMOUNT_PLUGIN (plugin)->priv->manager, &error);
++ if (! res) {
++ g_warning ("Unable to start automount manager: %s", error->message);
++ g_error_free (error);
++ }
++}
++
++static void
++impl_deactivate (CinnamonSettingsPlugin *plugin)
++{
++ g_debug ("Deactivating automount plugin");
++ csd_automount_manager_stop (CSD_AUTOMOUNT_PLUGIN (plugin)->priv->manager);
++}
++
++static void
++csd_automount_plugin_class_init (CsdAutomountPluginClass *klass)
++{
++ GObjectClass *object_class = G_OBJECT_CLASS (klass);
++ CinnamonSettingsPluginClass *plugin_class = CINNAMON_SETTINGS_PLUGIN_CLASS (klass);
++
++ object_class->finalize = csd_automount_plugin_finalize;
++
++ plugin_class->activate = impl_activate;
++ plugin_class->deactivate = impl_deactivate;
++
++ g_type_class_add_private (klass, sizeof (CsdAutomountPluginPrivate));
++}
++
+diff -Naur cinnamon-settings-daemon-2.0.1.orig/plugins/automount/csd-automount-plugin.h cinnamon-settings-daemon-2.0.1/plugins/automount/csd-automount-plugin.h
+--- cinnamon-settings-daemon-2.0.1.orig/plugins/automount/csd-automount-plugin.h 1970-01-01 01:00:00.000000000 +0100
++++ cinnamon-settings-daemon-2.0.1/plugins/automount/csd-automount-plugin.h 2013-10-08 22:35:10.771472456 +0200
+@@ -0,0 +1,60 @@
++/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*-
++ *
++ * Copyright (C) 2010 Red Hat, Inc.
++ *
++ * This program is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License as published by
++ * the Free Software Foundation; either version 2 of the License, or
++ * (at your option) any later version.
++ *
++ * This program is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ * GNU General Public License for more details.
++ *
++ * You should have received a copy of the GNU General Public License
++ * along with this program; if not, write to the Free Software
++ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
++ *
++ * Author: Tomas Bzatek
++ */
++
++#ifndef __CSD_AUTOMOUNT_PLUGIN_H__
++#define __CSD_AUTOMOUNT_PLUGIN_H__
++
++#include
++#include
++#include
++
++#include "cinnamon-settings-plugin.h"
++
++G_BEGIN_DECLS
++
++#define CSD_TYPE_AUTOMOUNT_PLUGIN (csd_automount_plugin_get_type ())
++#define CSD_AUTOMOUNT_PLUGIN(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), CSD_TYPE_AUTOMOUNT_PLUGIN, CsdAutomountPlugin))
++#define CSD_AUTOMOUNT_PLUGIN_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), CSD_TYPE_AUTOMOUNT_PLUGIN, CsdAutomountPluginClass))
++#define CSD_IS_AUTOMOUNT_PLUGIN(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), CSD_TYPE_AUTOMOUNT_PLUGIN))
++#define CSD_IS_AUTOMOUNT_PLUGIN_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), CSD_TYPE_AUTOMOUNT_PLUGIN))
++#define CSD_AUTOMOUNT_PLUGIN_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), CSD_TYPE_AUTOMOUNT_PLUGIN, CsdAutomountPluginClass))
++
++typedef struct CsdAutomountPluginPrivate CsdAutomountPluginPrivate;
++
++typedef struct
++{
++ CinnamonSettingsPlugin parent;
++ CsdAutomountPluginPrivate *priv;
++} CsdAutomountPlugin;
++
++typedef struct
++{
++ CinnamonSettingsPluginClass parent_class;
++} CsdAutomountPluginClass;
++
++GType csd_automount_plugin_get_type (void) G_GNUC_CONST;
++
++/* All the plugins must implement this function */
++G_MODULE_EXPORT GType register_cinnamon_settings_plugin (GTypeModule *module);
++
++G_END_DECLS
++
++#endif /* __CSD_AUTOMOUNT_PLUGIN_H__ */
+diff -Naur cinnamon-settings-daemon-2.0.1.orig/plugins/automount/Makefile.am cinnamon-settings-daemon-2.0.1/plugins/automount/Makefile.am
+--- cinnamon-settings-daemon-2.0.1.orig/plugins/automount/Makefile.am 2013-10-02 16:13:56.000000000 +0200
++++ cinnamon-settings-daemon-2.0.1/plugins/automount/Makefile.am 2013-10-08 22:48:19.240865461 +0200
+@@ -1,38 +1,87 @@
+-libexec_PROGRAMS = cinnamon-fallback-mount-helper
++NULL =
+
+-cinnamon_fallback_mount_helper_SOURCES = \
+- cinnamon-fallback-mount-helper.c \
+- csd-automount-manager.c \
+- csd-automount-manager.h \
+- csd-autorun.c \
+- csd-autorun.h
++plugin_name = automount
+
+-cinnamon_fallback_mount_helper_CPPFLAGS = \
++libexec_PROGRAMS = csd-test-automount
++
++csd_test_automount_SOURCES = \
++ test-automount.c \
++ csd-automount-manager.h \
++ csd-automount-manager.c \
++ csd-autorun.c \
++ csd-autorun.h \
++ $(NULL)
++
++csd_test_automount_CPPFLAGS = \
+ -I$(top_srcdir)/cinnamon-settings-daemon \
++ -I$(top_srcdir)/plugins/common \
+ -DCINNAMON_SETTINGS_LOCALEDIR=\""$(datadir)/locale"\" \
+ $(AM_CPPFLAGS)
+
+-cinnamon_fallback_mount_helper_CFLAGS = \
++csd_test_automount_CFLAGS = \
++ $(PLUGIN_CFLAGS) \
+ $(SETTINGS_PLUGIN_CFLAGS) \
+ $(SYSTEMD_CFLAGS) \
+ $(AUTOMOUNT_CFLAGS)
++ $(AM_CFLAGS)
++
++csd_test_automount_LDADD = \
++ $(top_builddir)/cinnamon-settings-daemon/libcsd.la \
++ $(SETTINGS_PLUGIN_LIBS) \
++ $(SYSTEMD_LIBS) \
++ $(AUTOMOUNT_LIBS) \
++ $(NULL)
++
++plugin_LTLIBRARIES = \
++ libautomount.la \
++ $(NULL)
++
++libautomount_la_SOURCES = \
++ csd-automount-plugin.h \
++ csd-automount-plugin.c \
++ csd-automount-manager.h \
++ csd-automount-manager.c \
++ csd-autorun.c \
++ csd-autorun.h \
++ $(NULL)
++
++libautomount_la_CPPFLAGS = \
++ -I$(top_srcdir)/cinnamon-settings-daemon \
++ -DCINNAMON_SETTINGS_LOCALEDIR=\""$(datadir)/locale"\" \
++ $(AM_CPPFLAGS)
++
++libautomount_la_CFLAGS = \
++ $(SETTINGS_PLUGIN_CFLAGS) \
++ $(SYSTEMD_CFLAGS) \
++ $(AUTOMOUNT_CFLAGS) \
++ $(AM_CFLAGS)
++
++libautomount_la_LDFLAGS = \
++ $(CSD_PLUGIN_LDFLAGS) \
++ $(NULL)
+
+-cinnamon_fallback_mount_helper_LDADD = \
++libautomount_la_LIBADD = \
+ $(SETTINGS_PLUGIN_LIBS) \
+ $(SYSTEMD_LIBS) \
+ $(AUTOMOUNT_LIBS) \
+- $(top_builddir)/cinnamon-settings-daemon/libcsd.la
++ $(NULL)
+
+-autostartdir = $(datadir)/applications
+-autostart_in_files = cinnamon-fallback-mount-helper.desktop.in
+-autostart_in_in_files = cinnamon-fallback-mount-helper.desktop.in.in
+-autostart_DATA = $(autostart_in_files:.desktop.in=.desktop)
++plugin_in_files = \
++ automount.cinnamon-settings-plugin.in \
++ $(NULL)
+
+-$(autostart_in_files): $(autostart_in_in_files)
+- @sed -e "s|\@LIBEXECDIR\@|$(libexecdir)|" $< > $@
++plugin_DATA = $(plugin_in_files:.cinnamon-settings-plugin.in=.cinnamon-settings-plugin)
+
+-@INTLTOOL_DESKTOP_RULE@
++EXTRA_DIST = \
++ $(plugin_in_files) \
++ $(NULL)
+
+-EXTRA_DIST = $(autostart_in_in_files)
++CLEANFILES = \
++ $(plugin_DATA) \
++ $(NULL)
+
+-CLEANFILES = $(autostart_DATA) $(autostart_in_files)
++DISTCLEANFILES = \
++ $(plugin_DATA) \
++ $(NULL)
++
++@CSD_INTLTOOL_PLUGIN_RULE@
+diff -Naur cinnamon-settings-daemon-2.0.1.orig/plugins/automount/test-automount.c cinnamon-settings-daemon-2.0.1/plugins/automount/test-automount.c
+--- cinnamon-settings-daemon-2.0.1.orig/plugins/automount/test-automount.c 1970-01-01 01:00:00.000000000 +0100
++++ cinnamon-settings-daemon-2.0.1/plugins/automount/test-automount.c 2013-10-08 22:42:53.759486525 +0200
+@@ -0,0 +1,7 @@
++#define NEW csd_automount_manager_new
++#define START csd_automount_manager_start
++#define STOP csd_automount_manager_stop
++#define MANAGER CsdAutomountManager
++#include "csd-automount-manager.h"
++
++#include "test-plugin.h"
+diff -Naur cinnamon-settings-daemon-2.0.1.orig/po/POTFILES.in cinnamon-settings-daemon-2.0.1/po/POTFILES.in
+--- cinnamon-settings-daemon-2.0.1.orig/po/POTFILES.in 2013-10-02 16:13:56.000000000 +0200
++++ cinnamon-settings-daemon-2.0.1/po/POTFILES.in 2013-10-08 22:35:10.771472456 +0200
+@@ -18,8 +18,9 @@
+ plugins/a11y-keyboard/csd-a11y-preferences-dialog.c
+ [type: gettext/glade]plugins/a11y-keyboard/csd-a11y-preferences-dialog.ui
+ [type: gettext/ini]plugins/a11y-settings/a11y-settings.cinnamon-settings-plugin.in
+-plugins/automount/cinnamon-fallback-mount-helper.desktop.in.in
++[type: gettext/ini]plugins/automount/automount.cinnamon-settings-plugin.in
+ plugins/automount/csd-automount-manager.c
++plugins/automount/csd-automount-plugin.c
+ plugins/automount/csd-autorun.c
+ [type: gettext/ini]plugins/background/background.cinnamon-settings-plugin.in
+ [type: gettext/ini]plugins/clipboard/clipboard.cinnamon-settings-plugin.in
+diff -Naur cinnamon-settings-daemon-2.0.1.orig/po/POTFILES.skip cinnamon-settings-daemon-2.0.1/po/POTFILES.skip
+--- cinnamon-settings-daemon-2.0.1.orig/po/POTFILES.skip 2013-10-02 16:13:56.000000000 +0200
++++ cinnamon-settings-daemon-2.0.1/po/POTFILES.skip 2013-10-08 22:37:20.224645009 +0200
+@@ -20,6 +20,5 @@
+ data/org.cinnamon.settings-daemon.plugins.updates.gschema.xml.in
+ data/org.cinnamon.settings-daemon.plugins.xrandr.gschema.xml.in
+ data/org.cinnamon.settings-daemon.plugins.xsettings.gschema.xml.in
+-plugins/automount/gnome-fallback-mount-helper.desktop.in
+ plugins/power/org.cinnamon.settings-daemon.plugins.power.policy.in
+ plugins/wacom/org.cinnamon.settings-daemon.plugins.wacom.policy.in
diff --git a/pkgs/desktops/cinnamon/cinnamon-control-center.nix b/pkgs/desktops/cinnamon/cinnamon-control-center.nix
new file mode 100644
index 00000000000..ab2f389b4f5
--- /dev/null
+++ b/pkgs/desktops/cinnamon/cinnamon-control-center.nix
@@ -0,0 +1,40 @@
+
+{ stdenv, fetchurl, pkgconfig, autoreconfHook, glib, gettext, gnome_common, cinnamon-desktop, intltool, libxslt, gtk3, libnotify,
+gnome-menus, libxml2, systemd, upower, cinnamon-settings-daemon, colord, polkit, ibus, libcanberra_gtk3, pulseaudio, isocodes, krb5,
+libxkbfile}:
+
+let
+ version = "2.0.9";
+in
+stdenv.mkDerivation {
+ name = "cinnamon-control-center-${version}";
+
+ src = fetchurl {
+ url = "http://github.com/linuxmint/cinnamon-control-center/archive/${version}.tar.gz";
+ sha256 = "0kivqdgsf8w257j2ja6fap0dpvljcnb9gphr3knp7y6ma2d1gfv3";
+ };
+
+ configureFlags = "--enable-systemd --disable-update-mimedb" ;
+
+ patches = [ ./region.patch];
+
+ buildInputs = [
+ pkgconfig autoreconfHook
+ glib gettext gnome_common
+ intltool libxslt gtk3 cinnamon-desktop
+ libnotify gnome-menus libxml2 systemd
+ upower cinnamon-settings-daemon colord
+ polkit ibus libcanberra_gtk3 pulseaudio
+ isocodes krb5 libxkbfile ];
+
+ preBuild = "patchShebangs ./scripts";
+
+ meta = {
+ homepage = "http://cinnamon.linuxmint.com";
+ description = "The cinnamon session files" ;
+
+ platforms = stdenv.lib.platforms.linux;
+ maintainers = [ stdenv.lib.maintainers.roelof ];
+ };
+}
+
diff --git a/pkgs/desktops/cinnamon/cinnamon-desktop.nix b/pkgs/desktops/cinnamon/cinnamon-desktop.nix
index e158b489884..d3cf04e835d 100644
--- a/pkgs/desktops/cinnamon/cinnamon-desktop.nix
+++ b/pkgs/desktops/cinnamon/cinnamon-desktop.nix
@@ -22,10 +22,6 @@ stdenv.mkDerivation {
xkeyboard_config libxkbfile libX11 libXrandr libXext
];
- postInstall = ''
- ${glib}/bin/glib-compile-schemas $out/share/glib-2.0/schemas/
- '';
-
meta = {
homepage = "http://cinnamon.linuxmint.com";
description = "Library and data for various Cinnamon modules";
diff --git a/pkgs/desktops/cinnamon/cinnamon-session.nix b/pkgs/desktops/cinnamon/cinnamon-session.nix
index 850dd4e6c5a..534fa11f046 100644
--- a/pkgs/desktops/cinnamon/cinnamon-session.nix
+++ b/pkgs/desktops/cinnamon/cinnamon-session.nix
@@ -13,7 +13,7 @@ stdenv.mkDerivation {
};
- configureFlags = "--disable-schemas-compile --enable-systemd --disable-gconf" ;
+ configureFlags = "--enable-systemd --disable-gconf" ;
patches = [ ./remove-sessionmigration.patch ./timeout.patch];
@@ -23,17 +23,17 @@ stdenv.mkDerivation {
gtk3 dbus_glib upower json_glib
intltool systemd xorg.xtrans
makeWrapper
+ cinnamon-desktop/*gschemas*/
];
preBuild = "patchShebangs ./scripts";
- postInstall = ''
- ${glib}/bin/glib-compile-schemas $out/share/glib-2.0/schemas/
+ postFixup = ''
rm $out/share/icons/hicolor/icon-theme.cache
for f in "$out"/bin/*; do
- wrapProgram "$f" --prefix XDG_DATA_DIRS : "$out/share:${cinnamon-desktop}/share"
+ wrapProgram "$f" --prefix XDG_DATA_DIRS : "$GSETTINGS_SCHEMAS_PATH"
done
'';
diff --git a/pkgs/desktops/cinnamon/cinnamon-settings-daemon.nix b/pkgs/desktops/cinnamon/cinnamon-settings-daemon.nix
new file mode 100644
index 00000000000..c397a9758e2
--- /dev/null
+++ b/pkgs/desktops/cinnamon/cinnamon-settings-daemon.nix
@@ -0,0 +1,52 @@
+
+{ stdenv, fetchurl, pkgconfig, autoreconfHook, glib, gettext, gnome_common, cinnamon-desktop, intltool, gtk3,
+libnotify, lcms2, libxklavier, libgnomekbd, libcanberra, pulseaudio, upower, libcanberra_gtk3, colord,
+systemd, libxslt, docbook_xsl, makeWrapper, gsettings_desktop_schemas}:
+
+let
+ version = "2.0.10";
+in
+stdenv.mkDerivation {
+ name = "cinnamon-settings-daemon-${version}";
+
+ src = fetchurl {
+ url = "http://github.com/linuxmint/cinnamon-settings-daemon/archive/${version}.tar.gz";
+ sha256 = "10r75xsngb7ipv9fy07dyfb256bqybzcxbwny60sgjhrksk3v9mg";
+ };
+
+ NIX_CFLAGS_COMPILE = "-I${glib}/include/gio-unix-2.0";
+
+ configureFlags = "--enable-systemd" ;
+
+ patches = [ ./systemd-support.patch ./automount-plugin.patch ./dpms.patch];
+
+ buildInputs = [
+ pkgconfig autoreconfHook
+ glib gettext gnome_common
+ intltool gtk3 libnotify lcms2
+ libgnomekbd libxklavier colord
+ libcanberra pulseaudio upower
+ libcanberra_gtk3 cinnamon-desktop
+ systemd libxslt docbook_xsl makeWrapper
+ gsettings_desktop_schemas
+ ];
+
+ preBuild = "patchShebangs ./scripts";
+
+ #ToDo: missing org.cinnamon.gschema.xml, probably not packaged yet
+ postFixup = ''
+ for f in "$out"/libexec/*; do
+ wrapProgram "$f" --prefix XDG_DATA_DIRS : "$GSETTINGS_SCHEMAS_PATH"
+ done
+ '';
+
+
+ meta = {
+ homepage = "http://cinnamon.linuxmint.com";
+ description = "The cinnamon session files" ;
+
+ platforms = stdenv.lib.platforms.linux;
+ maintainers = [ stdenv.lib.maintainers.roelof ];
+ };
+}
+
diff --git a/pkgs/desktops/cinnamon/dpms.patch b/pkgs/desktops/cinnamon/dpms.patch
new file mode 100644
index 00000000000..a73f33dc618
--- /dev/null
+++ b/pkgs/desktops/cinnamon/dpms.patch
@@ -0,0 +1,30 @@
+
+-- a/plugins/power/csd-power-manager.c
++++ b/plugins/power/csd-power-manager.c
+@@ -33,6 +33,8 @@
+ #include
+ #include
+
++#include
++
+ #define GNOME_DESKTOP_USE_UNSTABLE_API
+ #include
+
+@@ -3967,6 +3790,17 @@ csd_power_manager_start (CsdPowerManager
+ /* set the initial dim time that can adapt for the user */
+ refresh_idle_dim_settings (manager);
+
++ /* Make sure that Xorg's DPMS extension never gets in our way. The defaults seem to have changed in Xorg 1.14
++ * being "0" by default to being "600" by default
++ * https://bugzilla.gnome.org/show_bug.cgi?id=709114
++ */
++ gdk_error_trap_push ();
++ int dummy;
++ if (DPMSQueryExtension(GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()), &dummy, &dummy)) {
++ DPMSSetTimeouts (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()), 0, 0, 0);
++ }
++ gdk_error_trap_pop_ignored ();
++
+ manager->priv->xscreensaver_watchdog_timer_id = g_timeout_add_seconds (XSCREENSAVER_WATCHDOG_TIMEOUT,
+ disable_builtin_screensaver,
+ NULL);
diff --git a/pkgs/desktops/cinnamon/gtkdoc.patch b/pkgs/desktops/cinnamon/gtkdoc.patch
new file mode 100644
index 00000000000..6398306a76a
--- /dev/null
+++ b/pkgs/desktops/cinnamon/gtkdoc.patch
@@ -0,0 +1,41 @@
+--- a/src/meta/prefs.h
++++ b/src/meta/prefs.h
+@@ -310,13 +310,13 @@ typedef struct
+ */
+ GSList *bindings;
+
+- /** for keybindings that can have shift or not like Alt+Tab */
++ /* for keybindings that can have shift or not like Alt+Tab */
+ gboolean add_shift:1;
+
+- /** for keybindings that apply only to a window */
++ /* for keybindings that apply only to a window */
+ gboolean per_window:1;
+
+- /** for keybindings not added with meta_display_add_keybinding() */
++ /* for keybindings not added with meta_display_add_keybinding() */
+ gboolean builtin:1;
+ } MetaKeyPref;
+
+@@ -339,5 +339,3 @@ CDesktopVisualBellType meta_prefs_get_vi
+ MetaPlacementMode meta_prefs_get_placement_mode (void);
+
+ #endif
+-
+-
+--- a/src/core/workspace.c
++++ b/src/core/workspace.c
+@@ -194,7 +194,7 @@ meta_workspace_new (MetaScreen *screen)
+ return workspace;
+ }
+
+-/** Foreach function for workspace_free_struts() */
++/* Foreach function for workspace_free_struts() */
+ static void
+ free_this (gpointer candidate, gpointer dummy)
+ {
+@@ -1390,4 +1390,3 @@ meta_workspace_get_screen (MetaWorkspace
+ {
+ return workspace->screen;
+ }
+-
diff --git a/pkgs/desktops/cinnamon/keyboard.patch b/pkgs/desktops/cinnamon/keyboard.patch
new file mode 100644
index 00000000000..f67d961ff58
--- /dev/null
+++ b/pkgs/desktops/cinnamon/keyboard.patch
@@ -0,0 +1,4729 @@
+
+diff -uNrp a/cinnamon-settings-daemon/main.c b/cinnamon-settings-daemon/main.c
+--- a/cinnamon-settings-daemon/main.c 2013-08-24 18:04:31.000000000 +0100
++++ b/cinnamon-settings-daemon/main.c 2013-08-25 16:36:02.000000000 +0100
+@@ -319,6 +319,29 @@ set_legacy_ibus_env_vars (GDBusProxy *pr
+ }
+ #endif
+
++static void
++got_session_proxy (GObject *source_object,
++ GAsyncResult *res,
++ gpointer user_data)
++{
++ GDBusProxy *proxy;
++ GError *error = NULL;
++
++ proxy = g_dbus_proxy_new_finish (res, &error);
++ if (proxy == NULL) {
++ g_debug ("Could not connect to the Session manager: %s", error->message);
++ g_error_free (error);
++ } else {
++ set_locale (proxy);
++#ifdef HAVE_IBUS
++ /* This will register with cinnamon-session after calling Setenv. */
++ set_legacy_ibus_env_vars (proxy);
++#else
++ register_with_gnome_session (proxy);
++#endif
++ }
++}
++
+ static gboolean
+ on_term_signal_pipe_closed (GIOChannel *source,
+ GIOCondition condition,
+@@ -368,6 +391,16 @@ set_session_over_handler (GDBusConnectio
+ {
+ g_assert (bus != NULL);
+
++ g_dbus_proxy_new (bus,
++ G_DBUS_PROXY_FLAGS_NONE,
++ NULL,
++ GNOME_SESSION_DBUS_NAME,
++ GNOME_SESSION_DBUS_OBJECT,
++ GNOME_SESSION_DBUS_INTERFACE,
++ NULL,
++ (GAsyncReadyCallback) got_session_proxy,
++ NULL);
++
+ watch_for_term_signal (manager);
+ }
+
+@@ -390,56 +423,6 @@ name_lost_handler (GDBusConnection *conn
+ gtk_main_quit ();
+ }
+
+-static gboolean
+-do_register_client (gpointer user_data)
+-{
+- GDBusProxy *proxy = (GDBusProxy *) user_data;
+- g_assert (proxy != NULL);
+-
+- const char *startup_id = g_getenv ("DESKTOP_AUTOSTART_ID");
+- g_dbus_proxy_call (proxy,
+- "RegisterClient",
+- g_variant_new ("(ss)", "cinnamon-settings-daemon", startup_id ? startup_id : ""),
+- G_DBUS_CALL_FLAGS_NONE,
+- -1,
+- NULL,
+- (GAsyncReadyCallback) on_client_registered,
+- manager);
+-
+- return FALSE;
+-}
+-
+-static void
+-queue_register_client (void)
+-{
+- GDBusConnection *bus = g_bus_get_sync (G_BUS_TYPE_SESSION, NULL, NULL);
+- if (!bus)
+- return;
+-
+- GError *error = NULL;
+- GDBusProxy *proxy = g_dbus_proxy_new_sync (bus,
+- G_DBUS_PROXY_FLAGS_NONE,
+- NULL,
+- GNOME_SESSION_DBUS_NAME,
+- GNOME_SESSION_DBUS_OBJECT,
+- GNOME_SESSION_DBUS_INTERFACE,
+- NULL,
+- &error);
+- g_object_unref (bus);
+-
+- if (proxy == NULL) {
+- g_debug ("Could not connect to the Session manager: %s", error->message);
+- g_error_free (error);
+- return;
+- }
+-
+- /* Register the daemon with cinnamon-session */
+- g_signal_connect (G_OBJECT (proxy), "g-signal",
+- G_CALLBACK (on_session_over), NULL);
+-
+- g_idle_add_full (G_PRIORITY_DEFAULT, do_register_client, proxy, NULL);
+-}
+-
+ static void
+ bus_register (void)
+ {
+@@ -541,8 +524,6 @@ main (int argc, char *argv[])
+
+ notify_init ("cinnamon-settings-daemon");
+
+- queue_register_client ();
+-
+ bus_register ();
+
+ cinnamon_settings_profile_start ("cinnamon_settings_manager_new");
+diff -uNrp a/configure.ac b/configure.ac
+--- a/configure.ac 2013-08-24 18:04:31.000000000 +0100
++++ b/configure.ac 2013-08-25 16:36:02.000000000 +0100
+@@ -53,6 +53,7 @@ UPOWER_GLIB_REQUIRED_VERSION=0.9.1
+ PA_REQUIRED_VERSION=0.9.16
+ UPOWER_REQUIRED_VERSION=0.9.11
+ GTK_XINPUT_2_3_VERSION=3.7.8
++IBUS_REQUIRED_VERSION=1.4.2
+
+ #EXTRA_COMPILE_WARNINGS(yes)
+
+@@ -199,8 +200,21 @@ dnl ------------------------------------
+ dnl - Keyboard plugin stuff
+ dnl ---------------------------------------------------------------------------
+
+-LIBGNOMEKBD_REQUIRED=2.91.1
+-PKG_CHECK_MODULES(KEYBOARD, [libgnomekbdui >= $LIBGNOMEKBD_REQUIRED libgnomekbd >= $LIBGNOMEKBD_REQUIRED libxklavier >= 5.0 kbproto])
++AC_ARG_ENABLE(ibus,
++ AS_HELP_STRING([--disable-ibus],
++ [Disable IBus support]),
++ enable_ibus=$enableval,
++ enable_ibus=yes)
++
++if test "x$enable_ibus" = "xyes" ; then
++ IBUS_MODULE="ibus-1.0 >= $IBUS_REQUIRED_VERSION"
++ AC_DEFINE(HAVE_IBUS, 1, [Defined if IBus support is enabled])
++else
++ IBUS_MODULE=
++fi
++AM_CONDITIONAL(HAVE_IBUS, test "x$enable_ibus" == "xyes")
++
++PKG_CHECK_MODULES(KEYBOARD, xkbfile $IBUS_MODULE cinnamon-desktop >= $CINNAMON_DESKTOP_REQUIRED_VERSION)
+
+ dnl ---------------------------------------------------------------------------
+ dnl - Housekeeping plugin stuff
+diff -uNrp a/data/org.cinnamon.settings-daemon.plugins.media-keys.gschema.xml.in.in b/data/org.cinnamon.settings-daemon.plugins.media-keys.gschema.xml.in.in
+--- a/data/org.cinnamon.settings-daemon.plugins.media-keys.gschema.xml.in.in 2013-08-24 18:04:31.000000000 +0100
++++ b/data/org.cinnamon.settings-daemon.plugins.media-keys.gschema.xml.in.in 2013-08-25 16:36:02.000000000 +0100
+@@ -175,6 +175,15 @@
+ <_summary>Magnifier zoom out
+ <_description>Binding for the magnifier to zoom out
+
++
++ ''
++ <_summary>Switch input source
++ <_description>Binding to select the next input source
++
++
++ ''
++ <_summary>Switch input source backward
++ <_description>Binding to select the previous input source
++
+
+-
+-
++
+\ No newline at end of file
+diff -uNrp a/plugins/keyboard/csd-keyboard-manager.c b/plugins/keyboard/csd-keyboard-manager.c
+--- a/plugins/keyboard/csd-keyboard-manager.c 2013-08-24 18:04:31.000000000 +0100
++++ b/plugins/keyboard/csd-keyboard-manager.c 2013-08-25 16:36:02.000000000 +0100
+@@ -40,19 +40,22 @@
+
+ #include
+ #include
++#include
++
++#define GNOME_DESKTOP_USE_UNSTABLE_API
++#include
++
++#ifdef HAVE_IBUS
++#include
++#endif
+
+ #include "cinnamon-settings-profile.h"
+ #include "csd-keyboard-manager.h"
++#include "csd-input-helper.h"
+ #include "csd-enums.h"
+
+-#include "csd-keyboard-xkb.h"
+-
+ #define CSD_KEYBOARD_MANAGER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), CSD_TYPE_KEYBOARD_MANAGER, CsdKeyboardManagerPrivate))
+
+-#ifndef HOST_NAME_MAX
+-# define HOST_NAME_MAX 255
+-#endif
+-
+ #define CSD_KEYBOARD_DIR "org.cinnamon.settings-daemon.peripherals.keyboard"
+
+ #define KEY_REPEAT "repeat"
+@@ -60,6 +63,7 @@
+ #define KEY_INTERVAL "repeat-interval"
+ #define KEY_DELAY "delay"
+ #define KEY_CLICK_VOLUME "click-volume"
++#define KEY_REMEMBER_NUMLOCK_STATE "remember-numlock-state"
+ #define KEY_NUMLOCK_STATE "numlock-state"
+
+ #define KEY_BELL_VOLUME "bell-volume"
+@@ -67,27 +71,560 @@
+ #define KEY_BELL_DURATION "bell-duration"
+ #define KEY_BELL_MODE "bell-mode"
+
+-#define LIBGNOMEKBD_KEYBOARD_DIR "org.gnome.libgnomekbd.keyboard"
+-#define LIBGNOMEKBD_KEY_LAYOUTS "layouts"
++#define KEY_SWITCHER "input-sources-switcher"
++
++#define GNOME_DESKTOP_INTERFACE_DIR "org.cinnamon.desktop.interface"
++
++#define KEY_GTK_IM_MODULE "gtk-im-module"
++#define GTK_IM_MODULE_SIMPLE "gtk-im-context-simple"
++#define GTK_IM_MODULE_IBUS "ibus"
++
++#define GNOME_DESKTOP_INPUT_SOURCES_DIR "org.cinnamon.desktop.input-sources"
++
++#define KEY_CURRENT_INPUT_SOURCE "current"
++#define KEY_INPUT_SOURCES "sources"
++#define KEY_KEYBOARD_OPTIONS "xkb-options"
++
++#define INPUT_SOURCE_TYPE_XKB "xkb"
++#define INPUT_SOURCE_TYPE_IBUS "ibus"
++
++#define DEFAULT_LANGUAGE "en_US"
+
+ struct CsdKeyboardManagerPrivate
+ {
+ guint start_idle_id;
+ GSettings *settings;
+- GSettings *libgnomekbd_settings;
+- gboolean have_xkb;
++ GSettings *input_sources_settings;
++ GSettings *interface_settings;
++ GnomeXkbInfo *xkb_info;
++#ifdef HAVE_IBUS
++ IBusBus *ibus;
++ GHashTable *ibus_engines;
++ GHashTable *ibus_xkb_engines;
++ GCancellable *ibus_cancellable;
++ gboolean session_is_fallback;
++#endif
+ gint xkb_event_base;
+ CsdNumLockState old_state;
++ GdkDeviceManager *device_manager;
++ guint device_added_id;
++ guint device_removed_id;
++
++ gboolean input_sources_switcher_spawned;
++ GPid input_sources_switcher_pid;
+ };
+
+ static void csd_keyboard_manager_class_init (CsdKeyboardManagerClass *klass);
+ static void csd_keyboard_manager_init (CsdKeyboardManager *keyboard_manager);
+ static void csd_keyboard_manager_finalize (GObject *object);
++static gboolean apply_input_sources_settings (GSettings *settings,
++ gpointer keys,
++ gint n_keys,
++ CsdKeyboardManager *manager);
++static void set_gtk_im_module (CsdKeyboardManager *manager,
++ const gchar *new_module);
+
+ G_DEFINE_TYPE (CsdKeyboardManager, csd_keyboard_manager, G_TYPE_OBJECT)
+
+ static gpointer manager_object = NULL;
+
++static void
++init_builder_with_sources (GVariantBuilder *builder,
++ GSettings *settings)
++{
++ const gchar *type;
++ const gchar *id;
++ GVariantIter iter;
++ GVariant *sources;
++
++ sources = g_settings_get_value (settings, KEY_INPUT_SOURCES);
++
++ g_variant_builder_init (builder, G_VARIANT_TYPE ("a(ss)"));
++
++ g_variant_iter_init (&iter, sources);
++ while (g_variant_iter_next (&iter, "(&s&s)", &type, &id))
++ g_variant_builder_add (builder, "(ss)", type, id);
++
++ g_variant_unref (sources);
++}
++
++static gboolean
++schema_is_installed (const gchar *name)
++{
++ const gchar * const *schemas;
++ const gchar * const *s;
++
++ schemas = g_settings_list_schemas ();
++ for (s = schemas; *s; ++s)
++ if (g_str_equal (*s, name))
++ return TRUE;
++
++ return FALSE;
++}
++
++#ifdef HAVE_IBUS
++static void
++clear_ibus (CsdKeyboardManager *manager)
++{
++ CsdKeyboardManagerPrivate *priv = manager->priv;
++
++ g_cancellable_cancel (priv->ibus_cancellable);
++ g_clear_object (&priv->ibus_cancellable);
++ g_clear_pointer (&priv->ibus_engines, g_hash_table_destroy);
++ g_clear_pointer (&priv->ibus_xkb_engines, g_hash_table_destroy);
++ g_clear_object (&priv->ibus);
++}
++
++static gchar *
++make_xkb_source_id (const gchar *engine_id)
++{
++ gchar *id;
++ gchar *p;
++ gint n_colons = 0;
++
++ /* engine_id is like "xkb:layout:variant:lang" where
++ * 'variant' and 'lang' might be empty */
++
++ engine_id += 4;
++
++ for (p = (gchar *)engine_id; *p; ++p)
++ if (*p == ':')
++ if (++n_colons == 2)
++ break;
++ if (!*p)
++ return NULL;
++
++ id = g_strndup (engine_id, p - engine_id + 1);
++
++ id[p - engine_id] = '\0';
++
++ /* id is "layout:variant" where 'variant' might be empty */
++
++ for (p = id; *p; ++p)
++ if (*p == ':') {
++ if (*(p + 1) == '\0')
++ *p = '\0';
++ else
++ *p = '+';
++ break;
++ }
++
++ /* id is "layout+variant" or "layout" */
++
++ return id;
++}
++
++static void
++fetch_ibus_engines_result (GObject *object,
++ GAsyncResult *result,
++ CsdKeyboardManager *manager)
++{
++ CsdKeyboardManagerPrivate *priv = manager->priv;
++ GList *list, *l;
++ GError *error = NULL;
++
++ /* engines shouldn't be there yet */
++ g_return_if_fail (priv->ibus_engines == NULL);
++
++ g_clear_object (&priv->ibus_cancellable);
++
++ list = ibus_bus_list_engines_async_finish (priv->ibus,
++ result,
++ &error);
++ if (!list && error) {
++ if (!g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED))
++ g_warning ("Couldn't finish IBus request: %s", error->message);
++ g_error_free (error);
++
++ clear_ibus (manager);
++ return;
++ }
++
++ /* Maps IBus engine ids to engine description objects */
++ priv->ibus_engines = g_hash_table_new_full (g_str_hash, g_str_equal, NULL, g_object_unref);
++ /* Maps XKB source id strings to engine description objects */
++ priv->ibus_xkb_engines = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, NULL);
++
++ for (l = list; l; l = l->next) {
++ IBusEngineDesc *engine = l->data;
++ const gchar *engine_id = ibus_engine_desc_get_name (engine);
++
++ g_hash_table_replace (priv->ibus_engines, (gpointer)engine_id, engine);
++
++ if (strncmp ("xkb:", engine_id, 4) == 0) {
++ gchar *xkb_source_id = make_xkb_source_id (engine_id);
++ if (xkb_source_id)
++ g_hash_table_replace (priv->ibus_xkb_engines,
++ xkb_source_id,
++ engine);
++ }
++ }
++ g_list_free (list);
++
++ apply_input_sources_settings (priv->input_sources_settings, NULL, 0, manager);
++}
++
++static void
++fetch_ibus_engines (CsdKeyboardManager *manager)
++{
++ CsdKeyboardManagerPrivate *priv = manager->priv;
++
++ /* engines shouldn't be there yet */
++ g_return_if_fail (priv->ibus_engines == NULL);
++ g_return_if_fail (priv->ibus_cancellable == NULL);
++
++ priv->ibus_cancellable = g_cancellable_new ();
++
++ ibus_bus_list_engines_async (priv->ibus,
++ -1,
++ priv->ibus_cancellable,
++ (GAsyncReadyCallback)fetch_ibus_engines_result,
++ manager);
++}
++
++static void
++maybe_start_ibus (CsdKeyboardManager *manager,
++ GVariant *sources)
++{
++ gboolean need_ibus = FALSE;
++ GVariantIter iter;
++ const gchar *type;
++
++ if (manager->priv->session_is_fallback)
++ return;
++
++ g_variant_iter_init (&iter, sources);
++ while (g_variant_iter_next (&iter, "(&s&s)", &type, NULL))
++ if (g_str_equal (type, INPUT_SOURCE_TYPE_IBUS)) {
++ need_ibus = TRUE;
++ break;
++ }
++
++ if (!need_ibus)
++ return;
++
++ if (!manager->priv->ibus) {
++ ibus_init ();
++ manager->priv->ibus = ibus_bus_new ();
++ g_signal_connect_swapped (manager->priv->ibus, "connected",
++ G_CALLBACK (fetch_ibus_engines), manager);
++ g_signal_connect_swapped (manager->priv->ibus, "disconnected",
++ G_CALLBACK (clear_ibus), manager);
++ }
++ /* IBus doesn't export API in the session bus. The only thing
++ * we have there is a well known name which we can use as a
++ * sure-fire way to activate it. */
++ g_bus_unwatch_name (g_bus_watch_name (G_BUS_TYPE_SESSION,
++ IBUS_SERVICE_IBUS,
++ G_BUS_NAME_WATCHER_FLAGS_AUTO_START,
++ NULL,
++ NULL,
++ NULL,
++ NULL));
++}
++
++static void
++got_session_name (GObject *object,
++ GAsyncResult *res,
++ CsdKeyboardManager *manager)
++{
++ GVariant *result, *variant;
++ GDBusConnection *connection = G_DBUS_CONNECTION (object);
++ CsdKeyboardManagerPrivate *priv = manager->priv;
++ const gchar *session_name = NULL;
++ GError *error = NULL;
++
++ /* IBus shouldn't have been touched yet */
++ g_return_if_fail (priv->ibus == NULL);
++
++ g_clear_object (&priv->ibus_cancellable);
++
++ result = g_dbus_connection_call_finish (connection, res, &error);
++ if (!result) {
++ g_warning ("Couldn't get session name: %s", error->message);
++ g_error_free (error);
++ goto out;
++ }
++
++ g_variant_get (result, "(v)", &variant);
++ g_variant_unref (result);
++
++ g_variant_get (variant, "&s", &session_name);
++
++ if (g_strcmp0 (session_name, "gnome") == 0)
++ manager->priv->session_is_fallback = FALSE;
++
++ g_variant_unref (variant);
++ out:
++ apply_input_sources_settings (manager->priv->input_sources_settings, NULL, 0, manager);
++ g_object_unref (connection);
++}
++
++static void
++got_bus (GObject *object,
++ GAsyncResult *res,
++ CsdKeyboardManager *manager)
++{
++ GDBusConnection *connection;
++ CsdKeyboardManagerPrivate *priv = manager->priv;
++ GError *error = NULL;
++
++ /* IBus shouldn't have been touched yet */
++ g_return_if_fail (priv->ibus == NULL);
++
++ g_clear_object (&priv->ibus_cancellable);
++
++ connection = g_bus_get_finish (res, &error);
++ if (!connection) {
++ g_warning ("Couldn't get session bus: %s", error->message);
++ g_error_free (error);
++ apply_input_sources_settings (priv->input_sources_settings, NULL, 0, manager);
++ return;
++ }
++
++ priv->ibus_cancellable = g_cancellable_new ();
++
++ g_dbus_connection_call (connection,
++ "org.gnome.SessionManager",
++ "/org/gnome/SessionManager",
++ "org.freedesktop.DBus.Properties",
++ "Get",
++ g_variant_new ("(ss)",
++ "org.gnome.SessionManager",
++ "SessionName"),
++ NULL,
++ G_DBUS_CALL_FLAGS_NONE,
++ -1,
++ priv->ibus_cancellable,
++ (GAsyncReadyCallback)got_session_name,
++ manager);
++}
++
++static void
++set_ibus_engine_finish (GObject *object,
++ GAsyncResult *res,
++ CsdKeyboardManager *manager)
++{
++ gboolean result;
++ IBusBus *ibus = IBUS_BUS (object);
++ CsdKeyboardManagerPrivate *priv = manager->priv;
++ GError *error = NULL;
++
++ g_clear_object (&priv->ibus_cancellable);
++
++ result = ibus_bus_set_global_engine_async_finish (ibus, res, &error);
++ if (!result) {
++ if (!g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED))
++ g_warning ("Couldn't set IBus engine: %s", error->message);
++ g_error_free (error);
++ }
++}
++
++static void
++set_ibus_engine (CsdKeyboardManager *manager,
++ const gchar *engine_id)
++{
++ CsdKeyboardManagerPrivate *priv = manager->priv;
++
++ g_return_if_fail (priv->ibus != NULL);
++ g_return_if_fail (priv->ibus_engines != NULL);
++
++ g_cancellable_cancel (priv->ibus_cancellable);
++ g_clear_object (&priv->ibus_cancellable);
++ priv->ibus_cancellable = g_cancellable_new ();
++
++ ibus_bus_set_global_engine_async (priv->ibus,
++ engine_id,
++ -1,
++ priv->ibus_cancellable,
++ (GAsyncReadyCallback)set_ibus_engine_finish,
++ manager);
++}
++
++static void
++set_ibus_xkb_engine (CsdKeyboardManager *manager,
++ const gchar *xkb_id)
++{
++ IBusEngineDesc *engine;
++ CsdKeyboardManagerPrivate *priv = manager->priv;
++
++ if (!priv->ibus_xkb_engines)
++ return;
++
++ engine = g_hash_table_lookup (priv->ibus_xkb_engines, xkb_id);
++ if (!engine)
++ return;
++
++ set_ibus_engine (manager, ibus_engine_desc_get_name (engine));
++}
++
++/* XXX: See upstream bug:
++ * https://codereview.appspot.com/6586075/ */
++static gchar *
++layout_from_ibus_layout (const gchar *ibus_layout)
++{
++ const gchar *p;
++
++ /* we get something like "layout(variant)[option1,option2]" */
++
++ p = ibus_layout;
++ while (*p) {
++ if (*p == '(' || *p == '[')
++ break;
++ p += 1;
++ }
++
++ return g_strndup (ibus_layout, p - ibus_layout);
++}
++
++static gchar *
++variant_from_ibus_layout (const gchar *ibus_layout)
++{
++ const gchar *a, *b;
++
++ /* we get something like "layout(variant)[option1,option2]" */
++
++ a = ibus_layout;
++ while (*a) {
++ if (*a == '(')
++ break;
++ a += 1;
++ }
++ if (!*a)
++ return NULL;
++
++ a += 1;
++ b = a;
++ while (*b) {
++ if (*b == ')')
++ break;
++ b += 1;
++ }
++ if (!*b)
++ return NULL;
++
++ return g_strndup (a, b - a);
++}
++
++static gchar **
++options_from_ibus_layout (const gchar *ibus_layout)
++{
++ const gchar *a, *b;
++ GPtrArray *opt_array;
++
++ /* we get something like "layout(variant)[option1,option2]" */
++
++ a = ibus_layout;
++ while (*a) {
++ if (*a == '[')
++ break;
++ a += 1;
++ }
++ if (!*a)
++ return NULL;
++
++ opt_array = g_ptr_array_new ();
++
++ do {
++ a += 1;
++ b = a;
++ while (*b) {
++ if (*b == ',' || *b == ']')
++ break;
++ b += 1;
++ }
++ if (!*b)
++ goto out;
++
++ g_ptr_array_add (opt_array, g_strndup (a, b - a));
++
++ a = b;
++ } while (*a && *a == ',');
++
++out:
++ g_ptr_array_add (opt_array, NULL);
++ return (gchar **) g_ptr_array_free (opt_array, FALSE);
++}
++
++static const gchar *
++engine_from_locale (void)
++{
++ const gchar *locale;
++ const gchar *locale_engine[][2] = {
++ { "as_IN", "m17n:as:phonetic" },
++ { "bn_IN", "m17n:bn:inscript" },
++ { "gu_IN", "m17n:gu:inscript" },
++ { "hi_IN", "m17n:hi:inscript" },
++ { "ja_JP", "anthy" },
++ { "kn_IN", "m17n:kn:kgp" },
++ { "ko_KR", "hangul" },
++ { "mai_IN", "m17n:mai:inscript" },
++ { "ml_IN", "m17n:ml:inscript" },
++ { "mr_IN", "m17n:mr:inscript" },
++ { "or_IN", "m17n:or:inscript" },
++ { "pa_IN", "m17n:pa:inscript" },
++ { "sd_IN", "m17n:sd:inscript" },
++ { "ta_IN", "m17n:ta:tamil99" },
++ { "te_IN", "m17n:te:inscript" },
++ { "zh_CN", "pinyin" },
++ { "zh_HK", "cangjie3" },
++ { "zh_TW", "chewing" },
++ };
++ gint i;
++
++ locale = setlocale (LC_CTYPE, NULL);
++ if (!locale)
++ return NULL;
++
++ for (i = 0; i < G_N_ELEMENTS (locale_engine); ++i)
++ if (g_str_has_prefix (locale, locale_engine[i][0]))
++ return locale_engine[i][1];
++
++ return NULL;
++}
++
++static void
++add_ibus_sources_from_locale (GSettings *settings)
++{
++ const gchar *locale_engine;
++ GVariantBuilder builder;
++
++ locale_engine = engine_from_locale ();
++ if (!locale_engine)
++ return;
++
++ init_builder_with_sources (&builder, settings);
++ g_variant_builder_add (&builder, "(ss)", INPUT_SOURCE_TYPE_IBUS, locale_engine);
++ g_settings_set_value (settings, KEY_INPUT_SOURCES, g_variant_builder_end (&builder));
++}
++
++static void
++convert_ibus (GSettings *settings)
++{
++ GVariantBuilder builder;
++ GSettings *ibus_settings;
++ gchar **engines, **e;
++
++ if (!schema_is_installed ("org.freedesktop.ibus.general"))
++ return;
++
++ init_builder_with_sources (&builder, settings);
++
++ ibus_settings = g_settings_new ("org.freedesktop.ibus.general");
++ engines = g_settings_get_strv (ibus_settings, "preload-engines");
++ for (e = engines; *e; ++e) {
++ if (g_str_has_prefix (*e, "xkb:"))
++ continue;
++ g_variant_builder_add (&builder, "(ss)", INPUT_SOURCE_TYPE_IBUS, *e);
++ }
++
++ g_settings_set_value (settings, KEY_INPUT_SOURCES, g_variant_builder_end (&builder));
++
++ g_strfreev (engines);
++ g_object_unref (ibus_settings);
++}
++#endif /* HAVE_IBUS */
++
+ static gboolean
+ xkb_set_keyboard_autorepeat_rate (guint delay, guint interval)
+ {
+@@ -97,32 +634,33 @@ xkb_set_keyboard_autorepeat_rate (guint
+ interval);
+ }
+
+-static void
+-numlock_xkb_init (CsdKeyboardManager *manager)
++static gboolean
++check_xkb_extension (CsdKeyboardManager *manager)
+ {
+ Display *dpy = GDK_DISPLAY_XDISPLAY (gdk_display_get_default ());
+- gboolean have_xkb;
+ int opcode, error_base, major, minor;
++ gboolean have_xkb;
+
+ have_xkb = XkbQueryExtension (dpy,
+ &opcode,
+ &manager->priv->xkb_event_base,
+ &error_base,
+ &major,
+- &minor)
+- && XkbUseExtension (dpy, &major, &minor);
++ &minor);
++ return have_xkb;
++}
+
+- if (have_xkb) {
+- XkbSelectEventDetails (dpy,
+- XkbUseCoreKbd,
+- XkbStateNotifyMask,
+- XkbModifierLockMask,
+- XkbModifierLockMask);
+- } else {
+- g_warning ("XKB extension not available");
+- }
++static void
++xkb_init (CsdKeyboardManager *manager)
++{
++ Display *dpy;
+
+- manager->priv->have_xkb = have_xkb;
++ dpy = GDK_DISPLAY_XDISPLAY (gdk_display_get_default ());
++ XkbSelectEventDetails (dpy,
++ XkbUseCoreKbd,
++ XkbStateNotify,
++ XkbModifierLockMask,
++ XkbModifierLockMask);
+ }
+
+ static unsigned
+@@ -143,19 +681,32 @@ numlock_set_xkb_state (CsdNumLockState n
+ XkbLockModifiers (dpy, XkbUseCoreKbd, num_mask, new_state == CSD_NUM_LOCK_STATE_ON ? num_mask : 0);
+ }
+
++static const char *
++num_lock_state_to_string (CsdNumLockState numlock_state)
++{
++ switch (numlock_state) {
++ case CSD_NUM_LOCK_STATE_UNKNOWN:
++ return "CSD_NUM_LOCK_STATE_UNKNOWN";
++ case CSD_NUM_LOCK_STATE_ON:
++ return "CSD_NUM_LOCK_STATE_ON";
++ case CSD_NUM_LOCK_STATE_OFF:
++ return "CSD_NUM_LOCK_STATE_OFF";
++ default:
++ return "UNKNOWN";
++ }
++}
++
+ static GdkFilterReturn
+-numlock_xkb_callback (GdkXEvent *xev_,
+- GdkEvent *gdkev_,
+- gpointer user_data)
++xkb_events_filter (GdkXEvent *xev_,
++ GdkEvent *gdkev_,
++ gpointer user_data)
+ {
+ XEvent *xev = (XEvent *) xev_;
+ XkbEvent *xkbev = (XkbEvent *) xev;
+ CsdKeyboardManager *manager = (CsdKeyboardManager *) user_data;
+
+- if (xev->type != manager->priv->xkb_event_base)
+- return GDK_FILTER_CONTINUE;
+-
+- if (xkbev->any.xkb_type != XkbStateNotify)
++ if (xev->type != manager->priv->xkb_event_base ||
++ xkbev->any.xkb_type != XkbStateNotify)
+ return GDK_FILTER_CONTINUE;
+
+ if (xkbev->state.changed & XkbModifierLockMask) {
+@@ -166,6 +717,9 @@ numlock_xkb_callback (GdkXEvent *xev_,
+ numlock_state = (num_mask & locked_mods) ? CSD_NUM_LOCK_STATE_ON : CSD_NUM_LOCK_STATE_OFF;
+
+ if (numlock_state != manager->priv->old_state) {
++ g_debug ("New num-lock state '%s' != Old num-lock state '%s'",
++ num_lock_state_to_string (numlock_state),
++ num_lock_state_to_string (manager->priv->old_state));
+ g_settings_set_enum (manager->priv->settings,
+ KEY_NUMLOCK_STATE,
+ numlock_state);
+@@ -177,57 +731,509 @@ numlock_xkb_callback (GdkXEvent *xev_,
+ }
+
+ static void
+-numlock_install_xkb_callback (CsdKeyboardManager *manager)
++install_xkb_filter (CsdKeyboardManager *manager)
+ {
+- if (!manager->priv->have_xkb)
+- return;
+-
+ gdk_window_add_filter (NULL,
+- numlock_xkb_callback,
++ xkb_events_filter,
+ manager);
+ }
+
+-static guint
+-_csd_settings_get_uint (GSettings *settings,
+- const char *key)
++static void
++remove_xkb_filter (CsdKeyboardManager *manager)
+ {
+- guint value;
++ gdk_window_remove_filter (NULL,
++ xkb_events_filter,
++ manager);
++}
+
+- g_settings_get (settings, key, "u", &value);
+- return value;
++static void
++free_xkb_component_names (XkbComponentNamesRec *p)
++{
++ g_return_if_fail (p != NULL);
++
++ free (p->keymap);
++ free (p->keycodes);
++ free (p->types);
++ free (p->compat);
++ free (p->symbols);
++ free (p->geometry);
++
++ g_free (p);
++}
++
++static void
++upload_xkb_description (const gchar *rules_file_path,
++ XkbRF_VarDefsRec *var_defs,
++ XkbComponentNamesRec *comp_names)
++{
++ Display *display = GDK_DISPLAY_XDISPLAY (gdk_display_get_default ());
++ XkbDescRec *xkb_desc;
++ gchar *rules_file;
++
++ /* Upload it to the X server using the same method as setxkbmap */
++ xkb_desc = XkbGetKeyboardByName (display,
++ XkbUseCoreKbd,
++ comp_names,
++ XkbGBN_AllComponentsMask,
++ XkbGBN_AllComponentsMask &
++ (~XkbGBN_GeometryMask), True);
++ if (!xkb_desc) {
++ g_warning ("Couldn't upload new XKB keyboard description");
++ return;
++ }
++
++ XkbFreeKeyboard (xkb_desc, 0, True);
++
++ rules_file = g_path_get_basename (rules_file_path);
++
++ if (!XkbRF_SetNamesProp (display, rules_file, var_defs))
++ g_warning ("Couldn't update the XKB root window property");
++
++ g_free (rules_file);
++}
++
++static gchar *
++language_code_from_locale (const gchar *locale)
++{
++ if (!locale || !locale[0] || !locale[1])
++ return NULL;
++
++ if (!locale[2] || locale[2] == '_' || locale[2] == '.')
++ return g_strndup (locale, 2);
++
++ if (!locale[3] || locale[3] == '_' || locale[3] == '.')
++ return g_strndup (locale, 3);
++
++ return NULL;
++}
++
++static gchar *
++build_xkb_group_string (const gchar *user,
++ const gchar *locale,
++ const gchar *latin)
++{
++ gchar *string;
++ gsize length = 0;
++ guint commas = 2;
++
++ if (latin)
++ length += strlen (latin);
++ else
++ commas -= 1;
++
++ if (locale)
++ length += strlen (locale);
++ else
++ commas -= 1;
++
++ length += strlen (user) + commas + 1;
++
++ string = malloc (length);
++
++ if (locale && latin)
++ sprintf (string, "%s,%s,%s", user, locale, latin);
++ else if (locale)
++ sprintf (string, "%s,%s", user, locale);
++ else if (latin)
++ sprintf (string, "%s,%s", user, latin);
++ else
++ sprintf (string, "%s", user);
++
++ return string;
++}
++
++static gboolean
++layout_equal (const gchar *layout_a,
++ const gchar *variant_a,
++ const gchar *layout_b,
++ const gchar *variant_b)
++{
++ return !g_strcmp0 (layout_a, layout_b) && !g_strcmp0 (variant_a, variant_b);
+ }
+
+ static void
+-apply_settings (GSettings *settings,
+- const char *key,
+- CsdKeyboardManager *manager)
++replace_layout_and_variant (CsdKeyboardManager *manager,
++ XkbRF_VarDefsRec *xkb_var_defs,
++ const gchar *layout,
++ const gchar *variant)
+ {
++ /* Toolkits need to know about both a latin layout to handle
++ * accelerators which are usually defined like Ctrl+C and a
++ * layout with the symbols for the language used in UI strings
++ * to handle mnemonics like Alt+Ф, so we try to find and add
++ * them in XKB group slots after the layout which the user
++ * actually intends to type with. */
++ const gchar *latin_layout = "us";
++ const gchar *latin_variant = "";
++ const gchar *locale_layout = NULL;
++ const gchar *locale_variant = NULL;
++ const gchar *locale;
++ gchar *language;
++
++ if (!layout)
++ return;
++
++ if (!variant)
++ variant = "";
++
++ locale = setlocale (LC_MESSAGES, NULL);
++ /* If LANG is empty, default to en_US */
++ if (!locale)
++ language = g_strdup (DEFAULT_LANGUAGE);
++ else
++ language = language_code_from_locale (locale);
++
++ if (!language)
++ language = language_code_from_locale (DEFAULT_LANGUAGE);
++
++ gnome_xkb_info_get_layout_info_for_language (manager->priv->xkb_info,
++ language,
++ NULL,
++ NULL,
++ NULL,
++ &locale_layout,
++ &locale_variant);
++ g_free (language);
++
++ /* We want to minimize the number of XKB groups if we have
++ * duplicated layout+variant pairs.
++ *
++ * Also, if a layout doesn't have a variant we still have to
++ * include it in the variants string because the number of
++ * variants must agree with the number of layouts. For
++ * instance:
++ *
++ * layouts: "us,ru,us"
++ * variants: "dvorak,,"
++ */
++ if (layout_equal (latin_layout, latin_variant, locale_layout, locale_variant) ||
++ layout_equal (latin_layout, latin_variant, layout, variant)) {
++ latin_layout = NULL;
++ latin_variant = NULL;
++ }
++
++ if (layout_equal (locale_layout, locale_variant, layout, variant)) {
++ locale_layout = NULL;
++ locale_variant = NULL;
++ }
++
++ free (xkb_var_defs->layout);
++ xkb_var_defs->layout = build_xkb_group_string (layout, locale_layout, latin_layout);
++
++ free (xkb_var_defs->variant);
++ xkb_var_defs->variant = build_xkb_group_string (variant, locale_variant, latin_variant);
++}
++
++static gchar *
++build_xkb_options_string (gchar **options)
++{
++ gchar *string;
++
++ if (*options) {
++ gint i;
++ gsize len;
++ gchar *ptr;
++
++ /* First part, getting length */
++ len = 1 + strlen (options[0]);
++ for (i = 1; options[i] != NULL; i++)
++ len += strlen (options[i]);
++ len += (i - 1); /* commas */
++
++ /* Second part, building string */
++ string = malloc (len);
++ ptr = g_stpcpy (string, *options);
++ for (i = 1; options[i] != NULL; i++) {
++ ptr = g_stpcpy (ptr, ",");
++ ptr = g_stpcpy (ptr, options[i]);
++ }
++ } else {
++ string = malloc (1);
++ *string = '\0';
++ }
++
++ return string;
++}
++
++static gchar **
++append_options (gchar **a,
++ gchar **b)
++{
++ gchar **c, **p;
++
++ if (!a && !b)
++ return NULL;
++ else if (!a)
++ return g_strdupv (b);
++ else if (!b)
++ return g_strdupv (a);
++
++ c = g_new0 (gchar *, g_strv_length (a) + g_strv_length (b) + 1);
++ p = c;
++
++ while (*a) {
++ *p = g_strdup (*a);
++ p += 1;
++ a += 1;
++ }
++ while (*b) {
++ *p = g_strdup (*b);
++ p += 1;
++ b += 1;
++ }
++
++ return c;
++}
++
++static void
++add_xkb_options (CsdKeyboardManager *manager,
++ XkbRF_VarDefsRec *xkb_var_defs,
++ gchar **extra_options)
++{
++ gchar **options;
++ gchar **settings_options;
++
++ settings_options = g_settings_get_strv (manager->priv->input_sources_settings,
++ KEY_KEYBOARD_OPTIONS);
++ options = append_options (settings_options, extra_options);
++ g_strfreev (settings_options);
++
++ free (xkb_var_defs->options);
++ xkb_var_defs->options = build_xkb_options_string (options);
++
++ g_strfreev (options);
++}
++
++static void
++apply_xkb_settings (CsdKeyboardManager *manager,
++ const gchar *layout,
++ const gchar *variant,
++ gchar **options)
++{
++ XkbRF_RulesRec *xkb_rules;
++ XkbRF_VarDefsRec *xkb_var_defs;
++ gchar *rules_file_path;
++
++ gnome_xkb_info_get_var_defs (&rules_file_path, &xkb_var_defs);
++
++ add_xkb_options (manager, xkb_var_defs, options);
++ replace_layout_and_variant (manager, xkb_var_defs, layout, variant);
++
++ gdk_error_trap_push ();
++
++ xkb_rules = XkbRF_Load (rules_file_path, NULL, True, True);
++ if (xkb_rules) {
++ XkbComponentNamesRec *xkb_comp_names;
++ xkb_comp_names = g_new0 (XkbComponentNamesRec, 1);
++
++ XkbRF_GetComponents (xkb_rules, xkb_var_defs, xkb_comp_names);
++ upload_xkb_description (rules_file_path, xkb_var_defs, xkb_comp_names);
++
++ free_xkb_component_names (xkb_comp_names);
++ XkbRF_Free (xkb_rules, True);
++ } else {
++ g_warning ("Couldn't load XKB rules");
++ }
++
++ if (gdk_error_trap_pop ())
++ g_warning ("Error loading XKB rules");
++
++ gnome_xkb_info_free_var_defs (xkb_var_defs);
++ g_free (rules_file_path);
++}
++
++static void
++set_gtk_im_module (CsdKeyboardManager *manager,
++ const gchar *new_module)
++{
++ CsdKeyboardManagerPrivate *priv = manager->priv;
++ gchar *current_module;
++
++ current_module = g_settings_get_string (priv->interface_settings,
++ KEY_GTK_IM_MODULE);
++ if (!g_str_equal (current_module, new_module))
++ g_settings_set_string (priv->interface_settings,
++ KEY_GTK_IM_MODULE,
++ new_module);
++ g_free (current_module);
++}
++
++static gboolean
++apply_input_sources_settings (GSettings *settings,
++ gpointer keys,
++ gint n_keys,
++ CsdKeyboardManager *manager)
++{
++ CsdKeyboardManagerPrivate *priv = manager->priv;
++ GVariant *sources;
++ guint current;
++ guint n_sources;
++ const gchar *type = NULL;
++ const gchar *id = NULL;
++ gchar *layout = NULL;
++ gchar *variant = NULL;
++ gchar **options = NULL;
++
++ sources = g_settings_get_value (priv->input_sources_settings, KEY_INPUT_SOURCES);
++ current = g_settings_get_uint (priv->input_sources_settings, KEY_CURRENT_INPUT_SOURCE);
++ n_sources = g_variant_n_children (sources);
++
++ if (n_sources < 1)
++ goto exit;
++
++ if (current >= n_sources) {
++ g_settings_set_uint (priv->input_sources_settings,
++ KEY_CURRENT_INPUT_SOURCE,
++ n_sources - 1);
++ goto exit;
++ }
++
++#ifdef HAVE_IBUS
++ maybe_start_ibus (manager, sources);
++#endif
++
++ g_variant_get_child (sources, current, "(&s&s)", &type, &id);
++
++ if (g_str_equal (type, INPUT_SOURCE_TYPE_XKB)) {
++ const gchar *l, *v;
++ gnome_xkb_info_get_layout_info (priv->xkb_info, id, NULL, NULL, &l, &v);
++
++ layout = g_strdup (l);
++ variant = g_strdup (v);
++
++ if (!layout || !layout[0]) {
++ g_warning ("Couldn't find XKB input source '%s'", id);
++ goto exit;
++ }
++ set_gtk_im_module (manager, GTK_IM_MODULE_SIMPLE);
++#ifdef HAVE_IBUS
++ set_ibus_xkb_engine (manager, id);
++#endif
++ } else if (g_str_equal (type, INPUT_SOURCE_TYPE_IBUS)) {
++#ifdef HAVE_IBUS
++ IBusEngineDesc *engine_desc = NULL;
++
++ if (priv->session_is_fallback)
++ goto exit;
++
++ if (priv->ibus_engines)
++ engine_desc = g_hash_table_lookup (priv->ibus_engines, id);
++ else
++ goto exit; /* we'll be called again when ibus is up and running */
++
++ if (engine_desc) {
++ const gchar *ibus_layout;
++ ibus_layout = ibus_engine_desc_get_layout (engine_desc);
++
++ if (ibus_layout) {
++ layout = layout_from_ibus_layout (ibus_layout);
++ variant = variant_from_ibus_layout (ibus_layout);
++ options = options_from_ibus_layout (ibus_layout);
++ }
++ } else {
++ g_warning ("Couldn't find IBus input source '%s'", id);
++ goto exit;
++ }
++
++ set_gtk_im_module (manager, GTK_IM_MODULE_IBUS);
++ set_ibus_engine (manager, id);
++#else
++ g_warning ("IBus input source type specified but IBus support was not compiled");
++#endif
++ } else {
++ g_warning ("Unknown input source type '%s'", type);
++ }
++
++ exit:
++ apply_xkb_settings (manager, layout, variant, options);
++ g_variant_unref (sources);
++ g_free (layout);
++ g_free (variant);
++ g_strfreev (options);
++ /* Prevent individual "changed" signal invocations since we
++ don't need them. */
++ return TRUE;
++}
++
++static void
++apply_bell (CsdKeyboardManager *manager)
++{
++ GSettings *settings;
+ XKeyboardControl kbdcontrol;
+- gboolean repeat;
+ gboolean click;
+- guint interval;
+- guint delay;
+- int click_volume;
+ int bell_volume;
+ int bell_pitch;
+ int bell_duration;
+ CsdBellMode bell_mode;
+- gboolean rnumlock;
+-
+- if (g_strcmp0 (key, KEY_NUMLOCK_STATE) == 0)
+- return;
++ int click_volume;
+
+- repeat = g_settings_get_boolean (settings, KEY_REPEAT);
++ g_debug ("Applying the bell settings");
++ settings = manager->priv->settings;
+ click = g_settings_get_boolean (settings, KEY_CLICK);
+- interval = _csd_settings_get_uint (settings, KEY_INTERVAL);
+- delay = _csd_settings_get_uint (settings, KEY_DELAY);
+ click_volume = g_settings_get_int (settings, KEY_CLICK_VOLUME);
++
+ bell_pitch = g_settings_get_int (settings, KEY_BELL_PITCH);
+ bell_duration = g_settings_get_int (settings, KEY_BELL_DURATION);
+
+ bell_mode = g_settings_get_enum (settings, KEY_BELL_MODE);
+ bell_volume = (bell_mode == CSD_BELL_MODE_ON) ? 50 : 0;
+
++ /* as percentage from 0..100 inclusive */
++ if (click_volume < 0) {
++ click_volume = 0;
++ } else if (click_volume > 100) {
++ click_volume = 100;
++ }
++ kbdcontrol.key_click_percent = click ? click_volume : 0;
++ kbdcontrol.bell_percent = bell_volume;
++ kbdcontrol.bell_pitch = bell_pitch;
++ kbdcontrol.bell_duration = bell_duration;
++
++ gdk_error_trap_push ();
++ XChangeKeyboardControl (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()),
++ KBKeyClickPercent | KBBellPercent | KBBellPitch | KBBellDuration,
++ &kbdcontrol);
++
++ XSync (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()), FALSE);
++ gdk_error_trap_pop_ignored ();
++}
++
++static void
++apply_numlock (CsdKeyboardManager *manager)
++{
++ GSettings *settings;
++ gboolean rnumlock;
++
++ g_debug ("Applying the num-lock settings");
++ settings = manager->priv->settings;
++ rnumlock = g_settings_get_boolean (settings, KEY_REMEMBER_NUMLOCK_STATE);
++ manager->priv->old_state = g_settings_get_enum (manager->priv->settings, KEY_NUMLOCK_STATE);
++
++ gdk_error_trap_push ();
++ if (rnumlock) {
++ g_debug ("Remember num-lock is set, so applying setting '%s'",
++ num_lock_state_to_string (manager->priv->old_state));
++ numlock_set_xkb_state (manager->priv->old_state);
++ }
++
++ XSync (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()), FALSE);
++ gdk_error_trap_pop_ignored ();
++}
++
++static void
++apply_repeat (CsdKeyboardManager *manager)
++{
++ GSettings *settings;
++ gboolean repeat;
++ guint interval;
++ guint delay;
++
++ g_debug ("Applying the repeat settings");
++ settings = manager->priv->settings;
++ repeat = g_settings_get_boolean (settings, KEY_REPEAT);
++ interval = g_settings_get_uint (settings, KEY_INTERVAL);
++ delay = g_settings_get_uint (settings, KEY_DELAY);
++
+ gdk_error_trap_push ();
+ if (repeat) {
+ gboolean rate_set = FALSE;
+@@ -243,124 +1249,319 @@ apply_settings (GSettings *sett
+ XAutoRepeatOff (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()));
+ }
+
+- /* as percentage from 0..100 inclusive */
+- if (click_volume < 0) {
+- click_volume = 0;
+- } else if (click_volume > 100) {
+- click_volume = 100;
++ XSync (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()), FALSE);
++ gdk_error_trap_pop_ignored ();
++}
++
++static void
++apply_all_settings (CsdKeyboardManager *manager)
++{
++ apply_repeat (manager);
++ apply_bell (manager);
++ apply_numlock (manager);
++}
++
++static void
++set_input_sources_switcher (CsdKeyboardManager *manager,
++ gboolean state)
++{
++ if (state) {
++ GError *error = NULL;
++ char *args[2];
++
++ if (manager->priv->input_sources_switcher_spawned)
++ set_input_sources_switcher (manager, FALSE);
++
++ args[0] = LIBEXECDIR "/csd-input-sources-switcher";
++ args[1] = NULL;
++
++ g_spawn_async (NULL, args, NULL,
++ 0, NULL, NULL,
++ &manager->priv->input_sources_switcher_pid, &error);
++
++ manager->priv->input_sources_switcher_spawned = (error == NULL);
++
++ if (error) {
++ g_warning ("Couldn't spawn %s: %s", args[0], error->message);
++ g_error_free (error);
++ }
++ } else if (manager->priv->input_sources_switcher_spawned) {
++ kill (manager->priv->input_sources_switcher_pid, SIGHUP);
++ g_spawn_close_pid (manager->priv->input_sources_switcher_pid);
++ manager->priv->input_sources_switcher_spawned = FALSE;
+ }
+- kbdcontrol.key_click_percent = click ? click_volume : 0;
+- kbdcontrol.bell_percent = bell_volume;
+- kbdcontrol.bell_pitch = bell_pitch;
+- kbdcontrol.bell_duration = bell_duration;
+- XChangeKeyboardControl (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()),
+- KBKeyClickPercent | KBBellPercent | KBBellPitch | KBBellDuration,
+- &kbdcontrol);
++}
+
+- if (g_strcmp0 (key, "remember-numlock-state") == 0 || key == NULL) {
+- rnumlock = g_settings_get_boolean (settings, "remember-numlock-state");
++static gboolean
++enable_switcher (CsdKeyboardManager *manager)
++{
++ CsdInputSourcesSwitcher switcher;
+
+- manager->priv->old_state = g_settings_get_enum (manager->priv->settings, KEY_NUMLOCK_STATE);
++ switcher = g_settings_get_enum (manager->priv->settings, KEY_SWITCHER);
+
+- if (manager->priv->have_xkb && rnumlock)
+- numlock_set_xkb_state (manager->priv->old_state);
++ return switcher != CSD_INPUT_SOURCES_SWITCHER_OFF;
++}
++
++static void
++settings_changed (GSettings *settings,
++ const char *key,
++ CsdKeyboardManager *manager)
++{
++ if (g_strcmp0 (key, KEY_CLICK) == 0||
++ g_strcmp0 (key, KEY_CLICK_VOLUME) == 0 ||
++ g_strcmp0 (key, KEY_BELL_PITCH) == 0 ||
++ g_strcmp0 (key, KEY_BELL_DURATION) == 0 ||
++ g_strcmp0 (key, KEY_BELL_MODE) == 0) {
++ g_debug ("Bell setting '%s' changed, applying bell settings", key);
++ apply_bell (manager);
++ } else if (g_strcmp0 (key, KEY_REMEMBER_NUMLOCK_STATE) == 0) {
++ g_debug ("Remember Num-Lock state '%s' changed, applying num-lock settings", key);
++ apply_numlock (manager);
++ } else if (g_strcmp0 (key, KEY_NUMLOCK_STATE) == 0) {
++ g_debug ("Num-Lock state '%s' changed, will apply at next startup", key);
++ } else if (g_strcmp0 (key, KEY_REPEAT) == 0 ||
++ g_strcmp0 (key, KEY_INTERVAL) == 0 ||
++ g_strcmp0 (key, KEY_DELAY) == 0) {
++ g_debug ("Key repeat setting '%s' changed, applying key repeat settings", key);
++ apply_repeat (manager);
++ } else if (g_strcmp0 (key, KEY_SWITCHER) == 0) {
++ set_input_sources_switcher (manager, enable_switcher (manager));
++ } else {
++ g_warning ("Unhandled settings change, key '%s'", key);
+ }
+
+- XSync (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()), FALSE);
+- gdk_error_trap_pop_ignored ();
+ }
+
+-void
+-csd_keyboard_manager_apply_settings (CsdKeyboardManager *manager)
++static void
++device_added_cb (GdkDeviceManager *device_manager,
++ GdkDevice *device,
++ CsdKeyboardManager *manager)
+ {
+- apply_settings (manager->priv->settings, NULL, manager);
++ GdkInputSource source;
++
++ source = gdk_device_get_source (device);
++ if (source == GDK_SOURCE_KEYBOARD) {
++ g_debug ("New keyboard plugged in, applying all settings");
++ apply_all_settings (manager);
++ apply_input_sources_settings (manager->priv->input_sources_settings, NULL, 0, manager);
++ run_custom_command (device, COMMAND_DEVICE_ADDED);
++ }
+ }
+
+ static void
+-apply_libgnomekbd_settings (GSettings *settings,
+- const char *key,
+- CsdKeyboardManager *manager)
++device_removed_cb (GdkDeviceManager *device_manager,
++ GdkDevice *device,
++ CsdKeyboardManager *manager)
+ {
+- gchar **layouts;
++ GdkInputSource source;
+
+- layouts = g_settings_get_strv (settings, LIBGNOMEKBD_KEY_LAYOUTS);
++ source = gdk_device_get_source (device);
++ if (source == GDK_SOURCE_KEYBOARD) {
++ run_custom_command (device, COMMAND_DEVICE_REMOVED);
++ }
++}
+
+- /* Get accounts daemon */
+- GDBusProxy *proxy = NULL;
+- GDBusProxy *user = NULL;
+- GVariant *variant = NULL;
+- GError *error = NULL;
+- gchar *object_path = NULL;
++static void
++set_devicepresence_handler (CsdKeyboardManager *manager)
++{
++ GdkDeviceManager *device_manager;
+
+- proxy = g_dbus_proxy_new_for_bus_sync (G_BUS_TYPE_SYSTEM,
+- G_DBUS_PROXY_FLAGS_NONE,
+- NULL,
+- "org.freedesktop.Accounts",
+- "/org/freedesktop/Accounts",
+- "org.freedesktop.Accounts",
+- NULL,
+- &error);
++ device_manager = gdk_display_get_device_manager (gdk_display_get_default ());
+
+- if (proxy == NULL) {
+- g_warning ("Failed to contact accounts service: %s", error->message);
+- g_error_free (error);
+- goto bail;
++ manager->priv->device_added_id = g_signal_connect (G_OBJECT (device_manager), "device-added",
++ G_CALLBACK (device_added_cb), manager);
++ manager->priv->device_removed_id = g_signal_connect (G_OBJECT (device_manager), "device-removed",
++ G_CALLBACK (device_removed_cb), manager);
++ manager->priv->device_manager = device_manager;
++}
++
++static void
++create_sources_from_current_xkb_config (GSettings *settings)
++{
++ GVariantBuilder builder;
++ XkbRF_VarDefsRec *xkb_var_defs;
++ gchar *tmp;
++ gchar **layouts = NULL;
++ gchar **variants = NULL;
++ guint i, n;
++
++ gnome_xkb_info_get_var_defs (&tmp, &xkb_var_defs);
++ g_free (tmp);
++
++ if (xkb_var_defs->layout)
++ layouts = g_strsplit (xkb_var_defs->layout, ",", 0);
++ if (xkb_var_defs->variant)
++ variants = g_strsplit (xkb_var_defs->variant, ",", 0);
++
++ gnome_xkb_info_free_var_defs (xkb_var_defs);
++
++ if (!layouts)
++ goto out;
++
++ if (variants && variants[0])
++ n = MIN (g_strv_length (layouts), g_strv_length (variants));
++ else
++ n = g_strv_length (layouts);
++
++ g_variant_builder_init (&builder, G_VARIANT_TYPE ("a(ss)"));
++ for (i = 0; i < n && layouts[i][0]; ++i) {
++ if (variants && variants[i] && variants[i][0])
++ tmp = g_strdup_printf ("%s+%s", layouts[i], variants[i]);
++ else
++ tmp = g_strdup (layouts[i]);
++
++ g_variant_builder_add (&builder, "(ss)", INPUT_SOURCE_TYPE_XKB, tmp);
++ g_free (tmp);
+ }
++ g_settings_set_value (settings, KEY_INPUT_SOURCES, g_variant_builder_end (&builder));
++out:
++ g_strfreev (layouts);
++ g_strfreev (variants);
++}
+
+- variant = g_dbus_proxy_call_sync (proxy,
+- "FindUserByName",
+- g_variant_new ("(s)", g_get_user_name ()),
+- G_DBUS_CALL_FLAGS_NONE,
+- -1,
+- NULL,
+- &error);
++static void
++convert_libgnomekbd_options (GSettings *settings)
++{
++ GPtrArray *opt_array;
++ GSettings *libgnomekbd_settings;
++ gchar **options, **o;
+
+- if (variant == NULL) {
+- g_warning ("Could not contact accounts service to look up '%s': %s",
+- g_get_user_name (), error->message);
+- g_error_free (error);
+- goto bail;
++ if (!schema_is_installed ("org.gnome.libgnomekbd.keyboard"))
++ return;
++
++ opt_array = g_ptr_array_new_with_free_func (g_free);
++
++ libgnomekbd_settings = g_settings_new ("org.gnome.libgnomekbd.keyboard");
++ options = g_settings_get_strv (libgnomekbd_settings, "options");
++
++ for (o = options; *o; ++o) {
++ gchar **strv;
++
++ strv = g_strsplit (*o, "\t", 2);
++ if (strv[0] && strv[1]) {
++ /* We don't want the group switcher because
++ * it's incompatible with the way we use XKB
++ * groups. */
++ if (!g_str_has_prefix (strv[1], "grp:"))
++ g_ptr_array_add (opt_array, g_strdup (strv[1]));
++ }
++ g_strfreev (strv);
+ }
++ g_ptr_array_add (opt_array, NULL);
+
+- g_variant_get (variant, "(o)", &object_path);
+- user = g_dbus_proxy_new_for_bus_sync (G_BUS_TYPE_SYSTEM,
+- G_DBUS_PROXY_FLAGS_NONE,
+- NULL,
+- "org.freedesktop.Accounts",
+- object_path,
+- "org.freedesktop.Accounts.User",
+- NULL,
+- &error);
+- g_free (object_path);
++ g_settings_set_strv (settings, KEY_KEYBOARD_OPTIONS, (const gchar * const*) opt_array->pdata);
+
+- if (user == NULL) {
+- g_warning ("Could not create proxy for user '%s': %s",
+- g_variant_get_string (variant, NULL), error->message);
+- g_error_free (error);
+- goto bail;
++ g_strfreev (options);
++ g_object_unref (libgnomekbd_settings);
++ g_ptr_array_free (opt_array, TRUE);
++}
++
++static void
++convert_libgnomekbd_layouts (GSettings *settings)
++{
++ GVariantBuilder builder;
++ GSettings *libgnomekbd_settings;
++ gchar **layouts, **l;
++
++ if (!schema_is_installed ("org.gnome.libgnomekbd.keyboard"))
++ return;
++
++ init_builder_with_sources (&builder, settings);
++
++ libgnomekbd_settings = g_settings_new ("org.gnome.libgnomekbd.keyboard");
++ layouts = g_settings_get_strv (libgnomekbd_settings, "layouts");
++
++ for (l = layouts; *l; ++l) {
++ gchar *id;
++ gchar **strv;
++
++ strv = g_strsplit (*l, "\t", 2);
++ if (strv[0] && !strv[1])
++ id = g_strdup (strv[0]);
++ else if (strv[0] && strv[1])
++ id = g_strdup_printf ("%s+%s", strv[0], strv[1]);
++ else
++ id = NULL;
++
++ if (id)
++ g_variant_builder_add (&builder, "(ss)", INPUT_SOURCE_TYPE_XKB, id);
++
++ g_free (id);
++ g_strfreev (strv);
+ }
+- g_variant_unref (variant);
+
+- variant = g_dbus_proxy_call_sync (user,
+- "SetXKeyboardLayouts",
+- g_variant_new ("(^as)", layouts),
+- G_DBUS_CALL_FLAGS_NONE,
+- -1,
+- NULL,
+- &error);
++ g_settings_set_value (settings, KEY_INPUT_SOURCES, g_variant_builder_end (&builder));
++
++ g_strfreev (layouts);
++ g_object_unref (libgnomekbd_settings);
++}
+
+- if (variant == NULL) {
+- g_warning ("Failed to set the keyboard layouts: %s", error->message);
++static void
++maybe_convert_old_settings (GSettings *settings)
++{
++ GVariant *sources;
++ gchar **options;
++ gchar *stamp_dir_path = NULL;
++ gchar *stamp_file_path = NULL;
++ GError *error = NULL;
++
++ stamp_dir_path = g_build_filename (g_get_user_data_dir (), PACKAGE_NAME, NULL);
++ if (g_mkdir_with_parents (stamp_dir_path, 0755)) {
++ g_warning ("Failed to create directory %s: %s", stamp_dir_path, g_strerror (errno));
++ goto out;
++ }
++
++ stamp_file_path = g_build_filename (stamp_dir_path, "input-sources-converted", NULL);
++ if (g_file_test (stamp_file_path, G_FILE_TEST_EXISTS))
++ goto out;
++
++ sources = g_settings_get_value (settings, KEY_INPUT_SOURCES);
++ if (g_variant_n_children (sources) < 1) {
++ convert_libgnomekbd_layouts (settings);
++#ifdef HAVE_IBUS
++ convert_ibus (settings);
++#endif
++ }
++ g_variant_unref (sources);
++
++ options = g_settings_get_strv (settings, KEY_KEYBOARD_OPTIONS);
++ if (g_strv_length (options) < 1)
++ convert_libgnomekbd_options (settings);
++ g_strfreev (options);
++
++ if (!g_file_set_contents (stamp_file_path, "", 0, &error)) {
++ g_warning ("%s", error->message);
+ g_error_free (error);
+- goto bail;
+ }
++out:
++ g_free (stamp_file_path);
++ g_free (stamp_dir_path);
++}
+
+-bail:
+- if (proxy != NULL)
+- g_object_unref (proxy);
+- if (variant != NULL)
+- g_variant_unref (variant);
+- g_strfreev (layouts);
++static void
++maybe_create_input_sources (CsdKeyboardManager *manager)
++{
++ GSettings *settings;
++ GVariant *sources;
++
++ settings = manager->priv->input_sources_settings;
++
++ if (g_getenv ("RUNNING_UNDER_GDM")) {
++ create_sources_from_current_xkb_config (settings);
++ return;
++ }
++
++ maybe_convert_old_settings (settings);
++
++ /* if we still don't have anything do some educated guesses */
++ sources = g_settings_get_value (settings, KEY_INPUT_SOURCES);
++ if (g_variant_n_children (sources) < 1) {
++ create_sources_from_current_xkb_config (settings);
++#ifdef HAVE_IBUS
++ add_ibus_sources_from_locale (settings);
++#endif
++ }
++ g_variant_unref (sources);
+ }
+
+ static gboolean
+@@ -370,26 +1571,41 @@ start_keyboard_idle_cb (CsdKeyboardManag
+
+ g_debug ("Starting keyboard manager");
+
+- manager->priv->have_xkb = 0;
+ manager->priv->settings = g_settings_new (CSD_KEYBOARD_DIR);
+- manager->priv->libgnomekbd_settings = g_settings_new (LIBGNOMEKBD_KEYBOARD_DIR);
+
+- /* Essential - xkb initialization should happen before */
+- csd_keyboard_xkb_init (manager);
++ xkb_init (manager);
+
+- numlock_xkb_init (manager);
++ set_devicepresence_handler (manager);
+
++ manager->priv->input_sources_settings = g_settings_new (GNOME_DESKTOP_INPUT_SOURCES_DIR);
++ manager->priv->interface_settings = g_settings_new (GNOME_DESKTOP_INTERFACE_DIR);
++ manager->priv->xkb_info = gnome_xkb_info_new ();
++
++ maybe_create_input_sources (manager);
++
++#ifdef HAVE_IBUS
++ /* We don't want to touch IBus until we are sure this isn't a
++ fallback session. */
++ manager->priv->session_is_fallback = TRUE;
++ manager->priv->ibus_cancellable = g_cancellable_new ();
++ g_bus_get (G_BUS_TYPE_SESSION,
++ manager->priv->ibus_cancellable,
++ (GAsyncReadyCallback)got_bus,
++ manager);
++#else
++ apply_input_sources_settings (manager->priv->input_sources_settings, NULL, 0, manager);
++#endif
+ /* apply current settings before we install the callback */
+- csd_keyboard_manager_apply_settings (manager);
++ g_debug ("Started the keyboard plugin, applying all settings");
++ apply_all_settings (manager);
+
+ g_signal_connect (G_OBJECT (manager->priv->settings), "changed",
+- G_CALLBACK (apply_settings), manager);
+-
+- apply_libgnomekbd_settings (manager->priv->libgnomekbd_settings, NULL, manager);
+- g_signal_connect (G_OBJECT (manager->priv->libgnomekbd_settings), "changed",
+- G_CALLBACK (apply_libgnomekbd_settings), manager);
++ G_CALLBACK (settings_changed), manager);
++ g_signal_connect (G_OBJECT (manager->priv->input_sources_settings), "change-event",
++ G_CALLBACK (apply_input_sources_settings), manager);
+
+- numlock_install_xkb_callback (manager);
++ install_xkb_filter (manager);
++ set_input_sources_switcher (manager, enable_switcher (manager));
+
+ cinnamon_settings_profile_end (NULL);
+
+@@ -404,6 +1620,11 @@ csd_keyboard_manager_start (CsdKeyboardM
+ {
+ cinnamon_settings_profile_start (NULL);
+
++ if (check_xkb_extension (manager) == FALSE) {
++ g_debug ("XKB is not supported, not applying any settings");
++ return TRUE;
++ }
++
+ manager->priv->start_idle_id = g_idle_add ((GSourceFunc) start_keyboard_idle_cb, manager);
+
+ cinnamon_settings_profile_end (NULL);
+@@ -418,37 +1639,24 @@ csd_keyboard_manager_stop (CsdKeyboardMa
+
+ g_debug ("Stopping keyboard manager");
+
+- if (p->settings != NULL) {
+- g_object_unref (p->settings);
+- p->settings = NULL;
+- }
++ g_clear_object (&p->settings);
++ g_clear_object (&p->input_sources_settings);
++ g_clear_object (&p->interface_settings);
++ g_clear_object (&p->xkb_info);
+
+- if (p->libgnomekbd_settings != NULL) {
+- g_object_unref (p->libgnomekbd_settings);
+- p->libgnomekbd_settings = NULL;
+- }
++#ifdef HAVE_IBUS
++ clear_ibus (manager);
++#endif
+
+- if (p->have_xkb) {
+- gdk_window_remove_filter (NULL,
+- numlock_xkb_callback,
+- manager);
++ if (p->device_manager != NULL) {
++ g_signal_handler_disconnect (p->device_manager, p->device_added_id);
++ g_signal_handler_disconnect (p->device_manager, p->device_removed_id);
++ p->device_manager = NULL;
+ }
+
+- csd_keyboard_xkb_shutdown ();
+-}
+-
+-static GObject *
+-csd_keyboard_manager_constructor (GType type,
+- guint n_construct_properties,
+- GObjectConstructParam *construct_properties)
+-{
+- CsdKeyboardManager *keyboard_manager;
+-
+- keyboard_manager = CSD_KEYBOARD_MANAGER (G_OBJECT_CLASS (csd_keyboard_manager_parent_class)->constructor (type,
+- n_construct_properties,
+- construct_properties));
++ remove_xkb_filter (manager);
+
+- return G_OBJECT (keyboard_manager);
++ set_input_sources_switcher (manager, FALSE);
+ }
+
+ static void
+@@ -456,7 +1664,6 @@ csd_keyboard_manager_class_init (CsdKeyb
+ {
+ GObjectClass *object_class = G_OBJECT_CLASS (klass);
+
+- object_class->constructor = csd_keyboard_manager_constructor;
+ object_class->finalize = csd_keyboard_manager_finalize;
+
+ g_type_class_add_private (klass, sizeof (CsdKeyboardManagerPrivate));
+diff -uNrp a/plugins/keyboard/csd-keyboard-manager.h b/plugins/keyboard/csd-keyboard-manager.h
+--- a/plugins/keyboard/csd-keyboard-manager.h 2013-08-24 18:04:31.000000000 +0100
++++ b/plugins/keyboard/csd-keyboard-manager.h 2013-08-25 16:36:02.000000000 +0100
+@@ -51,7 +51,6 @@ CsdKeyboardManager * csd_keyboard_
+ gboolean csd_keyboard_manager_start (CsdKeyboardManager *manager,
+ GError **error);
+ void csd_keyboard_manager_stop (CsdKeyboardManager *manager);
+-void csd_keyboard_manager_apply_settings (CsdKeyboardManager *manager);
+
+ G_END_DECLS
+
+diff -uNrp a/plugins/keyboard/csd-keyboard-plugin.h b/plugins/keyboard/csd-keyboard-plugin.h
+--- a/plugins/keyboard/csd-keyboard-plugin.h 2013-08-24 18:04:31.000000000 +0100
++++ b/plugins/keyboard/csd-keyboard-plugin.h 2013-08-25 16:36:02.000000000 +0100
+@@ -52,7 +52,7 @@ typedef struct
+ GType csd_keyboard_plugin_get_type (void) G_GNUC_CONST;
+
+ /* All the plugins must implement this function */
+-G_MODULE_EXPORT GType register_cinnamon_settings_plugin (GTypeModule *module);
++G_MODULE_EXPORT GType register_gnome_settings_plugin (GTypeModule *module);
+
+ G_END_DECLS
+
+diff -uNrp a/plugins/keyboard/csd-keyboard-xkb.c b/plugins/keyboard/csd-keyboard-xkb.c
+--- a/plugins/keyboard/csd-keyboard-xkb.c 2013-08-24 18:04:31.000000000 +0100
++++ b/plugins/keyboard/csd-keyboard-xkb.c 1970-01-01 01:00:00.000000000 +0100
+@@ -1,579 +0,0 @@
+-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*-
+- *
+- * Copyright (C) 2001 Udaltsoft
+- *
+- * Written by Sergey V. Oudaltsov
+- *
+- * This program is free software; you can redistribute it and/or modify
+- * it under the terms of the GNU General Public License as published by
+- * the Free Software Foundation; either version 2, or (at your option)
+- * any later version.
+- *
+- * This program is distributed in the hope that it will be useful,
+- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+- * GNU General Public License for more details.
+- *
+- * You should have received a copy of the GNU General Public License
+- * along with this program; if not, write to the Free Software
+- * Foundation, Inc., 51 Franklin Street - Suite 500, Boston, MA
+- * 02110-1335, USA.
+- */
+-
+-#include "config.h"
+-
+-#include
+-#include
+-
+-#include
+-#include
+-#include
+-#include
+-
+-#include
+-
+-#include
+-#include
+-#include
+-#include
+-#include
+-
+-#include "csd-keyboard-xkb.h"
+-#include "delayed-dialog.h"
+-#include "cinnamon-settings-profile.h"
+-
+-#define SETTINGS_KEYBOARD_DIR "org.cinnamon.settings-daemon.plugins.keyboard"
+-
+-static CsdKeyboardManager *manager = NULL;
+-
+-static XklEngine *xkl_engine;
+-static XklConfigRegistry *xkl_registry = NULL;
+-
+-static GkbdDesktopConfig current_config;
+-static GkbdKeyboardConfig current_kbd_config;
+-
+-/* never terminated */
+-static GkbdKeyboardConfig initial_sys_kbd_config;
+-
+-static gboolean inited_ok = FALSE;
+-
+-static GSettings *settings_desktop = NULL;
+-static GSettings *settings_keyboard = NULL;
+-
+-static PostActivationCallback pa_callback = NULL;
+-static void *pa_callback_user_data = NULL;
+-
+-static GtkStatusIcon *icon = NULL;
+-
+-static GHashTable *preview_dialogs = NULL;
+-
+-static void
+-activation_error (void)
+-{
+- char const *vendor;
+- GtkWidget *dialog;
+-
+- vendor =
+- ServerVendor (GDK_DISPLAY_XDISPLAY
+- (gdk_display_get_default ()));
+-
+- /* VNC viewers will not work, do not barrage them with warnings */
+- if (NULL != vendor && NULL != strstr (vendor, "VNC"))
+- return;
+-
+- dialog = gtk_message_dialog_new_with_markup (NULL,
+- 0,
+- GTK_MESSAGE_ERROR,
+- GTK_BUTTONS_CLOSE,
+- _
+- ("Error activating XKB configuration.\n"
+- "There can be various reasons for that.\n\n"
+- "If you report this situation as a bug, include the results of\n"
+- " • %s\n"
+- " • %s\n"
+- " • %s\n"
+- " • %s"),
+- "xprop -root | grep XKB",
+- "gsettings get org.gnome.libgnomekbd.keyboard model",
+- "gsettings get org.gnome.libgnomekbd.keyboard layouts",
+- "gsettings get org.gnome.libgnomekbd.keyboard options");
+- g_signal_connect (dialog, "response",
+- G_CALLBACK (gtk_widget_destroy), NULL);
+- csd_delayed_show_dialog (dialog);
+-}
+-
+-static gboolean
+-ensure_xkl_registry (void)
+-{
+- if (!xkl_registry) {
+- xkl_registry =
+- xkl_config_registry_get_instance (xkl_engine);
+- /* load all materials, unconditionally! */
+- if (!xkl_config_registry_load (xkl_registry, TRUE)) {
+- g_object_unref (xkl_registry);
+- xkl_registry = NULL;
+- return FALSE;
+- }
+- }
+-
+- return TRUE;
+-}
+-
+-static void
+-apply_desktop_settings (void)
+-{
+- if (!inited_ok)
+- return;
+-
+- csd_keyboard_manager_apply_settings (manager);
+- gkbd_desktop_config_load (¤t_config);
+- /* again, probably it would be nice to compare things
+- before activating them */
+- gkbd_desktop_config_activate (¤t_config);
+-}
+-
+-static void
+-popup_menu_launch_capplet ()
+-{
+- GAppInfo *info;
+- GdkAppLaunchContext *ctx;
+- GError *error = NULL;
+-
+- info =
+- g_app_info_create_from_commandline
+- ("cinnamon-settings region", NULL, 0, &error);
+-
+- if (info != NULL) {
+- ctx =
+- gdk_display_get_app_launch_context
+- (gdk_display_get_default ());
+-
+- if (g_app_info_launch (info, NULL,
+- G_APP_LAUNCH_CONTEXT (ctx), &error) == FALSE) {
+- g_warning
+- ("Could not execute keyboard properties capplet: [%s]\n",
+- error->message);
+- g_error_free (error);
+- }
+-
+- g_object_unref (info);
+- g_object_unref (ctx);
+- }
+-
+-}
+-
+-static void
+-show_layout_destroy (GtkWidget * dialog, gint group)
+-{
+- g_hash_table_remove (preview_dialogs, GINT_TO_POINTER (group));
+-}
+-
+-static void
+-popup_menu_show_layout ()
+-{
+- GtkWidget *dialog;
+- XklEngine *engine =
+- xkl_engine_get_instance (GDK_DISPLAY_XDISPLAY
+- (gdk_display_get_default ()));
+- XklState *xkl_state = xkl_engine_get_current_state (engine);
+-
+- gchar **group_names = gkbd_status_get_group_names ();
+-
+- gpointer p = g_hash_table_lookup (preview_dialogs,
+- GINT_TO_POINTER
+- (xkl_state->group));
+-
+- if (xkl_state->group < 0
+- || xkl_state->group >= g_strv_length (group_names)) {
+- return;
+- }
+-
+- if (p != NULL) {
+- /* existing window */
+- gtk_window_present (GTK_WINDOW (p));
+- return;
+- }
+-
+- if (!ensure_xkl_registry ())
+- return;
+-
+- dialog = gkbd_keyboard_drawing_dialog_new ();
+- gkbd_keyboard_drawing_dialog_set_group (dialog, xkl_registry, xkl_state->group);
+-
+- g_signal_connect (dialog, "destroy",
+- G_CALLBACK (show_layout_destroy),
+- GINT_TO_POINTER (xkl_state->group));
+- g_hash_table_insert (preview_dialogs,
+- GINT_TO_POINTER (xkl_state->group), dialog);
+- gtk_widget_show_all (dialog);
+-}
+-
+-static void
+-popup_menu_set_group (gint group_number, gboolean only_menu)
+-{
+-
+- XklEngine *engine = gkbd_status_get_xkl_engine ();
+-
+- XklState *st = xkl_engine_get_current_state(engine);
+- Window cur;
+- st->group = group_number;
+- xkl_engine_allow_one_switch_to_secondary_group (engine);
+- cur = xkl_engine_get_current_window (engine);
+- if (cur != (Window) NULL) {
+- xkl_debug (150, "Enforcing the state %d for window %lx\n",
+- st->group, cur);
+-
+- xkl_engine_save_state (engine,
+- xkl_engine_get_current_window
+- (engine), st);
+-/* XSetInputFocus( GDK_DISPLAY(), cur, RevertToNone, CurrentTime );*/
+- } else {
+- xkl_debug (150,
+- "??? Enforcing the state %d for unknown window\n",
+- st->group);
+- /* strange situation - bad things can happen */
+- }
+- if (!only_menu)
+- xkl_engine_lock_group (engine, st->group);
+-}
+-
+-static void
+-popup_menu_set_group_cb (GtkMenuItem * item, gpointer param)
+-{
+- gint group_number = GPOINTER_TO_INT (param);
+-
+- popup_menu_set_group(group_number, FALSE);
+-}
+-
+-
+-static GtkMenu *
+-create_status_menu (void)
+-{
+- GtkMenu *popup_menu = GTK_MENU (gtk_menu_new ());
+- int i = 0;
+-
+- GtkMenu *groups_menu = GTK_MENU (gtk_menu_new ());
+- gchar **current_name = gkbd_status_get_group_names ();
+-
+- GtkWidget *item = gtk_menu_item_new_with_mnemonic (_("_Layouts"));
+- gtk_widget_show (item);
+- gtk_menu_shell_append (GTK_MENU_SHELL (popup_menu), item);
+- gtk_menu_item_set_submenu (GTK_MENU_ITEM (item),
+- GTK_WIDGET (groups_menu));
+-
+- item = gtk_menu_item_new_with_mnemonic (_("Show _Keyboard Layout..."));
+- gtk_widget_show (item);
+- g_signal_connect (item, "activate", popup_menu_show_layout, NULL);
+- gtk_menu_shell_append (GTK_MENU_SHELL (popup_menu), item);
+-
+- /* translators note:
+- * This is the name of the cinnamon-settings "region" panel */
+- item = gtk_menu_item_new_with_mnemonic (_("Region and Language Settings"));
+- gtk_widget_show (item);
+- g_signal_connect (item, "activate", popup_menu_launch_capplet, NULL);
+- gtk_menu_shell_append (GTK_MENU_SHELL (popup_menu), item);
+-
+- for (i = 0; current_name && *current_name; i++, current_name++) {
+-
+- gchar *image_file = gkbd_status_get_image_filename (i);
+-
+- if (image_file == NULL) {
+- item =
+- gtk_menu_item_new_with_label (*current_name);
+- } else {
+- GdkPixbuf *pixbuf =
+- gdk_pixbuf_new_from_file_at_size (image_file,
+- 24, 24,
+- NULL);
+- GtkWidget *img =
+- gtk_image_new_from_pixbuf (pixbuf);
+- item =
+- gtk_image_menu_item_new_with_label
+- (*current_name);
+- gtk_widget_show (img);
+- gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM
+- (item), img);
+- gtk_image_menu_item_set_always_show_image
+- (GTK_IMAGE_MENU_ITEM (item), TRUE);
+- g_free (image_file);
+- }
+- gtk_widget_show (item);
+- gtk_menu_shell_append (GTK_MENU_SHELL (groups_menu), item);
+- g_signal_connect (item, "activate",
+- G_CALLBACK (popup_menu_set_group_cb),
+- GINT_TO_POINTER (i));
+- }
+-
+- return popup_menu;
+-}
+-
+-static void
+-status_icon_popup_menu_cb (GtkStatusIcon * icon, guint button, guint time)
+-{
+- GtkMenu *popup_menu = create_status_menu ();
+-
+- gtk_menu_popup (popup_menu, NULL, NULL,
+- gtk_status_icon_position_menu,
+- (gpointer) icon, button, time);
+-}
+-
+-static void
+-show_hide_icon ()
+-{
+- if (g_strv_length (current_kbd_config.layouts_variants) > 1) {
+- if (icon == NULL) {
+- xkl_debug (150, "Creating keyboard status icon\n");
+- icon = gkbd_status_new ();
+- g_signal_connect (icon, "popup-menu",
+- G_CALLBACK
+- (status_icon_popup_menu_cb),
+- NULL);
+-
+- }
+- } else {
+- if (icon != NULL) {
+- xkl_debug (150, "Destroying icon\n");
+- g_object_unref (icon);
+- icon = NULL;
+- }
+- }
+-}
+-
+-static gboolean
+-try_activating_xkb_config_if_new (GkbdKeyboardConfig *
+- current_sys_kbd_config)
+-{
+- /* Activate - only if different! */
+- if (!gkbd_keyboard_config_equals
+- (¤t_kbd_config, current_sys_kbd_config)) {
+- if (gkbd_keyboard_config_activate (¤t_kbd_config)) {
+- if (pa_callback != NULL) {
+- (*pa_callback) (pa_callback_user_data);
+- return TRUE;
+- }
+- } else {
+- return FALSE;
+- }
+- }
+- return TRUE;
+-}
+-
+-static gboolean
+-filter_xkb_config (void)
+-{
+- XklConfigItem *item;
+- gchar *lname;
+- gchar *vname;
+- gchar **lv;
+- gboolean any_change = FALSE;
+-
+- xkl_debug (100, "Filtering configuration against the registry\n");
+- if (!ensure_xkl_registry ())
+- return FALSE;
+-
+- lv = current_kbd_config.layouts_variants;
+- item = xkl_config_item_new ();
+- while (*lv) {
+- xkl_debug (100, "Checking [%s]\n", *lv);
+- if (gkbd_keyboard_config_split_items (*lv, &lname, &vname)) {
+- gboolean should_be_dropped = FALSE;
+- g_snprintf (item->name, sizeof (item->name), "%s",
+- lname);
+- if (!xkl_config_registry_find_layout
+- (xkl_registry, item)) {
+- xkl_debug (100, "Bad layout [%s]\n",
+- lname);
+- should_be_dropped = TRUE;
+- } else if (vname) {
+- g_snprintf (item->name,
+- sizeof (item->name), "%s",
+- vname);
+- if (!xkl_config_registry_find_variant
+- (xkl_registry, lname, item)) {
+- xkl_debug (100,
+- "Bad variant [%s(%s)]\n",
+- lname, vname);
+- should_be_dropped = TRUE;
+- }
+- }
+- if (should_be_dropped) {
+- gkbd_strv_behead (lv);
+- any_change = TRUE;
+- continue;
+- }
+- }
+- lv++;
+- }
+- g_object_unref (item);
+- return any_change;
+-}
+-
+-static void
+-apply_xkb_settings (void)
+-{
+- GkbdKeyboardConfig current_sys_kbd_config;
+-
+- if (!inited_ok)
+- return;
+-
+- gkbd_keyboard_config_init (¤t_sys_kbd_config, xkl_engine);
+-
+- gkbd_keyboard_config_load (¤t_kbd_config,
+- &initial_sys_kbd_config);
+-
+- gkbd_keyboard_config_load_from_x_current (¤t_sys_kbd_config,
+- NULL);
+-
+- if (!try_activating_xkb_config_if_new (¤t_sys_kbd_config)) {
+- if (filter_xkb_config ()) {
+- if (!try_activating_xkb_config_if_new
+- (¤t_sys_kbd_config)) {
+- g_warning
+- ("Could not activate the filtered XKB configuration");
+- activation_error ();
+- }
+- } else {
+- g_warning
+- ("Could not activate the XKB configuration");
+- activation_error ();
+- }
+- } else
+- xkl_debug (100,
+- "Actual KBD configuration was not changed: redundant notification\n");
+-
+- gkbd_keyboard_config_term (¤t_sys_kbd_config);
+- show_hide_icon ();
+-}
+-
+-static void
+-csd_keyboard_xkb_analyze_sysconfig (void)
+-{
+- if (!inited_ok)
+- return;
+-
+- gkbd_keyboard_config_init (&initial_sys_kbd_config, xkl_engine);
+- gkbd_keyboard_config_load_from_x_initial (&initial_sys_kbd_config,
+- NULL);
+-}
+-
+-void
+-csd_keyboard_xkb_set_post_activation_callback (PostActivationCallback fun,
+- void *user_data)
+-{
+- pa_callback = fun;
+- pa_callback_user_data = user_data;
+-}
+-
+-static GdkFilterReturn
+-csd_keyboard_xkb_evt_filter (GdkXEvent * xev, GdkEvent * event)
+-{
+- XEvent *xevent = (XEvent *) xev;
+- xkl_engine_filter_events (xkl_engine, xevent);
+- return GDK_FILTER_CONTINUE;
+-}
+-
+-/* When new Keyboard is plugged in - reload the settings */
+-static void
+-csd_keyboard_new_device (XklEngine * engine)
+-{
+- apply_desktop_settings ();
+- apply_xkb_settings ();
+-}
+-
+-void
+-csd_keyboard_xkb_init (CsdKeyboardManager * kbd_manager)
+-{
+- Display *display =
+- GDK_DISPLAY_XDISPLAY (gdk_display_get_default ());
+- cinnamon_settings_profile_start (NULL);
+-
+- gtk_icon_theme_append_search_path (gtk_icon_theme_get_default (),
+- DATADIR G_DIR_SEPARATOR_S
+- "icons");
+-
+- manager = kbd_manager;
+- cinnamon_settings_profile_start ("xkl_engine_get_instance");
+- xkl_engine = xkl_engine_get_instance (display);
+- cinnamon_settings_profile_end ("xkl_engine_get_instance");
+- if (xkl_engine) {
+- inited_ok = TRUE;
+-
+- gkbd_desktop_config_init (¤t_config, xkl_engine);
+- gkbd_keyboard_config_init (¤t_kbd_config,
+- xkl_engine);
+- xkl_engine_backup_names_prop (xkl_engine);
+- csd_keyboard_xkb_analyze_sysconfig ();
+-
+- settings_desktop = g_settings_new (GKBD_DESKTOP_SCHEMA);
+- settings_keyboard = g_settings_new (GKBD_KEYBOARD_SCHEMA);
+- g_signal_connect (settings_desktop, "changed",
+- (GCallback) apply_desktop_settings,
+- NULL);
+- g_signal_connect (settings_keyboard, "changed",
+- (GCallback) apply_xkb_settings, NULL);
+-
+- gdk_window_add_filter (NULL, (GdkFilterFunc)
+- csd_keyboard_xkb_evt_filter, NULL);
+-
+- if (xkl_engine_get_features (xkl_engine) &
+- XKLF_DEVICE_DISCOVERY)
+- g_signal_connect (xkl_engine, "X-new-device",
+- G_CALLBACK
+- (csd_keyboard_new_device), NULL);
+-
+- cinnamon_settings_profile_start ("xkl_engine_start_listen");
+- xkl_engine_start_listen (xkl_engine,
+- XKLL_MANAGE_LAYOUTS |
+- XKLL_MANAGE_WINDOW_STATES);
+- cinnamon_settings_profile_end ("xkl_engine_start_listen");
+-
+- cinnamon_settings_profile_start ("apply_desktop_settings");
+- apply_desktop_settings ();
+- cinnamon_settings_profile_end ("apply_desktop_settings");
+- cinnamon_settings_profile_start ("apply_xkb_settings");
+- apply_xkb_settings ();
+- cinnamon_settings_profile_end ("apply_xkb_settings");
+- }
+- preview_dialogs = g_hash_table_new (g_direct_hash, g_direct_equal);
+-
+- cinnamon_settings_profile_end (NULL);
+-}
+-
+-void
+-csd_keyboard_xkb_shutdown (void)
+-{
+- if (!inited_ok)
+- return;
+-
+- pa_callback = NULL;
+- pa_callback_user_data = NULL;
+- manager = NULL;
+-
+- if (preview_dialogs != NULL)
+- g_hash_table_destroy (preview_dialogs);
+-
+- if (!inited_ok)
+- return;
+-
+- xkl_engine_stop_listen (xkl_engine,
+- XKLL_MANAGE_LAYOUTS |
+- XKLL_MANAGE_WINDOW_STATES);
+-
+- gdk_window_remove_filter (NULL, (GdkFilterFunc)
+- csd_keyboard_xkb_evt_filter, NULL);
+-
+- g_object_unref (settings_desktop);
+- settings_desktop = NULL;
+- g_object_unref (settings_keyboard);
+- settings_keyboard = NULL;
+-
+- if (xkl_registry) {
+- g_object_unref (xkl_registry);
+- }
+-
+- g_object_unref (xkl_engine);
+-
+- xkl_engine = NULL;
+-
+- inited_ok = FALSE;
+-}
+diff -uNrp a/plugins/keyboard/csd-keyboard-xkb.h b/plugins/keyboard/csd-keyboard-xkb.h
+--- a/plugins/keyboard/csd-keyboard-xkb.h 2013-08-24 18:04:31.000000000 +0100
++++ b/plugins/keyboard/csd-keyboard-xkb.h 1970-01-01 01:00:00.000000000 +0100
+@@ -1,39 +0,0 @@
+-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*-
+- * cinnamon-settings-keyboard-xkb.h
+- *
+- * Copyright (C) 2001 Udaltsoft
+- *
+- * Written by Sergey V. Oudaltsov
+- *
+- * This program is free software; you can redistribute it and/or modify
+- * it under the terms of the GNU General Public License as published by
+- * the Free Software Foundation; either version 2, or (at your option)
+- * any later version.
+- *
+- * This program is distributed in the hope that it will be useful,
+- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+- * GNU General Public License for more details.
+- *
+- * You should have received a copy of the GNU General Public License
+- * along with this program; if not, write to the Free Software
+- * Foundation, Inc., 51 Franklin Street - Suite 500, Boston, MA
+- * 02110-1335, USA.
+- */
+-
+-#ifndef __CSD_KEYBOARD_XKB_H
+-#define __CSD_KEYBOARD_XKB_H
+-
+-#include
+-#include "csd-keyboard-manager.h"
+-
+-void csd_keyboard_xkb_init (CsdKeyboardManager *manager);
+-void csd_keyboard_xkb_shutdown (void);
+-
+-typedef void (*PostActivationCallback) (void *userData);
+-
+-void
+-csd_keyboard_xkb_set_post_activation_callback (PostActivationCallback fun,
+- void *userData);
+-
+-#endif
+diff -uNrp a/plugins/keyboard/delayed-dialog.c b/plugins/keyboard/delayed-dialog.c
+--- a/plugins/keyboard/delayed-dialog.c 2013-08-24 18:04:31.000000000 +0100
++++ b/plugins/keyboard/delayed-dialog.c 1970-01-01 01:00:00.000000000 +0100
+@@ -1,128 +0,0 @@
+-/*
+- * Copyright © 2006 Novell, Inc.
+- *
+- * This program is free software; you can redistribute it and/or
+- * modify it under the terms of the GNU General Public License as
+- * published by the Free Software Foundation; either version 2, or (at
+- * your option) any later version.
+- *
+- * This program is distributed in the hope that it will be useful, but
+- * WITHOUT ANY WARRANTY; without even the implied warranty of
+- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+- * General Public License for more details.
+- *
+- * You should have received a copy of the GNU General Public License
+- * along with this program; if not, write to the Free Software
+- * Foundation, Inc., 51 Franklin Street - Suite 500, Boston, MA
+- * 02110-1335, USA.
+- */
+-
+-#include
+-#include
+-
+-#include
+-#include
+-
+-#include "delayed-dialog.h"
+-
+-static gboolean delayed_show_timeout (gpointer data);
+-static GdkFilterReturn message_filter (GdkXEvent *xevent,
+- GdkEvent *event,
+- gpointer data);
+-
+-static GSList *dialogs = NULL;
+-
+-/**
+- * csd_delayed_show_dialog:
+- * @dialog: the dialog
+- *
+- * Shows the dialog as with gtk_widget_show(), unless a window manager
+- * hasn't been started yet, in which case it will wait up to 5 seconds
+- * for that to happen before showing the dialog.
+- **/
+-void
+-csd_delayed_show_dialog (GtkWidget *dialog)
+-{
+- GdkDisplay *display = gtk_widget_get_display (dialog);
+- Display *xdisplay = GDK_DISPLAY_XDISPLAY (display);
+- GdkScreen *screen = gtk_widget_get_screen (dialog);
+- char selection_name[10];
+- Atom selection_atom;
+-
+- /* We can't use gdk_selection_owner_get() for this, because
+- * it's an unknown out-of-process window.
+- */
+- snprintf (selection_name, sizeof (selection_name), "WM_S%d",
+- gdk_screen_get_number (screen));
+- selection_atom = XInternAtom (xdisplay, selection_name, True);
+- if (selection_atom &&
+- XGetSelectionOwner (xdisplay, selection_atom) != None) {
+- gtk_widget_show (dialog);
+- return;
+- }
+-
+- dialogs = g_slist_prepend (dialogs, dialog);
+-
+- gdk_window_add_filter (NULL, message_filter, NULL);
+-
+- g_timeout_add (5000, delayed_show_timeout, NULL);
+-}
+-
+-static gboolean
+-delayed_show_timeout (gpointer data)
+-{
+- GSList *l;
+-
+- for (l = dialogs; l; l = l->next)
+- gtk_widget_show (l->data);
+- g_slist_free (dialogs);
+- dialogs = NULL;
+-
+- /* FIXME: There's no gdk_display_remove_client_message_filter */
+-
+- return FALSE;
+-}
+-
+-static GdkFilterReturn
+-message_filter (GdkXEvent *xevent, GdkEvent *event, gpointer data)
+-{
+- XClientMessageEvent *evt;
+- char *selection_name;
+- int screen;
+- GSList *l, *next;
+-
+- if (((XEvent *)xevent)->type != ClientMessage)
+- return GDK_FILTER_CONTINUE;
+-
+- evt = (XClientMessageEvent *)xevent;
+-
+- if (evt->message_type != XInternAtom (evt->display, "MANAGER", FALSE))
+- return GDK_FILTER_CONTINUE;
+-
+- selection_name = XGetAtomName (evt->display, evt->data.l[1]);
+-
+- if (strncmp (selection_name, "WM_S", 4) != 0) {
+- XFree (selection_name);
+- return GDK_FILTER_CONTINUE;
+- }
+-
+- screen = atoi (selection_name + 4);
+-
+- for (l = dialogs; l; l = next) {
+- GtkWidget *dialog = l->data;
+- next = l->next;
+-
+- if (gdk_screen_get_number (gtk_widget_get_screen (dialog)) == screen) {
+- gtk_widget_show (dialog);
+- dialogs = g_slist_remove (dialogs, dialog);
+- }
+- }
+-
+- if (!dialogs) {
+- gdk_window_remove_filter (NULL, message_filter, NULL);
+- }
+-
+- XFree (selection_name);
+-
+- return GDK_FILTER_CONTINUE;
+-}
+diff -uNrp a/plugins/keyboard/delayed-dialog.h b/plugins/keyboard/delayed-dialog.h
+--- a/plugins/keyboard/delayed-dialog.h 2013-08-24 18:04:31.000000000 +0100
++++ b/plugins/keyboard/delayed-dialog.h 1970-01-01 01:00:00.000000000 +0100
+@@ -1,32 +0,0 @@
+-/*
+- * Copyright © 2006 Novell, Inc.
+- *
+- * This program is free software; you can redistribute it and/or
+- * modify it under the terms of the GNU General Public License as
+- * published by the Free Software Foundation; either version 2, or (at
+- * your option) any later version.
+- *
+- * This program is distributed in the hope that it will be useful, but
+- * WITHOUT ANY WARRANTY; without even the implied warranty of
+- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+- * General Public License for more details.
+- *
+- * You should have received a copy of the GNU General Public License
+- * along with this program; if not, write to the Free Software
+- * Foundation, Inc., 51 Franklin Street - Suite 500, Boston, MA
+- * 02110-1335, USA.
+- */
+-
+-
+-#ifndef __DELAYED_DIALOG_H
+-#define __DELAYED_DIALOG_H
+-
+-#include
+-
+-G_BEGIN_DECLS
+-
+-void csd_delayed_show_dialog (GtkWidget *dialog);
+-
+-G_END_DECLS
+-
+-#endif
+diff -uNrp a/plugins/keyboard/gkbd-configuration.c b/plugins/keyboard/gkbd-configuration.c
+--- a/plugins/keyboard/gkbd-configuration.c 2013-08-24 18:04:31.000000000 +0100
++++ b/plugins/keyboard/gkbd-configuration.c 1970-01-01 01:00:00.000000000 +0100
+@@ -1,350 +0,0 @@
+-/*
+- * Copyright (C) 2010 Canonical Ltd.
+- *
+- * Authors: Jan Arne Petersen
+- *
+- * Based on gkbd-status.c by Sergey V. Udaltsov
+- *
+- * This library is free software; you can redistribute it and/or
+- * modify it under the terms of the GNU Lesser General Public
+- * License as published by the Free Software Foundation; either
+- * version 2 of the License, or (at your option) any later version.
+- *
+- * This library is distributed in the hope that it will be useful,
+- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+- * Lesser General Public License for more details.
+- *
+- * You should have received a copy of the GNU Lesser General Public
+- * License along with this library; if not, write to the
+- * Free Software Foundation, Inc., 51 Franklin Street - Suite 500,
+- * Boston, MA 02110-1335, USA.
+- */
+-
+-#include
+-
+-#include
+-#include
+-#include
+-
+-#include
+-#include
+-
+-#include "gkbd-configuration.h"
+-
+-struct _GkbdConfigurationPrivate {
+- XklEngine *engine;
+- XklConfigRegistry *registry;
+-
+- GkbdDesktopConfig cfg;
+- GkbdIndicatorConfig ind_cfg;
+- GkbdKeyboardConfig kbd_cfg;
+-
+- gchar **full_group_names;
+- gchar **short_group_names;
+-
+- gulong state_changed_handler;
+- gulong config_changed_handler;
+-};
+-
+-enum {
+- SIGNAL_CHANGED,
+- SIGNAL_GROUP_CHANGED,
+- LAST_SIGNAL
+-};
+-
+-static guint signals[LAST_SIGNAL] = { 0, };
+-
+-#define GKBD_CONFIGURATION_GET_PRIVATE(o) \
+- (G_TYPE_INSTANCE_GET_PRIVATE ((o), GKBD_TYPE_CONFIGURATION, GkbdConfigurationPrivate))
+-
+-G_DEFINE_TYPE (GkbdConfiguration, gkbd_configuration, G_TYPE_OBJECT)
+-
+-/* Should be called once for all widgets */
+-static void
+-gkbd_configuration_cfg_changed (GSettings *settings,
+- const char *key,
+- GkbdConfiguration * configuration)
+-{
+- GkbdConfigurationPrivate *priv = configuration->priv;
+-
+- xkl_debug (100,
+- "General configuration changed in GSettings - reiniting...\n");
+- gkbd_desktop_config_load (&priv->cfg);
+- gkbd_desktop_config_activate (&priv->cfg);
+-
+- g_signal_emit (configuration,
+- signals[SIGNAL_CHANGED], 0);
+-}
+-
+-/* Should be called once for all widgets */
+-static void
+-gkbd_configuration_ind_cfg_changed (GSettings *settings,
+- const char *key,
+- GkbdConfiguration * configuration)
+-{
+- GkbdConfigurationPrivate *priv = configuration->priv;
+- xkl_debug (100,
+- "Applet configuration changed in GSettings - reiniting...\n");
+- gkbd_indicator_config_load (&priv->ind_cfg);
+-
+- gkbd_indicator_config_free_image_filenames (&priv->ind_cfg);
+- gkbd_indicator_config_load_image_filenames (&priv->ind_cfg,
+- &priv->kbd_cfg);
+-
+- gkbd_indicator_config_activate (&priv->ind_cfg);
+-
+- g_signal_emit (configuration,
+- signals[SIGNAL_CHANGED], 0);
+-}
+-
+-static void
+-gkbd_configuration_load_group_names (GkbdConfiguration * configuration,
+- XklConfigRec * xklrec)
+-{
+- GkbdConfigurationPrivate *priv = configuration->priv;
+-
+- if (!gkbd_desktop_config_load_group_descriptions (&priv->cfg,
+- priv->registry,
+- (const char **) xklrec->layouts,
+- (const char **) xklrec->variants,
+- &priv->short_group_names,
+- &priv->full_group_names)) {
+- /* We just populate no short names (remain NULL) -
+- * full names are going to be used anyway */
+- gint i, total_groups =
+- xkl_engine_get_num_groups (priv->engine);
+- xkl_debug (150, "group descriptions loaded: %d!\n",
+- total_groups);
+- priv->full_group_names =
+- g_new0 (char *, total_groups + 1);
+-
+- if (xkl_engine_get_features (priv->engine) &
+- XKLF_MULTIPLE_LAYOUTS_SUPPORTED) {
+- for (i = 0; priv->kbd_cfg.layouts_variants[i]; i++) {
+- priv->full_group_names[i] =
+- g_strdup ((char *) priv->kbd_cfg.layouts_variants[i]);
+- }
+- } else {
+- for (i = total_groups; --i >= 0;) {
+- priv->full_group_names[i] =
+- g_strdup_printf ("Group %d", i);
+- }
+- }
+- }
+-}
+-
+-/* Should be called once for all widgets */
+-static void
+-gkbd_configuration_kbd_cfg_callback (XklEngine *engine,
+- GkbdConfiguration *configuration)
+-{
+- GkbdConfigurationPrivate *priv = configuration->priv;
+- XklConfigRec *xklrec = xkl_config_rec_new ();
+- xkl_debug (100,
+- "XKB configuration changed on X Server - reiniting...\n");
+-
+- gkbd_keyboard_config_load_from_x_current (&priv->kbd_cfg,
+- xklrec);
+-
+- gkbd_indicator_config_free_image_filenames (&priv->ind_cfg);
+- gkbd_indicator_config_load_image_filenames (&priv->ind_cfg,
+- &priv->kbd_cfg);
+-
+- g_strfreev (priv->full_group_names);
+- priv->full_group_names = NULL;
+-
+- g_strfreev (priv->short_group_names);
+- priv->short_group_names = NULL;
+-
+- gkbd_configuration_load_group_names (configuration,
+- xklrec);
+-
+- g_signal_emit (configuration,
+- signals[SIGNAL_CHANGED],
+- 0);
+-
+- g_object_unref (G_OBJECT (xklrec));
+-}
+-
+-/* Should be called once for all applets */
+-static void
+-gkbd_configuration_state_callback (XklEngine * engine,
+- XklEngineStateChange changeType,
+- gint group, gboolean restore,
+- GkbdConfiguration * configuration)
+-{
+- xkl_debug (150, "group is now %d, restore: %d\n", group, restore);
+-
+- if (changeType == GROUP_CHANGED) {
+- g_signal_emit (configuration,
+- signals[SIGNAL_GROUP_CHANGED], 0,
+- group);
+- }
+-}
+-
+-static void
+-gkbd_configuration_init (GkbdConfiguration *configuration)
+-{
+- GkbdConfigurationPrivate *priv;
+- XklConfigRec *xklrec = xkl_config_rec_new ();
+-
+- priv = GKBD_CONFIGURATION_GET_PRIVATE (configuration);
+- configuration->priv = priv;
+-
+- priv->engine = xkl_engine_get_instance (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()));
+- if (priv->engine == NULL) {
+- xkl_debug (0, "Libxklavier initialization error");
+- return;
+- }
+-
+- priv->state_changed_handler =
+- g_signal_connect (priv->engine, "X-state-changed",
+- G_CALLBACK (gkbd_configuration_state_callback),
+- configuration);
+- priv->config_changed_handler =
+- g_signal_connect (priv->engine, "X-config-changed",
+- G_CALLBACK (gkbd_configuration_kbd_cfg_callback),
+- configuration);
+-
+- gkbd_desktop_config_init (&priv->cfg, priv->engine);
+- gkbd_keyboard_config_init (&priv->kbd_cfg, priv->engine);
+- gkbd_indicator_config_init (&priv->ind_cfg, priv->engine);
+-
+- gkbd_desktop_config_load (&priv->cfg);
+- gkbd_desktop_config_activate (&priv->cfg);
+-
+- priv->registry = xkl_config_registry_get_instance (priv->engine);
+- xkl_config_registry_load (priv->registry,
+- priv->cfg.load_extra_items);
+-
+- gkbd_keyboard_config_load_from_x_current (&priv->kbd_cfg,
+- xklrec);
+-
+- gkbd_indicator_config_load (&priv->ind_cfg);
+-
+- gkbd_indicator_config_load_image_filenames (&priv->ind_cfg,
+- &priv->kbd_cfg);
+-
+- gkbd_indicator_config_activate (&priv->ind_cfg);
+-
+- gkbd_configuration_load_group_names (configuration,
+- xklrec);
+- g_object_unref (G_OBJECT (xklrec));
+-
+- gkbd_desktop_config_start_listen (&priv->cfg,
+- G_CALLBACK (gkbd_configuration_cfg_changed),
+- configuration);
+- gkbd_indicator_config_start_listen (&priv->ind_cfg,
+- G_CALLBACK (gkbd_configuration_ind_cfg_changed),
+- configuration);
+- xkl_engine_start_listen (priv->engine,
+- XKLL_TRACK_KEYBOARD_STATE);
+-
+- xkl_debug (100, "Initiating the widget startup process for %p\n",
+- configuration);
+-}
+-
+-static void
+-gkbd_configuration_finalize (GObject * obj)
+-{
+- GkbdConfiguration *configuration = GKBD_CONFIGURATION (obj);
+- GkbdConfigurationPrivate *priv = configuration->priv;
+-
+- xkl_debug (100,
+- "Starting the gnome-kbd-configuration widget shutdown process for %p\n",
+- configuration);
+-
+- xkl_engine_stop_listen (priv->engine,
+- XKLL_TRACK_KEYBOARD_STATE);
+-
+- gkbd_desktop_config_stop_listen (&priv->cfg);
+- gkbd_indicator_config_stop_listen (&priv->ind_cfg);
+-
+- gkbd_indicator_config_term (&priv->ind_cfg);
+- gkbd_keyboard_config_term (&priv->kbd_cfg);
+- gkbd_desktop_config_term (&priv->cfg);
+-
+- if (g_signal_handler_is_connected (priv->engine,
+- priv->state_changed_handler)) {
+- g_signal_handler_disconnect (priv->engine,
+- priv->state_changed_handler);
+- priv->state_changed_handler = 0;
+- }
+- if (g_signal_handler_is_connected (priv->engine,
+- priv->config_changed_handler)) {
+- g_signal_handler_disconnect (priv->engine,
+- priv->config_changed_handler);
+- priv->config_changed_handler = 0;
+- }
+-
+- g_object_unref (priv->registry);
+- priv->registry = NULL;
+- g_object_unref (priv->engine);
+- priv->engine = NULL;
+-
+- G_OBJECT_CLASS (gkbd_configuration_parent_class)->finalize (obj);
+-}
+-
+-static void
+-gkbd_configuration_class_init (GkbdConfigurationClass * klass)
+-{
+- GObjectClass *object_class = G_OBJECT_CLASS (klass);
+-
+- /* Initing vtable */
+- object_class->finalize = gkbd_configuration_finalize;
+-
+- /* Signals */
+- signals[SIGNAL_CHANGED] = g_signal_new ("changed",
+- GKBD_TYPE_CONFIGURATION,
+- G_SIGNAL_RUN_LAST,
+- 0,
+- NULL, NULL,
+- g_cclosure_marshal_VOID__VOID,
+- G_TYPE_NONE,
+- 0);
+- signals[SIGNAL_GROUP_CHANGED] = g_signal_new ("group-changed",
+- GKBD_TYPE_CONFIGURATION,
+- G_SIGNAL_RUN_LAST,
+- 0,
+- NULL, NULL,
+- g_cclosure_marshal_VOID__INT,
+- G_TYPE_NONE,
+- 1,
+- G_TYPE_INT);
+-
+- g_type_class_add_private (klass, sizeof (GkbdConfigurationPrivate));
+-}
+-
+-GkbdConfiguration *
+-gkbd_configuration_get (void)
+-{
+- static gpointer instance = NULL;
+-
+- if (!instance) {
+- instance = g_object_new (GKBD_TYPE_CONFIGURATION, NULL);
+- g_object_add_weak_pointer (instance, &instance);
+- } else {
+- g_object_ref (instance);
+- }
+-
+- return instance;
+-}
+-
+-XklEngine *
+-gkbd_configuration_get_xkl_engine (GkbdConfiguration *configuration)
+-{
+- return configuration->priv->engine;
+-}
+-
+-const char * const *
+-gkbd_configuration_get_group_names (GkbdConfiguration *configuration)
+-{
+- return configuration->priv->full_group_names;
+-}
+-
+-const char * const *
+-gkbd_configuration_get_short_group_names (GkbdConfiguration *configuration)
+-{
+- return configuration->priv->short_group_names;
+-}
+diff -uNrp a/plugins/keyboard/gkbd-configuration.h b/plugins/keyboard/gkbd-configuration.h
+--- a/plugins/keyboard/gkbd-configuration.h 2013-08-24 18:04:31.000000000 +0100
++++ b/plugins/keyboard/gkbd-configuration.h 1970-01-01 01:00:00.000000000 +0100
+@@ -1,65 +0,0 @@
+-/*
+- * Copyright (C) 2010 Canonical Ltd.
+- *
+- * Authors: Jan Arne Petersen
+- *
+- * Based on gkbd-status.h by Sergey V. Udaltsov
+- *
+- * This library is free software; you can redistribute it and/or
+- * modify it under the terms of the GNU Lesser General Public
+- * License as published by the Free Software Foundation; either
+- * version 2 of the License, or (at your option) any later version.
+- *
+- * This library is distributed in the hope that it will be useful,
+- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+- * Lesser General Public License for more details.
+- *
+- * You should have received a copy of the GNU Lesser General Public
+- * License along with this library; if not, write to the
+- * Free Software Foundation, Inc., 51 Franklin Street - Suite 500,
+- * Boston, MA 02110-1335, USA.
+- */
+-
+-#ifndef __GKBD_CONFIGURATION_H__
+-#define __GKBD_CONFIGURATION_H__
+-
+-#include
+-
+-#include
+-
+-G_BEGIN_DECLS
+-
+-typedef struct _GkbdConfiguration GkbdConfiguration;
+-typedef struct _GkbdConfigurationPrivate GkbdConfigurationPrivate;
+-typedef struct _GkbdConfigurationClass GkbdConfigurationClass;
+-
+-#define GKBD_TYPE_CONFIGURATION (gkbd_configuration_get_type ())
+-#define GKBD_CONFIGURATION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GKBD_TYPE_CONFIGURATION, GkbdConfiguration))
+-#define GKBD_INDCATOR_CLASS(obj) (G_TYPE_CHECK_CLASS_CAST ((obj), GKBD_TYPE_CONFIGURATION, GkbdConfigurationClass))
+-#define GKBD_IS_CONFIGURATION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GKBD_TYPE_CONFIGURATION))
+-#define GKBD_IS_CONFIGURATION_CLASS(obj) (G_TYPE_CHECK_CLASS_TYPE ((obj), GKBD_TYPE_CONFIGURATION))
+-#define GKBD_CONFIGURATION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GKBD_TYPE_CONFIGURATION, GkbdConfigurationClass))
+-
+-struct _GkbdConfiguration {
+- GObject parent;
+-
+- GkbdConfigurationPrivate *priv;
+-};
+-
+-struct _GkbdConfigurationClass {
+- GObjectClass parent_class;
+-};
+-
+-extern GType gkbd_configuration_get_type (void);
+-
+-extern GkbdConfiguration *gkbd_configuration_get (void);
+-
+-extern XklEngine *gkbd_configuration_get_xkl_engine (GkbdConfiguration *configuration);
+-
+-extern const char * const *gkbd_configuration_get_group_names (GkbdConfiguration *configuration);
+-extern const char * const *gkbd_configuration_get_short_group_names (GkbdConfiguration *configuration);
+-
+-G_END_DECLS
+-
+-#endif
+diff -uNrp a/plugins/keyboard/.indent.pro b/plugins/keyboard/.indent.pro
+--- a/plugins/keyboard/.indent.pro 1970-01-01 01:00:00.000000000 +0100
++++ b/plugins/keyboard/.indent.pro 2013-08-25 16:36:02.000000000 +0100
+@@ -0,0 +1,2 @@
++-kr -i8 -pcs -lps -psl
++
+diff -uNrp a/plugins/keyboard/Makefile.am b/plugins/keyboard/Makefile.am
+--- a/plugins/keyboard/Makefile.am 2013-08-24 18:04:31.000000000 +0100
++++ b/plugins/keyboard/Makefile.am 2013-08-25 16:36:02.000000000 +0100
+@@ -20,25 +20,20 @@ libkeyboard_la_SOURCES = \
+ csd-keyboard-plugin.c \
+ csd-keyboard-manager.h \
+ csd-keyboard-manager.c \
+- csd-keyboard-xkb.h \
+- csd-keyboard-xkb.c \
+- delayed-dialog.h \
+- delayed-dialog.c \
+- gkbd-configuration.c \
+- gkbd-configuration.h \
+ $(NULL)
+
+ libkeyboard_la_CPPFLAGS = \
+ -I$(top_srcdir)/cinnamon-settings-daemon \
+ -I$(top_srcdir)/data \
++ -I$(top_srcdir)/plugins/common \
+ -DDATADIR=\""$(pkgdatadir)"\" \
++ -DLIBEXECDIR=\""$(libexecdir)"\" \
+ -DCINNAMON_SETTINGS_LOCALEDIR=\""$(datadir)/locale"\" \
+ $(AM_CPPFLAGS)
+
+ libkeyboard_la_CFLAGS = \
+ $(PLUGIN_CFLAGS) \
+ $(SETTINGS_PLUGIN_CFLAGS) \
+- $(APPINDICATOR_CFLAGS) \
+ $(KEYBOARD_CFLAGS) \
+ $(AM_CFLAGS)
+
+@@ -46,19 +41,63 @@ libkeyboard_la_LDFLAGS = \
+ $(CSD_PLUGIN_LDFLAGS) \
+ $(NULL)
+
+-libkeyboard_la_LIBADD = \
+- $(SETTINGS_PLUGIN_LIBS) \
+- $(XF86MISC_LIBS) \
+- $(KEYBOARD_LIBS) \
+- $(APPINDICATOR_LIBS) \
++libkeyboard_la_LIBADD = \
++ $(top_builddir)/plugins/common/libcommon.la \
++ $(SETTINGS_PLUGIN_LIBS) \
++ $(XF86MISC_LIBS) \
++ $(KEYBOARD_LIBS) \
+ $(NULL)
+
++libexec_PROGRAMS = csd-test-keyboard
++csd_test_keyboard_SOURCES = \
++ test-keyboard.c \
++ csd-keyboard-manager.h \
++ csd-keyboard-manager.c \
++ $(NULL)
++
++csd_test_keyboard_CFLAGS = $(libkeyboard_la_CFLAGS)
++csd_test_keyboard_CPPFLAGS = $(libkeyboard_la_CPPFLAGS)
++csd_test_keyboard_LDADD = $(libkeyboard_la_LIBADD) $(top_builddir)/cinnamon-settings-daemon/libcsd.la
++
+ plugin_in_files = \
+ keyboard.cinnamon-settings-plugin.in \
+ $(NULL)
+
+ plugin_DATA = $(plugin_in_files:.cinnamon-settings-plugin.in=.cinnamon-settings-plugin)
+
++if HAVE_IBUS
++noinst_PROGRAMS = test-keyboard-ibus-utils
++test_keyboard_ibus_utils_SOURCES = test-keyboard-ibus-utils.c
++test_keyboard_ibus_utils_CFLAGS = $(libkeyboard_la_CFLAGS)
++test_keyboard_ibus_utils_CPPFLAGS = $(libkeyboard_la_CPPFLAGS)
++test_keyboard_ibus_utils_LDADD = $(libkeyboard_la_LIBADD) $(top_builddir)/cinnamon-settings-daemon/libcsd.la
++
++check-local: test-keyboard-ibus-utils
++ $(builddir)/test-keyboard-ibus-utils > /dev/null
++endif
++
++libexec_PROGRAMS += csd-input-sources-switcher
++
++csd_input_sources_switcher_SOURCES = \
++ csd-input-sources-switcher.c \
++ $(NULL)
++
++csd_input_sources_switcher_CPPFLAGS = \
++ -I$(top_srcdir)/data \
++ -I$(top_srcdir)/plugins/common \
++ $(AM_CPPFLAGS) \
++ $(NULL)
++
++csd_input_sources_switcher_CFLAGS = \
++ $(SETTINGS_PLUGIN_CFLAGS) \
++ $(AM_CFLAGS) \
++ $(NULL)
++
++csd_input_sources_switcher_LDADD = \
++ $(top_builddir)/plugins/common/libcommon.la \
++ $(SETTINGS_PLUGIN_LIBS) \
++ $(NULL)
++
+ EXTRA_DIST = \
+ $(icons_DATA) \
+ $(plugin_in_files) \
+diff -uNrp a/plugins/keyboard/test-keyboard.c b/plugins/keyboard/test-keyboard.c
+--- a/plugins/keyboard/test-keyboard.c 1970-01-01 01:00:00.000000000 +0100
++++ b/plugins/keyboard/test-keyboard.c 2013-08-25 16:36:02.000000000 +0100
+@@ -0,0 +1,7 @@
++#define NEW csd_keyboard_manager_new
++#define START csd_keyboard_manager_start
++#define STOP csd_keyboard_manager_stop
++#define MANAGER CsdKeyboardManager
++#include "csd-keyboard-manager.h"
++
++#include "test-plugin.h"
+diff -uNrp a/plugins/keyboard/test-keyboard-ibus-utils.c b/plugins/keyboard/test-keyboard-ibus-utils.c
+--- a/plugins/keyboard/test-keyboard-ibus-utils.c 1970-01-01 01:00:00.000000000 +0100
++++ b/plugins/keyboard/test-keyboard-ibus-utils.c 2013-08-25 16:36:02.000000000 +0100
+@@ -0,0 +1,116 @@
++#include "csd-keyboard-manager.c"
++
++static void
++test_make_xkb_source_id (void)
++{
++ gint i;
++ const gchar *test_strings[][2] = {
++ /* input output */
++ { "xkb:aa:bb:cc", "aa+bb" },
++ { "xkb:aa:bb:", "aa+bb" },
++ { "xkb:aa::cc", "aa" },
++ { "xkb:aa::", "aa" },
++ { "xkb::bb:cc", "+bb" },
++ { "xkb::bb:", "+bb" },
++ { "xkb:::cc", "" },
++ { "xkb:::", "" },
++ };
++
++ for (i = 0; i < G_N_ELEMENTS (test_strings); ++i)
++ g_assert_cmpstr (make_xkb_source_id (test_strings[i][0]), ==, test_strings[i][1]);
++}
++
++static void
++test_layout_from_ibus_layout (void)
++{
++ gint i;
++ const gchar *test_strings[][2] = {
++ /* input output */
++ { "", "" },
++ { "a", "a" },
++ { "a(", "a" },
++ { "a[", "a" },
++ };
++
++ for (i = 0; i < G_N_ELEMENTS (test_strings); ++i)
++ g_assert_cmpstr (layout_from_ibus_layout (test_strings[i][0]), ==, test_strings[i][1]);
++}
++
++static void
++test_variant_from_ibus_layout (void)
++{
++ gint i;
++ const gchar *test_strings[][2] = {
++ /* input output */
++ { "", NULL },
++ { "a", NULL },
++ { "(", NULL },
++ { "()", "" },
++ { "(b)", "b" },
++ { "a(", NULL },
++ { "a()", "" },
++ { "a(b)", "b" },
++ };
++
++ for (i = 0; i < G_N_ELEMENTS (test_strings); ++i)
++ g_assert_cmpstr (variant_from_ibus_layout (test_strings[i][0]), ==, test_strings[i][1]);
++}
++
++static void
++test_options_from_ibus_layout (void)
++{
++ gint i, j;
++ gchar *output_0[] = {
++ NULL
++ };
++ gchar *output_1[] = {
++ "",
++ NULL
++ };
++ gchar *output_2[] = {
++ "b",
++ NULL
++ };
++ gchar *output_3[] = {
++ "b", "",
++ NULL
++ };
++ gchar *output_4[] = {
++ "b", "c",
++ NULL
++ };
++ const gpointer tests[][2] = {
++ /* input output */
++ { "", NULL },
++ { "a", NULL },
++ { "a[", output_0 },
++ { "a[]", output_1 },
++ { "a[b]", output_2 },
++ { "a[b,]", output_3 },
++ { "a[b,c]", output_4 },
++ };
++
++ for (i = 0; i < G_N_ELEMENTS (tests); ++i) {
++ if (tests[i][1] == NULL) {
++ g_assert (options_from_ibus_layout (tests[i][0]) == NULL);
++ } else {
++ gchar **strv_a = options_from_ibus_layout (tests[i][0]);
++ gchar **strv_b = tests[i][1];
++
++ g_assert (g_strv_length (strv_a) == g_strv_length (strv_b));
++ for (j = 0; j < g_strv_length (strv_a); ++j)
++ g_assert_cmpstr (strv_a[j], ==, strv_b[j]);
++ }
++ }
++}
++
++int
++main (void)
++{
++ test_make_xkb_source_id ();
++ test_layout_from_ibus_layout ();
++ test_variant_from_ibus_layout ();
++ test_options_from_ibus_layout ();
++
++ return 0;
++}
+diff -uNrp a/plugins/keyboard/xxx/csd-keyboard-xkb.c b/plugins/keyboard/xxx/csd-keyboard-xkb.c
+--- a/plugins/keyboard/xxx/csd-keyboard-xkb.c 1970-01-01 01:00:00.000000000 +0100
++++ b/plugins/keyboard/xxx/csd-keyboard-xkb.c 2013-08-25 16:36:02.000000000 +0100
+@@ -0,0 +1,579 @@
++/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*-
++ *
++ * Copyright (C) 2001 Udaltsoft
++ *
++ * Written by Sergey V. Oudaltsov
++ *
++ * This program is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License as published by
++ * the Free Software Foundation; either version 2, or (at your option)
++ * any later version.
++ *
++ * This program is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ * GNU General Public License for more details.
++ *
++ * You should have received a copy of the GNU General Public License
++ * along with this program; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street - Suite 500, Boston, MA
++ * 02110-1335, USA.
++ */
++
++#include "config.h"
++
++#include
++#include
++
++#include
++#include
++#include
++#include
++
++#include
++
++#include
++#include
++#include
++#include
++#include
++
++#include "csd-keyboard-xkb.h"
++#include "delayed-dialog.h"
++#include "cinnamon-settings-profile.h"
++
++#define SETTINGS_KEYBOARD_DIR "org.cinnamon.settings-daemon.plugins.keyboard"
++
++static CsdKeyboardManager *manager = NULL;
++
++static XklEngine *xkl_engine;
++static XklConfigRegistry *xkl_registry = NULL;
++
++static GkbdDesktopConfig current_config;
++static GkbdKeyboardConfig current_kbd_config;
++
++/* never terminated */
++static GkbdKeyboardConfig initial_sys_kbd_config;
++
++static gboolean inited_ok = FALSE;
++
++static GSettings *settings_desktop = NULL;
++static GSettings *settings_keyboard = NULL;
++
++static PostActivationCallback pa_callback = NULL;
++static void *pa_callback_user_data = NULL;
++
++static GtkStatusIcon *icon = NULL;
++
++static GHashTable *preview_dialogs = NULL;
++
++static void
++activation_error (void)
++{
++ char const *vendor;
++ GtkWidget *dialog;
++
++ vendor =
++ ServerVendor (GDK_DISPLAY_XDISPLAY
++ (gdk_display_get_default ()));
++
++ /* VNC viewers will not work, do not barrage them with warnings */
++ if (NULL != vendor && NULL != strstr (vendor, "VNC"))
++ return;
++
++ dialog = gtk_message_dialog_new_with_markup (NULL,
++ 0,
++ GTK_MESSAGE_ERROR,
++ GTK_BUTTONS_CLOSE,
++ _
++ ("Error activating XKB configuration.\n"
++ "There can be various reasons for that.\n\n"
++ "If you report this situation as a bug, include the results of\n"
++ " • %s\n"
++ " • %s\n"
++ " • %s\n"
++ " • %s"),
++ "xprop -root | grep XKB",
++ "gsettings get org.gnome.libgnomekbd.keyboard model",
++ "gsettings get org.gnome.libgnomekbd.keyboard layouts",
++ "gsettings get org.gnome.libgnomekbd.keyboard options");
++ g_signal_connect (dialog, "response",
++ G_CALLBACK (gtk_widget_destroy), NULL);
++ csd_delayed_show_dialog (dialog);
++}
++
++static gboolean
++ensure_xkl_registry (void)
++{
++ if (!xkl_registry) {
++ xkl_registry =
++ xkl_config_registry_get_instance (xkl_engine);
++ /* load all materials, unconditionally! */
++ if (!xkl_config_registry_load (xkl_registry, TRUE)) {
++ g_object_unref (xkl_registry);
++ xkl_registry = NULL;
++ return FALSE;
++ }
++ }
++
++ return TRUE;
++}
++
++static void
++apply_desktop_settings (void)
++{
++ if (!inited_ok)
++ return;
++
++ csd_keyboard_manager_apply_settings (manager);
++ gkbd_desktop_config_load (¤t_config);
++ /* again, probably it would be nice to compare things
++ before activating them */
++ gkbd_desktop_config_activate (¤t_config);
++}
++
++static void
++popup_menu_launch_capplet ()
++{
++ GAppInfo *info;
++ GdkAppLaunchContext *ctx;
++ GError *error = NULL;
++
++ info =
++ g_app_info_create_from_commandline
++ ("cinnamon-settings region", NULL, 0, &error);
++
++ if (info != NULL) {
++ ctx =
++ gdk_display_get_app_launch_context
++ (gdk_display_get_default ());
++
++ if (g_app_info_launch (info, NULL,
++ G_APP_LAUNCH_CONTEXT (ctx), &error) == FALSE) {
++ g_warning
++ ("Could not execute keyboard properties capplet: [%s]\n",
++ error->message);
++ g_error_free (error);
++ }
++
++ g_object_unref (info);
++ g_object_unref (ctx);
++ }
++
++}
++
++static void
++show_layout_destroy (GtkWidget * dialog, gint group)
++{
++ g_hash_table_remove (preview_dialogs, GINT_TO_POINTER (group));
++}
++
++static void
++popup_menu_show_layout ()
++{
++ GtkWidget *dialog;
++ XklEngine *engine =
++ xkl_engine_get_instance (GDK_DISPLAY_XDISPLAY
++ (gdk_display_get_default ()));
++ XklState *xkl_state = xkl_engine_get_current_state (engine);
++
++ gchar **group_names = gkbd_status_get_group_names ();
++
++ gpointer p = g_hash_table_lookup (preview_dialogs,
++ GINT_TO_POINTER
++ (xkl_state->group));
++
++ if (xkl_state->group < 0
++ || xkl_state->group >= g_strv_length (group_names)) {
++ return;
++ }
++
++ if (p != NULL) {
++ /* existing window */
++ gtk_window_present (GTK_WINDOW (p));
++ return;
++ }
++
++ if (!ensure_xkl_registry ())
++ return;
++
++ dialog = gkbd_keyboard_drawing_dialog_new ();
++ gkbd_keyboard_drawing_dialog_set_group (dialog, xkl_registry, xkl_state->group);
++
++ g_signal_connect (dialog, "destroy",
++ G_CALLBACK (show_layout_destroy),
++ GINT_TO_POINTER (xkl_state->group));
++ g_hash_table_insert (preview_dialogs,
++ GINT_TO_POINTER (xkl_state->group), dialog);
++ gtk_widget_show_all (dialog);
++}
++
++static void
++popup_menu_set_group (gint group_number, gboolean only_menu)
++{
++
++ XklEngine *engine = gkbd_status_get_xkl_engine ();
++
++ XklState *st = xkl_engine_get_current_state(engine);
++ Window cur;
++ st->group = group_number;
++ xkl_engine_allow_one_switch_to_secondary_group (engine);
++ cur = xkl_engine_get_current_window (engine);
++ if (cur != (Window) NULL) {
++ xkl_debug (150, "Enforcing the state %d for window %lx\n",
++ st->group, cur);
++
++ xkl_engine_save_state (engine,
++ xkl_engine_get_current_window
++ (engine), st);
++/* XSetInputFocus( GDK_DISPLAY(), cur, RevertToNone, CurrentTime );*/
++ } else {
++ xkl_debug (150,
++ "??? Enforcing the state %d for unknown window\n",
++ st->group);
++ /* strange situation - bad things can happen */
++ }
++ if (!only_menu)
++ xkl_engine_lock_group (engine, st->group);
++}
++
++static void
++popup_menu_set_group_cb (GtkMenuItem * item, gpointer param)
++{
++ gint group_number = GPOINTER_TO_INT (param);
++
++ popup_menu_set_group(group_number, FALSE);
++}
++
++
++static GtkMenu *
++create_status_menu (void)
++{
++ GtkMenu *popup_menu = GTK_MENU (gtk_menu_new ());
++ int i = 0;
++
++ GtkMenu *groups_menu = GTK_MENU (gtk_menu_new ());
++ gchar **current_name = gkbd_status_get_group_names ();
++
++ GtkWidget *item = gtk_menu_item_new_with_mnemonic (_("_Layouts"));
++ gtk_widget_show (item);
++ gtk_menu_shell_append (GTK_MENU_SHELL (popup_menu), item);
++ gtk_menu_item_set_submenu (GTK_MENU_ITEM (item),
++ GTK_WIDGET (groups_menu));
++
++ item = gtk_menu_item_new_with_mnemonic (_("Show _Keyboard Layout..."));
++ gtk_widget_show (item);
++ g_signal_connect (item, "activate", popup_menu_show_layout, NULL);
++ gtk_menu_shell_append (GTK_MENU_SHELL (popup_menu), item);
++
++ /* translators note:
++ * This is the name of the cinnamon-settings "region" panel */
++ item = gtk_menu_item_new_with_mnemonic (_("Region and Language Settings"));
++ gtk_widget_show (item);
++ g_signal_connect (item, "activate", popup_menu_launch_capplet, NULL);
++ gtk_menu_shell_append (GTK_MENU_SHELL (popup_menu), item);
++
++ for (i = 0; current_name && *current_name; i++, current_name++) {
++
++ gchar *image_file = gkbd_status_get_image_filename (i);
++
++ if (image_file == NULL) {
++ item =
++ gtk_menu_item_new_with_label (*current_name);
++ } else {
++ GdkPixbuf *pixbuf =
++ gdk_pixbuf_new_from_file_at_size (image_file,
++ 24, 24,
++ NULL);
++ GtkWidget *img =
++ gtk_image_new_from_pixbuf (pixbuf);
++ item =
++ gtk_image_menu_item_new_with_label
++ (*current_name);
++ gtk_widget_show (img);
++ gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM
++ (item), img);
++ gtk_image_menu_item_set_always_show_image
++ (GTK_IMAGE_MENU_ITEM (item), TRUE);
++ g_free (image_file);
++ }
++ gtk_widget_show (item);
++ gtk_menu_shell_append (GTK_MENU_SHELL (groups_menu), item);
++ g_signal_connect (item, "activate",
++ G_CALLBACK (popup_menu_set_group_cb),
++ GINT_TO_POINTER (i));
++ }
++
++ return popup_menu;
++}
++
++static void
++status_icon_popup_menu_cb (GtkStatusIcon * icon, guint button, guint time)
++{
++ GtkMenu *popup_menu = create_status_menu ();
++
++ gtk_menu_popup (popup_menu, NULL, NULL,
++ gtk_status_icon_position_menu,
++ (gpointer) icon, button, time);
++}
++
++static void
++show_hide_icon ()
++{
++ if (g_strv_length (current_kbd_config.layouts_variants) > 1) {
++ if (icon == NULL) {
++ xkl_debug (150, "Creating keyboard status icon\n");
++ icon = gkbd_status_new ();
++ g_signal_connect (icon, "popup-menu",
++ G_CALLBACK
++ (status_icon_popup_menu_cb),
++ NULL);
++
++ }
++ } else {
++ if (icon != NULL) {
++ xkl_debug (150, "Destroying icon\n");
++ g_object_unref (icon);
++ icon = NULL;
++ }
++ }
++}
++
++static gboolean
++try_activating_xkb_config_if_new (GkbdKeyboardConfig *
++ current_sys_kbd_config)
++{
++ /* Activate - only if different! */
++ if (!gkbd_keyboard_config_equals
++ (¤t_kbd_config, current_sys_kbd_config)) {
++ if (gkbd_keyboard_config_activate (¤t_kbd_config)) {
++ if (pa_callback != NULL) {
++ (*pa_callback) (pa_callback_user_data);
++ return TRUE;
++ }
++ } else {
++ return FALSE;
++ }
++ }
++ return TRUE;
++}
++
++static gboolean
++filter_xkb_config (void)
++{
++ XklConfigItem *item;
++ gchar *lname;
++ gchar *vname;
++ gchar **lv;
++ gboolean any_change = FALSE;
++
++ xkl_debug (100, "Filtering configuration against the registry\n");
++ if (!ensure_xkl_registry ())
++ return FALSE;
++
++ lv = current_kbd_config.layouts_variants;
++ item = xkl_config_item_new ();
++ while (*lv) {
++ xkl_debug (100, "Checking [%s]\n", *lv);
++ if (gkbd_keyboard_config_split_items (*lv, &lname, &vname)) {
++ gboolean should_be_dropped = FALSE;
++ g_snprintf (item->name, sizeof (item->name), "%s",
++ lname);
++ if (!xkl_config_registry_find_layout
++ (xkl_registry, item)) {
++ xkl_debug (100, "Bad layout [%s]\n",
++ lname);
++ should_be_dropped = TRUE;
++ } else if (vname) {
++ g_snprintf (item->name,
++ sizeof (item->name), "%s",
++ vname);
++ if (!xkl_config_registry_find_variant
++ (xkl_registry, lname, item)) {
++ xkl_debug (100,
++ "Bad variant [%s(%s)]\n",
++ lname, vname);
++ should_be_dropped = TRUE;
++ }
++ }
++ if (should_be_dropped) {
++ gkbd_strv_behead (lv);
++ any_change = TRUE;
++ continue;
++ }
++ }
++ lv++;
++ }
++ g_object_unref (item);
++ return any_change;
++}
++
++static void
++apply_xkb_settings (void)
++{
++ GkbdKeyboardConfig current_sys_kbd_config;
++
++ if (!inited_ok)
++ return;
++
++ gkbd_keyboard_config_init (¤t_sys_kbd_config, xkl_engine);
++
++ gkbd_keyboard_config_load (¤t_kbd_config,
++ &initial_sys_kbd_config);
++
++ gkbd_keyboard_config_load_from_x_current (¤t_sys_kbd_config,
++ NULL);
++
++ if (!try_activating_xkb_config_if_new (¤t_sys_kbd_config)) {
++ if (filter_xkb_config ()) {
++ if (!try_activating_xkb_config_if_new
++ (¤t_sys_kbd_config)) {
++ g_warning
++ ("Could not activate the filtered XKB configuration");
++ activation_error ();
++ }
++ } else {
++ g_warning
++ ("Could not activate the XKB configuration");
++ activation_error ();
++ }
++ } else
++ xkl_debug (100,
++ "Actual KBD configuration was not changed: redundant notification\n");
++
++ gkbd_keyboard_config_term (¤t_sys_kbd_config);
++ show_hide_icon ();
++}
++
++static void
++csd_keyboard_xkb_analyze_sysconfig (void)
++{
++ if (!inited_ok)
++ return;
++
++ gkbd_keyboard_config_init (&initial_sys_kbd_config, xkl_engine);
++ gkbd_keyboard_config_load_from_x_initial (&initial_sys_kbd_config,
++ NULL);
++}
++
++void
++csd_keyboard_xkb_set_post_activation_callback (PostActivationCallback fun,
++ void *user_data)
++{
++ pa_callback = fun;
++ pa_callback_user_data = user_data;
++}
++
++static GdkFilterReturn
++csd_keyboard_xkb_evt_filter (GdkXEvent * xev, GdkEvent * event)
++{
++ XEvent *xevent = (XEvent *) xev;
++ xkl_engine_filter_events (xkl_engine, xevent);
++ return GDK_FILTER_CONTINUE;
++}
++
++/* When new Keyboard is plugged in - reload the settings */
++static void
++csd_keyboard_new_device (XklEngine * engine)
++{
++ apply_desktop_settings ();
++ apply_xkb_settings ();
++}
++
++void
++csd_keyboard_xkb_init (CsdKeyboardManager * kbd_manager)
++{
++ Display *display =
++ GDK_DISPLAY_XDISPLAY (gdk_display_get_default ());
++ cinnamon_settings_profile_start (NULL);
++
++ gtk_icon_theme_append_search_path (gtk_icon_theme_get_default (),
++ DATADIR G_DIR_SEPARATOR_S
++ "icons");
++
++ manager = kbd_manager;
++ cinnamon_settings_profile_start ("xkl_engine_get_instance");
++ xkl_engine = xkl_engine_get_instance (display);
++ cinnamon_settings_profile_end ("xkl_engine_get_instance");
++ if (xkl_engine) {
++ inited_ok = TRUE;
++
++ gkbd_desktop_config_init (¤t_config, xkl_engine);
++ gkbd_keyboard_config_init (¤t_kbd_config,
++ xkl_engine);
++ xkl_engine_backup_names_prop (xkl_engine);
++ csd_keyboard_xkb_analyze_sysconfig ();
++
++ settings_desktop = g_settings_new (GKBD_DESKTOP_SCHEMA);
++ settings_keyboard = g_settings_new (GKBD_KEYBOARD_SCHEMA);
++ g_signal_connect (settings_desktop, "changed",
++ (GCallback) apply_desktop_settings,
++ NULL);
++ g_signal_connect (settings_keyboard, "changed",
++ (GCallback) apply_xkb_settings, NULL);
++
++ gdk_window_add_filter (NULL, (GdkFilterFunc)
++ csd_keyboard_xkb_evt_filter, NULL);
++
++ if (xkl_engine_get_features (xkl_engine) &
++ XKLF_DEVICE_DISCOVERY)
++ g_signal_connect (xkl_engine, "X-new-device",
++ G_CALLBACK
++ (csd_keyboard_new_device), NULL);
++
++ cinnamon_settings_profile_start ("xkl_engine_start_listen");
++ xkl_engine_start_listen (xkl_engine,
++ XKLL_MANAGE_LAYOUTS |
++ XKLL_MANAGE_WINDOW_STATES);
++ cinnamon_settings_profile_end ("xkl_engine_start_listen");
++
++ cinnamon_settings_profile_start ("apply_desktop_settings");
++ apply_desktop_settings ();
++ cinnamon_settings_profile_end ("apply_desktop_settings");
++ cinnamon_settings_profile_start ("apply_xkb_settings");
++ apply_xkb_settings ();
++ cinnamon_settings_profile_end ("apply_xkb_settings");
++ }
++ preview_dialogs = g_hash_table_new (g_direct_hash, g_direct_equal);
++
++ cinnamon_settings_profile_end (NULL);
++}
++
++void
++csd_keyboard_xkb_shutdown (void)
++{
++ if (!inited_ok)
++ return;
++
++ pa_callback = NULL;
++ pa_callback_user_data = NULL;
++ manager = NULL;
++
++ if (preview_dialogs != NULL)
++ g_hash_table_destroy (preview_dialogs);
++
++ if (!inited_ok)
++ return;
++
++ xkl_engine_stop_listen (xkl_engine,
++ XKLL_MANAGE_LAYOUTS |
++ XKLL_MANAGE_WINDOW_STATES);
++
++ gdk_window_remove_filter (NULL, (GdkFilterFunc)
++ csd_keyboard_xkb_evt_filter, NULL);
++
++ g_object_unref (settings_desktop);
++ settings_desktop = NULL;
++ g_object_unref (settings_keyboard);
++ settings_keyboard = NULL;
++
++ if (xkl_registry) {
++ g_object_unref (xkl_registry);
++ }
++
++ g_object_unref (xkl_engine);
++
++ xkl_engine = NULL;
++
++ inited_ok = FALSE;
++}
+diff -uNrp a/plugins/keyboard/xxx/csd-keyboard-xkb.h b/plugins/keyboard/xxx/csd-keyboard-xkb.h
+--- a/plugins/keyboard/xxx/csd-keyboard-xkb.h 1970-01-01 01:00:00.000000000 +0100
++++ b/plugins/keyboard/xxx/csd-keyboard-xkb.h 2013-08-25 16:36:02.000000000 +0100
+@@ -0,0 +1,39 @@
++/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*-
++ * cinnamon-settings-keyboard-xkb.h
++ *
++ * Copyright (C) 2001 Udaltsoft
++ *
++ * Written by Sergey V. Oudaltsov
++ *
++ * This program is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License as published by
++ * the Free Software Foundation; either version 2, or (at your option)
++ * any later version.
++ *
++ * This program is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ * GNU General Public License for more details.
++ *
++ * You should have received a copy of the GNU General Public License
++ * along with this program; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street - Suite 500, Boston, MA
++ * 02110-1335, USA.
++ */
++
++#ifndef __CSD_KEYBOARD_XKB_H
++#define __CSD_KEYBOARD_XKB_H
++
++#include
++#include "csd-keyboard-manager.h"
++
++void csd_keyboard_xkb_init (CsdKeyboardManager *manager);
++void csd_keyboard_xkb_shutdown (void);
++
++typedef void (*PostActivationCallback) (void *userData);
++
++void
++csd_keyboard_xkb_set_post_activation_callback (PostActivationCallback fun,
++ void *userData);
++
++#endif
+diff -uNrp a/plugins/keyboard/xxx/delayed-dialog.c b/plugins/keyboard/xxx/delayed-dialog.c
+--- a/plugins/keyboard/xxx/delayed-dialog.c 1970-01-01 01:00:00.000000000 +0100
++++ b/plugins/keyboard/xxx/delayed-dialog.c 2013-08-25 16:36:02.000000000 +0100
+@@ -0,0 +1,128 @@
++/*
++ * Copyright © 2006 Novell, Inc.
++ *
++ * This program is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU General Public License as
++ * published by the Free Software Foundation; either version 2, or (at
++ * your option) any later version.
++ *
++ * This program is distributed in the hope that it will be useful, but
++ * WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * General Public License for more details.
++ *
++ * You should have received a copy of the GNU General Public License
++ * along with this program; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street - Suite 500, Boston, MA
++ * 02110-1335, USA.
++ */
++
++#include
++#include
++
++#include
++#include
++
++#include "delayed-dialog.h"
++
++static gboolean delayed_show_timeout (gpointer data);
++static GdkFilterReturn message_filter (GdkXEvent *xevent,
++ GdkEvent *event,
++ gpointer data);
++
++static GSList *dialogs = NULL;
++
++/**
++ * csd_delayed_show_dialog:
++ * @dialog: the dialog
++ *
++ * Shows the dialog as with gtk_widget_show(), unless a window manager
++ * hasn't been started yet, in which case it will wait up to 5 seconds
++ * for that to happen before showing the dialog.
++ **/
++void
++csd_delayed_show_dialog (GtkWidget *dialog)
++{
++ GdkDisplay *display = gtk_widget_get_display (dialog);
++ Display *xdisplay = GDK_DISPLAY_XDISPLAY (display);
++ GdkScreen *screen = gtk_widget_get_screen (dialog);
++ char selection_name[10];
++ Atom selection_atom;
++
++ /* We can't use gdk_selection_owner_get() for this, because
++ * it's an unknown out-of-process window.
++ */
++ snprintf (selection_name, sizeof (selection_name), "WM_S%d",
++ gdk_screen_get_number (screen));
++ selection_atom = XInternAtom (xdisplay, selection_name, True);
++ if (selection_atom &&
++ XGetSelectionOwner (xdisplay, selection_atom) != None) {
++ gtk_widget_show (dialog);
++ return;
++ }
++
++ dialogs = g_slist_prepend (dialogs, dialog);
++
++ gdk_window_add_filter (NULL, message_filter, NULL);
++
++ g_timeout_add (5000, delayed_show_timeout, NULL);
++}
++
++static gboolean
++delayed_show_timeout (gpointer data)
++{
++ GSList *l;
++
++ for (l = dialogs; l; l = l->next)
++ gtk_widget_show (l->data);
++ g_slist_free (dialogs);
++ dialogs = NULL;
++
++ /* FIXME: There's no gdk_display_remove_client_message_filter */
++
++ return FALSE;
++}
++
++static GdkFilterReturn
++message_filter (GdkXEvent *xevent, GdkEvent *event, gpointer data)
++{
++ XClientMessageEvent *evt;
++ char *selection_name;
++ int screen;
++ GSList *l, *next;
++
++ if (((XEvent *)xevent)->type != ClientMessage)
++ return GDK_FILTER_CONTINUE;
++
++ evt = (XClientMessageEvent *)xevent;
++
++ if (evt->message_type != XInternAtom (evt->display, "MANAGER", FALSE))
++ return GDK_FILTER_CONTINUE;
++
++ selection_name = XGetAtomName (evt->display, evt->data.l[1]);
++
++ if (strncmp (selection_name, "WM_S", 4) != 0) {
++ XFree (selection_name);
++ return GDK_FILTER_CONTINUE;
++ }
++
++ screen = atoi (selection_name + 4);
++
++ for (l = dialogs; l; l = next) {
++ GtkWidget *dialog = l->data;
++ next = l->next;
++
++ if (gdk_screen_get_number (gtk_widget_get_screen (dialog)) == screen) {
++ gtk_widget_show (dialog);
++ dialogs = g_slist_remove (dialogs, dialog);
++ }
++ }
++
++ if (!dialogs) {
++ gdk_window_remove_filter (NULL, message_filter, NULL);
++ }
++
++ XFree (selection_name);
++
++ return GDK_FILTER_CONTINUE;
++}
+diff -uNrp a/plugins/keyboard/xxx/delayed-dialog.h b/plugins/keyboard/xxx/delayed-dialog.h
+--- a/plugins/keyboard/xxx/delayed-dialog.h 1970-01-01 01:00:00.000000000 +0100
++++ b/plugins/keyboard/xxx/delayed-dialog.h 2013-08-25 16:36:02.000000000 +0100
+@@ -0,0 +1,32 @@
++/*
++ * Copyright © 2006 Novell, Inc.
++ *
++ * This program is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU General Public License as
++ * published by the Free Software Foundation; either version 2, or (at
++ * your option) any later version.
++ *
++ * This program is distributed in the hope that it will be useful, but
++ * WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * General Public License for more details.
++ *
++ * You should have received a copy of the GNU General Public License
++ * along with this program; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street - Suite 500, Boston, MA
++ * 02110-1335, USA.
++ */
++
++
++#ifndef __DELAYED_DIALOG_H
++#define __DELAYED_DIALOG_H
++
++#include
++
++G_BEGIN_DECLS
++
++void csd_delayed_show_dialog (GtkWidget *dialog);
++
++G_END_DECLS
++
++#endif
+diff -uNrp a/plugins/keyboard/xxx/gkbd-configuration.c b/plugins/keyboard/xxx/gkbd-configuration.c
+--- a/plugins/keyboard/xxx/gkbd-configuration.c 1970-01-01 01:00:00.000000000 +0100
++++ b/plugins/keyboard/xxx/gkbd-configuration.c 2013-08-25 16:36:02.000000000 +0100
+@@ -0,0 +1,350 @@
++/*
++ * Copyright (C) 2010 Canonical Ltd.
++ *
++ * Authors: Jan Arne Petersen
++ *
++ * Based on gkbd-status.c by Sergey V. Udaltsov
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the
++ * Free Software Foundation, Inc., 51 Franklin Street - Suite 500,
++ * Boston, MA 02110-1335, USA.
++ */
++
++#include
++
++#include
++#include
++#include
++
++#include
++#include
++
++#include "gkbd-configuration.h"
++
++struct _GkbdConfigurationPrivate {
++ XklEngine *engine;
++ XklConfigRegistry *registry;
++
++ GkbdDesktopConfig cfg;
++ GkbdIndicatorConfig ind_cfg;
++ GkbdKeyboardConfig kbd_cfg;
++
++ gchar **full_group_names;
++ gchar **short_group_names;
++
++ gulong state_changed_handler;
++ gulong config_changed_handler;
++};
++
++enum {
++ SIGNAL_CHANGED,
++ SIGNAL_GROUP_CHANGED,
++ LAST_SIGNAL
++};
++
++static guint signals[LAST_SIGNAL] = { 0, };
++
++#define GKBD_CONFIGURATION_GET_PRIVATE(o) \
++ (G_TYPE_INSTANCE_GET_PRIVATE ((o), GKBD_TYPE_CONFIGURATION, GkbdConfigurationPrivate))
++
++G_DEFINE_TYPE (GkbdConfiguration, gkbd_configuration, G_TYPE_OBJECT)
++
++/* Should be called once for all widgets */
++static void
++gkbd_configuration_cfg_changed (GSettings *settings,
++ const char *key,
++ GkbdConfiguration * configuration)
++{
++ GkbdConfigurationPrivate *priv = configuration->priv;
++
++ xkl_debug (100,
++ "General configuration changed in GSettings - reiniting...\n");
++ gkbd_desktop_config_load (&priv->cfg);
++ gkbd_desktop_config_activate (&priv->cfg);
++
++ g_signal_emit (configuration,
++ signals[SIGNAL_CHANGED], 0);
++}
++
++/* Should be called once for all widgets */
++static void
++gkbd_configuration_ind_cfg_changed (GSettings *settings,
++ const char *key,
++ GkbdConfiguration * configuration)
++{
++ GkbdConfigurationPrivate *priv = configuration->priv;
++ xkl_debug (100,
++ "Applet configuration changed in GSettings - reiniting...\n");
++ gkbd_indicator_config_load (&priv->ind_cfg);
++
++ gkbd_indicator_config_free_image_filenames (&priv->ind_cfg);
++ gkbd_indicator_config_load_image_filenames (&priv->ind_cfg,
++ &priv->kbd_cfg);
++
++ gkbd_indicator_config_activate (&priv->ind_cfg);
++
++ g_signal_emit (configuration,
++ signals[SIGNAL_CHANGED], 0);
++}
++
++static void
++gkbd_configuration_load_group_names (GkbdConfiguration * configuration,
++ XklConfigRec * xklrec)
++{
++ GkbdConfigurationPrivate *priv = configuration->priv;
++
++ if (!gkbd_desktop_config_load_group_descriptions (&priv->cfg,
++ priv->registry,
++ (const char **) xklrec->layouts,
++ (const char **) xklrec->variants,
++ &priv->short_group_names,
++ &priv->full_group_names)) {
++ /* We just populate no short names (remain NULL) -
++ * full names are going to be used anyway */
++ gint i, total_groups =
++ xkl_engine_get_num_groups (priv->engine);
++ xkl_debug (150, "group descriptions loaded: %d!\n",
++ total_groups);
++ priv->full_group_names =
++ g_new0 (char *, total_groups + 1);
++
++ if (xkl_engine_get_features (priv->engine) &
++ XKLF_MULTIPLE_LAYOUTS_SUPPORTED) {
++ for (i = 0; priv->kbd_cfg.layouts_variants[i]; i++) {
++ priv->full_group_names[i] =
++ g_strdup ((char *) priv->kbd_cfg.layouts_variants[i]);
++ }
++ } else {
++ for (i = total_groups; --i >= 0;) {
++ priv->full_group_names[i] =
++ g_strdup_printf ("Group %d", i);
++ }
++ }
++ }
++}
++
++/* Should be called once for all widgets */
++static void
++gkbd_configuration_kbd_cfg_callback (XklEngine *engine,
++ GkbdConfiguration *configuration)
++{
++ GkbdConfigurationPrivate *priv = configuration->priv;
++ XklConfigRec *xklrec = xkl_config_rec_new ();
++ xkl_debug (100,
++ "XKB configuration changed on X Server - reiniting...\n");
++
++ gkbd_keyboard_config_load_from_x_current (&priv->kbd_cfg,
++ xklrec);
++
++ gkbd_indicator_config_free_image_filenames (&priv->ind_cfg);
++ gkbd_indicator_config_load_image_filenames (&priv->ind_cfg,
++ &priv->kbd_cfg);
++
++ g_strfreev (priv->full_group_names);
++ priv->full_group_names = NULL;
++
++ g_strfreev (priv->short_group_names);
++ priv->short_group_names = NULL;
++
++ gkbd_configuration_load_group_names (configuration,
++ xklrec);
++
++ g_signal_emit (configuration,
++ signals[SIGNAL_CHANGED],
++ 0);
++
++ g_object_unref (G_OBJECT (xklrec));
++}
++
++/* Should be called once for all applets */
++static void
++gkbd_configuration_state_callback (XklEngine * engine,
++ XklEngineStateChange changeType,
++ gint group, gboolean restore,
++ GkbdConfiguration * configuration)
++{
++ xkl_debug (150, "group is now %d, restore: %d\n", group, restore);
++
++ if (changeType == GROUP_CHANGED) {
++ g_signal_emit (configuration,
++ signals[SIGNAL_GROUP_CHANGED], 0,
++ group);
++ }
++}
++
++static void
++gkbd_configuration_init (GkbdConfiguration *configuration)
++{
++ GkbdConfigurationPrivate *priv;
++ XklConfigRec *xklrec = xkl_config_rec_new ();
++
++ priv = GKBD_CONFIGURATION_GET_PRIVATE (configuration);
++ configuration->priv = priv;
++
++ priv->engine = xkl_engine_get_instance (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()));
++ if (priv->engine == NULL) {
++ xkl_debug (0, "Libxklavier initialization error");
++ return;
++ }
++
++ priv->state_changed_handler =
++ g_signal_connect (priv->engine, "X-state-changed",
++ G_CALLBACK (gkbd_configuration_state_callback),
++ configuration);
++ priv->config_changed_handler =
++ g_signal_connect (priv->engine, "X-config-changed",
++ G_CALLBACK (gkbd_configuration_kbd_cfg_callback),
++ configuration);
++
++ gkbd_desktop_config_init (&priv->cfg, priv->engine);
++ gkbd_keyboard_config_init (&priv->kbd_cfg, priv->engine);
++ gkbd_indicator_config_init (&priv->ind_cfg, priv->engine);
++
++ gkbd_desktop_config_load (&priv->cfg);
++ gkbd_desktop_config_activate (&priv->cfg);
++
++ priv->registry = xkl_config_registry_get_instance (priv->engine);
++ xkl_config_registry_load (priv->registry,
++ priv->cfg.load_extra_items);
++
++ gkbd_keyboard_config_load_from_x_current (&priv->kbd_cfg,
++ xklrec);
++
++ gkbd_indicator_config_load (&priv->ind_cfg);
++
++ gkbd_indicator_config_load_image_filenames (&priv->ind_cfg,
++ &priv->kbd_cfg);
++
++ gkbd_indicator_config_activate (&priv->ind_cfg);
++
++ gkbd_configuration_load_group_names (configuration,
++ xklrec);
++ g_object_unref (G_OBJECT (xklrec));
++
++ gkbd_desktop_config_start_listen (&priv->cfg,
++ G_CALLBACK (gkbd_configuration_cfg_changed),
++ configuration);
++ gkbd_indicator_config_start_listen (&priv->ind_cfg,
++ G_CALLBACK (gkbd_configuration_ind_cfg_changed),
++ configuration);
++ xkl_engine_start_listen (priv->engine,
++ XKLL_TRACK_KEYBOARD_STATE);
++
++ xkl_debug (100, "Initiating the widget startup process for %p\n",
++ configuration);
++}
++
++static void
++gkbd_configuration_finalize (GObject * obj)
++{
++ GkbdConfiguration *configuration = GKBD_CONFIGURATION (obj);
++ GkbdConfigurationPrivate *priv = configuration->priv;
++
++ xkl_debug (100,
++ "Starting the gnome-kbd-configuration widget shutdown process for %p\n",
++ configuration);
++
++ xkl_engine_stop_listen (priv->engine,
++ XKLL_TRACK_KEYBOARD_STATE);
++
++ gkbd_desktop_config_stop_listen (&priv->cfg);
++ gkbd_indicator_config_stop_listen (&priv->ind_cfg);
++
++ gkbd_indicator_config_term (&priv->ind_cfg);
++ gkbd_keyboard_config_term (&priv->kbd_cfg);
++ gkbd_desktop_config_term (&priv->cfg);
++
++ if (g_signal_handler_is_connected (priv->engine,
++ priv->state_changed_handler)) {
++ g_signal_handler_disconnect (priv->engine,
++ priv->state_changed_handler);
++ priv->state_changed_handler = 0;
++ }
++ if (g_signal_handler_is_connected (priv->engine,
++ priv->config_changed_handler)) {
++ g_signal_handler_disconnect (priv->engine,
++ priv->config_changed_handler);
++ priv->config_changed_handler = 0;
++ }
++
++ g_object_unref (priv->registry);
++ priv->registry = NULL;
++ g_object_unref (priv->engine);
++ priv->engine = NULL;
++
++ G_OBJECT_CLASS (gkbd_configuration_parent_class)->finalize (obj);
++}
++
++static void
++gkbd_configuration_class_init (GkbdConfigurationClass * klass)
++{
++ GObjectClass *object_class = G_OBJECT_CLASS (klass);
++
++ /* Initing vtable */
++ object_class->finalize = gkbd_configuration_finalize;
++
++ /* Signals */
++ signals[SIGNAL_CHANGED] = g_signal_new ("changed",
++ GKBD_TYPE_CONFIGURATION,
++ G_SIGNAL_RUN_LAST,
++ 0,
++ NULL, NULL,
++ g_cclosure_marshal_VOID__VOID,
++ G_TYPE_NONE,
++ 0);
++ signals[SIGNAL_GROUP_CHANGED] = g_signal_new ("group-changed",
++ GKBD_TYPE_CONFIGURATION,
++ G_SIGNAL_RUN_LAST,
++ 0,
++ NULL, NULL,
++ g_cclosure_marshal_VOID__INT,
++ G_TYPE_NONE,
++ 1,
++ G_TYPE_INT);
++
++ g_type_class_add_private (klass, sizeof (GkbdConfigurationPrivate));
++}
++
++GkbdConfiguration *
++gkbd_configuration_get (void)
++{
++ static gpointer instance = NULL;
++
++ if (!instance) {
++ instance = g_object_new (GKBD_TYPE_CONFIGURATION, NULL);
++ g_object_add_weak_pointer (instance, &instance);
++ } else {
++ g_object_ref (instance);
++ }
++
++ return instance;
++}
++
++XklEngine *
++gkbd_configuration_get_xkl_engine (GkbdConfiguration *configuration)
++{
++ return configuration->priv->engine;
++}
++
++const char * const *
++gkbd_configuration_get_group_names (GkbdConfiguration *configuration)
++{
++ return configuration->priv->full_group_names;
++}
++
++const char * const *
++gkbd_configuration_get_short_group_names (GkbdConfiguration *configuration)
++{
++ return configuration->priv->short_group_names;
++}
+diff -uNrp a/plugins/keyboard/xxx/gkbd-configuration.h b/plugins/keyboard/xxx/gkbd-configuration.h
+--- a/plugins/keyboard/xxx/gkbd-configuration.h 1970-01-01 01:00:00.000000000 +0100
++++ b/plugins/keyboard/xxx/gkbd-configuration.h 2013-08-25 16:36:02.000000000 +0100
+@@ -0,0 +1,65 @@
++/*
++ * Copyright (C) 2010 Canonical Ltd.
++ *
++ * Authors: Jan Arne Petersen
++ *
++ * Based on gkbd-status.h by Sergey V. Udaltsov
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the
++ * Free Software Foundation, Inc., 51 Franklin Street - Suite 500,
++ * Boston, MA 02110-1335, USA.
++ */
++
++#ifndef __GKBD_CONFIGURATION_H__
++#define __GKBD_CONFIGURATION_H__
++
++#include
++
++#include
++
++G_BEGIN_DECLS
++
++typedef struct _GkbdConfiguration GkbdConfiguration;
++typedef struct _GkbdConfigurationPrivate GkbdConfigurationPrivate;
++typedef struct _GkbdConfigurationClass GkbdConfigurationClass;
++
++#define GKBD_TYPE_CONFIGURATION (gkbd_configuration_get_type ())
++#define GKBD_CONFIGURATION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GKBD_TYPE_CONFIGURATION, GkbdConfiguration))
++#define GKBD_INDCATOR_CLASS(obj) (G_TYPE_CHECK_CLASS_CAST ((obj), GKBD_TYPE_CONFIGURATION, GkbdConfigurationClass))
++#define GKBD_IS_CONFIGURATION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GKBD_TYPE_CONFIGURATION))
++#define GKBD_IS_CONFIGURATION_CLASS(obj) (G_TYPE_CHECK_CLASS_TYPE ((obj), GKBD_TYPE_CONFIGURATION))
++#define GKBD_CONFIGURATION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GKBD_TYPE_CONFIGURATION, GkbdConfigurationClass))
++
++struct _GkbdConfiguration {
++ GObject parent;
++
++ GkbdConfigurationPrivate *priv;
++};
++
++struct _GkbdConfigurationClass {
++ GObjectClass parent_class;
++};
++
++extern GType gkbd_configuration_get_type (void);
++
++extern GkbdConfiguration *gkbd_configuration_get (void);
++
++extern XklEngine *gkbd_configuration_get_xkl_engine (GkbdConfiguration *configuration);
++
++extern const char * const *gkbd_configuration_get_group_names (GkbdConfiguration *configuration);
++extern const char * const *gkbd_configuration_get_short_group_names (GkbdConfiguration *configuration);
++
++G_END_DECLS
++
++#endif
+diff -uNrp a/plugins/media-keys/csd-media-keys-manager.c b/plugins/media-keys/csd-media-keys-manager.c
+--- a/plugins/media-keys/csd-media-keys-manager.c 2013-08-24 18:04:31.000000000 +0100
++++ b/plugins/media-keys/csd-media-keys-manager.c 2013-08-25 16:36:02.000000000 +0100
+@@ -120,6 +120,10 @@ static const gchar kb_introspection_xml[
+ #define VOLUME_STEP 6 /* percents for one volume button press */
+ #define MAX_VOLUME 65536.0
+
++#define GNOME_DESKTOP_INPUT_SOURCES_DIR "org.cinnamon.desktop.input-sources"
++#define KEY_CURRENT_INPUT_SOURCE "current"
++#define KEY_INPUT_SOURCES "sources"
++
+ #define CSD_MEDIA_KEYS_MANAGER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), CSD_TYPE_MEDIA_KEYS_MANAGER, CsdMediaKeysManagerPrivate))
+
+ typedef struct {
+@@ -1750,6 +1754,40 @@ do_keyboard_brightness_action (CsdMediaK
+ manager);
+ }
+
++static void
++do_switch_input_source_action (CsdMediaKeysManager *manager,
++ MediaKeyType type)
++{
++ GSettings *settings;
++ GVariant *sources;
++ gint i, n;
++
++ settings = g_settings_new (GNOME_DESKTOP_INPUT_SOURCES_DIR);
++ sources = g_settings_get_value (settings, KEY_INPUT_SOURCES);
++
++ n = g_variant_n_children (sources);
++ if (n < 2)
++ goto out;
++
++ i = g_settings_get_uint (settings, KEY_CURRENT_INPUT_SOURCE);
++
++ if (type == SWITCH_INPUT_SOURCE_KEY)
++ i += 1;
++ else
++ i -= 1;
++
++ if (i < 0)
++ i = n - 1;
++ else if (i >= n)
++ i = 0;
++
++ g_settings_set_uint (settings, KEY_CURRENT_INPUT_SOURCE, i);
++
++ out:
++ g_variant_unref (sources);
++ g_object_unref (settings);
++}
++
+ static gboolean
+ do_action (CsdMediaKeysManager *manager,
+ guint deviceid,
+@@ -1908,6 +1946,10 @@ do_action (CsdMediaKeysManager *manager,
+ case BATTERY_KEY:
+ do_execute_desktop (manager, "gnome-power-statistics.desktop", timestamp);
+ break;
++ case SWITCH_INPUT_SOURCE_KEY:
++ case SWITCH_INPUT_SOURCE_BACKWARD_KEY:
++ do_switch_input_source_action (manager, type);
++ break;
+ /* Note, no default so compiler catches missing keys */
+ case CUSTOM_KEY:
+ g_assert_not_reached ();
+diff -uNrp a/plugins/media-keys/shortcuts-list.h b/plugins/media-keys/shortcuts-list.h
+--- a/plugins/media-keys/shortcuts-list.h 2013-08-24 18:04:31.000000000 +0100
++++ b/plugins/media-keys/shortcuts-list.h 2013-08-25 16:36:02.000000000 +0100
+@@ -81,6 +81,8 @@ typedef enum {
+ KEYBOARD_BRIGHTNESS_DOWN_KEY,
+ KEYBOARD_BRIGHTNESS_TOGGLE_KEY,
+ BATTERY_KEY,
++ SWITCH_INPUT_SOURCE_KEY,
++ SWITCH_INPUT_SOURCE_BACKWARD_KEY,
+ CUSTOM_KEY
+ } MediaKeyType;
+
+@@ -148,6 +150,9 @@ static struct {
+ { KEYBOARD_BRIGHTNESS_UP_KEY, NULL, "XF86KbdBrightnessUp" },
+ { KEYBOARD_BRIGHTNESS_DOWN_KEY, NULL, "XF86KbdBrightnessDown" },
+ { KEYBOARD_BRIGHTNESS_TOGGLE_KEY, NULL, "XF86KbdLightOnOff" },
++ { SWITCH_INPUT_SOURCE_KEY, "switch-input-source", NULL },
++ { SWITCH_INPUT_SOURCE_BACKWARD_KEY, "switch-input-source-backward", NULL },
++
+ { BATTERY_KEY, NULL, "XF86Battery" },
+ };
+
diff --git a/pkgs/desktops/cinnamon/muffin.nix b/pkgs/desktops/cinnamon/muffin.nix
new file mode 100644
index 00000000000..97796f32476
--- /dev/null
+++ b/pkgs/desktops/cinnamon/muffin.nix
@@ -0,0 +1,46 @@
+
+{ stdenv, fetchurl, pkgconfig, autoreconfHook, glib, gettext, gnome_common, gtk3,intltool,
+cinnamon-desktop, clutter, cogl, zenity, python, gnome_doc_utils, makeWrapper}:
+
+let
+ version = "2.0.5";
+in
+stdenv.mkDerivation {
+ name = "muffin-${version}";
+
+ src = fetchurl {
+ url = "http://github.com/linuxmint/muffin/archive/${version}.tar.gz";
+ sha256 = "1vn7shxwyxsa6dd3zldrnc0095i1y0rq0944n8kak3m85r2pv9c1";
+ };
+
+
+ configureFlags = "--enable-compile-warnings=minium" ;
+
+ patches = [./gtkdoc.patch];
+
+ buildInputs = [
+ pkgconfig autoreconfHook
+ glib gettext gnome_common
+ gtk3 intltool cinnamon-desktop
+ clutter cogl zenity python
+ gnome_doc_utils makeWrapper];
+
+ preBuild = "patchShebangs ./scripts";
+
+
+ postFixup = ''
+
+ for f in "$out"/bin/*; do
+ wrapProgram "$f" --prefix XDG_DATA_DIRS : "$GSETTINGS_SCHEMAS_PATH"
+ done
+ '';
+
+ meta = {
+ homepage = "http://cinnamon.linuxmint.com";
+ description = "The cinnamon session files" ;
+
+ platforms = stdenv.lib.platforms.linux;
+ maintainers = [ stdenv.lib.maintainers.roelof ];
+ };
+}
+
diff --git a/pkgs/desktops/cinnamon/region.patch b/pkgs/desktops/cinnamon/region.patch
new file mode 100644
index 00000000000..7b8133e820e
--- /dev/null
+++ b/pkgs/desktops/cinnamon/region.patch
@@ -0,0 +1,5314 @@
+
+diff -uNrp a/configure.ac b/configure.ac
+--- a/configure.ac 2013-08-25 14:40:14.000000000 +0100
++++ b/configure.ac 2013-08-25 16:50:30.000000000 +0100
+@@ -82,6 +82,22 @@ else
+ SYSTEMD=
+ fi
+
++# IBus support
++IBUS_REQUIRED_VERSION=1.4.2
++
++#AC_ARG_ENABLE(ibus,
++# AS_HELP_STRING([--disable-ibus],
++# [Disable IBus support]),
++# enable_ibus=$enableval,
++# enable_ibus=yes)
++enable_ibus=yes
++#if test "x$enable_ibus" = "xyes" ; then
++IBUS_MODULE="ibus-1.0 >= $IBUS_REQUIRED_VERSION"
++AC_DEFINE(HAVE_IBUS, 1, [Defined if IBus support is enabled])
++#else
++# IBUS_MODULE=
++#fi
++
+ dnl ==============================================
+ dnl Check that we meet the dependencies
+ dnl ==============================================
+@@ -119,9 +135,10 @@ PKG_CHECK_MODULES(NETWORK_PANEL, $COMMON
+ PKG_CHECK_MODULES(POWER_PANEL, $COMMON_MODULES upower-glib >= 0.9.1
+ cinnamon-settings-daemon >= $CSD_REQUIRED_VERSION)
+ PKG_CHECK_MODULES(COLOR_PANEL, $COMMON_MODULES colord >= 0.1.8)
+-PKG_CHECK_MODULES(REGION_PANEL, $COMMON_MODULES libgnomekbd >= 2.91.91
++PKG_CHECK_MODULES(REGION_PANEL, $COMMON_MODULES
+ polkit-gobject-1 >= $POLKIT_REQUIRED_VERSION
+- libxklavier >= 5.1 libgnomekbdui >= 2.91.91)
++ cinnamon-desktop >= $CINNAMON_DESKTOP_REQUIRED_VERSION
++ $IBUS_MODULE)
+ PKG_CHECK_MODULES(SCREEN_PANEL, $COMMON_MODULES)
+ PKG_CHECK_MODULES(SOUND_PANEL, $COMMON_MODULES libxml-2.0
+ libcanberra-gtk3 >= $CANBERRA_REQUIRED_VERSION
+diff -uNrp a/panels/region/cc-region-panel.c b/panels/region/cc-region-panel.c
+--- a/panels/region/cc-region-panel.c 2013-08-25 14:40:14.000000000 +0100
++++ b/panels/region/cc-region-panel.c 2013-09-21 13:24:15.329949897 +0100
+@@ -18,17 +18,18 @@
+ * Author: Sergey Udaltsov
+ *
+ */
+-#include "config.h"
++
+ #include "cc-region-panel.h"
++#include
+ #include
+ #include
+
+-#include "cinnamon-region-panel-xkb.h"
++#include "cinnamon-region-panel-input.h"
+ #include "cinnamon-region-panel-lang.h"
+ #include "cinnamon-region-panel-formats.h"
+ #include "cinnamon-region-panel-system.h"
+
+-G_DEFINE_DYNAMIC_TYPE (CcRegionPanel, cc_region_panel, CC_TYPE_PANEL)
++CC_PANEL_REGISTER (CcRegionPanel, cc_region_panel)
+
+ #define REGION_PANEL_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), CC_TYPE_REGION_PANEL, CcRegionPanelPrivate))
+
+@@ -48,14 +49,6 @@ enum {
+ SYSTEM_PAGE
+ };
+
+-
+-static gboolean
+-languages_link_cb (GtkButton *button, gpointer user_data)
+-{
+- g_spawn_command_line_async ("gnome-language-selector", NULL);
+- return TRUE;
+-}
+-
+ static void
+ cc_region_panel_set_page (CcRegionPanel *panel,
+ const char *page)
+@@ -116,13 +109,22 @@ cc_region_panel_finalize (GObject * obje
+ G_OBJECT_CLASS (cc_region_panel_parent_class)->finalize (object);
+ }
+
++static const char *
++cc_region_panel_get_help_uri (CcPanel *panel)
++{
++ return "help:gnome-help/prefs-language";
++}
++
+ static void
+ cc_region_panel_class_init (CcRegionPanelClass * klass)
+ {
+ GObjectClass *object_class = G_OBJECT_CLASS (klass);
++ CcPanelClass * panel_class = CC_PANEL_CLASS (klass);
+
+ g_type_class_add_private (klass, sizeof (CcRegionPanelPrivate));
+
++ panel_class->get_help_uri = cc_region_panel_get_help_uri;
++
+ object_class->set_property = cc_region_panel_set_property;
+ object_class->finalize = cc_region_panel_finalize;
+
+@@ -130,22 +132,14 @@ cc_region_panel_class_init (CcRegionPane
+ }
+
+ static void
+-cc_region_panel_class_finalize (CcRegionPanelClass * klass)
+-{
+-}
+-
+-static void
+ cc_region_panel_init (CcRegionPanel * self)
+ {
+ CcRegionPanelPrivate *priv;
+ GtkWidget *prefs_widget;
+- const char *desktop;
+ GError *error = NULL;
+
+ priv = self->priv = REGION_PANEL_PRIVATE (self);
+
+- desktop = g_getenv ("XDG_CURRENT_DESKTOP");
+-
+ priv->builder = gtk_builder_new ();
+ gtk_builder_set_translation_domain (priv->builder, GETTEXT_PACKAGE);
+ gtk_builder_add_from_file (priv->builder,
+@@ -157,29 +151,16 @@ cc_region_panel_init (CcRegionPanel * se
+ return;
+ }
+
+- prefs_widget = (GtkWidget *) gtk_builder_get_object (priv->builder,
+- "region_notebook");
+-
++ prefs_widget = (GtkWidget *) gtk_builder_get_object (priv->builder,
++ "region_notebook");
+ gtk_widget_set_size_request (GTK_WIDGET (prefs_widget), -1, 400);
+
+ gtk_widget_reparent (prefs_widget, GTK_WIDGET (self));
+
+- setup_xkb_tabs (priv->builder);
+-
+- setup_language (priv->builder);
+- setup_formats (priv->builder);
+- setup_system (priv->builder);
+-
+- /* set screen link */
+-
+- GtkWidget *widget = GTK_WIDGET (gtk_builder_get_object (self->priv->builder,
+- "get_languages_button"));
+-
+- gtk_button_set_label (GTK_BUTTON (widget), _("Get more languages..."));
+-
+- g_signal_connect (widget, "clicked",
+- G_CALLBACK (languages_link_cb),
+- self);
++ setup_input_tabs (priv->builder, self);
++ setup_language (priv->builder);
++ setup_formats (priv->builder);
++ setup_system (priv->builder);
+ }
+
+ void
+@@ -187,6 +168,7 @@ cc_region_panel_register (GIOModule * mo
+ {
+ bindtextdomain (GETTEXT_PACKAGE, "/usr/share/cinnamon/locale");
+ bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
++
+ cc_region_panel_register_type (G_TYPE_MODULE (module));
+ g_io_extension_point_implement (CC_SHELL_PANEL_EXTENSION_POINT,
+ CC_TYPE_REGION_PANEL,
+diff -uNrp a/panels/region/cinnamon-region-panel-formats.h b/panels/region/cinnamon-region-panel-formats.h
+--- a/panels/region/cinnamon-region-panel-formats.h 2013-08-25 14:40:14.000000000 +0100
++++ b/panels/region/cinnamon-region-panel-formats.h 2013-09-21 13:24:15.332949789 +0100
+@@ -19,8 +19,8 @@
+ * 02110-1335, USA.
+ */
+
+-#ifndef __GNOME_REGION_PANEL_FORMATS_H
+-#define __GNOME_REGION_PANEL_FORMATS_H
++#ifndef __CINNAMON_REGION_PANEL_FORMATS_H
++#define __CINNAMON_REGION_PANEL_FORMATS_H
+
+ #include
+
+diff -uNrp a/panels/region/cinnamon-region-panel-input.c b/panels/region/cinnamon-region-panel-input.c
+--- a/panels/region/cinnamon-region-panel-input.c 1970-01-01 01:00:00.000000000 +0100
++++ b/panels/region/cinnamon-region-panel-input.c 2013-09-21 13:24:15.338949572 +0100
+@@ -0,0 +1,1563 @@
++/*
++ * Copyright (C) 2011 Red Hat, Inc.
++ *
++ * Written by: Matthias Clasen
++ *
++ * This program is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License as published by
++ * the Free Software Foundation; either version 2, or (at your option)
++ * any later version.
++ *
++ * This program is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ * GNU General Public License for more details.
++ *
++ * You should have received a copy of the GNU General Public License
++ * along with this program; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street - Suite 500, Boston, MA
++ * 02110-1335, USA.
++ */
++
++#include
++
++#include
++
++#include
++#include
++#include
++
++#define GNOME_DESKTOP_USE_UNSTABLE_API
++#include
++
++#ifdef HAVE_IBUS
++#include
++#endif
++
++#include "gdm-languages.h"
++#include "cinnamon-region-panel-input.h"
++
++#define WID(s) GTK_WIDGET(gtk_builder_get_object (builder, s))
++
++#define GNOME_DESKTOP_INPUT_SOURCES_DIR "org.cinnamon.desktop.input-sources"
++
++#define KEY_CURRENT_INPUT_SOURCE "current"
++#define KEY_INPUT_SOURCES "sources"
++
++#define INPUT_SOURCE_TYPE_XKB "xkb"
++#define INPUT_SOURCE_TYPE_IBUS "ibus"
++
++enum {
++ NAME_COLUMN,
++ TYPE_COLUMN,
++ ID_COLUMN,
++ SETUP_COLUMN,
++ N_COLUMNS
++};
++
++static GSettings *input_sources_settings = NULL;
++static GnomeXkbInfo *xkb_info = NULL;
++static GtkWidget *input_chooser = NULL; /* weak pointer */
++
++#ifdef HAVE_IBUS
++static IBusBus *ibus = NULL;
++static GHashTable *ibus_engines = NULL;
++static GCancellable *ibus_cancellable = NULL;
++static guint shell_name_watch_id = 0;
++
++static const gchar *supported_ibus_engines[] = {
++ /* Simplified Chinese */
++ "pinyin",
++ "bopomofo",
++ "wubi",
++ "erbi",
++ /* Default in Fedora, where ibus-libpinyin replaces ibus-pinyin */
++ "libpinyin",
++ "libbopomofo",
++
++ /* Traditional Chinese */
++ /* https://bugzilla.gnome.org/show_bug.cgi?id=680840 */
++ "chewing",
++ "cangjie5",
++ "cangjie3",
++ "quick5",
++ "quick3",
++ "stroke5",
++
++ /* Japanese */
++ "anthy",
++ "mozc-jp",
++ "skk",
++
++ /* Korean */
++ "hangul",
++
++ /* Thai */
++ "m17n:th:kesmanee",
++ "m17n:th:pattachote",
++ "m17n:th:tis820",
++
++ /* Vietnamese */
++ "m17n:vi:tcvn",
++ "m17n:vi:telex",
++ "m17n:vi:viqr",
++ "m17n:vi:vni",
++ "Unikey",
++
++ /* Sinhala */
++ "m17n:si:wijesekera",
++ "m17n:si:phonetic-dynamic",
++ "m17n:si:trans",
++ "sayura",
++
++ /* Indic */
++ /* https://fedoraproject.org/wiki/I18N/Indic#Keyboard_Layouts */
++
++ /* Assamese */
++ "m17n:as:phonetic",
++ "m17n:as:inscript",
++ "m17n:as:itrans",
++
++ /* Bengali */
++ "m17n:bn:inscript",
++ "m17n:bn:itrans",
++ "m17n:bn:probhat",
++
++ /* Gujarati */
++ "m17n:gu:inscript",
++ "m17n:gu:itrans",
++ "m17n:gu:phonetic",
++
++ /* Hindi */
++ "m17n:hi:inscript",
++ "m17n:hi:itrans",
++ "m17n:hi:phonetic",
++ "m17n:hi:remington",
++ "m17n:hi:typewriter",
++ "m17n:hi:vedmata",
++
++ /* Kannada */
++ "m17n:kn:kgp",
++ "m17n:kn:inscript",
++ "m17n:kn:itrans",
++
++ /* Kashmiri */
++ "m17n:ks:inscript",
++
++ /* Maithili */
++ "m17n:mai:inscript",
++
++ /* Malayalam */
++ "m17n:ml:inscript",
++ "m17n:ml:itrans",
++ "m17n:ml:mozhi",
++ "m17n:ml:swanalekha",
++
++ /* Marathi */
++ "m17n:mr:inscript",
++ "m17n:mr:itrans",
++ "m17n:mr:phonetic",
++
++ /* Nepali */
++ "m17n:ne:rom",
++ "m17n:ne:trad",
++
++ /* Oriya */
++ "m17n:or:inscript",
++ "m17n:or:itrans",
++ "m17n:or:phonetic",
++
++ /* Punjabi */
++ "m17n:pa:inscript",
++ "m17n:pa:itrans",
++ "m17n:pa:phonetic",
++ "m17n:pa:jhelum",
++
++ /* Sanskrit */
++ "m17n:sa:harvard-kyoto",
++
++ /* Sindhi */
++ "m17n:sd:inscript",
++
++ /* Tamil */
++ "m17n:ta:tamil99",
++ "m17n:ta:inscript",
++ "m17n:ta:itrans",
++ "m17n:ta:phonetic",
++ "m17n:ta:lk-renganathan",
++ "m17n:ta:vutam",
++ "m17n:ta:typewriter",
++
++ /* Telugu */
++ "m17n:te:inscript",
++ "m17n:te:apple",
++ "m17n:te:pothana",
++ "m17n:te:rts",
++
++ /* Urdu */
++ "m17n:ur:phonetic",
++
++ /* Inscript2 - https://bugzilla.gnome.org/show_bug.cgi?id=684854 */
++ "m17n:as:inscript2",
++ "m17n:bn:inscript2",
++ "m17n:brx:inscript2-deva",
++ "m17n:doi:inscript2-deva",
++ "m17n:gu:inscript2",
++ "m17n:hi:inscript2",
++ "m17n:kn:inscript2",
++ "m17n:kok:inscript2-deva",
++ "m17n:mai:inscript2",
++ "m17n:ml:inscript2",
++ "m17n:mni:inscript2-beng",
++ "m17n:mni:inscript2-mtei",
++ "m17n:mr:inscript2",
++ "m17n:ne:inscript2-deva",
++ "m17n:or:inscript2",
++ "m17n:pa:inscript2-guru",
++ "m17n:sa:inscript2",
++ "m17n:sat:inscript2-deva",
++ "m17n:sat:inscript2-olck",
++ "m17n:sd:inscript2-deva",
++ "m17n:ta:inscript2",
++ "m17n:te:inscript2",
++
++ /* No corresponding XKB map available for the languages */
++
++ /* Chinese Yi */
++ "m17n:ii:phonetic",
++
++ /* Tai-Viet */
++ "m17n:tai:sonla",
++
++ /* Kazakh in Arabic script */
++ "m17n:kk:arabic",
++
++ /* Yiddish */
++ "m17n:yi:yivo",
++
++ /* Canadian Aboriginal languages */
++ "m17n:ath:phonetic",
++ "m17n:bla:phonetic",
++ "m17n:cr:western",
++ "m17n:iu:phonetic",
++ "m17n:nsk:phonetic",
++ "m17n:oj:phonetic",
++
++ /* Non-trivial engines, like transliteration-based instead of
++ keymap-based. Confirmation needed that the engines below are
++ actually used by local language users. */
++
++ /* Tibetan */
++ "m17n:bo:ewts",
++ "m17n:bo:tcrc",
++ "m17n:bo:wylie",
++
++ /* Esperanto */
++ "m17n:eo:h-f",
++ "m17n:eo:h",
++ "m17n:eo:plena",
++ "m17n:eo:q",
++ "m17n:eo:vi",
++ "m17n:eo:x",
++
++ /* Amharic */
++ "m17n:am:sera",
++
++ /* Russian */
++ "m17n:ru:translit",
++
++ /* Classical Greek */
++ "m17n:grc:mizuochi",
++
++ /* Lao */
++ "m17n:lo:lrt",
++
++ /* Postfix modifier input methods */
++ "m17n:da:post",
++ "m17n:sv:post",
++ NULL
++};
++#endif /* HAVE_IBUS */
++
++static void populate_model (GtkListStore *store,
++ GtkListStore *active_sources_store);
++static GtkWidget *input_chooser_new (GtkWindow *main_window,
++ GtkListStore *active_sources);
++static gboolean input_chooser_get_selected (GtkWidget *chooser,
++ GtkTreeModel **model,
++ GtkTreeIter *iter);
++static GtkTreeModel *tree_view_get_actual_model (GtkTreeView *tv);
++
++static gboolean
++strv_contains (const gchar * const *strv,
++ const gchar *str)
++{
++ const gchar * const *p = strv;
++ for (p = strv; *p; p++)
++ if (g_strcmp0 (*p, str) == 0)
++ return TRUE;
++
++ return FALSE;
++}
++
++#ifdef HAVE_IBUS
++static void
++clear_ibus (void)
++{
++ if (shell_name_watch_id > 0)
++ {
++ g_bus_unwatch_name (shell_name_watch_id);
++ shell_name_watch_id = 0;
++ }
++ g_cancellable_cancel (ibus_cancellable);
++ g_clear_object (&ibus_cancellable);
++ g_clear_pointer (&ibus_engines, g_hash_table_destroy);
++ g_clear_object (&ibus);
++}
++
++static gchar *
++engine_get_display_name (IBusEngineDesc *engine_desc)
++{
++ const gchar *name;
++ const gchar *language_code;
++ const gchar *language;
++ gchar *display_name;
++
++ name = ibus_engine_desc_get_longname (engine_desc);
++ language_code = ibus_engine_desc_get_language (engine_desc);
++ language = ibus_get_language_name (language_code);
++
++ display_name = g_strdup_printf ("%s (%s)", language, name);
++
++ return display_name;
++}
++
++static GDesktopAppInfo *
++setup_app_info_for_id (const gchar *id)
++{
++ GDesktopAppInfo *app_info;
++ gchar *desktop_file_name;
++ gchar **strv;
++
++ strv = g_strsplit (id, ":", 2);
++ desktop_file_name = g_strdup_printf ("ibus-setup-%s.desktop", strv[0]);
++ g_strfreev (strv);
++
++ app_info = g_desktop_app_info_new (desktop_file_name);
++ g_free (desktop_file_name);
++
++ return app_info;
++}
++
++static void
++input_chooser_repopulate (GtkListStore *active_sources_store)
++{
++ GtkBuilder *builder;
++ GtkListStore *model;
++
++ if (!input_chooser)
++ return;
++
++ builder = g_object_get_data (G_OBJECT (input_chooser), "builder");
++ model = GTK_LIST_STORE (gtk_builder_get_object (builder, "input_source_model"));
++
++ gtk_list_store_clear (model);
++ populate_model (model, active_sources_store);
++}
++
++static void
++update_ibus_active_sources (GtkBuilder *builder)
++{
++ GtkTreeView *tv;
++ GtkTreeModel *model;
++ GtkTreeIter iter;
++ gchar *type, *id;
++ gboolean ret;
++
++ tv = GTK_TREE_VIEW (WID ("active_input_sources"));
++ model = tree_view_get_actual_model (tv);
++
++ ret = gtk_tree_model_get_iter_first (model, &iter);
++ while (ret)
++ {
++ gtk_tree_model_get (model, &iter,
++ TYPE_COLUMN, &type,
++ ID_COLUMN, &id,
++ -1);
++
++ if (g_str_equal (type, INPUT_SOURCE_TYPE_IBUS))
++ {
++ IBusEngineDesc *engine_desc = NULL;
++ GDesktopAppInfo *app_info = NULL;
++ gchar *display_name = NULL;
++
++ engine_desc = g_hash_table_lookup (ibus_engines, id);
++ if (engine_desc)
++ {
++ display_name = engine_get_display_name (engine_desc);
++ app_info = setup_app_info_for_id (id);
++
++ gtk_list_store_set (GTK_LIST_STORE (model), &iter,
++ NAME_COLUMN, display_name,
++ SETUP_COLUMN, app_info,
++ -1);
++ g_free (display_name);
++ if (app_info)
++ g_object_unref (app_info);
++ }
++ }
++
++ g_free (type);
++ g_free (id);
++
++ ret = gtk_tree_model_iter_next (model, &iter);
++ }
++
++ input_chooser_repopulate (GTK_LIST_STORE (model));
++}
++
++static void
++fetch_ibus_engines_result (GObject *object,
++ GAsyncResult *result,
++ GtkBuilder *builder)
++{
++ gboolean show_all_sources;
++ GList *list, *l;
++ GError *error;
++
++ error = NULL;
++ list = ibus_bus_list_engines_async_finish (ibus, result, &error);
++
++ g_clear_object (&ibus_cancellable);
++
++ if (!list && error)
++ {
++ g_warning ("Couldn't finish IBus request: %s", error->message);
++ g_error_free (error);
++ return;
++ }
++
++ show_all_sources = g_settings_get_boolean (input_sources_settings, "show-all-sources");
++
++ /* Maps engine ids to engine description objects */
++ ibus_engines = g_hash_table_new_full (g_str_hash, g_str_equal, NULL, g_object_unref);
++
++ for (l = list; l; l = l->next)
++ {
++ IBusEngineDesc *engine = l->data;
++ const gchar *engine_id = ibus_engine_desc_get_name (engine);
++
++ if (show_all_sources || strv_contains (supported_ibus_engines, engine_id))
++ g_hash_table_replace (ibus_engines, (gpointer)engine_id, engine);
++ else
++ g_object_unref (engine);
++ }
++ g_list_free (list);
++
++ update_ibus_active_sources (builder);
++}
++
++static void
++fetch_ibus_engines (GtkBuilder *builder)
++{
++ ibus_cancellable = g_cancellable_new ();
++
++ ibus_bus_list_engines_async (ibus,
++ -1,
++ ibus_cancellable,
++ (GAsyncReadyCallback)fetch_ibus_engines_result,
++ builder);
++
++ /* We've got everything we needed, don't want to be called again. */
++ g_signal_handlers_disconnect_by_func (ibus, fetch_ibus_engines, builder);
++}
++
++static void
++maybe_start_ibus (void)
++{
++ /* IBus doesn't export API in the session bus. The only thing
++ * we have there is a well known name which we can use as a
++ * sure-fire way to activate it. */
++ g_bus_unwatch_name (g_bus_watch_name (G_BUS_TYPE_SESSION,
++ IBUS_SERVICE_IBUS,
++ G_BUS_NAME_WATCHER_FLAGS_AUTO_START,
++ NULL,
++ NULL,
++ NULL,
++ NULL));
++}
++
++static void
++on_shell_appeared (GDBusConnection *connection,
++ const gchar *name,
++ const gchar *name_owner,
++ gpointer data)
++{
++ GtkBuilder *builder = data;
++
++ if (!ibus)
++ {
++ ibus = ibus_bus_new ();
++ if (ibus_bus_is_connected (ibus))
++ fetch_ibus_engines (builder);
++ else
++ g_signal_connect_swapped (ibus, "connected",
++ G_CALLBACK (fetch_ibus_engines), builder);
++ }
++ maybe_start_ibus ();
++}
++#endif /* HAVE_IBUS */
++
++static gboolean
++add_source_to_table (GtkTreeModel *model,
++ GtkTreePath *path,
++ GtkTreeIter *iter,
++ gpointer data)
++{
++ GHashTable *hash = data;
++ gchar *type;
++ gchar *id;
++
++ gtk_tree_model_get (model, iter,
++ TYPE_COLUMN, &type,
++ ID_COLUMN, &id,
++ -1);
++
++ g_hash_table_add (hash, g_strconcat (type, id, NULL));
++
++ g_free (type);
++ g_free (id);
++
++ return FALSE;
++}
++
++static void
++populate_model (GtkListStore *store,
++ GtkListStore *active_sources_store)
++{
++ GHashTable *active_sources_table;
++ GtkTreeIter iter;
++ const gchar *name;
++ GList *sources, *tmp;
++ gchar *source_id = NULL;
++
++ active_sources_table = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, NULL);
++
++ gtk_tree_model_foreach (GTK_TREE_MODEL (active_sources_store),
++ add_source_to_table,
++ active_sources_table);
++
++ sources = gnome_xkb_info_get_all_layouts (xkb_info);
++
++ for (tmp = sources; tmp; tmp = tmp->next)
++ {
++ g_free (source_id);
++ source_id = g_strconcat (INPUT_SOURCE_TYPE_XKB, tmp->data, NULL);
++
++ if (g_hash_table_contains (active_sources_table, source_id))
++ continue;
++
++ gnome_xkb_info_get_layout_info (xkb_info, (const gchar *)tmp->data,
++ &name, NULL, NULL, NULL);
++
++ gtk_list_store_append (store, &iter);
++ gtk_list_store_set (store, &iter,
++ NAME_COLUMN, name,
++ TYPE_COLUMN, INPUT_SOURCE_TYPE_XKB,
++ ID_COLUMN, tmp->data,
++ -1);
++ }
++ g_free (source_id);
++
++ g_list_free (sources);
++
++#ifdef HAVE_IBUS
++ if (ibus_engines)
++ {
++ gchar *display_name;
++
++ sources = g_hash_table_get_keys (ibus_engines);
++
++ source_id = NULL;
++ for (tmp = sources; tmp; tmp = tmp->next)
++ {
++ g_free (source_id);
++ source_id = g_strconcat (INPUT_SOURCE_TYPE_IBUS, tmp->data, NULL);
++
++ if (g_hash_table_contains (active_sources_table, source_id))
++ continue;
++
++ display_name = engine_get_display_name (g_hash_table_lookup (ibus_engines, tmp->data));
++
++ gtk_list_store_append (store, &iter);
++ gtk_list_store_set (store, &iter,
++ NAME_COLUMN, display_name,
++ TYPE_COLUMN, INPUT_SOURCE_TYPE_IBUS,
++ ID_COLUMN, tmp->data,
++ -1);
++ g_free (display_name);
++ }
++ g_free (source_id);
++
++ g_list_free (sources);
++ }
++#endif
++
++ g_hash_table_destroy (active_sources_table);
++}
++
++static void
++populate_with_active_sources (GtkListStore *store)
++{
++ GVariant *sources;
++ GVariantIter iter;
++ const gchar *name;
++ const gchar *type;
++ const gchar *id;
++ gchar *display_name;
++ GDesktopAppInfo *app_info;
++ GtkTreeIter tree_iter;
++
++ sources = g_settings_get_value (input_sources_settings, KEY_INPUT_SOURCES);
++
++ g_variant_iter_init (&iter, sources);
++ while (g_variant_iter_next (&iter, "(&s&s)", &type, &id))
++ {
++ display_name = NULL;
++ app_info = NULL;
++
++ if (g_str_equal (type, INPUT_SOURCE_TYPE_XKB))
++ {
++ gnome_xkb_info_get_layout_info (xkb_info, id, &name, NULL, NULL, NULL);
++ if (!name)
++ {
++ g_warning ("Couldn't find XKB input source '%s'", id);
++ continue;
++ }
++ display_name = g_strdup (name);
++ }
++ else if (g_str_equal (type, INPUT_SOURCE_TYPE_IBUS))
++ {
++#ifdef HAVE_IBUS
++ IBusEngineDesc *engine_desc = NULL;
++
++ if (ibus_engines)
++ engine_desc = g_hash_table_lookup (ibus_engines, id);
++
++ if (engine_desc)
++ {
++ display_name = engine_get_display_name (engine_desc);
++ app_info = setup_app_info_for_id (id);
++ }
++#else
++ g_warning ("IBus input source type specified but IBus support was not compiled");
++ continue;
++#endif
++ }
++ else
++ {
++ g_warning ("Unknown input source type '%s'", type);
++ continue;
++ }
++
++ gtk_list_store_append (store, &tree_iter);
++ gtk_list_store_set (store, &tree_iter,
++ NAME_COLUMN, display_name,
++ TYPE_COLUMN, type,
++ ID_COLUMN, id,
++ SETUP_COLUMN, app_info,
++ -1);
++ g_free (display_name);
++ if (app_info)
++ g_object_unref (app_info);
++ }
++
++ g_variant_unref (sources);
++}
++
++static void
++update_configuration (GtkTreeModel *model)
++{
++ GtkTreeIter iter;
++ gchar *type;
++ gchar *id;
++ GVariantBuilder builder;
++ GVariant *old_sources;
++ const gchar *old_current_type;
++ const gchar *old_current_id;
++ guint old_current_index;
++ guint old_n_sources;
++ guint index;
++
++ old_sources = g_settings_get_value (input_sources_settings, KEY_INPUT_SOURCES);
++ old_current_index = g_settings_get_uint (input_sources_settings, KEY_CURRENT_INPUT_SOURCE);
++ old_n_sources = g_variant_n_children (old_sources);
++
++ if (old_n_sources > 0 && old_current_index < old_n_sources)
++ {
++ g_variant_get_child (old_sources,
++ old_current_index,
++ "(&s&s)",
++ &old_current_type,
++ &old_current_id);
++ }
++ else
++ {
++ old_current_type = "";
++ old_current_id = "";
++ }
++
++ g_variant_builder_init (&builder, G_VARIANT_TYPE ("a(ss)"));
++ index = 0;
++ gtk_tree_model_get_iter_first (model, &iter);
++ do
++ {
++ gtk_tree_model_get (model, &iter,
++ TYPE_COLUMN, &type,
++ ID_COLUMN, &id,
++ -1);
++ if (index != old_current_index &&
++ g_str_equal (type, old_current_type) &&
++ g_str_equal (id, old_current_id))
++ {
++ g_settings_set_uint (input_sources_settings, KEY_CURRENT_INPUT_SOURCE, index);
++ }
++ g_variant_builder_add (&builder, "(ss)", type, id);
++ g_free (type);
++ g_free (id);
++ index += 1;
++ }
++ while (gtk_tree_model_iter_next (model, &iter));
++
++ g_settings_set_value (input_sources_settings, KEY_INPUT_SOURCES, g_variant_builder_end (&builder));
++ g_settings_apply (input_sources_settings);
++
++ g_variant_unref (old_sources);
++}
++
++static gboolean
++get_selected_iter (GtkBuilder *builder,
++ GtkTreeModel **model,
++ GtkTreeIter *iter)
++{
++ GtkTreeSelection *selection;
++
++ selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (WID ("active_input_sources")));
++
++ return gtk_tree_selection_get_selected (selection, model, iter);
++}
++
++static gint
++idx_from_model_iter (GtkTreeModel *model,
++ GtkTreeIter *iter)
++{
++ GtkTreePath *path;
++ gint idx;
++
++ path = gtk_tree_model_get_path (model, iter);
++ if (path == NULL)
++ return -1;
++
++ idx = gtk_tree_path_get_indices (path)[0];
++ gtk_tree_path_free (path);
++
++ return idx;
++}
++
++static void
++update_button_sensitivity (GtkBuilder *builder)
++{
++ GtkWidget *remove_button;
++ GtkWidget *up_button;
++ GtkWidget *down_button;
++ GtkWidget *show_button;
++ GtkWidget *settings_button;
++ GtkTreeView *tv;
++ GtkTreeModel *model;
++ GtkTreeIter iter;
++ gint n_active;
++ gint index;
++ gboolean settings_sensitive;
++ GDesktopAppInfo *app_info;
++
++ remove_button = WID("input_source_remove");
++ show_button = WID("input_source_show");
++ up_button = WID("input_source_move_up");
++ down_button = WID("input_source_move_down");
++ settings_button = WID("input_source_settings");
++
++ tv = GTK_TREE_VIEW (WID ("active_input_sources"));
++ n_active = gtk_tree_model_iter_n_children (gtk_tree_view_get_model (tv), NULL);
++
++ if (get_selected_iter (builder, &model, &iter))
++ {
++ index = idx_from_model_iter (model, &iter);
++ gtk_tree_model_get (model, &iter, SETUP_COLUMN, &app_info, -1);
++ }
++ else
++ {
++ index = -1;
++ app_info = NULL;
++ }
++
++ settings_sensitive = (index >= 0 && app_info != NULL);
++
++ if (app_info)
++ g_object_unref (app_info);
++
++ gtk_widget_set_sensitive (remove_button, index >= 0 && n_active > 1);
++ gtk_widget_set_sensitive (show_button, index >= 0);
++ gtk_widget_set_sensitive (up_button, index > 0);
++ gtk_widget_set_sensitive (down_button, index >= 0 && index < n_active - 1);
++ gtk_widget_set_sensitive (settings_button, settings_sensitive);
++}
++
++static void
++set_selected_path (GtkBuilder *builder,
++ GtkTreePath *path)
++{
++ GtkTreeSelection *selection;
++
++ selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (WID ("active_input_sources")));
++
++ gtk_tree_selection_select_path (selection, path);
++}
++
++static GtkTreeModel *
++tree_view_get_actual_model (GtkTreeView *tv)
++{
++ GtkTreeModel *filtered_store;
++
++ filtered_store = gtk_tree_view_get_model (tv);
++
++ return gtk_tree_model_filter_get_model (GTK_TREE_MODEL_FILTER (filtered_store));
++}
++
++static void
++chooser_response (GtkWidget *chooser, gint response_id, gpointer data)
++{
++ GtkBuilder *builder = data;
++
++ if (response_id == GTK_RESPONSE_OK)
++ {
++ GtkTreeModel *model;
++ GtkTreeIter iter;
++
++ if (input_chooser_get_selected (chooser, &model, &iter))
++ {
++ GtkTreeView *tv;
++ GtkListStore *child_model;
++ GtkTreeIter child_iter, filter_iter;
++ gchar *name;
++ gchar *type;
++ gchar *id;
++ GDesktopAppInfo *app_info = NULL;
++
++ gtk_tree_model_get (model, &iter,
++ NAME_COLUMN, &name,
++ TYPE_COLUMN, &type,
++ ID_COLUMN, &id,
++ -1);
++
++#ifdef HAVE_IBUS
++ if (g_str_equal (type, INPUT_SOURCE_TYPE_IBUS))
++ app_info = setup_app_info_for_id (id);
++#endif
++
++ tv = GTK_TREE_VIEW (WID ("active_input_sources"));
++ child_model = GTK_LIST_STORE (tree_view_get_actual_model (tv));
++
++ gtk_list_store_append (child_model, &child_iter);
++
++ gtk_list_store_set (child_model, &child_iter,
++ NAME_COLUMN, name,
++ TYPE_COLUMN, type,
++ ID_COLUMN, id,
++ SETUP_COLUMN, app_info,
++ -1);
++ g_free (name);
++ g_free (type);
++ g_free (id);
++ if (app_info)
++ g_object_unref (app_info);
++
++ gtk_tree_model_filter_convert_child_iter_to_iter (GTK_TREE_MODEL_FILTER (gtk_tree_view_get_model (tv)),
++ &filter_iter,
++ &child_iter);
++ gtk_tree_selection_select_iter (gtk_tree_view_get_selection (tv), &filter_iter);
++
++ update_button_sensitivity (builder);
++ update_configuration (GTK_TREE_MODEL (child_model));
++ }
++ else
++ {
++ g_debug ("nothing selected, nothing added");
++ }
++ }
++
++ gtk_widget_destroy (GTK_WIDGET (chooser));
++}
++
++static void
++add_input (GtkButton *button, gpointer data)
++{
++ GtkBuilder *builder = data;
++ GtkWidget *chooser;
++ GtkWidget *toplevel;
++ GtkWidget *treeview;
++ GtkListStore *active_sources;
++
++ g_debug ("add an input source");
++
++ toplevel = gtk_widget_get_toplevel (WID ("region_notebook"));
++ treeview = WID ("active_input_sources");
++ active_sources = GTK_LIST_STORE (tree_view_get_actual_model (GTK_TREE_VIEW (treeview)));
++
++ chooser = input_chooser_new (GTK_WINDOW (toplevel), active_sources);
++ g_signal_connect (chooser, "response",
++ G_CALLBACK (chooser_response), builder);
++}
++
++static void
++remove_selected_input (GtkButton *button, gpointer data)
++{
++ GtkBuilder *builder = data;
++ GtkTreeModel *model;
++ GtkTreeModel *child_model;
++ GtkTreeIter iter;
++ GtkTreeIter child_iter;
++ GtkTreePath *path;
++
++ g_debug ("remove selected input source");
++
++ if (get_selected_iter (builder, &model, &iter) == FALSE)
++ return;
++
++ path = gtk_tree_model_get_path (model, &iter);
++
++ child_model = gtk_tree_model_filter_get_model (GTK_TREE_MODEL_FILTER (model));
++ gtk_tree_model_filter_convert_iter_to_child_iter (GTK_TREE_MODEL_FILTER (model),
++ &child_iter,
++ &iter);
++ gtk_list_store_remove (GTK_LIST_STORE (child_model), &child_iter);
++
++ if (!gtk_tree_model_get_iter (model, &iter, path))
++ gtk_tree_path_prev (path);
++
++ set_selected_path (builder, path);
++
++ gtk_tree_path_free (path);
++
++ update_button_sensitivity (builder);
++ update_configuration (child_model);
++}
++
++static void
++move_selected_input_up (GtkButton *button, gpointer data)
++{
++ GtkBuilder *builder = data;
++ GtkTreeModel *model;
++ GtkTreeModel *child_model;
++ GtkTreeIter iter, prev;
++ GtkTreeIter child_iter, child_prev;
++ GtkTreePath *path;
++
++ g_debug ("move selected input source up");
++
++ if (!get_selected_iter (builder, &model, &iter))
++ return;
++
++ prev = iter;
++ if (!gtk_tree_model_iter_previous (model, &prev))
++ return;
++
++ path = gtk_tree_model_get_path (model, &prev);
++
++ child_model = gtk_tree_model_filter_get_model (GTK_TREE_MODEL_FILTER (model));
++ gtk_tree_model_filter_convert_iter_to_child_iter (GTK_TREE_MODEL_FILTER (model),
++ &child_iter,
++ &iter);
++ gtk_tree_model_filter_convert_iter_to_child_iter (GTK_TREE_MODEL_FILTER (model),
++ &child_prev,
++ &prev);
++ gtk_list_store_swap (GTK_LIST_STORE (child_model), &child_iter, &child_prev);
++
++ set_selected_path (builder, path);
++ gtk_tree_path_free (path);
++
++ update_button_sensitivity (builder);
++ update_configuration (child_model);
++}
++
++static void
++move_selected_input_down (GtkButton *button, gpointer data)
++{
++ GtkBuilder *builder = data;
++ GtkTreeModel *model;
++ GtkTreeModel *child_model;
++ GtkTreeIter iter, next;
++ GtkTreeIter child_iter, child_next;
++ GtkTreePath *path;
++
++ g_debug ("move selected input source down");
++
++ if (!get_selected_iter (builder, &model, &iter))
++ return;
++
++ next = iter;
++ if (!gtk_tree_model_iter_next (model, &next))
++ return;
++
++ path = gtk_tree_model_get_path (model, &next);
++
++ child_model = gtk_tree_model_filter_get_model (GTK_TREE_MODEL_FILTER (model));
++ gtk_tree_model_filter_convert_iter_to_child_iter (GTK_TREE_MODEL_FILTER (model),
++ &child_iter,
++ &iter);
++ gtk_tree_model_filter_convert_iter_to_child_iter (GTK_TREE_MODEL_FILTER (model),
++ &child_next,
++ &next);
++ gtk_list_store_swap (GTK_LIST_STORE (child_model), &child_iter, &child_next);
++
++ set_selected_path (builder, path);
++ gtk_tree_path_free (path);
++
++ update_button_sensitivity (builder);
++ update_configuration (child_model);
++}
++
++static void
++show_selected_layout (GtkButton *button, gpointer data)
++{
++ GtkBuilder *builder = data;
++ GtkTreeModel *model;
++ GtkTreeIter iter;
++ gchar *type;
++ gchar *id;
++ gchar *kbd_viewer_args;
++ const gchar *xkb_layout;
++ const gchar *xkb_variant;
++
++ g_debug ("show selected layout");
++
++ if (!get_selected_iter (builder, &model, &iter))
++ return;
++
++ gtk_tree_model_get (model, &iter,
++ TYPE_COLUMN, &type,
++ ID_COLUMN, &id,
++ -1);
++
++ if (g_str_equal (type, INPUT_SOURCE_TYPE_XKB))
++ {
++ gnome_xkb_info_get_layout_info (xkb_info, id, NULL, NULL, &xkb_layout, &xkb_variant);
++
++ if (!xkb_layout || !xkb_layout[0])
++ {
++ g_warning ("Couldn't find XKB input source '%s'", id);
++ goto exit;
++ }
++ }
++ else if (g_str_equal (type, INPUT_SOURCE_TYPE_IBUS))
++ {
++#ifdef HAVE_IBUS
++ IBusEngineDesc *engine_desc = NULL;
++
++ if (ibus_engines)
++ engine_desc = g_hash_table_lookup (ibus_engines, id);
++
++ if (engine_desc)
++ {
++ xkb_layout = ibus_engine_desc_get_layout (engine_desc);
++ xkb_variant = "";
++ }
++ else
++ {
++ g_warning ("Couldn't find IBus input source '%s'", id);
++ goto exit;
++ }
++#else
++ g_warning ("IBus input source type specified but IBus support was not compiled");
++ goto exit;
++#endif
++ }
++ else
++ {
++ g_warning ("Unknown input source type '%s'", type);
++ goto exit;
++ }
++
++ if (xkb_variant[0])
++ kbd_viewer_args = g_strdup_printf ("gkbd-keyboard-display -l \"%s\t%s\"",
++ xkb_layout, xkb_variant);
++ else
++ kbd_viewer_args = g_strdup_printf ("gkbd-keyboard-display -l %s",
++ xkb_layout);
++
++ g_spawn_command_line_async (kbd_viewer_args, NULL);
++
++ g_free (kbd_viewer_args);
++ exit:
++ g_free (type);
++ g_free (id);
++}
++
++static void
++show_selected_settings (GtkButton *button, gpointer data)
++{
++ GtkBuilder *builder = data;
++ GtkTreeModel *model;
++ GtkTreeIter iter;
++ GdkAppLaunchContext *ctx;
++ GDesktopAppInfo *app_info;
++ gchar *id;
++ GError *error = NULL;
++
++ g_debug ("show selected layout");
++
++ if (!get_selected_iter (builder, &model, &iter))
++ return;
++
++ gtk_tree_model_get (model, &iter, SETUP_COLUMN, &app_info, -1);
++
++ if (!app_info)
++ return;
++
++ ctx = gdk_display_get_app_launch_context (gdk_display_get_default ());
++ gdk_app_launch_context_set_timestamp (ctx, gtk_get_current_event_time ());
++
++ gtk_tree_model_get (model, &iter, ID_COLUMN, &id, -1);
++ g_app_launch_context_setenv (G_APP_LAUNCH_CONTEXT (ctx),
++ "IBUS_ENGINE_NAME",
++ id);
++ g_free (id);
++
++ if (!g_app_info_launch (G_APP_INFO (app_info), NULL, G_APP_LAUNCH_CONTEXT (ctx), &error))
++ {
++ g_warning ("Failed to launch input source setup: %s", error->message);
++ g_error_free (error);
++ }
++
++ g_object_unref (ctx);
++ g_object_unref (app_info);
++}
++
++static gboolean
++go_to_shortcuts (GtkLinkButton *button,
++ CcRegionPanel *panel)
++{
++ gchar *argv[3];
++ argv[0] = "cinnamon-settings";
++ argv[1] = "keyboard";
++ argv[3] = NULL;
++ g_spawn_async(NULL, argv, NULL, G_SPAWN_SEARCH_PATH, NULL, NULL, NULL, NULL);
++ return TRUE;
++}
++
++static void
++input_sources_changed (GSettings *settings,
++ gchar *key,
++ GtkBuilder *builder)
++{
++ GtkWidget *treeview;
++ GtkTreeModel *store;
++ GtkTreePath *path;
++ GtkTreeIter iter;
++ GtkTreeModel *model;
++
++ treeview = WID("active_input_sources");
++ store = tree_view_get_actual_model (GTK_TREE_VIEW (treeview));
++
++ if (get_selected_iter (builder, &model, &iter))
++ path = gtk_tree_model_get_path (model, &iter);
++ else
++ path = NULL;
++
++ gtk_list_store_clear (GTK_LIST_STORE (store));
++ populate_with_active_sources (GTK_LIST_STORE (store));
++
++ if (path)
++ {
++ set_selected_path (builder, path);
++ gtk_tree_path_free (path);
++ }
++}
++
++static void
++update_shortcut_label (GtkWidget *widget,
++ const char *value)
++{
++ char *text;
++ guint accel_key, *keycode;
++ GdkModifierType mods;
++
++ if (value == NULL || *value == '\0')
++ {
++ gtk_label_set_text (GTK_LABEL (widget), "\342\200\224");
++ return;
++ }
++ gtk_accelerator_parse_with_keycode (value, &accel_key, &keycode, &mods);
++ if (accel_key == 0 && keycode == NULL && mods == 0)
++ {
++ gtk_label_set_text (GTK_LABEL (widget), "\342\200\224");
++ g_warning ("Failed to parse keyboard shortcut: '%s'", value);
++ return;
++ }
++
++ text = gtk_accelerator_get_label_with_keycode (gtk_widget_get_display (widget), accel_key, *keycode, mods);
++ g_free (keycode);
++ gtk_label_set_text (GTK_LABEL (widget), text);
++ g_free (text);
++}
++
++static void
++update_shortcuts (GtkBuilder *builder)
++{
++ char *previous, *next;
++ GSettings *settings;
++
++ settings = g_settings_new ("org.cinnamon.settings-daemon.plugins.media-keys");
++
++ previous = g_settings_get_string (settings, "switch-input-source-backward");
++ next = g_settings_get_string (settings, "switch-input-source");
++
++ update_shortcut_label (WID ("prev-source-shortcut-label"), previous);
++ update_shortcut_label (WID ("next-source-shortcut-label"), next);
++
++ g_free (previous);
++ g_free (next);
++}
++
++static gboolean
++active_sources_visible_func (GtkTreeModel *model,
++ GtkTreeIter *iter,
++ gpointer data)
++{
++ gchar *display_name;
++
++ gtk_tree_model_get (model, iter, NAME_COLUMN, &display_name, -1);
++
++ if (!display_name)
++ return FALSE;
++
++ g_free (display_name);
++
++ return TRUE;
++}
++
++void
++setup_input_tabs (GtkBuilder *builder,
++ CcRegionPanel *panel)
++{
++ GtkWidget *treeview;
++ GtkTreeViewColumn *column;
++ GtkCellRenderer *cell;
++ GtkListStore *store;
++ GtkTreeModel *filtered_store;
++ GtkTreeSelection *selection;
++
++ /* set up the list of active inputs */
++ treeview = WID("active_input_sources");
++ column = gtk_tree_view_column_new ();
++ cell = gtk_cell_renderer_text_new ();
++ gtk_tree_view_column_pack_start (column, cell, TRUE);
++ gtk_tree_view_column_add_attribute (column, cell, "text", NAME_COLUMN);
++ gtk_tree_view_append_column (GTK_TREE_VIEW (treeview), column);
++
++ store = gtk_list_store_new (N_COLUMNS,
++ G_TYPE_STRING,
++ G_TYPE_STRING,
++ G_TYPE_STRING,
++ G_TYPE_DESKTOP_APP_INFO);
++
++ gtk_tree_view_set_model (GTK_TREE_VIEW (treeview), GTK_TREE_MODEL (store));
++
++ input_sources_settings = g_settings_new (GNOME_DESKTOP_INPUT_SOURCES_DIR);
++ g_settings_delay (input_sources_settings);
++ g_object_weak_ref (G_OBJECT (builder), (GWeakNotify) g_object_unref, input_sources_settings);
++
++ if (!xkb_info)
++ xkb_info = gnome_xkb_info_new ();
++
++#ifdef HAVE_IBUS
++ ibus_init ();
++ shell_name_watch_id = g_bus_watch_name (G_BUS_TYPE_SESSION,
++ "org.Cinnamon",
++ G_BUS_NAME_WATCHER_FLAGS_NONE,
++ on_shell_appeared,
++ NULL,
++ builder,
++ NULL);
++ g_object_weak_ref (G_OBJECT (builder), (GWeakNotify) clear_ibus, NULL);
++#endif
++
++ populate_with_active_sources (store);
++
++ selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (treeview));
++ g_signal_connect_swapped (selection, "changed",
++ G_CALLBACK (update_button_sensitivity), builder);
++
++ /* Some input source types might have their info loaded
++ * asynchronously. In that case we don't want to show them
++ * immediately so we use a filter model on top of the real model
++ * which mirrors the GSettings key. */
++ filtered_store = gtk_tree_model_filter_new (GTK_TREE_MODEL (store), NULL);
++ gtk_tree_model_filter_set_visible_func (GTK_TREE_MODEL_FILTER (filtered_store),
++ active_sources_visible_func,
++ NULL,
++ NULL);
++ gtk_tree_view_set_model (GTK_TREE_VIEW (treeview), filtered_store);
++
++ /* set up the buttons */
++ g_signal_connect (WID("input_source_add"), "clicked",
++ G_CALLBACK (add_input), builder);
++ g_signal_connect (WID("input_source_remove"), "clicked",
++ G_CALLBACK (remove_selected_input), builder);
++ g_signal_connect (WID("input_source_move_up"), "clicked",
++ G_CALLBACK (move_selected_input_up), builder);
++ g_signal_connect (WID("input_source_move_down"), "clicked",
++ G_CALLBACK (move_selected_input_down), builder);
++ g_signal_connect (WID("input_source_show"), "clicked",
++ G_CALLBACK (show_selected_layout), builder);
++ g_signal_connect (WID("input_source_settings"), "clicked",
++ G_CALLBACK (show_selected_settings), builder);
++
++ /* use an em dash is no shortcut */
++ update_shortcuts (builder);
++
++ g_signal_connect (WID("jump-to-shortcuts"), "activate-link",
++ G_CALLBACK (go_to_shortcuts), panel);
++
++ g_signal_connect (G_OBJECT (input_sources_settings),
++ "changed::" KEY_INPUT_SOURCES,
++ G_CALLBACK (input_sources_changed),
++ builder);
++}
++
++static void
++filter_clear (GtkEntry *entry,
++ GtkEntryIconPosition icon_pos,
++ GdkEvent *event,
++ gpointer user_data)
++{
++ gtk_entry_set_text (entry, "");
++}
++
++static gchar **search_pattern_list;
++
++static void
++filter_changed (GtkBuilder *builder)
++{
++ GtkTreeModelFilter *filtered_model;
++ GtkTreeView *tree_view;
++ GtkTreeSelection *selection;
++ GtkTreeIter selected_iter;
++ GtkWidget *filter_entry;
++ const gchar *pattern;
++ gchar *upattern;
++
++ filter_entry = WID ("input_source_filter");
++ pattern = gtk_entry_get_text (GTK_ENTRY (filter_entry));
++ upattern = g_utf8_strup (pattern, -1);
++ if (!g_strcmp0 (pattern, ""))
++ g_object_set (G_OBJECT (filter_entry),
++ "secondary-icon-name", "edit-find-symbolic",
++ "secondary-icon-activatable", FALSE,
++ "secondary-icon-sensitive", FALSE,
++ NULL);
++ else
++ g_object_set (G_OBJECT (filter_entry),
++ "secondary-icon-name", "edit-clear-symbolic",
++ "secondary-icon-activatable", TRUE,
++ "secondary-icon-sensitive", TRUE,
++ NULL);
++
++ if (search_pattern_list != NULL)
++ g_strfreev (search_pattern_list);
++
++ search_pattern_list = g_strsplit (upattern, " ", -1);
++ g_free (upattern);
++
++ filtered_model = GTK_TREE_MODEL_FILTER (gtk_builder_get_object (builder, "filtered_input_source_model"));
++ gtk_tree_model_filter_refilter (filtered_model);
++
++ tree_view = GTK_TREE_VIEW (WID ("filtered_input_source_list"));
++ selection = gtk_tree_view_get_selection (tree_view);
++ if (gtk_tree_selection_get_selected (selection, NULL, &selected_iter))
++ {
++ GtkTreePath *path = gtk_tree_model_get_path (GTK_TREE_MODEL (filtered_model),
++ &selected_iter);
++ gtk_tree_view_scroll_to_cell (tree_view, path, NULL, TRUE, 0.5, 0.5);
++ gtk_tree_path_free (path);
++ }
++ else
++ {
++ GtkTreeIter iter;
++ if (gtk_tree_model_get_iter_first (GTK_TREE_MODEL (filtered_model), &iter))
++ gtk_tree_selection_select_iter (selection, &iter);
++ }
++}
++
++static void
++selection_changed (GtkTreeSelection *selection,
++ GtkBuilder *builder)
++{
++ gtk_widget_set_sensitive (WID ("ok-button"),
++ gtk_tree_selection_get_selected (selection, NULL, NULL));
++}
++
++static void
++row_activated (GtkTreeView *tree_view,
++ GtkTreePath *path,
++ GtkTreeViewColumn *column,
++ GtkBuilder *builder)
++{
++ GtkWidget *add_button;
++ GtkWidget *dialog;
++
++ add_button = WID ("ok-button");
++ dialog = WID ("input_source_chooser");
++ if (gtk_widget_is_sensitive (add_button))
++ gtk_dialog_response (GTK_DIALOG (dialog), GTK_RESPONSE_OK);
++}
++
++static void
++entry_activated (GtkBuilder *builder,
++ gpointer data)
++{
++ row_activated (NULL, NULL, NULL, builder);
++}
++
++static gboolean
++filter_func (GtkTreeModel *model,
++ GtkTreeIter *iter,
++ gpointer data)
++{
++ gchar *name = NULL;
++ gchar **pattern;
++ gboolean rv = TRUE;
++
++ if (search_pattern_list == NULL || search_pattern_list[0] == NULL)
++ return TRUE;
++
++ gtk_tree_model_get (model, iter,
++ NAME_COLUMN, &name,
++ -1);
++
++ pattern = search_pattern_list;
++ do {
++ gboolean is_pattern_found = FALSE;
++ gchar *udesc = g_utf8_strup (name, -1);
++ if (udesc != NULL && g_strstr_len (udesc, -1, *pattern))
++ {
++ is_pattern_found = TRUE;
++ }
++ g_free (udesc);
++
++ if (!is_pattern_found)
++ {
++ rv = FALSE;
++ break;
++ }
++
++ } while (*++pattern != NULL);
++
++ g_free (name);
++
++ return rv;
++}
++
++static GtkWidget *
++input_chooser_new (GtkWindow *main_window,
++ GtkListStore *active_sources)
++{
++ GtkBuilder *builder;
++ GtkWidget *chooser;
++ GtkWidget *filtered_list;
++ GtkWidget *filter_entry;
++ GtkTreeViewColumn *visible_column;
++ GtkTreeSelection *selection;
++ GtkListStore *model;
++ GtkTreeModelFilter *filtered_model;
++ GtkTreeIter iter;
++
++ builder = gtk_builder_new ();
++ gtk_builder_set_translation_domain (builder, GETTEXT_PACKAGE);
++ gtk_builder_add_from_file (builder,
++ CINNAMONCC_UI_DIR "/cinnamon-region-panel-input-chooser.ui",
++ NULL);
++ chooser = WID ("input_source_chooser");
++ input_chooser = chooser;
++ g_object_add_weak_pointer (G_OBJECT (chooser), (gpointer *) &input_chooser);
++ g_object_set_data_full (G_OBJECT (chooser), "builder", builder, g_object_unref);
++
++ filtered_list = WID ("filtered_input_source_list");
++ filter_entry = WID ("input_source_filter");
++
++ g_object_set_data (G_OBJECT (chooser),
++ "filtered_input_source_list", filtered_list);
++ visible_column =
++ gtk_tree_view_column_new_with_attributes ("Input Sources",
++ gtk_cell_renderer_text_new (),
++ "text", NAME_COLUMN,
++ NULL);
++
++ gtk_window_set_transient_for (GTK_WINDOW (chooser), main_window);
++
++ gtk_tree_view_append_column (GTK_TREE_VIEW (filtered_list),
++ visible_column);
++ /* We handle searching ourselves, thank you. */
++ gtk_tree_view_set_enable_search (GTK_TREE_VIEW (filtered_list), FALSE);
++ gtk_tree_view_set_search_column (GTK_TREE_VIEW (filtered_list), -1);
++
++ g_signal_connect_swapped (G_OBJECT (filter_entry), "activate",
++ G_CALLBACK (entry_activated), builder);
++ g_signal_connect_swapped (G_OBJECT (filter_entry), "notify::text",
++ G_CALLBACK (filter_changed), builder);
++
++ g_signal_connect (G_OBJECT (filter_entry), "icon-release",
++ G_CALLBACK (filter_clear), NULL);
++
++ filtered_model = GTK_TREE_MODEL_FILTER (gtk_builder_get_object (builder, "filtered_input_source_model"));
++ model = GTK_LIST_STORE (gtk_builder_get_object (builder, "input_source_model"));
++
++ populate_model (model, active_sources);
++
++ gtk_tree_sortable_set_sort_column_id (GTK_TREE_SORTABLE (model),
++ NAME_COLUMN, GTK_SORT_ASCENDING);
++
++ gtk_tree_model_filter_set_visible_func (filtered_model,
++ filter_func,
++ NULL, NULL);
++
++ selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (filtered_list));
++
++ g_signal_connect (G_OBJECT (selection), "changed",
++ G_CALLBACK (selection_changed), builder);
++
++ if (gtk_tree_model_get_iter_first (GTK_TREE_MODEL (filtered_model), &iter))
++ gtk_tree_selection_select_iter (selection, &iter);
++
++ g_signal_connect (G_OBJECT (filtered_list), "row-activated",
++ G_CALLBACK (row_activated), builder);
++
++ gtk_widget_grab_focus (filter_entry);
++
++ gtk_widget_show (chooser);
++
++ return chooser;
++}
++
++static gboolean
++input_chooser_get_selected (GtkWidget *dialog,
++ GtkTreeModel **model,
++ GtkTreeIter *iter)
++{
++ GtkWidget *tv;
++ GtkTreeSelection *selection;
++
++ tv = g_object_get_data (G_OBJECT (dialog), "filtered_input_source_list");
++ selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (tv));
++
++ return gtk_tree_selection_get_selected (selection, model, iter);
++}
+diff -uNrp a/panels/region/cinnamon-region-panel-input-chooser.ui b/panels/region/cinnamon-region-panel-input-chooser.ui
+--- a/panels/region/cinnamon-region-panel-input-chooser.ui 1970-01-01 01:00:00.000000000 +0100
++++ b/panels/region/cinnamon-region-panel-input-chooser.ui 2013-09-21 13:24:15.339949536 +0100
+@@ -0,0 +1,157 @@
++
++
++
++
++
++
++
+diff -uNrp a/panels/region/cinnamon-region-panel-input.h b/panels/region/cinnamon-region-panel-input.h
+--- a/panels/region/cinnamon-region-panel-input.h 1970-01-01 01:00:00.000000000 +0100
++++ b/panels/region/cinnamon-region-panel-input.h 2013-09-21 13:24:15.339949536 +0100
+@@ -0,0 +1,36 @@
++/* cinnamon-region-panel-input.h
++ * Copyright (C) 2011 Red Hat, Inc.
++ *
++ * Written by Matthias Clasen
++ *
++ * This program is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License as published by
++ * the Free Software Foundation; either version 2, or (at your option)
++ * any later version.
++ *
++ * This program is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ * GNU General Public License for more details.
++ *
++ * You should have received a copy of the GNU General Public License
++ * along with this program; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street - Suite 500, Boston, MA
++ * 02110-1335, USA.
++ */
++
++#ifndef __CINNAMON_KEYBOARD_PROPERTY_INPUT_H
++#define __CINNAMON_KEYBOARD_PROPERTY_INPUT_H
++
++#include
++
++#include "cc-region-panel.h"
++
++G_BEGIN_DECLS
++
++void setup_input_tabs (GtkBuilder *builder,
++ CcRegionPanel *self);
++
++G_END_DECLS
++
++#endif /* __CINNAMON_KEYBOARD_PROPERTY_INPUT_H */
+diff -uNrp a/panels/region/cinnamon-region-panel-lang.c b/panels/region/cinnamon-region-panel-lang.c
+--- a/panels/region/cinnamon-region-panel-lang.c 2013-08-25 14:40:14.000000000 +0100
++++ b/panels/region/cinnamon-region-panel-lang.c 2013-09-21 13:24:15.340949500 +0100
+@@ -24,7 +24,7 @@
+ #endif
+
+ #include
+-#include
++#include
+
+ #include "cinnamon-region-panel-lang.h"
+ #include "cinnamon-region-panel-formats.h"
+diff -uNrp a/panels/region/cinnamon-region-panel-lang.h b/panels/region/cinnamon-region-panel-lang.h
+--- a/panels/region/cinnamon-region-panel-lang.h 2013-08-25 14:40:14.000000000 +0100
++++ b/panels/region/cinnamon-region-panel-lang.h 2013-09-21 13:24:15.340949500 +0100
+@@ -19,8 +19,8 @@
+ * 02110-1335, USA.
+ */
+
+-#ifndef __GNOME_KEYBOARD_PROPERTY_LANG_H
+-#define __GNOME_KEYBOARD_PROPERTY_LANG_H
++#ifndef __CINNAMON_KEYBOARD_PROPERTY_LANG_H
++#define __CINNAMON_KEYBOARD_PROPERTY_LANG_H
+
+ #include
+
+@@ -29,4 +29,4 @@ G_BEGIN_DECLS
+ void setup_language (GtkBuilder *builder);
+
+ G_END_DECLS
+-#endif /* __GNOME_KEYBOARD_PROPERTY_LANG_H */
++#endif /* __CINNAMON_KEYBOARD_PROPERTY_LANG_H */
+diff -uNrp a/panels/region/cinnamon-region-panel-layout-chooser.ui b/panels/region/cinnamon-region-panel-layout-chooser.ui
+--- a/panels/region/cinnamon-region-panel-layout-chooser.ui 2013-08-25 14:40:14.000000000 +0100
++++ b/panels/region/cinnamon-region-panel-layout-chooser.ui 1970-01-01 01:00:00.000000000 +0100
+@@ -1,180 +0,0 @@
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+- layout_list_model
+-
+-
+- False
+- False
+- 5
+- Choose a Layout
+- True
+- center-on-parent
+- dialog
+-
+-
+- True
+- False
+- vertical
+- 2
+-
+-
+- True
+- False
+- end
+-
+-
+- Preview
+- True
+- True
+- True
+- False
+-
+-
+- False
+- False
+- 0
+- True
+-
+-
+-
+-
+- gtk-cancel
+- True
+- True
+- True
+- False
+- False
+- True
+-
+-
+- False
+- False
+- end
+- 1
+-
+-
+-
+-
+- gtk-add
+- True
+- True
+- True
+- False
+- False
+- True
+-
+-
+- False
+- False
+- end
+- 2
+-
+-
+-
+-
+-
+-
+- True
+- False
+- 5
+- 6
+-
+-
+- True
+- False
+- 6
+-
+-
+- True
+- False
+- 0
+- Select an input source to add
+-
+-
+- False
+- False
+- 0
+-
+-
+-
+-
+- True
+- True
+- never
+- etched-in
+- 450
+- 250
+-
+-
+- True
+- True
+- filtered_layout_list_model
+- False
+- 0
+-
+-
+-
+-
+-
+-
+-
+- True
+- True
+- 1
+-
+-
+-
+-
+- True
+- True
+- 0
+-
+-
+-
+-
+- True
+- True
+- •
+- edit-find-symbolic
+- False
+- False
+-
+-
+- False
+- False
+- end
+- 1
+-
+-
+-
+-
+- True
+- True
+- 1
+-
+-
+-
+-
+-
+- btnPreview
+- btnOk
+- btnCancel
+-
+-
+-
+diff -uNrp a/panels/region/cinnamon-region-panel-options-dialog.ui b/panels/region/cinnamon-region-panel-options-dialog.ui
+--- a/panels/region/cinnamon-region-panel-options-dialog.ui 2013-08-25 14:40:14.000000000 +0100
++++ b/panels/region/cinnamon-region-panel-options-dialog.ui 1970-01-01 01:00:00.000000000 +0100
+@@ -1,79 +0,0 @@
+-
+-
+-
+-
+- False
+- GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK
+- 5
+- Keyboard Layout Options
+- center-on-parent
+- 550
+- 400
+- dialog
+-
+-
+- True
+- False
+- GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK
+- vertical
+- 2
+-
+-
+- True
+- True
+- 5
+- out
+-
+-
+- True
+- False
+- none
+-
+-
+- True
+- False
+-
+-
+-
+-
+-
+-
+- False
+- True
+- 1
+-
+-
+-
+-
+- True
+- False
+- GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK
+- end
+-
+-
+-
+-
+-
+- gtk-close
+- True
+- True
+- True
+- GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK
+- False
+- True
+-
+-
+- False
+- False
+- 1
+-
+-
+-
+-
+-
+-
+-
+- button2
+-
+-
+-
+diff -uNrp a/panels/region/cinnamon-region-panel-system.c b/panels/region/cinnamon-region-panel-system.c
+--- a/panels/region/cinnamon-region-panel-system.c 2013-08-25 14:40:14.000000000 +0100
++++ b/panels/region/cinnamon-region-panel-system.c 2013-09-21 13:24:15.342949428 +0100
+@@ -27,15 +27,18 @@
+
+ #include
+
+-#include
++#include
++
++#define GNOME_DESKTOP_USE_UNSTABLE_API
++#include
+
+-#include
+ #include "cc-common-language.h"
+ #include "gdm-languages.h"
+ #include "cinnamon-region-panel-system.h"
+-#include "cinnamon-region-panel-xkb.h"
+
+-static GSettings *locale_settings, *xkb_settings;
++#define WID(s) GTK_WIDGET(gtk_builder_get_object (dialog, s))
++
++static GSettings *locale_settings, *input_sources_settings;
+ static GDBusProxy *localed_proxy;
+ static GPermission *localed_permission;
+
+@@ -72,13 +75,14 @@ update_copy_button (GtkBuilder *dialog)
+
+ button = WID ("copy_settings_button");
+
+- /* If the version of localed doesn't include layouts... */
+- if (system_input_source) {
++ if (user_input_source && user_input_source[0]) {
+ layouts_differ = (g_strcmp0 (user_input_source, system_input_source) != 0);
+ if (layouts_differ == FALSE)
+ layouts_differ = (g_strcmp0 (user_input_variants, system_input_variants) != 0);
+- } else
++ } else {
++ /* Nothing to copy */
+ layouts_differ = FALSE;
++ }
+
+ if (g_strcmp0 (user_lang, system_lang) == 0 &&
+ g_strcmp0 (user_region, system_region) == 0 &&
+@@ -131,61 +135,67 @@ system_update_language (GtkBuilder *dial
+ }
+
+ static void
+-xkb_settings_changed (GSettings *settings,
+- const gchar *key,
+- GtkBuilder *dialog)
++input_sources_changed (GSettings *settings,
++ const gchar *key,
++ GtkBuilder *dialog)
+ {
+- guint i;
+- GString *disp, *list, *variants;
+- GtkWidget *label;
+- gchar **layouts;
+-
+- layouts = g_settings_get_strv (settings, "layouts");
+- if (layouts == NULL)
+- return;
+-
+- label = WID ("user_input_source");
+- disp = g_string_new ("");
+- list = g_string_new ("");
+- variants = g_string_new ("");
+-
+- for (i = 0; layouts[i]; i++) {
+- gchar *utf_visible;
+- char **split;
+- gchar *layout, *variant;
+-
+- utf_visible = xkb_layout_description_utf8 (layouts[i]);
+- if (disp->str[0] != '\0')
+- g_string_append (disp, ", ");
+- g_string_append (disp, utf_visible ? utf_visible : layouts[i]);
+- g_free (utf_visible);
+-
+- split = g_strsplit_set (layouts[i], " \t", 2);
+-
+- if (split == NULL || split[0] == NULL)
+- continue;
+-
+- layout = split[0];
+- variant = split[1];
+-
+- if (list->str[0] != '\0')
+- g_string_append (list, ",");
+- g_string_append (list, layout);
+-
+- if (variants->str[0] != '\0')
+- g_string_append (variants, ",");
+- g_string_append (variants, variant ? variant : "");
+-
+- g_strfreev (split);
+- }
+- g_strfreev (layouts);
++ GString *disp, *list, *variants;
++ GtkWidget *label;
++ GnomeXkbInfo *xkb_info;
++ GVariantIter iter;
++ GVariant *sources;
++ const gchar *type;
++ const gchar *id;
++
++ sources = g_settings_get_value (input_sources_settings, "sources");
++ xkb_info = gnome_xkb_info_new ();
++
++ label = WID ("user_input_source");
++ disp = g_string_new ("");
++ list = g_string_new ("");
++ variants = g_string_new ("");
++
++ g_variant_iter_init (&iter, sources);
++ while (g_variant_iter_next (&iter, "(&s&s)", &type, &id)) {
++ /* We can't copy non-XKB layouts to the system yet */
++ if (g_str_equal (type, "xkb")) {
++ char **split;
++ gchar *layout, *variant;
++ const char *name;
++
++ gnome_xkb_info_get_layout_info (xkb_info, id, &name, NULL, NULL, NULL);
++ if (disp->str[0] != '\0')
++ g_string_append (disp, ", ");
++ g_string_append (disp, name);
++
++ split = g_strsplit (id, "+", 2);
++
++ if (split == NULL || split[0] == NULL)
++ continue;
++
++ layout = split[0];
++ variant = split[1];
++
++ if (list->str[0] != '\0') {
++ g_string_append (list, ",");
++ g_string_append (variants, ",");
++ }
++ g_string_append (list, layout);
++ g_string_append (variants, variant ? variant : "");
++
++ g_strfreev (split);
++ }
++ }
++ g_variant_unref (sources);
++ g_object_unref (xkb_info);
+
+ g_object_set_data_full (G_OBJECT (label), "input_source", g_string_free (list, FALSE), g_free);
+ g_object_set_data_full (G_OBJECT (label), "input_variants", g_string_free (variants, FALSE), g_free);
++
+ gtk_label_set_text (GTK_LABEL (label), disp->str);
+ g_string_free (disp, TRUE);
+
+- update_copy_button (dialog);
++ update_copy_button (dialog);
+ }
+
+ static void
+@@ -222,12 +232,13 @@ on_localed_properties_changed (GDBusProx
+ const gchar **invalidated_properties,
+ GtkBuilder *dialog)
+ {
+- GVariant *v;
++ GVariant *v, *w;
+ GtkWidget *label;
+- const char *layout;
++ GnomeXkbInfo *xkb_info;
+ char **layouts;
++ char **variants;
+ GString *disp;
+- guint i;
++ guint i, n;
+
+ if (invalidated_properties != NULL) {
+ guint i;
+@@ -236,6 +247,8 @@ on_localed_properties_changed (GDBusProx
+ update_property (proxy, "Locale");
+ else if (g_str_equal (invalidated_properties[i], "X11Layout"))
+ update_property (proxy, "X11Layout");
++ else if (g_str_equal (invalidated_properties[i], "X11Variant"))
++ update_property (proxy, "X11Variant");
+ }
+ }
+
+@@ -290,29 +303,56 @@ on_localed_properties_changed (GDBusProx
+ label = WID ("system_input_source");
+ v = g_dbus_proxy_get_cached_property (proxy, "X11Layout");
+ if (v) {
+- layout = g_variant_get_string (v, NULL);
+- g_object_set_data_full (G_OBJECT (label), "input_source", g_strdup (layout), g_free);
+- } else {
++ layouts = g_strsplit (g_variant_get_string (v, NULL), ",", -1);
++ g_object_set_data_full (G_OBJECT (label), "input_source",
++ g_variant_dup_string (v, NULL), g_free);
++ g_variant_unref (v);
++ } else {
+ g_object_set_data_full (G_OBJECT (label), "input_source", NULL, g_free);
+ update_copy_button (dialog);
+ return;
+ }
+
+- disp = g_string_new ("");
+- layouts = g_strsplit (layout, ",", -1);
+- for (i = 0; layouts[i]; i++) {
+- gchar *utf_visible;
+-
+- utf_visible = xkb_layout_description_utf8 (layouts[i]);
+- if (disp->str[0] != '\0')
+- disp = g_string_append (disp, ", ");
+- disp = g_string_append (disp, utf_visible ? utf_visible : layouts[i]);
+- g_free (utf_visible);
+- }
++ w = g_dbus_proxy_get_cached_property (proxy, "X11Variant");
++ if (w) {
++ variants = g_strsplit (g_variant_get_string (w, NULL), ",", -1);
++ g_object_set_data_full (G_OBJECT (label), "input_variants",
++ g_variant_dup_string (w, NULL), g_free);
++ g_variant_unref (w);
++ } else {
++ variants = NULL;
++ g_object_set_data_full (G_OBJECT (label), "input_variants", NULL, g_free);
++ }
++
++ if (variants && variants[0])
++ n = MIN (g_strv_length (layouts), g_strv_length (variants));
++ else
++ n = g_strv_length (layouts);
++
++ xkb_info = gnome_xkb_info_new ();
++ disp = g_string_new ("");
++ for (i = 0; i < n && layouts[i][0]; i++) {
++ const char *name;
++ char *id;
++
++ if (variants && variants[i] && variants[i][0])
++ id = g_strdup_printf ("%s+%s", layouts[i], variants[i]);
++ else
++ id = g_strdup (layouts[i]);
++
++ gnome_xkb_info_get_layout_info (xkb_info, id, &name, NULL, NULL, NULL);
++ if (disp->str[0] != '\0')
++ disp = g_string_append (disp, ", ");
++ disp = g_string_append (disp, name ? name : id);
++
++ g_free (id);
++ }
+ gtk_label_set_text (GTK_LABEL (label), disp->str);
+ g_string_free (disp, TRUE);
+
+- g_variant_unref (v);
++ g_strfreev (variants);
++ g_strfreev (layouts);
++ g_object_unref (xkb_info);
+
+ update_copy_button (dialog);
+ }
+@@ -386,6 +426,11 @@ copy_settings (GtkButton *button, GtkBui
+ layout = g_object_get_data (G_OBJECT (label), "input_source");
+ variants = g_object_get_data (G_OBJECT (label), "input_variants");
+
++ if (layout == NULL || layout[0] == '\0') {
++ g_debug ("Not calling SetX11Keyboard, as there are no XKB input sources in the user's settings");
++ return;
++ }
++
+ g_dbus_proxy_call (localed_proxy,
+ "SetX11Keyboard",
+ g_variant_new ("(ssssbb)", layout, "", variants ? variants : "", "", TRUE, TRUE),
+@@ -468,10 +513,10 @@ setup_system (GtkBuilder *dialog)
+ G_CALLBACK (locale_settings_changed), dialog);
+ g_object_weak_ref (G_OBJECT (dialog), (GWeakNotify) g_object_unref, locale_settings);
+
+- xkb_settings = g_settings_new (GKBD_KEYBOARD_SCHEMA);
+- g_signal_connect (xkb_settings, "changed::layouts",
+- G_CALLBACK (xkb_settings_changed), dialog);
+- g_object_weak_ref (G_OBJECT (dialog), (GWeakNotify) g_object_unref, xkb_settings);
++ input_sources_settings = g_settings_new ("org.cinnamon.desktop.input-sources");
++ g_signal_connect (input_sources_settings, "changed::sources",
++ G_CALLBACK (input_sources_changed), dialog);
++ g_object_weak_ref (G_OBJECT (dialog), (GWeakNotify) g_object_unref, input_sources_settings);
+
+ /* Display user settings */
+ language = cc_common_language_get_current_language ();
+@@ -480,7 +525,7 @@ setup_system (GtkBuilder *dialog)
+
+ locale_settings_changed (locale_settings, "region", dialog);
+
+- xkb_settings_changed (xkb_settings, "layouts", dialog);
++ input_sources_changed (input_sources_settings, "sources", dialog);
+
+ bus = g_bus_get_sync (G_BUS_TYPE_SYSTEM, NULL, NULL);
+ g_dbus_proxy_new (bus,
+diff -uNrp a/panels/region/cinnamon-region-panel-system.h b/panels/region/cinnamon-region-panel-system.h
+--- a/panels/region/cinnamon-region-panel-system.h 2013-08-25 14:40:14.000000000 +0100
++++ b/panels/region/cinnamon-region-panel-system.h 2013-09-21 13:24:15.342949428 +0100
+@@ -19,8 +19,8 @@
+ * 02110-1335, USA.
+ */
+
+-#ifndef __GNOME_REGION_PANEL_SYSTEM_H
+-#define __GNOME_REGION_PANEL_SYSTEM_H
++#ifndef __CINNAMON_REGION_PANEL_SYSTEM_H
++#define __CINNAMON_REGION_PANEL_SYSTEM_H
+
+ #include
+
+diff -uNrp a/panels/region/cinnamon-region-panel.ui b/panels/region/cinnamon-region-panel.ui
+--- a/panels/region/cinnamon-region-panel.ui 2013-08-25 14:40:14.000000000 +0100
++++ b/panels/region/cinnamon-region-panel.ui 2013-09-21 13:24:15.347949247 +0100
+@@ -162,27 +162,17 @@
+
++
+
+
++ False
+ True
+- False
+ Add Language
+- True
+- list-add-symbolic
+-
+-
+- False
+- True
+-
+-
+-
+-
+- True
+- False
+ False
+- Remove Language
+ True
+- list-remove-symbolic
++ list-add-symbolic
+
+
+ False
+@@ -198,12 +188,13 @@
+
+
+
+- True
+ False
+
+
+ True
+ False
++ True
++ Add Language
+
+
+ True
+@@ -212,23 +203,24 @@
+
+
+
+-
+- button
++
++ Install languages...
+ True
+ True
+ True
++ True
+
+
+- True
++ False
+ True
+- 13
++ 1
+
+
+
+
+ False
+ True
+- 2
++ 1
+
+
+
+@@ -305,19 +297,19 @@
+
+
+
+- True
+- False
+ icons
+ False
+ 1
++ True
+
+
+
++ False
++ Add Region
+ True
+ False
+- Add Region
+ True
+ list-add-symbolic
+
+@@ -328,10 +320,11 @@
+
+
+
++ False
+ True
++ Remove Region
+ False
+ False
+- Remove Region
+ True
+ list-remove-symbolic
+
+@@ -373,18 +366,6 @@
+ 9
+ 2
+
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+
+ True
+ False
+@@ -626,6 +607,12 @@
+ 1
+
+
++
++
++
++
++
++
+
+
+ 1
+@@ -643,36 +630,43 @@
+
+
+
+-
++
+ True
+ False
+- 10
++ 12
+ 12
+
+-
++
++ True
++ False
++ 0
++ Select keyboards or other input sources
++
++
++ False
++ False
++ 0
++
+
+
+-
++
+ True
+ False
+ 12
+
+-
++
+ True
+ False
+
+-
++
+ True
+ True
+ in
+
+-
++
+ True
+ True
+ False
+-
+-
+-
+
+
+
+@@ -683,7 +677,7 @@
+
+
+
+-
++
+ True
+ False
+ icons
+@@ -693,70 +687,166 @@
+
+
+
+-
++
+ True
+- False
+- Add Layout
+- True
+- list-add-symbolic
++
++
++ True
++
++
++ True
++
++
++ Add Input Source
++
++
++
++
++
++ True
++ list-add-symbolic
++ 1
++
++
++
++
++
++
++ True
++
++
++ Remove Input Source
++
++
++
++
++ True
++ list-remove-symbolic
++ 1
++
++
++
++
++
++
+
+-
+- False
+- True
+-
+
++
+
+-
++
+ True
+- False
+- Remove Layout
+- True
+- list-remove-symbolic
++ False
+
+
+- False
+- True
++ True
+
+
++
+
+-
++
+ True
+- False
+- Move Up
+- True
+- go-up-symbolic
++
++
++ True
++
++
++ True
++
++
++ Move Input Source Up
++
++
++
++
++
++ True
++ go-up-symbolic
++ 1
++
++
++
++
++
++
++ True
++
++
++ Move Input Source Down
++
++
++
++
++ True
++ go-down-symbolic
++ 1
++
++
++
++
++
++
+
+-
+- False
+- True
+-
+
++
+
+-
++
+ True
+- False
+- Move Down
+- True
+- go-down-symbolic
++ False
++ True
+
+
+- False
+- True
++ True
+
+
++
+
+-
++
+ True
+- False
+- Preview Layout
+- True
+- input-keyboard-symbolic
++
++
++ True
++
++
++ True
++
++
++ Input Source Settings
++
++
++
++
++
++ True
++ preferences-system-symbolic
++ 1
++ 16
++
++
++
++
++
++
++ True
++
++
++ Show Keyboard Layout
++
++
++
++
++
++ True
++ input-keyboard-symbolic
++ 1
++
++
++
++
++
++
+
+-
+- False
+- True
+-
+
++
+
+
+ False
+@@ -772,168 +862,111 @@
+
+
+
+-
++
+ True
+ False
+- 12
++ 0
++ none
+
+-
++
+ True
+ False
+- 6
++ 12
+
+-
+- Use the same layout for all windows
+- True
+- True
+- False
+- 0
+- True
+- True
+-
+-
+- True
+- True
+- 0
+-
+-
+-
+-
+- Allow different layouts for individual windows
+- True
+- True
+- False
+- 0
+- True
+- True
+- chk_same_group
+-
+-
+- True
+- True
+- 1
+-
+-
+-
+-
++
+ True
+ False
+- 12
++ 6
++ 6
++ 6
+
+-
++
+ True
+ False
+-
+-
+- New windows use the default layout
+- True
+- True
+- False
+- 0
+- True
+- True
+-
+-
+- True
+- True
+- 0
+-
+-
+-
+-
+- New windows use the previous window's layout
+- True
+- True
+- False
+- 0
+- True
+- True
+- chk_new_windows_default_layout
+-
+-
+- True
+- True
+- 1
+-
+-
++ 0
++ Switch to previous source
+
++
++ 0
++ 0
++ 1
++ 1
++
++
++
++
++ True
++ False
++ end
++ True
++ Ctrl+Alt+Space
++
++
++
++ 1
++ 0
++ 1
++ 1
++
++
++
++
++ True
++ False
++ 0
++ Switch to next source
++
++
++ 0
++ 1
++ 1
++ 1
++
++
++
++
++ True
++ False
++ end
++ True
++ Ctrl+Alt+Shift+Space
++
++
++
++ 1
++ 1
++ 1
++ 1
++
++
++
++
++ True
++ True
++ Shortcut Settings
++ end
++
++
++ 1
++ 2
++ 1
++ 1
++
+
+
+-
+- True
+- True
+- 2
+-
+
+
+-
+- False
+- False
+- 0
+-
+-
+-
+-
+- True
+- False
+-
+-
+- True
+- False
+- 1
+-
+
+-
+-
++
++
+ True
+ False
+- 6
+- end
+-
+-
+- _Options...
+- True
+- True
+- True
+- GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK
+- True
+- View and edit keyboard layout options
+- View and edit keyboard layout options
+- True
+-
+-
+- False
+- False
+- 0
+-
+-
+-
+-
+- Reset to De_faults
+- True
+- True
+- True
+- True
+- Replace the current keyboard layout settings with the
+-default settings
+- Replace the current keyboard layout settings with the
+-default settings
+- True
+-
+-
+- False
+- False
+- end
+- 1
+- True
+-
+-
++ Shortcuts
++ True
++
++
++
+
+-
+- False
+- False
+- 2
+-
+
+
+
+@@ -951,17 +984,17 @@ default settings
+
+
+
+- 2
++ 3
+
+
+
+-
++
+ True
+ False
+- Keyboard Layouts
++ Input Sources
+
+
+- 2
++ 3
+ False
+
+
+@@ -974,9 +1007,6 @@ default settings
+ 12
+ 12
+
+-
+-
+-
+
+ True
+ False
+@@ -1051,6 +1081,7 @@ default settings
+ 2
+ 3
+ 3
++ GTK_FILL
+
+
+
+@@ -1060,6 +1091,7 @@ default settings
+ 0
+ 0
+ True
++ 18
+
+
+ 1
+@@ -1068,6 +1100,7 @@ default settings
+ 2
+ 3
+ 3
++ GTK_FILL
+
+
+
+@@ -1178,6 +1211,7 @@ default settings
+ 2
+ 3
+ 3
++ GTK_FILL
+
+
+
+@@ -1187,6 +1221,7 @@ default settings
+ 0
+ 0
+ True
++ 18
+
+
+ 1
+@@ -1195,6 +1230,7 @@ default settings
+ 2
+ 3
+ 3
++ GTK_FILL
+
+
+
+@@ -1254,6 +1290,7 @@ default settings
+
+
+ Copy Settings...
++ False
+ True
+ True
+ True
+@@ -1269,9 +1306,12 @@ default settings
+ 3
+
+
++
++
++
+
+
+- 3
++ 4
+
+
+
+@@ -1281,7 +1321,7 @@ default settings
+ System
+
+
+- 3
++ 4
+ False
+
+
+@@ -1302,4 +1342,11 @@ default settings
+
+
+
++
++ vertical
++
++
++
++
++
+
+diff -uNrp a/panels/region/cinnamon-region-panel-xkb.c b/panels/region/cinnamon-region-panel-xkb.c
+--- a/panels/region/cinnamon-region-panel-xkb.c 2013-08-25 14:40:14.000000000 +0100
++++ b/panels/region/cinnamon-region-panel-xkb.c 1970-01-01 01:00:00.000000000 +0100
+@@ -1,190 +0,0 @@
+-/* cinnamon-region-panel-xkb.c
+- * Copyright (C) 2003-2007 Sergey V. Udaltsov
+- *
+- * Written by: Sergey V. Udaltsov
+- *
+- * This program is free software; you can redistribute it and/or modify
+- * it under the terms of the GNU General Public License as published by
+- * the Free Software Foundation; either version 2, or (at your option)
+- * any later version.
+- *
+- * This program is distributed in the hope that it will be useful,
+- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+- * GNU General Public License for more details.
+- *
+- * You should have received a copy of the GNU General Public License
+- * along with this program; if not, write to the Free Software
+- * Foundation, Inc., 51 Franklin Street - Suite 500, Boston, MA
+- * 02110-1335, USA.
+- */
+-
+-#ifdef HAVE_CONFIG_H
+-# include
+-#endif
+-
+-#include
+-#include
+-#include
+-
+-#include "cinnamon-region-panel-xkb.h"
+-
+-#include
+-
+-XklEngine *engine;
+-XklConfigRegistry *config_registry;
+-
+-GkbdKeyboardConfig initial_config;
+-GkbdDesktopConfig desktop_config;
+-
+-GSettings *xkb_keyboard_settings;
+-GSettings *xkb_desktop_settings;
+-
+-char *
+-xci_desc_to_utf8 (const XklConfigItem * ci)
+-{
+- gchar *dd = g_strdup (ci->description);
+- gchar *sd = g_strstrip (dd);
+- gchar *rv = g_strdup (sd[0] == 0 ? ci->name : sd);
+- g_free (dd);
+- return rv;
+-}
+-
+-static void
+-cleanup_xkb_tabs (GtkBuilder * dialog,
+- GObject *where_the_object_wa)
+-{
+- gkbd_desktop_config_term (&desktop_config);
+- gkbd_keyboard_config_term (&initial_config);
+- g_object_unref (G_OBJECT (config_registry));
+- config_registry = NULL;
+- /* Don't unref it here, or we'll crash if open the panel again */
+- engine = NULL;
+- g_object_unref (G_OBJECT (xkb_keyboard_settings));
+- g_object_unref (G_OBJECT (xkb_desktop_settings));
+- xkb_keyboard_settings = NULL;
+- xkb_desktop_settings = NULL;
+-}
+-
+-static void
+-reset_to_defaults (GtkWidget * button, GtkBuilder * dialog)
+-{
+- GkbdKeyboardConfig empty_kbd_config;
+-
+- gkbd_keyboard_config_init (&empty_kbd_config, engine);
+- gkbd_keyboard_config_save (&empty_kbd_config);
+- gkbd_keyboard_config_term (&empty_kbd_config);
+-
+- g_settings_reset (xkb_desktop_settings,
+- GKBD_DESKTOP_CONFIG_KEY_DEFAULT_GROUP);
+-
+- /* all the rest is g-s-d's business */
+-}
+-
+-static void
+-chk_new_windows_inherit_layout_toggled (GtkWidget *
+- chk_new_windows_inherit_layout,
+- GtkBuilder * dialog)
+-{
+- xkb_save_default_group (gtk_toggle_button_get_active
+- (GTK_TOGGLE_BUTTON
+- (chk_new_windows_inherit_layout)) ? -1 :
+- 0);
+-}
+-
+-void
+-setup_xkb_tabs (GtkBuilder * dialog)
+-{
+- GtkWidget *widget;
+- GtkStyleContext *context;
+- GtkWidget *chk_new_windows_inherit_layout;
+-
+- chk_new_windows_inherit_layout = WID ("chk_new_windows_inherit_layout");
+-
+- xkb_desktop_settings = g_settings_new (GKBD_DESKTOP_SCHEMA);
+- xkb_keyboard_settings = g_settings_new (GKBD_KEYBOARD_SCHEMA);
+-
+- engine =
+- xkl_engine_get_instance (GDK_DISPLAY_XDISPLAY
+- (gdk_display_get_default ()));
+- config_registry = xkl_config_registry_get_instance (engine);
+-
+- gkbd_desktop_config_init (&desktop_config, engine);
+- gkbd_desktop_config_load (&desktop_config);
+-
+- xkl_config_registry_load (config_registry,
+- desktop_config.load_extra_items);
+-
+- gkbd_keyboard_config_init (&initial_config, engine);
+- gkbd_keyboard_config_load_from_x_initial (&initial_config, NULL);
+-
+- /* Set initial state */
+- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (WID ("chk_separate_group_per_window")),
+- g_settings_get_boolean (xkb_desktop_settings,
+- GKBD_DESKTOP_CONFIG_KEY_GROUP_PER_WINDOW));
+- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (chk_new_windows_inherit_layout),
+- xkb_get_default_group () < 0);
+-
+- g_settings_bind (xkb_desktop_settings,
+- GKBD_DESKTOP_CONFIG_KEY_GROUP_PER_WINDOW,
+- WID ("chk_separate_group_per_window"), "active",
+- G_SETTINGS_BIND_DEFAULT);
+- g_settings_bind (xkb_desktop_settings,
+- GKBD_DESKTOP_CONFIG_KEY_GROUP_PER_WINDOW,
+- WID ("chk_new_windows_inherit_layout"), "sensitive",
+- G_SETTINGS_BIND_DEFAULT);
+- g_settings_bind (xkb_desktop_settings,
+- GKBD_DESKTOP_CONFIG_KEY_GROUP_PER_WINDOW,
+- WID ("chk_new_windows_default_layout"), "sensitive",
+- G_SETTINGS_BIND_DEFAULT);
+-
+- xkb_layouts_prepare_selected_tree (dialog);
+- xkb_layouts_fill_selected_tree (dialog);
+-
+- xkb_layouts_register_buttons_handlers (dialog);
+- g_signal_connect (G_OBJECT (WID ("xkb_reset_to_defaults")),
+- "clicked", G_CALLBACK (reset_to_defaults),
+- dialog);
+-
+- g_signal_connect (G_OBJECT (chk_new_windows_inherit_layout),
+- "toggled",
+- G_CALLBACK
+- (chk_new_windows_inherit_layout_toggled),
+- dialog);
+-
+- g_signal_connect_swapped (G_OBJECT (WID ("xkb_layout_options")),
+- "clicked",
+- G_CALLBACK (xkb_options_popup_dialog),
+- dialog);
+-
+- xkb_layouts_register_conf_listener (dialog);
+- xkb_options_register_conf_listener (dialog);
+-
+- g_object_weak_ref (G_OBJECT (WID ("region_notebook")),
+- (GWeakNotify) cleanup_xkb_tabs, dialog);
+-
+- enable_disable_restoring (dialog);
+-
+- /* Setup junction between toolbar and treeview */
+- widget = WID ("xkb_layouts_swindow");
+- context = gtk_widget_get_style_context (widget);
+- gtk_style_context_set_junction_sides (context, GTK_JUNCTION_BOTTOM);
+- widget = WID ("layouts-toolbar");
+- context = gtk_widget_get_style_context (widget);
+- gtk_style_context_set_junction_sides (context, GTK_JUNCTION_TOP);
+-}
+-
+-void
+-enable_disable_restoring (GtkBuilder * dialog)
+-{
+- GkbdKeyboardConfig gswic;
+- gboolean enable;
+-
+- gkbd_keyboard_config_init (&gswic, engine);
+- gkbd_keyboard_config_load (&gswic, NULL);
+-
+- enable = !gkbd_keyboard_config_equals (&gswic, &initial_config);
+-
+- gkbd_keyboard_config_term (&gswic);
+- gtk_widget_set_sensitive (WID ("xkb_reset_to_defaults"), enable);
+-}
+diff -uNrp a/panels/region/cinnamon-region-panel-xkb.h b/panels/region/cinnamon-region-panel-xkb.h
+--- a/panels/region/cinnamon-region-panel-xkb.h 2013-08-25 14:40:14.000000000 +0100
++++ b/panels/region/cinnamon-region-panel-xkb.h 1970-01-01 01:00:00.000000000 +0100
+@@ -1,96 +0,0 @@
+-/* cinnamon-region-panel-xkb.h
+- * Copyright (C) 2003-2007 Sergey V Udaltsov
+- *
+- * Written by Sergey V. Udaltsov
+- *
+- * This program is free software; you can redistribute it and/or modify
+- * it under the terms of the GNU General Public License as published by
+- * the Free Software Foundation; either version 2, or (at your option)
+- * any later version.
+- *
+- * This program is distributed in the hope that it will be useful,
+- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+- * GNU General Public License for more details.
+- *
+- * You should have received a copy of the GNU General Public License
+- * along with this program; if not, write to the Free Software
+- * Foundation, Inc., 51 Franklin Street - Suite 500, Boston, MA
+- * 02110-1335, USA.
+- */
+-
+-#ifndef __GNOME_KEYBOARD_PROPERTY_XKB_H
+-#define __GNOME_KEYBOARD_PROPERTY_XKB_H
+-
+-#include
+-
+-#include "libgnomekbd/gkbd-keyboard-config.h"
+-#include "libgnomekbd/gkbd-util.h"
+-
+-G_BEGIN_DECLS
+-#define CWID(s) GTK_WIDGET (gtk_builder_get_object (chooser_dialog, s))
+-#define WID(s) GTK_WIDGET (gtk_builder_get_object (dialog, s))
+-extern XklEngine *engine;
+-extern XklConfigRegistry *config_registry;
+-extern GSettings *xkb_keyboard_settings;
+-extern GSettings *xkb_desktop_settings;
+-extern GkbdKeyboardConfig initial_config;
+-
+-extern void setup_xkb_tabs (GtkBuilder * dialog);
+-
+-extern void xkb_layouts_fill_selected_tree (GtkBuilder * dialog);
+-
+-extern void xkb_layouts_register_buttons_handlers (GtkBuilder * dialog);
+-
+-extern void xkb_layouts_register_conf_listener (GtkBuilder * dialog);
+-
+-extern void xkb_options_register_conf_listener (GtkBuilder * dialog);
+-
+-extern void xkb_layouts_prepare_selected_tree (GtkBuilder * dialog);
+-
+-extern void xkb_options_load_options (GtkBuilder * dialog);
+-
+-extern void xkb_options_popup_dialog (GtkBuilder * dialog);
+-
+-extern char *xci_desc_to_utf8 (const XklConfigItem * ci);
+-
+-extern gchar *xkb_layout_description_utf8 (const gchar * visible);
+-
+-extern void enable_disable_restoring (GtkBuilder * dialog);
+-
+-extern void preview_toggled (GtkBuilder * dialog, GtkWidget * button);
+-
+-extern GtkWidget *xkb_layout_choose (GtkBuilder * dialog);
+-
+-extern void xkb_layout_chooser_response (GtkDialog *dialog, gint response_id);
+-
+-extern gchar **xkb_layouts_get_selected_list (void);
+-
+-extern gchar **xkb_options_get_selected_list (void);
+-
+-#define xkb_layouts_set_selected_list(list) \
+- g_settings_set_strv (xkb_keyboard_settings, \
+- GKBD_KEYBOARD_CONFIG_KEY_LAYOUTS, \
+- (const gchar *const*)(list))
+-
+-#define xkb_options_set_selected_list(list) \
+- g_settings_set_strv (xkb_keyboard_settings, \
+- GKBD_KEYBOARD_CONFIG_KEY_OPTIONS, \
+- (const gchar *const*)(list))
+-
+-extern GtkWidget *xkb_layout_preview_create_widget (GtkBuilder *
+- chooser_dialog);
+-
+-extern void xkb_layout_preview_update (GtkBuilder * chooser_dialog);
+-
+-extern void xkb_layout_preview_set_drawing_layout (GtkWidget * kbdraw,
+- const gchar * id);
+-
+-extern gchar *xkb_layout_chooser_get_selected_id (GtkDialog *dialog);
+-
+-extern void xkb_save_default_group (gint group_no);
+-
+-extern gint xkb_get_default_group (void);
+-
+-G_END_DECLS
+-#endif /* __GNOME_KEYBOARD_PROPERTY_XKB_H */
+diff -uNrp a/panels/region/cinnamon-region-panel-xkbltadd.c b/panels/region/cinnamon-region-panel-xkbltadd.c
+--- a/panels/region/cinnamon-region-panel-xkbltadd.c 2013-08-25 14:40:14.000000000 +0100
++++ b/panels/region/cinnamon-region-panel-xkbltadd.c 1970-01-01 01:00:00.000000000 +0100
+@@ -1,495 +0,0 @@
+-/* cinnamon-region-panel-xkbltadd.c
+- * Copyright (C) 2007 Sergey V. Udaltsov
+- *
+- * Written by: Sergey V. Udaltsov
+- *
+- * This program is free software; you can redistribute it and/or modify
+- * it under the terms of the GNU General Public License as published by
+- * the Free Software Foundation; either version 2, or (at your option)
+- * any later version.
+- *
+- * This program is distributed in the hope that it will be useful,
+- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+- * GNU General Public License for more details.
+- *
+- * You should have received a copy of the GNU General Public License
+- * along with this program; if not, write to the Free Software
+- * Foundation, Inc., 51 Franklin Street - Suite 500, Boston, MA
+- * 02110-1335, USA.
+- */
+-
+-#ifdef HAVE_CONFIG_H
+-# include
+-#endif
+-
+-#include
+-
+-#include
+-#include
+-
+-#include "cinnamon-region-panel-xkb.h"
+-
+-enum {
+- COMBO_BOX_MODEL_COL_SORT,
+- COMBO_BOX_MODEL_COL_VISIBLE,
+- COMBO_BOX_MODEL_COL_XKB_ID,
+- COMBO_BOX_MODEL_COL_COUNTRY_DESC,
+- COMBO_BOX_MODEL_COL_LANGUAGE_DESC
+-};
+-
+-static gchar **search_pattern_list = NULL;
+-
+-static GtkWidget *preview_dialog = NULL;
+-
+-static GRegex *left_bracket_regex = NULL;
+-
+-#define RESPONSE_PREVIEW 1
+-
+-static void
+-xkb_preview_destroy_callback (GtkWidget * widget)
+-{
+- preview_dialog = NULL;
+-}
+-
+-static gboolean
+-xkb_layout_chooser_selection_dupe (GtkDialog * dialog)
+-{
+- gchar *selected_id =
+- (gchar *) xkb_layout_chooser_get_selected_id (dialog);
+- gchar **layouts_list, **pl;
+- gboolean rv = FALSE;
+- if (selected_id == NULL)
+- return rv;
+- layouts_list = pl = xkb_layouts_get_selected_list ();
+- while (pl && *pl) {
+- if (!g_ascii_strcasecmp (*pl++, selected_id)) {
+- rv = TRUE;
+- break;
+- }
+- }
+- g_strfreev (layouts_list);
+- return rv;
+-}
+-
+-void
+-xkb_layout_chooser_response (GtkDialog * dialog, gint response)
+-{
+- switch (response)
+- case GTK_RESPONSE_OK:{
+- /* Handled by the main code */
+- break;
+- case RESPONSE_PREVIEW:{
+- gchar *selected_id = (gchar *)
+- xkb_layout_chooser_get_selected_id
+- (dialog);
+-
+- if (selected_id != NULL) {
+- if (preview_dialog == NULL) {
+- preview_dialog =
+- gkbd_keyboard_drawing_dialog_new
+- ();
+- g_signal_connect (G_OBJECT
+- (preview_dialog),
+- "destroy",
+- G_CALLBACK
+- (xkb_preview_destroy_callback),
+- NULL);
+- /* Put into the separate group to avoid conflict
+- with modal parent */
+- gtk_window_group_add_window
+- (gtk_window_group_new
+- (),
+- GTK_WINDOW
+- (preview_dialog));
+- };
+- gkbd_keyboard_drawing_dialog_set_layout
+- (preview_dialog,
+- config_registry, selected_id);
+-
+- gtk_widget_show_all
+- (preview_dialog);
+- }
+- }
+-
+- return;
+- }
+- if (preview_dialog != NULL) {
+- gtk_widget_destroy (preview_dialog);
+- }
+- if (search_pattern_list != NULL) {
+- g_strfreev (search_pattern_list);
+- search_pattern_list = NULL;
+- }
+- gtk_widget_destroy (GTK_WIDGET (dialog));
+-}
+-
+-static gchar *
+-xkl_create_description_from_list (const XklConfigItem * item,
+- const XklConfigItem * subitem,
+- const gchar * prop_name,
+- const gchar *
+- (*desc_getter) (const gchar * code))
+-{
+- gchar *rv = NULL, *code = NULL;
+- gchar **list = NULL;
+- const gchar *desc;
+-
+- if (subitem != NULL)
+- list =
+- (gchar
+- **) (g_object_get_data (G_OBJECT (subitem),
+- prop_name));
+- if (list == NULL || *list == 0)
+- list =
+- (gchar
+- **) (g_object_get_data (G_OBJECT (item), prop_name));
+-
+- /* First try the parent id as such */
+- desc = desc_getter (item->name);
+- if (desc != NULL) {
+- rv = g_utf8_strup (desc, -1);
+- } else {
+- code = g_utf8_strup (item->name, -1);
+- desc = desc_getter (code);
+- if (desc != NULL) {
+- rv = g_utf8_strup (desc, -1);
+- }
+- g_free (code);
+- }
+-
+- if (list == NULL || *list == 0)
+- return rv;
+-
+- while (*list != 0) {
+- code = *list++;
+- desc = desc_getter (code);
+- if (desc != NULL) {
+- gchar *udesc = g_utf8_strup (desc, -1);
+- if (rv == NULL) {
+- rv = udesc;
+- } else {
+- gchar *orv = rv;
+- rv = g_strdup_printf ("%s %s", rv, udesc);
+- g_free (orv);
+- g_free (udesc);
+- }
+- }
+- }
+- return rv;
+-}
+-
+-static void
+-xkl_layout_add_to_list (XklConfigRegistry * config,
+- const XklConfigItem * item,
+- const XklConfigItem * subitem,
+- GtkBuilder * chooser_dialog)
+-{
+- GtkListStore *list_store =
+- GTK_LIST_STORE (gtk_builder_get_object (chooser_dialog,
+- "layout_list_model"));
+- GtkTreeIter iter;
+-
+- gchar *utf_variant_name =
+- subitem ?
+- xkb_layout_description_utf8 (gkbd_keyboard_config_merge_items
+- (item->name,
+- subitem->name)) :
+- xci_desc_to_utf8 (item);
+-
+- const gchar *xkb_id =
+- subitem ? gkbd_keyboard_config_merge_items (item->name,
+- subitem->name) :
+- item->name;
+-
+- gchar *country_desc =
+- xkl_create_description_from_list (item, subitem,
+- XCI_PROP_COUNTRY_LIST,
+- xkl_get_country_name);
+- gchar *language_desc =
+- xkl_create_description_from_list (item, subitem,
+- XCI_PROP_LANGUAGE_LIST,
+- xkl_get_language_name);
+-
+- gchar *tmp = utf_variant_name;
+- utf_variant_name =
+- g_regex_replace_literal (left_bracket_regex, tmp, -1, 0,
+- "<", 0, NULL);
+- g_free (tmp);
+-
+- if (subitem
+- && g_object_get_data (G_OBJECT (subitem),
+- XCI_PROP_EXTRA_ITEM)) {
+- gchar *buf =
+- g_strdup_printf ("%s", utf_variant_name);
+- gtk_list_store_insert_with_values (list_store, &iter, -1,
+- COMBO_BOX_MODEL_COL_SORT,
+- utf_variant_name,
+- COMBO_BOX_MODEL_COL_VISIBLE,
+- buf,
+- COMBO_BOX_MODEL_COL_XKB_ID,
+- xkb_id,
+- COMBO_BOX_MODEL_COL_COUNTRY_DESC,
+- country_desc,
+- COMBO_BOX_MODEL_COL_LANGUAGE_DESC,
+- language_desc, -1);
+- g_free (buf);
+- } else
+- gtk_list_store_insert_with_values (list_store, &iter,
+- -1,
+- COMBO_BOX_MODEL_COL_SORT,
+- utf_variant_name,
+- COMBO_BOX_MODEL_COL_VISIBLE,
+- utf_variant_name,
+- COMBO_BOX_MODEL_COL_XKB_ID,
+- xkb_id,
+- COMBO_BOX_MODEL_COL_COUNTRY_DESC,
+- country_desc,
+- COMBO_BOX_MODEL_COL_LANGUAGE_DESC,
+- language_desc, -1);
+- g_free (utf_variant_name);
+- g_free (country_desc);
+- g_free (language_desc);
+-}
+-
+-static void
+-xkb_layout_filter_clear (GtkEntry * entry,
+- GtkEntryIconPosition icon_pos,
+- GdkEvent * event, gpointer user_data)
+-{
+- gtk_entry_set_text (entry, "");
+-}
+-
+-static void
+-xkb_layout_filter_changed (GtkBuilder * chooser_dialog)
+-{
+- GtkTreeModelFilter *filtered_model =
+- GTK_TREE_MODEL_FILTER (gtk_builder_get_object (chooser_dialog,
+- "filtered_layout_list_model"));
+- GtkWidget *xkb_layout_filter = CWID ("xkb_layout_filter");
+- const gchar *pattern =
+- gtk_entry_get_text (GTK_ENTRY (xkb_layout_filter));
+- gchar *upattern = g_utf8_strup (pattern, -1);
+-
+- if (!g_strcmp0 (pattern, "")) {
+- g_object_set (G_OBJECT (xkb_layout_filter),
+- "secondary-icon-name", "edit-find-symbolic",
+- "secondary-icon-activatable", FALSE,
+- "secondary-icon-sensitive", FALSE, NULL);
+- } else {
+- g_object_set (G_OBJECT (xkb_layout_filter),
+- "secondary-icon-name", "edit-clear-symbolic",
+- "secondary-icon-activatable", TRUE,
+- "secondary-icon-sensitive", TRUE, NULL);
+- }
+-
+- if (search_pattern_list != NULL)
+- g_strfreev (search_pattern_list);
+-
+- search_pattern_list = g_strsplit (upattern, " ", -1);
+- g_free (upattern);
+-
+- gtk_tree_model_filter_refilter (filtered_model);
+-}
+-
+-static void
+-xkb_layout_chooser_selection_changed (GtkTreeSelection * selection,
+- GtkBuilder * chooser_dialog)
+-{
+- GList *selected_layouts =
+- gtk_tree_selection_get_selected_rows (selection, NULL);
+- GtkWidget *add_button = CWID ("btnOk");
+- GtkWidget *preview_button = CWID ("btnPreview");
+- gboolean anything_selected = g_list_length (selected_layouts) == 1;
+- gboolean dupe =
+- xkb_layout_chooser_selection_dupe (GTK_DIALOG
+- (CWID
+- ("xkb_layout_chooser")));
+-
+- gtk_widget_set_sensitive (add_button, anything_selected && !dupe);
+- gtk_widget_set_sensitive (preview_button, anything_selected);
+-}
+-
+-static void
+-xkb_layout_chooser_row_activated (GtkTreeView * tree_view,
+- GtkTreePath * path,
+- GtkTreeViewColumn * column,
+- GtkBuilder * chooser_dialog)
+-{
+- GtkWidget *add_button = CWID ("btnOk");
+- GtkWidget *dialog = CWID ("xkb_layout_chooser");
+-
+- if (gtk_widget_is_sensitive (add_button))
+- gtk_dialog_response (GTK_DIALOG (dialog), GTK_RESPONSE_OK);
+-}
+-
+-static gboolean
+-xkb_filter_layouts (GtkTreeModel * model,
+- GtkTreeIter * iter, gpointer data)
+-{
+- gchar *desc = NULL, *country_desc = NULL, *language_desc =
+- NULL, **pattern;
+- gboolean rv = TRUE;
+-
+- if (search_pattern_list == NULL || search_pattern_list[0] == NULL)
+- return TRUE;
+-
+- gtk_tree_model_get (model, iter,
+- COMBO_BOX_MODEL_COL_SORT, &desc,
+- COMBO_BOX_MODEL_COL_COUNTRY_DESC,
+- &country_desc,
+- COMBO_BOX_MODEL_COL_LANGUAGE_DESC,
+- &language_desc, -1);
+-
+- pattern = search_pattern_list;
+- do {
+- gboolean is_pattern_found = FALSE;
+- gchar *udesc = g_utf8_strup (desc, -1);
+- if (udesc != NULL && g_strstr_len (udesc, -1, *pattern)) {
+- is_pattern_found = TRUE;
+- } else if (country_desc != NULL
+- && g_strstr_len (country_desc, -1, *pattern)) {
+- is_pattern_found = TRUE;
+- } else if (language_desc != NULL
+- && g_strstr_len (language_desc, -1, *pattern)) {
+- is_pattern_found = TRUE;
+- }
+- g_free (udesc);
+-
+- if (!is_pattern_found) {
+- rv = FALSE;
+- break;
+- }
+-
+- } while (*++pattern != NULL);
+-
+- g_free (desc);
+- g_free (country_desc);
+- g_free (language_desc);
+- return rv;
+-}
+-
+-GtkWidget *
+-xkb_layout_choose (GtkBuilder * dialog)
+-{
+- GtkBuilder *chooser_dialog = gtk_builder_new ();
+- GtkWidget *chooser, *xkb_filtered_layouts_list, *xkb_layout_filter;
+- GtkTreeViewColumn *visible_column;
+- GtkTreeSelection *selection;
+- GtkListStore *model;
+- GtkTreeModelFilter *filtered_model;
+- gtk_builder_set_translation_domain (chooser_dialog, GETTEXT_PACKAGE);
+- gtk_builder_add_from_file (chooser_dialog, CINNAMONCC_UI_DIR
+- "/cinnamon-region-panel-layout-chooser.ui",
+- NULL);
+- chooser = CWID ("xkb_layout_chooser");
+- xkb_filtered_layouts_list = CWID ("xkb_filtered_layouts_list");
+- xkb_layout_filter = CWID ("xkb_layout_filter");
+-
+- g_object_set_data (G_OBJECT (chooser), "xkb_filtered_layouts_list",
+- xkb_filtered_layouts_list);
+- visible_column =
+- gtk_tree_view_column_new_with_attributes ("Layout",
+- gtk_cell_renderer_text_new
+- (), "markup",
+- COMBO_BOX_MODEL_COL_VISIBLE,
+- NULL);
+-
+- gtk_window_set_transient_for (GTK_WINDOW (chooser),
+- GTK_WINDOW
+- (gtk_widget_get_toplevel
+- (WID ("region_notebook"))));
+-
+- gtk_tree_view_append_column (GTK_TREE_VIEW
+- (xkb_filtered_layouts_list),
+- visible_column);
+- g_signal_connect_swapped (G_OBJECT (xkb_layout_filter),
+- "notify::text",
+- G_CALLBACK
+- (xkb_layout_filter_changed),
+- chooser_dialog);
+-
+- g_signal_connect (G_OBJECT (xkb_layout_filter), "icon-release",
+- G_CALLBACK (xkb_layout_filter_clear), NULL);
+-
+- selection =
+- gtk_tree_view_get_selection (GTK_TREE_VIEW
+- (xkb_filtered_layouts_list));
+-
+- g_signal_connect (G_OBJECT (selection),
+- "changed",
+- G_CALLBACK
+- (xkb_layout_chooser_selection_changed),
+- chooser_dialog);
+-
+- xkb_layout_chooser_selection_changed (selection, chooser_dialog);
+-
+- g_signal_connect (G_OBJECT (xkb_filtered_layouts_list),
+- "row-activated",
+- G_CALLBACK (xkb_layout_chooser_row_activated),
+- chooser_dialog);
+-
+- filtered_model =
+- GTK_TREE_MODEL_FILTER (gtk_builder_get_object
+- (chooser_dialog,
+- "filtered_layout_list_model"));
+- model =
+- GTK_LIST_STORE (gtk_builder_get_object
+- (chooser_dialog, "layout_list_model"));
+-
+- left_bracket_regex = g_regex_new ("<", 0, 0, NULL);
+-
+- xkl_config_registry_search_by_pattern (config_registry,
+- NULL,
+- (TwoConfigItemsProcessFunc)
+- (xkl_layout_add_to_list),
+- chooser_dialog);
+-
+- g_regex_unref (left_bracket_regex);
+-
+- gtk_tree_sortable_set_sort_column_id (GTK_TREE_SORTABLE (model),
+- COMBO_BOX_MODEL_COL_SORT,
+- GTK_SORT_ASCENDING);
+-
+- gtk_tree_model_filter_set_visible_func (filtered_model,
+- xkb_filter_layouts,
+- NULL, NULL);
+-
+- gtk_widget_grab_focus (xkb_layout_filter);
+-
+- gtk_widget_show (chooser);
+-
+- return chooser;
+-}
+-
+-gchar *
+-xkb_layout_chooser_get_selected_id (GtkDialog * dialog)
+-{
+- GtkTreeModel *filtered_list_model;
+- GtkWidget *xkb_filtered_layouts_list =
+- g_object_get_data (G_OBJECT (dialog),
+- "xkb_filtered_layouts_list");
+- GtkTreeIter viter;
+- gchar *v_id;
+- GtkTreeSelection *selection =
+- gtk_tree_view_get_selection (GTK_TREE_VIEW
+- (xkb_filtered_layouts_list));
+- GList *selected_layouts =
+- gtk_tree_selection_get_selected_rows (selection,
+- &filtered_list_model);
+-
+- if (g_list_length (selected_layouts) != 1)
+- return NULL;
+-
+- gtk_tree_model_get_iter (filtered_list_model,
+- &viter,
+- (GtkTreePath *) (selected_layouts->data));
+- g_list_foreach (selected_layouts,
+- (GFunc) gtk_tree_path_free, NULL);
+- g_list_free (selected_layouts);
+-
+- gtk_tree_model_get (filtered_list_model, &viter,
+- COMBO_BOX_MODEL_COL_XKB_ID, &v_id, -1);
+-
+- return v_id;
+-}
+diff -uNrp a/panels/region/cinnamon-region-panel-xkblt.c b/panels/region/cinnamon-region-panel-xkblt.c
+--- a/panels/region/cinnamon-region-panel-xkblt.c 2013-08-25 14:40:14.000000000 +0100
++++ b/panels/region/cinnamon-region-panel-xkblt.c 1970-01-01 01:00:00.000000000 +0100
+@@ -1,470 +0,0 @@
+-/* cinnamon-region-panel-xkblt.c
+- * Copyright (C) 2003-2007 Sergey V. Udaltsov
+- *
+- * Written by: Sergey V. Udaltsov
+- *
+- * This program is free software; you can redistribute it and/or modify
+- * it under the terms of the GNU General Public License as published by
+- * the Free Software Foundation; either version 2, or (at your option)
+- * any later version.
+- *
+- * This program is distributed in the hope that it will be useful,
+- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+- * GNU General Public License for more details.
+- *
+- * You should have received a copy of the GNU General Public License
+- * along with this program; if not, write to the Free Software
+- * Foundation, Inc., 51 Franklin Street - Suite 500, Boston, MA
+- * 02110-1335, USA.
+- */
+-
+-#ifdef HAVE_CONFIG_H
+-# include
+-#endif
+-
+-#include
+-#include
+-
+-#include
+-#include
+-
+-#include "cinnamon-region-panel-xkb.h"
+-
+-enum {
+- SEL_LAYOUT_TREE_COL_DESCRIPTION,
+- SEL_LAYOUT_TREE_COL_ID,
+- SEL_LAYOUT_TREE_COL_ENABLED,
+- SEL_LAYOUT_N_COLS
+-};
+-
+-static int idx2select = -1;
+-static int max_selected_layouts = -1;
+-
+-static GtkCellRenderer *text_renderer;
+-
+-static gboolean disable_buttons_sensibility_update = FALSE;
+-
+-static gboolean
+-get_selected_iter (GtkBuilder *dialog,
+- GtkTreeModel **model,
+- GtkTreeIter *iter)
+-{
+- GtkTreeSelection *selection;
+-
+- selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (WID ("xkb_layouts_selected")));
+-
+- return gtk_tree_selection_get_selected (selection, model, iter);
+-}
+-
+-static void
+-set_selected_path (GtkBuilder *dialog,
+- GtkTreePath *path)
+-{
+- GtkTreeSelection *selection;
+-
+- selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (WID ("xkb_layouts_selected")));
+-
+- gtk_tree_selection_select_path (selection, path);
+-}
+-
+-static gint
+-find_selected_layout_idx (GtkBuilder *dialog)
+-{
+- GtkTreeIter selected_iter;
+- GtkTreeModel *model;
+- GtkTreePath *path;
+- gint *indices;
+- gint rv;
+-
+- if (!get_selected_iter (dialog, &model, &selected_iter))
+- return -1;
+-
+- path = gtk_tree_model_get_path (model, &selected_iter);
+- if (path == NULL)
+- return -1;
+-
+- indices = gtk_tree_path_get_indices (path);
+- rv = indices[0];
+- gtk_tree_path_free (path);
+- return rv;
+-}
+-
+-gchar **
+-xkb_layouts_get_selected_list (void)
+-{
+- gchar **retval;
+-
+- retval = g_settings_get_strv (xkb_keyboard_settings,
+- GKBD_KEYBOARD_CONFIG_KEY_LAYOUTS);
+- if (retval == NULL || retval[0] == NULL) {
+- g_strfreev (retval);
+- retval = g_strdupv (initial_config.layouts_variants);
+- }
+-
+- return retval;
+-}
+-
+-gint
+-xkb_get_default_group ()
+-{
+- return g_settings_get_int (xkb_desktop_settings,
+- GKBD_DESKTOP_CONFIG_KEY_DEFAULT_GROUP);
+-}
+-
+-void
+-xkb_save_default_group (gint default_group)
+-{
+- g_settings_set_int (xkb_desktop_settings,
+- GKBD_DESKTOP_CONFIG_KEY_DEFAULT_GROUP,
+- default_group);
+-}
+-
+-static void
+-xkb_layouts_enable_disable_buttons (GtkBuilder * dialog)
+-{
+- GtkWidget *add_layout_btn = WID ("xkb_layouts_add");
+- GtkWidget *show_layout_btn = WID ("xkb_layouts_show");
+- GtkWidget *del_layout_btn = WID ("xkb_layouts_remove");
+- GtkWidget *selected_layouts_tree = WID ("xkb_layouts_selected");
+- GtkWidget *move_up_layout_btn = WID ("xkb_layouts_move_up");
+- GtkWidget *move_down_layout_btn = WID ("xkb_layouts_move_down");
+-
+- GtkTreeSelection *s_selection =
+- gtk_tree_view_get_selection (GTK_TREE_VIEW
+- (selected_layouts_tree));
+- const int n_selected_selected_layouts =
+- gtk_tree_selection_count_selected_rows (s_selection);
+- GtkTreeModel *selected_layouts_model = gtk_tree_view_get_model
+- (GTK_TREE_VIEW (selected_layouts_tree));
+- const int n_selected_layouts =
+- gtk_tree_model_iter_n_children (selected_layouts_model,
+- NULL);
+- gint sidx = find_selected_layout_idx (dialog);
+-
+- if (disable_buttons_sensibility_update)
+- return;
+-
+- gtk_widget_set_sensitive (add_layout_btn,
+- (n_selected_layouts <
+- max_selected_layouts
+- || max_selected_layouts == 0));
+- gtk_widget_set_sensitive (del_layout_btn, (n_selected_layouts > 1)
+- && (n_selected_selected_layouts > 0));
+- gtk_widget_set_sensitive (show_layout_btn,
+- (n_selected_selected_layouts > 0));
+- gtk_widget_set_sensitive (move_up_layout_btn, sidx > 0);
+- gtk_widget_set_sensitive (move_down_layout_btn, sidx >= 0
+- && sidx < (n_selected_layouts - 1));
+-}
+-
+-static void
+-update_layouts_list (GtkTreeModel *model,
+- GtkBuilder *dialog)
+-{
+- gboolean cont;
+- GtkTreeIter iter;
+- GPtrArray *array;
+-
+- array = g_ptr_array_new_with_free_func ((GDestroyNotify) g_free);
+- cont = gtk_tree_model_get_iter_first (model, &iter);
+- while (cont) {
+- char *id;
+-
+- gtk_tree_model_get (model, &iter,
+- SEL_LAYOUT_TREE_COL_ID, &id,
+- -1);
+- g_ptr_array_add (array, id);
+- cont = gtk_tree_model_iter_next (model, &iter);
+- }
+- g_ptr_array_add (array, NULL);
+- xkb_layouts_set_selected_list (array->pdata);
+- g_ptr_array_free (array, TRUE);
+-
+- xkb_layouts_enable_disable_buttons (dialog);
+-}
+-
+-static void
+-xkb_layouts_drag_end (GtkWidget *widget,
+- GdkDragContext *drag_context,
+- gpointer user_data)
+-{
+- update_layouts_list (gtk_tree_view_get_model (GTK_TREE_VIEW (widget)),
+- GTK_BUILDER (user_data));
+-}
+-
+-void
+-xkb_layouts_prepare_selected_tree (GtkBuilder * dialog)
+-{
+- GtkListStore *list_store;
+- GtkWidget *tree_view = WID ("xkb_layouts_selected");
+- GtkTreeSelection *selection;
+- GtkTreeViewColumn *desc_column;
+-
+- list_store = gtk_list_store_new (SEL_LAYOUT_N_COLS,
+- G_TYPE_STRING, G_TYPE_STRING, G_TYPE_BOOLEAN);
+-
+- text_renderer = GTK_CELL_RENDERER (gtk_cell_renderer_text_new ());
+-
+- desc_column =
+- gtk_tree_view_column_new_with_attributes (_("Layout"),
+- text_renderer,
+- "text",
+- SEL_LAYOUT_TREE_COL_DESCRIPTION,
+- "sensitive",
+- SEL_LAYOUT_TREE_COL_ENABLED,
+- NULL);
+- selection =
+- gtk_tree_view_get_selection (GTK_TREE_VIEW (tree_view));
+-
+- gtk_tree_view_set_model (GTK_TREE_VIEW (tree_view),
+- GTK_TREE_MODEL (list_store));
+-
+- gtk_tree_view_column_set_sizing (desc_column,
+- GTK_TREE_VIEW_COLUMN_AUTOSIZE);
+- gtk_tree_view_column_set_resizable (desc_column, TRUE);
+- gtk_tree_view_column_set_expand (desc_column, TRUE);
+-
+- gtk_tree_view_append_column (GTK_TREE_VIEW (tree_view),
+- desc_column);
+-
+- g_signal_connect_swapped (G_OBJECT (selection), "changed",
+- G_CALLBACK
+- (xkb_layouts_enable_disable_buttons),
+- dialog);
+- max_selected_layouts = xkl_engine_get_max_num_groups (engine);
+-
+- /* Setting up DnD */
+- gtk_tree_view_set_reorderable (GTK_TREE_VIEW (tree_view), TRUE);
+- g_signal_connect (G_OBJECT (tree_view), "drag-end",
+- G_CALLBACK (xkb_layouts_drag_end), dialog);
+-}
+-
+-gchar *
+-xkb_layout_description_utf8 (const gchar * visible)
+-{
+- char *l, *sl, *v, *sv;
+- if (gkbd_keyboard_config_get_descriptions
+- (config_registry, visible, &sl, &l, &sv, &v))
+- visible =
+- gkbd_keyboard_config_format_full_description (l, v);
+- return g_strstrip (g_strdup (visible));
+-}
+-
+-void
+-xkb_layouts_fill_selected_tree (GtkBuilder * dialog)
+-{
+- gchar **layouts = xkb_layouts_get_selected_list ();
+- guint i;
+- GtkListStore *list_store =
+- GTK_LIST_STORE (gtk_tree_view_get_model
+- (GTK_TREE_VIEW
+- (WID ("xkb_layouts_selected"))));
+-
+- /* temporarily disable the buttons' status update */
+- disable_buttons_sensibility_update = TRUE;
+-
+- gtk_list_store_clear (list_store);
+-
+- for (i = 0; layouts != NULL && layouts[i] != NULL; i++) {
+- char *cur_layout = layouts[i];
+- gchar *utf_visible =
+- xkb_layout_description_utf8 (cur_layout);
+-
+- gtk_list_store_insert_with_values (list_store, NULL, G_MAXINT,
+- SEL_LAYOUT_TREE_COL_DESCRIPTION,
+- utf_visible,
+- SEL_LAYOUT_TREE_COL_ID,
+- cur_layout,
+- SEL_LAYOUT_TREE_COL_ENABLED,
+- i < max_selected_layouts, -1);
+- g_free (utf_visible);
+- }
+-
+- g_strfreev (layouts);
+-
+- /* enable the buttons' status update */
+- disable_buttons_sensibility_update = FALSE;
+-
+- if (idx2select != -1) {
+- GtkTreeSelection *selection =
+- gtk_tree_view_get_selection ((GTK_TREE_VIEW
+- (WID
+- ("xkb_layouts_selected"))));
+- GtkTreePath *path =
+- gtk_tree_path_new_from_indices (idx2select, -1);
+- gtk_tree_selection_select_path (selection, path);
+- gtk_tree_path_free (path);
+- idx2select = -1;
+- } else {
+- /* if there is nothing to select - just enable/disable the buttons,
+- otherwise it would be done by the selection change */
+- xkb_layouts_enable_disable_buttons (dialog);
+- }
+-}
+-
+-static void
+-add_default_switcher_if_necessary ()
+-{
+- gchar **layouts_list = xkb_layouts_get_selected_list();
+- gchar **options_list = xkb_options_get_selected_list ();
+- gboolean was_appended;
+-
+- options_list =
+- gkbd_keyboard_config_add_default_switch_option_if_necessary
+- (layouts_list, options_list, &was_appended);
+- if (was_appended)
+- xkb_options_set_selected_list (options_list);
+- g_strfreev (options_list);
+-}
+-
+-static void
+-chooser_response (GtkDialog *chooser,
+- int response_id,
+- GtkBuilder *dialog)
+-{
+- if (response_id == GTK_RESPONSE_OK) {
+- char *id, *name;
+- GtkListStore *list_store;
+-
+- list_store = GTK_LIST_STORE (gtk_tree_view_get_model (GTK_TREE_VIEW (WID ("xkb_layouts_selected"))));
+- id = xkb_layout_chooser_get_selected_id (chooser);
+- name = xkb_layout_description_utf8 (id);
+- gtk_list_store_insert_with_values (list_store, NULL, G_MAXINT,
+- SEL_LAYOUT_TREE_COL_DESCRIPTION, name,
+- SEL_LAYOUT_TREE_COL_ID, id,
+- SEL_LAYOUT_TREE_COL_ENABLED, TRUE,
+- -1);
+- g_free (name);
+- add_default_switcher_if_necessary ();
+- update_layouts_list (GTK_TREE_MODEL (list_store), dialog);
+- }
+-
+- xkb_layout_chooser_response (chooser, response_id);
+-}
+-
+-static void
+-add_selected_layout (GtkWidget * button, GtkBuilder * dialog)
+-{
+- GtkWidget *chooser;
+-
+- chooser = xkb_layout_choose (dialog);
+- g_signal_connect (G_OBJECT (chooser), "response",
+- G_CALLBACK (chooser_response), dialog);
+-}
+-
+-static void
+-show_selected_layout (GtkWidget * button, GtkBuilder * dialog)
+-{
+- gint idx = find_selected_layout_idx (dialog);
+-
+- if (idx != -1) {
+- GtkWidget *parent = WID ("region_notebook");
+- GtkWidget *popup = gkbd_keyboard_drawing_dialog_new ();
+- gkbd_keyboard_drawing_dialog_set_group (popup,
+- config_registry,
+- idx);
+- gtk_window_set_transient_for (GTK_WINDOW (popup),
+- GTK_WINDOW
+- (gtk_widget_get_toplevel
+- (parent)));
+- gtk_widget_show_all (popup);
+- }
+-}
+-
+-static void
+-remove_selected_layout (GtkWidget * button, GtkBuilder * dialog)
+-{
+- GtkTreeModel *model;
+- GtkTreeIter iter;
+-
+- if (get_selected_iter (dialog, &model, &iter) == FALSE)
+- return;
+-
+- gtk_list_store_remove (GTK_LIST_STORE (model), &iter);
+- update_layouts_list (model, dialog);
+-}
+-
+-static void
+-move_up_selected_layout (GtkWidget * button, GtkBuilder * dialog)
+-{
+- GtkTreeModel *model;
+- GtkTreeIter iter, prev;
+- GtkTreePath *path;
+-
+- if (get_selected_iter (dialog, &model, &iter) == FALSE)
+- return;
+-
+- prev = iter;
+- if (!gtk_tree_model_iter_previous (model, &prev))
+- return;
+-
+- path = gtk_tree_model_get_path (model, &prev);
+-
+- gtk_list_store_swap (GTK_LIST_STORE (model), &iter, &prev);
+-
+- update_layouts_list (model, dialog);
+-
+- set_selected_path (dialog, path);
+-
+- gtk_tree_path_free (path);
+-}
+-
+-static void
+-move_down_selected_layout (GtkWidget * button, GtkBuilder * dialog)
+-{
+- GtkTreeModel *model;
+- GtkTreeIter iter, next;
+- GtkTreePath *path;
+-
+- if (get_selected_iter (dialog, &model, &iter) == FALSE)
+- return;
+-
+- next = iter;
+- if (!gtk_tree_model_iter_next (model, &next))
+- return;
+-
+- path = gtk_tree_model_get_path (model, &next);
+-
+- gtk_list_store_swap (GTK_LIST_STORE (model), &iter, &next);
+-
+- update_layouts_list (model, dialog);
+-
+- set_selected_path (dialog, path);
+-
+- gtk_tree_path_free (path);
+-}
+-
+-void
+-xkb_layouts_register_buttons_handlers (GtkBuilder * dialog)
+-{
+- g_signal_connect (G_OBJECT (WID ("xkb_layouts_add")), "clicked",
+- G_CALLBACK (add_selected_layout), dialog);
+- g_signal_connect (G_OBJECT (WID ("xkb_layouts_show")), "clicked",
+- G_CALLBACK (show_selected_layout), dialog);
+- g_signal_connect (G_OBJECT (WID ("xkb_layouts_remove")), "clicked",
+- G_CALLBACK (remove_selected_layout), dialog);
+- g_signal_connect (G_OBJECT (WID ("xkb_layouts_move_up")),
+- "clicked", G_CALLBACK (move_up_selected_layout),
+- dialog);
+- g_signal_connect (G_OBJECT (WID ("xkb_layouts_move_down")),
+- "clicked",
+- G_CALLBACK (move_down_selected_layout), dialog);
+-}
+-
+-static void
+-xkb_layouts_update_list (GSettings * settings,
+- gchar * key, GtkBuilder * dialog)
+-{
+- if (strcmp (key, GKBD_KEYBOARD_CONFIG_KEY_LAYOUTS) == 0) {
+- xkb_layouts_fill_selected_tree (dialog);
+- enable_disable_restoring (dialog);
+- }
+-}
+-
+-void
+-xkb_layouts_register_conf_listener (GtkBuilder * dialog)
+-{
+- g_signal_connect (xkb_keyboard_settings, "changed",
+- G_CALLBACK (xkb_layouts_update_list), dialog);
+-}
+diff -uNrp a/panels/region/cinnamon-region-panel-xkbot.c b/panels/region/cinnamon-region-panel-xkbot.c
+--- a/panels/region/cinnamon-region-panel-xkbot.c 2013-08-25 14:40:14.000000000 +0100
++++ b/panels/region/cinnamon-region-panel-xkbot.c 1970-01-01 01:00:00.000000000 +0100
+@@ -1,516 +0,0 @@
+-/* cinnamon-region-panel-xkbot.c
+- * Copyright (C) 2003-2007 Sergey V. Udaltsov
+- *
+- * Written by: Sergey V. Udaltsov
+- * John Spray
+- *
+- * This program is free software; you can redistribute it and/or modify
+- * it under the terms of the GNU General Public License as published by
+- * the Free Software Foundation; either version 2, or (at your option)
+- * any later version.
+- *
+- * This program is distributed in the hope that it will be useful,
+- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+- * GNU General Public License for more details.
+- *
+- * You should have received a copy of the GNU General Public License
+- * along with this program; if not, write to the Free Software
+- * Foundation, Inc., 51 Franklin Street - Suite 500, Boston, MA
+- * 02110-1335, USA.
+- */
+-
+-#ifdef HAVE_CONFIG_H
+-# include
+-#endif
+-
+-#include
+-#include
+-
+-#include "cinnamon-region-panel-xkb.h"
+-
+-static GtkBuilder *chooser_dialog = NULL;
+-static const char *current1st_level_id = NULL;
+-static GSList *option_checks_list = NULL;
+-static GtkWidget *current_none_radio = NULL;
+-static GtkWidget *current_expander = NULL;
+-static gboolean current_multi_select = FALSE;
+-static GSList *current_radio_group = NULL;
+-
+-#define OPTION_ID_PROP "optionID"
+-#define SELCOUNTER_PROP "selectionCounter"
+-#define GCONFSTATE_PROP "gconfState"
+-#define EXPANDERS_PROP "expandersList"
+-
+-gchar **
+-xkb_options_get_selected_list (void)
+-{
+- gchar **retval;
+-
+- retval =
+- g_settings_get_strv (xkb_keyboard_settings,
+- GKBD_KEYBOARD_CONFIG_KEY_OPTIONS);
+- if (retval == NULL) {
+- retval = g_strdupv (initial_config.options);
+- }
+-
+- return retval;
+-}
+-
+-/* Returns the selection counter of the expander (static current_expander) */
+-static int
+-xkb_options_expander_selcounter_get (void)
+-{
+- return
+- GPOINTER_TO_INT (g_object_get_data
+- (G_OBJECT (current_expander),
+- SELCOUNTER_PROP));
+-}
+-
+-/* Increments the selection counter in the expander (static current_expander)
+- using the value (can be 0)*/
+-static void
+-xkb_options_expander_selcounter_add (int value)
+-{
+- g_object_set_data (G_OBJECT (current_expander), SELCOUNTER_PROP,
+- GINT_TO_POINTER
+- (xkb_options_expander_selcounter_get ()
+- + value));
+-}
+-
+-/* Resets the seletion counter in the expander (static current_expander) */
+-static void
+-xkb_options_expander_selcounter_reset (void)
+-{
+- g_object_set_data (G_OBJECT (current_expander), SELCOUNTER_PROP,
+- GINT_TO_POINTER (0));
+-}
+-
+-/* Formats the expander (static current_expander), based on the selection counter */
+-static void
+-xkb_options_expander_highlight (void)
+-{
+- char *utf_group_name =
+- g_object_get_data (G_OBJECT (current_expander),
+- "utfGroupName");
+- int counter = xkb_options_expander_selcounter_get ();
+- if (utf_group_name != NULL) {
+- gchar *titlemarkup =
+- g_strconcat (counter >
+- 0 ? "" : "",
+- utf_group_name, "", NULL);
+- gtk_expander_set_label (GTK_EXPANDER (current_expander),
+- titlemarkup);
+- g_free (titlemarkup);
+- }
+-}
+-
+-/* Add optionname from the backend's selection list if it's not
+- already in there. */
+-static void
+-xkb_options_select (gchar * optionname)
+-{
+- gboolean already_selected = FALSE;
+- gchar **options_list;
+- guint i;
+-
+- options_list = xkb_options_get_selected_list ();
+- for (i = 0; options_list != NULL && options_list[i] != NULL; i++) {
+- gchar *option = options_list[i];
+- if (!strcmp (option, optionname)) {
+- already_selected = TRUE;
+- break;
+- }
+- }
+-
+- if (!already_selected) {
+- options_list =
+- gkbd_strv_append (options_list, g_strdup (optionname));
+- xkb_options_set_selected_list (options_list);
+- }
+-
+- g_strfreev (options_list);
+-}
+-
+-/* Remove all occurences of optionname from the backend's selection list */
+-static void
+-xkb_options_deselect (gchar * optionname)
+-{
+- gchar **options_list = xkb_options_get_selected_list ();
+- if (options_list != NULL) {
+- gchar **option = options_list;
+- while (*option != NULL) {
+- gchar *id = *option;
+- if (!strcmp (id, optionname)) {
+- gkbd_strv_behead (option);
+- } else
+- option++;
+- }
+- xkb_options_set_selected_list (options_list);
+- }
+- g_strfreev (options_list);
+-}
+-
+-/* Return true if optionname describes a string already in the backend's
+- list of selected options */
+-static gboolean
+-xkb_options_is_selected (gchar * optionname)
+-{
+- gboolean retval = FALSE;
+- gchar **options_list = xkb_options_get_selected_list ();
+- if (options_list != NULL) {
+- gchar **option = options_list;
+- while (*option != NULL) {
+- if (!strcmp (*option, optionname)) {
+- retval = TRUE;
+- break;
+- }
+- option++;
+- }
+- }
+- g_strfreev (options_list);
+- return retval;
+-}
+-
+-/* Make sure selected options stay visible when navigating with the keyboard */
+-static gboolean
+-option_focused_cb (GtkWidget * widget, GdkEventFocus * event,
+- gpointer data)
+-{
+- GtkScrolledWindow *win = GTK_SCROLLED_WINDOW (data);
+- GtkAllocation alloc;
+- GtkAdjustment *adj;
+-
+- gtk_widget_get_allocation (widget, &alloc);
+- adj = gtk_scrolled_window_get_vadjustment (win);
+- gtk_adjustment_clamp_page (adj, alloc.y, alloc.y + alloc.height);
+-
+- return FALSE;
+-}
+-
+-/* Update xkb backend to reflect the new UI state */
+-static void
+-option_toggled_cb (GtkWidget * checkbutton, gpointer data)
+-{
+- gpointer optionID =
+- g_object_get_data (G_OBJECT (checkbutton), OPTION_ID_PROP);
+- if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (checkbutton)))
+- xkb_options_select (optionID);
+- else
+- xkb_options_deselect (optionID);
+-}
+-
+-/* Add a check_button or radio_button to control a particular option
+- This function makes particular use of the current... variables at
+- the top of this file. */
+-static void
+-xkb_options_add_option (XklConfigRegistry * config_registry,
+- XklConfigItem * config_item, GtkBuilder * dialog)
+-{
+- GtkWidget *option_check;
+- gchar *utf_option_name = xci_desc_to_utf8 (config_item);
+- /* Copy this out because we'll load it into the widget with set_data */
+- gchar *full_option_name =
+- g_strdup (gkbd_keyboard_config_merge_items
+- (current1st_level_id, config_item->name));
+- gboolean initial_state;
+-
+- if (current_multi_select)
+- option_check =
+- gtk_check_button_new_with_label (utf_option_name);
+- else {
+- if (current_radio_group == NULL) {
+- /* The first radio in a group is to be "Default", meaning none of
+- the below options are to be included in the selected list.
+- This is a HIG-compliant alternative to allowing no
+- selection in the group. */
+- option_check =
+- gtk_radio_button_new_with_label
+- (current_radio_group, _("Default"));
+- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON
+- (option_check),
+- TRUE);
+- /* Make option name underscore -
+- to enforce its first position in the list */
+- g_object_set_data_full (G_OBJECT (option_check),
+- "utfOptionName",
+- g_strdup (" "), g_free);
+- option_checks_list =
+- g_slist_append (option_checks_list,
+- option_check);
+- current_radio_group =
+- gtk_radio_button_get_group (GTK_RADIO_BUTTON
+- (option_check));
+- current_none_radio = option_check;
+-
+- g_signal_connect (option_check, "focus-in-event",
+- G_CALLBACK (option_focused_cb),
+- WID ("options_scroll"));
+- }
+- option_check =
+- gtk_radio_button_new_with_label (current_radio_group,
+- utf_option_name);
+- current_radio_group =
+- gtk_radio_button_get_group (GTK_RADIO_BUTTON
+- (option_check));
+- g_object_set_data (G_OBJECT (option_check), "NoneRadio",
+- current_none_radio);
+- }
+-
+- initial_state = xkb_options_is_selected (full_option_name);
+-
+- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (option_check),
+- initial_state);
+-
+- g_object_set_data_full (G_OBJECT (option_check), OPTION_ID_PROP,
+- full_option_name, g_free);
+- g_object_set_data_full (G_OBJECT (option_check), "utfOptionName",
+- utf_option_name, g_free);
+-
+- g_signal_connect (option_check, "toggled",
+- G_CALLBACK (option_toggled_cb), NULL);
+-
+- option_checks_list =
+- g_slist_append (option_checks_list, option_check);
+-
+- g_signal_connect (option_check, "focus-in-event",
+- G_CALLBACK (option_focused_cb),
+- WID ("options_scroll"));
+-
+- xkb_options_expander_selcounter_add (initial_state);
+- g_object_set_data (G_OBJECT (option_check), GCONFSTATE_PROP,
+- GINT_TO_POINTER (initial_state));
+-}
+-
+-static gint
+-xkb_option_checks_compare (GtkWidget * chk1, GtkWidget * chk2)
+-{
+- const gchar *t1 =
+- g_object_get_data (G_OBJECT (chk1), "utfOptionName");
+- const gchar *t2 =
+- g_object_get_data (G_OBJECT (chk2), "utfOptionName");
+- return g_utf8_collate (t1, t2);
+-}
+-
+-/* Add a group of options: create title and layout widgets and then
+- add widgets for all the options in the group. */
+-static void
+-xkb_options_add_group (XklConfigRegistry * config_registry,
+- XklConfigItem * config_item, GtkBuilder * dialog)
+-{
+- GtkWidget *align, *vbox, *option_check;
+- gboolean allow_multiple_selection =
+- GPOINTER_TO_INT (g_object_get_data (G_OBJECT (config_item),
+- XCI_PROP_ALLOW_MULTIPLE_SELECTION));
+-
+- GSList *expanders_list =
+- g_object_get_data (G_OBJECT (dialog), EXPANDERS_PROP);
+-
+- gchar *utf_group_name = xci_desc_to_utf8 (config_item);
+- gchar *titlemarkup =
+- g_strconcat ("", utf_group_name, "", NULL);
+-
+- current_expander = gtk_expander_new (titlemarkup);
+- gtk_expander_set_use_markup (GTK_EXPANDER (current_expander),
+- TRUE);
+- g_object_set_data_full (G_OBJECT (current_expander),
+- "utfGroupName", utf_group_name, g_free);
+- g_object_set_data_full (G_OBJECT (current_expander), "groupId",
+- g_strdup (config_item->name), g_free);
+-
+- g_free (titlemarkup);
+- align = gtk_alignment_new (0, 0, 1, 1);
+- gtk_alignment_set_padding (GTK_ALIGNMENT (align), 6, 12, 12, 0);
+- vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
+- gtk_box_set_homogeneous (GTK_BOX (vbox), TRUE);
+- gtk_container_add (GTK_CONTAINER (align), vbox);
+- gtk_container_add (GTK_CONTAINER (current_expander), align);
+-
+- current_multi_select = (gboolean) allow_multiple_selection;
+- current_radio_group = NULL;
+- current1st_level_id = config_item->name;
+-
+- option_checks_list = NULL;
+-
+- xkl_config_registry_foreach_option (config_registry,
+- config_item->name,
+- (ConfigItemProcessFunc)
+- xkb_options_add_option,
+- dialog);
+- /* sort it */
+- option_checks_list =
+- g_slist_sort (option_checks_list,
+- (GCompareFunc) xkb_option_checks_compare);
+- while (option_checks_list) {
+- option_check = GTK_WIDGET (option_checks_list->data);
+- gtk_box_pack_start (GTK_BOX (vbox), option_check, TRUE,
+- TRUE, 0);
+- option_checks_list = option_checks_list->next;
+- }
+- /* free it */
+- g_slist_free (option_checks_list);
+- option_checks_list = NULL;
+-
+- xkb_options_expander_highlight ();
+-
+- expanders_list = g_slist_append (expanders_list, current_expander);
+- g_object_set_data (G_OBJECT (dialog), EXPANDERS_PROP,
+- expanders_list);
+-
+- g_signal_connect (current_expander, "focus-in-event",
+- G_CALLBACK (option_focused_cb),
+- WID ("options_scroll"));
+-}
+-
+-static gint
+-xkb_options_expanders_compare (GtkWidget * expander1,
+- GtkWidget * expander2)
+-{
+- const gchar *t1 =
+- g_object_get_data (G_OBJECT (expander1), "utfGroupName");
+- const gchar *t2 =
+- g_object_get_data (G_OBJECT (expander2), "utfGroupName");
+- return g_utf8_collate (t1, t2);
+-}
+-
+-/* Create widgets to represent the options made available by the backend */
+-void
+-xkb_options_load_options (GtkBuilder * dialog)
+-{
+- GtkWidget *opts_vbox = WID ("options_vbox");
+- GtkWidget *dialog_vbox = WID ("dialog_vbox");
+- GtkWidget *options_scroll = WID ("options_scroll");
+- GtkWidget *expander;
+- GSList *expanders_list;
+-
+- current1st_level_id = NULL;
+- current_none_radio = NULL;
+- current_multi_select = FALSE;
+- current_radio_group = NULL;
+-
+- /* fill the list */
+- xkl_config_registry_foreach_option_group (config_registry,
+- (ConfigItemProcessFunc)
+- xkb_options_add_group,
+- dialog);
+- /* sort it */
+- expanders_list =
+- g_object_get_data (G_OBJECT (dialog), EXPANDERS_PROP);
+- expanders_list =
+- g_slist_sort (expanders_list,
+- (GCompareFunc) xkb_options_expanders_compare);
+- g_object_set_data (G_OBJECT (dialog), EXPANDERS_PROP,
+- expanders_list);
+- while (expanders_list) {
+- expander = GTK_WIDGET (expanders_list->data);
+- gtk_box_pack_start (GTK_BOX (opts_vbox), expander, FALSE,
+- FALSE, 0);
+- expanders_list = expanders_list->next;
+- }
+-
+- /* Somewhere in gtk3 the top vbox in dialog is made non-expandable */
+- gtk_box_set_child_packing (GTK_BOX (dialog_vbox), options_scroll,
+- TRUE, TRUE, 0, GTK_PACK_START);
+- gtk_widget_show_all (dialog_vbox);
+-}
+-
+-static void
+-chooser_response_cb (GtkDialog * dialog, gint response, gpointer data)
+-{
+- switch (response) {
+- case GTK_RESPONSE_DELETE_EVENT:
+- case GTK_RESPONSE_CLOSE: {
+- /* just cleanup */
+- GSList *expanders_list =
+- g_object_get_data (G_OBJECT (dialog),
+- EXPANDERS_PROP);
+- g_object_set_data (G_OBJECT (dialog),
+- EXPANDERS_PROP, NULL);
+- g_slist_free (expanders_list);
+-
+- gtk_widget_destroy (GTK_WIDGET (dialog));
+- chooser_dialog = NULL;
+- }
+- break;
+- }
+-}
+-
+-/* Create popup dialog */
+-void
+-xkb_options_popup_dialog (GtkBuilder * dialog)
+-{
+- GtkWidget *chooser;
+-
+- chooser_dialog = gtk_builder_new ();
+- gtk_builder_set_translation_domain (chooser_dialog, GETTEXT_PACKAGE);
+- gtk_builder_add_from_file (chooser_dialog, CINNAMONCC_UI_DIR
+- "/cinnamon-region-panel-options-dialog.ui",
+- NULL);
+-
+- chooser = CWID ("xkb_options_dialog");
+- gtk_window_set_transient_for (GTK_WINDOW (chooser),
+- GTK_WINDOW (gtk_widget_get_toplevel (WID ("region_notebook"))));
+- gtk_window_set_modal (GTK_WINDOW (chooser), TRUE);
+- xkb_options_load_options (chooser_dialog);
+-
+- g_signal_connect (chooser, "response",
+- G_CALLBACK (chooser_response_cb), dialog);
+- gtk_widget_show (chooser);
+-}
+-
+-/* Update selected option counters for a group-bound expander */
+-static void
+-xkb_options_update_option_counters (XklConfigRegistry * config_registry,
+- XklConfigItem * config_item)
+-{
+- gchar *full_option_name =
+- g_strdup (gkbd_keyboard_config_merge_items
+- (current1st_level_id, config_item->name));
+- gboolean current_state =
+- xkb_options_is_selected (full_option_name);
+- g_free (full_option_name);
+-
+- xkb_options_expander_selcounter_add (current_state);
+-}
+-
+-/* Respond to a change in the xkb gconf settings */
+-static void
+-xkb_options_update (GSettings * settings, gchar * key, GtkBuilder * dialog)
+-{
+- if (!strcmp (key, GKBD_KEYBOARD_CONFIG_KEY_OPTIONS)) {
+- /* Updating options is handled by gconf notifies for each widget
+- This is here to avoid calling it N_OPTIONS times for each gconf
+- change. */
+- enable_disable_restoring (dialog);
+-
+- if (chooser_dialog != NULL) {
+- GSList *expanders_list =
+- g_object_get_data (G_OBJECT (chooser_dialog),
+- EXPANDERS_PROP);
+- while (expanders_list) {
+- current_expander =
+- GTK_WIDGET (expanders_list->data);
+- gchar *group_id =
+- g_object_get_data (G_OBJECT
+- (current_expander),
+- "groupId");
+- current1st_level_id = group_id;
+- xkb_options_expander_selcounter_reset ();
+- xkl_config_registry_foreach_option
+- (config_registry, group_id,
+- (ConfigItemProcessFunc)
+- xkb_options_update_option_counters,
+- current_expander);
+- xkb_options_expander_highlight ();
+- expanders_list = expanders_list->next;
+- }
+- }
+- }
+-}
+-
+-void
+-xkb_options_register_conf_listener (GtkBuilder * dialog)
+-{
+- g_signal_connect (xkb_keyboard_settings, "changed",
+- G_CALLBACK (xkb_options_update), dialog);
+-}
+diff -uNrp a/panels/region/cinnamon-region-panel-xkbpv.c b/panels/region/cinnamon-region-panel-xkbpv.c
+--- a/panels/region/cinnamon-region-panel-xkbpv.c 2013-08-25 14:40:14.000000000 +0100
++++ b/panels/region/cinnamon-region-panel-xkbpv.c 1970-01-01 01:00:00.000000000 +0100
+@@ -1,120 +0,0 @@
+-/* cinnamon-region-panel-xkbpv.c
+- * Copyright (C) 2003-2007 Sergey V. Udaltsov
+- *
+- * Written by: Sergey V. Udaltsov
+- *
+- * This program is free software; you can redistribute it and/or modify
+- * it under the terms of the GNU General Public License as published by
+- * the Free Software Foundation; either version 2, or (at your option)
+- * any later version.
+- *
+- * This program is distributed in the hope that it will be useful,
+- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+- * GNU General Public License for more details.
+- *
+- * You should have received a copy of the GNU General Public License
+- * along with this program; if not, write to the Free Software
+- * Foundation, Inc., 51 Franklin Street - Suite 500, Boston, MA
+- * 02110-1335, USA.
+- */
+-
+-#ifdef HAVE_CONFIG_H
+-# include
+-#endif
+-
+-#include
+-
+-#include "cinnamon-region-panel-xkb.h"
+-
+-#ifdef HAVE_X11_EXTENSIONS_XKB_H
+-#include "X11/XKBlib.h"
+-/**
+- * BAD STYLE: Taken from xklavier_private_xkb.h
+- * Any ideas on architectural improvements are WELCOME
+- */
+-extern gboolean xkl_xkb_config_native_prepare (XklEngine * engine,
+- const XklConfigRec * data,
+- XkbComponentNamesPtr
+- component_names);
+-
+-extern void xkl_xkb_config_native_cleanup (XklEngine * engine,
+- XkbComponentNamesPtr
+- component_names);
+-
+-/* */
+-#endif
+-
+-static GkbdKeyboardDrawingGroupLevel groupsLevels[] =
+- { {0, 1}, {0, 3}, {0, 0}, {0, 2} };
+-static GkbdKeyboardDrawingGroupLevel *pGroupsLevels[] = {
+- groupsLevels, groupsLevels + 1, groupsLevels + 2, groupsLevels + 3
+-};
+-
+-GtkWidget *
+-xkb_layout_preview_create_widget (GtkBuilder * chooserDialog)
+-{
+- GtkWidget *kbdraw = gkbd_keyboard_drawing_new ();
+-
+- gkbd_keyboard_drawing_set_groups_levels (GKBD_KEYBOARD_DRAWING
+- (kbdraw), pGroupsLevels);
+- return kbdraw;
+-}
+-
+-void
+-xkb_layout_preview_set_drawing_layout (GtkWidget * kbdraw,
+- const gchar * id)
+-{
+-#ifdef HAVE_X11_EXTENSIONS_XKB_H
+- if (kbdraw != NULL) {
+- if (id != NULL) {
+- XklConfigRec *data;
+- char **p, *layout, *variant;
+- XkbComponentNamesRec component_names;
+-
+- data = xkl_config_rec_new ();
+- if (xkl_config_rec_get_from_server (data, engine)) {
+- if ((p = data->layouts) != NULL)
+- g_strfreev (data->layouts);
+-
+- if ((p = data->variants) != NULL)
+- g_strfreev (data->variants);
+-
+- data->layouts = g_new0 (char *, 2);
+- data->variants = g_new0 (char *, 2);
+- if (gkbd_keyboard_config_split_items
+- (id, &layout, &variant)
+- && variant != NULL) {
+- data->layouts[0] =
+- (layout ==
+- NULL) ? NULL :
+- g_strdup (layout);
+- data->variants[0] =
+- (variant ==
+- NULL) ? NULL :
+- g_strdup (variant);
+- } else {
+- data->layouts[0] =
+- (id ==
+- NULL) ? NULL : g_strdup (id);
+- data->variants[0] = NULL;
+- }
+-
+- if (xkl_xkb_config_native_prepare
+- (engine, data, &component_names)) {
+- gkbd_keyboard_drawing_set_keyboard
+- (GKBD_KEYBOARD_DRAWING
+- (kbdraw), &component_names);
+-
+- xkl_xkb_config_native_cleanup
+- (engine, &component_names);
+- }
+- }
+- g_object_unref (G_OBJECT (data));
+- } else
+- gkbd_keyboard_drawing_set_keyboard
+- (GKBD_KEYBOARD_DRAWING (kbdraw), NULL);
+-
+- }
+-#endif
+-}
+diff -uNrp a/panels/region/.indent.pro b/panels/region/.indent.pro
+--- a/panels/region/.indent.pro 1970-01-01 01:00:00.000000000 +0100
++++ b/panels/region/.indent.pro 2013-08-25 16:50:30.000000000 +0100
+@@ -0,0 +1,2 @@
++-kr -i8 -pcs -lps -psl
++
+diff -uNrp a/panels/region/Makefile.am b/panels/region/Makefile.am
+--- a/panels/region/Makefile.am 2013-08-25 14:40:14.000000000 +0100
++++ b/panels/region/Makefile.am 2013-09-21 13:24:15.347949247 +0100
+@@ -23,12 +23,9 @@ libregion_la_SOURCES = \
+ cinnamon-region-panel-lang.h \
+ cinnamon-region-panel-system.c \
+ cinnamon-region-panel-system.h \
+- cinnamon-region-panel-xkb.c \
+- cinnamon-region-panel-xkblt.c \
+- cinnamon-region-panel-xkbltadd.c \
+- cinnamon-region-panel-xkbot.c \
+- cinnamon-region-panel-xkbpv.c \
+- cinnamon-region-panel-xkb.h
++ cinnamon-region-panel-input.c \
++ cinnamon-region-panel-input.h \
++ $(NULL)
+
+ libregion_la_LIBADD = $(PANEL_LIBS) $(REGION_PANEL_LIBS) $(builddir)/../common/liblanguage.la
+
+@@ -39,8 +36,8 @@ libregion_la_LDFLAGS = $(PANEL_LDFLAGS)
+ uidir = $(pkgdatadir)/ui
+ ui_DATA = \
+ cinnamon-region-panel.ui \
+- cinnamon-region-panel-layout-chooser.ui \
+- cinnamon-region-panel-options-dialog.ui
++ cinnamon-region-panel-input-chooser.ui \
++ $(NULL)
+
+ desktopdir = $(datadir)/applications
+ Desktop_in_files = cinnamon-region-panel.desktop.in
+diff -uNrp a/panels/region/region-module.c b/panels/region/region-module.c
+--- a/panels/region/region-module.c 2013-08-25 14:40:14.000000000 +0100
++++ b/panels/region/region-module.c 2013-09-21 13:24:15.347949247 +0100
+@@ -28,6 +28,7 @@
+ void
+ g_io_module_load (GIOModule * module)
+ {
++
+ /* register the panel */
+ cc_region_panel_register (module);
+ }
diff --git a/pkgs/desktops/cinnamon/systemd-support.patch b/pkgs/desktops/cinnamon/systemd-support.patch
new file mode 100644
index 00000000000..feceaf05f7b
--- /dev/null
+++ b/pkgs/desktops/cinnamon/systemd-support.patch
@@ -0,0 +1,536 @@
+
+diff --git a/plugins/media-keys/csd-media-keys-manager.c b/plugins/media-keys/csd-media-keys-manager.c
+index 02930a3..7c1c519 100644
+--- a/plugins/media-keys/csd-media-keys-manager.c
++++ b/plugins/media-keys/csd-media-keys-manager.c
+@@ -39,6 +39,7 @@
+ #include
+ #include
+ #include
++#include
+
+ #ifdef HAVE_GUDEV
+ #include
+@@ -121,6 +122,10 @@ static const gchar kb_introspection_xml[] =
+ #define VOLUME_STEP 5 /* percents for one volume button press */
+ #define MAX_VOLUME 65536.0
+
++#define SYSTEMD_DBUS_NAME "org.freedesktop.login1"
++#define SYSTEMD_DBUS_PATH "/org/freedesktop/login1"
++#define SYSTEMD_DBUS_INTERFACE "org.freedesktop.login1.Manager"
++
+ #define CSD_MEDIA_KEYS_MANAGER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), CSD_TYPE_MEDIA_KEYS_MANAGER, CsdMediaKeysManagerPrivate))
+
+ typedef struct {
+@@ -167,6 +172,10 @@ struct CsdMediaKeysManagerPrivate
+ GDBusProxy *power_screen_proxy;
+ GDBusProxy *power_keyboard_proxy;
+
++ /* systemd stuff */
++ GDBusProxy *logind_proxy;
++ gint inhibit_keys_fd;
++
+ /* Multihead stuff */
+ GdkScreen *current_screen;
+ GSList *screens;
+@@ -2213,6 +2222,11 @@ csd_media_keys_manager_stop (CsdMediaKeysManager *manager)
+ }
+ #endif /* HAVE_GUDEV */
+
++ if (priv->logind_proxy) {
++ g_object_unref (priv->logind_proxy);
++ priv->logind_proxy = NULL;
++ }
++
+ if (priv->settings) {
+ g_object_unref (priv->settings);
+ priv->settings = NULL;
+@@ -2356,9 +2370,85 @@ csd_media_keys_manager_class_init (CsdMediaKeysManagerClass *klass)
+ }
+
+ static void
++inhibit_done (GObject *source,
++ GAsyncResult *result,
++ gpointer user_data)
++{
++ GDBusProxy *proxy = G_DBUS_PROXY (source);
++ CsdMediaKeysManager *manager = CSD_MEDIA_KEYS_MANAGER (user_data);
++ GError *error = NULL;
++ GVariant *res;
++ GUnixFDList *fd_list = NULL;
++ gint idx;
++
++ res = g_dbus_proxy_call_with_unix_fd_list_finish (proxy, &fd_list, result, &error);
++ if (res == NULL) {
++ g_warning ("Unable to inhibit keypresses: %s", error->message);
++ g_error_free (error);
++ } else {
++ g_variant_get (res, "(h)", &idx);
++ manager->priv->inhibit_keys_fd = g_unix_fd_list_get (fd_list, idx, &error);
++ if (manager->priv->inhibit_keys_fd == -1) {
++ g_warning ("Failed to receive system inhibitor fd: %s", error->message);
++ g_error_free (error);
++ }
++ g_debug ("System inhibitor fd is %d", manager->priv->inhibit_keys_fd);
++ g_object_unref (fd_list);
++ g_variant_unref (res);
++ }
++}
++
++static void
+ csd_media_keys_manager_init (CsdMediaKeysManager *manager)
+ {
++ GError *error;
++ GDBusConnection *bus;
++
++ error = NULL;
+ manager->priv = CSD_MEDIA_KEYS_MANAGER_GET_PRIVATE (manager);
++
++ bus = g_bus_get_sync (G_BUS_TYPE_SYSTEM, NULL, &error);
++ if (bus == NULL) {
++ g_warning ("Failed to connect to system bus: %s",
++ error->message);
++ g_error_free (error);
++ return;
++ }
++
++ manager->priv->logind_proxy =
++ g_dbus_proxy_new_sync (bus,
++ 0,
++ NULL,
++ SYSTEMD_DBUS_NAME,
++ SYSTEMD_DBUS_PATH,
++ SYSTEMD_DBUS_INTERFACE,
++ NULL,
++ &error);
++
++ if (manager->priv->logind_proxy == NULL) {
++ g_warning ("Failed to connect to systemd: %s",
++ error->message);
++ g_error_free (error);
++ }
++
++ g_object_unref (bus);
++
++ g_debug ("Adding system inhibitors for power keys");
++ manager->priv->inhibit_keys_fd = -1;
++ g_dbus_proxy_call_with_unix_fd_list (manager->priv->logind_proxy,
++ "Inhibit",
++ g_variant_new ("(ssss)",
++ "handle-power-key:handle-suspend-key:handle-hibernate-key",
++ g_get_user_name (),
++ "Cinnamon handling keypresses",
++ "block"),
++ 0,
++ G_MAXINT,
++ NULL,
++ NULL,
++ inhibit_done,
++ manager);
++
+ }
+
+ static void
+@@ -2375,6 +2465,8 @@ csd_media_keys_manager_finalize (GObject *object)
+
+ if (media_keys_manager->priv->start_idle_id != 0)
+ g_source_remove (media_keys_manager->priv->start_idle_id);
++ if (media_keys_manager->priv->inhibit_keys_fd != -1)
++ close (media_keys_manager->priv->inhibit_keys_fd);
+
+ G_OBJECT_CLASS (csd_media_keys_manager_parent_class)->finalize (object);
+ }
+diff --git a/plugins/power/csd-power-manager.c b/plugins/power/csd-power-manager.c
+index b54cb5b..b9c5429 100644
+--- a/plugins/power/csd-power-manager.c
++++ b/plugins/power/csd-power-manager.c
+@@ -32,6 +32,7 @@
+ #include
+ #include
+ #include
++#include
+
+ #include
+
+@@ -79,6 +80,10 @@
+ #define CSD_POWER_MANAGER_CRITICAL_ALERT_TIMEOUT 5 /* seconds */
+ #define CSD_POWER_MANAGER_LID_CLOSE_SAFETY_TIMEOUT 30 /* seconds */
+
++#define SYSTEMD_DBUS_NAME "org.freedesktop.login1"
++#define SYSTEMD_DBUS_PATH "/org/freedesktop/login1"
++#define SYSTEMD_DBUS_INTERFACE "org.freedesktop.login1.Manager"
++
+ /* Keep this in sync with gnome-shell */
+ #define SCREENSAVER_FADE_TIME 10 /* seconds */
+
+@@ -203,6 +208,13 @@ struct CsdPowerManagerPrivate
+ GtkStatusIcon *status_icon;
+ guint xscreensaver_watchdog_timer_id;
+ gboolean is_virtual_machine;
++
++ /* systemd stuff */
++ GDBusProxy *logind_proxy;
++ gint inhibit_lid_switch_fd;
++ gboolean inhibit_lid_switch_taken;
++ gint inhibit_suspend_fd;
++ gboolean inhibit_suspend_taken;
+ };
+
+ enum {
+@@ -3350,30 +3362,6 @@ lock_screensaver (CsdPowerManager *manager)
+ if (!do_lock)
+ return;
+
+- /* connect to the screensaver first */
+- g_dbus_proxy_new_for_bus (G_BUS_TYPE_SESSION,
+- G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES,
+- NULL,
+- GS_DBUS_NAME,
+- GS_DBUS_PATH,
+- GS_DBUS_INTERFACE,
+- NULL,
+- sleep_cb_screensaver_proxy_ready_cb,
+- manager);
+-}
+-
+-static void
+-upower_notify_sleep_cb (UpClient *client,
+- UpSleepKind sleep_kind,
+- CsdPowerManager *manager)
+-{
+- gboolean do_lock;
+-
+- do_lock = g_settings_get_boolean (manager->priv->settings,
+- "lock-on-suspend");
+- if (!do_lock)
+- return;
+-
+ /* connect to the screensaver first */
+ g_dbus_proxy_new_for_bus (G_BUS_TYPE_SESSION,
+ G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES,
+@@ -3384,46 +3372,6 @@ upower_notify_sleep_cb (UpClient *client,
+ NULL,
+ sleep_cb_screensaver_proxy_ready_cb,
+ manager);
+-
+-}
+-
+-static void
+-upower_notify_resume_cb (UpClient *client,
+- UpSleepKind sleep_kind,
+- CsdPowerManager *manager)
+-{
+- gboolean ret;
+- GError *error = NULL;
+-
+- /* this displays the unlock dialogue so the user doesn't have
+- * to move the mouse or press any key before the window comes up */
+- if (manager->priv->screensaver_proxy != NULL) {
+- g_dbus_proxy_call (manager->priv->screensaver_proxy,
+- "SimulateUserActivity",
+- NULL,
+- G_DBUS_CALL_FLAGS_NONE,
+- -1, NULL, NULL, NULL);
+- }
+-
+- if (manager->priv->screensaver_proxy != NULL) {
+- g_object_unref (manager->priv->screensaver_proxy);
+- manager->priv->screensaver_proxy = NULL;
+- }
+-
+- /* close existing notifications on resume, the system power
+- * state is probably different now */
+- notify_close_if_showing (manager->priv->notification_low);
+- notify_close_if_showing (manager->priv->notification_discharging);
+-
+- /* ensure we turn the panel back on after resume */
+- ret = gnome_rr_screen_set_dpms_mode (manager->priv->x11_screen,
+- GNOME_RR_DPMS_ON,
+- &error);
+- if (!ret) {
+- g_warning ("failed to turn the panel on after resume: %s",
+- error->message);
+- g_error_free (error);
+- }
+ }
+
+ static void
+@@ -3582,6 +3530,219 @@ disable_builtin_screensaver (gpointer unused)
+ return TRUE;
+ }
+
++static void
++inhibit_lid_switch_done (GObject *source,
++ GAsyncResult *result,
++ gpointer user_data)
++{
++ GDBusProxy *proxy = G_DBUS_PROXY (source);
++ CsdPowerManager *manager = CSD_POWER_MANAGER (user_data);
++ GError *error = NULL;
++ GVariant *res;
++ GUnixFDList *fd_list = NULL;
++ gint idx;
++
++ res = g_dbus_proxy_call_with_unix_fd_list_finish (proxy, &fd_list, result, &error);
++ if (res == NULL) {
++ g_warning ("Unable to inhibit lid switch: %s", error->message);
++ g_error_free (error);
++ } else {
++ g_variant_get (res, "(h)", &idx);
++ manager->priv->inhibit_lid_switch_fd = g_unix_fd_list_get (fd_list, idx, &error);
++ if (manager->priv->inhibit_lid_switch_fd == -1) {
++ g_warning ("Failed to receive system inhibitor fd: %s", error->message);
++ g_error_free (error);
++ }
++ g_debug ("System inhibitor fd is %d", manager->priv->inhibit_lid_switch_fd);
++ g_object_unref (fd_list);
++ g_variant_unref (res);
++ }
++}
++
++static void
++inhibit_lid_switch (CsdPowerManager *manager)
++{
++ GVariant *params;
++
++ if (manager->priv->inhibit_lid_switch_taken) {
++ g_debug ("already inhibited lid-switch");
++ return;
++ }
++ g_debug ("Adding lid switch system inhibitor");
++ manager->priv->inhibit_lid_switch_taken = TRUE;
++
++ params = g_variant_new ("(ssss)",
++ "handle-lid-switch",
++ g_get_user_name (),
++ "Multiple displays attached",
++ "block");
++ g_dbus_proxy_call_with_unix_fd_list (manager->priv->logind_proxy,
++ "Inhibit",
++ params,
++ 0,
++ G_MAXINT,
++ NULL,
++ NULL,
++ inhibit_lid_switch_done,
++ manager);
++}
++
++static void
++inhibit_suspend_done (GObject *source,
++ GAsyncResult *result,
++ gpointer user_data)
++{
++ GDBusProxy *proxy = G_DBUS_PROXY (source);
++ CsdPowerManager *manager = CSD_POWER_MANAGER (user_data);
++ GError *error = NULL;
++ GVariant *res;
++ GUnixFDList *fd_list = NULL;
++ gint idx;
++
++ res = g_dbus_proxy_call_with_unix_fd_list_finish (proxy, &fd_list, result, &error);
++ if (res == NULL) {
++ g_warning ("Unable to inhibit suspend: %s", error->message);
++ g_error_free (error);
++ } else {
++ g_variant_get (res, "(h)", &idx);
++ manager->priv->inhibit_suspend_fd = g_unix_fd_list_get (fd_list, idx, &error);
++ if (manager->priv->inhibit_suspend_fd == -1) {
++ g_warning ("Failed to receive system inhibitor fd: %s", error->message);
++ g_error_free (error);
++ }
++ g_debug ("System inhibitor fd is %d", manager->priv->inhibit_suspend_fd);
++ g_object_unref (fd_list);
++ g_variant_unref (res);
++ }
++}
++
++/* We take a delay inhibitor here, which causes logind to send a
++ * PrepareToSleep signal, which gives us a chance to lock the screen
++ * and do some other preparations.
++ */
++static void
++inhibit_suspend (CsdPowerManager *manager)
++{
++ if (manager->priv->inhibit_suspend_taken) {
++ g_debug ("already inhibited lid-switch");
++ return;
++ }
++ g_debug ("Adding suspend delay inhibitor");
++ manager->priv->inhibit_suspend_taken = TRUE;
++ g_dbus_proxy_call_with_unix_fd_list (manager->priv->logind_proxy,
++ "Inhibit",
++ g_variant_new ("(ssss)",
++ "sleep",
++ g_get_user_name (),
++ "Cinnamon needs to lock the screen",
++ "delay"),
++ 0,
++ G_MAXINT,
++ NULL,
++ NULL,
++ inhibit_suspend_done,
++ manager);
++}
++
++static void
++uninhibit_suspend (CsdPowerManager *manager)
++{
++ if (manager->priv->inhibit_suspend_fd == -1) {
++ g_debug ("no suspend delay inhibitor");
++ return;
++ }
++ g_debug ("Removing suspend delay inhibitor");
++ close (manager->priv->inhibit_suspend_fd);
++ manager->priv->inhibit_suspend_fd = -1;
++ manager->priv->inhibit_suspend_taken = FALSE;
++}
++
++static void
++handle_suspend_actions (CsdPowerManager *manager)
++{
++ gboolean do_lock;
++
++ do_lock = g_settings_get_boolean (manager->priv->settings,
++ "lock-on-suspend");
++ if (do_lock)
++ lock_screensaver (manager);
++
++ /* lift the delay inhibit, so logind can proceed */
++ uninhibit_suspend (manager);
++}
++
++static void
++handle_resume_actions (CsdPowerManager *manager)
++{
++ gboolean ret;
++ GError *error = NULL;
++
++ /* this displays the unlock dialogue so the user doesn't have
++ * to move the mouse or press any key before the window comes up */
++ g_dbus_connection_call (manager->priv->connection,
++ GS_DBUS_NAME,
++ GS_DBUS_PATH,
++ GS_DBUS_INTERFACE,
++ "SimulateUserActivity",
++ NULL, NULL,
++ G_DBUS_CALL_FLAGS_NONE, -1,
++ NULL, NULL, NULL);
++
++ /* close existing notifications on resume, the system power
++ * state is probably different now */
++ notify_close_if_showing (manager->priv->notification_low);
++ notify_close_if_showing (manager->priv->notification_discharging);
++
++ /* ensure we turn the panel back on after resume */
++ ret = gnome_rr_screen_set_dpms_mode (manager->priv->x11_screen,
++ GNOME_RR_DPMS_ON,
++ &error);
++ if (!ret) {
++ g_warning ("failed to turn the panel on after resume: %s",
++ error->message);
++ g_error_free (error);
++ }
++
++ /* set up the delay again */
++ inhibit_suspend (manager);
++}
++
++static void
++upower_notify_sleep_cb (UpClient *client,
++ UpSleepKind sleep_kind,
++ CsdPowerManager *manager)
++{
++ handle_suspend_actions (manager);
++}
++
++static void
++upower_notify_resume_cb (UpClient *client,
++ UpSleepKind sleep_kind,
++ CsdPowerManager *manager)
++{
++ handle_resume_actions (manager);
++}
++
++static void
++logind_proxy_signal_cb (GDBusProxy *proxy,
++ const gchar *sender_name,
++ const gchar *signal_name,
++ GVariant *parameters,
++ gpointer user_data)
++{
++ CsdPowerManager *manager = CSD_POWER_MANAGER (user_data);
++ gboolean is_about_to_suspend;
++
++ if (g_strcmp0 (signal_name, "PrepareForSleep") != 0)
++ return;
++ g_variant_get (parameters, "(b)", &is_about_to_suspend);
++ if (is_about_to_suspend) {
++ handle_suspend_actions (manager);
++ } else {
++ handle_resume_actions (manager);
++ }
++}
++
+ static gboolean
+ is_hardware_a_virtual_machine (void)
+ {
+@@ -3647,6 +3808,26 @@ csd_power_manager_start (CsdPowerManager *manager,
+ if (manager->priv->x11_screen == NULL)
+ return FALSE;
+
++ /* Set up the logind proxy */
++ manager->priv->logind_proxy =
++ g_dbus_proxy_new_for_bus_sync (G_BUS_TYPE_SYSTEM,
++ 0,
++ NULL,
++ SYSTEMD_DBUS_NAME,
++ SYSTEMD_DBUS_PATH,
++ SYSTEMD_DBUS_INTERFACE,
++ NULL,
++ error);
++ g_signal_connect (manager->priv->logind_proxy, "g-signal",
++ G_CALLBACK (logind_proxy_signal_cb),
++ manager);
++
++ /* Set up a delay inhibitor to be informed about suspend attempts */
++ inhibit_suspend (manager);
++
++ /* Disable logind's lid handling while g-s-d is active */
++ inhibit_lid_switch (manager);
++
+ /* track the active session */
+ manager->priv->session = cinnamon_settings_session_new ();
+ g_signal_connect (manager->priv->session, "notify::state",
+@@ -3856,6 +4037,22 @@ csd_power_manager_stop (CsdPowerManager *manager)
+ manager->priv->up_client = NULL;
+ }
+
++ if (manager->priv->inhibit_lid_switch_fd != -1) {
++ close (manager->priv->inhibit_lid_switch_fd);
++ manager->priv->inhibit_lid_switch_fd = -1;
++ manager->priv->inhibit_lid_switch_taken = FALSE;
++ }
++ if (manager->priv->inhibit_suspend_fd != -1) {
++ close (manager->priv->inhibit_suspend_fd);
++ manager->priv->inhibit_suspend_fd = -1;
++ manager->priv->inhibit_suspend_taken = FALSE;
++ }
++
++ if (manager->priv->logind_proxy != NULL) {
++ g_object_unref (manager->priv->logind_proxy);
++ manager->priv->logind_proxy = NULL;
++ }
++
+ if (manager->priv->x11_screen != NULL) {
+ g_object_unref (manager->priv->x11_screen);
+ manager->priv->x11_screen = NULL;
+@@ -3928,6 +4125,8 @@ static void
+ csd_power_manager_init (CsdPowerManager *manager)
+ {
+ manager->priv = CSD_POWER_MANAGER_GET_PRIVATE (manager);
++ manager->priv->inhibit_lid_switch_fd = -1;
++ manager->priv->inhibit_suspend_fd = -1;
+ }
+
+ static void
diff --git a/pkgs/desktops/gnome-3/core/baobab/default.nix b/pkgs/desktops/gnome-3/core/baobab/default.nix
index 07805644d90..9381f45105d 100644
--- a/pkgs/desktops/gnome-3/core/baobab/default.nix
+++ b/pkgs/desktops/gnome-3/core/baobab/default.nix
@@ -1,7 +1,7 @@
{ stdenv, intltool, fetchurl, vala, libgtop
, pkgconfig, gtk3, glib, hicolor_icon_theme
, bash, makeWrapper, itstool, libxml2
-, gnome3, librsvg, gdk_pixbuf }:
+, gnome3, librsvg, gdk_pixbuf, file }:
stdenv.mkDerivation rec {
name = "baobab-3.10.1";
@@ -22,19 +22,14 @@ stdenv.mkDerivation rec {
hicolor_icon_theme gnome3.gnome_icon_theme_symbolic ];
buildInputs = [ vala pkgconfig gtk3 glib libgtop intltool itstool libxml2
- gnome3.gsettings_desktop_schemas makeWrapper ];
-
- installFlags = "gsettingsschemadir=\${out}/share/baobab/glib-2.0/schemas/";
-
- postInstall = ''
- wrapProgram "$out/bin/baobab" \
- --set GDK_PIXBUF_MODULE_FILE "$GDK_PIXBUF_MODULE_FILE" \
- --prefix XDG_DATA_DIRS : "${gtk3}/share:${gnome3.gnome_themes_standard}/share:${gnome3.gsettings_desktop_schemas}/share:$out/share:$out/share/baobab:$XDG_ICON_DIRS"
- '';
+ gnome3.gsettings_desktop_schemas makeWrapper file ];
preFixup = ''
rm $out/share/icons/hicolor/icon-theme.cache
rm $out/share/icons/HighContrast/icon-theme.cache
+ wrapProgram "$out/bin/baobab" \
+ --set GDK_PIXBUF_MODULE_FILE "$GDK_PIXBUF_MODULE_FILE" \
+ --prefix XDG_DATA_DIRS : "${gtk3}/share:${gnome3.gnome_themes_standard}/share:$out/share:$XDG_ICON_DIRS:$GSETTINGS_SCHEMAS_PATH"
'';
meta = with stdenv.lib; {
diff --git a/pkgs/desktops/gnome-3/core/dconf/default.nix b/pkgs/desktops/gnome-3/core/dconf/default.nix
index 4ee8143bb2b..a6236f16744 100644
--- a/pkgs/desktops/gnome-3/core/dconf/default.nix
+++ b/pkgs/desktops/gnome-3/core/dconf/default.nix
@@ -1,5 +1,5 @@
{ stdenv, fetchurl, vala, libxslt, pkgconfig, glib, dbus_glib, gnome3
-, libxml2, intltool, docbook_xsl_ns, docbook_xsl }:
+, libxml2, intltool, docbook_xsl_ns, docbook_xsl, makeWrapper }:
stdenv.mkDerivation rec {
name = "dconf-${version}";
@@ -11,7 +11,16 @@ stdenv.mkDerivation rec {
};
buildInputs = [ vala libxslt pkgconfig glib dbus_glib gnome3.gtk libxml2
- intltool docbook_xsl docbook_xsl_ns ];
+ intltool docbook_xsl docbook_xsl_ns makeWrapper ];
+
+ preFixup = ''
+ wrapProgram "$out/bin/dconf-editor" \
+ --prefix XDG_DATA_DIRS : "$GSETTINGS_SCHEMAS_PATH"
+
+ rm $out/lib/gio/modules/giomodule.cache
+ rm $out/share/icons/hicolor/icon-theme.cache
+ rm $out/share/icons/HighContrast/icon-theme.cache
+ '';
meta = with stdenv.lib; {
platforms = platforms.linux;
diff --git a/pkgs/desktops/gnome-3/core/empathy/default.nix b/pkgs/desktops/gnome-3/core/empathy/default.nix
index 1f7a027fd3e..051bc9b7fb2 100644
--- a/pkgs/desktops/gnome-3/core/empathy/default.nix
+++ b/pkgs/desktops/gnome-3/core/empathy/default.nix
@@ -37,14 +37,13 @@ stdenv.mkDerivation rec {
"-I${dbus_libs}/include/dbus-1.0"
"-I${dbus_libs}/lib/dbus-1.0/include" ];
- enableParallelBuilding = true;
-
- installFlags = "gsettingsschemadir=\${out}/share/empathy/glib-2.0/schemas/";
-
- postInstall = ''
- wrapProgram "$out/bin/empathy" \
- --set GDK_PIXBUF_MODULE_FILE "$GDK_PIXBUF_MODULE_FILE" \
- --prefix XDG_DATA_DIRS : "$XDG_ICON_DIRS:${gtk3}/share:${gnome3.gnome_themes_standard}/:${gnome3.gnome_themes_standard}/share:${hicolor_icon_theme}/share:${gnome3.gsettings_desktop_schemas}/share:$out/share:$out/share/empathy:${telepathy_logger}/share/telepathy/logger:${folks}/share/folks:${evolution_data_server}/share/evolution-data-server"
+ preFixup = ''
+ for f in $out/bin/* $out/libexec/*; do
+ wrapProgram $f \
+ --set GDK_PIXBUF_MODULE_FILE "$GDK_PIXBUF_MODULE_FILE" \
+ --prefix XDG_DATA_DIRS : "$XDG_ICON_DIRS:${gtk3}/share:${gnome3.gnome_themes_standard}/:${gnome3.gnome_themes_standard}/share:${hicolor_icon_theme}/share:$out/share:$GSETTINGS_SCHEMAS_PATH"
+ done
+ rm $out/share/icons/hicolor/icon-theme.cache
'';
meta = with stdenv.lib; {
diff --git a/pkgs/desktops/gnome-3/core/eog/default.nix b/pkgs/desktops/gnome-3/core/eog/default.nix
index 99e87b3c584..57f19dcaa32 100644
--- a/pkgs/desktops/gnome-3/core/eog/default.nix
+++ b/pkgs/desktops/gnome-3/core/eog/default.nix
@@ -14,11 +14,13 @@ stdenv.mkDerivation rec {
[ intltool pkgconfig itstool libxml2 libjpeg gtk glib libpeas makeWrapper librsvg
gsettings_desktop_schemas shared_mime_info gnome_icon_theme gnome_desktop libexif ];
- postInstall = ''
+ preFixup = ''
wrapProgram "$out/bin/eog" \
--prefix GI_TYPELIB_PATH : "$GI_TYPELIB_PATH" \
--set GDK_PIXBUF_MODULE_FILE "$GDK_PIXBUF_MODULE_FILE" \
- --prefix XDG_DATA_DIRS : "$XDG_ICON_DIRS:${shared_mime_info}/share:${gnome3.gnome_icon_theme}/share:${gnome3.gsettings_desktop_schemas}/share:${gnome3.gtk}/share:$out/share"
+ --prefix XDG_DATA_DIRS : "$XDG_ICON_DIRS:${shared_mime_info}/share:${gnome3.gnome_icon_theme}/share:${gnome3.gtk}/share:$out/share:$GSETTINGS_SCHEMAS_PATH"
+
+ rm $out/share/icons/hicolor/icon-theme.cache
'';
meta = with stdenv.lib; {
diff --git a/pkgs/desktops/gnome-3/core/epiphany/default.nix b/pkgs/desktops/gnome-3/core/epiphany/default.nix
index 7da49dbc738..9df3a7ed01e 100644
--- a/pkgs/desktops/gnome-3/core/epiphany/default.nix
+++ b/pkgs/desktops/gnome-3/core/epiphany/default.nix
@@ -1,10 +1,8 @@
{ stdenv, intltool, fetchurl, pkgconfig, gtk3, glib, nspr, icu
, bash, makeWrapper, gnome3, libwnck3, libxml2, libxslt, libtool
, webkitgtk, libsoup, libsecret, gnome_desktop, libnotify, p11_kit
-, sqlite, gcr, avahi, nss, isocodes, itstool, file }:
-
-# TODO: icons and theme still does not work
-# use packaged gnome3.gnome_icon_theme_symbolic
+, sqlite, gcr, avahi, nss, isocodes, itstool, file
+, hicolor_icon_theme, gdk_pixbuf, librsvg }:
stdenv.mkDerivation rec {
name = "epiphany-3.10.3";
@@ -18,6 +16,8 @@ stdenv.mkDerivation rec {
configureFlags = [ "--disable-static --disable-tests" ];
propagatedUserEnvPkgs = [ gnome3.gnome_themes_standard ];
+ propagatedBuildInputs = [ gdk_pixbuf gnome3.gnome_icon_theme librsvg
+ hicolor_icon_theme gnome3.gnome_icon_theme_symbolic ];
nativeBuildInputs = [ pkgconfig file ];
@@ -30,13 +30,12 @@ stdenv.mkDerivation rec {
NIX_CFLAGS_COMPILE = "-I${nspr}/include/nspr -I${nss}/include/nss";
- installFlags = "gsettingsschemadir=\${out}/share/${name}/glib-2.0/schemas/";
-
enableParallelBuilding = true;
- postInstall = ''
+ preFixup = ''
wrapProgram "$out/bin/epiphany" \
- --prefix XDG_DATA_DIRS : "${gtk3}/share:${gnome3.gnome_themes_standard}/share:${gnome3.gsettings_desktop_schemas}/share:$out/share:$out/share/${name}"
+ --set GDK_PIXBUF_MODULE_FILE "$GDK_PIXBUF_MODULE_FILE" \
+ --prefix XDG_DATA_DIRS : "${gtk3}/share:${gnome3.gnome_themes_standard}/share:$out/share:$XDG_ICON_DIRS:$GSETTINGS_SCHEMAS_PATH"
'';
meta = with stdenv.lib; {
diff --git a/pkgs/desktops/gnome-3/core/evince/default.nix b/pkgs/desktops/gnome-3/core/evince/default.nix
index de8f28ddaab..4b50840534c 100644
--- a/pkgs/desktops/gnome-3/core/evince/default.nix
+++ b/pkgs/desktops/gnome-3/core/evince/default.nix
@@ -2,6 +2,7 @@
, glib, gtk3, pango, atk, gdk_pixbuf, shared_mime_info, itstool, gnome3
, poppler, ghostscriptX, djvulibre, libspectre, libsecret , makeWrapper
, librsvg, recentListSize ? null # 5 is not enough, allow passing a different number
+, gobjectIntrospection
}:
stdenv.mkDerivation rec {
@@ -14,17 +15,16 @@ stdenv.mkDerivation rec {
buildInputs = [
pkgconfig intltool perl perlXMLParser libxml2
- glib gtk3 pango atk gdk_pixbuf
+ glib gtk3 pango atk gdk_pixbuf gobjectIntrospection
itstool gnome3.gnome_icon_theme gnome3.gnome_icon_theme_symbolic
gnome3.libgnome_keyring gnome3.gsettings_desktop_schemas
poppler ghostscriptX djvulibre libspectre
makeWrapper libsecret librsvg
];
- preFixup = "rm $out/share/icons/hicolor/icon-theme.cache";
-
configureFlags = [
"--disable-nautilus" # Do not use nautilus
+ "--enable-introspection"
];
NIX_CFLAGS_COMPILE = "-I${gnome3.glib}/include/gio-unix-2.0";
@@ -40,12 +40,14 @@ stdenv.mkDerivation rec {
sed -i 's/\(if (++n_items == \)5\(.*\)/\1${builtins.toString recentListSize}\2/' shell/ev-window.c
'';
- postInstall = ''
+ preFixup = ''
# Tell Glib/GIO about the MIME info directory, which is used
# by `g_file_info_get_content_type ()'.
wrapProgram "$out/bin/evince" \
--set GDK_PIXBUF_MODULE_FILE "$GDK_PIXBUF_MODULE_FILE" \
- --prefix XDG_DATA_DIRS : "$XDG_ICON_DIRS:${gnome3.gsettings_desktop_schemas}/share:${gtk3}/share:${shared_mime_info}/share:$out/share"
+ --prefix XDG_DATA_DIRS : "$XDG_ICON_DIRS:${gtk3}/share:${shared_mime_info}/share:$out/share:$GSETTINGS_SCHEMAS_PATH"
+
+ rm $out/share/icons/hicolor/icon-theme.cache
'';
doCheck = false; # would need pythonPackages.dogTail, which is missing
diff --git a/pkgs/desktops/gnome-3/core/evolution-data-server/default.nix b/pkgs/desktops/gnome-3/core/evolution-data-server/default.nix
index 30805c1c597..9e7d0cb3da0 100644
--- a/pkgs/desktops/gnome-3/core/evolution-data-server/default.nix
+++ b/pkgs/desktops/gnome-3/core/evolution-data-server/default.nix
@@ -1,5 +1,5 @@
{ fetchurl, stdenv, pkgconfig, gnome3, python, intltool, libsoup, libxml2, libsecret
-, p11_kit, db, nspr, nss, libical, gperf, valaSupport ? true, vala }:
+, p11_kit, db, nspr, nss, libical, gperf, makeWrapper, valaSupport ? true, vala }:
stdenv.mkDerivation rec {
@@ -12,14 +12,18 @@ stdenv.mkDerivation rec {
buildInputs = with gnome3;
[ pkgconfig glib python intltool libsoup libxml2 gtk gnome_online_accounts libsecret
- gcr p11_kit db nspr nss libgweather libical libgdata gperf ]
+ gcr p11_kit db nspr nss libgweather libical libgdata gperf makeWrapper ]
++ stdenv.lib.optional valaSupport vala;
# uoa irrelevant for now
configureFlags = ["--disable-uoa" "--with-nspr-includes=${nspr}/include/nspr" "--with-nss-includes=${nss}/include/nss"]
++ stdenv.lib.optional valaSupport "--enable-vala-bindings";
- installFlags = "gsettingsschemadir=\${out}/share/evolution-data-server/glib-2.0/schemas/";
+ preFixup = ''
+ for f in "$out/libexec/evolution-addressbook-factory" "$out/libexec/evolution-calendar-factory"; do
+ wrapProgram $f --prefix XDG_DATA_DIRS : "$GSETTINGS_SCHEMAS_PATH"
+ done
+ '';
meta = with stdenv.lib; {
platforms = platforms.linux;
diff --git a/pkgs/desktops/gnome-3/core/folks/default.nix b/pkgs/desktops/gnome-3/core/folks/default.nix
index 9b0f403b079..12518c634c4 100644
--- a/pkgs/desktops/gnome-3/core/folks/default.nix
+++ b/pkgs/desktops/gnome-3/core/folks/default.nix
@@ -27,8 +27,6 @@ stdenv.mkDerivation rec {
postBuild = "rm -rf $out/share/gtk-doc";
- installFlags = "gsettingsschemadir=\${out}/share/folks/glib-2.0/schemas/";
-
meta = {
description = "Folks";
diff --git a/pkgs/desktops/gnome-3/core/gcr/default.nix b/pkgs/desktops/gnome-3/core/gcr/default.nix
index 059942530ea..a1fdd471282 100644
--- a/pkgs/desktops/gnome-3/core/gcr/default.nix
+++ b/pkgs/desktops/gnome-3/core/gcr/default.nix
@@ -1,6 +1,6 @@
{ stdenv, fetchurl, pkgconfig, intltool, gnupg, p11_kit, glib
, libgcrypt, libtasn1, dbus_glib, gtk, pango, gdk_pixbuf, atk
-, gobjectIntrospection }:
+, gobjectIntrospection, makeWrapper }:
stdenv.mkDerivation rec {
name = "gcr-3.10.1";
@@ -12,11 +12,16 @@ stdenv.mkDerivation rec {
buildInputs = [
pkgconfig intltool gnupg p11_kit glib gobjectIntrospection
- libgcrypt libtasn1 dbus_glib gtk pango gdk_pixbuf atk
+ libgcrypt libtasn1 dbus_glib gtk pango gdk_pixbuf atk makeWrapper
];
#doCheck = true;
+ preFixup = ''
+ wrapProgram "$out/bin/gcr-viewer" \
+ --prefix XDG_DATA_DIRS : "$GSETTINGS_SCHEMAS_PATH"
+ '';
+
meta = with stdenv.lib; {
platforms = platforms.linux;
};
diff --git a/pkgs/desktops/gnome-3/core/gnome-backgrounds/default.nix b/pkgs/desktops/gnome-3/core/gnome-backgrounds/default.nix
new file mode 100644
index 00000000000..3879b81859a
--- /dev/null
+++ b/pkgs/desktops/gnome-3/core/gnome-backgrounds/default.nix
@@ -0,0 +1,16 @@
+{ stdenv, fetchurl, pkgconfig, intltool }:
+
+stdenv.mkDerivation rec {
+ name = "gnome-backgrounds-3.10.1";
+
+ src = fetchurl {
+ url = "mirror://gnome/sources/gnome-backgrounds/3.10/${name}.tar.xz";
+ sha256 = "11rv03m4hznpx0brf47hil04199z3jjvl1aq7q0lnill3yrffiyc";
+ };
+
+ nativeBuildInputs = [ pkgconfig intltool ];
+
+ meta = with stdenv.lib; {
+ platforms = platforms.linux;
+ };
+}
diff --git a/pkgs/desktops/gnome-3/core/gnome-calculator/default.nix b/pkgs/desktops/gnome-3/core/gnome-calculator/default.nix
new file mode 100644
index 00000000000..205961a9171
--- /dev/null
+++ b/pkgs/desktops/gnome-3/core/gnome-calculator/default.nix
@@ -0,0 +1,36 @@
+{ stdenv, intltool, fetchurl, pkgconfig, libxml2
+, bash, gtk3, glib, hicolor_icon_theme, makeWrapper
+, itstool, gnome3, librsvg, gdk_pixbuf }:
+
+stdenv.mkDerivation rec {
+ name = "gnome-calculator-3.10.2";
+
+ src = fetchurl {
+ url = "mirror://gnome/sources/gnome-calculator/3.10/${name}.tar.xz";
+ sha256 = "0gkddnk9x76895xrz0ps4yny36w62fhi459gwmxqqb9kx5934n1f";
+ };
+
+ NIX_CFLAGS_COMPILE = "-I${gnome3.glib}/include/gio-unix-2.0";
+
+ propagatedUserEnvPkgs = [ gnome3.gnome_themes_standard ];
+ propagatedBuildInputs = [ gdk_pixbuf gnome3.gnome_icon_theme librsvg
+ hicolor_icon_theme gnome3.gnome_icon_theme_symbolic ];
+
+ buildInputs = [ bash pkgconfig gtk3 glib intltool itstool
+ libxml2 gnome3.gtksourceview
+ gnome3.gsettings_desktop_schemas makeWrapper ];
+
+ preFixup = ''
+ wrapProgram "$out/bin/gnome-calculator" \
+ --set GDK_PIXBUF_MODULE_FILE "$GDK_PIXBUF_MODULE_FILE" \
+ --prefix XDG_DATA_DIRS : "${gtk3}/share:${gnome3.gnome_themes_standard}/share:$out/share:$XDG_ICON_DIRS:$GSETTINGS_SCHEMAS_PATH"
+ '';
+
+ meta = with stdenv.lib; {
+ homepage = https://wiki.gnome.org/action/show/Apps/Calculator;
+ description = "Application that solves mathematical equations and is suitable as a default application in a Desktop environment";
+ maintainers = with maintainers; [ lethalman ];
+ license = licenses.gpl2;
+ platforms = platforms.linux;
+ };
+}
diff --git a/pkgs/desktops/gnome-3/core/gnome-contacts/configure_dbus_glib.patch b/pkgs/desktops/gnome-3/core/gnome-contacts/configure_dbus_glib.patch
new file mode 100644
index 00000000000..926762defbd
--- /dev/null
+++ b/pkgs/desktops/gnome-3/core/gnome-contacts/configure_dbus_glib.patch
@@ -0,0 +1,10 @@
+--- configure.ac.orig 2014-04-08 10:25:49.497620879 +0200
++++ configure.ac 2014-04-08 10:26:36.639440950 +0200
+@@ -43,6 +43,7 @@
+ folks-telepathy
+ folks-eds
+ libnotify
++ dbus-glib-1
+ telepathy-glib >= 0.17.5
+ libebook-1.2 >= 3.5.3
+ libedataserver-1.2 >= 3.5.3
diff --git a/pkgs/desktops/gnome-3/core/gnome-contacts/default.nix b/pkgs/desktops/gnome-3/core/gnome-contacts/default.nix
new file mode 100644
index 00000000000..f8059f952e6
--- /dev/null
+++ b/pkgs/desktops/gnome-3/core/gnome-contacts/default.nix
@@ -0,0 +1,51 @@
+{ stdenv, intltool, fetchurl, evolution_data_server, db
+, pkgconfig, gtk3, glib, hicolor_icon_theme, libsecret
+, bash, makeWrapper, itstool, folks, libnotify, libxml2
+, gnome3, librsvg, gdk_pixbuf, file, telepathy_glib, nspr, nss
+, libsoup, vala, dbus_glib, automake114x, autoconf }:
+
+stdenv.mkDerivation rec {
+ name = "gnome-contacts-3.10.1";
+
+ src = fetchurl {
+ url = "mirror://gnome/sources/gnome-contacts/3.10/${name}.tar.xz";
+ sha256 = "e119c32bb10136e7190f11f79334fa82ed56468cff5bb7836da0ebf7b572779b";
+ };
+
+ doCheck = true;
+
+ propagatedUserEnvPkgs = [ gnome3.gnome_themes_standard evolution_data_server ];
+ propagatedBuildInputs = [ gdk_pixbuf gnome3.gnome_icon_theme librsvg
+ hicolor_icon_theme gnome3.gnome_icon_theme_symbolic ];
+
+ # force build from vala
+ preBuild = ''
+ touch src/*.vala
+ '';
+
+ buildInputs = [ pkgconfig gtk3 glib intltool itstool evolution_data_server
+ gnome3.gsettings_desktop_schemas makeWrapper file libnotify
+ folks gnome3.gnome_desktop telepathy_glib libsecret dbus_glib
+ libxml2 libsoup gnome3.gnome_online_accounts nspr nss
+ vala automake114x autoconf db ];
+
+ preFixup = ''
+ for f in "$out/bin/gnome-contacts" "$out/libexec/gnome-contacts-search-provider"; do
+ wrapProgram $f \
+ --set GDK_PIXBUF_MODULE_FILE "$GDK_PIXBUF_MODULE_FILE" \
+ --prefix XDG_DATA_DIRS : "${gtk3}/share:${gnome3.gnome_themes_standard}/share:$out/share:$XDG_ICON_DIRS:$GSETTINGS_SCHEMAS_PATH"
+ done
+ '';
+
+ patches = [ ./configure_dbus_glib.patch ./fix_row_selected.patch ];
+
+ patchFlags = "-p0";
+
+ meta = with stdenv.lib; {
+ homepage = https://wiki.gnome.org/Apps/Contacts;
+ description = "Contacts is GNOME's integrated address book";
+ maintainers = with maintainers; [ lethalman ];
+ license = licenses.gpl2;
+ platforms = platforms.linux;
+ };
+}
diff --git a/pkgs/desktops/gnome-3/core/gnome-contacts/fix_row_selected.patch b/pkgs/desktops/gnome-3/core/gnome-contacts/fix_row_selected.patch
new file mode 100644
index 00000000000..b379b4b8ee9
--- /dev/null
+++ b/pkgs/desktops/gnome-3/core/gnome-contacts/fix_row_selected.patch
@@ -0,0 +1,11 @@
+--- src/contacts-view.vala.orig 2014-04-08 11:35:36.302252460 +0200
++++ src/contacts-view.vala 2014-04-08 11:37:37.045343221 +0200
+@@ -265,7 +265,7 @@
+ data.destroy ();
+ }
+
+- public override void row_selected (ListBoxRow row) {
++ public override void row_selected (ListBoxRow? row) {
+ var data = row as ContactDataRow;
+ var contact = data != null ? data.contact : null;
+ selection_changed (contact);
diff --git a/pkgs/desktops/gnome-3/core/gnome-control-center/default.nix b/pkgs/desktops/gnome-3/core/gnome-control-center/default.nix
index ed9adb370d4..1222f03d66e 100644
--- a/pkgs/desktops/gnome-3/core/gnome-control-center/default.nix
+++ b/pkgs/desktops/gnome-3/core/gnome-control-center/default.nix
@@ -1,24 +1,15 @@
-{ fetchurl, stdenv, pkgconfig, gnome3, ibus, intltool, upower, libcanberra, accountservice
-, libxml2, polkit, libxslt, libgtop, libsoup, colord, colord-gtk, pulseaudio, fontconfig
-, cracklib, python, krb5, networkmanagerapplet, libwacom, samba, libnotify, libxkbfile
-, shared_mime_info, tzdata, icu, libtool, docbook_xsl, docbook_xsl_ns, makeWrapper }:
+{ fetchurl, stdenv, pkgconfig, gnome3, ibus, intltool, upower, makeWrapper
+, libcanberra, accountservice, libpwquality, pulseaudio, fontconfig
+, gdk_pixbuf, hicolor_icon_theme, librsvg, libxkbfile, libnotify
+, libxml2, polkit, libxslt, libgtop, libsoup, colord, colord-gtk
+, cracklib, python, krb5, networkmanagerapplet, networkmanager
+, libwacom, samba, shared_mime_info, tzdata, icu, libtool
+, docbook_xsl, docbook_xsl_ns, modemmanager }:
# http://ftp.gnome.org/pub/GNOME/teams/releng/3.10.2/gnome-suites-core-3.10.2.modules
-# TODO: bluetooth, networkmanager, wacom, smbclient, printers
+# TODO: bluetooth, wacom, smbclient, printers
-let
- libpwquality = stdenv.mkDerivation rec {
- name = "libpwquality-1.2.3";
-
- src = fetchurl {
- url = "https://fedorahosted.org/releases/l/i/libpwquality/${name}.tar.bz2";
- sha256 = "0sjiabvl5277nfxyy96jdz65a0a3pmkkwrfbziwgik83gg77j75i";
- };
-
- buildInputs = [ cracklib python ];
- };
-
-in stdenv.mkDerivation rec {
+stdenv.mkDerivation rec {
name = "gnome-control-center-3.10.2";
src = fetchurl {
@@ -26,12 +17,19 @@ in stdenv.mkDerivation rec {
sha256 = "1ac34kqkf174w0qc12p927dfhcm69xnv7fqzmbhjab56rn49wypn";
};
+ propagatedUserEnvPkgs = [ gnome3.gnome_themes_standard gnome3.libgnomekbd ];
+ propagatedBuildInputs = [ gdk_pixbuf gnome3.gnome_icon_theme librsvg
+ hicolor_icon_theme gnome3.gnome_icon_theme_symbolic ];
+
+ enableParallelBuilding = true;
+
buildInputs = with gnome3;
[ pkgconfig intltool ibus gtk glib upower libcanberra gsettings_desktop_schemas
libxml2 gnome_desktop gnome_settings_daemon polkit libxslt libgtop gnome-menus
gnome_online_accounts libsoup colord pulseaudio fontconfig colord-gtk libpwquality
accountservice krb5 networkmanagerapplet libwacom samba libnotify libxkbfile
- shared_mime_info icu libtool docbook_xsl docbook_xsl_ns makeWrapper ];
+ shared_mime_info icu libtool docbook_xsl docbook_xsl_ns
+ networkmanager modemmanager makeWrapper ];
preBuild = ''
substituteInPlace tz.h --replace "/usr/share/zoneinfo/zone.tab" "${tzdata}/share/zoneinfo/zone.tab"
@@ -42,15 +40,22 @@ in stdenv.mkDerivation rec {
substituteInPlace panels/datetime/test-endianess.c --replace "/usr/share/locale/" "$out/share/locale/"
'';
- postInstall = with gnome3; ''
+ preFixup = with gnome3; ''
wrapProgram $out/bin/gnome-control-center \
- --prefix XDG_DATA_DIRS : "${gsettings_desktop_schemas}/share:${gnome_settings_daemon}/share:${glib}/share:${gtk}/share:${colord}/share:$out/share"
+ --set GDK_PIXBUF_MODULE_FILE "$GDK_PIXBUF_MODULE_FILE" \
+ --prefix XDG_DATA_DIRS : "${gnome3.gnome_themes_standard}/share:${gnome_settings_daemon}/share:${glib}/share:${gtk}/share:${colord}/share:$out/share:$out/share/gnome-control-center:$XDG_ICON_DIRS:$GSETTINGS_SCHEMAS_PATH"
for i in $out/share/applications/*; do
substituteInPlace $i --replace "gnome-control-center" "$out/bin/gnome-control-center"
done
+
+ rm $out/share/icons/hicolor/icon-theme.cache
'';
+ patches = [ ./search_providers_dir.patch ];
+
meta = with stdenv.lib; {
+ description = "Single sign-on framework for GNOME";
+ maintainers = with maintainers; [ lethalman ];
platforms = platforms.linux;
};
diff --git a/pkgs/desktops/gnome-3/core/gnome-control-center/search_providers_dir.patch b/pkgs/desktops/gnome-3/core/gnome-control-center/search_providers_dir.patch
new file mode 100644
index 00000000000..7f5ad970f34
--- /dev/null
+++ b/pkgs/desktops/gnome-3/core/gnome-control-center/search_providers_dir.patch
@@ -0,0 +1,17 @@
+diff --git a/panels/search/cc-search-panel.c b/panels/search/cc-search-panel.c
+index d08e230..3bff4ad 100644
+--- a/panels/search/cc-search-panel.c
++++ b/panels/search/cc-search-panel.c
+@@ -574,7 +574,11 @@ populate_search_providers (CcSearchPanel *self)
+ {
+ GFile *providers_location;
+
+- providers_location = g_file_new_for_path (DATADIR "/gnome-shell/search-providers");
++ const gchar* search_providers_dir = g_getenv ("GNOME_SEARCH_PROVIDERS_DIR");
++ if (search_providers_dir == NULL) {
++ search_providers_dir = DATADIR "/gnome-shell/search-providers";
++ }
++ providers_location = g_file_new_for_path (search_providers_dir);
+ g_file_enumerate_children_async (providers_location,
+ "standard::type,standard::name,standard::content-type",
+ G_FILE_QUERY_INFO_NONE,
diff --git a/pkgs/desktops/gnome-3/core/gnome-dictionary/default.nix b/pkgs/desktops/gnome-3/core/gnome-dictionary/default.nix
new file mode 100644
index 00000000000..6f68916b781
--- /dev/null
+++ b/pkgs/desktops/gnome-3/core/gnome-dictionary/default.nix
@@ -0,0 +1,38 @@
+{ stdenv, intltool, fetchurl
+, pkgconfig, gtk3, glib, hicolor_icon_theme
+, bash, makeWrapper, itstool, libxml2
+, gnome3, librsvg, gdk_pixbuf, file }:
+
+stdenv.mkDerivation rec {
+ name = "gnome-dictionary-3.10.0";
+
+ src = fetchurl {
+ url = "mirror://gnome/sources/gnome-dictionary/3.10/${name}.tar.xz";
+ sha256 = "258b60fe50f7d0580a7dc3bb83f7fe2f6f0597d4013d97ac083c3f062c350ed7";
+ };
+
+ doCheck = true;
+
+ NIX_CFLAGS_COMPILE = "-I${gnome3.glib}/include/gio-unix-2.0";
+
+ propagatedUserEnvPkgs = [ gnome3.gnome_themes_standard ];
+ propagatedBuildInputs = [ gdk_pixbuf gnome3.gnome_icon_theme librsvg
+ hicolor_icon_theme gnome3.gnome_icon_theme_symbolic ];
+
+ buildInputs = [ pkgconfig gtk3 glib intltool itstool libxml2 file
+ gnome3.gsettings_desktop_schemas makeWrapper ];
+
+ preFixup = ''
+ wrapProgram "$out/bin/gnome-dictionary" \
+ --set GDK_PIXBUF_MODULE_FILE "$GDK_PIXBUF_MODULE_FILE" \
+ --prefix XDG_DATA_DIRS : "${gtk3}/share:${gnome3.gnome_themes_standard}/share:$out/share:$XDG_ICON_DIRS:$GSETTINGS_SCHEMAS_PATH"
+ '';
+
+ meta = with stdenv.lib; {
+ homepage = https://wiki.gnome.org/Apps/Dictionary;
+ description = "Dictionary is the GNOME application to look up definitions";
+ maintainers = with maintainers; [ lethalman ];
+ license = licenses.gpl2;
+ platforms = platforms.linux;
+ };
+}
diff --git a/pkgs/desktops/gnome-3/core/gnome-disk-utility/default.nix b/pkgs/desktops/gnome-3/core/gnome-disk-utility/default.nix
new file mode 100644
index 00000000000..334471c2943
--- /dev/null
+++ b/pkgs/desktops/gnome-3/core/gnome-disk-utility/default.nix
@@ -0,0 +1,42 @@
+{ stdenv, intltool, fetchurl, pkgconfig, udisks2, libsecret, libdvdread
+, bash, gtk3, glib, hicolor_icon_theme, makeWrapper, cracklib, libnotify
+, itstool, gnome3, librsvg, gdk_pixbuf, libxml2, python
+, libcanberra_gtk3, libxslt, libtool, docbook_xsl, libpwquality }:
+
+stdenv.mkDerivation rec {
+ name = "gnome-disk-utility-3.10.0";
+
+ src = fetchurl {
+ url = "mirror://gnome/sources/gnome-disk-utility/3.10/${name}.tar.xz";
+ sha256 = "1amqi2bribxn8r8k8mvxh3710rmdll9963smf0v59v0iwxi3mqil";
+ };
+
+ doCheck = true;
+
+ NIX_CFLAGS_COMPILE = "-I${gnome3.glib}/include/gio-unix-2.0";
+
+ propagatedUserEnvPkgs = [ gnome3.gnome_themes_standard ];
+ propagatedBuildInputs = [ gdk_pixbuf gnome3.gnome_icon_theme
+ librsvg udisks2 gnome3.gnome_settings_daemon
+ hicolor_icon_theme gnome3.gnome_icon_theme_symbolic ];
+
+ buildInputs = [ bash pkgconfig gtk3 glib intltool itstool
+ libxslt libtool libsecret libpwquality cracklib
+ libnotify libdvdread libcanberra_gtk3 docbook_xsl
+ gnome3.gsettings_desktop_schemas makeWrapper libxml2 ];
+
+ preFixup = ''
+ wrapProgram "$out/bin/gnome-disks" \
+ --set GDK_PIXBUF_MODULE_FILE "$GDK_PIXBUF_MODULE_FILE" \
+ --prefix XDG_DATA_DIRS : "${gtk3}/share:${gnome3.gnome_themes_standard}/share:$out/share:$XDG_ICON_DIRS:$GSETTINGS_SCHEMAS_PATH"
+ rm $out/share/icons/hicolor/icon-theme.cache
+ '';
+
+ meta = with stdenv.lib; {
+ homepage = http://en.wikipedia.org/wiki/GNOME_Disks;
+ description = "A udisks graphical front-end";
+ maintainers = with maintainers; [ lethalman ];
+ license = licenses.gpl2;
+ platforms = platforms.linux;
+ };
+}
diff --git a/pkgs/desktops/gnome-3/core/gnome-font-viewer/default.nix b/pkgs/desktops/gnome-3/core/gnome-font-viewer/default.nix
new file mode 100644
index 00000000000..cba651ca36a
--- /dev/null
+++ b/pkgs/desktops/gnome-3/core/gnome-font-viewer/default.nix
@@ -0,0 +1,37 @@
+{ stdenv, intltool, fetchurl
+, pkgconfig, gtk3, glib, hicolor_icon_theme
+, bash, makeWrapper, itstool
+, gnome3, librsvg, gdk_pixbuf }:
+
+stdenv.mkDerivation rec {
+ name = "gnome-font-viewer-3.10.0";
+
+ src = fetchurl {
+ url = "mirror://gnome/sources/gnome-font-viewer/3.10/${name}.tar.xz";
+ sha256 = "3928350f58ac6c95f44b64cba1a5f03437b19d9b2645a7b01176067504fdd652";
+ };
+
+ doCheck = true;
+
+ NIX_CFLAGS_COMPILE = "-I${gnome3.glib}/include/gio-unix-2.0";
+
+ propagatedUserEnvPkgs = [ gnome3.gnome_themes_standard ];
+ propagatedBuildInputs = [ gdk_pixbuf gnome3.gnome_icon_theme librsvg
+ hicolor_icon_theme gnome3.gnome_icon_theme_symbolic ];
+
+ buildInputs = [ pkgconfig gtk3 glib intltool itstool gnome3.gnome_desktop
+ gnome3.gsettings_desktop_schemas makeWrapper ];
+
+ preFixup = ''
+ wrapProgram "$out/bin/gnome-font-viewer" \
+ --set GDK_PIXBUF_MODULE_FILE "$GDK_PIXBUF_MODULE_FILE" \
+ --prefix XDG_DATA_DIRS : "${gtk3}/share:${gnome3.gnome_themes_standard}/share:$out/share:$XDG_ICON_DIRS:$GSETTINGS_SCHEMAS_PATH"
+ '';
+
+ meta = with stdenv.lib; {
+ description = "Program that can preview fonts and create thumbnails for fonts";
+ maintainers = with maintainers; [ lethalman ];
+ license = licenses.gpl2;
+ platforms = platforms.linux;
+ };
+}
diff --git a/pkgs/desktops/gnome-3/core/gnome-keyring/default.nix b/pkgs/desktops/gnome-3/core/gnome-keyring/default.nix
index b557e210645..dbb8da93c6c 100644
--- a/pkgs/desktops/gnome-3/core/gnome-keyring/default.nix
+++ b/pkgs/desktops/gnome-3/core/gnome-keyring/default.nix
@@ -25,11 +25,11 @@ stdenv.mkDerivation rec {
"--with-pkcs11-modules=$$out/lib/pkcs11/"
];
- postInstall = ''
+ preFixup = ''
wrapProgram "$out/bin/gnome-keyring" \
- --prefix XDG_DATA_DIRS : "${glib}/share:$out/share"
+ --prefix XDG_DATA_DIRS : "${glib}/share:$out/share:$GSETTINGS_SCHEMAS_PATH"
wrapProgram "$out/bin/gnome-keyring-daemon" \
- --prefix XDG_DATA_DIRS : "${glib}/share:$out/share"
+ --prefix XDG_DATA_DIRS : "${glib}/share:$out/share:$GSETTINGS_SCHEMAS_PATH"
'';
meta = with stdenv.lib; {
diff --git a/pkgs/desktops/gnome-3/core/gnome-online-accounts/default.nix b/pkgs/desktops/gnome-3/core/gnome-online-accounts/default.nix
index c17b3ba3eb6..8c459435733 100644
--- a/pkgs/desktops/gnome-3/core/gnome-online-accounts/default.nix
+++ b/pkgs/desktops/gnome-3/core/gnome-online-accounts/default.nix
@@ -12,6 +12,8 @@ stdenv.mkDerivation rec {
NIX_CFLAGS_COMPILE = "-I${dbus_glib}/include/dbus-1.0 -I${dbus_libs}/include/dbus-1.0";
+ enableParallelBuilding = true;
+
buildInputs = [ pkgconfig glib libxslt gtk webkitgtk json_glib rest libsecret dbus_glib telepathy_glib intltool icu libsoup docbook_xsl_ns docbook_xsl];
meta = with stdenv.lib; {
diff --git a/pkgs/desktops/gnome-3/core/gnome-screenshot/default.nix b/pkgs/desktops/gnome-3/core/gnome-screenshot/default.nix
new file mode 100644
index 00000000000..7b94d0f9027
--- /dev/null
+++ b/pkgs/desktops/gnome-3/core/gnome-screenshot/default.nix
@@ -0,0 +1,37 @@
+{ stdenv, intltool, fetchurl, pkgconfig, libcanberra_gtk3
+, bash, gtk3, glib, hicolor_icon_theme, makeWrapper
+, itstool, gnome3, librsvg, gdk_pixbuf }:
+
+stdenv.mkDerivation rec {
+ name = "gnome-screenshot-3.10.0";
+
+ src = fetchurl {
+ url = "mirror://gnome/sources/gnome-screenshot/3.10/${name}.tar.xz";
+ sha256 = "1nb56kzcj5z4hmrmxap5r53smi52ki3pc8qmhi4rymkgqswyk7bh";
+ };
+
+ doCheck = true;
+
+ NIX_CFLAGS_COMPILE = "-I${gnome3.glib}/include/gio-unix-2.0";
+
+ propagatedUserEnvPkgs = [ gnome3.gnome_themes_standard ];
+ propagatedBuildInputs = [ gdk_pixbuf gnome3.gnome_icon_theme librsvg
+ hicolor_icon_theme gnome3.gnome_icon_theme_symbolic ];
+
+ buildInputs = [ bash pkgconfig gtk3 glib intltool itstool libcanberra_gtk3
+ gnome3.gsettings_desktop_schemas makeWrapper ];
+
+ preFixup = ''
+ wrapProgram "$out/bin/gnome-screenshot" \
+ --set GDK_PIXBUF_MODULE_FILE "$GDK_PIXBUF_MODULE_FILE" \
+ --prefix XDG_DATA_DIRS : "${gtk3}/share:${gnome3.gnome_themes_standard}/share:$out/share:$XDG_ICON_DIRS:$GSETTINGS_SCHEMAS_PATH"
+ '';
+
+ meta = with stdenv.lib; {
+ homepage = http://en.wikipedia.org/wiki/GNOME_Screenshot;
+ description = "Utility used in the GNOME desktop environment for taking screenshots";
+ maintainers = with maintainers; [ lethalman ];
+ license = licenses.gpl2;
+ platforms = platforms.linux;
+ };
+}
diff --git a/pkgs/desktops/gnome-3/core/gnome-session/default.nix b/pkgs/desktops/gnome-3/core/gnome-session/default.nix
index 804a0c54a41..f999702af54 100644
--- a/pkgs/desktops/gnome-3/core/gnome-session/default.nix
+++ b/pkgs/desktops/gnome-3/core/gnome-session/default.nix
@@ -14,12 +14,13 @@ stdenv.mkDerivation rec {
buildInputs = with gnome3;
[ pkgconfig glib gnome_desktop gtk dbus_glib json_glib libxslt
+ gnome3.gnome_settings_daemon
gsettings_desktop_schemas upower intltool gconf makeWrapper systemd ];
- postInstall = ''
+ preFixup = ''
wrapProgram "$out/bin/gnome-session" \
--prefix GI_TYPELIB_PATH : "$GI_TYPELIB_PATH" \
- --prefix XDG_DATA_DIRS : "${gnome3.gsettings_desktop_schemas}/share:$out/share"
+ --prefix XDG_DATA_DIRS : "$out/share:$GSETTINGS_SCHEMAS_PATH"
'';
meta = with stdenv.lib; {
diff --git a/pkgs/desktops/gnome-3/core/gnome-settings-daemon/default.nix b/pkgs/desktops/gnome-3/core/gnome-settings-daemon/default.nix
index 668a53d2bf8..7a50b8db56f 100644
--- a/pkgs/desktops/gnome-3/core/gnome-settings-daemon/default.nix
+++ b/pkgs/desktops/gnome-3/core/gnome-settings-daemon/default.nix
@@ -20,11 +20,11 @@ stdenv.mkDerivation rec {
polkit geocode_glib geoclue2 librsvg xf86_input_wacom udev libwacom libxslt
libtool docbook_xsl docbook_xsl_ns makeWrapper gnome_themes_standard ];
- postInstall = ''
+ preFixup = ''
wrapProgram "$out/libexec/gnome-settings-daemon-localeexec" \
--prefix GI_TYPELIB_PATH : "$GI_TYPELIB_PATH" \
--prefix PATH : "${glib}/bin" \
- --prefix XDG_DATA_DIRS : "${gnome3.gtk}/share:${gnome3.gsettings_desktop_schemas}/share:$out/share"
+ --prefix XDG_DATA_DIRS : "${gnome3.gtk}/share:$out/share:$GSETTINGS_SCHEMAS_PATH"
'';
meta = with stdenv.lib; {
diff --git a/pkgs/desktops/gnome-3/core/gnome-shell-extensions/default.nix b/pkgs/desktops/gnome-3/core/gnome-shell-extensions/default.nix
new file mode 100644
index 00000000000..00974edb1db
--- /dev/null
+++ b/pkgs/desktops/gnome-3/core/gnome-shell-extensions/default.nix
@@ -0,0 +1,26 @@
+{ stdenv, intltool, fetchurl, libgtop
+, pkgconfig, gtk3, glib, hicolor_icon_theme
+, bash, makeWrapper, itstool
+, gnome3, file }:
+
+stdenv.mkDerivation rec {
+ name = "gnome-shell-extensions-3.10.1";
+
+ src = fetchurl {
+ url = "mirror://gnome/sources/gnome-shell-extensions/3.10/${name}.tar.xz";
+ sha256 = "9baa9ddaf4e14cab6d4d7944d8dc009378b25f995acfd0fd72843f599cb5ae43";
+ };
+
+ doCheck = true;
+
+ buildInputs = [ pkgconfig gtk3 glib libgtop intltool itstool
+ makeWrapper file ];
+
+ meta = with stdenv.lib; {
+ homepage = https://wiki.gnome.org/Projects/GnomeShell/Extensions;
+ description = "Modify and extend GNOME Shell functionality and behavior";
+ maintainers = with maintainers; [ lethalman ];
+ license = licenses.gpl2;
+ platforms = platforms.linux;
+ };
+}
diff --git a/pkgs/desktops/gnome-3/core/gnome-shell/default.nix b/pkgs/desktops/gnome-3/core/gnome-shell/default.nix
index 59f62b6948d..554b09a1e59 100644
--- a/pkgs/desktops/gnome-3/core/gnome-shell/default.nix
+++ b/pkgs/desktops/gnome-3/core/gnome-shell/default.nix
@@ -1,6 +1,6 @@
{ fetchurl, stdenv, pkgconfig, gnome3, json_glib, libcroco, intltool, libsecret
, python, libsoup, polkit, clutter, networkmanager, docbook_xsl, docbook_xsl_ns
-, libstartup_notification, telepathy_glib, telepathy_logger, libXtst, p11_kit
+, libstartup_notification, telepathy_glib, telepathy_logger, libXtst, p11_kit, unzip
, pulseaudio, libical, libtool, nss, gobjectIntrospection, gstreamer, makeWrapper
, accountservice, gdk_pixbuf, gdm, upower, ibus, networkmanagerapplet, librsvg }:
@@ -20,26 +20,27 @@ stdenv.mkDerivation rec {
clutter networkmanager libstartup_notification telepathy_glib docbook_xsl docbook_xsl_ns
libXtst p11_kit networkmanagerapplet gjs mutter pulseaudio caribou evolution_data_server
libical libtool nss gobjectIntrospection gtk gstreamer makeWrapper gdm gnome_control_center
- at_spi2_core upower ibus gnome_session gnome_desktop telepathy_logger ];
-
- configureFlags = "--disable-static";
+ at_spi2_core upower ibus gnome_session gnome_desktop telepathy_logger gnome3.gnome_settings_daemon ];
preBuild = ''
patchShebangs src/data-to-c.pl
substituteInPlace data/Makefile --replace " install-keysDATA" ""
'';
- postInstall = with gnome3; ''
+ preFixup = with gnome3; ''
wrapProgram "$out/bin/gnome-shell" \
+ --prefix PATH : "${unzip}/bin" \
--prefix GI_TYPELIB_PATH : "$GI_TYPELIB_PATH" \
--prefix LD_LIBRARY_PATH : "${accountservice}/lib:${ibus}/lib:${gdm}/lib" \
--set GDK_PIXBUF_MODULE_FILE "$GDK_PIXBUF_MODULE_FILE" \
- --prefix XDG_DATA_DIRS : "${gnome-menus}:/share:${ibus}/share:${gnome_settings_daemon}/share:${gnome_control_center}/share:${gdm}/share:${glib}/share:${gnome_themes_standard}/share:${mutter}/share:${gnome_icon_theme}/share:${gsettings_desktop_schemas}/share:${gtk}/share:$out/share"
+ --prefix XDG_DATA_DIRS : "${gnome_themes_standard}/share:${gtk}/share:$out/share:$XDG_ICON_DIRS:$GSETTINGS_SCHEMAS_PATH"
wrapProgram "$out/libexec/gnome-shell-calendar-server" \
- --prefix XDG_DATA_DIRS : "${evolution_data_server}/share:$out/share"
+ --prefix XDG_DATA_DIRS : "${evolution_data_server}/share:$out/share:$XDG_ICON_DIRS:$GSETTINGS_SCHEMAS_PATH"
'';
+ patches = [ ./fix_background_corruption.patch ];
+
meta = with stdenv.lib; {
platforms = platforms.linux;
};
diff --git a/pkgs/desktops/gnome-3/core/gnome-shell/fix_background_corruption.patch b/pkgs/desktops/gnome-3/core/gnome-shell/fix_background_corruption.patch
new file mode 100644
index 00000000000..9cb041bcce2
--- /dev/null
+++ b/pkgs/desktops/gnome-3/core/gnome-shell/fix_background_corruption.patch
@@ -0,0 +1,147 @@
+commit 831bd07b0d6b7055fea8317f2cdf8fd4a408c36d
+Author: Jasper St. Pierre
+Date: Thu Nov 7 17:14:47 2013 -0500
+
+ layout: Fix several issues with the background management code
+
+ If monitor-changed fires at startup, it will destroy all of the
+ backgrounds, but since this._isStartup is true, won't recreate any
+ of them. Additionally, since _bgManagers is indexed by monitor index,
+ if the primary index is not 0, it could become a sparse array (e.g.
+ [undefined, undefined, primaryBackground]), and our for loop will
+ crash trying to access properties of undefined.
+
+ Fix both of these issues by always creating background managers for
+ every monitor, hiding them on startup but only showing them after
+ the startup animation is complete.
+
+ One thing we need to watch out for is that while LayoutManager is
+ constructing, Main.uiGroup / Main.layoutManager will be undefined,
+ so addBackgroundMenu will fail. Fix this by passing down the uiGroup
+ to the background menu code.
+
+ https://bugzilla.gnome.org/show_bug.cgi?id=709313
+
+diff --git a/js/ui/backgroundMenu.js b/js/ui/backgroundMenu.js
+index 06e698c..dcbbb39 100644
+--- a/js/ui/backgroundMenu.js
++++ b/js/ui/backgroundMenu.js
+@@ -13,7 +13,7 @@ const BackgroundMenu = new Lang.Class({
+ Name: 'BackgroundMenu',
+ Extends: PopupMenu.PopupMenu,
+
+- _init: function(source) {
++ _init: function(source, layoutManager) {
+ this.parent(source, 0, St.Side.TOP);
+
+ this.addSettingsAction(_("Settings"), 'gnome-control-center.desktop');
+@@ -22,17 +22,17 @@ const BackgroundMenu = new Lang.Class({
+
+ this.actor.add_style_class_name('background-menu');
+
+- Main.uiGroup.add_actor(this.actor);
++ layoutManager.uiGroup.add_actor(this.actor);
+ this.actor.hide();
+ }
+ });
+
+-function addBackgroundMenu(actor) {
++function addBackgroundMenu(actor, layoutManager) {
+ let cursor = new St.Bin({ opacity: 0 });
+- Main.uiGroup.add_actor(cursor);
++ layoutManager.uiGroup.add_actor(cursor);
+
+ actor.reactive = true;
+- actor._backgroundMenu = new BackgroundMenu(cursor);
++ actor._backgroundMenu = new BackgroundMenu(cursor, layoutManager);
+ actor._backgroundManager = new PopupMenu.PopupMenuManager({ actor: actor });
+ actor._backgroundManager.addMenu(actor._backgroundMenu);
+
+diff --git a/js/ui/layout.js b/js/ui/layout.js
+index 17073a6..80bae9d 100644
+--- a/js/ui/layout.js
++++ b/js/ui/layout.js
+@@ -352,26 +352,26 @@ const LayoutManager = new Lang.Class({
+ this.emit('hot-corners-changed');
+ },
+
+- _createBackground: function(monitorIndex) {
++ _addBackgroundMenu: function(bgManager) {
++ BackgroundMenu.addBackgroundMenu(bgManager.background.actor, this);
++ },
++
++ _createBackgroundManager: function(monitorIndex) {
+ let bgManager = new Background.BackgroundManager({ container: this._backgroundGroup,
+ layoutManager: this,
+ monitorIndex: monitorIndex });
+- BackgroundMenu.addBackgroundMenu(bgManager.background.actor);
+-
+- bgManager.connect('changed', Lang.bind(this, function() {
+- BackgroundMenu.addBackgroundMenu(bgManager.background.actor);
+- }));
+
+- this._bgManagers[monitorIndex] = bgManager;
++ bgManager.connect('changed', Lang.bind(this, this._addBackgroundMenu));
++ this._addBackgroundMenu(bgManager);
+
+- return bgManager.background;
++ return bgManager;
+ },
+
+- _createSecondaryBackgrounds: function() {
++ _showSecondaryBackgrounds: function() {
+ for (let i = 0; i < this.monitors.length; i++) {
+ if (i != this.primaryIndex) {
+- let background = this._createBackground(i);
+-
++ let background = this._bgManagers[i].background;
++ background.actor.show();
+ background.actor.opacity = 0;
+ Tweener.addTween(background.actor,
+ { opacity: 255,
+@@ -381,10 +381,6 @@ const LayoutManager = new Lang.Class({
+ }
+ },
+
+- _createPrimaryBackground: function() {
+- this._createBackground(this.primaryIndex);
+- },
+-
+ _updateBackgrounds: function() {
+ let i;
+ for (i = 0; i < this._bgManagers.length; i++)
+@@ -395,11 +391,12 @@ const LayoutManager = new Lang.Class({
+ if (Main.sessionMode.isGreeter)
+ return;
+
+- if (this._startingUp)
+- return;
+-
+ for (let i = 0; i < this.monitors.length; i++) {
+- this._createBackground(i);
++ let bgManager = this._createBackgroundManager(i);
++ this._bgManagers.push(bgManager);
++
++ if (i != this.primaryIndex && this._startingUp)
++ bgManager.background.actor.hide();
+ }
+ },
+
+@@ -595,7 +592,7 @@ const LayoutManager = new Lang.Class({
+ if (Main.sessionMode.isGreeter) {
+ this.panelBox.translation_y = -this.panelBox.height;
+ } else {
+- this._createPrimaryBackground();
++ this._updateBackgrounds();
+
+ // We need to force an update of the regions now before we scale
+ // the UI group to get the coorect allocation for the struts.
+@@ -673,7 +670,7 @@ const LayoutManager = new Lang.Class({
+ this.keyboardBox.show();
+
+ if (!Main.sessionMode.isGreeter) {
+- this._createSecondaryBackgrounds();
++ this._showSecondaryBackgrounds();
+ global.window_group.remove_clip();
+ }
+
diff --git a/pkgs/desktops/gnome-3/core/gnome-system-log/default.nix b/pkgs/desktops/gnome-3/core/gnome-system-log/default.nix
new file mode 100644
index 00000000000..cdc4b732b97
--- /dev/null
+++ b/pkgs/desktops/gnome-3/core/gnome-system-log/default.nix
@@ -0,0 +1,38 @@
+{ stdenv, intltool, fetchurl, pkgconfig
+, bash, gtk3, glib, hicolor_icon_theme, makeWrapper
+, itstool, gnome3, librsvg, gdk_pixbuf, libxml2 }:
+
+stdenv.mkDerivation rec {
+ name = "gnome-system-log-3.9.90";
+
+ src = fetchurl {
+ url = "mirror://gnome/sources/gnome-system-log/3.9/${name}.tar.xz";
+ sha256 = "9eeb51982d347aa7b33703031e2c1d8084201374665425cd62199649b29a5411";
+ };
+
+ doCheck = true;
+
+ NIX_CFLAGS_COMPILE = "-I${gnome3.glib}/include/gio-unix-2.0";
+
+ propagatedUserEnvPkgs = [ gnome3.gnome_themes_standard ];
+ propagatedBuildInputs = [ gdk_pixbuf gnome3.gnome_icon_theme librsvg
+ hicolor_icon_theme gnome3.gnome_icon_theme_symbolic ];
+
+ buildInputs = [ bash pkgconfig gtk3 glib intltool itstool
+ gnome3.gsettings_desktop_schemas makeWrapper libxml2 ];
+
+ preFixup = ''
+ wrapProgram "$out/bin/gnome-system-log" \
+ --set GDK_PIXBUF_MODULE_FILE "$GDK_PIXBUF_MODULE_FILE" \
+ --prefix XDG_DATA_DIRS : "${gtk3}/share:${gnome3.gnome_themes_standard}/share:$out/share:$XDG_ICON_DIRS:$GSETTINGS_SCHEMAS_PATH"
+ rm $out/share/icons/hicolor/icon-theme.cache
+ '';
+
+ meta = with stdenv.lib; {
+ homepage = https://help.gnome.org/users/gnome-system-log/3.9/;
+ description = "Graphical, menu-driven viewer that you can use to view and monitor your system logs";
+ maintainers = with maintainers; [ lethalman ];
+ license = licenses.gpl2;
+ platforms = platforms.linux;
+ };
+}
diff --git a/pkgs/desktops/gnome-3/core/gnome-system-monitor/default.nix b/pkgs/desktops/gnome-3/core/gnome-system-monitor/default.nix
new file mode 100644
index 00000000000..91fbe67957f
--- /dev/null
+++ b/pkgs/desktops/gnome-3/core/gnome-system-monitor/default.nix
@@ -0,0 +1,38 @@
+{ stdenv, intltool, fetchurl, pkgconfig, gtkmm3, libxml2
+, bash, gtk3, glib, hicolor_icon_theme, makeWrapper
+, itstool, gnome3, librsvg, gdk_pixbuf, libgtop }:
+
+stdenv.mkDerivation rec {
+ name = "gnome-system-monitor-3.10.2";
+
+ src = fetchurl {
+ url = "mirror://gnome/sources/gnome-system-monitor/3.10/${name}.tar.xz";
+ sha256 = "bd009e15672afe4ad3ebd7ed286cce79b9f76420fd39bc77a5826b29134b9db0";
+ };
+
+ doCheck = true;
+
+ propagatedUserEnvPkgs = [ gnome3.gnome_themes_standard ];
+ propagatedBuildInputs = [ gdk_pixbuf gnome3.gnome_icon_theme librsvg
+ hicolor_icon_theme gnome3.gnome_icon_theme_symbolic ];
+
+ buildInputs = [ bash pkgconfig gtk3 glib intltool itstool libxml2
+ gtkmm3 libgtop makeWrapper
+ gnome3.gsettings_desktop_schemas ];
+
+ preFixup = ''
+ wrapProgram "$out/bin/gnome-system-monitor" \
+ --set GDK_PIXBUF_MODULE_FILE "$GDK_PIXBUF_MODULE_FILE" \
+ --prefix XDG_DATA_DIRS : "${gtk3}/share:${gnome3.gnome_themes_standard}/share:$out/share:$XDG_ICON_DIRS:$GSETTINGS_SCHEMAS_PATH"
+ '';
+
+ enableParallelBuilding = true;
+
+ meta = with stdenv.lib; {
+ homepage = https://help.gnome.org/users/gnome-system-monitor/3.10/;
+ description = "System Monitor shows you what programs are running and how much processor time, memory, and disk space are being used";
+ maintainers = with maintainers; [ lethalman ];
+ license = licenses.gpl2;
+ platforms = platforms.linux;
+ };
+}
diff --git a/pkgs/desktops/gnome-3/core/gnome-terminal/default.nix b/pkgs/desktops/gnome-3/core/gnome-terminal/default.nix
index 31ee53e9713..541db5720db 100644
--- a/pkgs/desktops/gnome-3/core/gnome-terminal/default.nix
+++ b/pkgs/desktops/gnome-3/core/gnome-terminal/default.nix
@@ -19,12 +19,12 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ pkgconfig intltool gnome_doc_utils which libuuid libxml2 desktop_file_utils ];
- postInstall = ''
- wrapProgram "$out/libexec/gnome-terminal-server" \
- --prefix XDG_DATA_DIRS : "${gnome3.gsettings_desktop_schemas}/share:$out/share"
+ preFixup = ''
+ for f in "$out/libexec/gnome-terminal-migration" "$out/libexec/gnome-terminal-server"; do
+ wrapProgram "$f" --prefix XDG_DATA_DIRS : "$out/share:$GSETTINGS_SCHEMAS_PATH"
+ done
'';
-
meta = with stdenv.lib; {
platforms = platforms.linux;
};
diff --git a/pkgs/desktops/gnome-3/core/gnome-user-docs/default.nix b/pkgs/desktops/gnome-3/core/gnome-user-docs/default.nix
new file mode 100644
index 00000000000..d66863a2218
--- /dev/null
+++ b/pkgs/desktops/gnome-3/core/gnome-user-docs/default.nix
@@ -0,0 +1,20 @@
+{ stdenv, fetchurl, pkgconfig, file, gnome3, itstool, libxml2, intltool }:
+
+stdenv.mkDerivation rec {
+ name = "gnome-user-docs-3.10.3";
+
+ src = fetchurl {
+ url = "mirror://gnome/sources/gnome-user-docs/3.10/${name}.tar.xz";
+ sha256 = "960b6373ea52e41e3deb3501930e024005b29d2cc958bfadc87450a291d2a905";
+ };
+
+ buildInputs = [ pkgconfig gnome3.yelp itstool libxml2 intltool ];
+
+ meta = with stdenv.lib; {
+ homepage = https://help.gnome.org/users/gnome-help/3.10;
+ description = "User and system administration help for the Gnome desktop";
+ maintainers = with maintainers; [ lethalman ];
+ license = licenses.cc-by-30;
+ platforms = platforms.linux;
+ };
+}
diff --git a/pkgs/desktops/gnome-3/core/gnome-user-share/default.nix b/pkgs/desktops/gnome-3/core/gnome-user-share/default.nix
new file mode 100644
index 00000000000..976b0eaca45
--- /dev/null
+++ b/pkgs/desktops/gnome-3/core/gnome-user-share/default.nix
@@ -0,0 +1,52 @@
+{ stdenv, intltool, fetchurl, apacheHttpd_2_2, nautilus
+, pkgconfig, gtk3, glib, hicolor_icon_theme, libxml2, gnused
+, bash, makeWrapper, itstool, libnotify, libtool, mod_dnssd
+, gnome3, librsvg, gdk_pixbuf, file, libcanberra_gtk3 }:
+
+stdenv.mkDerivation rec {
+ name = "gnome-user-share-3.10.2";
+
+ src = fetchurl {
+ url = "mirror://gnome/sources/gnome-user-share/3.10/${name}.tar.xz";
+ sha256 = "1d1ea57a49224c36e7cba04f80265e835639377f474a7582c9e8ac946eda0f8f";
+ };
+
+ doCheck = true;
+
+ NIX_CFLAGS_COMPILE = "-I${gnome3.glib}/include/gio-unix-2.0";
+
+ preConfigure = ''
+ sed -e 's,^LoadModule dnssd_module.\+,LoadModule dnssd_module ${mod_dnssd}/modules/mod_dnssd.so,' -i data/dav_user_2.2.conf
+ '';
+
+ configureFlags = [ "--with-httpd=${apacheHttpd_2_2}/bin/httpd"
+ "--with-modules-path=${apacheHttpd_2_2}/modules"
+ "--disable-bluetooth"
+ "--with-nautilusdir=$(out)/lib/nautilus/extensions-3.0" ];
+
+ buildInputs = [ pkgconfig gtk3 glib intltool itstool libxml2 libtool
+ makeWrapper file gdk_pixbuf gnome3.gnome_icon_theme librsvg
+ hicolor_icon_theme gnome3.gnome_icon_theme_symbolic
+ nautilus libnotify libcanberra_gtk3 ];
+
+ postInstall = ''
+ mkdir -p $out/share/gsettings-schemas/$name
+ mv $out/share/glib-2.0 $out/share/gsettings-schemas/$name
+ ${glib}/bin/glib-compile-schemas $out/share/gsettings-schemas/$name/glib-2.0/schemas
+ '';
+
+ preFixup = ''
+ wrapProgram "$out/libexec/gnome-user-share" \
+ --set GDK_PIXBUF_MODULE_FILE "$GDK_PIXBUF_MODULE_FILE" \
+ --prefix XDG_DATA_DIRS : "$out/share:$XDG_ICON_DIRS:$GSETTINGS_SCHEMAS_PATH"
+ rm $out/share/icons/hicolor/icon-theme.cache
+ '';
+
+ meta = with stdenv.lib; {
+ homepage = https://help.gnome.org/users/gnome-user-share/3.8;
+ description = "Service that exports the contents of the Public folder in your home directory on the local network";
+ maintainers = with maintainers; [ lethalman ];
+ license = licenses.gpl2;
+ platforms = platforms.linux;
+ };
+}
diff --git a/pkgs/desktops/gnome-3/core/grilo/default.nix b/pkgs/desktops/gnome-3/core/grilo/default.nix
new file mode 100644
index 00000000000..2a7f270300a
--- /dev/null
+++ b/pkgs/desktops/gnome-3/core/grilo/default.nix
@@ -0,0 +1,22 @@
+{ stdenv, fetchurl, pkgconfig, file, intltool, glib, libxml2, gnome3 }:
+
+stdenv.mkDerivation rec {
+ name = "grilo-0.2.10";
+
+ src = fetchurl {
+ url = "mirror://gnome/sources/grilo/0.2/${name}.tar.xz";
+ sha256 = "559a2470fe541b0090bcfdfac7a33e92dba967727bbab6d0eca70e5636a77b25";
+ };
+
+ configureFlags = [ "--enable-grl-pls" ];
+
+ buildInputs = [ pkgconfig file intltool glib libxml2 gnome3.totem-pl-parser ];
+
+ meta = with stdenv.lib; {
+ homepage = https://wiki.gnome.org/action/show/Projects/Grilo;
+ description = "Framework that provides access to various sources of multimedia content, using a pluggable system";
+ maintainers = with maintainers; [ lethalman ];
+ license = licenses.lgpl2;
+ platforms = platforms.linux;
+ };
+}
diff --git a/pkgs/desktops/gnome-3/core/gucharmap/default.nix b/pkgs/desktops/gnome-3/core/gucharmap/default.nix
index bf630e1947d..a6bf72b2fc7 100644
--- a/pkgs/desktops/gnome-3/core/gucharmap/default.nix
+++ b/pkgs/desktops/gnome-3/core/gucharmap/default.nix
@@ -25,11 +25,9 @@ stdenv.mkDerivation rec {
gnome3.yelp_tools libxml2 file desktop_file_utils
gnome3.gsettings_desktop_schemas makeWrapper ];
- installFlags = "gsettingsschemadir=\${out}/share/${name}/glib-2.0/schemas/";
-
- postInstall = ''
+ preFixup = ''
wrapProgram "$out/bin/gucharmap" \
- --prefix XDG_DATA_DIRS : "${gtk3}/share:${gnome3.gnome_themes_standard}/share:${gnome3.gsettings_desktop_schemas}/share:$out/share:$out/share/${name}"
+ --prefix XDG_DATA_DIRS : "${gtk3}/share:${gnome3.gnome_themes_standard}/share:$out/share:$GSETTINGS_SCHEMAS_PATH"
'';
meta = with stdenv.lib; {
diff --git a/pkgs/desktops/gnome-3/core/libgnomekbd/default.nix b/pkgs/desktops/gnome-3/core/libgnomekbd/default.nix
new file mode 100644
index 00000000000..1156474e5a7
--- /dev/null
+++ b/pkgs/desktops/gnome-3/core/libgnomekbd/default.nix
@@ -0,0 +1,24 @@
+{ stdenv, fetchurl, pkgconfig, file, intltool, glib, gtk3, libxklavier, makeWrapper }:
+
+stdenv.mkDerivation rec {
+ name = "libgnomekbd-3.6.0";
+
+ src = fetchurl {
+ url = "mirror://gnome/sources/libgnomekbd/3.6/${name}.tar.xz";
+ sha256 = "c41ea5b0f64da470925ba09f9f1b46b26b82d4e433e594b2c71eab3da8856a09";
+ };
+
+ buildInputs = [ pkgconfig file intltool glib gtk3 libxklavier makeWrapper ];
+
+ preFixup = ''
+ wrapProgram $out/bin/gkbd-keyboard-display \
+ --prefix XDG_DATA_DIRS : "$GSETTINGS_SCHEMAS_PATH"
+ '';
+
+ meta = with stdenv.lib; {
+ description = "Keyboard management library";
+ maintainers = with maintainers; [ lethalman ];
+ license = licenses.gpl2;
+ platforms = platforms.linux;
+ };
+}
diff --git a/pkgs/desktops/gnome-3/core/mutter/default.nix b/pkgs/desktops/gnome-3/core/mutter/default.nix
index e6454aa8e5d..0acfa9f36ae 100644
--- a/pkgs/desktops/gnome-3/core/mutter/default.nix
+++ b/pkgs/desktops/gnome-3/core/mutter/default.nix
@@ -1,6 +1,6 @@
{ fetchurl, stdenv, pkgconfig, gnome3, intltool, gobjectIntrospection, upower, cairo
, pango, cogl, clutter, libstartup_notification, libcanberra, zenity, libcanberra_gtk3
-, libtool }:
+, libtool, makeWrapper }:
stdenv.mkDerivation rec {
@@ -19,7 +19,12 @@ stdenv.mkDerivation rec {
buildInputs = with gnome3;
[ pkgconfig intltool glib gobjectIntrospection gtk gsettings_desktop_schemas upower
gnome_desktop cairo pango cogl clutter zenity libstartup_notification libcanberra
- libcanberra_gtk3 zenity libtool ];
+ libcanberra_gtk3 zenity libtool makeWrapper ];
+
+ preFixup = ''
+ wrapProgram "$out/bin/mutter" \
+ --prefix XDG_DATA_DIRS : "$GSETTINGS_SCHEMAS_PATH"
+ '';
meta = with stdenv.lib; {
platforms = platforms.linux;
diff --git a/pkgs/desktops/gnome-3/core/nautilus/default.nix b/pkgs/desktops/gnome-3/core/nautilus/default.nix
index 091e48626ae..2041a71a82c 100644
--- a/pkgs/desktops/gnome-3/core/nautilus/default.nix
+++ b/pkgs/desktops/gnome-3/core/nautilus/default.nix
@@ -15,11 +15,11 @@ stdenv.mkDerivation rec {
buildInputs = [ pkgconfig libxml2 dbus_glib shared_mime_info libexif gtk libunique intltool exempi librsvg
gnome3.gnome_desktop gnome3.gnome_icon_theme gnome3.gnome_icon_theme_symbolic gnome3.gsettings_desktop_schemas libnotify makeWrapper ];
- postInstall = ''
+ preFixup = ''
wrapProgram "$out/bin/nautilus" \
--prefix GI_TYPELIB_PATH : "$GI_TYPELIB_PATH" \
--set GDK_PIXBUF_MODULE_FILE "$GDK_PIXBUF_MODULE_FILE" \
- --prefix XDG_DATA_DIRS : "$XDG_ICON_DIRS:${gtk}/share:${gnome3.gnome_icon_theme}:${gnome3.gsettings_desktop_schemas}/share:$out/share"
+ --prefix XDG_DATA_DIRS : "$XDG_ICON_DIRS:${gtk}/share:${gnome3.gnome_icon_theme}:${gnome3.gsettings_desktop_schemas}/share:$out/share:$GSETTINGS_SCHEMAS_PATH"
'';
meta = with stdenv.lib; {
diff --git a/pkgs/desktops/gnome-3/core/sushi/default.nix b/pkgs/desktops/gnome-3/core/sushi/default.nix
new file mode 100644
index 00000000000..089b5cd03c1
--- /dev/null
+++ b/pkgs/desktops/gnome-3/core/sushi/default.nix
@@ -0,0 +1,38 @@
+{ stdenv, fetchurl, pkgconfig, file, intltool, gobjectIntrospection, glib
+, clutter_gtk, clutter-gst, gnome3, gtksourceview, libmusicbrainz
+, webkitgtk, libmusicbrainz5, icu, makeWrapper, gst_all_1
+, gdk_pixbuf, librsvg, hicolor_icon_theme }:
+
+stdenv.mkDerivation rec {
+ name = "sushi-3.10.0";
+
+ src = fetchurl {
+ url = "mirror://gnome/sources/sushi/3.10/${name}.tar.xz";
+ sha256 = "cffcf28b170f5825e84983a979972d4d901a453b61cbe3e560d362e8dd4b4bc8";
+ };
+
+ propagatedUserEnvPkgs = [ gst_all_1.gstreamer gst_all_1.gst-plugins-base gst_all_1.gst-plugins-good ];
+
+ buildInputs = [ pkgconfig file intltool gobjectIntrospection glib
+ clutter_gtk clutter-gst gnome3.gjs gtksourceview gdk_pixbuf librsvg
+ gnome3.gnome_icon_theme hicolor_icon_theme gnome3.gnome_icon_theme_symbolic
+ libmusicbrainz5 webkitgtk gnome3.evince icu makeWrapper ];
+
+ enableParallelBuilding = true;
+
+ preFixup = ''
+ wrapProgram $out/libexec/sushi-start \
+ --set GDK_PIXBUF_MODULE_FILE "$GDK_PIXBUF_MODULE_FILE" \
+ --prefix GI_TYPELIB_PATH : "$GI_TYPELIB_PATH" \
+ --prefix GST_PLUGIN_SYSTEM_PATH_1_0 : "$GST_PLUGIN_SYSTEM_PATH_1_0" \
+ --prefix XDG_DATA_DIRS : "$XDG_ICON_DIRS:$GSETTINGS_SCHEMAS_PATH"
+ '';
+
+ meta = with stdenv.lib; {
+ homepage = "http://en.wikipedia.org/wiki/Sushi_(software)";
+ description = "A quick previewer for Nautilus";
+ maintainers = with maintainers; [ lethalman ];
+ license = licenses.gpl2Plus;
+ platforms = platforms.linux;
+ };
+}
diff --git a/pkgs/desktops/gnome-3/core/totem-pl-parser/default.nix b/pkgs/desktops/gnome-3/core/totem-pl-parser/default.nix
new file mode 100644
index 00000000000..f1b3bfe53c1
--- /dev/null
+++ b/pkgs/desktops/gnome-3/core/totem-pl-parser/default.nix
@@ -0,0 +1,20 @@
+{ stdenv, fetchurl, pkgconfig, file, intltool, gmime, libxml2, libsoup }:
+
+stdenv.mkDerivation rec {
+ name = "totem-pl-parser-3.10.2";
+
+ src = fetchurl {
+ url = "mirror://gnome/sources/totem-pl-parser/3.10/${name}.tar.xz";
+ sha256 = "38be09bddc46ddecd2b5ed7c82144ef52aafe879a5ec3d8b192b4b64ba995469";
+ };
+
+ buildInputs = [ pkgconfig file intltool gmime libxml2 libsoup ];
+
+ meta = with stdenv.lib; {
+ homepage = https://wiki.gnome.org/Apps/Videos;
+ description = "Simple GObject-based library to parse and save a host of playlist formats";
+ maintainers = with maintainers; [ lethalman ];
+ license = licenses.lgpl2;
+ platforms = platforms.linux;
+ };
+}
diff --git a/pkgs/desktops/gnome-3/core/totem/default.nix b/pkgs/desktops/gnome-3/core/totem/default.nix
new file mode 100644
index 00000000000..a6acbd192db
--- /dev/null
+++ b/pkgs/desktops/gnome-3/core/totem/default.nix
@@ -0,0 +1,48 @@
+{ stdenv, intltool, fetchurl, gst_all_1
+, clutter_gtk, clutter-gst, pygobject3, shared_mime_info
+, pkgconfig, gtk3, glib, hicolor_icon_theme
+, bash, makeWrapper, itstool, libxml2, dbus_glib
+, gnome3, librsvg, gdk_pixbuf, file }:
+
+stdenv.mkDerivation rec {
+ name = "totem-3.10.1";
+
+ src = fetchurl {
+ url = "mirror://gnome/sources/totem/3.10/${name}.tar.xz";
+ sha256 = "b6b6038c9104965671a6d25e98496a487c3a9c590c9c104f668bd9f4fa7be9e2";
+ };
+
+ doCheck = true;
+
+ enableParallelBuilding = true;
+
+ NIX_CFLAGS_COMPILE = "-I${gnome3.glib}/include/gio-unix-2.0";
+
+ propagatedUserEnvPkgs = [ gnome3.gnome_themes_standard ];
+ propagatedBuildInputs = [ gdk_pixbuf gnome3.gnome_icon_theme librsvg
+ hicolor_icon_theme gnome3.gnome_icon_theme_symbolic ];
+
+ buildInputs = [ pkgconfig gtk3 glib intltool itstool libxml2 gnome3.grilo
+ clutter_gtk clutter-gst gnome3.totem-pl-parser
+ gst_all_1.gstreamer gst_all_1.gst-plugins-base
+ gst_all_1.gst-plugins-good gst_all_1.gst-plugins-bad
+ gnome3.libpeas pygobject3 shared_mime_info dbus_glib
+ gnome3.gsettings_desktop_schemas makeWrapper file ];
+
+ preFixup = ''
+ wrapProgram "$out/bin/totem" \
+ --set GDK_PIXBUF_MODULE_FILE "$GDK_PIXBUF_MODULE_FILE" \
+ --prefix GST_PLUGIN_SYSTEM_PATH_1_0 : "$GST_PLUGIN_SYSTEM_PATH_1_0" \
+ --prefix XDG_DATA_DIRS : "${gtk3}/share:${gnome3.gnome_themes_standard}/share:$out/share:$XDG_ICON_DIRS:$GSETTINGS_SCHEMAS_PATH"
+
+ rm $out/share/icons/hicolor/icon-theme.cache
+ '';
+
+ meta = with stdenv.lib; {
+ homepage = https://wiki.gnome.org/Apps/Videos;
+ description = "Movie player for the GNOME desktop based on GStreamer";
+ maintainers = with maintainers; [ lethalman ];
+ license = licenses.gpl2;
+ platforms = platforms.linux;
+ };
+}
diff --git a/pkgs/desktops/gnome-3/core/tracker/default.nix b/pkgs/desktops/gnome-3/core/tracker/default.nix
new file mode 100644
index 00000000000..6ac3592f6bf
--- /dev/null
+++ b/pkgs/desktops/gnome-3/core/tracker/default.nix
@@ -0,0 +1,49 @@
+{ stdenv, intltool, fetchurl, libxml2, upower
+, pkgconfig, gtk3, glib, hicolor_icon_theme
+, bash, makeWrapper, itstool, vala, sqlite
+, gnome3, librsvg, gdk_pixbuf, file, libnotify
+, evolution_data_server, gst_all_1, poppler
+, icu, taglib, libjpeg, libtiff, giflib, libcue
+, libvorbis, flac, exempi, networkmanager
+, libpng, libexif, libgsf, libuuid, bzip2 }:
+
+stdenv.mkDerivation rec {
+ name = "tracker-1.0.0";
+
+ src = fetchurl {
+ url = "mirror://gnome/sources/tracker/1.0/${name}.tar.xz";
+ sha256 = "a1d033faf2c78f0e239f3c2c961b96623c9a7dabd938c08e3f5660bd70f54ba2";
+ };
+
+ propagatedUserEnvPkgs = [ gnome3.gnome_themes_standard ];
+
+ NIX_CFLAGS_COMPILE = "-I${gnome3.glib}/include/gio-unix-2.0";
+
+ enableParallelBuilding = true;
+
+ buildInputs = [ vala pkgconfig gtk3 glib intltool itstool libxml2
+ bzip2 gnome3.totem-pl-parser
+ gnome3.gsettings_desktop_schemas makeWrapper file
+ gdk_pixbuf gnome3.gnome_icon_theme librsvg sqlite
+ upower libnotify evolution_data_server gnome3.libgee
+ gst_all_1.gstreamer gst_all_1.gst-plugins-base flac
+ poppler icu taglib libjpeg libtiff giflib libvorbis
+ exempi networkmanager libpng libexif libgsf libuuid
+ hicolor_icon_theme gnome3.gnome_icon_theme_symbolic ];
+
+ preFixup = ''
+ for f in $out/bin/* $out/libexec/*; do
+ wrapProgram $f \
+ --set GDK_PIXBUF_MODULE_FILE "$GDK_PIXBUF_MODULE_FILE" \
+ --prefix XDG_DATA_DIRS : "${gtk3}/share:${gnome3.gnome_themes_standard}/share:$out/share:$XDG_ICON_DIRS:$GSETTINGS_SCHEMAS_PATH"
+ done
+ '';
+
+ meta = with stdenv.lib; {
+ homepage = https://wiki.gnome.org/Projects/Tracker;
+ description = "Desktop-neutral user information store, search tool and indexer";
+ maintainers = with maintainers; [ lethalman ];
+ license = licenses.gpl2;
+ platforms = platforms.linux;
+ };
+}
diff --git a/pkgs/desktops/gnome-3/core/vino/default.nix b/pkgs/desktops/gnome-3/core/vino/default.nix
index b431a199bf7..65668dce6a2 100644
--- a/pkgs/desktops/gnome-3/core/vino/default.nix
+++ b/pkgs/desktops/gnome-3/core/vino/default.nix
@@ -15,9 +15,9 @@ stdenv.mkDerivation rec {
buildInputs = [ gtk3 intltool glib libsoup pkgconfig libnotify file makeWrapper ];
- postInstall = ''
+ preFixup = ''
for f in "$out/bin/vino-passwd" "$out/libexec/vino-server"; do
- wrapProgram $f --prefix XDG_DATA_DIRS : "${gtk3}/share:$out/share"
+ wrapProgram $f --prefix XDG_DATA_DIRS : "${gtk3}/share:$out/share:$GSETTINGS_SCHEMAS_PATH"
done
'';
diff --git a/pkgs/desktops/gnome-3/core/vte/default.nix b/pkgs/desktops/gnome-3/core/vte/default.nix
index b0e522c0f29..d98ddc716de 100644
--- a/pkgs/desktops/gnome-3/core/vte/default.nix
+++ b/pkgs/desktops/gnome-3/core/vte/default.nix
@@ -1,32 +1,21 @@
-{ stdenv, fetchurl, intltool, pkgconfig, gnome3, ncurses
-, pythonSupport ? false, python, pygtk}:
+{ stdenv, fetchurl, intltool, pkgconfig, gnome3, ncurses, gobjectIntrospection }:
stdenv.mkDerivation rec {
- versionMajor = "0.34";
- versionMinor = "9";
+ versionMajor = "0.35";
+ versionMinor = "90";
moduleName = "vte";
name = "${moduleName}-${versionMajor}.${versionMinor}";
src = fetchurl {
url = "mirror://gnome/sources/${moduleName}/${versionMajor}/${name}.tar.xz";
- sha256 = "1q93dsxg56f57mxblmh8kn4v9kyc643j2pjf1j3mn2kxypnwaf3g";
+ sha256 = "c47182d1724db479095b918898ce62297ec71988f24cd575506151c59f7b98cf";
};
- buildInputs = [ intltool pkgconfig gnome3.glib gnome3.gtk ncurses ] ++
- stdenv.lib.optionals pythonSupport [python pygtk];
+ buildInputs = [ gobjectIntrospection intltool pkgconfig gnome3.glib gnome3.gtk3 ncurses ];
- configureFlags = ''
- ${if pythonSupport then "--enable-python" else "--disable-python"}
- '';
-
- postInstall = stdenv.lib.optionalString pythonSupport ''
- cd $(toPythonPath $out)/gtk-2.0
- for n in *; do
- ln -s "gtk-2.0/$n" "../$n"
- done
- '';
+ configureFlags = ''--enable-introspection'';
meta = {
homepage = http://www.gnome.org/;
diff --git a/pkgs/desktops/gnome-3/core/yelp/default.nix b/pkgs/desktops/gnome-3/core/yelp/default.nix
index d84bd288707..b58aa99721e 100644
--- a/pkgs/desktops/gnome-3/core/yelp/default.nix
+++ b/pkgs/desktops/gnome-3/core/yelp/default.nix
@@ -20,12 +20,10 @@ stdenv.mkDerivation rec {
libxml2 libxslt icu file makeWrapper gnome3.yelp_xsl
gnome3.gsettings_desktop_schemas ];
- installFlags = "gsettingsschemadir=\${out}/share/yelp/glib-2.0/schemas/";
-
- postInstall = ''
+ preFixup = ''
wrapProgram "$out/bin/yelp" \
--set GDK_PIXBUF_MODULE_FILE "$GDK_PIXBUF_MODULE_FILE" \
- --prefix XDG_DATA_DIRS : "${gtk3}/share:${gnome3.gnome_themes_standard}/:${gnome3.gnome_themes_standard}/share:${gnome3.yelp_xsl}/share/yelp-xsl:${gnome3.gsettings_desktop_schemas}/share:$out/share:$out/share/yelp:$XDG_ICON_DIRS"
+ --prefix XDG_DATA_DIRS : "${gtk3}/share:${gnome3.gnome_themes_standard}/:${gnome3.gnome_themes_standard}/share:${gnome3.yelp_xsl}/share/yelp-xsl:${gnome3.gsettings_desktop_schemas}/share:$out/share:$out/share/yelp:$XDG_ICON_DIRS:$GSETTINGS_SCHEMAS_PATH"
'';
meta = with stdenv.lib; {
diff --git a/pkgs/desktops/gnome-3/default.nix b/pkgs/desktops/gnome-3/default.nix
index 61dfe2b1795..d29ea3d1c69 100644
--- a/pkgs/desktops/gnome-3/default.nix
+++ b/pkgs/desktops/gnome-3/default.nix
@@ -38,10 +38,22 @@ rec {
gjs = callPackage ./core/gjs { };
+ gnome-backgrounds = callPackage ./core/gnome-backgrounds { };
+
+ gnome-contacts = callPackage ./core/gnome-contacts { };
+
gnome_control_center = callPackage ./core/gnome-control-center { };
+ gnome-calculator = callPackage ./core/gnome-calculator { };
+
gnome_common = callPackage ./core/gnome-common { };
+ gnome-dictionary = callPackage ./core/gnome-dictionary { };
+
+ gnome-disk-utility = callPackage ./core/gnome-disk-utility { };
+
+ gnome-font-viewer = callPackage ./core/gnome-font-viewer { };
+
gnome_icon_theme = callPackage ./core/gnome-icon-theme { };
gnome_icon_theme_symbolic = callPackage ./core/gnome-icon-theme-symbolic { };
@@ -52,6 +64,8 @@ rec {
libgnome_keyring = callPackage ./core/libgnome-keyring { };
+ libgnomekbd = callPackage ./core/libgnomekbd { };
+
folks = callPackage ./core/folks { };
gnome_online_accounts = callPackage ./core/gnome-online-accounts { };
@@ -60,12 +74,26 @@ rec {
gnome_shell = callPackage ./core/gnome-shell { };
+ gnome-shell-extensions = callPackage ./core/gnome-shell-extensions { };
+
+ gnome-screenshot = callPackage ./core/gnome-screenshot { };
+
gnome_settings_daemon = callPackage ./core/gnome-settings-daemon { };
+ gnome-system-log = callPackage ./core/gnome-system-log { };
+
+ gnome-system-monitor = callPackage ./core/gnome-system-monitor { };
+
gnome_terminal = callPackage ./core/gnome-terminal { };
gnome_themes_standard = callPackage ./core/gnome-themes-standard { };
+ gnome-user-docs = callPackage ./core/gnome-user-docs { };
+
+ gnome-user-share = callPackage ./core/gnome-user-share { };
+
+ grilo = callPackage ./core/grilo { };
+
gsettings_desktop_schemas = callPackage ./core/gsettings-desktop-schemas { };
gucharmap = callPackage ./core/gucharmap { };
@@ -94,6 +122,14 @@ rec {
rest = callPackage ./core/rest { };
+ sushi = callPackage ./core/sushi { };
+
+ totem = callPackage ./core/totem { };
+
+ totem-pl-parser = callPackage ./core/totem-pl-parser { };
+
+ tracker = callPackage ./core/tracker { };
+
vte = callPackage ./core/vte { };
vino = callPackage ./core/vino { };
@@ -111,8 +147,6 @@ rec {
file-roller = callPackage ./desktop/file-roller { };
- gnome_dictionary = callPackage ./desktop/gnome-dictionary { };
-
gnome_desktop = callPackage ./desktop/gnome-desktop { };
gtksourceview = callPackage ./desktop/gtksourceview { };
@@ -130,4 +164,6 @@ rec {
libgit2-glib = callPackage ./misc/libgit2-glib { };
gexiv2 = callPackage ./misc/gexiv2 { };
+
+ gnome-tweak-tool = callPackage ./misc/gnome-tweak-tool { };
}
diff --git a/pkgs/desktops/gnome-3/desktop/file-roller/default.nix b/pkgs/desktops/gnome-3/desktop/file-roller/default.nix
index 0f48103c93d..41f1fb0097f 100644
--- a/pkgs/desktops/gnome-3/desktop/file-roller/default.nix
+++ b/pkgs/desktops/gnome-3/desktop/file-roller/default.nix
@@ -18,9 +18,9 @@ stdenv.mkDerivation rec {
buildInputs = [ glib pkgconfig gnome3.gtk intltool itstool libxml2 libarchive
attr bzip2 acl makeWrapper ];
- postInstall = ''
+ preFixup = ''
wrapProgram "$out/bin/file-roller" \
- --prefix XDG_DATA_DIRS : "${gnome3.gtk}/share:$out/share"
+ --prefix XDG_DATA_DIRS : "$GSETTINGS_SCHEMAS_PATH"
'';
meta = with stdenv.lib; {
diff --git a/pkgs/desktops/gnome-3/desktop/gnome-dictionary/default.nix b/pkgs/desktops/gnome-3/desktop/gnome-dictionary/default.nix
deleted file mode 100644
index 3e952f99eb0..00000000000
--- a/pkgs/desktops/gnome-3/desktop/gnome-dictionary/default.nix
+++ /dev/null
@@ -1,20 +0,0 @@
-{ stdenv, fetchurl, pkgconfig, gnome3, gnome_doc_utils, intltool, which
-, libxml2, libxslt, itstool }:
-
-stdenv.mkDerivation rec {
- version = "3.10.0";
- name = "gnome-dictionary-${version}";
-
- src = fetchurl {
- url = "mirror://gnome/sources/gnome-dictionary/3.10/${name}.tar.xz";
- sha256 = "1mqf6ln0cgrw12n9fg81sjbhavrgzvvq7fy3gl55il7pa3z612r5";
- };
-
- buildInputs = [ gnome3.gtk ];
- nativeBuildInputs = [ pkgconfig intltool gnome_doc_utils which libxml2 libxslt itstool ];
-
- meta = with stdenv.lib; {
- platforms = platforms.linux;
- };
-
-}
diff --git a/pkgs/desktops/gnome-3/misc/gitg/default.nix b/pkgs/desktops/gnome-3/misc/gitg/default.nix
index 26268f4c90c..7ca35a8255f 100644
--- a/pkgs/desktops/gnome-3/misc/gitg/default.nix
+++ b/pkgs/desktops/gnome-3/misc/gitg/default.nix
@@ -9,12 +9,10 @@ stdenv.mkDerivation rec {
name = "gitg-0.3.2";
src = fetchurl {
- url = "https://download.gnome.org/sources/gitg/0.3/${name}.tar.xz";
+ url = "mirror://gnome/sources/gitg/0.3/${name}.tar.xz";
sha256 = "03vc59d1r3326piqdph6qjqnc40chm1lpg52lpf8466ddjs0x8vp";
};
- configureFlags = [ "--disable-static" ];
-
preCheck = ''
substituteInPlace tests/libgitg/test-commit.c --replace "/bin/bash" "${bash}/bin/bash"
'';
@@ -29,14 +27,11 @@ stdenv.mkDerivation rec {
libgit2-glib gtkspell3 gnome3.gsettings_desktop_schemas gnome3.gtksourceview librsvg
gobjectIntrospection makeWrapper gnome3.gnome_icon_theme_symbolic gnome3.gnome_icon_theme ];
- postInstall = ''
+ preFixup = ''
wrapProgram "$out/bin/gitg" \
--prefix GI_TYPELIB_PATH : "$GI_TYPELIB_PATH" \
--set GDK_PIXBUF_MODULE_FILE "$GDK_PIXBUF_MODULE_FILE" \
- --prefix XDG_DATA_DIRS : "$XDG_ICON_DIRS:${gtk3}/share:${gnome3.gnome_themes_standard}/share:${gnome3.gsettings_desktop_schemas}/share:$out/share"
- '';
-
- preFixup = ''
+ --prefix XDG_DATA_DIRS : "$XDG_ICON_DIRS:${gtk3}/share:${gnome3.gnome_themes_standard}/share:$out/share:$GSETTINGS_SCHEMAS_PATH"
rm $out/share/icons/hicolor/icon-theme.cache
rm $out/share/gitg/icons/hicolor/icon-theme.cache
'';
diff --git a/pkgs/desktops/gnome-3/misc/gnome-tweak-tool/default.nix b/pkgs/desktops/gnome-3/misc/gnome-tweak-tool/default.nix
new file mode 100644
index 00000000000..2eccb9a32cf
--- /dev/null
+++ b/pkgs/desktops/gnome-3/misc/gnome-tweak-tool/default.nix
@@ -0,0 +1,46 @@
+{ stdenv, intltool, fetchurl, python, pygobject3, atk
+, pkgconfig, gtk3, glib, hicolor_icon_theme, libsoup
+, bash, makeWrapper, itstool, libxml2, python3Packages
+, gnome3, librsvg, gdk_pixbuf, file, libnotify }:
+
+stdenv.mkDerivation rec {
+ name = "gnome-tweak-tool-3.10.1";
+
+ src = fetchurl {
+ url = "mirror://gnome/sources/gnome-tweak-tool/3.10/${name}.tar.xz";
+ sha256 = "fb5af9022c0521a925ef9f295e4080212b1b45427cd5f5f3a901667590afa7ec";
+ };
+
+ doCheck = true;
+
+ propagatedUserEnvPkgs = [ gnome3.gnome_themes_standard ];
+
+ makeFlags = [ "DESTDIR=/" ];
+
+ buildInputs = [ pkgconfig gtk3 glib intltool itstool libxml2
+ gnome3.gsettings_desktop_schemas makeWrapper file
+ gdk_pixbuf gnome3.gnome_icon_theme librsvg
+ hicolor_icon_theme gnome3.gnome_icon_theme_symbolic
+ python pygobject3 libnotify gnome3.gnome_shell
+ libsoup gnome3.gnome_settings_daemon gnome3.nautilus
+ gnome3.gnome_desktop ];
+
+ preFixup = ''
+ wrapProgram "$out/bin/gnome-tweak-tool" \
+ --set GDK_PIXBUF_MODULE_FILE "$GDK_PIXBUF_MODULE_FILE" \
+ --prefix XDG_DATA_DIRS : "${gtk3}/share:${gnome3.gnome_themes_standard}/share:$out/share:$XDG_ICON_DIRS:$GSETTINGS_SCHEMAS_PATH" \
+ --prefix GI_TYPELIB_PATH : "$GI_TYPELIB_PATH" \
+ --prefix LD_LIBRARY_PATH ":" "${libsoup}/lib:${gnome3.gnome_desktop}/lib:${libnotify}/lib:${gtk3}/lib:${atk}/lib" \
+ --prefix PYTHONPATH : "$PYTHONPATH:$(toPythonPath $out)"
+ '';
+
+ patches = [ ./find_gsettings.patch ];
+
+ meta = with stdenv.lib; {
+ homepage = https://wiki.gnome.org/action/show/Apps/GnomeTweakTool;
+ description = "A tool to customize advanced GNOME 3 options";
+ maintainers = with maintainers; [ lethalman ];
+ license = licenses.gpl3;
+ platforms = platforms.linux;
+ };
+}
diff --git a/pkgs/desktops/gnome-3/misc/gnome-tweak-tool/find_gsettings.patch b/pkgs/desktops/gnome-3/misc/gnome-tweak-tool/find_gsettings.patch
new file mode 100644
index 00000000000..3e68c04cb3a
--- /dev/null
+++ b/pkgs/desktops/gnome-3/misc/gnome-tweak-tool/find_gsettings.patch
@@ -0,0 +1,22 @@
+diff --git a/gtweak/gsettings.py b/gtweak/gsettings.py
+index a00fe19..dce74b2 100644
+--- a/gtweak/gsettings.py
++++ b/gtweak/gsettings.py
+@@ -33,10 +33,15 @@ class GSettingsMissingError(Exception):
+
+ class _GSettingsSchema:
+ def __init__(self, schema_name, schema_dir=None, schema_filename=None, **options):
+- if not schema_dir:
+- schema_dir = gtweak.GSETTINGS_SCHEMA_DIR
+ if not schema_filename:
+ schema_filename = schema_name + ".gschema.xml"
++ if not schema_dir:
++ schema_dir = gtweak.GSETTINGS_SCHEMA_DIR
++ for xdg_dir in GLib.get_system_data_dirs():
++ dir = os.path.join(xdg_dir, "glib-2.0", "schemas")
++ if os.path.exists(os.path.join(dir, schema_filename)):
++ schema_dir = dir
++ break
+
+ schema_path = os.path.join(schema_dir, schema_filename)
+ if not os.path.exists(schema_path):
diff --git a/pkgs/desktops/kde-4.10/applications/kate.nix b/pkgs/desktops/kde-4.10/applications/kate.nix
deleted file mode 100644
index e8efc87775a..00000000000
--- a/pkgs/desktops/kde-4.10/applications/kate.nix
+++ /dev/null
@@ -1,11 +0,0 @@
-{ kde, kdelibs, kactivities, qjson, pyqt4, sip, python, pykde4 }:
-
-kde {
-
- buildInputs = [ kdelibs kactivities qjson pyqt4 sip python pykde4];
-
- meta = {
- description = "Kate, the KDE Advanced Text Editor, as well as KWrite";
- license = "GPLv2";
- };
-}
diff --git a/pkgs/desktops/kde-4.10/applications/konsole.nix b/pkgs/desktops/kde-4.10/applications/konsole.nix
deleted file mode 100644
index 0db47fb2d7c..00000000000
--- a/pkgs/desktops/kde-4.10/applications/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.10/default.nix b/pkgs/desktops/kde-4.10/default.nix
deleted file mode 100644
index feb6ed21409..00000000000
--- a/pkgs/desktops/kde-4.10/default.nix
+++ /dev/null
@@ -1,71 +0,0 @@
-{ callPackage, callPackageOrig, stdenv, qt48, release ? "4.10.5" }:
-
-let
- branch = "4.10";
- # Need callPackageOrig to avoid infinite cycle
- kde = callPackageOrig ./kde-package {
- inherit release branch 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" ];
- # fake package to make things just work
- kdesdk = [ "fake" ];
- # 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="cervisia"; }
- { name="lokalize"; }
- { name = "kioslave-svn"; sane = "kioslave_svn"; subdir = "kdesdk-kioslaves"; }
- { name = "kioslave-perldoc"; sane = "kioslave_perldoc"; subdir = "kdesdk-kioslaves"; }
- { name="dolphin-plugins-svn"; sane="dolphin_plugins_svn";subdir="dolphin-plugins"; }
- { name="dolphin-plugins-git"; sane="dolphin_plugins_git";subdir="dolphin-plugins"; }
- { name="dolphin-plugins-hg"; sane="dolphin_plugins_hg";subdir="dolphin-plugins"; }
- { name="dolphin-plugins-bazaar"; sane="dolphin_plugins_bazaar";subdir="dolphin-plugins"; }
- { name="kcachegrind"; }
- { name="kapptemplate"; }
- { name="kdesdk-strigi-analyzers"; sane="kdesdk_strigi_analyzers";}
- { name="kdesdk-thumbnailers"; sane="kdesdk_thumbnailers";}
- { name="okteta"; }
- { name="kompare"; }
- { name="poxml"; }
- { name="kde-dev-scripts"; sane = "kde_dev_scripts"; }
- { name="kde-dev-utils"; sane="kde_dev_utils";}
- #{ name="kprofilemethod"; subdir = "kde-dev-utils/kprofilemethod";}
- #{ name="kstartperf"; }
- #{ name="kmtrace"; subdir = "kde-dev-utils/kmtrace"; }
- #{ name="kpartloader"; }
- #{ name="kuiviewer"; }
- { name="umbrello"; }
- ];
- };
-
-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 branch;
- inherit (kde.manifest) stable;
- };
-}
diff --git a/pkgs/desktops/kde-4.10/files/kde-wallpapers-buildsystem.patch b/pkgs/desktops/kde-4.10/files/kde-wallpapers-buildsystem.patch
deleted file mode 100644
index 378cdb64694..00000000000
--- a/pkgs/desktops/kde-4.10/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.10/files/polkit-install.patch b/pkgs/desktops/kde-4.10/files/polkit-install.patch
deleted file mode 100644
index d2ecac663ec..00000000000
--- a/pkgs/desktops/kde-4.10/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.10/kactivities.nix b/pkgs/desktops/kde-4.10/kactivities.nix
deleted file mode 100644
index 06381bb13d7..00000000000
--- a/pkgs/desktops/kde-4.10/kactivities.nix
+++ /dev/null
@@ -1,9 +0,0 @@
-{ kde, kdelibs, nepomuk_core }:
-
-kde {
- propagatedBuildInputs = [ kdelibs nepomuk_core ];
-
- meta = {
- description = "KDE activities library and daemon";
- };
-}
diff --git a/pkgs/desktops/kde-4.10/kde-base-artwork.nix b/pkgs/desktops/kde-4.10/kde-base-artwork.nix
deleted file mode 100644
index 3f416cebddc..00000000000
--- a/pkgs/desktops/kde-4.10/kde-base-artwork.nix
+++ /dev/null
@@ -1,14 +0,0 @@
-{ kde, kdelibs }:
-
-kde {
- outputHashAlgo = "sha256";
- outputHashMode = "recursive";
- outputHash = "0mrd3w7rhsj0v92c8rh9zjxyifq7wyvwszksf2gyn53dzd06blk8";
-
- buildInputs = [ kdelibs ];
-
- meta = {
- description = "KDE Base artwork";
- license = "GPL";
- };
-}
diff --git a/pkgs/desktops/kde-4.10/kde-baseapps/kde-baseapps.nix b/pkgs/desktops/kde-4.10/kde-baseapps/kde-baseapps.nix
deleted file mode 100644
index b564e339eb1..00000000000
--- a/pkgs/desktops/kde-4.10/kde-baseapps/kde-baseapps.nix
+++ /dev/null
@@ -1,11 +0,0 @@
-{ kde, kdelibs, shared_desktop_ontologies, glib, htmlTidy, kactivities
-, nepomuk_core, nepomuk_widgets, libXt }:
-
-kde {
- buildInputs = [ kdelibs nepomuk_core nepomuk_widgets htmlTidy kactivities libXt ];
-
- meta = {
- description = "Base KDE applications, including the Dolphin file manager and Konqueror web browser";
- license = "GPLv2";
- };
-}
diff --git a/pkgs/desktops/kde-4.10/kde-package/4.10.5.nix b/pkgs/desktops/kde-4.10/kde-package/4.10.5.nix
deleted file mode 100644
index b1abdb8afec..00000000000
--- a/pkgs/desktops/kde-4.10/kde-package/4.10.5.nix
+++ /dev/null
@@ -1,399 +0,0 @@
-{stable=true;
-hashes=builtins.listToAttrs[
- {name="analitza";value="0lc83vmapd66ilph26hlf8shd4xv0v9y8jsjycw5nl4xpfm7l5nr";}
- {name="ark";value="1fvb6phcfd17fxcbb5w4njmkj0vlnz6g5qa6wv5szn4fakb5db1v";}
- {name="audiocd-kio";value="11ma2pvc7w6gdd98h806i163dsjhxxly4wv4xdcqq4yhdviq29qv";}
- {name="blinken";value="1lfv15blwy3m88zylqsa7k1a5z01qmakjrb9wq9yxnjbhb12nyf8";}
- {name="bomber";value="0z704hzpgl1s7jdcpicvixd2dnfsh7i4ainjd5zc1rcljgabmvmx";}
- {name="bovo";value="10wp4spcdwsa4nbq9qhancvddv83q12qbi72ksnvds50md12h5xx";}
- {name="cantor";value="070al4dx7x7kk568lpd1ajq0q5gws48w3n76g0wlf4dqqlijjfx6";}
- {name="dragon";value="0wj89v1d34s595ky97zwph7rxb97h03qya3bi6y1npcp7kjlv2j9";}
- {name="ffmpegthumbs";value="0ilc8k601g3m4x1slfcczah87f402a9143a70gvbjprffd7iyf9q";}
- {name="filelight";value="1wfd498ir1ivcks1ys3h8whvi0l4xwfgz2j5c4m4b517dskrmaxf";}
- {name="granatier";value="04i1zzqkv0da6ymqvdxlaxgws7z44521zj51nw4mvapf1jcck7bq";}
- {name="gwenview";value="0rz3va3djm3qxqvchxa3549r1qf124sb4105bs6s42a05h4mzhqv";}
- {name="jovie";value="05cc6qzn9hgdvqgi8a2k2i89ggx10fv970293z8d59r6wbh1skv6";}
- {name="juk";value="00j9c3g1zsa9vbfwpg37jb4w8753sr28q9xbxp3kfablndwid3w9";}
- {name="kaccessible";value="0rsdxzqamq2i3f59npsv6pir9bys3g6zd345sfnpbdkinvxyhrdn";}
- {name="kactivities";value="0sfbc3w0cvjfp2zs6v28fv69pq5ikignily572jamm8nwaid5h2g";}
- {name="kajongg";value="1yffsgbabnp4mckirl888bghpyrj71d8fbsb0rjk96av1kzl2yvx";}
- {name="kalgebra";value="0slvk1c1n9g2b5nakfi53l7gh3c2y78pvcy2snj9f1z5c0sr05cn";}
- {name="kalzium";value="12gp0k11zf3m5g2aabrbrd7kpi5k3z46w74kalzzk3s1babgnwxn";}
- {name="kamera";value="13qka1nc0ibn3kb03l11v64r6w3k4g7ayq539ncp1syba5726xy1";}
- {name="kanagram";value="11vd5abdsggzv4svj4wj6q7mcpbxnpjk4gv0m1zw82ya26aarjnk";}
- {name="kapman";value="19r8a7k2ib2fijipajbj461b1sfvlfxrlpfmm52njg61xizdxy20";}
- {name="kate";value="0wzvhywvkagshs1q8q1rmq3dxlc5h62y7mlfb2x9wzp945rshq6d";}
- {name="katomic";value="0vqqjv1magpc7wgwj0cvbykl9qvphc3s03i30qndygi96mf36iwc";}
- {name="kblackbox";value="197r2nfrpdynqix1c81y1y72jrbzzl3prjd6q9sca9qnd47xx9kb";}
- {name="kblocks";value="0nnbaskl1s9gy6kn8qk3j9qr6vmsbnpmjj4ddn1fvr32kqjfzr3h";}
- {name="kbounce";value="0i962rbbi41m8fd7x1vrbi6q46qnij3d8kdc3cwn7mmjp79gzwmq";}
- {name="kbreakout";value="1mh7ki87y1jjk7g4n8flr0ym6qk9nh922xsca2ww1vv16mpxww9w";}
- {name="kbruch";value="1632a7rjrmll42yazdab1hmgjv39mp16xhkj6mq61sqdd4pj316v";}
- {name="kcalc";value="1gyp45f873q6v2y1l8k52x70b92893314h6ci5a07c0asm8ffrpa";}
- {name="kcharselect";value="12w3mzh0gqgh6aaih69djv3f4b1z34cxwhnchqz75z2yb9lcdj1c";}
- {name="kcolorchooser";value="19b0r8jjy3fkhhzp9hhxw7zyrkb7fafkxs22ik3lzlm6wri1dwpj";}
- {name="kdeadmin";value="1fg49z2lgmsvkhhyvahasb5z0l9cad4xwq5ps3qv5f1yj0hfzic4";}
- {name="kdeartwork";value="1z1xnljs5lzmahn3i5xs429bpyxzc6b8sw2m216cs06dwfk77if6";}
- {name="kde-baseapps";value="1d08wqb3a9fi0gzkls4jmlnmqpfd5fmg4310d2ih78gflv1yk2gz";}
- {name="kde-base-artwork";value="1hq35i8mw3akbg9m6wvp9fv6xpamv9na2bjqzqyph8sx0633dxrw";}
- {name="kdegraphics-mobipocket";value="0jq1qrrax9w60w35qxvjrazl4c8qvninhgp9na7pgz6sk6ydb0jf";}
- {name="kdegraphics-strigi-analyzer";value="07z3nzmfw5pxg97qx2jj54f3r6qc2x22yxhn3kmcpifzr3gyi555";}
- {name="kdegraphics-thumbnailers";value="1iwmyn2r43i3bykrc4vx0785f3x5zrnvvfdhfpr88f6pxr95f7bq";}
- {name="kdelibs";value="1lgjz90irrqwz8h6w7iwy8icvqyj4kb2sarnyrxna8dy1fah9m5n";}
- {name="kdenetwork";value="1lra150av4ndq5s9msx1khwdwd8k0n756qg6d4fsjp2fy7scf26k";}
- {name="kdepim";value="0qs1znrvfzrkhlh1d68pri9fnaq2nhxnih5fsjcn2m7d537havq1";}
- {name="kdepimlibs";value="01hyi3r2an8g9ds59az39c8qdm8qiws6q16558jna7f6w4m0yq5r";}
- {name="kdepim-runtime";value="1p293zqwdc0g77h996slc0qwa01a24nq5yh5a4q6ng92rfzzkrl3";}
- {name="kdeplasma-addons";value="0hs9bmg4gcl9lks78pmb0n29jzzh56w5islyzhzccrrcbimsqvzp";}
- {name="kde-runtime";value="0daw0sjyqrdhsah920fla05wvcf9zrck1lbkdcbvrk1qvvqwjhpx";}
- {name="kdesdk";value="0h1il5dza8qcfz1fgz6qhsaccqkp0g5fdi4k3413vr6lhg67dh78";}
- {name="kdetoys";value="1r2rh0hdipwfxwq29whicbvxa7dr5vswh9pqw60x1c634cgba49p";}
- {name="kde-wallpapers";value="1d96asb1nn88rwzb2nis37d8qwliaswpzfc15zq6jkcbdyzaxfpv";}
- {name="kdewebdev";value="18s79ah9j01mb3lpzpsi6wxbh3wjpkswx5snpv1fyphf760jzb3n";}
- {name="kde-workspace";value="0xg8asnxq48x6zydh09bfga11363bya7hfkygas7ar7rb0144im3";}
- {name="kdf";value="0d3i5jpikh285vwr93044lws34ihhbszb05gbyvibx7faqdllg2h";}
- {name="kdiamond";value="1dca5h88lm2syhnk5bd8g83lx9422hyg972di4xj69vnnpl5nsp9";}
- {name="kfloppy";value="02yq8p8ma1aghm9k442xznk1xwb4mcd36h040ix5rc7j3j02l79m";}
- {name="kfourinline";value="0ljs9szk4r6iasn4qkclpq3nij5hb8xnyqj36w8nxbvsmka69d2p";}
- {name="kgamma";value="0byvsk5j2g1ycfq5zskg9bkbmq9jddv0nzck2w4qayf072cqn8b3";}
- {name="kgeography";value="0icf21sr6w920ga6as9yx1ja85gwk3h2bb1ra9k5bs32vw5r7nk9";}
- {name="kgoldrunner";value="18i0mj3j6q1gycf33z416kcf9lsksrmk8fnp4j1jg9mlr6y1xc6c";}
- {name="kgpg";value="1x04mj6ykmhmlr2074bn6kc88zz4y3lgbvnf4qkcj8q5wil1p3gv";}
- {name="khangman";value="0yrqd17w78pl18ln8rqcb0cmqis8al9k3zvg0hvxyh3qp013xb9m";}
- {name="kig";value="1wd8kk4gkvgxp83q6dqdqkqaznbrl8kk88ixk17qhlj03iykxfcj";}
- {name="kigo";value="1g78wqsk72mki48inxam6337hpjd491325j3cmvvlz0196q3s4zn";}
- {name="killbots";value="1kjmwsrqmj85yawbw6xr025bkv3kidwasiyrjr01mgsndlkn3y47";}
- {name="kimono";value="0wswbykjq56rxf0rkkl97ipy36r5q8h9sws758fvwmd16nylhdg0";}
- {name="kiriki";value="0iv3lak13szc93gqqjlqdmdbg3jy4xbxvnahzka0d3m2nkg9iv6h";}
- {name="kiten";value="1112kl5vbz58v52nss4gd4plnrl3nkp57mnhdbs58dlxv1s1s7b9";}
- {name="kjumpingcube";value="1y9pgqsq72v9mxw04dkg4x2m15jyl5iahqshxczzihh3pjllv7sr";}
- {name="klettres";value="0kqjw7vrpzvrr4g6zhdsqppbr2viqr7jann4npnzh0bw48842zhp";}
- {name="klickety";value="0d78nak6dzmkfsxq7cxndca51paw2giawk31s70fgr7kwa7s9g9f";}
- {name="klines";value="0z8bp1xwy17k1nv7d8mrgsk7vgb5137icdy0d66jwaa9bzsv3khh";}
- {name="kmag";value="1iamiy8ppyd4qkbdhqykxgh6c8w31glpjv1srk9s4gqyqj51mf24";}
- {name="kmahjongg";value="02ai75zc5rfch3b7a2zz9kmw6r3kgkbzr9pi8c1zrdgif8awrl3x";}
- {name="kmines";value="0hc838cd5h8gjm4alszi8z70r3jmjxqwmhni1silk16gsiy3kqvy";}
- {name="kmix";value="08ls620ndrvszx36sy2xj32fvwm5b8aggp86cwvzqjvp47c46wjv";}
- {name="kmousetool";value="02lg84gpnic2l84ay01adw2fynr0x7byklqdz3zphiqhddhfnb81";}
- {name="kmouth";value="09jg2xar4p6rrcc41qfj0h57fapdgpdpjh6ackhyana0871q5cam";}
- {name="kmplot";value="17s7n51x2nl5g4l0862gnzigkwa7qwipmvy7krn8b1z051n2jwfx";}
- {name="knavalbattle";value="15qpgn5bjbk4smwzz5x0x9f1kd5mjhg6p4h4dalcay8k9zixxxvl";}
- {name="knetwalk";value="0yqdxcah56z1q21xfrk33s4fx6l9q21na5dx1p12d114vzgr3gzq";}
- {name="kolf";value="08ba3flnknzjgys73lhpy7b98j544wwv6vvbrd6p2675imwk168w";}
- {name="kollision";value="1jahrgkb9j8shwrmm1486f3w1hd5snwfwv53gj7973z0mmm5468r";}
- {name="kolourpaint";value="18ql77778zdc9149qd7mslkh780v6qkhdc1wfljrr1mj98p08av9";}
- {name="konquest";value="1iyqgzyg004lyqssmvh4951m9v56ayw7ggza6awh6a805j0zz0sp";}
- {name="konsole";value="1zqmmv4zpq59nm2r7ccmp1ij5q3qjclmbmcm667hxmq9dyrwv5an";}
- {name="korundum";value="12cqg6ib06icadyslnqzqmkal6rmjhki02na09gacqdiwc7gf2p2";}
- {name="kpat";value="1zdv4jvqg0xbbsf39d2n8d0ya2mqzva06s46m2hb66flyjz5pd3p";}
- {name="kremotecontrol";value="0jw4jjlhy378f58wgqm5cikqj8i3bdz1s1qm4r24bb1677dqyd4x";}
- {name="kreversi";value="1mxgb60zbq8qkjnamvlr072vii2px224mg03fjjds063321swx0z";}
- {name="kross-interpreters";value="0r2y7lscsgk6jkzby7dqwd62yk2nyzwm6chihsvivl9frl38wqza";}
- {name="kruler";value="0gwyy0k8h705bnp6q7jgzbk8i9d6csffhwlas7y0zwcl7n03664x";}
- {name="ksaneplugin";value="187n3s19xdfl7bbcpgyappw1v2bgjki8kh1qh8dy8mscm2qn50j9";}
- {name="kscd";value="0wqm2vhj593x4vps3205gfnl29yglr2szzpdiazi6rq80r8ifvbq";}
- {name="kshisen";value="1n5131kckixwbllp8sxn5y93z9q2fdvjj77pcy4sadngx5slz718";}
- {name="ksirk";value="0b2084h246jhphwpa5iwpxbib4z4h6cwvi8bp18l7yid77wz28f2";}
- {name="ksnakeduel";value="0v74l5svmr21gahxzfz7sjnj5gzhnyir7l7cny1q7xnha7bnaw81";}
- {name="ksnapshot";value="05l18i9mv9pghlf50qax9drlcrmdahgiljnvcq20vadrxw4qxghv";}
- {name="kspaceduel";value="0q8iqg5n7w0v5llbgan7vnf41zbfagc0rd8ya7fp9gf5pmx422zf";}
- {name="ksquares";value="0fnz1hy2n0i1gal9b8ij8bi5sql5iybbjpkyy55dapcbph2br8xc";}
- {name="kstars";value="0nf3n9f6dmp8401d2jfcyh26xbwmwdav4maacp5dmhv6xvr2ivis";}
- {name="ksudoku";value="07lxxaw6ykhlxzkbhzsz43ingfx0l1gb38v2z0ag8jd3iln7l79v";}
- {name="ktimer";value="112449fn8zbgz3s22bswyc8fisa126j6xvmwxzb91c5vx0wj9qg8";}
- {name="ktouch";value="0a9x6ym3gw3d6jqvlfaw5qyxzcn9vi4sa55ig0d9cdy8057y5pwz";}
- {name="ktuberling";value="1ihvv3mais39yk84k1a76mpz5c9sbbnw80n536adh3y3fad4yw5a";}
- {name="kturtle";value="07fxjiaq69x97w45z8r3g1iyi0vyk0wyqwjwn1qb7a1ziwva5jl9";}
- {name="kubrick";value="0mqf52lp0s61qsv8q47h012m5k8mf6gqwjpb7swrs7hxsc58dspy";}
- {name="kwallet";value="0mb8ph0wf761gpss7xmi4zngxfalm3sdngjxrpr8brczjp8v9wdm";}
- {name="kwordquiz";value="0rbrfswf13pw4cam8fj9w7g12yhzvg82izzy79xsxb0dkk4ki42n";}
- {name="libkcddb";value="033vmv8fin87m788qjyjaravf5gr9cj953yvcfg9438qpavd79qr";}
- {name="libkcompactdisc";value="105w0bnw6gzjb8gnp2gmwcjgaz3gi4f16fninbl2658dnb24b1kq";}
- {name="libkdcraw";value="0p1wbdrhpp6rg82kfrxhaz4lxqjix6mb1grj16zy1i24x89mxlya";}
- {name="libkdeedu";value="1b6qpd3i59hfd7rwij255xyrxp5ylw5mpyr6k10py5pj7fn4zhc2";}
- {name="libkdegames";value="1cc5011xm9rz9fz2dk3ibfr4cqq3rmw3i7vlcsrhfscsx0xm88sc";}
- {name="libkexiv2";value="18ngfrz30q0prsrwy92hb7y0hxhcxlr4ic7lq7fv4l45434ry7pv";}
- {name="libkipi";value="00nn96qwynfx2ajqllh8zkwccc1prigbcq75s1hnpm67nnfc98as";}
- {name="libkmahjongg";value="06qpykgaxx5r7n3ymph1g2fy0dj2vclfqlnzbdc41ma3l66jci64";}
- {name="libksane";value="0a0ipz9jmrw076mxsj2k3njaf7dwfrdqd5bqwcc4q8qqlhpp4ljy";}
- {name="lskat";value="1sxmjhw61w1d19zidf96qkddx9r0h8z5kbjl8xgah8k25ji5qsr6";}
- {name="marble";value="04cy00jsnahmigffjyqviizj5bvj2aldfgkyj2g5iadfsqflxvy4";}
- {name="mplayerthumbs";value="0hmdvyillr779c1fmia3h6dcy7j7j0kvxvh4mdz1adfwaz4zgymy";}
- {name="nepomuk-core";value="12grw88gc4b4i1h346ahpkv8493gyvhvkpcqxwc2dqpsqsfc7rpz";}
- {name="nepomuk-widgets";value="1npmwv1vh5ci6c9a291vyps85c5cvdg5dn9r9h28dq58s2h274yh";}
- {name="okular";value="05v23g4w6sw525w7qllcbyhk92k75hyqrvx9hncylig4blivjp9f";}
- {name="oxygen-icons";value="1y7iq77fyiykmjf8xdyprnshlasazdv6fcjp6ayfx0jkixb2gqya";}
- {name="pairs";value="1v4h0d04b7g59axkl69gyml02hzxjkfzcgg320mj05xx5q0kjyq5";}
- {name="palapeli";value="13hvppav7yz9wvvly8f8kads9arqvl25spwa8awpl2f4a394c0sa";}
- {name="parley";value="0wk6p4rw6063089iq758a0mcq10fh8c1pg0wq00dhs9d05gwk873";}
- {name="perlkde";value="1hh5y4zmmb97py281i0jhzwg8r4ii3qmilzbwbrvk9j4ngcz37gg";}
- {name="perlqt";value="09880varap78a44zifqx72wbx23wq0hqq540hf466fmmxk744877";}
- {name="picmi";value="060a1n5lclsaz4zjq1dpm9y20fqgq3rjlkm54prp3kkj5hpi6kcl";}
- {name="print-manager";value="0jmvfy376axdwi4a2fc78ldlny4jbk7kxvhi1mwf8piibwc10dvf";}
- {name="pykde4";value="10aqvx6dfcbi9mrsr0sdhhxp2jqkw06rf55p2nxdadmcszad2k7k";}
- {name="qtruby";value="042nya6n5sp2r9a9s3limbph8wv5z04fha7pkqznvrkr040qykvj";}
- {name="qyoto";value="0nxhxvh4zpskvxv7mjz06vililg2wqlabaaaf61j0naxz4aynyrv";}
- {name="rocs";value="10xb6qh29g4l369dyimwj0yk8s5yi6jg1byaf4z5jnr2w8ysbf7j";}
- {name="smokegen";value="0myzqfqcl7i8kikcyj2vbip9y4al411jmjm02hv55baccygls8yr";}
- {name="smokekde";value="0b1m9g1swj9r44zbg8lbqmxp9l342dz8b4wsnn6n9ih0b15p512h";}
- {name="smokeqt";value="047am45yjkyyza281zfzvv84kvldvmbgch5q3fd89vcvl5sh399j";}
- {name="step";value="05rjnb16mzz91q7473k2g83g792xqh77p4gc2xmw0a5j4qk6f6ga";}
- {name="superkaramba";value="0vxb8656ag6hmy3nx9w3xa38j12rajkqsmv4kx6ylnpk6v71s7x2";}
- {name="svgpart";value="17j59rwg483p7ip1zxq37jnzvkafrkj7yabwrbwk0vvxkqcbqpx3";}
- {name="sweeper";value="0yhp6k2ai7wgn242932w10xwainq07bf9zjm2fvaavrg3gh38644";}
-];
-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="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="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="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="kdeadmin"; split=false;
- pkgs=[
- { name="strigi-analyzer"; sane="strigi_analyzer";}
- { name="kuser"; }
- { name="ksystemlog"; }
- { name="kcron"; }
- ];
-
-}
-{ 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="kdenetwork"; split=false;
- pkgs=[
- { name="kdenetwork-strigi-analyzers"; sane="kdenetwork_strigi_analyzers";}
- { name="kdenetwork-filesharing"; sane="kdenetwork_filesharing";}
- { name="kppp"; }
- { name="kdnssd"; }
- { name="krdc"; }
- { name="krfb"; }
- { name="kget"; }
- { name="kopete"; }
- ];
-
-}
-{ 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;}
-#had to add fake pkgs to kdesdk to get it to be treated like a split module
-{ module="kdesdk"; split=false; pkgs = [{ name="fake"; }]; }
-{ 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.10/kde-package/default.nix b/pkgs/desktops/kde-4.10/kde-package/default.nix
deleted file mode 100644
index 9424a762c8f..00000000000
--- a/pkgs/desktops/kde-4.10/kde-package/default.nix
+++ /dev/null
@@ -1,129 +0,0 @@
-{ callPackage, runCommand, stdenv, fetchurl, qt4, cmake, automoc4
-, release, branch, 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;
- inherit branch;
- 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.10/kde-package/kde-manifest.sh b/pkgs/desktops/kde-4.10/kde-package/kde-manifest.sh
deleted file mode 100755
index e964ce3ddc1..00000000000
--- a/pkgs/desktops/kde-4.10/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.10/kde-package/kde-submodules.xslt b/pkgs/desktops/kde-4.10/kde-package/kde-submodules.xslt
deleted file mode 100644
index 952a05a9d27..00000000000
--- a/pkgs/desktops/kde-4.10/kde-package/kde-submodules.xslt
+++ /dev/null
@@ -1,22 +0,0 @@
-
-
-
-
-
-
-
-
- declare -A module
-
-
-
- module["
-
- "]="
-
- "
-
-
-
-
-
diff --git a/pkgs/desktops/kde-4.10/kde-runtime.nix b/pkgs/desktops/kde-4.10/kde-runtime.nix
deleted file mode 100644
index a2fef65d75c..00000000000
--- a/pkgs/desktops/kde-4.10/kde-runtime.nix
+++ /dev/null
@@ -1,23 +0,0 @@
-{ kde, kdelibs, shared_desktop_ontologies, bzip2, libssh, exiv2, attica
-, libcanberra, virtuoso, samba, libjpeg, ntrack, pkgconfig, qca2, xz, pulseaudio
-, networkmanager, kactivities, kdepimlibs, openexr, ilmbase, config
-}:
-
-kde {
- buildInputs = [
- kdelibs attica xz bzip2 libssh libjpeg exiv2 ntrack
- qca2 samba libcanberra pulseaudio
- networkmanager kactivities kdepimlibs openexr
-#todo: add openslp
- ];
-
- nativeBuildInputs = [ pkgconfig ];
-
- NIX_CFLAGS_COMPILE = "-I${ilmbase}/include/OpenEXR";
-
- passthru.propagatedUserEnvPackages = [ virtuoso ];
-
- meta = {
- license = "LGPL";
- };
-}
diff --git a/pkgs/desktops/kde-4.10/kde-wallpapers.nix b/pkgs/desktops/kde-4.10/kde-wallpapers.nix
deleted file mode 100644
index 6e559ad8a6c..00000000000
--- a/pkgs/desktops/kde-4.10/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 = "01k4rr7xkay5j0g8qwmfmvf4d0rjc9sdk121wravsagbidz3s9ci";
-
- meta = {
- description = "Wallpapers for KDE";
- };
-}
diff --git a/pkgs/desktops/kde-4.10/kde-workspace.nix b/pkgs/desktops/kde-4.10/kde-workspace.nix
deleted file mode 100644
index 57b2fea79b2..00000000000
--- a/pkgs/desktops/kde-4.10/kde-workspace.nix
+++ /dev/null
@@ -1,45 +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,
- libjpeg, pkgconfig, libXft, libXxf86misc, kactivities, qjson, networkmanager,
- fetchurl
-}:
-
-kde {
-
-#todo: googlegadgets, consolekit, xmms
- buildInputs =
- [ kdelibs qimageblitz libdbusmenu_qt libjpeg xorg.libxcb xorg.xcbutilimage
- xorg.xcbutilrenderutil libXft #libXxf86misc
- xorg.libxkbfile xorg.libXcomposite xorg.libXtst #xorg.libXScrnSaver
- xorg.libXdamage xorg.libXau xorg.libXdmcp xorg.libpthreadstubs
- boost gpsd lm_sensors pciutils libraw1394
- libusb python libqalculate kdepimlibs pam prison akonadi qjson networkmanager
- kactivities
- ];
-
- patches = [(fetchurl {
- url = "https://git.reviewboard.kde.org/r/111261/diff/raw/";
- sha256 = "0g8qjna1s0imz7801k4iy2ap5z81izi4bncvks7z3n9agji4zf40";
- name = "CVE-2013-4132.patch";
- })];
-
- 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.10/kdeaccessibility/jovie.nix b/pkgs/desktops/kde-4.10/kdeaccessibility/jovie.nix
deleted file mode 100644
index d38c80c4c36..00000000000
--- a/pkgs/desktops/kde-4.10/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.10/kdeaccessibility/kaccessible.nix b/pkgs/desktops/kde-4.10/kdeaccessibility/kaccessible.nix
deleted file mode 100644
index 98fae7c983f..00000000000
--- a/pkgs/desktops/kde-4.10/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.10/kdeaccessibility/kmag.nix b/pkgs/desktops/kde-4.10/kdeaccessibility/kmag.nix
deleted file mode 100644
index 606c61cddb6..00000000000
--- a/pkgs/desktops/kde-4.10/kdeaccessibility/kmag.nix
+++ /dev/null
@@ -1,10 +0,0 @@
-{ kde, kdelibs }:
-
-kde {
-#todo: package qaccessibilityclient
- buildInputs = [ kdelibs ];
-
- meta = {
- description = "Screen magnifier for KDE";
- };
-}
diff --git a/pkgs/desktops/kde-4.10/kdeaccessibility/kmousetool.nix b/pkgs/desktops/kde-4.10/kdeaccessibility/kmousetool.nix
deleted file mode 100644
index 8e0caa76ed9..00000000000
--- a/pkgs/desktops/kde-4.10/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.10/kdeaccessibility/kmouth.nix b/pkgs/desktops/kde-4.10/kdeaccessibility/kmouth.nix
deleted file mode 100644
index 4159501967c..00000000000
--- a/pkgs/desktops/kde-4.10/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.10/kdeadmin/kcron.nix b/pkgs/desktops/kde-4.10/kdeadmin/kcron.nix
deleted file mode 100644
index bada0c1cb10..00000000000
--- a/pkgs/desktops/kde-4.10/kdeadmin/kcron.nix
+++ /dev/null
@@ -1,5 +0,0 @@
-{ kde, kdelibs }:
-
-kde {
- buildInputs = [ kdelibs ];
-}
diff --git a/pkgs/desktops/kde-4.10/kdeadmin/ksystemlog.nix b/pkgs/desktops/kde-4.10/kdeadmin/ksystemlog.nix
deleted file mode 100644
index bada0c1cb10..00000000000
--- a/pkgs/desktops/kde-4.10/kdeadmin/ksystemlog.nix
+++ /dev/null
@@ -1,5 +0,0 @@
-{ kde, kdelibs }:
-
-kde {
- buildInputs = [ kdelibs ];
-}
diff --git a/pkgs/desktops/kde-4.10/kdeadmin/kuser.nix b/pkgs/desktops/kde-4.10/kdeadmin/kuser.nix
deleted file mode 100644
index 571674a461a..00000000000
--- a/pkgs/desktops/kde-4.10/kdeadmin/kuser.nix
+++ /dev/null
@@ -1,5 +0,0 @@
-{ kde, kdelibs, kdepimlibs }:
-
-kde {
- buildInputs = [ kdelibs kdepimlibs ];
-}
diff --git a/pkgs/desktops/kde-4.10/kdeartwork/ColorSchemes.nix b/pkgs/desktops/kde-4.10/kdeartwork/ColorSchemes.nix
deleted file mode 100644
index acccf66976f..00000000000
--- a/pkgs/desktops/kde-4.10/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.10/kdeartwork/FindXscreensaver.cmake b/pkgs/desktops/kde-4.10/kdeartwork/FindXscreensaver.cmake
deleted file mode 100644
index 499ed75268e..00000000000
--- a/pkgs/desktops/kde-4.10/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.10/kdeartwork/HighResolutionWallpapers.nix b/pkgs/desktops/kde-4.10/kdeartwork/HighResolutionWallpapers.nix
deleted file mode 100644
index edffca1562e..00000000000
--- a/pkgs/desktops/kde-4.10/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.10/kdeartwork/IconThemes.nix b/pkgs/desktops/kde-4.10/kdeartwork/IconThemes.nix
deleted file mode 100644
index 43071e8bd14..00000000000
--- a/pkgs/desktops/kde-4.10/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.10/kdeartwork/WeatherWallpapers.nix b/pkgs/desktops/kde-4.10/kdeartwork/WeatherWallpapers.nix
deleted file mode 100644
index 947e5e17ab0..00000000000
--- a/pkgs/desktops/kde-4.10/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.10/kdeartwork/desktopthemes.nix b/pkgs/desktops/kde-4.10/kdeartwork/desktopthemes.nix
deleted file mode 100644
index 93dd361af73..00000000000
--- a/pkgs/desktops/kde-4.10/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.10/kdeartwork/emoticons.nix b/pkgs/desktops/kde-4.10/kdeartwork/emoticons.nix
deleted file mode 100644
index 5ef9f78a719..00000000000
--- a/pkgs/desktops/kde-4.10/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.10/kdeartwork/kscreensaver.nix b/pkgs/desktops/kde-4.10/kdeartwork/kscreensaver.nix
deleted file mode 100644
index 7028b9db228..00000000000
--- a/pkgs/desktops/kde-4.10/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.10/kdeartwork/kwin-styles.nix b/pkgs/desktops/kde-4.10/kdeartwork/kwin-styles.nix
deleted file mode 100644
index b5d769b216d..00000000000
--- a/pkgs/desktops/kde-4.10/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.10/kdeartwork/sounds.nix b/pkgs/desktops/kde-4.10/kdeartwork/sounds.nix
deleted file mode 100644
index e98705da889..00000000000
--- a/pkgs/desktops/kde-4.10/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.10/kdeartwork/styles.nix b/pkgs/desktops/kde-4.10/kdeartwork/styles.nix
deleted file mode 100644
index 6a1306c3710..00000000000
--- a/pkgs/desktops/kde-4.10/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.10/kdeartwork/wallpapers.nix b/pkgs/desktops/kde-4.10/kdeartwork/wallpapers.nix
deleted file mode 100644
index 7c9846fbf9e..00000000000
--- a/pkgs/desktops/kde-4.10/kdeartwork/wallpapers.nix
+++ /dev/null
@@ -1,11 +0,0 @@
-{ kde, kdelibs }:
-
-kde rec {
- name = "kdeartwork-wallpapers";
-
- buildInputs = [ kdelibs ];
-
- meta = {
- description = "Additional KDE wallpapers";
- };
-}
diff --git a/pkgs/desktops/kde-4.10/kdebindings/perlqt.nix b/pkgs/desktops/kde-4.10/kdebindings/perlqt.nix
deleted file mode 100644
index 689223e3148..00000000000
--- a/pkgs/desktops/kde-4.10/kdebindings/perlqt.nix
+++ /dev/null
@@ -1,11 +0,0 @@
-{ kde, cmake, smokeqt, perl }:
-
-kde {
-#todo: qscintilla2, qwt5
- buildInputs = [ smokeqt perl ];
- nativeBuildInputs = [ cmake ];
-
- meta = {
- description = "Perl bindings for Qt library";
- };
-}
diff --git a/pkgs/desktops/kde-4.10/kdebindings/pykde4-hardcode-lib-python.patch b/pkgs/desktops/kde-4.10/kdebindings/pykde4-hardcode-lib-python.patch
deleted file mode 100644
index e7a7cb4c661..00000000000
--- a/pkgs/desktops/kde-4.10/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.10/kdebindings/pykde4.nix b/pkgs/desktops/kde-4.10/kdebindings/pykde4.nix
deleted file mode 100644
index 7f6973c054b..00000000000
--- a/pkgs/desktops/kde-4.10/kdebindings/pykde4.nix
+++ /dev/null
@@ -1,34 +0,0 @@
-{ kde, kdelibs, python, sip, pyqt4, kdepimlibs, shared_desktop_ontologies,
- polkit_qt_1, boost, lndir, pkgconfig }:
-
-let pydir = "lib/python${python.majorVersion}"; in
-
-kde {
-
- # todo: polkit isn't found by the build system
-
- buildInputs = [
- python kdepimlibs shared_desktop_ontologies
- boost polkit_qt_1 pkgconfig
- ];
-
- propagatedBuildInputs = [ pyqt4 sip ];
-
-# patches = [ ./pykde4-hardcode-lib-python.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.10/kdebindings/qtruby-install-prefix.patch b/pkgs/desktops/kde-4.10/kdebindings/qtruby-install-prefix.patch
deleted file mode 100644
index bd95a0d8bd3..00000000000
--- a/pkgs/desktops/kde-4.10/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.10/kdebindings/qtruby.nix b/pkgs/desktops/kde-4.10/kdebindings/qtruby.nix
deleted file mode 100644
index 18a3703426c..00000000000
--- a/pkgs/desktops/kde-4.10/kdebindings/qtruby.nix
+++ /dev/null
@@ -1,15 +0,0 @@
-{ kde, cmake, smokeqt, ruby }:
-
-kde {
-#todo: scintilla2, qwt5
- buildInputs = [ smokeqt ruby ];
- nativeBuildInputs = [ cmake ];
-
- patches = [ ./qtruby-install-prefix.patch ];
-
- cmakeFlags="-DRUBY_ROOT_DIR=${ruby}";
-
- meta = {
- description = "Ruby bindings for Qt library";
- };
-}
diff --git a/pkgs/desktops/kde-4.10/kdebindings/smokegen-CMakeLists.txt-nix.patch b/pkgs/desktops/kde-4.10/kdebindings/smokegen-CMakeLists.txt-nix.patch
deleted file mode 100644
index 33ec3df6452..00000000000
--- a/pkgs/desktops/kde-4.10/kdebindings/smokegen-CMakeLists.txt-nix.patch
+++ /dev/null
@@ -1,14 +0,0 @@
---- smokegen-4.10.5.orig/CMakeLists.txt 2013-06-28 17:14:50.000000000 +0000
-+++ smokegen-4.10.5/CMakeLists.txt 2013-07-31 19:15:17.000000000 +0000
-@@ -36,6 +36,10 @@
- set (CMAKE_SKIP_BUILD_RPATH FALSE)
- set (CMAKE_SKIP_RPATH FALSE)
-
-+# add the automatically determined parts of the RPATH
-+# which point to directories outside the build tree to the install RPATH
-+SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
-+
- configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/config.h.in config.h @ONLY )
-
- add_executable(smokegen ${generator_SRC})
-
diff --git a/pkgs/desktops/kde-4.10/kdebindings/smokegen-SmokeConfig.cmake.in-nix.patch b/pkgs/desktops/kde-4.10/kdebindings/smokegen-SmokeConfig.cmake.in-nix.patch
deleted file mode 100644
index 53257e836e0..00000000000
--- a/pkgs/desktops/kde-4.10/kdebindings/smokegen-SmokeConfig.cmake.in-nix.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-diff -urN smokegen-4.10.5.orig/cmake/SmokeConfig.cmake.in smokegen-4.10.5/cmake/SmokeConfig.cmake.in
---- smokegen-4.10.5.orig/cmake/SmokeConfig.cmake.in 2013-06-28 17:14:50.000000000 +0000
-+++ smokegen-4.10.5/cmake/SmokeConfig.cmake.in 2013-07-30 21:26:33.000000000 +0000
-@@ -80,8 +80,7 @@
- set(SMOKE_API_BIN "@SMOKE_API_BIN@")
-
- find_library(SMOKE_BASE_LIBRARY smokebase
-- PATHS "@SMOKE_LIBRARY_PREFIX@"
-- NO_DEFAULT_PATH)
-+ PATHS "@SMOKE_LIBRARY_PREFIX@")
-
- if (NOT SMOKE_BASE_LIBRARY)
- if (Smoke_FIND_REQUIRED)
diff --git a/pkgs/desktops/kde-4.10/kdebindings/smokegen.nix b/pkgs/desktops/kde-4.10/kdebindings/smokegen.nix
deleted file mode 100644
index 0a3f2a85efa..00000000000
--- a/pkgs/desktops/kde-4.10/kdebindings/smokegen.nix
+++ /dev/null
@@ -1,13 +0,0 @@
-{ kde, qt4, cmake }:
-
-kde {
- buildInputs = [ qt4 ];
- nativeBuildInputs = [ cmake ];
-
- patches = [ ./smokegen-SmokeConfig.cmake.in-nix.patch ./smokegen-CMakeLists.txt-nix.patch ];
-
- meta = {
- description = "C++ parser used to generate language bindings for Qt/KDE";
- license = "GPLv2";
- };
-}
diff --git a/pkgs/desktops/kde-4.10/kdebindings/smokekde.nix b/pkgs/desktops/kde-4.10/kdebindings/smokekde.nix
deleted file mode 100644
index d129686b2de..00000000000
--- a/pkgs/desktops/kde-4.10/kdebindings/smokekde.nix
+++ /dev/null
@@ -1,16 +0,0 @@
-{ kde, cmake, smokeqt, kdelibs, akonadi, kdepimlibs, okular
-, shared_desktop_ontologies, attica }:
-
-kde {
- # attica, akonadi and kdepimlibs are disabled due to smokegen crash
- # okular is disabled because the code generated is broken
- 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.10/kdebindings/smokeqt.nix b/pkgs/desktops/kde-4.10/kdebindings/smokeqt.nix
deleted file mode 100644
index e95b686aee2..00000000000
--- a/pkgs/desktops/kde-4.10/kdebindings/smokeqt.nix
+++ /dev/null
@@ -1,13 +0,0 @@
-{ kde, qt4, cmake, phonon, qimageblitz, smokegen }:
-
-kde {
-#todo: Qwt5, QScintilla2
- 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.10/kdeedu/analitza.nix b/pkgs/desktops/kde-4.10/kdeedu/analitza.nix
deleted file mode 100644
index 74c3a1ebb20..00000000000
--- a/pkgs/desktops/kde-4.10/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.10/kdeedu/blinken.nix b/pkgs/desktops/kde-4.10/kdeedu/blinken.nix
deleted file mode 100644
index cdf9728833c..00000000000
--- a/pkgs/desktops/kde-4.10/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.10/kdeedu/cantor.nix b/pkgs/desktops/kde-4.10/kdeedu/cantor.nix
deleted file mode 100644
index 4563012ac67..00000000000
--- a/pkgs/desktops/kde-4.10/kdeedu/cantor.nix
+++ /dev/null
@@ -1,11 +0,0 @@
-{ kde, kdelibs, libspectre, analitza, R, pkgconfig, gfortran, libqalculate }:
-kde {
-
- buildInputs = [ kdelibs libspectre analitza R gfortran libqalculate];
-
- nativeBuildInputs = [ pkgconfig ];
-
- meta = {
- description = "KDE Frontend to Mathematical Software";
- };
-}
diff --git a/pkgs/desktops/kde-4.10/kdeedu/kalgebra.nix b/pkgs/desktops/kde-4.10/kdeedu/kalgebra.nix
deleted file mode 100644
index 3675c3a225f..00000000000
--- a/pkgs/desktops/kde-4.10/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.10/kdeedu/kalzium.nix b/pkgs/desktops/kde-4.10/kdeedu/kalzium.nix
deleted file mode 100644
index 78fa8119583..00000000000
--- a/pkgs/desktops/kde-4.10/kdeedu/kalzium.nix
+++ /dev/null
@@ -1,11 +0,0 @@
-{ kde, kdelibs, facile, ocaml, eigen, openbabel, avogadro, pkgconfig }:
-kde {
-#todo:chemical mime data
- buildInputs = [ kdelibs facile ocaml eigen openbabel avogadro ];
-
- nativeBuildInputs = [ pkgconfig ];
-
- meta = {
- description = "Periodic Table of Elements";
- };
-}
diff --git a/pkgs/desktops/kde-4.10/kdeedu/kanagram.nix b/pkgs/desktops/kde-4.10/kdeedu/kanagram.nix
deleted file mode 100644
index 8759c96d78c..00000000000
--- a/pkgs/desktops/kde-4.10/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.10/kdeedu/kbruch.nix b/pkgs/desktops/kde-4.10/kdeedu/kbruch.nix
deleted file mode 100644
index dc50f1e85a3..00000000000
--- a/pkgs/desktops/kde-4.10/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.10/kdeedu/kgeography.nix b/pkgs/desktops/kde-4.10/kdeedu/kgeography.nix
deleted file mode 100644
index bd8d27c8d6e..00000000000
--- a/pkgs/desktops/kde-4.10/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.10/kdeedu/khangman.nix b/pkgs/desktops/kde-4.10/kdeedu/khangman.nix
deleted file mode 100644
index 997b50e906a..00000000000
--- a/pkgs/desktops/kde-4.10/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.10/kdeedu/kig.nix b/pkgs/desktops/kde-4.10/kdeedu/kig.nix
deleted file mode 100644
index bd5ef67529c..00000000000
--- a/pkgs/desktops/kde-4.10/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.10/kdeedu/kiten.nix b/pkgs/desktops/kde-4.10/kdeedu/kiten.nix
deleted file mode 100644
index 939b7a9f77a..00000000000
--- a/pkgs/desktops/kde-4.10/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.10/kdeedu/klettres.nix b/pkgs/desktops/kde-4.10/kdeedu/klettres.nix
deleted file mode 100644
index 7a0fa83078e..00000000000
--- a/pkgs/desktops/kde-4.10/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.10/kdeedu/kmplot.nix b/pkgs/desktops/kde-4.10/kdeedu/kmplot.nix
deleted file mode 100644
index 18458cf6f0b..00000000000
--- a/pkgs/desktops/kde-4.10/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.10/kdeedu/kstars.nix b/pkgs/desktops/kde-4.10/kdeedu/kstars.nix
deleted file mode 100644
index ce0a13b969d..00000000000
--- a/pkgs/desktops/kde-4.10/kdeedu/kstars.nix
+++ /dev/null
@@ -1,10 +0,0 @@
-{ kde, kdelibs, eigen, xplanet, indilib }:
-
-kde {
-#todo:wcslib
- buildInputs = [ kdelibs eigen xplanet indilib ];
-
- meta = {
- description = "A KDE graphical desktop planetarium";
- };
-}
diff --git a/pkgs/desktops/kde-4.10/kdeedu/ktouch.nix b/pkgs/desktops/kde-4.10/kdeedu/ktouch.nix
deleted file mode 100644
index 9e606adde33..00000000000
--- a/pkgs/desktops/kde-4.10/kdeedu/ktouch.nix
+++ /dev/null
@@ -1,9 +0,0 @@
-{ kde, kdelibs, libxkbfile }:
-
-kde {
- buildInputs = [ kdelibs libxkbfile ];
-
- meta = {
- description = "Touch Typing Tutor";
- };
-}
diff --git a/pkgs/desktops/kde-4.10/kdeedu/kturtle.nix b/pkgs/desktops/kde-4.10/kdeedu/kturtle.nix
deleted file mode 100644
index 1e1922b1410..00000000000
--- a/pkgs/desktops/kde-4.10/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.10/kdeedu/kwordquiz.nix b/pkgs/desktops/kde-4.10/kdeedu/kwordquiz.nix
deleted file mode 100644
index 1b33ba2e469..00000000000
--- a/pkgs/desktops/kde-4.10/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.10/kdeedu/libkdeedu.nix b/pkgs/desktops/kde-4.10/kdeedu/libkdeedu.nix
deleted file mode 100644
index def6c85fefe..00000000000
--- a/pkgs/desktops/kde-4.10/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.10/kdeedu/marble.nix b/pkgs/desktops/kde-4.10/kdeedu/marble.nix
deleted file mode 100644
index 4f73472f631..00000000000
--- a/pkgs/desktops/kde-4.10/kdeedu/marble.nix
+++ /dev/null
@@ -1,10 +0,0 @@
-{ kde, kdelibs, gpsd }:
-
-kde {
-#todo: package QextSerialPort, libshp(shapelib), QtMobility, QtLocation, libwlocate
- buildInputs = [ kdelibs gpsd ];
-
- meta = {
- description = "Marble Virtual Globe";
- };
-}
diff --git a/pkgs/desktops/kde-4.10/kdeedu/pairs.nix b/pkgs/desktops/kde-4.10/kdeedu/pairs.nix
deleted file mode 100644
index 36c4aba9604..00000000000
--- a/pkgs/desktops/kde-4.10/kdeedu/pairs.nix
+++ /dev/null
@@ -1,9 +0,0 @@
-{ kde, kdelibs }:
-
-kde {
- buildInputs = [ kdelibs ];
-
- meta = {
- description = "A memory and pairs game";
- };
-}
diff --git a/pkgs/desktops/kde-4.10/kdeedu/parley.nix b/pkgs/desktops/kde-4.10/kdeedu/parley.nix
deleted file mode 100644
index f9f86dde150..00000000000
--- a/pkgs/desktops/kde-4.10/kdeedu/parley.nix
+++ /dev/null
@@ -1,9 +0,0 @@
-{ kde, kdelibs, libkdeedu, attica }:
-
-kde {
- buildInputs = [ kdelibs libkdeedu attica ];
-
- meta = {
- description = "Vocabulary Trainer";
- };
-}
diff --git a/pkgs/desktops/kde-4.10/kdeedu/rocs.nix b/pkgs/desktops/kde-4.10/kdeedu/rocs.nix
deleted file mode 100644
index 91976b84001..00000000000
--- a/pkgs/desktops/kde-4.10/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.10/kdeedu/step.nix b/pkgs/desktops/kde-4.10/kdeedu/step.nix
deleted file mode 100644
index fac9974baf1..00000000000
--- a/pkgs/desktops/kde-4.10/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.10/kdegames/bomber.nix b/pkgs/desktops/kde-4.10/kdegames/bomber.nix
deleted file mode 100644
index 026227910f2..00000000000
--- a/pkgs/desktops/kde-4.10/kdegames/bomber.nix
+++ /dev/null
@@ -1,7 +0,0 @@
-{ kde, kdelibs, libkdegames }:
-kde {
- buildInputs = [ kdelibs libkdegames ];
- meta = {
- description = "a single player arcade game. The player is invading various cities in a plane that is decreasing in height";
- };
-}
diff --git a/pkgs/desktops/kde-4.10/kdegames/bovo.nix b/pkgs/desktops/kde-4.10/kdegames/bovo.nix
deleted file mode 100644
index b0e7d99c589..00000000000
--- a/pkgs/desktops/kde-4.10/kdegames/bovo.nix
+++ /dev/null
@@ -1,8 +0,0 @@
-{ kde, kdelibs, libkdegames }:
-kde {
- buildInputs = [ kdelibs libkdegames ];
- meta = {
- description = "a Gomoku (from Japanese 五目並べ - lit. \"five points\") like game for two players, where the opponents alternate in placing their respective pictogram on the game board";
- };
-
-}
diff --git a/pkgs/desktops/kde-4.10/kdegames/granatier.nix b/pkgs/desktops/kde-4.10/kdegames/granatier.nix
deleted file mode 100644
index 9f1ab005309..00000000000
--- a/pkgs/desktops/kde-4.10/kdegames/granatier.nix
+++ /dev/null
@@ -1,7 +0,0 @@
-{ kde, kdelibs, libkdegames }:
-kde {
- buildInputs = [ kdelibs libkdegames ];
- meta = {
- description = "a clone of the classic Bomberman game, inspired by the work of the Clanbomber clone";
- };
-}
diff --git a/pkgs/desktops/kde-4.10/kdegames/kajongg.nix b/pkgs/desktops/kde-4.10/kdegames/kajongg.nix
deleted file mode 100644
index 9a6f5e83695..00000000000
--- a/pkgs/desktops/kde-4.10/kdegames/kajongg.nix
+++ /dev/null
@@ -1,13 +0,0 @@
-{ kde, kdelibs, libkdegames, pythonPackages, sqlite, pykde4 }:
-kde rec {
-
- buildInputs = [ kdelibs libkdegames pythonPackages.python pythonPackages.wrapPython sqlite ] ++ pythonPath;
-
- pythonPath = [ pythonPackages.twisted pykde4 ];
-
- postInstall = "wrapPythonPrograms";
-
- meta = {
- description = "an ancient Chinese board game for 4 players";
- };
-}
diff --git a/pkgs/desktops/kde-4.10/kdegames/kapman.nix b/pkgs/desktops/kde-4.10/kdegames/kapman.nix
deleted file mode 100644
index f10e099da3c..00000000000
--- a/pkgs/desktops/kde-4.10/kdegames/kapman.nix
+++ /dev/null
@@ -1,7 +0,0 @@
-{ kde, kdelibs, libkdegames }:
-kde {
- buildInputs = [ kdelibs libkdegames ];
- meta = {
- description = "a clone of the well known game Pac-Man";
- };
-}
diff --git a/pkgs/desktops/kde-4.10/kdegames/katomic.nix b/pkgs/desktops/kde-4.10/kdegames/katomic.nix
deleted file mode 100644
index a9936c04f0e..00000000000
--- a/pkgs/desktops/kde-4.10/kdegames/katomic.nix
+++ /dev/null
@@ -1,7 +0,0 @@
-{ kde, kdelibs, libkdegames }:
-kde {
- buildInputs = [ kdelibs libkdegames ];
- meta = {
- description = "a fun and educational puzzle game built around molecular geometry";
- };
-}
diff --git a/pkgs/desktops/kde-4.10/kdegames/kblackbox.nix b/pkgs/desktops/kde-4.10/kdegames/kblackbox.nix
deleted file mode 100644
index 27eeff2f65b..00000000000
--- a/pkgs/desktops/kde-4.10/kdegames/kblackbox.nix
+++ /dev/null
@@ -1,7 +0,0 @@
-{ kde, kdelibs, libkdegames }:
-kde {
- buildInputs = [ kdelibs libkdegames ];
- meta = {
- description = "a game of hide and seek played on an grid of boxes, where the player shoots rays into the grid to deduce the positions of hidden objects";
- };
-}
diff --git a/pkgs/desktops/kde-4.10/kdegames/kblocks.nix b/pkgs/desktops/kde-4.10/kdegames/kblocks.nix
deleted file mode 100644
index 98cf068de09..00000000000
--- a/pkgs/desktops/kde-4.10/kdegames/kblocks.nix
+++ /dev/null
@@ -1,7 +0,0 @@
-{ kde, kdelibs, libkdegames }:
-kde {
- buildInputs = [ kdelibs libkdegames ];
- meta = {
- description = "a classic single player falling blocks puzzle game";
- };
-}
diff --git a/pkgs/desktops/kde-4.10/kdegames/kbounce.nix b/pkgs/desktops/kde-4.10/kdegames/kbounce.nix
deleted file mode 100644
index 77fa0db6352..00000000000
--- a/pkgs/desktops/kde-4.10/kdegames/kbounce.nix
+++ /dev/null
@@ -1,7 +0,0 @@
-{ kde, kdelibs, libkdegames }:
-kde {
- buildInputs = [ kdelibs libkdegames ];
- meta = {
- description = "a single player arcade game with the elements of puzzle";
- };
-}
diff --git a/pkgs/desktops/kde-4.10/kdegames/kbreakout.nix b/pkgs/desktops/kde-4.10/kdegames/kbreakout.nix
deleted file mode 100644
index 3a484d919bb..00000000000
--- a/pkgs/desktops/kde-4.10/kdegames/kbreakout.nix
+++ /dev/null
@@ -1,7 +0,0 @@
-{ kde, kdelibs, libkdegames }:
-kde {
- buildInputs = [ kdelibs libkdegames ];
- meta = {
- description = "a Breakout-like game. Its object is to destroy as many bricks as possible without losing the ball";
- };
-}
diff --git a/pkgs/desktops/kde-4.10/kdegames/kdiamond.nix b/pkgs/desktops/kde-4.10/kdegames/kdiamond.nix
deleted file mode 100644
index 06dfcee5ac3..00000000000
--- a/pkgs/desktops/kde-4.10/kdegames/kdiamond.nix
+++ /dev/null
@@ -1,7 +0,0 @@
-{ kde, kdelibs, libkdegames }:
-kde {
- buildInputs = [ kdelibs libkdegames ];
- meta = {
- description = "a single player puzzle game. The object of the game is to build lines of three similar diamonds";
- };
-}
diff --git a/pkgs/desktops/kde-4.10/kdegames/kfourinline.nix b/pkgs/desktops/kde-4.10/kdegames/kfourinline.nix
deleted file mode 100644
index 11b8838e708..00000000000
--- a/pkgs/desktops/kde-4.10/kdegames/kfourinline.nix
+++ /dev/null
@@ -1,7 +0,0 @@
-{ kde, kdelibs, libkdegames }:
-kde {
- buildInputs = [ kdelibs libkdegames ];
- meta = {
- description = "a board game for two players based on the Connect-Four game";
- };
-}
diff --git a/pkgs/desktops/kde-4.10/kdegames/kgoldrunner.nix b/pkgs/desktops/kde-4.10/kdegames/kgoldrunner.nix
deleted file mode 100644
index 6217c47a806..00000000000
--- a/pkgs/desktops/kde-4.10/kdegames/kgoldrunner.nix
+++ /dev/null
@@ -1,7 +0,0 @@
-{ kde, kdelibs, libkdegames }:
-kde {
- buildInputs = [ kdelibs libkdegames ];
- meta = {
- description = "an action game where the hero runs through a maze, climbs stairs, dig holes and dodges enemies in order to collect all the gold nuggets and escape to the next level";
- };
-}
diff --git a/pkgs/desktops/kde-4.10/kdegames/kigo.nix b/pkgs/desktops/kde-4.10/kdegames/kigo.nix
deleted file mode 100644
index 32eee67cc1e..00000000000
--- a/pkgs/desktops/kde-4.10/kdegames/kigo.nix
+++ /dev/null
@@ -1,7 +0,0 @@
-{ kde, kdelibs, libkdegames }:
-kde {
- buildInputs = [ kdelibs libkdegames ];
- meta = {
- description = "an open-source implementation of the popular Go game";
- };
-}
diff --git a/pkgs/desktops/kde-4.10/kdegames/killbots.nix b/pkgs/desktops/kde-4.10/kdegames/killbots.nix
deleted file mode 100644
index d9c1472495e..00000000000
--- a/pkgs/desktops/kde-4.10/kdegames/killbots.nix
+++ /dev/null
@@ -1,7 +0,0 @@
-{ kde, kdelibs, libkdegames }:
-kde {
- buildInputs = [ kdelibs libkdegames ];
- meta = {
- description = "a simple game of evading killer robots";
- };
-}
diff --git a/pkgs/desktops/kde-4.10/kdegames/kiriki.nix b/pkgs/desktops/kde-4.10/kdegames/kiriki.nix
deleted file mode 100644
index 72f7ab67501..00000000000
--- a/pkgs/desktops/kde-4.10/kdegames/kiriki.nix
+++ /dev/null
@@ -1,7 +0,0 @@
-{ kde, kdelibs, libkdegames }:
-kde {
- buildInputs = [ kdelibs libkdegames ];
- meta = {
- description = "an addictive and fun dice game, designed to be played by as many as six players";
- };
-}
diff --git a/pkgs/desktops/kde-4.10/kdegames/kjumpingcube.nix b/pkgs/desktops/kde-4.10/kdegames/kjumpingcube.nix
deleted file mode 100644
index a6d22cff51c..00000000000
--- a/pkgs/desktops/kde-4.10/kdegames/kjumpingcube.nix
+++ /dev/null
@@ -1,7 +0,0 @@
-{ kde, kdelibs, libkdegames }:
-kde {
- buildInputs = [ kdelibs libkdegames ];
- meta = {
- description = "a simple dice driven tactical game";
- };
-}
diff --git a/pkgs/desktops/kde-4.10/kdegames/klickety.nix b/pkgs/desktops/kde-4.10/kdegames/klickety.nix
deleted file mode 100644
index b592bc40641..00000000000
--- a/pkgs/desktops/kde-4.10/kdegames/klickety.nix
+++ /dev/null
@@ -1,7 +0,0 @@
-{ kde, kdelibs, libkdegames }:
-kde {
- buildInputs = [ kdelibs libkdegames ];
- meta = {
- description = "a puzzle game where the player removes groups of colored marbles to clear the board";
- };
-}
diff --git a/pkgs/desktops/kde-4.10/kdegames/klines.nix b/pkgs/desktops/kde-4.10/kdegames/klines.nix
deleted file mode 100644
index 90952fe91c0..00000000000
--- a/pkgs/desktops/kde-4.10/kdegames/klines.nix
+++ /dev/null
@@ -1,7 +0,0 @@
-{ kde, kdelibs, libkdegames }:
-kde {
- buildInputs = [ kdelibs libkdegames ];
- meta = {
- description = "a simple but highly addictive one player game. The player has to move the colored balls around the game board, gathering them into the lines of the same color by five";
- };
-}
diff --git a/pkgs/desktops/kde-4.10/kdegames/kmahjongg.nix b/pkgs/desktops/kde-4.10/kdegames/kmahjongg.nix
deleted file mode 100644
index 946b531ff12..00000000000
--- a/pkgs/desktops/kde-4.10/kdegames/kmahjongg.nix
+++ /dev/null
@@ -1,7 +0,0 @@
-{ kde, kdelibs, libkdegames, libkmahjongg }:
-kde {
- buildInputs = [ kdelibs libkdegames libkmahjongg ];
- meta = {
- description = "the tiles are scrambled and staked on top of each other to resemble a certain shape. The player is then expected to remove all the tiles off the game board by locating each tile's matching pair";
- };
-}
diff --git a/pkgs/desktops/kde-4.10/kdegames/kmines.nix b/pkgs/desktops/kde-4.10/kdegames/kmines.nix
deleted file mode 100644
index 538454e9598..00000000000
--- a/pkgs/desktops/kde-4.10/kdegames/kmines.nix
+++ /dev/null
@@ -1,7 +0,0 @@
-{ kde, kdelibs, libkdegames }:
-kde {
- buildInputs = [ kdelibs libkdegames ];
- meta = {
- description = "a classic Minesweeper game";
- };
-}
diff --git a/pkgs/desktops/kde-4.10/kdegames/knavalbattle.nix b/pkgs/desktops/kde-4.10/kdegames/knavalbattle.nix
deleted file mode 100644
index 42ffd2fcb4d..00000000000
--- a/pkgs/desktops/kde-4.10/kdegames/knavalbattle.nix
+++ /dev/null
@@ -1,7 +0,0 @@
-{ kde, kdelibs, libkdegames }:
-kde {
- buildInputs = [ kdelibs libkdegames ];
- meta = {
- description = "a Battle Ship game";
- };
-}
diff --git a/pkgs/desktops/kde-4.10/kdegames/knetwalk.nix b/pkgs/desktops/kde-4.10/kdegames/knetwalk.nix
deleted file mode 100644
index a16e578ce84..00000000000
--- a/pkgs/desktops/kde-4.10/kdegames/knetwalk.nix
+++ /dev/null
@@ -1,7 +0,0 @@
-{ kde, kdelibs, libkdegames }:
-kde {
- buildInputs = [ kdelibs libkdegames ];
- meta = {
- description = "a small game where you have to build up a computer network by rotating the wires to connect the terminals to the server";
- };
-}
diff --git a/pkgs/desktops/kde-4.10/kdegames/kolf.nix b/pkgs/desktops/kde-4.10/kdegames/kolf.nix
deleted file mode 100644
index 78815ee5799..00000000000
--- a/pkgs/desktops/kde-4.10/kdegames/kolf.nix
+++ /dev/null
@@ -1,7 +0,0 @@
-{ kde, kdelibs, libkdegames }:
-kde {
- buildInputs = [ kdelibs libkdegames ];
- meta = {
- description = "a miniature golf game";
- };
-}
diff --git a/pkgs/desktops/kde-4.10/kdegames/kollision.nix b/pkgs/desktops/kde-4.10/kdegames/kollision.nix
deleted file mode 100644
index 3147c7305ea..00000000000
--- a/pkgs/desktops/kde-4.10/kdegames/kollision.nix
+++ /dev/null
@@ -1,7 +0,0 @@
-{ kde, kdelibs, libkdegames }:
-kde {
- buildInputs = [ kdelibs libkdegames ];
- meta = {
- description = "a simple ball dodging game";
- };
-}
diff --git a/pkgs/desktops/kde-4.10/kdegames/konquest.nix b/pkgs/desktops/kde-4.10/kdegames/konquest.nix
deleted file mode 100644
index 53ddd64928c..00000000000
--- a/pkgs/desktops/kde-4.10/kdegames/konquest.nix
+++ /dev/null
@@ -1,7 +0,0 @@
-{ kde, kdelibs, libkdegames }:
-kde {
- buildInputs = [ kdelibs libkdegames ];
- meta = {
- description = "the KDE version of Gnu-Lactic Konquest";
- };
-}
diff --git a/pkgs/desktops/kde-4.10/kdegames/kpat.nix b/pkgs/desktops/kde-4.10/kdegames/kpat.nix
deleted file mode 100644
index f8d9bad36dc..00000000000
--- a/pkgs/desktops/kde-4.10/kdegames/kpat.nix
+++ /dev/null
@@ -1,7 +0,0 @@
-{ kde, kdelibs, libkdegames }:
-kde {
- buildInputs = [ kdelibs libkdegames ];
- meta = {
- description = "a relaxing card sorting game";
- };
-}
diff --git a/pkgs/desktops/kde-4.10/kdegames/kreversi.nix b/pkgs/desktops/kde-4.10/kdegames/kreversi.nix
deleted file mode 100644
index 2aed981428e..00000000000
--- a/pkgs/desktops/kde-4.10/kdegames/kreversi.nix
+++ /dev/null
@@ -1,7 +0,0 @@
-{ kde, kdelibs, libkdegames }:
-kde {
- buildInputs = [ kdelibs libkdegames ];
- meta = {
- description = "a simple one player strategy game played against the computer. If a player's piece is captured by an opposing player, that piece is turned over to reveal the color of that player";
- };
-}
diff --git a/pkgs/desktops/kde-4.10/kdegames/kshisen.nix b/pkgs/desktops/kde-4.10/kdegames/kshisen.nix
deleted file mode 100644
index 9c888034038..00000000000
--- a/pkgs/desktops/kde-4.10/kdegames/kshisen.nix
+++ /dev/null
@@ -1,7 +0,0 @@
-{ kde, kdelibs, libkdegames, libkmahjongg }:
-kde {
- buildInputs = [ kdelibs libkdegames libkmahjongg ];
- meta = {
- description = "a solitaire-like game played using the standard set of Mahjong tiles";
- };
-}
diff --git a/pkgs/desktops/kde-4.10/kdegames/ksirk.nix b/pkgs/desktops/kde-4.10/kdegames/ksirk.nix
deleted file mode 100644
index 767eb67971a..00000000000
--- a/pkgs/desktops/kde-4.10/kdegames/ksirk.nix
+++ /dev/null
@@ -1,7 +0,0 @@
-{ kde, kdelibs, libkdegames, qca2 }:
-kde {
- buildInputs = [ kdelibs libkdegames qca2 ];
- meta = {
- description = "a computerized version of the well known strategic board game Risk";
- };
-}
diff --git a/pkgs/desktops/kde-4.10/kdegames/ksnakeduel.nix b/pkgs/desktops/kde-4.10/kdegames/ksnakeduel.nix
deleted file mode 100644
index ccf1fb551e9..00000000000
--- a/pkgs/desktops/kde-4.10/kdegames/ksnakeduel.nix
+++ /dev/null
@@ -1,7 +0,0 @@
-{ kde, kdelibs, libkdegames }:
-kde {
- buildInputs = [ kdelibs libkdegames ];
- meta = {
- description = "a simple Tron-Clone";
- };
-}
diff --git a/pkgs/desktops/kde-4.10/kdegames/kspaceduel.nix b/pkgs/desktops/kde-4.10/kdegames/kspaceduel.nix
deleted file mode 100644
index 5285f7916ca..00000000000
--- a/pkgs/desktops/kde-4.10/kdegames/kspaceduel.nix
+++ /dev/null
@@ -1,7 +0,0 @@
-{ kde, kdelibs, libkdegames }:
-kde {
- buildInputs = [ kdelibs libkdegames ];
- meta = {
- description = "each of two possible players control a satellite spaceship orbiting the sun. As the game progresses players have to eliminate the opponent's spacecraft with bullets or mines";
- };
-}
diff --git a/pkgs/desktops/kde-4.10/kdegames/ksquares.nix b/pkgs/desktops/kde-4.10/kdegames/ksquares.nix
deleted file mode 100644
index a17be2da632..00000000000
--- a/pkgs/desktops/kde-4.10/kdegames/ksquares.nix
+++ /dev/null
@@ -1,7 +0,0 @@
-{ kde, kdelibs, libkdegames }:
-kde {
- buildInputs = [ kdelibs libkdegames ];
- meta = {
- description = "a game modeled after the well known pen and paper based game of Dots and Boxes";
- };
-}
diff --git a/pkgs/desktops/kde-4.10/kdegames/ksudoku.nix b/pkgs/desktops/kde-4.10/kdegames/ksudoku.nix
deleted file mode 100644
index ea4e13a5e4f..00000000000
--- a/pkgs/desktops/kde-4.10/kdegames/ksudoku.nix
+++ /dev/null
@@ -1,7 +0,0 @@
-{ kde, kdelibs, libkdegames }:
-kde {
- buildInputs = [ kdelibs libkdegames ];
- meta = {
- description = "a logic-based symbol placement puzzle";
- };
-}
diff --git a/pkgs/desktops/kde-4.10/kdegames/ktuberling.nix b/pkgs/desktops/kde-4.10/kdegames/ktuberling.nix
deleted file mode 100644
index 1a6ba9d653c..00000000000
--- a/pkgs/desktops/kde-4.10/kdegames/ktuberling.nix
+++ /dev/null
@@ -1,7 +0,0 @@
-{ kde, kdelibs, libkdegames }:
-kde {
- buildInputs = [ kdelibs libkdegames ];
- meta = {
- description = "a simple constructor game suitable for children and adults alike";
- };
-}
diff --git a/pkgs/desktops/kde-4.10/kdegames/kubrick.nix b/pkgs/desktops/kde-4.10/kdegames/kubrick.nix
deleted file mode 100644
index 9bdc6879db4..00000000000
--- a/pkgs/desktops/kde-4.10/kdegames/kubrick.nix
+++ /dev/null
@@ -1,7 +0,0 @@
-{ kde, kdelibs, libkdegames }:
-kde {
- buildInputs = [ kdelibs libkdegames ];
- meta = {
- description = "a game based on the Rubik's Cube™ puzzle";
- };
-}
diff --git a/pkgs/desktops/kde-4.10/kdegames/libkdegames.nix b/pkgs/desktops/kde-4.10/kdegames/libkdegames.nix
deleted file mode 100644
index 3819dcdc9ae..00000000000
--- a/pkgs/desktops/kde-4.10/kdegames/libkdegames.nix
+++ /dev/null
@@ -1,7 +0,0 @@
-{ kde, kdelibs, openal, libsndfile }:
-kde {
- buildInputs = [ kdelibs openal libsndfile ];
- meta = {
- description = "KDE games library";
- };
-}
diff --git a/pkgs/desktops/kde-4.10/kdegames/libkmahjongg.nix b/pkgs/desktops/kde-4.10/kdegames/libkmahjongg.nix
deleted file mode 100644
index 383b347dc33..00000000000
--- a/pkgs/desktops/kde-4.10/kdegames/libkmahjongg.nix
+++ /dev/null
@@ -1,7 +0,0 @@
-{ kde, kdelibs, libkdegames }:
-kde {
- buildInputs = [ kdelibs libkdegames ];
- meta = {
- description = "a library for KMahjongg game";
- };
-}
diff --git a/pkgs/desktops/kde-4.10/kdegames/lskat.nix b/pkgs/desktops/kde-4.10/kdegames/lskat.nix
deleted file mode 100644
index 2a5050cd667..00000000000
--- a/pkgs/desktops/kde-4.10/kdegames/lskat.nix
+++ /dev/null
@@ -1,7 +0,0 @@
-{ kde, kdelibs, libkdegames }:
-kde {
- buildInputs = [ kdelibs libkdegames ];
- meta = {
- description = "a fun and engaging card game for two players, where the second player is either live opponent, or a built in artificial intelligence";
- };
-}
diff --git a/pkgs/desktops/kde-4.10/kdegames/palapeli.nix b/pkgs/desktops/kde-4.10/kdegames/palapeli.nix
deleted file mode 100644
index 555ffe43c45..00000000000
--- a/pkgs/desktops/kde-4.10/kdegames/palapeli.nix
+++ /dev/null
@@ -1,8 +0,0 @@
-{ kde, kdelibs, libkdegames }:
-kde {
-#todo:package qvoronoi
- buildInputs = [ kdelibs libkdegames ];
- meta = {
- description = "a single-player jigsaw puzzle game";
- };
-}
diff --git a/pkgs/desktops/kde-4.10/kdegames/picmi.nix b/pkgs/desktops/kde-4.10/kdegames/picmi.nix
deleted file mode 100644
index 165d7422f95..00000000000
--- a/pkgs/desktops/kde-4.10/kdegames/picmi.nix
+++ /dev/null
@@ -1,7 +0,0 @@
-{ kde, kdelibs, libkdegames }:
-kde {
- buildInputs = [ kdelibs libkdegames ];
- meta = {
- description = "a single player logic-based puzzle game";
- };
-}
diff --git a/pkgs/desktops/kde-4.10/kdegraphics/gwenview.nix b/pkgs/desktops/kde-4.10/kdegraphics/gwenview.nix
deleted file mode 100644
index 00910ab9d46..00000000000
--- a/pkgs/desktops/kde-4.10/kdegraphics/gwenview.nix
+++ /dev/null
@@ -1,15 +0,0 @@
-{ kde, kdelibs, exiv2, shared_desktop_ontologies, kde_baseapps, libkipi
-, libjpeg, libtiff, pkgconfig, kactivities, lcms2 }:
-
-kde {
-
- buildInputs =
- [ kdelibs exiv2 shared_desktop_ontologies kactivities kde_baseapps libkipi libjpeg lcms2 ];
-
- nativeBuildInputs = [ pkgconfig ];
-
- meta = {
- description = "Gwenview, the KDE image viewer";
- license = "GPLv2";
- };
-}
diff --git a/pkgs/desktops/kde-4.10/kdegraphics/kamera.nix b/pkgs/desktops/kde-4.10/kdegraphics/kamera.nix
deleted file mode 100644
index 70904b17c23..00000000000
--- a/pkgs/desktops/kde-4.10/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.10/kdegraphics/kcolorchooser.nix b/pkgs/desktops/kde-4.10/kdegraphics/kcolorchooser.nix
deleted file mode 100644
index 58528cb186b..00000000000
--- a/pkgs/desktops/kde-4.10/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.10/kdegraphics/kdegraphics-mobipocket.nix b/pkgs/desktops/kde-4.10/kdegraphics/kdegraphics-mobipocket.nix
deleted file mode 100644
index 2c2ba3796a2..00000000000
--- a/pkgs/desktops/kde-4.10/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.10/kdegraphics/kdegraphics-strigi-analyzer.nix b/pkgs/desktops/kde-4.10/kdegraphics/kdegraphics-strigi-analyzer.nix
deleted file mode 100644
index 35af39aa611..00000000000
--- a/pkgs/desktops/kde-4.10/kdegraphics/kdegraphics-strigi-analyzer.nix
+++ /dev/null
@@ -1,10 +0,0 @@
-{ kde, kdelibs, libtiff }:
-
-kde {
- buildInputs = [ kdelibs libtiff ];
-
- meta = {
- description = "Strigi analyzers for various graphics file formats";
- license = "GPLv2";
- };
-}
diff --git a/pkgs/desktops/kde-4.10/kdegraphics/kdegraphics-thumbnailers.nix b/pkgs/desktops/kde-4.10/kdegraphics/kdegraphics-thumbnailers.nix
deleted file mode 100644
index 55bf8309b2a..00000000000
--- a/pkgs/desktops/kde-4.10/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.10/kdegraphics/kgamma.nix b/pkgs/desktops/kde-4.10/kdegraphics/kgamma.nix
deleted file mode 100644
index 28d9252187e..00000000000
--- a/pkgs/desktops/kde-4.10/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.10/kdegraphics/kolourpaint.nix b/pkgs/desktops/kde-4.10/kdegraphics/kolourpaint.nix
deleted file mode 100644
index 5276ec09f46..00000000000
--- a/pkgs/desktops/kde-4.10/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.10/kdegraphics/kruler.nix b/pkgs/desktops/kde-4.10/kdegraphics/kruler.nix
deleted file mode 100644
index c5c2c6e05d7..00000000000
--- a/pkgs/desktops/kde-4.10/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.10/kdegraphics/ksaneplugin.nix b/pkgs/desktops/kde-4.10/kdegraphics/ksaneplugin.nix
deleted file mode 100644
index 1381ed7dd26..00000000000
--- a/pkgs/desktops/kde-4.10/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.10/kdegraphics/ksnapshot.nix b/pkgs/desktops/kde-4.10/kdegraphics/ksnapshot.nix
deleted file mode 100644
index f01a609e20d..00000000000
--- a/pkgs/desktops/kde-4.10/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.10/kdegraphics/libkdcraw.nix b/pkgs/desktops/kde-4.10/kdegraphics/libkdcraw.nix
deleted file mode 100644
index e8790205cae..00000000000
--- a/pkgs/desktops/kde-4.10/kdegraphics/libkdcraw.nix
+++ /dev/null
@@ -1,10 +0,0 @@
-{ kde, kdelibs, libjpeg, lcms1, jasper }:
-
-kde {
- buildInputs = [ kdelibs libjpeg lcms1 jasper ];
-
- meta = {
- description = "Library for decoding RAW images";
- license = "GPLv2";
- };
-}
diff --git a/pkgs/desktops/kde-4.10/kdegraphics/libkexiv2.nix b/pkgs/desktops/kde-4.10/kdegraphics/libkexiv2.nix
deleted file mode 100644
index 096b0a6e957..00000000000
--- a/pkgs/desktops/kde-4.10/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.10/kdegraphics/libkipi.nix b/pkgs/desktops/kde-4.10/kdegraphics/libkipi.nix
deleted file mode 100644
index 6b16265e7a3..00000000000
--- a/pkgs/desktops/kde-4.10/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.10/kdegraphics/libksane.nix b/pkgs/desktops/kde-4.10/kdegraphics/libksane.nix
deleted file mode 100644
index b539eab3899..00000000000
--- a/pkgs/desktops/kde-4.10/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.10/kdegraphics/okular.nix b/pkgs/desktops/kde-4.10/kdegraphics/okular.nix
deleted file mode 100644
index efc1e8f0742..00000000000
--- a/pkgs/desktops/kde-4.10/kdegraphics/okular.nix
+++ /dev/null
@@ -1,17 +0,0 @@
-{ chmlib, djvulibre, ebook_tools, kde, kdelibs, libspectre, popplerQt4, qca2
-, qimageblitz, libtiff, kactivities, pkgconfig }:
-
-kde {
-
- #todo: package activeapp
-
- buildInputs =
- [ chmlib djvulibre ebook_tools kdelibs libspectre popplerQt4 qca2 qimageblitz libtiff kactivities ];
-
- nativeBuildInputs = [ pkgconfig ];
-
- meta = {
- description = "Okular, the KDE document viewer";
- license = "GPLv2";
- };
-}
diff --git a/pkgs/desktops/kde-4.10/kdegraphics/svgpart.nix b/pkgs/desktops/kde-4.10/kdegraphics/svgpart.nix
deleted file mode 100644
index a344cc4b4b4..00000000000
--- a/pkgs/desktops/kde-4.10/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.10/kdelibs/kdelibs.nix b/pkgs/desktops/kde-4.10/kdelibs/kdelibs.nix
deleted file mode 100644
index 4386317309f..00000000000
--- a/pkgs/desktops/kde-4.10/kdelibs/kdelibs.nix
+++ /dev/null
@@ -1,43 +0,0 @@
-{ kde, gcc, cmake, perl
-, qt4, bzip2, pcre, fam, libxml2, libxslt, shared_mime_info, giflib, jasper
-, openexr, avahi, kerberos, attr, shared_desktop_ontologies, libXScrnSaver
-, automoc4, strigi, soprano, qca2, attica, enchant, libdbusmenu_qt, grantlee
-, docbook_xml_dtd_42, docbook_xsl, polkit_qt_1
-, getopt, udev, herqq, phonon, libjpeg, xz, ilmbase
-, pkgconfig
-}:
-
-kde {
- buildInputs =
- [ pkgconfig attica avahi bzip2 enchant fam giflib grantlee herqq jasper
- libdbusmenu_qt libXScrnSaver libxslt polkit_qt_1 qca2
- shared_desktop_ontologies xz udev libjpeg kerberos openexr
- ];
-
- NIX_CFLAGS_COMPILE = "-I${ilmbase}/include/OpenEXR";
-
- 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.
- # Split plugins from libs?
-
- patches = [ ../files/polkit-install.patch ];
-
- # cmake fails to find acl.h because of C++-style comment
-
- cmakeFlags = [
- "-DDOCBOOKXML_CURRENTDTD_DIR=${docbook_xml_dtd_42}/xml/dtd/docbook"
- "-DDOCBOOKXSL_DIR=${docbook_xsl}/xml/xsl/docbook"
- "-DHUPNP_ENABLED=ON"
- ];
-
- passthru.wantsUdisks2 = false;
-
- meta = {
- description = "KDE libraries";
- license = "LGPL";
- };
-}
diff --git a/pkgs/desktops/kde-4.10/kdelibs/nepomuk-core.nix b/pkgs/desktops/kde-4.10/kdelibs/nepomuk-core.nix
deleted file mode 100644
index cd6f3a179c2..00000000000
--- a/pkgs/desktops/kde-4.10/kdelibs/nepomuk-core.nix
+++ /dev/null
@@ -1,11 +0,0 @@
-{ kde, kdelibs, soprano, shared_desktop_ontologies, exiv2, ffmpeg, taglib, popplerQt4 }:
-
-kde {
-
- buildInputs = [ kdelibs soprano shared_desktop_ontologies taglib exiv2 ffmpeg popplerQt4 ];
-
- meta = {
- description = "NEPOMUK core";
- license = "GPLv2";
- };
-}
diff --git a/pkgs/desktops/kde-4.10/kdelibs/nepomuk-widgets.nix b/pkgs/desktops/kde-4.10/kdelibs/nepomuk-widgets.nix
deleted file mode 100644
index 0d29a4f97de..00000000000
--- a/pkgs/desktops/kde-4.10/kdelibs/nepomuk-widgets.nix
+++ /dev/null
@@ -1,11 +0,0 @@
-{ kde, kdelibs, nepomuk_core }:
-
-kde {
-
- buildInputs = [ kdelibs nepomuk_core ];
-
- meta = {
- description = "NEPOMUK Widgets";
- license = "GPLv2";
- };
-}
diff --git a/pkgs/desktops/kde-4.10/kdemultimedia/audiocd-kio.nix b/pkgs/desktops/kde-4.10/kdemultimedia/audiocd-kio.nix
deleted file mode 100644
index 4c56e7529dd..00000000000
--- a/pkgs/desktops/kde-4.10/kdemultimedia/audiocd-kio.nix
+++ /dev/null
@@ -1,7 +0,0 @@
-{ kde, kdelibs, libkcompactdisc, cdparanoia, libkcddb, libvorbis, flac, lame }:
-kde {
- buildInputs = [ kdelibs libkcompactdisc cdparanoia libkcddb libvorbis flac lame ];
- meta = {
- description = "transparent audio CD access for applications using the KDE Platform";
- };
-}
diff --git a/pkgs/desktops/kde-4.10/kdemultimedia/dragon.nix b/pkgs/desktops/kde-4.10/kdemultimedia/dragon.nix
deleted file mode 100644
index 006300742ec..00000000000
--- a/pkgs/desktops/kde-4.10/kdemultimedia/dragon.nix
+++ /dev/null
@@ -1,7 +0,0 @@
-{ kde, kdelibs }:
-kde {
- buildInputs = [ kdelibs ];
- meta = {
- description = "a multimedia player with the focus on simplicity";
- };
-}
diff --git a/pkgs/desktops/kde-4.10/kdemultimedia/ffmpegthumbs.nix b/pkgs/desktops/kde-4.10/kdemultimedia/ffmpegthumbs.nix
deleted file mode 100644
index 45f6c9abcb6..00000000000
--- a/pkgs/desktops/kde-4.10/kdemultimedia/ffmpegthumbs.nix
+++ /dev/null
@@ -1,7 +0,0 @@
-{ kde, kdelibs, ffmpeg }:
-kde {
- buildInputs = [ kdelibs ffmpeg ];
- meta = {
- description = "a video thumbnail generator for KDE file managers like Dolphin and Konqueror";
- };
-}
diff --git a/pkgs/desktops/kde-4.10/kdemultimedia/juk.nix b/pkgs/desktops/kde-4.10/kdemultimedia/juk.nix
deleted file mode 100644
index 7a1aab85ed7..00000000000
--- a/pkgs/desktops/kde-4.10/kdemultimedia/juk.nix
+++ /dev/null
@@ -1,7 +0,0 @@
-{ kde, kdelibs, taglib }:
-kde {
- buildInputs = [ kdelibs taglib ];
- meta = {
- description = "an audio jukebox application";
- };
-}
diff --git a/pkgs/desktops/kde-4.10/kdemultimedia/kmix.nix b/pkgs/desktops/kde-4.10/kdemultimedia/kmix.nix
deleted file mode 100644
index 1dd8108166f..00000000000
--- a/pkgs/desktops/kde-4.10/kdemultimedia/kmix.nix
+++ /dev/null
@@ -1,7 +0,0 @@
-{ kde, kdelibs, libcanberra, pulseaudio }:
-kde {
- buildInputs = [ kdelibs libcanberra pulseaudio ];
- meta = {
- description = "sound mixer, an application to allow you to change the volume of your sound card";
- };
-}
diff --git a/pkgs/desktops/kde-4.10/kdemultimedia/kscd.nix b/pkgs/desktops/kde-4.10/kdemultimedia/kscd.nix
deleted file mode 100644
index e99ae53935b..00000000000
--- a/pkgs/desktops/kde-4.10/kdemultimedia/kscd.nix
+++ /dev/null
@@ -1,7 +0,0 @@
-{ kde, kdelibs, libmusicbrainz }:
-kde {
- buildInputs = [ kdelibs libmusicbrainz ];
- meta = {
- description = "KDE CD player";
- };
-}
diff --git a/pkgs/desktops/kde-4.10/kdemultimedia/libkcddb.nix b/pkgs/desktops/kde-4.10/kdemultimedia/libkcddb.nix
deleted file mode 100644
index 720b01d1861..00000000000
--- a/pkgs/desktops/kde-4.10/kdemultimedia/libkcddb.nix
+++ /dev/null
@@ -1,8 +0,0 @@
-{ kde, kdelibs }:
-kde {
-#todo: libmusicbrainz5
- buildInputs = [ kdelibs ];
- meta = {
- description = "a library used to retrieve audio CD meta data from the internet";
- };
-}
diff --git a/pkgs/desktops/kde-4.10/kdemultimedia/libkcompactdisc.nix b/pkgs/desktops/kde-4.10/kdemultimedia/libkcompactdisc.nix
deleted file mode 100644
index 6ed08af89f3..00000000000
--- a/pkgs/desktops/kde-4.10/kdemultimedia/libkcompactdisc.nix
+++ /dev/null
@@ -1,7 +0,0 @@
-{ kde, kdelibs }:
-kde {
- buildInputs = [ kdelibs ];
- meta = {
- description = "KDE library for playing & ripping CDs";
- };
-}
diff --git a/pkgs/desktops/kde-4.10/kdemultimedia/mplayerthumbs.nix b/pkgs/desktops/kde-4.10/kdemultimedia/mplayerthumbs.nix
deleted file mode 100644
index c88ebcc2a5a..00000000000
--- a/pkgs/desktops/kde-4.10/kdemultimedia/mplayerthumbs.nix
+++ /dev/null
@@ -1,7 +0,0 @@
-{ kde, kdelibs }:
-kde {
- buildInputs = [ kdelibs ];
- meta = {
- description = "a video thumbnail generator for KDE";
- };
-}
diff --git a/pkgs/desktops/kde-4.10/kdenetwork/FindmsiLBC.cmake b/pkgs/desktops/kde-4.10/kdenetwork/FindmsiLBC.cmake
deleted file mode 100644
index c40b0bed310..00000000000
--- a/pkgs/desktops/kde-4.10/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.10/kdenetwork/kdenetwork-filesharing.nix b/pkgs/desktops/kde-4.10/kdenetwork/kdenetwork-filesharing.nix
deleted file mode 100644
index bada0c1cb10..00000000000
--- a/pkgs/desktops/kde-4.10/kdenetwork/kdenetwork-filesharing.nix
+++ /dev/null
@@ -1,5 +0,0 @@
-{ kde, kdelibs }:
-
-kde {
- buildInputs = [ kdelibs ];
-}
diff --git a/pkgs/desktops/kde-4.10/kdenetwork/kdenetwork-strigi-analyzers.nix b/pkgs/desktops/kde-4.10/kdenetwork/kdenetwork-strigi-analyzers.nix
deleted file mode 100644
index ac28edb8dd9..00000000000
--- a/pkgs/desktops/kde-4.10/kdenetwork/kdenetwork-strigi-analyzers.nix
+++ /dev/null
@@ -1,9 +0,0 @@
-{ kde, kdelibs, boost }:
-
-kde {
- name = "strigi-analyzer-torrent";
-
- buildInputs = [ kdelibs boost ];
-
- #preConfigure = "mv -v kdenetwork-strigi-analyzers kfile-plugins";
-}
diff --git a/pkgs/desktops/kde-4.10/kdenetwork/kdnssd.nix b/pkgs/desktops/kde-4.10/kdenetwork/kdnssd.nix
deleted file mode 100644
index bada0c1cb10..00000000000
--- a/pkgs/desktops/kde-4.10/kdenetwork/kdnssd.nix
+++ /dev/null
@@ -1,5 +0,0 @@
-{ kde, kdelibs }:
-
-kde {
- buildInputs = [ kdelibs ];
-}
diff --git a/pkgs/desktops/kde-4.10/kdenetwork/kget.nix b/pkgs/desktops/kde-4.10/kdenetwork/kget.nix
deleted file mode 100644
index d5f38096a42..00000000000
--- a/pkgs/desktops/kde-4.10/kdenetwork/kget.nix
+++ /dev/null
@@ -1,14 +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
- # kde_baseapps
- gpgme boost libmms qca2 sqlite
- ];
-
- KDEDIRS = libktorrent;
-}
diff --git a/pkgs/desktops/kde-4.10/kdenetwork/kopete-4.10.4-kopete-linphonemediaengine.patch b/pkgs/desktops/kde-4.10/kdenetwork/kopete-4.10.4-kopete-linphonemediaengine.patch
deleted file mode 100644
index ec003732344..00000000000
--- a/pkgs/desktops/kde-4.10/kdenetwork/kopete-4.10.4-kopete-linphonemediaengine.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-diff --git a/kopete/protocols/jabber/googletalk/libjingle/talk/session/phone/linphonemediaengine.cc b/kopete/protocols/jabber/googletalk/libjingle/talk/session/phone/linphonemediaengine.cc
-index 88fdbd1..57c6c05 100644
---- a/kopete/protocols/jabber/googletalk/libjingle/talk/session/phone/linphonemediaengine.cc
-+++ b/kopete/protocols/jabber/googletalk/libjingle/talk/session/phone/linphonemediaengine.cc
-@@ -200,7 +200,7 @@ bool LinphoneVoiceChannel::SetSendCodecs(const std::vector& codecs)
- LOG(LS_INFO) << "Using " << i->name << "/" << i->clockrate;
- pt_ = i->id;
- audio_stream_ = audio_stream_start(&av_profile, -1, "localhost", port1, i->id, 250, 0); /* -1 means that function will choose some free port */
-- port2 = rtp_session_get_local_port(audio_stream_->session);
-+ port2 = rtp_session_get_local_port(audio_stream_->ms.session);
- first = false;
- }
- }
-@@ -211,7 +211,7 @@ bool LinphoneVoiceChannel::SetSendCodecs(const std::vector& codecs)
- // working with a buggy client; let's try PCMU.
- LOG(LS_WARNING) << "Received empty list of codces; using PCMU/8000";
- audio_stream_ = audio_stream_start(&av_profile, -1, "localhost", port1, 0, 250, 0); /* -1 means that function will choose some free port */
-- port2 = rtp_session_get_local_port(audio_stream_->session);
-+ port2 = rtp_session_get_local_port(audio_stream_->ms.session);
- }
-
- return true;
diff --git a/pkgs/desktops/kde-4.10/kdenetwork/kopete-4.10.4-kopete-stun.patch b/pkgs/desktops/kde-4.10/kdenetwork/kopete-4.10.4-kopete-stun.patch
deleted file mode 100644
index d6aa9515b76..00000000000
--- a/pkgs/desktops/kde-4.10/kdenetwork/kopete-4.10.4-kopete-stun.patch
+++ /dev/null
@@ -1,47 +0,0 @@
-diff --git a/kopete/protocols/jabber/googletalk/libjingle/talk/p2p/base/stun.h b/kopete/protocols/jabber/googletalk/libjingle/talk/p2p/base/stun.h
---- a/kopete/protocols/jabber/googletalk/libjingle/talk/p2p/base/stun.h
-+++ b/kopete/protocols/jabber/googletalk/libjingle/talk/p2p/base/stun.h
-@@ -25,16 +25,8 @@
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
--#ifndef __STUN_H__
--#define __STUN_H__
--
--// This file contains classes for dealing with the STUN and TURN protocols.
--// Both protocols use the same wire format.
--
--#include "talk/base/basictypes.h"
--#include "talk/base/bytebuffer.h"
--#include
--#include
-+#ifndef STUN__HH__IN__STUNREQUEST_CYCLIC_PROBLEM_FIX
-+#define STUN__HH__IN__STUNREQUEST_CYCLIC_PROBLEM_FIX
-
- namespace cricket {
-
-@@ -55,6 +47,23 @@
- STUN_DATA_INDICATION = 0x0115
- };
-
-+}
-+
-+#endif // STUN__HH__IN__STUNREQUEST_CYCLIC_PROBLEM_FIX
-+
-+#ifndef __STUN_H__
-+#define __STUN_H__
-+
-+// This file contains classes for dealing with the STUN and TURN protocols.
-+// Both protocols use the same wire format.
-+
-+#include "talk/base/basictypes.h"
-+#include "talk/base/bytebuffer.h"
-+#include
-+#include
-+
-+namespace cricket {
-+
- // These are the types of attributes defined in STUN & TURN. Next to each is
- // the name of the class (T is StunTAttribute) that implements that type.
- enum StunAttributeType {
-
diff --git a/pkgs/desktops/kde-4.10/kdenetwork/kopete-giflib5.patch b/pkgs/desktops/kde-4.10/kdenetwork/kopete-giflib5.patch
deleted file mode 100644
index 1755bdbce76..00000000000
--- a/pkgs/desktops/kde-4.10/kdenetwork/kopete-giflib5.patch
+++ /dev/null
@@ -1,70 +0,0 @@
-Index: b/kopete/protocols/wlm/wlmchatsession.cpp
-===================================================================
---- a/kopete/protocols/wlm/wlmchatsession.cpp
-+++ b/kopete/protocols/wlm/wlmchatsession.cpp
-@@ -63,10 +63,14 @@
- #include "wlmprotocol.h"
- #include "wlmaccount.h"
- #include "wlmchatsessioninkaction.h"
- #ifdef HAVE_GIFLIB
- #include
-+/* old giflib has no GIFLIB_MAJOR, define to avoid cpp warnings */
-+#ifndef GIFLIB_MAJOR
-+#define GIFLIB_MAJOR 4
-+#endif
- #endif
-
- WlmChatSession::WlmChatSession (Kopete::Protocol * protocol,
- const Kopete::Contact * user,
- Kopete::ContactPtrList others,
-@@ -465,15 +469,19 @@ WlmChatSession::slotInviteContact (Kopet
- static void
- printGifErrorMessage()
- {
- #ifdef HAVE_GIFLIB
- #ifdef HAVE_GIF_ERROR_STRING // giflib 4.2.0+
-+#if GIFLIB_MAJOR >= 5
-+ fprintf(stderr, "GIF-LIB error (exact reporting not implemented)\n");
-+#else
- const char * errorString = GifErrorString();
- if (errorString)
- fprintf(stderr, "GIF-LIB error: %s\n", errorString);
- else
- fprintf(stderr, "GIF-LIB undefined error: %d\n", GifError());
-+#endif
- #else // older giflib versions, libungif
- PrintGifError();
- #endif // HAVE_GIF_ERROR_STRING
- #endif // HAVE_GIFLIB
- }
-@@ -481,10 +489,14 @@ printGifErrorMessage()
- /* stolen from kpaint write_to_gif() */
- void
- WlmChatSession::convertToGif( const QPixmap & ink, QString filename)
- {
- #ifdef HAVE_GIFLIB
-+#if GIFLIB_MAJOR >= 5
-+#define FreeMapObject GifFreeMapObject
-+#define MakeMapObject GifMakeMapObject
-+#endif
- int i, status;
- GifFileType *GifFile;
- ColorMapObject *screenColourmap;
- ColorMapObject *imageColourmap;
- QImage img = ink.toImage().convertToFormat(QImage::Format_Indexed8);
-@@ -523,11 +535,15 @@ WlmChatSession::convertToGif( const QPix
- screenColourmap->Colors[i].Green= 0;
- screenColourmap->Colors[i].Blue= 0;
- }
- }
-
-+#if GIFLIB_MAJOR >= 5
-+ GifFile= EGifOpenFileName(QFile::encodeName(filename).constData(), 0, NULL);
-+#else
- GifFile= EGifOpenFileName(QFile::encodeName(filename).constData(), 0);
-+#endif
- if (!GifFile) {
- FreeMapObject(imageColourmap);
- FreeMapObject(screenColourmap);
- return;
- }
diff --git a/pkgs/desktops/kde-4.10/kdenetwork/kopete.nix b/pkgs/desktops/kde-4.10/kdenetwork/kopete.nix
deleted file mode 100644
index b065ae61009..00000000000
--- a/pkgs/desktops/kde-4.10/kdenetwork/kopete.nix
+++ /dev/null
@@ -1,31 +0,0 @@
-{ kde, kdelibs, speex, libmsn, libotr, kdepimlibs, qimageblitz, libktorrent,
- jasper, libidn, mediastreamer, msilbc, pkgconfig, libxslt, giflib,
- libgadu, boost, qca2, gpgme, sqlite, telepathy_qt, shared_desktop_ontologies,
- libjpeg, libmms }:
-
-kde {
-#todo: libmeanwhile, xmms
- buildInputs = [
- kdelibs telepathy_qt shared_desktop_ontologies qca2 gpgme libgadu mediastreamer
- kdepimlibs qimageblitz libktorrent libjpeg sqlite jasper giflib libmsn libotr
- libxslt libidn speex boost libmms msilbc
-];
-
- nativeBuildInputs = [ pkgconfig ];
-
- KDEDIRS = libktorrent;
-
- patchPhase =
- ''
- cp -v ${./FindmsiLBC.cmake} kopete/cmake/modules/FindmsiLBC.cmake
- patch -p1 < ${./kopete-4.10.4-kopete-linphonemediaengine.patch}
- patch -p1 < ${./kopete-4.10.4-kopete-stun.patch}
- patch -p1 < ${./kopete-giflib5.patch}
- '';
-
- cmakeFlags = [ "-DBUILD_skypebuttons=TRUE" ];
-
- meta = {
- description = "A KDE multi-protocol IM client";
- };
-}
diff --git a/pkgs/desktops/kde-4.10/kdenetwork/kppp.nix b/pkgs/desktops/kde-4.10/kdenetwork/kppp.nix
deleted file mode 100644
index bada0c1cb10..00000000000
--- a/pkgs/desktops/kde-4.10/kdenetwork/kppp.nix
+++ /dev/null
@@ -1,5 +0,0 @@
-{ kde, kdelibs }:
-
-kde {
- buildInputs = [ kdelibs ];
-}
diff --git a/pkgs/desktops/kde-4.10/kdenetwork/krdc.nix b/pkgs/desktops/kde-4.10/kdenetwork/krdc.nix
deleted file mode 100644
index 1b7405f1006..00000000000
--- a/pkgs/desktops/kde-4.10/kdenetwork/krdc.nix
+++ /dev/null
@@ -1,5 +0,0 @@
-{ kde, kdelibs, libvncserver, libjpeg }:
-
-kde {
- buildInputs = [ kdelibs libvncserver libjpeg ];
-}
diff --git a/pkgs/desktops/kde-4.10/kdenetwork/krfb.nix b/pkgs/desktops/kde-4.10/kdenetwork/krfb.nix
deleted file mode 100644
index b6c36ea9c15..00000000000
--- a/pkgs/desktops/kde-4.10/kdenetwork/krfb.nix
+++ /dev/null
@@ -1,5 +0,0 @@
-{ kde, kdelibs, libvncserver, libXdamage, libXtst, libjpeg }:
-
-kde {
- buildInputs = [ kdelibs libvncserver libXdamage libXtst libjpeg ];
-}
diff --git a/pkgs/desktops/kde-4.10/kdepim-runtime.nix b/pkgs/desktops/kde-4.10/kdepim-runtime.nix
deleted file mode 100644
index 8fdd9fc8fa1..00000000000
--- a/pkgs/desktops/kde-4.10/kdepim-runtime.nix
+++ /dev/null
@@ -1,14 +0,0 @@
-{ kde, fetchurl, cmake, kdelibs, libxslt, boost, kdepimlibs, akonadi
-, shared_desktop_ontologies }:
-
-kde {
- buildInputs = [
- kdepimlibs akonadi boost shared_desktop_ontologies
- libxslt
- ];
-#todo: libkgapi, libkolab, libkolabxml
- meta = {
- description = "KDE PIM runtime";
- license = "GPL";
- };
-}
diff --git a/pkgs/desktops/kde-4.10/kdepim.nix b/pkgs/desktops/kde-4.10/kdepim.nix
deleted file mode 100644
index dca60d3d4b6..00000000000
--- a/pkgs/desktops/kde-4.10/kdepim.nix
+++ /dev/null
@@ -1,22 +0,0 @@
-{ kde, boost, gpgme, libassuan, libxslt, kdepimlibs, kdepim_runtime
-, akonadi, shared_desktop_ontologies, cyrus_sasl, grantlee, prison
-, nepomuk_widgets, dblatex }:
-
-kde {
-
- buildInputs =
- [ kdepimlibs boost akonadi shared_desktop_ontologies nepomuk_widgets
- libxslt cyrus_sasl gpgme libassuan grantlee prison dblatex
- ];
-
- 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.10/kdepimlibs.nix b/pkgs/desktops/kde-4.10/kdepimlibs.nix
deleted file mode 100644
index 7ec1612b1e5..00000000000
--- a/pkgs/desktops/kde-4.10/kdepimlibs.nix
+++ /dev/null
@@ -1,19 +0,0 @@
-{ kde, pkgconfig, boost, cyrus_sasl, gpgme, libical, openldap, shared_mime_info
-, kdelibs, akonadi, libxslt, prison, nepomuk_core
-, shared_desktop_ontologies, qjson }:
-
-kde {
- nativeBuildInputs = [ pkgconfig ];
-
- buildInputs =
- [ boost gpgme libical libxslt qjson
- openldap cyrus_sasl akonadi shared_desktop_ontologies
- ];
-
- propagatedBuildInputs = [ kdelibs nepomuk_core ];
-
- meta = {
- description = "KDE PIM libraries";
- license = "LGPL";
- };
-}
diff --git a/pkgs/desktops/kde-4.10/kdeplasma-addons.nix b/pkgs/desktops/kde-4.10/kdeplasma-addons.nix
deleted file mode 100644
index 2bd6f5037db..00000000000
--- a/pkgs/desktops/kde-4.10/kdeplasma-addons.nix
+++ /dev/null
@@ -1,22 +0,0 @@
-{ kde, kdelibs, marble, shared_desktop_ontologies, pkgconfig
-, boost, eigen, kde_workspace, attica, python, qca2, qimageblitz
-, kdepimlibs, libkexiv2, libqalculate, libXtst, libdbusmenu_qt
-, qjson, qoauth }:
-# TODO: qwt, scim, ibus
-
-kde {
-
- KDEDIRS=marble;
-
- buildInputs = [ kdelibs boost kde_workspace kdepimlibs attica qjson qoauth
- eigen qca2 libXtst qimageblitz
- libqalculate shared_desktop_ontologies marble libkexiv2 libdbusmenu_qt
-];
-
- nativeBuildInputs = [ pkgconfig ];
-
- meta = {
- description = "KDE Plasma Addons";
- license = "GPL";
- };
-}
diff --git a/pkgs/desktops/kde-4.10/kdesdk/cervisia.nix b/pkgs/desktops/kde-4.10/kdesdk/cervisia.nix
deleted file mode 100644
index 1dabe46cd42..00000000000
--- a/pkgs/desktops/kde-4.10/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.10/kdesdk/dolphin-plugins-bazaar.nix b/pkgs/desktops/kde-4.10/kdesdk/dolphin-plugins-bazaar.nix
deleted file mode 100644
index 500dffc809e..00000000000
--- a/pkgs/desktops/kde-4.10/kdesdk/dolphin-plugins-bazaar.nix
+++ /dev/null
@@ -1,15 +0,0 @@
-{ kde, kdelibs, kde_baseapps }:
-
-kde {
-
- # Needs kdebase for libkonq
- buildInputs = [ kdelibs kde_baseapps ];
-
- patchPhase = ''
- sed -i 's@macro_optional_add_subdirectory(bazaar)@add_subdirectory(bazaar)@' dolphin-plugins/CMakeLists.txt
- '';
-
- meta = {
- description = "Bazaar plugin for dolphin";
- };
-}
diff --git a/pkgs/desktops/kde-4.10/kdesdk/dolphin-plugins-git.nix b/pkgs/desktops/kde-4.10/kdesdk/dolphin-plugins-git.nix
deleted file mode 100644
index 2da3603c3be..00000000000
--- a/pkgs/desktops/kde-4.10/kdesdk/dolphin-plugins-git.nix
+++ /dev/null
@@ -1,15 +0,0 @@
-{ kde, kdelibs, kde_baseapps }:
-
-kde {
-
- # Needs kdebase for libkonq
- buildInputs = [ kdelibs kde_baseapps ];
-
- patchPhase = ''
- sed -i 's@macro_optional_add_subdirectory(git)@add_subdirectory(git)@' dolphin-plugins/CMakeLists.txt
- '';
-
- meta = {
- description = "Git plugin for dolphin";
- };
-}
diff --git a/pkgs/desktops/kde-4.10/kdesdk/dolphin-plugins-hg.nix b/pkgs/desktops/kde-4.10/kdesdk/dolphin-plugins-hg.nix
deleted file mode 100644
index 20925842a32..00000000000
--- a/pkgs/desktops/kde-4.10/kdesdk/dolphin-plugins-hg.nix
+++ /dev/null
@@ -1,15 +0,0 @@
-{ kde, kdelibs, kde_baseapps }:
-
-kde {
-
- # Needs kdebase for libkonq
- buildInputs = [ kdelibs kde_baseapps ];
-
- patchPhase = ''
- sed -i 's@macro_optional_add_subdirectory(hg)@add_subdirectory(hg)@' dolphin-plugins/CMakeLists.txt
- '';
-
- meta = {
- description = "Mercurial plugin for dolphin";
- };
-}
diff --git a/pkgs/desktops/kde-4.10/kdesdk/dolphin-plugins-svn.nix b/pkgs/desktops/kde-4.10/kdesdk/dolphin-plugins-svn.nix
deleted file mode 100644
index fafdcc55a1f..00000000000
--- a/pkgs/desktops/kde-4.10/kdesdk/dolphin-plugins-svn.nix
+++ /dev/null
@@ -1,15 +0,0 @@
-{ kde, kdelibs, kde_baseapps }:
-
-kde {
-
- # Needs kdebase for libkonq
- buildInputs = [ kdelibs kde_baseapps ];
-
- patchPhase = ''
- sed -i 's@macro_optional_add_subdirectory(svn)@add_subdirectory(svn)@' dolphin-plugins/CMakeLists.txt
- '';
-
- meta = {
- description = "Svn plugin for dolphin";
- };
-}
diff --git a/pkgs/desktops/kde-4.10/kdesdk/kapptemplate.nix b/pkgs/desktops/kde-4.10/kdesdk/kapptemplate.nix
deleted file mode 100644
index 391536248dd..00000000000
--- a/pkgs/desktops/kde-4.10/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.10/kdesdk/kcachegrind.nix b/pkgs/desktops/kde-4.10/kdesdk/kcachegrind.nix
deleted file mode 100644
index 65d410cca48..00000000000
--- a/pkgs/desktops/kde-4.10/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.10/kdesdk/kde-dev-scripts.nix b/pkgs/desktops/kde-4.10/kdesdk/kde-dev-scripts.nix
deleted file mode 100644
index df81145e5d6..00000000000
--- a/pkgs/desktops/kde-4.10/kdesdk/kde-dev-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.10/kdesdk/kde-dev-utils.nix b/pkgs/desktops/kde-4.10/kdesdk/kde-dev-utils.nix
deleted file mode 100644
index 85b6ea6ac00..00000000000
--- a/pkgs/desktops/kde-4.10/kdesdk/kde-dev-utils.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 = "various KDE development utilities";
- };
-}
diff --git a/pkgs/desktops/kde-4.10/kdesdk/kdesdk-strigi-analyzers.nix b/pkgs/desktops/kde-4.10/kdesdk/kdesdk-strigi-analyzers.nix
deleted file mode 100644
index 4d579b88ba8..00000000000
--- a/pkgs/desktops/kde-4.10/kdesdk/kdesdk-strigi-analyzers.nix
+++ /dev/null
@@ -1,9 +0,0 @@
-{ kde, kdelibs }:
-
-kde {
- buildInputs = [ kdelibs ];
-
- meta = {
- description = "Strigi analyzers for diff, po and ts";
- };
-}
diff --git a/pkgs/desktops/kde-4.10/kdesdk/kdesdk-thumbnailers.nix b/pkgs/desktops/kde-4.10/kdesdk/kdesdk-thumbnailers.nix
deleted file mode 100644
index f96b0df2b95..00000000000
--- a/pkgs/desktops/kde-4.10/kdesdk/kdesdk-thumbnailers.nix
+++ /dev/null
@@ -1,12 +0,0 @@
-{ kde, kdelibs, gettext }:
-
-kde {
-
- buildInputs = [ kdelibs gettext ];
-
- patches = [ ./thumbnailers-add-subdirectory.patch ];
-
- meta = {
- description = "PO file format thumbnailer";
- };
-}
diff --git a/pkgs/desktops/kde-4.10/kdesdk/kioslave-perldoc.nix b/pkgs/desktops/kde-4.10/kdesdk/kioslave-perldoc.nix
deleted file mode 100644
index 4c45be6b4fe..00000000000
--- a/pkgs/desktops/kde-4.10/kdesdk/kioslave-perldoc.nix
+++ /dev/null
@@ -1,12 +0,0 @@
-{ kde, kdelibs, perl }:
-
-kde {
-
- buildInputs = [ kdelibs perl ];
-
- cmakeFlags = [ "-DBUILD_perldoc=ON" ];
-
- meta = {
- description = "perldoc: kioslave";
- };
-}
diff --git a/pkgs/desktops/kde-4.10/kdesdk/kioslave-svn.nix b/pkgs/desktops/kde-4.10/kdesdk/kioslave-svn.nix
deleted file mode 100644
index 0574241353d..00000000000
--- a/pkgs/desktops/kde-4.10/kdesdk/kioslave-svn.nix
+++ /dev/null
@@ -1,10 +0,0 @@
-{ kde, kdelibs, subversionClient, apr, aprutil }:
-
-kde {
-
- buildInputs = [ kdelibs subversionClient apr aprutil ];
-
- meta = {
- description = "Subversion kioslave";
- };
-}
diff --git a/pkgs/desktops/kde-4.10/kdesdk/kompare.nix b/pkgs/desktops/kde-4.10/kdesdk/kompare.nix
deleted file mode 100644
index 1ddb4b8ea5b..00000000000
--- a/pkgs/desktops/kde-4.10/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.10/kdesdk/lokalize.nix b/pkgs/desktops/kde-4.10/kdesdk/lokalize.nix
deleted file mode 100644
index 1565426eb1f..00000000000
--- a/pkgs/desktops/kde-4.10/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.10/kdesdk/okteta.nix b/pkgs/desktops/kde-4.10/kdesdk/okteta.nix
deleted file mode 100644
index 058636596ad..00000000000
--- a/pkgs/desktops/kde-4.10/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.10/kdesdk/poxml.nix b/pkgs/desktops/kde-4.10/kdesdk/poxml.nix
deleted file mode 100644
index 1ab9ed49df5..00000000000
--- a/pkgs/desktops/kde-4.10/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.10/kdesdk/thumbnailers-add-subdirectory.patch b/pkgs/desktops/kde-4.10/kdesdk/thumbnailers-add-subdirectory.patch
deleted file mode 100644
index 5b4f7643bf4..00000000000
--- a/pkgs/desktops/kde-4.10/kdesdk/thumbnailers-add-subdirectory.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-diff -Naur kdesdk-4.10.2-upstream/kdesdk-thumbnailers/CMakeLists.txt kdesdk-4.10.2/kdesdk-thumbnailers/CMakeLists.txt
---- kdesdk-4.10.2-upstream/kdesdk-thumbnailers/CMakeLists.txt 2013-05-02 21:05:56.446226846 -0430
-+++ kdesdk-4.10.2/kdesdk-thumbnailers/CMakeLists.txt 2013-05-02 21:09:58.504053136 -0430
-@@ -9,7 +9,7 @@
- macro_log_feature(GETTEXTPO_FOUND "gettext-po" "A library for processing PO files" "www.gnu.org/software/gettext" FALSE "" "Required to build the PO thumbnailer")
-
- if(GETTEXTPO_FOUND)
--macro_optional_add_subdirectory(po_thumbnailer)
-+add_subdirectory(po_thumbnailer)
- endif(GETTEXTPO_FOUND)
-
- macro_display_feature_log()
diff --git a/pkgs/desktops/kde-4.10/kdesdk/umbrello.nix b/pkgs/desktops/kde-4.10/kdesdk/umbrello.nix
deleted file mode 100644
index e83a2d9a901..00000000000
--- a/pkgs/desktops/kde-4.10/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.10/kdetoys/amor.nix b/pkgs/desktops/kde-4.10/kdetoys/amor.nix
deleted file mode 100644
index 936d63d544a..00000000000
--- a/pkgs/desktops/kde-4.10/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.10/kdetoys/kteatime.nix b/pkgs/desktops/kde-4.10/kdetoys/kteatime.nix
deleted file mode 100644
index dacf54def4b..00000000000
--- a/pkgs/desktops/kde-4.10/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.10/kdetoys/ktux.nix b/pkgs/desktops/kde-4.10/kdetoys/ktux.nix
deleted file mode 100644
index 108f9be7c72..00000000000
--- a/pkgs/desktops/kde-4.10/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.10/kdeutils/ark.nix b/pkgs/desktops/kde-4.10/kdeutils/ark.nix
deleted file mode 100644
index eb3e12281d6..00000000000
--- a/pkgs/desktops/kde-4.10/kdeutils/ark.nix
+++ /dev/null
@@ -1,9 +0,0 @@
-{ kde, kdelibs, libarchive, bzip2, kde_baseapps, lzma, qjson }:
-
-kde {
- buildInputs = [ kdelibs kde_baseapps libarchive bzip2 lzma qjson ];
-
- meta = {
- description = "KDE Archiving Tool";
- };
-}
diff --git a/pkgs/desktops/kde-4.10/kdeutils/filelight.nix b/pkgs/desktops/kde-4.10/kdeutils/filelight.nix
deleted file mode 100644
index 25ecabed27c..00000000000
--- a/pkgs/desktops/kde-4.10/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.10/kdeutils/kcalc.nix b/pkgs/desktops/kde-4.10/kdeutils/kcalc.nix
deleted file mode 100644
index 08b202e8f0e..00000000000
--- a/pkgs/desktops/kde-4.10/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.10/kdeutils/kcharselect.nix b/pkgs/desktops/kde-4.10/kdeutils/kcharselect.nix
deleted file mode 100644
index d4c9c06f483..00000000000
--- a/pkgs/desktops/kde-4.10/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.10/kdeutils/kdf.nix b/pkgs/desktops/kde-4.10/kdeutils/kdf.nix
deleted file mode 100644
index 4b02c12d88a..00000000000
--- a/pkgs/desktops/kde-4.10/kdeutils/kdf.nix
+++ /dev/null
@@ -1,11 +0,0 @@
-{ kde, kdelibs }:
-
-kde {
- buildInputs = [ kdelibs ];
-
- enableParallelBuilding = false;
-
- meta = {
- description = "KDE free disk space utility";
- };
-}
diff --git a/pkgs/desktops/kde-4.10/kdeutils/kfloppy.nix b/pkgs/desktops/kde-4.10/kdeutils/kfloppy.nix
deleted file mode 100644
index 2434a4fa671..00000000000
--- a/pkgs/desktops/kde-4.10/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.10/kdeutils/kgpg.nix b/pkgs/desktops/kde-4.10/kdeutils/kgpg.nix
deleted file mode 100644
index f3b00a5b968..00000000000
--- a/pkgs/desktops/kde-4.10/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.10/kdeutils/kremotecontrol.nix b/pkgs/desktops/kde-4.10/kdeutils/kremotecontrol.nix
deleted file mode 100644
index 70311a789f9..00000000000
--- a/pkgs/desktops/kde-4.10/kdeutils/kremotecontrol.nix
+++ /dev/null
@@ -1,9 +0,0 @@
-{ kde, kdelibs, libXtst }:
-
-kde {
- buildInputs = [ kdelibs libXtst ];
-
- meta = {
- description = "KDE remote control";
- };
-}
diff --git a/pkgs/desktops/kde-4.10/kdeutils/ktimer.nix b/pkgs/desktops/kde-4.10/kdeutils/ktimer.nix
deleted file mode 100644
index 5700977349e..00000000000
--- a/pkgs/desktops/kde-4.10/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.10/kdeutils/kwallet.nix b/pkgs/desktops/kde-4.10/kdeutils/kwallet.nix
deleted file mode 100644
index 9ec0e6c0396..00000000000
--- a/pkgs/desktops/kde-4.10/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.10/kdeutils/print-manager.nix b/pkgs/desktops/kde-4.10/kdeutils/print-manager.nix
deleted file mode 100644
index 99feaf3e4f9..00000000000
--- a/pkgs/desktops/kde-4.10/kdeutils/print-manager.nix
+++ /dev/null
@@ -1,28 +0,0 @@
-{ kde, kdelibs
-, pythonPackages, cups, 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 = [ cups 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 manager";
- longDescription = "Applet to view current print jobs and configure new printers";
- };
-}
diff --git a/pkgs/desktops/kde-4.10/kdeutils/superkaramba.nix b/pkgs/desktops/kde-4.10/kdeutils/superkaramba.nix
deleted file mode 100644
index cbe7a285606..00000000000
--- a/pkgs/desktops/kde-4.10/kdeutils/superkaramba.nix
+++ /dev/null
@@ -1,11 +0,0 @@
-{ kde, kdelibs, qimageblitz, python }:
-
-kde {
- buildInputs = [ kdelibs qimageblitz python ];
-
- cmakeFlags = [ "-DBUILD_icons=TRUE" "-DBUILD_plasma=TRUE" ];
-
- meta = {
- description = "A KDE Eye-candy Application";
- };
-}
diff --git a/pkgs/desktops/kde-4.10/kdeutils/sweeper.nix b/pkgs/desktops/kde-4.10/kdeutils/sweeper.nix
deleted file mode 100644
index 78d56c7df30..00000000000
--- a/pkgs/desktops/kde-4.10/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.10/kdewebdev/kfilereplace.nix b/pkgs/desktops/kde-4.10/kdewebdev/kfilereplace.nix
deleted file mode 100644
index 55e37809e07..00000000000
--- a/pkgs/desktops/kde-4.10/kdewebdev/kfilereplace.nix
+++ /dev/null
@@ -1,10 +0,0 @@
-{ kde, kdelibs }:
-
-kde {
- buildInputs = [ kdelibs ];
-
- meta = {
- description = "Batch search and replace tool";
- homepage = http://www.kdewebdev.org;
- };
-}
diff --git a/pkgs/desktops/kde-4.10/kdewebdev/kimagemapeditor.nix b/pkgs/desktops/kde-4.10/kdewebdev/kimagemapeditor.nix
deleted file mode 100644
index 6d22f72461f..00000000000
--- a/pkgs/desktops/kde-4.10/kdewebdev/kimagemapeditor.nix
+++ /dev/null
@@ -1,10 +0,0 @@
-{ kde, kdelibs }:
-
-kde {
- buildInputs = [ kdelibs ];
-
- meta = {
- description = "An HTML imagemap editor";
- homepage = http://www.nongnu.org/kimagemap/;
- };
-}
diff --git a/pkgs/desktops/kde-4.10/kdewebdev/klinkstatus.nix b/pkgs/desktops/kde-4.10/kdewebdev/klinkstatus.nix
deleted file mode 100644
index 21971beb80a..00000000000
--- a/pkgs/desktops/kde-4.10/kdewebdev/klinkstatus.nix
+++ /dev/null
@@ -1,12 +0,0 @@
-{ kde, kdelibs, libxml2, libxslt, kdepimlibs, htmlTidy, boost }:
-
-kde {
-#todo: ruby is not found. needed for some example scripts
- buildInputs =
- [ kdelibs kdepimlibs htmlTidy boost ];
-
- meta = {
- description = "A KDE link checker";
- homepage = http://klinkstatus.kdewebdev.org;
- };
-}
diff --git a/pkgs/desktops/kde-4.10/kdewebdev/kommander.nix b/pkgs/desktops/kde-4.10/kdewebdev/kommander.nix
deleted file mode 100644
index d5f4337f714..00000000000
--- a/pkgs/desktops/kde-4.10/kdewebdev/kommander.nix
+++ /dev/null
@@ -1,9 +0,0 @@
-{ kde, kdelibs }:
-
-kde {
- buildInputs = [ kdelibs ];
-
- meta = {
- description = "A graphical editor of scripted dialogs";
- };
-}
diff --git a/pkgs/desktops/kde-4.10/l10n/default.nix b/pkgs/desktops/kde-4.10/l10n/default.nix
deleted file mode 100644
index fa6406043b1..00000000000
--- a/pkgs/desktops/kde-4.10/l10n/default.nix
+++ /dev/null
@@ -1,46 +0,0 @@
-{ stdenv, fetchurl, kdelibs, gettext, release, branch, 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}";
- inherit branch;
- 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.10/l10n/l10n-manifest.sh b/pkgs/desktops/kde-4.10/l10n/l10n-manifest.sh
deleted file mode 100755
index ec159a1e204..00000000000
--- a/pkgs/desktops/kde-4.10/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.10/l10n/manifest-4.10.4.nix b/pkgs/desktops/kde-4.10/l10n/manifest-4.10.4.nix
deleted file mode 100644
index 67abb386a48..00000000000
--- a/pkgs/desktops/kde-4.10/l10n/manifest-4.10.4.nix
+++ /dev/null
@@ -1,282 +0,0 @@
-[
-{
- lang = "ar";
- saneName = "ar";
- sha256 = "1pkca1z620pwd8nk53wpbg6490nzd21i71691dmp233mgb8pzwfz";
-}
-{
- lang = "bg";
- saneName = "bg";
- sha256 = "1zsml7q434m5242my2y14b5b708ccrmyrvkbl231mjxdqmy137g8";
-}
-{
- lang = "bs";
- saneName = "bs";
- sha256 = "0qbhix7xxabcgwyjrqhvhqfm2gs72swj2wdbh99csb8y3ms4bhwm";
-}
-{
- lang = "ca";
- saneName = "ca";
- sha256 = "1hfj9ram95fsv4qbjv6mwc01sl15vw8cj0q7vy3jjvamcjlczn4q";
-}
-{
- lang = "ca@valencia";
- saneName = "ca_valencia";
- sha256 = "19vjxcpvbrip18j26sbs4h16wisvpryfdf4v7z6kg716k6pgj0gb";
-}
-{
- lang = "cs";
- saneName = "cs";
- sha256 = "1nvyazb2dv03k68shqj7crx01yiwzh1zs5al84ym3j18drq8b66r";
-}
-{
- lang = "da";
- saneName = "da";
- sha256 = "1pclmjkb7c2c6k62pilgi6r7bxw2clpb5vj46n0rdhhr97vfschn";
-}
-{
- lang = "de";
- saneName = "de";
- sha256 = "15qkm1004mq8g3y7jdhsziabf5c1c57p5h57086ngk9x61r2gfmx";
-}
-{
- lang = "el";
- saneName = "el";
- sha256 = "1il49v54qfc1gy9scqal9fjpkjxk3wpzylcz6n5372n01mgs8ydz";
-}
-{
- lang = "en_GB";
- saneName = "en_GB";
- sha256 = "1c25p3byhlv41b82hlpq6agpnfd5vzfm7a9fb8h7jh8va5ifqwac";
-}
-{
- lang = "es";
- saneName = "es";
- sha256 = "1wa15glj0a11phcm69yaz532j4412vqx1h4cwhddyr2l3d7g135i";
-}
-{
- lang = "et";
- saneName = "et";
- sha256 = "1hsq8213mzxzasydgrmcgid85r9d1p1fgkabb5wd66xz5kgjc5v7";
-}
-{
- lang = "eu";
- saneName = "eu";
- sha256 = "1xw7hnlqq05bfsgb74qhis8dcnr7nllm3vm2mc4n8g5n7h8c0hq4";
-}
-{
- lang = "fa";
- saneName = "fa";
- sha256 = "0z0v9m7z557jmqdngw4km4icaxhzlc5np7rzsnzgsqm2xnapc1cm";
-}
-{
- lang = "fi";
- saneName = "fi";
- sha256 = "0jvy10459fc58d21azbk3jjnq1pb3n4a8v5ynw0f2pcizgivrlm3";
-}
-{
- lang = "fr";
- saneName = "fr";
- sha256 = "15wnqcqz1xrdw33xiff0xfnyd56x3hj9nk4i1sxkkymfay2jkdgk";
-}
-{
- lang = "ga";
- saneName = "ga";
- sha256 = "1n7vzhyph2rr22isnzr7r4yrchkzrgwa1xw00ncpmj4k81gl7yl3";
-}
-{
- lang = "gl";
- saneName = "gl";
- sha256 = "0hqlhl19y9bc262kk0s5grgvg3xy0gvcvkrcwy2casmrsx3p5f1y";
-}
-{
- lang = "he";
- saneName = "he";
- sha256 = "0yh6l1ypy3h1bgs1kbnjj7fbhap4a416zlsbsd7d4g71dq7hsm1p";
-}
-{
- lang = "hi";
- saneName = "hi";
- sha256 = "03j1dvylczy360dndpny9qfijfnacv185qwlji7zj4x83y69zfdc";
-}
-{
- lang = "hr";
- saneName = "hr";
- sha256 = "1257lwczcyh6nbp3s8078l2h6yj04wqxa4iak7k3q79l8x2jhch6";
-}
-{
- lang = "hu";
- saneName = "hu";
- sha256 = "1mvqfmmajgf5iyscalmrsipa9vy5b6ap7bdarl0d1i4nwh1g8mxq";
-}
-{
- lang = "ia";
- saneName = "ia";
- sha256 = "0cq6c2ky8gydzk5rz5yjgb3lp7n2d9h760q7m8skq9f8hks7vlic";
-}
-{
- lang = "is";
- saneName = "is";
- sha256 = "1149l8i96iq195cjzbrrdzxck1zd34w6y8hxs8p6jz49bzf5g5c5";
-}
-{
- lang = "it";
- saneName = "it";
- sha256 = "0n4b7x0xxvmlr55b602pi7bxmrcpsqcc4qk4x58x2kpb9awh896i";
-}
-{
- lang = "ja";
- saneName = "ja";
- sha256 = "1dfy3kzqx0xm52jp7gzph0xm6zrwb9y3mssyw4shmnvhlf13xkki";
-}
-{
- lang = "kk";
- saneName = "kk";
- sha256 = "1gd6vnh2vwn4lj8c0qmq7avaz79zv2ldqyb07d2wmvpljpifz5fk";
-}
-{
- lang = "km";
- saneName = "km";
- sha256 = "0q619ddjj928v376j1ljn2k6br7zlazfkk9q4hndi6kql1712139";
-}
-{
- lang = "ko";
- saneName = "ko";
- sha256 = "1jmfxpz3pf2zglysjnry0ahygvkapk6v844q1nhsmfci6mmpmlqh";
-}
-{
- lang = "lt";
- saneName = "lt";
- sha256 = "01f6krx8ll9jhih5205fxsb0dz3ynwpz43byq7qyi68f1lkaxsd0";
-}
-{
- lang = "lv";
- saneName = "lv";
- sha256 = "0xnl28havz92ar5gid3p2r8wap3yrsg143fghqcdiymbzwy3sb0k";
-}
-{
- lang = "mr";
- saneName = "mr";
- sha256 = "1arc5ksxgwvk2i669nhm2y78qf4zd1z3z8fjpixf6ax9g3bqdghd";
-}
-{
- lang = "nb";
- saneName = "nb";
- sha256 = "1fk0g008pdw4gpbzbycl6xck0m7mf56f27rfa10riy9drmi7bcbj";
-}
-{
- lang = "nds";
- saneName = "nds";
- sha256 = "1g2gwslqk0zfayhd91mbgl3gwznj8npq9637c3wkk3kdnz6hcsw0";
-}
-{
- lang = "nl";
- saneName = "nl";
- sha256 = "1j6dw63jph3dbi0v4rlq3mp98fijynd4n0a6z4dwmzdjzb5ccqrg";
-}
-{
- lang = "nn";
- saneName = "nn";
- sha256 = "0m5i7i6rscqwwx4l0fw0bmg1247hbs3bxbnxmqbz6fv5pp29yh4v";
-}
-{
- lang = "pa";
- saneName = "pa";
- sha256 = "0bn3bf6pkjvr0la5n4s3lb1ij0q2rh4qx8ig6sbkq0j822c84n11";
-}
-{
- lang = "pl";
- saneName = "pl";
- sha256 = "09gw92a41ws5lxapw0160pqrqfhfnk42yshlzmdk3aav88rq1f0q";
-}
-{
- lang = "pt";
- saneName = "pt";
- sha256 = "1lyh8szfwbd3jm3gsndgigz1xhzldh246c2d6f4lsry9w9557gpl";
-}
-{
- lang = "pt_BR";
- saneName = "pt_BR";
- sha256 = "12vgf8qx8244brvfy7mi8ak1nxh9fclj9n2yic5ldf2wfkb7hzjd";
-}
-{
- lang = "ro";
- saneName = "ro";
- sha256 = "0q995rw2bbv8vjnf9h0ywdvq8v24rkmxck1w7bf0wblcp7w4pcpq";
-}
-{
- lang = "ru";
- saneName = "ru";
- sha256 = "014zcdk5kxif17mqb6ivsc44021f4hxr0d2pn2d0jlrhx4dbyvsp";
-}
-{
- lang = "si";
- saneName = "si";
- sha256 = "0y80d8d18di9n0jj8ifxmdc5vgmq6bkc86id5azqrlif4rhs55jj";
-}
-{
- lang = "sk";
- saneName = "sk";
- sha256 = "1q87ixrqqkhzbyb7mlk0xfnxcih057x9w596spr5br8arxr34912";
-}
-{
- lang = "sl";
- saneName = "sl";
- sha256 = "1ykbh8j2x14vq7iszll4lgmg8gbnv6jql686x01896ba504144y4";
-}
-{
- lang = "sr";
- saneName = "sr";
- sha256 = "03f0jjsn4bwysjs8x8iy61z0rnzm8gn3w9k85wfa0br8cjr36cji";
-}
-{
- lang = "sv";
- saneName = "sv";
- sha256 = "1bf3795ddlxk9cz686jlifb18wjxfgjqfv3s45gs9q09i6sq0iv4";
-}
-{
- lang = "tg";
- saneName = "tg";
- sha256 = "11w9ibw8bbkllrf4628rc5zpwwwp5plcapndwp9sb19rsdx0bnvf";
-}
-{
- lang = "th";
- saneName = "th";
- sha256 = "0rv5l7zplhfr7l8a4wh4ngvh0assq97dlvh5d6x9a464k5fgwg7w";
-}
-{
- lang = "tr";
- saneName = "tr";
- sha256 = "15f1rsbzljk120dq2v2wkgn4ym50yzrd9xyzgw9g22hlmy5inmm8";
-}
-{
- lang = "ug";
- saneName = "ug";
- sha256 = "1f924vl3vm20p5hfyzzv6hx6cvb7ym4bf9lbch808k99jwvh6j99";
-}
-{
- lang = "uk";
- saneName = "uk";
- sha256 = "1fv78nvvrd6z62fy3iqqbf77vixadl8s2hg6lkg094f1dc8l3w4n";
-}
-{
- lang = "vi";
- saneName = "vi";
- sha256 = "1k2i818821bls1vqb614jq8pi6cj43rf2x2bcbcibwdmhs1xljx8";
-}
-{
- lang = "wa";
- saneName = "wa";
- sha256 = "0bk9mjir5az1rnxclyijc42mfnpgbw1fzzfvw765wdcs1mkjqrdh";
-}
-{
- lang = "zh_CN";
- saneName = "zh_CN";
- sha256 = "0m3z05zsg2afzfm2ws090rx9214l9zjshfxy7sww3a2nb39f798b";
-}
-{
- lang = "zh_TW";
- saneName = "zh_TW";
- sha256 = "09921r007i23q1dyg9gx8zjaf3da0i2r6r673yhaq584srxivznq";
-}
-]
diff --git a/pkgs/desktops/kde-4.10/l10n/manifest-4.10.5.nix b/pkgs/desktops/kde-4.10/l10n/manifest-4.10.5.nix
deleted file mode 100644
index 9862efe0b58..00000000000
--- a/pkgs/desktops/kde-4.10/l10n/manifest-4.10.5.nix
+++ /dev/null
@@ -1,282 +0,0 @@
-[
-{
- lang = "ar";
- saneName = "ar";
- sha256 = "0mxvp97sf1f6w2rfy966fdhpflqfmwv253zswaz3cv9b5m9yf5q8";
-}
-{
- lang = "bg";
- saneName = "bg";
- sha256 = "0fk5r0bqnks1ygac6cs8f5gb16lr4qrh32jgdk50hnv6ad51agfv";
-}
-{
- lang = "bs";
- saneName = "bs";
- sha256 = "10kc76l1fm56rhnc6wvm29ij15v2pvmsq1djvm6zxhsdm99af25k";
-}
-{
- lang = "ca";
- saneName = "ca";
- sha256 = "0gn4ghvwwi09aibmx5940b159d7svnbcq25cg02lhvjvfrmyfp1j";
-}
-{
- lang = "ca@valencia";
- saneName = "ca_valencia";
- sha256 = "175j2gn35vzjb17rbd0mvrxas180wq3v1x6q1caykm2qddqqmqgv";
-}
-{
- lang = "cs";
- saneName = "cs";
- sha256 = "0zxa2cmcwdbdwgz5wm58v0gqzphcc1b1vzzgrrnpsmfjqb6h951c";
-}
-{
- lang = "da";
- saneName = "da";
- sha256 = "0qab4gbilpb8fwyjqcvvmzms4hdbrii4xr5xgcl87v8va5gcdc8s";
-}
-{
- lang = "de";
- saneName = "de";
- sha256 = "1vh9h185qa42q7gkyflp7g93hgvhxjd2cknwz0yq6dxsx8dg5iqd";
-}
-{
- lang = "el";
- saneName = "el";
- sha256 = "1f8wsq9hh2d6wpd7v1bz5mchb1zjnc895mmpawy67rv6s45vx6y8";
-}
-{
- lang = "en_GB";
- saneName = "en_GB";
- sha256 = "1nz7q6fq3242vjh2961r4v4kp1fywknnjrnfadgf3g0dvav2vkq8";
-}
-{
- lang = "es";
- saneName = "es";
- sha256 = "1mazkh53vdvsz5zrx41fi49x44isibpwmrrqwcmpbcwdqx7iaf9v";
-}
-{
- lang = "et";
- saneName = "et";
- sha256 = "0f7bi50gzrhnvif7c1h6mgscbbjvz0cqifdnaaqr9m7d9iafwwyz";
-}
-{
- lang = "eu";
- saneName = "eu";
- sha256 = "0k0w849nqjsaxsi8rm4jd13fqcvk88v6j0yar36mvblh6x61qgq8";
-}
-{
- lang = "fa";
- saneName = "fa";
- sha256 = "12fmd6zy14wsd2i1nszc4bl3q0asvf9wqsgwihxipw34fwa6irpv";
-}
-{
- lang = "fi";
- saneName = "fi";
- sha256 = "0k76zlfjjz7vlvlz298713c27zbcybjip33wix76ldj7is9yb07v";
-}
-{
- lang = "fr";
- saneName = "fr";
- sha256 = "03qxm8q3bvx4cqaxvfbdj07q2rpcwrqyp333x3jwmcc5xj731pww";
-}
-{
- lang = "ga";
- saneName = "ga";
- sha256 = "09n5wpc4s2xxv1016dvg8zwbvx6lx6942lnyq3b4adl4yjcghs32";
-}
-{
- lang = "gl";
- saneName = "gl";
- sha256 = "1w7hj6ma3d03wv2x651hwhxxc4ird23f0khc4z03ncpl9xvyikky";
-}
-{
- lang = "he";
- saneName = "he";
- sha256 = "0jirch5cw99lcs9d83kzifb9wdqz1aqdjmi4wam0gi8nciws8hwr";
-}
-{
- lang = "hi";
- saneName = "hi";
- sha256 = "02g0a4l1mlmx64acxfl6a1lqbivnwdfx98q8f9nyb3836i8i3sd7";
-}
-{
- lang = "hr";
- saneName = "hr";
- sha256 = "087jww1daqqwrrxi1hz72kc39ipj6hj73cqzy4ds24hm112z58dc";
-}
-{
- lang = "hu";
- saneName = "hu";
- sha256 = "1mwmbhnzvhxzcfk3j6f61jfprfwaan8mf9l4s7r8f3ddmsz66kha";
-}
-{
- lang = "ia";
- saneName = "ia";
- sha256 = "0grmi972ndizf3gpjxjv79crc0si4b3dadayzmayrykndd5b30i6";
-}
-{
- lang = "is";
- saneName = "is";
- sha256 = "13d8ikfhlswpaxrj9l6f0kf4dzbmgri5d3miz3r8h6lmmszq2phr";
-}
-{
- lang = "it";
- saneName = "it";
- sha256 = "1m17wqak0alhkk81fhl32fcv0b2nnszjs7xia0df75z8c2js9vmm";
-}
-{
- lang = "ja";
- saneName = "ja";
- sha256 = "1br0gipw4ra3bvzdal9dn8x8kldmmk4miw1z5hsimhkgc5y5amb3";
-}
-{
- lang = "kk";
- saneName = "kk";
- sha256 = "0vmdfcy2dmxd6bjvz31xhjkxd2q55px70c9d6lj3fmf4bxiqlmc4";
-}
-{
- lang = "km";
- saneName = "km";
- sha256 = "1snrn2yw7z2m0m3wqxgqrq1rxqnjb4ylngdnn0ym87yh7bh6kjsc";
-}
-{
- lang = "ko";
- saneName = "ko";
- sha256 = "1dyymy3wdldmkxai47y25qzpcajsi18h4rl0m1izm90giwadrk85";
-}
-{
- lang = "lt";
- saneName = "lt";
- sha256 = "1im120mlnvjdlh5gna9q0qfixg2zz2shhzbxih37ikzpjxr7v5zs";
-}
-{
- lang = "lv";
- saneName = "lv";
- sha256 = "07303s04qkh7pa78ranvcvqs75wll427vdb0iv6sr07smd0fzf1d";
-}
-{
- lang = "mr";
- saneName = "mr";
- sha256 = "1dzzzc3wkjhapmdlbp178w6rm00ibixmp4xhkbsavr7hy18a048c";
-}
-{
- lang = "nb";
- saneName = "nb";
- sha256 = "039gi1ba8z9w80b6xsh3b51alq91d4phr6pmfnaqngwqmaksxidh";
-}
-{
- lang = "nds";
- saneName = "nds";
- sha256 = "0bg55dl284y7wvcl40sgspnvpfiqkapvwwi02n4jyl3w4xsy3b8j";
-}
-{
- lang = "nl";
- saneName = "nl";
- sha256 = "048pr21vfcwvfxpw56kil4awmx7samva4jd86g6rvrs6q85c0mxj";
-}
-{
- lang = "nn";
- saneName = "nn";
- sha256 = "10xy5r3s79gh28zzy72dhs79ap616qnrqms3mgg9kdvmmi2n32nm";
-}
-{
- lang = "pa";
- saneName = "pa";
- sha256 = "08ib4pbahgjww4d82vcgahc7jxky85riim1p0ck5dzhri0664zx8";
-}
-{
- lang = "pl";
- saneName = "pl";
- sha256 = "0kqr4jvqsyasdacv0kxjcx5nfd6m0kd1vk7418mzbabjyb2nbvl1";
-}
-{
- lang = "pt";
- saneName = "pt";
- sha256 = "0nfnwcq2n5dp721wi7arp3via0kvhf3rfq8h78k9dqs5afyhf4n1";
-}
-{
- lang = "pt_BR";
- saneName = "pt_BR";
- sha256 = "1886fga94c7zp0g1hdijqj64mi8asgbmykic6n0mzin33c4rwyjs";
-}
-{
- lang = "ro";
- saneName = "ro";
- sha256 = "0q51v23dviwrgy1zaq3823xh2vfm2zvkpqizgmi111m681s0n4kx";
-}
-{
- lang = "ru";
- saneName = "ru";
- sha256 = "0mm8mfqlfbj0r2d4xyli2n8x8sgpw2bjxnlq8yy38pgi9pksgcsl";
-}
-{
- lang = "si";
- saneName = "si";
- sha256 = "0qcvdil9gbgwf10v4j606d0vi4705vb77aq7p1kq3y57khldlhsa";
-}
-{
- lang = "sk";
- saneName = "sk";
- sha256 = "1rmxh12r7i9cc7nkigxx6igvzjjq1rk3y5nm2mdjq7gcv067gp9i";
-}
-{
- lang = "sl";
- saneName = "sl";
- sha256 = "0xdd5ini0b0fi5xfai533y8a5g8gyphfrz6qvivpgdd81rfckpk1";
-}
-{
- lang = "sr";
- saneName = "sr";
- sha256 = "09rfcrw58f0bvqqkdcpiy56xv591yk6v0iinlabamza63h011rmk";
-}
-{
- lang = "sv";
- saneName = "sv";
- sha256 = "1slznfn6ghqy5cy870apwgcygdhvbfvh1dy6rplhwnv0riwnx3ay";
-}
-{
- lang = "tg";
- saneName = "tg";
- sha256 = "12ic6nd65l6w7vqymfr1djbkn8jfghc5vyyi783mdf3pwx3xjk8i";
-}
-{
- lang = "th";
- saneName = "th";
- sha256 = "0v02h8gdwnabahb3invxvp2ap5x6b4a0pf0sl15phi8s2m1y9fad";
-}
-{
- lang = "tr";
- saneName = "tr";
- sha256 = "10asd6ha7fjs4b11vp27xp1piycalvidv3l6z5sv9j5bs4hayp1g";
-}
-{
- lang = "ug";
- saneName = "ug";
- sha256 = "11n6z1d2b2b93lj9vps4ry6k671m5lssrv4hi5nr0a1vbc1d6ix1";
-}
-{
- lang = "uk";
- saneName = "uk";
- sha256 = "1lrghs0s3hmhmrqarsc29518ax95wz6gnhimxs8lyc88b4jil0p5";
-}
-{
- lang = "vi";
- saneName = "vi";
- sha256 = "198rr7i673a77v3qlld1c0rm2vr86rr6nf97v4wckcvyz8b6s6i8";
-}
-{
- lang = "wa";
- saneName = "wa";
- sha256 = "01glzj5vhhmv6zvrmwd4wwx0bq6b0p08ixx0rf3bh4pdbi42hiin";
-}
-{
- lang = "zh_CN";
- saneName = "zh_CN";
- sha256 = "0cj8flr5c73crrwchfz3j60snzmvbr3bc1p4pnk4s3vajmwsdaas";
-}
-{
- lang = "zh_TW";
- saneName = "zh_TW";
- sha256 = "0lc896x55ww3s5jz7ms0gmm22qq9yjpnbzbjfq64574pvr2m3s5y";
-}
-]
diff --git a/pkgs/desktops/kde-4.10/oxygen-icons.nix b/pkgs/desktops/kde-4.10/oxygen-icons.nix
deleted file mode 100644
index adee87c8316..00000000000
--- a/pkgs/desktops/kde-4.10/oxygen-icons.nix
+++ /dev/null
@@ -1,15 +0,0 @@
-{ kde, cmake }:
-
-kde {
- outputHashAlgo = "sha256";
- outputHashMode = "recursive";
- outputHash = "1aad2qb9zrjcild5s584q4zz6zc3wgkclv79gnfwkhmy0viqx9l6";
-
- nativeBuildInputs = [ cmake ];
-
- meta = {
- description = "KDE Oxygen theme icons";
- longDescription = "Icons for KDE's default theme";
- license = "GPL";
- };
-}
diff --git a/pkgs/desktops/kde-4.10/support/akonadi/default.nix b/pkgs/desktops/kde-4.10/support/akonadi/default.nix
deleted file mode 100644
index e1d8a5ef9ae..00000000000
--- a/pkgs/desktops/kde-4.10/support/akonadi/default.nix
+++ /dev/null
@@ -1,24 +0,0 @@
-{ stdenv, fetchurl, cmake, qt4, shared_mime_info, libxslt, boost, automoc4, soprano, sqlite }:
-
-stdenv.mkDerivation rec {
- name = "akonadi-1.9.2";
-
- src = fetchurl {
- url = "mirror://kde/stable/akonadi/src/${name}.tar.bz2";
- sha256 = "1ndzc7a1q1hqy4pn9xnihq6ni02zsqfdyy6z6lwn27bkb7pg64p7";
- };
-
- buildInputs = [ qt4 soprano libxslt boost sqlite ];
-
- 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/compilers/elm/elm.nix b/pkgs/development/compilers/elm/elm.nix
index 5a9ba8f6379..bc9f73b2849 100644
--- a/pkgs/development/compilers/elm/elm.nix
+++ b/pkgs/development/compilers/elm/elm.nix
@@ -23,6 +23,10 @@ cabal.mkDerivation (self: {
transformers unionFind unorderedContainers
];
doCheck = false;
+ preConfigure = ''
+ rm -f Setup.hs
+ echo -e "import Distribution.Simple\nmain=defaultMain\n" > Setup.hs
+ '';
meta = {
homepage = "http://elm-lang.org";
description = "The Elm language module";
diff --git a/pkgs/development/compilers/fsharp/default.nix b/pkgs/development/compilers/fsharp/default.nix
index 963c7e2cb5c..1d795504589 100644
--- a/pkgs/development/compilers/fsharp/default.nix
+++ b/pkgs/development/compilers/fsharp/default.nix
@@ -2,7 +2,7 @@
stdenv.mkDerivation rec {
name = "fsharp-${version}";
- version = "3.1";
+ version = "3.1.0";
src = fetchgit {
url = "https://github.com/fsharp/fsharp";
diff --git a/pkgs/development/compilers/gcc/4.4/default.nix b/pkgs/development/compilers/gcc/4.4/default.nix
index e81ca398319..99c342da780 100644
--- a/pkgs/development/compilers/gcc/4.4/default.nix
+++ b/pkgs/development/compilers/gcc/4.4/default.nix
@@ -246,7 +246,8 @@ stdenv.mkDerivation ({
enableMultilib version; };
# ghdl does not build fine with parallel building
- enableParallelBuilding = !langVhdl && !langAda;
+ # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46173
+ #enableParallelBuilding = !langVhdl && !langAda;
meta = {
homepage = http://gcc.gnu.org/;
diff --git a/pkgs/development/compilers/ghc/7.8.1.nix b/pkgs/development/compilers/ghc/7.8.2.nix
similarity index 87%
rename from pkgs/development/compilers/ghc/7.8.1.nix
rename to pkgs/development/compilers/ghc/7.8.2.nix
index f58ca9cc1fc..8200c8c759e 100644
--- a/pkgs/development/compilers/ghc/7.8.1.nix
+++ b/pkgs/development/compilers/ghc/7.8.2.nix
@@ -1,12 +1,12 @@
{ stdenv, fetchurl, ghc, perl, gmp, ncurses }:
stdenv.mkDerivation rec {
- version = "7.8.0.20140228";
+ version = "7.8.2";
name = "ghc-${version}";
src = fetchurl {
- url = "http://www.haskell.org/ghc/dist/7.8.1-rc2/${name}-src.tar.bz2";
- sha256 = "09xlgz1xg0182wjy62h3j0xvnhllhjlyvj30vc3him98parnr76w";
+ url = "http://www.haskell.org/ghc/dist/7.8.2/${name}-src.tar.xz";
+ sha256 = "15kyz98zq22sgwkzy2bkx0yz98qkrzgdigz919vafd7fxnkf3la5";
};
buildInputs = [ ghc perl gmp ncurses ];
diff --git a/pkgs/development/compilers/ghdl/default.nix b/pkgs/development/compilers/ghdl/default.nix
new file mode 100644
index 00000000000..cd33d3d79a7
--- /dev/null
+++ b/pkgs/development/compilers/ghdl/default.nix
@@ -0,0 +1,64 @@
+{ stdenv, fetchurl, gnat, zlib }:
+
+assert stdenv.system == "i686-linux";
+
+let
+ version = "0.31";
+in
+stdenv.mkDerivation rec {
+ name = "ghdl-mcode-${version}";
+
+ src = fetchurl {
+ url = "mirror://sourceforge/ghdl/ghdl-${version}.tar.gz";
+ sha256 = "1v0l9h6906b0bvnwfi2qg5nz9vjg80isc5qgjxr1yqxpkfm2xcf0";
+ };
+
+ buildInputs = [ gnat zlib ];
+
+ # Tarbomb
+ preUnpack = ''
+ mkdir ghdl
+ cd ghdl
+ '';
+
+ sourceRoot = "translate/ghdldrv";
+
+ patchPhase = ''
+ sed -i 's,$$curdir/lib,'$out'/share/ghdl_mcode/translate/lib,' Makefile
+ '';
+
+ postBuild = ''
+ # Build the LIB
+ ln -s ghdl_mcode ghdl
+ make install.mcode
+ '';
+
+ installPhase = ''
+ ensureDir $out/bin
+ cp ghdl_mcode $out/bin
+
+ ensureDir $out/share/ghdl_mcode/translate
+ cp -R ../lib $out/share/ghdl_mcode/translate
+ cp -R ../../libraries $out/share/ghdl_mcode
+
+ ensureDir $out/share/man/man1
+ cp ../../doc/ghdl.1 $out/share/man/man1/ghdl_mcode.1
+
+ # Ghdl has some timestamps checks, storing file timestamps in '.cf' files.
+ # As we will change the timestamps to 1970-01-01 00:00:01, we also set the
+ # content of that .cf to that value. This way ghdl does not complain on
+ # the installed object files from the basic libraries (ieee, ...)
+ pushd $out
+ find . -name "*.cf" -exec \
+ sed 's/[0-9]*\.000" /19700101000001.000" /g' -i {} \;
+ popd
+ '';
+
+ meta = {
+ homepage = "http://sourceforge.net/p/ghdl-updates/wiki/Home/";
+ description = "Free VHDL simulator, mcode flavour";
+ maintainers = with stdenv.lib.maintainers; [viric];
+ platforms = with stdenv.lib.platforms; linux;
+ license = "GPLv2+";
+ };
+}
diff --git a/pkgs/development/compilers/go/1.2.nix b/pkgs/development/compilers/go/1.2.nix
index 82b0c400fa6..7b7e16d837d 100644
--- a/pkgs/development/compilers/go/1.2.nix
+++ b/pkgs/development/compilers/go/1.2.nix
@@ -60,6 +60,7 @@ stdenv.mkDerivation {
else if stdenv.system == "armv5tel-linux" then "arm"
else throw "Unsupported system";
GOARM = stdenv.lib.optionalString (stdenv.system == "armv5tel-linux") "5";
+ GO386 = 387; # from Arch: don't assume sse2 on i686
installPhase = ''
mkdir -p "$out/bin"
diff --git a/pkgs/development/compilers/icedtea-web/default.nix b/pkgs/development/compilers/icedtea-web/default.nix
index 9123aaa988c..c9697bac36c 100644
--- a/pkgs/development/compilers/icedtea-web/default.nix
+++ b/pkgs/development/compilers/icedtea-web/default.nix
@@ -1,20 +1,22 @@
-{ stdenv, fetchurl, jdk, gtk2, xulrunner, zip, pkgconfig, perl, npapi_sdk }:
+{ stdenv, fetchurl, jdk, gtk2, xulrunner, zip, pkgconfig, perl, npapi_sdk, bash }:
stdenv.mkDerivation rec {
name = "icedtea-web-${version}";
- version = "1.4.2";
+ version = "1.5";
src = fetchurl {
url = "http://icedtea.wildebeest.org/download/source/${name}.tar.gz";
- sha256 = "0bfw4icxjfkdxqmiqgp9lfs1ca9rydl57g3yhlxrif0fpzyyb3fl";
+ sha256 = "0bbwa944kaam0r8ldlqrrj9z9zj54v6zdc3q663ck59shw5z828w";
};
buildInputs = [ gtk2 xulrunner zip pkgconfig npapi_sdk ];
preConfigure = ''
substituteInPlace javac.in --replace '#!/usr/bin/perl' '#!${perl}/bin/perl'
+
+ configureFlags="BIN_BASH=${bash}/bin/bash $configureFlags"
'';
configureFlags = [
diff --git a/pkgs/development/compilers/icedtea/build-fix-2.4.6.patch b/pkgs/development/compilers/icedtea/build-fix-2.4.6.patch
new file mode 100644
index 00000000000..d5fcd9f4456
--- /dev/null
+++ b/pkgs/development/compilers/icedtea/build-fix-2.4.6.patch
@@ -0,0 +1,58 @@
+
+# HG changeset patch
+# User Andrew John Hughes
+# Date 1396030366 0
+# Node ID e8e59c50a451b45bd10cd495b81e5c61b2b4bca8
+# Parent 46f9059509fec2498b1a04ccefee538a45aeff8c
+PR1726: configure fails looking for ecj.jar before even trying to find javac
+
+2014-03-28 Andrew John Hughes
+
+ * acinclude.m4:
+ (IT_FIND_COMPILER): Check value of ECJ_JAR
+ and JAVAC here ...
+ (IT_FIND_ECJ_JAR): ... rather than here where
+ ${JAVAC} may not yet be defined.
+
+diff -r 46f9059509fe -r e8e59c50a451 NEWS
+--- a/NEWS Fri Mar 28 18:06:31 2014 +0000
++++ b/NEWS Fri Mar 28 18:12:46 2014 +0000
+@@ -14,6 +14,9 @@
+
+ New in release 2.4.7 (2014-04-XX):
+
++* Bug fixes
++ - PR1726: configure fails looking for ecj.jar before even trying to find javac
++
+ New in release 2.4.6 (2014-03-28):
+
+ * Backports
+diff -r 46f9059509fe -r e8e59c50a451 acinclude.m4
+--- a/acinclude.m4 Fri Mar 28 18:06:31 2014 +0000
++++ b/acinclude.m4 Fri Mar 28 18:12:46 2014 +0000
+@@ -134,6 +134,12 @@
+ IT_USING_ECJ
+ IT_WITH_GCJ
+
++ if test "x${ECJ_JAR}" = "xno"; then
++ if test "x${JAVAC}" = "x"; then
++ AC_MSG_ERROR("No compiler or ecj JAR file was found.")
++ fi
++ fi
++
+ if test x"${GCJ}" != xno ; then
+ JAVAC="${JAVA} -classpath ${ECJ_JAR} org.eclipse.jdt.internal.compiler.batch.Main"
+ fi
+@@ -350,11 +356,6 @@
+ fi
+ fi
+ AC_MSG_RESULT(${ECJ_JAR})
+- if test "x${ECJ_JAR}" = "xno"; then
+- if test "x${JAVAC}" = "x"; then
+- AC_MSG_ERROR("No compiler or ecj JAR file was found.")
+- fi
+- fi
+ AC_SUBST(ECJ_JAR)
+ ])
+
+
diff --git a/pkgs/development/compilers/icedtea/default.nix b/pkgs/development/compilers/icedtea/default.nix
index a8f9617a634..de3a013e7df 100644
--- a/pkgs/development/compilers/icedtea/default.nix
+++ b/pkgs/development/compilers/icedtea/default.nix
@@ -43,6 +43,8 @@ with srcInfo; stdenv.mkDerivation {
inherit url sha256;
};
+ patches = [ ./build-fix-2.4.6.patch ];
+
outputs = [ "out" "jre" ];
# TODO: Probably some more dependencies should be on this list but are being
diff --git a/pkgs/development/compilers/icedtea/sources.nix b/pkgs/development/compilers/icedtea/sources.nix
index 95d6928b3ab..6600c811786 100644
--- a/pkgs/development/compilers/icedtea/sources.nix
+++ b/pkgs/development/compilers/icedtea/sources.nix
@@ -2,54 +2,54 @@
{
icedtea7 = rec {
branch = "2.4";
- version = "${branch}.5";
+ version = "${branch}.6";
url = "http://icedtea.wildebeest.org/download/source/icedtea-${version}.tar.xz";
- sha256 = "0nrhbn2q7cm21hpq1f5ds0v0rnsznmdyiifi8w4l1ykyqw9n9yfk";
+ sha256 = "06gsrci7934xmlddmi9wpawpgb1mp7c8cx3jmjsq91kdljmvqcy3";
hg_url = "http://icedtea.classpath.org/hg/release/icedtea7-forest-${branch}";
bundles = {
openjdk = rec {
- changeset = "410eb7fef869";
+ changeset = "b028e58c1b77";
url = "${hg_url}/archive/${changeset}.tar.gz";
- sha256 = "2de151c7275d91ef082e63fcc0957c5f9290404ec6e20ecfa1e752e16bfab707";
+ sha256 = "e6be030ac5934781d9682dc3108980fa7d2330c32da3cea4ae74df11fbaa92f2";
};
corba = rec {
- changeset = "3594dbde270d";
+ changeset = "48ef1bb6d120";
url = "${hg_url}/corba/archive/${changeset}.tar.gz";
- sha256 = "d1f97e143fe94ae3a56b45bb5a90f8ab10ec2be4ff770a788f0a1ac677e27a7d";
+ sha256 = "2fcfe699797154da8b4ba5242e32468b2f3f42a0cb17039915bfb1f84887a5b6";
};
jaxp = rec {
- changeset = "8fe156ad49e2";
+ changeset = "e0ba4b9a8b91";
url = "${hg_url}/jaxp/archive/${changeset}.tar.gz";
- sha256 = "0a2a40186cedfbeb8f87b0bc86bea2830943943081d4289fc74f7a783b2e1af3";
+ sha256 = "e7014057721b8392676bd24760c3f7b3dd40548abb3c8dfbe8df2fa04d7c1fca";
};
jaxws = rec {
- changeset = "32ea8b1ed91a";
+ changeset = "4bd947cd146b";
url = "${hg_url}/jaxws/archive/${changeset}.tar.gz";
- sha256 = "08a169b6b02883759ec7a412aa91aa3e37480761cb50b95d092dbcdb2fc9a3d0";
+ sha256 = "17ed5278872ad0c9ec3a849caf1480e5942b714e35c9a4a949d09daac4b34c5a";
};
jdk = rec {
- changeset = "9db88c18e114";
+ changeset = "b5282042aae0";
url = "${hg_url}/jdk/archive/${changeset}.tar.gz";
- sha256 = "285e5b8ccbb29f3f9f9ea9ea7856d1ed97465c57d091fbcd9b2e55a1ffbb543e";
+ sha256 = "ab9b0e973625604b12a2f027cb2a6f9bc5160ef7df55408da6ca8a9c3aaed2d5";
};
langtools = rec {
- changeset = "dabd37b7e295";
+ changeset = "06eeb77dac24";
url = "${hg_url}/langtools/archive/${changeset}.tar.gz";
- sha256 = "86cb370ce2084c4b699d8c002ebe6c026e86206ffa82a2f3d7906aadb94ed79f";
+ sha256 = "a67e62618c70ef9190b2aef2b49be9d79624be9363bda258828b17494e092477";
};
hotspot = rec {
- changeset = "2cb58882dac3";
+ changeset = "172674e0ab65";
url = "${hg_url}/hotspot/archive/${changeset}.tar.gz";
- sha256 = "d8c1681ae76e660c1888065933cedbbc1309869c7a2fb98f07c424716d5ebaf9";
+ sha256 = "2aadfe9b1848a619bd2d35f802b3e71ef5286e7822f9e7b02ce2539ca817d9b0";
};
};
};
diff --git a/pkgs/development/compilers/idris/default.nix b/pkgs/development/compilers/idris/default.nix
index a22c8bf7762..c32c14cf584 100644
--- a/pkgs/development/compilers/idris/default.nix
+++ b/pkgs/development/compilers/idris/default.nix
@@ -1,23 +1,23 @@
{ cabal, annotatedWlPprint, ansiTerminal, ansiWlPprint, binary
-, boehmgc, Cabal, deepseq, filepath, gmp, happy, haskeline
-, languageJava, libffi, llvmGeneral, llvmGeneralPure, mtl, network
-, parsers, split, text, time, transformers, trifecta
-, unorderedContainers, utf8String, vector, vectorBinaryInstances
-, xml, zlib
+, boehmgc, Cabal, cheapskate, deepseq, filepath, gmp, happy
+, haskeline, languageJava, lens, libffi, llvmGeneral
+, llvmGeneralPure, mtl, network, parsers, split, text, time
+, transformers, trifecta, unorderedContainers, utf8String, vector
+, vectorBinaryInstances, xml, zlib
}:
cabal.mkDerivation (self: {
pname = "idris";
- version = "0.9.11.2";
- sha256 = "16xgiygn0j3kl3l36lnv6wz422nz2bvn3lk86xkdfvwjpv4630yn";
+ version = "0.9.12";
+ sha256 = "151h9qkx7yw24q0b60r78hki1y8m6sxmfars7wywnbzk3kalqb6x";
isLibrary = true;
isExecutable = true;
buildDepends = [
- annotatedWlPprint ansiTerminal ansiWlPprint binary Cabal deepseq
- filepath haskeline languageJava libffi llvmGeneral llvmGeneralPure
- mtl network parsers split text time transformers trifecta
- unorderedContainers utf8String vector vectorBinaryInstances xml
- zlib
+ annotatedWlPprint ansiTerminal ansiWlPprint binary Cabal cheapskate
+ deepseq filepath haskeline languageJava lens libffi llvmGeneral
+ llvmGeneralPure mtl network parsers split text time transformers
+ trifecta unorderedContainers utf8String vector
+ vectorBinaryInstances xml zlib
];
buildTools = [ happy ];
extraLibraries = [ boehmgc gmp ];
diff --git a/pkgs/development/compilers/jdk/jdk7-linux.nix b/pkgs/development/compilers/jdk/jdk7-linux.nix
index 106b9fa02d7..2d2c07c67ff 100644
--- a/pkgs/development/compilers/jdk/jdk7-linux.nix
+++ b/pkgs/development/compilers/jdk/jdk7-linux.nix
@@ -9,7 +9,7 @@
, glib
, libxml2
, libav_0_8
-, ffmpeg_0_6
+, ffmpeg
, libxslt
, mesa_noglu
, freetype
@@ -149,7 +149,7 @@ stdenv.mkDerivation rec {
* libXt is only needed on amd64
*/
libraries =
- [stdenv.gcc.libc glib libxml2 libav_0_8 ffmpeg_0_6 libxslt mesa_noglu xlibs.libXxf86vm alsaLib fontconfig freetype gnome.pango gnome.gtk cairo gdk_pixbuf] ++
+ [stdenv.gcc.libc glib libxml2 libav_0_8 ffmpeg libxslt mesa_noglu xlibs.libXxf86vm alsaLib fontconfig freetype gnome.pango gnome.gtk cairo gdk_pixbuf] ++
(if swingSupport then [xlibs.libX11 xlibs.libXext xlibs.libXtst xlibs.libXi xlibs.libXp xlibs.libXt xlibs.libXrender stdenv.gcc.gcc] else []);
passthru.mozillaPlugin = if installjdk then "/jre/lib/${architecture}/plugins" else "/lib/${architecture}/plugins";
diff --git a/pkgs/development/compilers/llvm/3.4/llvm.nix b/pkgs/development/compilers/llvm/3.4/llvm.nix
index 7f58abea1fa..fad11b7a123 100644
--- a/pkgs/development/compilers/llvm/3.4/llvm.nix
+++ b/pkgs/development/compilers/llvm/3.4/llvm.nix
@@ -54,5 +54,6 @@ in stdenv.mkDerivation rec {
license = stdenv.lib.licenses.bsd3;
maintainers = with stdenv.lib.maintainers; [ shlevy lovek323 raskin viric ];
platforms = stdenv.lib.platforms.all;
+ broken = stdenv.isDarwin;
};
}
diff --git a/pkgs/development/compilers/sdcc/default.nix b/pkgs/development/compilers/sdcc/default.nix
index 1a51f087a28..fe293fbc4b8 100644
--- a/pkgs/development/compilers/sdcc/default.nix
+++ b/pkgs/development/compilers/sdcc/default.nix
@@ -1,12 +1,12 @@
{ stdenv, fetchurl, bison, flex, boost, gputils ? null }:
stdenv.mkDerivation rec {
- version = "3.3.0";
+ version = "3.4.0";
name = "sdcc-${version}";
src = fetchurl {
url = "mirror://sourceforge/sdcc/sdcc-src-${version}.tar.bz2";
- sha256 = "1pj4hssvq34vbryvxc2jpp2b14cgxp695ygwiax6b7l2kvr62gw7";
+ sha256 = "1yavxffqdfhdyabdza936xxh9wq4cfwa385g26gjapsdp5ighsng";
};
# TODO: remove this comment when gputils != null is tested
diff --git a/pkgs/development/compilers/swi-prolog/default.nix b/pkgs/development/compilers/swi-prolog/default.nix
index aa027401b4d..2070da0bee4 100644
--- a/pkgs/development/compilers/swi-prolog/default.nix
+++ b/pkgs/development/compilers/swi-prolog/default.nix
@@ -4,14 +4,14 @@
}:
let
- version = "6.6.2";
+ version = "6.6.3";
in
stdenv.mkDerivation {
name = "swi-prolog-${version}";
src = fetchurl {
url = "http://www.swi-prolog.org/download/stable/src/pl-${version}.tar.gz";
- sha256 = "1kdnc1r5c4320v5s6axk6w0jnqbkza295hdi9s5kyd8r78v6x6g4";
+ sha256 = "01dr66d7rm2xvxwm6wy71bbjvfrmzxgvmaz3sl1fb63cn8d78nz3";
};
buildInputs = [ gmp readline openssl libjpeg unixODBC libXinerama
diff --git a/pkgs/development/interpreters/lua-5/5.1.darwin.patch b/pkgs/development/interpreters/lua-5/5.1.darwin.patch
new file mode 100644
index 00000000000..b7754da79ba
--- /dev/null
+++ b/pkgs/development/interpreters/lua-5/5.1.darwin.patch
@@ -0,0 +1,52 @@
+diff --git a/Makefile b/Makefile
+index 209a132..9387b09 100644
+--- a/Makefile
++++ b/Makefile
+@@ -43,7 +43,7 @@ PLATS= aix ansi bsd freebsd generic linux macosx mingw posix solaris
+ # What to install.
+ TO_BIN= lua luac
+ TO_INC= lua.h luaconf.h lualib.h lauxlib.h ../etc/lua.hpp
+-TO_LIB= liblua.a
++TO_LIB= liblua.5.1.5.dylib
+ TO_MAN= lua.1 luac.1
+
+ # Lua version and release.
+@@ -64,6 +64,8 @@ install: dummy
+ cd src && $(INSTALL_DATA) $(TO_INC) $(INSTALL_INC)
+ cd src && $(INSTALL_DATA) $(TO_LIB) $(INSTALL_LIB)
+ cd doc && $(INSTALL_DATA) $(TO_MAN) $(INSTALL_MAN)
++ ln -s -f liblua.5.1.5.dylib $(INSTALL_LIB)/liblua.5.1.dylib
++ ln -s -f liblua.5.1.dylib $(INSTALL_LIB)/liblua.dylib
+
+ ranlib:
+ cd src && cd $(INSTALL_LIB) && $(RANLIB) $(TO_LIB)
+diff --git a/src/Makefile b/src/Makefile
+index e0d4c9f..4477d7b 100644
+--- a/src/Makefile
++++ b/src/Makefile
+@@ -22,7 +22,7 @@ MYLIBS=
+
+ PLATS= aix ansi bsd freebsd generic linux macosx mingw posix solaris
+
+-LUA_A= liblua.a
++LUA_A= liblua.5.1.5.dylib
+ CORE_O= lapi.o lcode.o ldebug.o ldo.o ldump.o lfunc.o lgc.o llex.o lmem.o \
+ lobject.o lopcodes.o lparser.o lstate.o lstring.o ltable.o ltm.o \
+ lundump.o lvm.o lzio.o
+@@ -48,11 +48,13 @@ o: $(ALL_O)
+ a: $(ALL_A)
+
+ $(LUA_A): $(CORE_O) $(LIB_O)
+- $(AR) $@ $(CORE_O) $(LIB_O) # DLL needs all object files
+- $(RANLIB) $@
++ $(CC) -dynamiclib -install_name $(out)/lib/liblua.5.1.dylib \
++ -compatibility_version 5.1 -current_version 5.1.5 \
++ -o liblua.5.1.5.dylib $^
+
+ $(LUA_T): $(LUA_O) $(LUA_A)
+- $(CC) -o $@ $(MYLDFLAGS) $(LUA_O) $(LUA_A) $(LIBS)
++ $(CC) -fno-common $(MYLDFLAGS) \
++ -o $@ $(LUA_O) $(LUA_A) -L. -llua.5.1.5 $(LIBS)
+
+ $(LUAC_T): $(LUAC_O) $(LUA_A)
+ $(CC) -o $@ $(MYLDFLAGS) $(LUAC_O) $(LUA_A) $(LIBS)
diff --git a/pkgs/development/interpreters/lua-5/5.1.nix b/pkgs/development/interpreters/lua-5/5.1.nix
index 27b1589d27f..9a57a034ad1 100644
--- a/pkgs/development/interpreters/lua-5/5.1.nix
+++ b/pkgs/development/interpreters/lua-5/5.1.nix
@@ -18,9 +18,14 @@ stdenv.mkDerivation rec {
buildInputs = [ readline ];
- patches = [ dsoPatch ];
+ patches = if stdenv.isDarwin then [ ./5.1.darwin.patch ] else [ dsoPatch ];
- configurePhase = ''
+ configurePhase =
+ if stdenv.isDarwin
+ then ''
+ makeFlagsArray=( INSTALL_TOP=$out INSTALL_MAN=$out/share/man/man1 PLAT=macosx CFLAGS="-DLUA_USE_LINUX -fno-common -O2" LDLAGS="" )
+ installFlagsArray=( TO_BIN="lua luac" TO_LIB="liblua.5.1.5.dylib" INSTALL_DATA='cp -d' )
+ '' else ''
makeFlagsArray=( INSTALL_TOP=$out INSTALL_MAN=$out/share/man/man1 PLAT=linux CFLAGS="-DLUA_USE_LINUX -O2 -fPIC" LDLAGS="-fPIC" )
installFlagsArray=( TO_BIN="lua luac" TO_LIB="liblua.a liblua.so liblua.so.5.1 liblua.so.5.1.5" INSTALL_DATA='cp -d' )
'';
diff --git a/pkgs/development/interpreters/lua-5/5.2.darwin.patch b/pkgs/development/interpreters/lua-5/5.2.darwin.patch
new file mode 100644
index 00000000000..ffc3ff34be7
--- /dev/null
+++ b/pkgs/development/interpreters/lua-5/5.2.darwin.patch
@@ -0,0 +1,52 @@
+diff --git a/Makefile b/Makefile
+index 209a132..9387b09 100644
+--- a/Makefile
++++ b/Makefile
+@@ -43,5 +43,5 @@ PLATS= aix ansi bsd freebsd generic linux macosx mingw posix solaris
+ # What to install.
+ TO_BIN= lua luac
+ TO_INC= lua.h luaconf.h lualib.h lauxlib.h lua.hpp
+-TO_LIB= liblua.a
++TO_LIB= liblua.${version}.dylib
+ TO_MAN= lua.1 luac.1
+
+ # Lua version and release.
+@@ -64,3 +64,5 @@ install: dummy
+ cd src && $(INSTALL_DATA) $(TO_INC) $(INSTALL_INC)
+ cd src && $(INSTALL_DATA) $(TO_LIB) $(INSTALL_LIB)
+ cd doc && $(INSTALL_DATA) $(TO_MAN) $(INSTALL_MAN)
++ ln -s -f liblua.${version}.dylib $(INSTALL_LIB)/liblua.${majorVersion}.dylib
++ ln -s -f liblua.${majorVersion}.dylib $(INSTALL_LIB)/liblua.dylib
+
+ ranlib:
+ cd src && cd $(INSTALL_LIB) && $(RANLIB) $(TO_LIB)
+diff --git a/src/Makefile b/src/Makefile
+index fea895b..d9146d0 100644
+--- a/src/Makefile
++++ b/src/Makefile
+@@ -28,7 +28,7 @@ MYOBJS=
+
+ PLATS= aix ansi bsd freebsd generic linux macosx mingw posix solaris
+
+-LUA_A= liblua.a
++LUA_A= liblua.${version}.dylib
+ CORE_O= lapi.o lcode.o lctype.o ldebug.o ldo.o ldump.o lfunc.o lgc.o llex.o \
+ lmem.o lobject.o lopcodes.o lparser.o lstate.o lstring.o ltable.o \
+ ltm.o lundump.o lvm.o lzio.o
+@@ -56,11 +56,13 @@ o: $(ALL_O)
+ a: $(ALL_A)
+
+ $(LUA_A): $(BASE_O)
+- $(AR) $@ $(BASE_O)
+- $(RANLIB) $@
++ $(CC) -dynamiclib -install_name $(out)/lib/liblua.${version}.dylib \
++ -compatibility_version ${version} -current_version ${version} \
++ -o liblua.${version}.dylib $^
+
+ $(LUA_T): $(LUA_O) $(LUA_A)
+- $(CC) -o $@ $(LDFLAGS) $(LUA_O) $(LUA_A) $(LIBS)
++ $(CC) -fno-common $(MYLDFLAGS) \
++ -o $@ $(LUA_O) $(LUA_A) -L. -llua.${version} $(LIBS)
+
+ $(LUAC_T): $(LUAC_O) $(LUA_A)
+ $(CC) -o $@ $(LDFLAGS) $(LUAC_O) $(LUA_A) $(LIBS)
diff --git a/pkgs/development/interpreters/lua-5/5.2.nix b/pkgs/development/interpreters/lua-5/5.2.nix
index 70ab0c3bdf8..3e7323e461d 100644
--- a/pkgs/development/interpreters/lua-5/5.2.nix
+++ b/pkgs/development/interpreters/lua-5/5.2.nix
@@ -19,9 +19,14 @@ stdenv.mkDerivation rec {
buildInputs = [ readline ];
- patches = [ dsoPatch ];
+ patches = if stdenv.isDarwin then [ ./5.2.darwin.patch ] else [ dsoPatch ];
- configurePhase = ''
+ configurePhase =
+ if stdenv.isDarwin
+ then ''
+ makeFlagsArray=( INSTALL_TOP=$out INSTALL_MAN=$out/share/man/man1 PLAT=macosx CFLAGS="-DLUA_USE_LINUX -fno-common -O2 -fPIC${if compat then " -DLUA_COMPAT_ALL" else ""}" LDLAGS="-fPIC" V=${majorVersion} R=${version} )
+ installFlagsArray=( TO_BIN="lua luac" TO_LIB="liblua.${version}.dylib" INSTALL_DATA='cp -d' )
+ '' else ''
makeFlagsArray=( INSTALL_TOP=$out INSTALL_MAN=$out/share/man/man1 PLAT=linux CFLAGS="-DLUA_USE_LINUX -O2 -fPIC${if compat then " -DLUA_COMPAT_ALL" else ""}" LDLAGS="-fPIC" V=${majorVersion} R=${version} )
installFlagsArray=( TO_BIN="lua luac" TO_LIB="liblua.a liblua.so liblua.so.${majorVersion} liblua.so.${version}" INSTALL_DATA='cp -d' )
'';
diff --git a/pkgs/development/interpreters/luajit/default.nix b/pkgs/development/interpreters/luajit/default.nix
index f74ad18d5e4..46c0b49c3b8 100644
--- a/pkgs/development/interpreters/luajit/default.nix
+++ b/pkgs/development/interpreters/luajit/default.nix
@@ -1,28 +1,31 @@
{ stdenv, fetchurl }:
-stdenv.mkDerivation rec{
- version = "2.0.2";
- name = "LuaJIT-${version}";
+stdenv.mkDerivation rec {
+ name = "luajit-${version}";
+ version = "2.0.3";
- src = fetchurl {
- url="http://luajit.org/download/${name}.tar.gz";
- sha256="0f3cykihfdn3gi6na9p0xjd4jnv26z18m441n5vyg42q9abh4ln0";
- };
+ src = fetchurl {
+ url = "http://luajit.org/download/LuaJIT-${version}.tar.gz";
+ sha256 = "0ydxpqkmsn2c341j4r2v6r5r0ig3kbwv3i9jran3iv81s6r6rgjm";
+ };
- patchPhase = stdenv.lib.optionalString (stdenv.gcc.libc != null)
- ''
- substituteInPlace Makefile \
- --replace ldconfig ${stdenv.gcc.libc}/sbin/ldconfig
- '';
+ enableParallelBuilding = true;
- installPhase = ''
- make install PREFIX=$out
- '';
+ patchPhase = stdenv.lib.optionalString (stdenv.gcc.libc != null)
+ ''
+ substituteInPlace Makefile \
+ --replace ldconfig ${stdenv.gcc.libc}/sbin/ldconfig
+ '';
- meta = {
- description= "Just-in-time compiler and interpreter for lua 5.1.";
- homepage = http://luajit.org;
- license = stdenv.lib.licenses.mit;
- platorms = stdenv.lib.platforms.linux;
- };
+ configurePhase = false;
+ buildFlags = [ "amalg" ]; # Build highly optimized version
+ installPhase = "make install PREFIX=$out";
+
+ meta = {
+ description = "high-performance JIT compiler for Lua 5.1";
+ homepage = http://luajit.org;
+ license = stdenv.lib.licenses.mit;
+ platforms = stdenv.lib.platforms.linux;
+ maintainers = [ stdenv.lib.maintainers.thoughtpolice ];
+ };
}
diff --git a/pkgs/development/interpreters/perl/5.16/default.nix b/pkgs/development/interpreters/perl/5.16/default.nix
index a8c17545303..bbd9e003b2c 100644
--- a/pkgs/development/interpreters/perl/5.16/default.nix
+++ b/pkgs/development/interpreters/perl/5.16/default.nix
@@ -70,6 +70,8 @@ stdenv.mkDerivation rec {
testsToSkip = ''
lib/Net/hostent.t \
dist/IO/t/{io_multihomed.t,io_sock.t} \
+ dist/Net-Ping/t/*.t \
+ cpan/autodie/t/truncate.t \
t/porting/{maintainers.t,regen.t} \
cpan/Socket/t/get{name,addr}info.t \
'' + optionalString stdenv.isFreeBSD ''
diff --git a/pkgs/development/interpreters/python/2.7/CVE-2014-1912.patch b/pkgs/development/interpreters/python/2.7/CVE-2014-1912.patch
new file mode 100644
index 00000000000..95399bf7607
--- /dev/null
+++ b/pkgs/development/interpreters/python/2.7/CVE-2014-1912.patch
@@ -0,0 +1,57 @@
+# Edited from Mercurial patch: deleted the NEWS hunk, since it didn't apply cleanly.
+# It added the following line to NEWS:
+# - Issue #20246: Fix buffer overflow in socket.recvfrom_into.
+
+# HG changeset patch
+# User Benjamin Peterson
+# Date 1389671978 18000
+# Node ID 87673659d8f7ba1623cd4914f09ad3d2ade034e9
+# Parent 2631d33ee7fbd5f0288931ef37872218d511d2e8
+complain when nbytes > buflen to fix possible buffer overflow (closes #20246)
+
+diff --git a/Lib/test/test_socket.py b/Lib/test/test_socket.py
+--- a/Lib/test/test_socket.py
++++ b/Lib/test/test_socket.py
+@@ -1620,6 +1620,16 @@ class BufferIOTest(SocketConnectedTest):
+
+ _testRecvFromIntoMemoryview = _testRecvFromIntoArray
+
++ def testRecvFromIntoSmallBuffer(self):
++ # See issue #20246.
++ buf = bytearray(8)
++ self.assertRaises(ValueError, self.cli_conn.recvfrom_into, buf, 1024)
++
++ def _testRecvFromIntoSmallBuffer(self):
++ with test_support.check_py3k_warnings():
++ buf = buffer(MSG*2048)
++ self.serv_conn.send(buf)
++
+
+ TIPC_STYPE = 2000
+ TIPC_LOWER = 200
+diff --git a/Misc/ACKS b/Misc/ACKS
+--- a/Misc/ACKS
++++ b/Misc/ACKS
+@@ -979,6 +979,7 @@ Eric V. Smith
+ Christopher Smith
+ Gregory P. Smith
+ Roy Smith
++Ryan Smith-Roberts
+ Rafal Smotrzyk
+ Dirk Soede
+ Paul Sokolovsky
+diff --git a/Misc/NEWS b/Misc/NEWS
+--- a/Modules/socketmodule.c
++++ b/Modules/socketmodule.c
+@@ -2742,6 +2742,10 @@ sock_recvfrom_into(PySocketSockObject *s
+ if (recvlen == 0) {
+ /* If nbytes was not specified, use the buffer's length */
+ recvlen = buflen;
++ } else if (recvlen > buflen) {
++ PyErr_SetString(PyExc_ValueError,
++ "nbytes is greater than the length of the buffer");
++ goto error;
+ }
+
+ readlen = sock_recvfrom_guts(s, buf.buf, recvlen, flags, &addr);
+
diff --git a/pkgs/development/interpreters/python/2.7/default.nix b/pkgs/development/interpreters/python/2.7/default.nix
index e9277ce2daf..eeadc3c8cc7 100644
--- a/pkgs/development/interpreters/python/2.7/default.nix
+++ b/pkgs/development/interpreters/python/2.7/default.nix
@@ -28,6 +28,10 @@ let
# patch python to put zero timestamp into pyc
# if DETERMINISTIC_BUILD env var is set
./deterministic-build.patch
+
+ # See http://bugs.python.org/issue20246
+ # This will be fixed in 2.7.7.
+ ./CVE-2014-1912.patch
];
postPatch = stdenv.lib.optionalString (stdenv.gcc.libc != null) ''
diff --git a/pkgs/development/interpreters/python/3.2/CVE-2014-1912.patch b/pkgs/development/interpreters/python/3.2/CVE-2014-1912.patch
new file mode 100644
index 00000000000..c69efd17f96
--- /dev/null
+++ b/pkgs/development/interpreters/python/3.2/CVE-2014-1912.patch
@@ -0,0 +1,57 @@
+# Edited from Mercurial patch: deleted the NEWS hunk, since it didn't apply cleanly.
+# It added the following line to NEWS:
+# - Issue #20246: Fix buffer overflow in socket.recvfrom_into.
+
+
+# HG changeset patch
+# User Benjamin Peterson
+# Date 1389671978 18000
+# Node ID 9c56217e5c793685eeaf0ee224848c402bdf1e4c
+# Parent 2b5cd6d4d149dea6c6941b7e07ada248b29fc9f6
+complain when nbytes > buflen to fix possible buffer overflow (closes #20246)
+
+diff --git a/Lib/test/test_socket.py b/Lib/test/test_socket.py
+--- a/Lib/test/test_socket.py
++++ b/Lib/test/test_socket.py
+@@ -1968,6 +1968,14 @@ class BufferIOTest(SocketConnectedTest):
+
+ _testRecvFromIntoMemoryview = _testRecvFromIntoArray
+
++ def testRecvFromIntoSmallBuffer(self):
++ # See issue #20246.
++ buf = bytearray(8)
++ self.assertRaises(ValueError, self.cli_conn.recvfrom_into, buf, 1024)
++
++ def _testRecvFromIntoSmallBuffer(self):
++ self.serv_conn.send(MSG*2048)
++
+
+ TIPC_STYPE = 2000
+ TIPC_LOWER = 200
+diff --git a/Misc/ACKS b/Misc/ACKS
+--- a/Misc/ACKS
++++ b/Misc/ACKS
+@@ -1020,6 +1020,7 @@ Eric V. Smith
+ Christopher Smith
+ Gregory P. Smith
+ Roy Smith
++Ryan Smith-Roberts
+ Rafal Smotrzyk
+ Dirk Soede
+ Paul Sokolovsky
+diff --git a/Misc/NEWS b/Misc/NEWS
+--- a/Modules/socketmodule.c
++++ b/Modules/socketmodule.c
+@@ -2598,6 +2598,11 @@ sock_recvfrom_into(PySocketSockObject *s
+ if (recvlen == 0) {
+ /* If nbytes was not specified, use the buffer's length */
+ recvlen = buflen;
++ } else if (recvlen > buflen) {
++ PyBuffer_Release(&pbuf);
++ PyErr_SetString(PyExc_ValueError,
++ "nbytes is greater than the length of the buffer");
++ return NULL;
+ }
+
+ readlen = sock_recvfrom_guts(s, buf, recvlen, flags, &addr);
+
diff --git a/pkgs/development/interpreters/python/3.2/default.nix b/pkgs/development/interpreters/python/3.2/default.nix
index 03f2d392bd1..c103b0f59cd 100644
--- a/pkgs/development/interpreters/python/3.2/default.nix
+++ b/pkgs/development/interpreters/python/3.2/default.nix
@@ -32,6 +32,12 @@ stdenv.mkDerivation {
sha256 = "0pxs234g08v3lar09lvzxw4vqdpwkbqmvkv894j2w7aklskcjd6v";
};
+ patches =
+ [
+ # See http://bugs.python.org/issue20246
+ ./CVE-2014-1912.patch
+ ];
+
NIX_LDFLAGS = stdenv.lib.optionalString stdenv.isLinux "-lgcc_s";
preConfigure = ''
diff --git a/pkgs/development/libraries/accountservice/default.nix b/pkgs/development/libraries/accountservice/default.nix
index 8cab9e39e19..9734a6bc980 100644
--- a/pkgs/development/libraries/accountservice/default.nix
+++ b/pkgs/development/libraries/accountservice/default.nix
@@ -1,4 +1,5 @@
-{ stdenv, fetchurl, pkgconfig, glib, intltool, libtool, gobjectIntrospection, polkit }:
+{ stdenv, fetchurl, pkgconfig, glib, intltool
+, libtool, gobjectIntrospection, polkit, systemd }:
stdenv.mkDerivation rec {
name = "accountsservice-0.6.35";
@@ -8,6 +9,8 @@ stdenv.mkDerivation rec {
sha256 = "0f1hzl6hw56xvwgmd4yvmdyj15xj1fafw45pzv3qarww7h0wg8b5";
};
- buildInputs = [ pkgconfig glib intltool libtool gobjectIntrospection polkit ];
+ buildInputs = [ pkgconfig glib intltool libtool
+ gobjectIntrospection polkit systemd ];
+ configureFlags = [ "--with-systemdsystemunitdir=$(out)/etc/systemd/system" ];
}
diff --git a/pkgs/development/libraries/aspell/default.nix b/pkgs/development/libraries/aspell/default.nix
index a69cee99b2b..6b054aaf44b 100644
--- a/pkgs/development/libraries/aspell/default.nix
+++ b/pkgs/development/libraries/aspell/default.nix
@@ -12,6 +12,13 @@ stdenv.mkDerivation rec {
doCheck = true;
+ preConfigure = ''
+ configureFlagsArray=(
+ --enable-pkglibdir=$out/lib/aspell
+ --enable-pkgdatadir=$out/lib/aspell
+ );
+ '';
+
# Note: Users should define the `ASPELL_CONF' environment variable to
# `dict-dir $HOME/.nix-profile/lib/aspell/' so that they can access
# dictionaries installed in their profile.
diff --git a/pkgs/development/libraries/capstone/default.nix b/pkgs/development/libraries/capstone/default.nix
new file mode 100644
index 00000000000..d61c82bb7d3
--- /dev/null
+++ b/pkgs/development/libraries/capstone/default.nix
@@ -0,0 +1,27 @@
+{ stdenv, fetchurl, bash }:
+
+stdenv.mkDerivation rec {
+ name = "capstone-${version}";
+ version = "2.1.2";
+
+ src = fetchurl {
+ url = "http://www.capstone-engine.org/download/${version}/${name}.tgz";
+ sha256 = "1k6px3vdcsfby3lakss5sazs875kbzkzqk7cj79xrm2y5ik1vr29";
+ };
+
+ buildPhase = false;
+
+ patchPhase = ''
+ substituteInPlace make.sh --replace "/usr/bin/env bash" "${bash}/bin/bash"
+ '';
+
+ installPhase = "PREFIX=$out ./make.sh install";
+
+ meta = {
+ description = "advanced disassembly library";
+ homepage = "http://www.capstone-engine.org";
+ license = stdenv.lib.licenses.bsd3;
+ platforms = stdenv.lib.platforms.linux;
+ maintainers = [ stdenv.lib.maintainers.thoughtpolice ];
+ };
+}
diff --git a/pkgs/development/libraries/faac/default.nix b/pkgs/development/libraries/faac/default.nix
index 8bfaaf3ea49..2c4f8da7783 100644
--- a/pkgs/development/libraries/faac/default.nix
+++ b/pkgs/development/libraries/faac/default.nix
@@ -15,6 +15,6 @@ stdenv.mkDerivation rec {
homepage = http://www.audiocoding.com/faac.html;
# Incompatible with GPL. Some changes to the base code, included in faac,
# are under LGPL though.
- license = "unfree";
+ license = "unfree-redistributable";
};
}
diff --git a/pkgs/development/libraries/ffmpeg/2.x.nix b/pkgs/development/libraries/ffmpeg/2.x.nix
index 931881fd142..919972efb3c 100644
--- a/pkgs/development/libraries/ffmpeg/2.x.nix
+++ b/pkgs/development/libraries/ffmpeg/2.x.nix
@@ -5,11 +5,11 @@
}:
stdenv.mkDerivation rec {
- name = "ffmpeg-2.1.4";
+ name = "ffmpeg-2.2.1";
src = fetchurl {
url = "http://www.ffmpeg.org/releases/${name}.tar.bz2";
- sha256 = "00c1k84amgkc7vk5xkrg7z99q7jbfhbz3qk854cxnc38d2ynrd3z";
+ sha256 = "153kfk8rzrfxx930rrk417b2m695dvy47v4hci3nd49iggx9jzz1";
};
mp3Support = config.ffmpeg.mp3 or true;
diff --git a/pkgs/development/libraries/giflib/4.1.nix b/pkgs/development/libraries/giflib/4.1.nix
index 35d66b3647b..13cd1c79b6a 100644
--- a/pkgs/development/libraries/giflib/4.1.nix
+++ b/pkgs/development/libraries/giflib/4.1.nix
@@ -6,5 +6,8 @@ stdenv.mkDerivation {
url = mirror://sourceforge/giflib/giflib-4.1.6.tar.bz2;
sha256 = "1v9b7ywz7qg8hli0s9vv1b8q9xxb2xvqq2mg1zpr73xwqpcwxhg1";
};
+ meta = {
+ branch = "4.1";
+ };
}
diff --git a/pkgs/development/libraries/glib/default.nix b/pkgs/development/libraries/glib/default.nix
index af4b152dcce..033a1def3ce 100644
--- a/pkgs/development/libraries/glib/default.nix
+++ b/pkgs/development/libraries/glib/default.nix
@@ -48,6 +48,8 @@ stdenv.mkDerivation rec {
sha256 = "1d98mbqjmc34s8095lkw1j1bwvnnkw9581yfvjaikjvfjsaz29qd";
};
+ setupHook = ./setup-hook.sh;
+
buildInputs = [ libelf ]
++ optionals doCheck [ tzdata libxml2 desktop_file_utils shared_mime_info ];
diff --git a/pkgs/development/libraries/glib/setup-hook.sh b/pkgs/development/libraries/glib/setup-hook.sh
new file mode 100644
index 00000000000..f173744e5ca
--- /dev/null
+++ b/pkgs/development/libraries/glib/setup-hook.sh
@@ -0,0 +1,17 @@
+# Install gschemas, if any, in a package-specific directory
+installFlagsArray+=("gsettingsschemadir=$out/share/gsettings-schemas/$name/glib-2.0/schemas/")
+
+make_glib_find_gsettings_schemas() {
+ # For packages that need gschemas of other packages (e.g. empathy)
+ if [ -d "$1"/share/gsettings-schemas/*/glib-2.0/schemas ]; then
+ addToSearchPath GSETTINGS_SCHEMAS_PATH "$1/share/gsettings-schemas/"*
+ fi
+}
+
+envHooks+=(make_glib_find_gsettings_schemas)
+
+glibPreFixupPhase() {
+ addToSearchPath GSETTINGS_SCHEMAS_PATH "$out/share/gsettings-schemas/$name"
+}
+
+preFixupPhases="$preFixupPhases glibPreFixupPhase"
diff --git a/pkgs/development/libraries/glibc/2.18/cve-2012-4412+4424.patch b/pkgs/development/libraries/glibc/2.18/cve-2012-4412+4424.patch
deleted file mode 100644
index 67ffbbc217b..00000000000
--- a/pkgs/development/libraries/glibc/2.18/cve-2012-4412+4424.patch
+++ /dev/null
@@ -1,1006 +0,0 @@
-https://projects.archlinux.org/svntogit/packages.git/tree/trunk/glibc-2.18-strcoll-CVE-2012-4412+4424.patch?h=packages/glibc
-
-diff --git a/string/strcoll_l.c b/string/strcoll_l.c
-index ecda08f..bb34a72 100644
---- a/string/strcoll_l.c
-+++ b/string/strcoll_l.c
-@@ -41,11 +41,434 @@
-
- #include "../locale/localeinfo.h"
-
-+/* Track status while looking for sequences in a string. */
-+typedef struct
-+{
-+ int len; /* Length of the current sequence. */
-+ size_t val; /* Position of the sequence relative to the
-+ previous non-ignored sequence. */
-+ size_t idxnow; /* Current index in sequences. */
-+ size_t idxmax; /* Maximum index in sequences. */
-+ size_t idxcnt; /* Current count of indices. */
-+ size_t backw; /* Current Backward sequence index. */
-+ size_t backw_stop; /* Index where the backward sequences stop. */
-+ const USTRING_TYPE *us; /* The string. */
-+ int32_t *idxarr; /* Array to cache weight indices. */
-+ unsigned char *rulearr; /* Array to cache rules. */
-+ unsigned char rule; /* Saved rule for the first sequence. */
-+ int32_t idx; /* Index to weight of the current sequence. */
-+ int32_t save_idx; /* Save looked up index of a forward
-+ sequence after the last backward
-+ sequence. */
-+ const USTRING_TYPE *back_us; /* Beginning of the backward sequence. */
-+} coll_seq;
-+
-+/* Get next sequence. The weight indices are cached, so we don't need to
-+ traverse the string. */
-+static void
-+get_next_seq_cached (coll_seq *seq, int nrules, int pass,
-+ const unsigned char *rulesets,
-+ const USTRING_TYPE *weights)
-+{
-+ size_t val = seq->val = 0;
-+ int len = seq->len;
-+ size_t backw_stop = seq->backw_stop;
-+ size_t backw = seq->backw;
-+ size_t idxcnt = seq->idxcnt;
-+ size_t idxmax = seq->idxmax;
-+ size_t idxnow = seq->idxnow;
-+ unsigned char *rulearr = seq->rulearr;
-+ int32_t *idxarr = seq->idxarr;
-+
-+ while (len == 0)
-+ {
-+ ++val;
-+ if (backw_stop != ~0ul)
-+ {
-+ /* There is something pushed. */
-+ if (backw == backw_stop)
-+ {
-+ /* The last pushed character was handled. Continue
-+ with forward characters. */
-+ if (idxcnt < idxmax)
-+ {
-+ idxnow = idxcnt;
-+ backw_stop = ~0ul;
-+ }
-+ else
-+ {
-+ /* Nothing any more. The backward sequence
-+ ended with the last sequence in the string. */
-+ idxnow = ~0ul;
-+ break;
-+ }
-+ }
-+ else
-+ idxnow = --backw;
-+ }
-+ else
-+ {
-+ backw_stop = idxcnt;
-+
-+ while (idxcnt < idxmax)
-+ {
-+ if ((rulesets[rulearr[idxcnt] * nrules + pass]
-+ & sort_backward) == 0)
-+ /* No more backward characters to push. */
-+ break;
-+ ++idxcnt;
-+ }
-+
-+ if (backw_stop == idxcnt)
-+ {
-+ /* No sequence at all or just one. */
-+ if (idxcnt == idxmax)
-+ /* Note that LEN is still zero. */
-+ break;
-+
-+ backw_stop = ~0ul;
-+ idxnow = idxcnt++;
-+ }
-+ else
-+ /* We pushed backward sequences. */
-+ idxnow = backw = idxcnt - 1;
-+ }
-+ len = weights[idxarr[idxnow]++];
-+ }
-+
-+ /* Update the structure. */
-+ seq->val = val;
-+ seq->len = len;
-+ seq->backw_stop = backw_stop;
-+ seq->backw = backw;
-+ seq->idxcnt = idxcnt;
-+ seq->idxnow = idxnow;
-+}
-+
-+/* Get next sequence. Traverse the string as required. */
-+static void
-+get_next_seq (coll_seq *seq, int nrules, const unsigned char *rulesets,
-+ const USTRING_TYPE *weights, const int32_t *table,
-+ const USTRING_TYPE *extra, const int32_t *indirect)
-+{
-+#include WEIGHT_H
-+ size_t val = seq->val = 0;
-+ int len = seq->len;
-+ size_t backw_stop = seq->backw_stop;
-+ size_t backw = seq->backw;
-+ size_t idxcnt = seq->idxcnt;
-+ size_t idxmax = seq->idxmax;
-+ size_t idxnow = seq->idxnow;
-+ unsigned char *rulearr = seq->rulearr;
-+ int32_t *idxarr = seq->idxarr;
-+ const USTRING_TYPE *us = seq->us;
-+
-+ while (len == 0)
-+ {
-+ ++val;
-+ if (backw_stop != ~0ul)
-+ {
-+ /* There is something pushed. */
-+ if (backw == backw_stop)
-+ {
-+ /* The last pushed character was handled. Continue
-+ with forward characters. */
-+ if (idxcnt < idxmax)
-+ {
-+ idxnow = idxcnt;
-+ backw_stop = ~0ul;
-+ }
-+ else
-+ /* Nothing any more. The backward sequence ended with
-+ the last sequence in the string. Note that LEN
-+ is still zero. */
-+ break;
-+ }
-+ else
-+ idxnow = --backw;
-+ }
-+ else
-+ {
-+ backw_stop = idxmax;
-+
-+ while (*us != L('\0'))
-+ {
-+ int32_t tmp = findidx (&us, -1);
-+ rulearr[idxmax] = tmp >> 24;
-+ idxarr[idxmax] = tmp & 0xffffff;
-+ idxcnt = idxmax++;
-+
-+ if ((rulesets[rulearr[idxcnt] * nrules]
-+ & sort_backward) == 0)
-+ /* No more backward characters to push. */
-+ break;
-+ ++idxcnt;
-+ }
-+
-+ if (backw_stop >= idxcnt)
-+ {
-+ /* No sequence at all or just one. */
-+ if (idxcnt == idxmax || backw_stop > idxcnt)
-+ /* Note that LEN is still zero. */
-+ break;
-+
-+ backw_stop = ~0ul;
-+ idxnow = idxcnt;
-+ }
-+ else
-+ /* We pushed backward sequences. */
-+ idxnow = backw = idxcnt - 1;
-+ }
-+ len = weights[idxarr[idxnow]++];
-+ }
-+
-+ /* Update the structure. */
-+ seq->val = val;
-+ seq->len = len;
-+ seq->backw_stop = backw_stop;
-+ seq->backw = backw;
-+ seq->idxcnt = idxcnt;
-+ seq->idxmax = idxmax;
-+ seq->idxnow = idxnow;
-+ seq->us = us;
-+}
-+
-+/* Get next sequence. Traverse the string as required. This function does not
-+ set or use any index or rule cache. */
-+static void
-+get_next_seq_nocache (coll_seq *seq, int nrules, const unsigned char *rulesets,
-+ const USTRING_TYPE *weights, const int32_t *table,
-+ const USTRING_TYPE *extra, const int32_t *indirect,
-+ int pass)
-+{
-+#include WEIGHT_H
-+ size_t val = seq->val = 0;
-+ int len = seq->len;
-+ size_t backw_stop = seq->backw_stop;
-+ size_t backw = seq->backw;
-+ size_t idxcnt = seq->idxcnt;
-+ size_t idxmax = seq->idxmax;
-+ int32_t idx = seq->idx;
-+ const USTRING_TYPE *us = seq->us;
-+
-+ while (len == 0)
-+ {
-+ ++val;
-+ if (backw_stop != ~0ul)
-+ {
-+ /* There is something pushed. */
-+ if (backw == backw_stop)
-+ {
-+ /* The last pushed character was handled. Continue
-+ with forward characters. */
-+ if (idxcnt < idxmax)
-+ {
-+ idx = seq->save_idx;
-+ backw_stop = ~0ul;
-+ }
-+ else
-+ {
-+ /* Nothing anymore. The backward sequence ended with
-+ the last sequence in the string. Note that len is
-+ still zero. */
-+ idx = 0;
-+ break;
-+ }
-+ }
-+ else
-+ {
-+ /* XXX Traverse BACKW sequences from the beginning of
-+ BACKW_STOP to get the next sequence. Is ther a quicker way
-+ to do this? */
-+ size_t i = backw_stop;
-+ us = seq->back_us;
-+ while (i < backw)
-+ {
-+ int32_t tmp = findidx (&us, -1);
-+ idx = tmp & 0xffffff;
-+ i++;
-+ }
-+ --backw;
-+ us = seq->us;
-+ }
-+ }
-+ else
-+ {
-+ backw_stop = idxmax;
-+ int32_t prev_idx = idx;
-+
-+ while (*us != L('\0'))
-+ {
-+ int32_t tmp = findidx (&us, -1);
-+ unsigned char rule = tmp >> 24;
-+ prev_idx = idx;
-+ idx = tmp & 0xffffff;
-+ idxcnt = idxmax++;
-+
-+ /* Save the rule for the first sequence. */
-+ if (__glibc_unlikely (idxcnt == 0))
-+ seq->rule = rule;
-+
-+ if ((rulesets[rule * nrules + pass]
-+ & sort_backward) == 0)
-+ /* No more backward characters to push. */
-+ break;
-+ ++idxcnt;
-+ }
-+
-+ if (backw_stop >= idxcnt)
-+ {
-+ /* No sequence at all or just one. */
-+ if (idxcnt == idxmax || backw_stop > idxcnt)
-+ /* Note that len is still zero. */
-+ break;
-+
-+ backw_stop = ~0ul;
-+ }
-+ else
-+ {
-+ /* We pushed backward sequences. If the stream ended with the
-+ backward sequence, then we process the last sequence we
-+ found. Otherwise we process the sequence before the last
-+ one since the last one was a forward sequence. */
-+ seq->back_us = seq->us;
-+ seq->us = us;
-+ backw = idxcnt;
-+ if (idxmax > idxcnt)
-+ {
-+ backw--;
-+ seq->save_idx = idx;
-+ idx = prev_idx;
-+ }
-+ if (backw > backw_stop)
-+ backw--;
-+ }
-+ }
-+
-+ len = weights[idx++];
-+ /* Skip over indices of previous levels. */
-+ for (int i = 0; i < pass; i++)
-+ {
-+ idx += len;
-+ len = weights[idx];
-+ idx++;
-+ }
-+ }
-+
-+ /* Update the structure. */
-+ seq->val = val;
-+ seq->len = len;
-+ seq->backw_stop = backw_stop;
-+ seq->backw = backw;
-+ seq->idxcnt = idxcnt;
-+ seq->idxmax = idxmax;
-+ seq->us = us;
-+ seq->idx = idx;
-+}
-+
-+/* Compare two sequences. This version does not use the index and rules
-+ cache. */
-+static int
-+do_compare_nocache (coll_seq *seq1, coll_seq *seq2, int position,
-+ const USTRING_TYPE *weights)
-+{
-+ int seq1len = seq1->len;
-+ int seq2len = seq2->len;
-+ size_t val1 = seq1->val;
-+ size_t val2 = seq2->val;
-+ int idx1 = seq1->idx;
-+ int idx2 = seq2->idx;
-+ int result = 0;
-+
-+ /* Test for position if necessary. */
-+ if (position && val1 != val2)
-+ {
-+ result = val1 > val2 ? 1 : -1;
-+ goto out;
-+ }
-+
-+ /* Compare the two sequences. */
-+ do
-+ {
-+ if (weights[idx1] != weights[idx2])
-+ {
-+ /* The sequences differ. */
-+ result = weights[idx1] - weights[idx2];
-+ goto out;
-+ }
-+
-+ /* Increment the offsets. */
-+ ++idx1;
-+ ++idx2;
-+
-+ --seq1len;
-+ --seq2len;
-+ }
-+ while (seq1len > 0 && seq2len > 0);
-+
-+ if (position && seq1len != seq2len)
-+ result = seq1len - seq2len;
-+
-+out:
-+ seq1->len = seq1len;
-+ seq2->len = seq2len;
-+ seq1->idx = idx1;
-+ seq2->idx = idx2;
-+ return result;
-+}
-+
-+/* Compare two sequences using the index cache. */
-+static int
-+do_compare (coll_seq *seq1, coll_seq *seq2, int position,
-+ const USTRING_TYPE *weights)
-+{
-+ int seq1len = seq1->len;
-+ int seq2len = seq2->len;
-+ size_t val1 = seq1->val;
-+ size_t val2 = seq2->val;
-+ int32_t *idx1arr = seq1->idxarr;
-+ int32_t *idx2arr = seq2->idxarr;
-+ int idx1now = seq1->idxnow;
-+ int idx2now = seq2->idxnow;
-+ int result = 0;
-+
-+ /* Test for position if necessary. */
-+ if (position && val1 != val2)
-+ {
-+ result = val1 > val2 ? 1 : -1;
-+ goto out;
-+ }
-+
-+ /* Compare the two sequences. */
-+ do
-+ {
-+ if (weights[idx1arr[idx1now]] != weights[idx2arr[idx2now]])
-+ {
-+ /* The sequences differ. */
-+ result = weights[idx1arr[idx1now]] - weights[idx2arr[idx2now]];
-+ goto out;
-+ }
-+
-+ /* Increment the offsets. */
-+ ++idx1arr[idx1now];
-+ ++idx2arr[idx2now];
-+
-+ --seq1len;
-+ --seq2len;
-+ }
-+ while (seq1len > 0 && seq2len > 0);
-+
-+ if (position && seq1len != seq2len)
-+ result = seq1len - seq2len;
-+
-+out:
-+ seq1->len = seq1len;
-+ seq2->len = seq2len;
-+ return result;
-+}
-+
- int
--STRCOLL (s1, s2, l)
-- const STRING_TYPE *s1;
-- const STRING_TYPE *s2;
-- __locale_t l;
-+STRCOLL (const STRING_TYPE *s1, const STRING_TYPE *s2, __locale_t l)
- {
- struct __locale_data *current = l->__locales[LC_COLLATE];
- uint_fast32_t nrules = current->values[_NL_ITEM_INDEX (_NL_COLLATE_NRULES)].word;
-@@ -56,34 +479,6 @@ STRCOLL (s1, s2, l)
- const USTRING_TYPE *weights;
- const USTRING_TYPE *extra;
- const int32_t *indirect;
-- uint_fast32_t pass;
-- int result = 0;
-- const USTRING_TYPE *us1;
-- const USTRING_TYPE *us2;
-- size_t s1len;
-- size_t s2len;
-- int32_t *idx1arr;
-- int32_t *idx2arr;
-- unsigned char *rule1arr;
-- unsigned char *rule2arr;
-- size_t idx1max;
-- size_t idx2max;
-- size_t idx1cnt;
-- size_t idx2cnt;
-- size_t idx1now;
-- size_t idx2now;
-- size_t backw1_stop;
-- size_t backw2_stop;
-- size_t backw1;
-- size_t backw2;
-- int val1;
-- int val2;
-- int position;
-- int seq1len;
-- int seq2len;
-- int use_malloc;
--
--#include WEIGHT_H
-
- if (nrules == 0)
- return STRCMP (s1, s2);
-@@ -98,7 +493,6 @@ STRCOLL (s1, s2, l)
- current->values[_NL_ITEM_INDEX (CONCAT(_NL_COLLATE_EXTRA,SUFFIX))].string;
- indirect = (const int32_t *)
- current->values[_NL_ITEM_INDEX (CONCAT(_NL_COLLATE_INDIRECT,SUFFIX))].string;
-- use_malloc = 0;
-
- assert (((uintptr_t) table) % __alignof__ (table[0]) == 0);
- assert (((uintptr_t) weights) % __alignof__ (weights[0]) == 0);
-@@ -106,18 +500,13 @@ STRCOLL (s1, s2, l)
- assert (((uintptr_t) indirect) % __alignof__ (indirect[0]) == 0);
-
- /* We need this a few times. */
-- s1len = STRLEN (s1);
-- s2len = STRLEN (s2);
-+ size_t s1len = STRLEN (s1);
-+ size_t s2len = STRLEN (s2);
-
- /* Catch empty strings. */
-- if (__builtin_expect (s1len == 0, 0) || __builtin_expect (s2len == 0, 0))
-+ if (__glibc_unlikely (s1len == 0) || __glibc_unlikely (s2len == 0))
- return (s1len != 0) - (s2len != 0);
-
-- /* We need the elements of the strings as unsigned values since they
-- are used as indeces. */
-- us1 = (const USTRING_TYPE *) s1;
-- us2 = (const USTRING_TYPE *) s2;
--
- /* Perform the first pass over the string and while doing this find
- and store the weights for each character. Since we want this to
- be as fast as possible we are using `alloca' to store the temporary
-@@ -127,411 +516,124 @@ STRCOLL (s1, s2, l)
-
- Please note that the localedef programs makes sure that `position'
- is not used at the first level. */
-- if (! __libc_use_alloca ((s1len + s2len) * (sizeof (int32_t) + 1)))
-- {
-- idx1arr = (int32_t *) malloc ((s1len + s2len) * (sizeof (int32_t) + 1));
-- idx2arr = &idx1arr[s1len];
-- rule1arr = (unsigned char *) &idx2arr[s2len];
-- rule2arr = &rule1arr[s1len];
--
-- if (idx1arr == NULL)
-- /* No memory. Well, go with the stack then.
--
-- XXX Once this implementation is stable we will handle this
-- differently. Instead of precomputing the indeces we will
-- do this in time. This means, though, that this happens for
-- every pass again. */
-- goto try_stack;
-- use_malloc = 1;
-- }
-- else
-- {
-- try_stack:
-- idx1arr = (int32_t *) alloca (s1len * sizeof (int32_t));
-- idx2arr = (int32_t *) alloca (s2len * sizeof (int32_t));
-- rule1arr = (unsigned char *) alloca (s1len);
-- rule2arr = (unsigned char *) alloca (s2len);
-- }
-
-- idx1cnt = 0;
-- idx2cnt = 0;
-- idx1max = 0;
-- idx2max = 0;
-- idx1now = 0;
-- idx2now = 0;
-- backw1_stop = ~0ul;
-- backw2_stop = ~0ul;
-- backw1 = ~0ul;
-- backw2 = ~0ul;
-- seq1len = 0;
-- seq2len = 0;
-- position = rulesets[0] & sort_position;
-- while (1)
-- {
-- val1 = 0;
-- val2 = 0;
--
-- /* Get the next non-IGNOREd element for string `s1'. */
-- if (seq1len == 0)
-- do
-- {
-- ++val1;
--
-- if (backw1_stop != ~0ul)
-- {
-- /* The is something pushed. */
-- if (backw1 == backw1_stop)
-- {
-- /* The last pushed character was handled. Continue
-- with forward characters. */
-- if (idx1cnt < idx1max)
-- {
-- idx1now = idx1cnt;
-- backw1_stop = ~0ul;
-- }
-- else
-- /* Nothing anymore. The backward sequence ended with
-- the last sequence in the string. Note that seq1len
-- is still zero. */
-- break;
-- }
-- else
-- idx1now = --backw1;
-- }
-- else
-- {
-- backw1_stop = idx1max;
--
-- while (*us1 != L('\0'))
-- {
-- int32_t tmp = findidx (&us1, -1);
-- rule1arr[idx1max] = tmp >> 24;
-- idx1arr[idx1max] = tmp & 0xffffff;
-- idx1cnt = idx1max++;
--
-- if ((rulesets[rule1arr[idx1cnt] * nrules]
-- & sort_backward) == 0)
-- /* No more backward characters to push. */
-- break;
-- ++idx1cnt;
-- }
--
-- if (backw1_stop >= idx1cnt)
-- {
-- /* No sequence at all or just one. */
-- if (idx1cnt == idx1max || backw1_stop > idx1cnt)
-- /* Note that seq1len is still zero. */
-- break;
--
-- backw1_stop = ~0ul;
-- idx1now = idx1cnt;
-- }
-- else
-- /* We pushed backward sequences. */
-- idx1now = backw1 = idx1cnt - 1;
-- }
-- }
-- while ((seq1len = weights[idx1arr[idx1now]++]) == 0);
--
-- /* And the same for string `s2'. */
-- if (seq2len == 0)
-- do
-- {
-- ++val2;
--
-- if (backw2_stop != ~0ul)
-- {
-- /* The is something pushed. */
-- if (backw2 == backw2_stop)
-- {
-- /* The last pushed character was handled. Continue
-- with forward characters. */
-- if (idx2cnt < idx2max)
-- {
-- idx2now = idx2cnt;
-- backw2_stop = ~0ul;
-- }
-- else
-- /* Nothing anymore. The backward sequence ended with
-- the last sequence in the string. Note that seq2len
-- is still zero. */
-- break;
-- }
-- else
-- idx2now = --backw2;
-- }
-- else
-- {
-- backw2_stop = idx2max;
--
-- while (*us2 != L('\0'))
-- {
-- int32_t tmp = findidx (&us2, -1);
-- rule2arr[idx2max] = tmp >> 24;
-- idx2arr[idx2max] = tmp & 0xffffff;
-- idx2cnt = idx2max++;
--
-- if ((rulesets[rule2arr[idx2cnt] * nrules]
-- & sort_backward) == 0)
-- /* No more backward characters to push. */
-- break;
-- ++idx2cnt;
-- }
--
-- if (backw2_stop >= idx2cnt)
-- {
-- /* No sequence at all or just one. */
-- if (idx2cnt == idx2max || backw2_stop > idx2cnt)
-- /* Note that seq1len is still zero. */
-- break;
--
-- backw2_stop = ~0ul;
-- idx2now = idx2cnt;
-- }
-- else
-- /* We pushed backward sequences. */
-- idx2now = backw2 = idx2cnt - 1;
-- }
-- }
-- while ((seq2len = weights[idx2arr[idx2now]++]) == 0);
--
-- /* See whether any or both strings are empty. */
-- if (seq1len == 0 || seq2len == 0)
-- {
-- if (seq1len == seq2len)
-- /* Both ended. So far so good, both strings are equal at the
-- first level. */
-- break;
--
-- /* This means one string is shorter than the other. Find out
-- which one and return an appropriate value. */
-- result = seq1len == 0 ? -1 : 1;
-- goto free_and_return;
-- }
-+ coll_seq seq1, seq2;
-+ bool use_malloc = false;
-+ int result = 0;
-
-- /* Test for position if necessary. */
-- if (position && val1 != val2)
-- {
-- result = val1 - val2;
-- goto free_and_return;
-- }
-+ memset (&seq1, 0, sizeof (seq1));
-+ seq2 = seq1;
-
-- /* Compare the two sequences. */
-- do
-- {
-- if (weights[idx1arr[idx1now]] != weights[idx2arr[idx2now]])
-- {
-- /* The sequences differ. */
-- result = weights[idx1arr[idx1now]] - weights[idx2arr[idx2now]];
-- goto free_and_return;
-- }
-+ size_t size_max = SIZE_MAX / (sizeof (int32_t) + 1);
-
-- /* Increment the offsets. */
-- ++idx1arr[idx1now];
-- ++idx2arr[idx2now];
-+ /* If the strings are long enough to cause overflow in the size request, then
-+ skip the allocation and proceed with the non-cached routines. */
-+ if (MIN (s1len, s2len) > size_max
-+ || MAX (s1len, s2len) > size_max - MIN (s1len, s2len))
-+ goto begin_collate;
-
-- --seq1len;
-- --seq2len;
-- }
-- while (seq1len > 0 && seq2len > 0);
-+ if (! __libc_use_alloca ((s1len + s2len) * (sizeof (int32_t) + 1)))
-+ {
-+ seq1.idxarr = (int32_t *) malloc ((s1len + s2len) * (sizeof (int32_t) + 1));
-
-- if (position && seq1len != seq2len)
-+ /* If we failed to allocate memory, we leave everything as NULL so that
-+ we use the nocache version of traversal and comparison functions. */
-+ if (seq1.idxarr != NULL)
- {
-- result = seq1len - seq2len;
-- goto free_and_return;
-+ seq2.idxarr = &seq1.idxarr[s1len];
-+ seq1.rulearr = (unsigned char *) &seq2.idxarr[s2len];
-+ seq2.rulearr = &seq1.rulearr[s1len];
-+ use_malloc = true;
- }
- }
-+ else
-+ {
-+ seq1.idxarr = (int32_t *) alloca (s1len * sizeof (int32_t));
-+ seq2.idxarr = (int32_t *) alloca (s2len * sizeof (int32_t));
-+ seq1.rulearr = (unsigned char *) alloca (s1len);
-+ seq2.rulearr = (unsigned char *) alloca (s2len);
-+ }
-
-- /* Now the remaining passes over the weights. We now use the
-- indeces we found before. */
-- for (pass = 1; pass < nrules; ++pass)
-+ int rule;
-+
-+ begin_collate:
-+ rule = 0;
-+ /* Cache values in the first pass and if needed, use them in subsequent
-+ passes. */
-+ for (int pass = 0; pass < nrules; ++pass)
- {
-+ seq1.idxcnt = 0;
-+ seq1.idx = 0;
-+ seq2.idx = 0;
-+ seq1.backw_stop = ~0ul;
-+ seq1.backw = ~0ul;
-+ seq2.idxcnt = 0;
-+ seq2.backw_stop = ~0ul;
-+ seq2.backw = ~0ul;
-+
-+ /* We need the elements of the strings as unsigned values since they
-+ are used as indices. */
-+ seq1.us = (const USTRING_TYPE *) s1;
-+ seq2.us = (const USTRING_TYPE *) s2;
-+
- /* We assume that if a rule has defined `position' in one section
- this is true for all of them. */
-- idx1cnt = 0;
-- idx2cnt = 0;
-- backw1_stop = ~0ul;
-- backw2_stop = ~0ul;
-- backw1 = ~0ul;
-- backw2 = ~0ul;
-- position = rulesets[rule1arr[0] * nrules + pass] & sort_position;
-+ int position = rulesets[rule * nrules + pass] & sort_position;
-
- while (1)
- {
-- val1 = 0;
-- val2 = 0;
--
-- /* Get the next non-IGNOREd element for string `s1'. */
-- if (seq1len == 0)
-- do
-- {
-- ++val1;
--
-- if (backw1_stop != ~0ul)
-- {
-- /* The is something pushed. */
-- if (backw1 == backw1_stop)
-- {
-- /* The last pushed character was handled. Continue
-- with forward characters. */
-- if (idx1cnt < idx1max)
-- {
-- idx1now = idx1cnt;
-- backw1_stop = ~0ul;
-- }
-- else
-- {
-- /* Nothing anymore. The backward sequence
-- ended with the last sequence in the string. */
-- idx1now = ~0ul;
-- break;
-- }
-- }
-- else
-- idx1now = --backw1;
-- }
-- else
-- {
-- backw1_stop = idx1cnt;
--
-- while (idx1cnt < idx1max)
-- {
-- if ((rulesets[rule1arr[idx1cnt] * nrules + pass]
-- & sort_backward) == 0)
-- /* No more backward characters to push. */
-- break;
-- ++idx1cnt;
-- }
--
-- if (backw1_stop == idx1cnt)
-- {
-- /* No sequence at all or just one. */
-- if (idx1cnt == idx1max)
-- /* Note that seq1len is still zero. */
-- break;
--
-- backw1_stop = ~0ul;
-- idx1now = idx1cnt++;
-- }
-- else
-- /* We pushed backward sequences. */
-- idx1now = backw1 = idx1cnt - 1;
-- }
-- }
-- while ((seq1len = weights[idx1arr[idx1now]++]) == 0);
--
-- /* And the same for string `s2'. */
-- if (seq2len == 0)
-- do
-- {
-- ++val2;
--
-- if (backw2_stop != ~0ul)
-- {
-- /* The is something pushed. */
-- if (backw2 == backw2_stop)
-- {
-- /* The last pushed character was handled. Continue
-- with forward characters. */
-- if (idx2cnt < idx2max)
-- {
-- idx2now = idx2cnt;
-- backw2_stop = ~0ul;
-- }
-- else
-- {
-- /* Nothing anymore. The backward sequence
-- ended with the last sequence in the string. */
-- idx2now = ~0ul;
-- break;
-- }
-- }
-- else
-- idx2now = --backw2;
-- }
-- else
-- {
-- backw2_stop = idx2cnt;
--
-- while (idx2cnt < idx2max)
-- {
-- if ((rulesets[rule2arr[idx2cnt] * nrules + pass]
-- & sort_backward) == 0)
-- /* No more backward characters to push. */
-- break;
-- ++idx2cnt;
-- }
--
-- if (backw2_stop == idx2cnt)
-- {
-- /* No sequence at all or just one. */
-- if (idx2cnt == idx2max)
-- /* Note that seq2len is still zero. */
-- break;
--
-- backw2_stop = ~0ul;
-- idx2now = idx2cnt++;
-- }
-- else
-- /* We pushed backward sequences. */
-- idx2now = backw2 = idx2cnt - 1;
-- }
-- }
-- while ((seq2len = weights[idx2arr[idx2now]++]) == 0);
-+ if (__glibc_unlikely (seq1.idxarr == NULL))
-+ {
-+ get_next_seq_nocache (&seq1, nrules, rulesets, weights, table,
-+ extra, indirect, pass);
-+ get_next_seq_nocache (&seq2, nrules, rulesets, weights, table,
-+ extra, indirect, pass);
-+ }
-+ else if (pass == 0)
-+ {
-+ get_next_seq (&seq1, nrules, rulesets, weights, table, extra,
-+ indirect);
-+ get_next_seq (&seq2, nrules, rulesets, weights, table, extra,
-+ indirect);
-+ }
-+ else
-+ {
-+ get_next_seq_cached (&seq1, nrules, pass, rulesets, weights);
-+ get_next_seq_cached (&seq2, nrules, pass, rulesets, weights);
-+ }
-
- /* See whether any or both strings are empty. */
-- if (seq1len == 0 || seq2len == 0)
-+ if (seq1.len == 0 || seq2.len == 0)
- {
-- if (seq1len == seq2len)
-+ if (seq1.len == seq2.len)
- /* Both ended. So far so good, both strings are equal
- at this level. */
- break;
-
- /* This means one string is shorter than the other. Find out
- which one and return an appropriate value. */
-- result = seq1len == 0 ? -1 : 1;
-+ result = seq1.len == 0 ? -1 : 1;
- goto free_and_return;
- }
-
-- /* Test for position if necessary. */
-- if (position && val1 != val2)
-- {
-- result = val1 - val2;
-- goto free_and_return;
-- }
--
-- /* Compare the two sequences. */
-- do
-- {
-- if (weights[idx1arr[idx1now]] != weights[idx2arr[idx2now]])
-- {
-- /* The sequences differ. */
-- result = (weights[idx1arr[idx1now]]
-- - weights[idx2arr[idx2now]]);
-- goto free_and_return;
-- }
--
-- /* Increment the offsets. */
-- ++idx1arr[idx1now];
-- ++idx2arr[idx2now];
--
-- --seq1len;
-- --seq2len;
-- }
-- while (seq1len > 0 && seq2len > 0);
--
-- if (position && seq1len != seq2len)
-- {
-- result = seq1len - seq2len;
-- goto free_and_return;
-- }
-+ if (__glibc_unlikely (seq1.idxarr == NULL))
-+ result = do_compare_nocache (&seq1, &seq2, position, weights);
-+ else
-+ result = do_compare (&seq1, &seq2, position, weights);
-+ if (result != 0)
-+ goto free_and_return;
- }
-+
-+ if (__glibc_likely (seq1.rulearr != NULL))
-+ rule = seq1.rulearr[0];
-+ else
-+ rule = seq1.rule;
- }
-
- /* Free the memory if needed. */
- free_and_return:
- if (use_malloc)
-- free (idx1arr);
-+ free (seq1.idxarr);
-
- return result;
- }
diff --git a/pkgs/development/libraries/glibc/2.18/cve-2013-4237.patch b/pkgs/development/libraries/glibc/2.18/cve-2013-4237.patch
deleted file mode 100644
index f745cb003aa..00000000000
--- a/pkgs/development/libraries/glibc/2.18/cve-2013-4237.patch
+++ /dev/null
@@ -1,302 +0,0 @@
-commit 91ce40854d0b7f865cf5024ef95a8026b76096f3
-Author: Florian Weimer
-Date: Fri Aug 16 09:38:52 2013 +0200
-
- CVE-2013-4237, BZ #14699: Buffer overflow in readdir_r
-
- * sysdeps/posix/dirstream.h (struct __dirstream): Add errcode
- member.
- * sysdeps/posix/opendir.c (__alloc_dir): Initialize errcode
- member.
- * sysdeps/posix/rewinddir.c (rewinddir): Reset errcode member.
- * sysdeps/posix/readdir_r.c (__READDIR_R): Enforce NAME_MAX limit.
- Return delayed error code. Remove GETDENTS_64BIT_ALIGNED
- conditional.
- * sysdeps/unix/sysv/linux/wordsize-64/readdir_r.c: Do not define
- GETDENTS_64BIT_ALIGNED.
- * sysdeps/unix/sysv/linux/i386/readdir64_r.c: Likewise.
- * manual/filesys.texi (Reading/Closing Directory): Document
- ENAMETOOLONG return value of readdir_r. Recommend readdir more
- strongly.
- * manual/conf.texi (Limits for Files): Add portability note to
- NAME_MAX, PATH_MAX.
- (Pathconf): Add portability note for _PC_NAME_MAX, _PC_PATH_MAX.
-
-diff --git a/manual/conf.texi b/manual/conf.texi
-index 7eb8b36..c720063 100644
---- a/manual/conf.texi
-+++ b/manual/conf.texi
-@@ -1149,6 +1149,9 @@ typed ahead as input. @xref{I/O Queues}.
- @deftypevr Macro int NAME_MAX
- The uniform system limit (if any) for the length of a file name component, not
- including the terminating null character.
-+
-+@strong{Portability Note:} On some systems, @theglibc{} defines
-+@code{NAME_MAX}, but does not actually enforce this limit.
- @end deftypevr
-
- @comment limits.h
-@@ -1157,6 +1160,9 @@ including the terminating null character.
- The uniform system limit (if any) for the length of an entire file name (that
- is, the argument given to system calls such as @code{open}), including the
- terminating null character.
-+
-+@strong{Portability Note:} @Theglibc{} does not enforce this limit
-+even if @code{PATH_MAX} is defined.
- @end deftypevr
-
- @cindex limits, pipe buffer size
-@@ -1476,6 +1482,9 @@ Inquire about the value of @code{POSIX_REC_MIN_XFER_SIZE}.
- Inquire about the value of @code{POSIX_REC_XFER_ALIGN}.
- @end table
-
-+@strong{Portability Note:} On some systems, @theglibc{} does not
-+enforce @code{_PC_NAME_MAX} or @code{_PC_PATH_MAX} limits.
-+
- @node Utility Limits
- @section Utility Program Capacity Limits
-
-diff --git a/manual/filesys.texi b/manual/filesys.texi
-index 1df9cf2..814c210 100644
---- a/manual/filesys.texi
-+++ b/manual/filesys.texi
-@@ -444,9 +444,9 @@ symbols are declared in the header file @file{dirent.h}.
- @comment POSIX.1
- @deftypefun {struct dirent *} readdir (DIR *@var{dirstream})
- This function reads the next entry from the directory. It normally
--returns a pointer to a structure containing information about the file.
--This structure is statically allocated and can be rewritten by a
--subsequent call.
-+returns a pointer to a structure containing information about the
-+file. This structure is associated with the @var{dirstream} handle
-+and can be rewritten by a subsequent call.
-
- @strong{Portability Note:} On some systems @code{readdir} may not
- return entries for @file{.} and @file{..}, even though these are always
-@@ -461,19 +461,61 @@ conditions are defined for this function:
- The @var{dirstream} argument is not valid.
- @end table
-
--@code{readdir} is not thread safe. Multiple threads using
--@code{readdir} on the same @var{dirstream} may overwrite the return
--value. Use @code{readdir_r} when this is critical.
-+To distinguish between an end-of-directory condition or an error, you
-+must set @code{errno} to zero before calling @code{readdir}. To avoid
-+entering an infinite loop, you should stop reading from the directory
-+after the first error.
-+
-+In POSIX.1-2008, @code{readdir} is not thread-safe. In @theglibc{}
-+implementation, it is safe to call @code{readdir} concurrently on
-+different @var{dirstream}s, but multiple threads accessing the same
-+@var{dirstream} result in undefined behavior. @code{readdir_r} is a
-+fully thread-safe alternative, but suffers from poor portability (see
-+below). It is recommended that you use @code{readdir}, with external
-+locking if multiple threads access the same @var{dirstream}.
- @end deftypefun
-
- @comment dirent.h
- @comment GNU
- @deftypefun int readdir_r (DIR *@var{dirstream}, struct dirent *@var{entry}, struct dirent **@var{result})
--This function is the reentrant version of @code{readdir}. Like
--@code{readdir} it returns the next entry from the directory. But to
--prevent conflicts between simultaneously running threads the result is
--not stored in statically allocated memory. Instead the argument
--@var{entry} points to a place to store the result.
-+This function is a version of @code{readdir} which performs internal
-+locking. Like @code{readdir} it returns the next entry from the
-+directory. To prevent conflicts between simultaneously running
-+threads the result is stored inside the @var{entry} object.
-+
-+@strong{Portability Note:} It is recommended to use @code{readdir}
-+instead of @code{readdir_r} for the following reasons:
-+
-+@itemize @bullet
-+@item
-+On systems which do not define @code{NAME_MAX}, it may not be possible
-+to use @code{readdir_r} safely because the caller does not specify the
-+length of the buffer for the directory entry.
-+
-+@item
-+On some systems, @code{readdir_r} cannot read directory entries with
-+very long names. If such a name is encountered, @theglibc{}
-+implementation of @code{readdir_r} returns with an error code of
-+@code{ENAMETOOLONG} after the final directory entry has been read. On
-+other systems, @code{readdir_r} may return successfully, but the
-+@code{d_name} member may not be NUL-terminated or may be truncated.
-+
-+@item
-+POSIX-1.2008 does not guarantee that @code{readdir} is thread-safe,
-+even when access to the same @var{dirstream} is serialized. But in
-+current implementations (including @theglibc{}), it is safe to call
-+@code{readdir} concurrently on different @var{dirstream}s, so there is
-+no need to use @code{readdir_r} in most multi-threaded programs. In
-+the rare case that multiple threads need to read from the same
-+@var{dirstream}, it is still better to use @code{readdir} and external
-+synchronization.
-+
-+@item
-+It is expected that future versions of POSIX will obsolete
-+@code{readdir_r} and mandate the level of thread safety for
-+@code{readdir} which is provided by @theglibc{} and other
-+implementations today.
-+@end itemize
-
- Normally @code{readdir_r} returns zero and sets @code{*@var{result}}
- to @var{entry}. If there are no more entries in the directory or an
-@@ -481,15 +523,6 @@ error is detected, @code{readdir_r} sets @code{*@var{result}} to a
- null pointer and returns a nonzero error code, also stored in
- @code{errno}, as described for @code{readdir}.
-
--@strong{Portability Note:} On some systems @code{readdir_r} may not
--return a NUL terminated string for the file name, even when there is no
--@code{d_reclen} field in @code{struct dirent} and the file
--name is the maximum allowed size. Modern systems all have the
--@code{d_reclen} field, and on old systems multi-threading is not
--critical. In any case there is no such problem with the @code{readdir}
--function, so that even on systems without the @code{d_reclen} member one
--could use multiple threads by using external locking.
--
- It is also important to look at the definition of the @code{struct
- dirent} type. Simply passing a pointer to an object of this type for
- the second parameter of @code{readdir_r} might not be enough. Some
-diff --git a/sysdeps/posix/dirstream.h b/sysdeps/posix/dirstream.h
-index a7a074d..8e8570d 100644
---- a/sysdeps/posix/dirstream.h
-+++ b/sysdeps/posix/dirstream.h
-@@ -39,6 +39,8 @@ struct __dirstream
-
- off_t filepos; /* Position of next entry to read. */
-
-+ int errcode; /* Delayed error code. */
-+
- /* Directory block. */
- char data[0] __attribute__ ((aligned (__alignof__ (void*))));
- };
-diff --git a/sysdeps/posix/opendir.c b/sysdeps/posix/opendir.c
-index ddfc3a7..fc05b0f 100644
---- a/sysdeps/posix/opendir.c
-+++ b/sysdeps/posix/opendir.c
-@@ -231,6 +231,7 @@ __alloc_dir (int fd, bool close_fd, int flags, const struct stat64 *statp)
- dirp->size = 0;
- dirp->offset = 0;
- dirp->filepos = 0;
-+ dirp->errcode = 0;
-
- return dirp;
- }
-diff --git a/sysdeps/posix/readdir_r.c b/sysdeps/posix/readdir_r.c
-index b5a8e2e..8ed5c3f 100644
---- a/sysdeps/posix/readdir_r.c
-+++ b/sysdeps/posix/readdir_r.c
-@@ -40,6 +40,7 @@ __READDIR_R (DIR *dirp, DIRENT_TYPE *entry, DIRENT_TYPE **result)
- DIRENT_TYPE *dp;
- size_t reclen;
- const int saved_errno = errno;
-+ int ret;
-
- __libc_lock_lock (dirp->lock);
-
-@@ -70,10 +71,10 @@ __READDIR_R (DIR *dirp, DIRENT_TYPE *entry, DIRENT_TYPE **result)
- bytes = 0;
- __set_errno (saved_errno);
- }
-+ if (bytes < 0)
-+ dirp->errcode = errno;
-
- dp = NULL;
-- /* Reclen != 0 signals that an error occurred. */
-- reclen = bytes != 0;
- break;
- }
- dirp->size = (size_t) bytes;
-@@ -106,29 +107,46 @@ __READDIR_R (DIR *dirp, DIRENT_TYPE *entry, DIRENT_TYPE **result)
- dirp->filepos += reclen;
- #endif
-
-- /* Skip deleted files. */
-+#ifdef NAME_MAX
-+ if (reclen > offsetof (DIRENT_TYPE, d_name) + NAME_MAX + 1)
-+ {
-+ /* The record is very long. It could still fit into the
-+ caller-supplied buffer if we can skip padding at the
-+ end. */
-+ size_t namelen = _D_EXACT_NAMLEN (dp);
-+ if (namelen <= NAME_MAX)
-+ reclen = offsetof (DIRENT_TYPE, d_name) + namelen + 1;
-+ else
-+ {
-+ /* The name is too long. Ignore this file. */
-+ dirp->errcode = ENAMETOOLONG;
-+ dp->d_ino = 0;
-+ continue;
-+ }
-+ }
-+#endif
-+
-+ /* Skip deleted and ignored files. */
- }
- while (dp->d_ino == 0);
-
- if (dp != NULL)
- {
--#ifdef GETDENTS_64BIT_ALIGNED
-- /* The d_reclen value might include padding which is not part of
-- the DIRENT_TYPE data structure. */
-- reclen = MIN (reclen,
-- offsetof (DIRENT_TYPE, d_name) + sizeof (dp->d_name));
--#endif
- *result = memcpy (entry, dp, reclen);
--#ifdef GETDENTS_64BIT_ALIGNED
-+#ifdef _DIRENT_HAVE_D_RECLEN
- entry->d_reclen = reclen;
- #endif
-+ ret = 0;
- }
- else
-- *result = NULL;
-+ {
-+ *result = NULL;
-+ ret = dirp->errcode;
-+ }
-
- __libc_lock_unlock (dirp->lock);
-
-- return dp != NULL ? 0 : reclen ? errno : 0;
-+ return ret;
- }
-
- #ifdef __READDIR_R_ALIAS
-diff --git a/sysdeps/posix/rewinddir.c b/sysdeps/posix/rewinddir.c
-index 2935a8e..d4991ad 100644
---- a/sysdeps/posix/rewinddir.c
-+++ b/sysdeps/posix/rewinddir.c
-@@ -33,6 +33,7 @@ rewinddir (dirp)
- dirp->filepos = 0;
- dirp->offset = 0;
- dirp->size = 0;
-+ dirp->errcode = 0;
- #ifndef NOT_IN_libc
- __libc_lock_unlock (dirp->lock);
- #endif
-diff --git a/sysdeps/unix/sysv/linux/i386/readdir64_r.c b/sysdeps/unix/sysv/linux/i386/readdir64_r.c
-index 8ebbcfd..a7d114e 100644
---- a/sysdeps/unix/sysv/linux/i386/readdir64_r.c
-+++ b/sysdeps/unix/sysv/linux/i386/readdir64_r.c
-@@ -18,7 +18,6 @@
- #define __READDIR_R __readdir64_r
- #define __GETDENTS __getdents64
- #define DIRENT_TYPE struct dirent64
--#define GETDENTS_64BIT_ALIGNED 1
-
- #include
-
-diff --git a/sysdeps/unix/sysv/linux/wordsize-64/readdir_r.c b/sysdeps/unix/sysv/linux/wordsize-64/readdir_r.c
-index 5ed8e95..290f2c8 100644
---- a/sysdeps/unix/sysv/linux/wordsize-64/readdir_r.c
-+++ b/sysdeps/unix/sysv/linux/wordsize-64/readdir_r.c
-@@ -1,5 +1,4 @@
- #define readdir64_r __no_readdir64_r_decl
--#define GETDENTS_64BIT_ALIGNED 1
- #include
- #undef readdir64_r
- weak_alias (__readdir_r, readdir64_r)
diff --git a/pkgs/development/libraries/glibc/2.18/cve-2013-4332.patch b/pkgs/development/libraries/glibc/2.18/cve-2013-4332.patch
deleted file mode 100644
index 94d25d7bbe1..00000000000
--- a/pkgs/development/libraries/glibc/2.18/cve-2013-4332.patch
+++ /dev/null
@@ -1,56 +0,0 @@
-https://projects.archlinux.org/svntogit/packages.git/tree/trunk/glibc-2.18-malloc-corrupt-CVE-2013-4332.patch?h=packages/glibc
-
-diff --git a/malloc/malloc.c b/malloc/malloc.c
-index dd295f5..7f43ba3 100644
---- a/malloc/malloc.c
-+++ b/malloc/malloc.c
-@@ -3082,6 +3082,13 @@ __libc_pvalloc(size_t bytes)
- size_t page_mask = GLRO(dl_pagesize) - 1;
- size_t rounded_bytes = (bytes + page_mask) & ~(page_mask);
-
-+ /* Check for overflow. */
-+ if (bytes > SIZE_MAX - 2*pagesz - MINSIZE)
-+ {
-+ __set_errno (ENOMEM);
-+ return 0;
-+ }
-+
- void *(*hook) (size_t, size_t, const void *) =
- force_reg (__memalign_hook);
- if (__builtin_expect (hook != NULL, 0))
-diff --git a/malloc/malloc.c b/malloc/malloc.c
-index 7f43ba3..3148c5f 100644
---- a/malloc/malloc.c
-+++ b/malloc/malloc.c
-@@ -3046,6 +3046,13 @@ __libc_valloc(size_t bytes)
-
- size_t pagesz = GLRO(dl_pagesize);
-
-+ /* Check for overflow. */
-+ if (bytes > SIZE_MAX - pagesz - MINSIZE)
-+ {
-+ __set_errno (ENOMEM);
-+ return 0;
-+ }
-+
- void *(*hook) (size_t, size_t, const void *) =
- force_reg (__memalign_hook);
- if (__builtin_expect (hook != NULL, 0))
-diff --git a/malloc/malloc.c b/malloc/malloc.c
-index 3148c5f..f7718a9 100644
---- a/malloc/malloc.c
-+++ b/malloc/malloc.c
-@@ -3015,6 +3015,13 @@ __libc_memalign(size_t alignment, size_t bytes)
- /* Otherwise, ensure that it is at least a minimum chunk size */
- if (alignment < MINSIZE) alignment = MINSIZE;
-
-+ /* Check for overflow. */
-+ if (bytes > SIZE_MAX - alignment - MINSIZE)
-+ {
-+ __set_errno (ENOMEM);
-+ return 0;
-+ }
-+
- arena_get(ar_ptr, bytes + alignment + MINSIZE);
- if(!ar_ptr)
- return 0;
diff --git a/pkgs/development/libraries/glibc/2.18/cve-2013-4458.patch b/pkgs/development/libraries/glibc/2.18/cve-2013-4458.patch
deleted file mode 100644
index bec4acde754..00000000000
--- a/pkgs/development/libraries/glibc/2.18/cve-2013-4458.patch
+++ /dev/null
@@ -1,50 +0,0 @@
-commit 7cbcdb3699584db8913ca90f705d6337633ee10f
-Author: Siddhesh Poyarekar
-Date: Fri Oct 25 10:22:12 2013 +0530
-
- Fix stack overflow due to large AF_INET6 requests
-
- Resolves #16072 (CVE-2013-4458).
-
- This patch fixes another stack overflow in getaddrinfo when it is
- called with AF_INET6. The AF_UNSPEC case was fixed as CVE-2013-1914,
- but the AF_INET6 case went undetected back then.
-
-diff --git a/sysdeps/posix/getaddrinfo.c b/sysdeps/posix/getaddrinfo.c
-index e6ce4cf..8ff74b4 100644
---- a/sysdeps/posix/getaddrinfo.c
-+++ b/sysdeps/posix/getaddrinfo.c
-@@ -197,7 +197,22 @@ gaih_inet_serv (const char *servicename, const struct gaih_typeproto *tp,
- &rc, &herrno, NULL, &localcanon)); \
- if (rc != ERANGE || herrno != NETDB_INTERNAL) \
- break; \
-- tmpbuf = extend_alloca (tmpbuf, tmpbuflen, 2 * tmpbuflen); \
-+ if (!malloc_tmpbuf && __libc_use_alloca (alloca_used + 2 * tmpbuflen)) \
-+ tmpbuf = extend_alloca_account (tmpbuf, tmpbuflen, 2 * tmpbuflen, \
-+ alloca_used); \
-+ else \
-+ { \
-+ char *newp = realloc (malloc_tmpbuf ? tmpbuf : NULL, \
-+ 2 * tmpbuflen); \
-+ if (newp == NULL) \
-+ { \
-+ result = -EAI_MEMORY; \
-+ goto free_and_return; \
-+ } \
-+ tmpbuf = newp; \
-+ malloc_tmpbuf = true; \
-+ tmpbuflen = 2 * tmpbuflen; \
-+ } \
- } \
- if (status == NSS_STATUS_SUCCESS && rc == 0) \
- h = &th; \
-@@ -209,7 +224,8 @@ gaih_inet_serv (const char *servicename, const struct gaih_typeproto *tp,
- { \
- __set_h_errno (herrno); \
- _res.options |= old_res_options & RES_USE_INET6; \
-- return -EAI_SYSTEM; \
-+ result = -EAI_SYSTEM; \
-+ goto free_and_return; \
- } \
- if (herrno == TRY_AGAIN) \
- no_data = EAI_AGAIN; \
diff --git a/pkgs/development/libraries/glibc/2.18/cve-2013-4788.patch b/pkgs/development/libraries/glibc/2.18/cve-2013-4788.patch
deleted file mode 100644
index cf8c7911f68..00000000000
--- a/pkgs/development/libraries/glibc/2.18/cve-2013-4788.patch
+++ /dev/null
@@ -1,222 +0,0 @@
-commit c61b4d41c9647a54a329aa021341c0eb032b793e
-Author: Carlos O'Donell
-Date: Mon Sep 23 00:52:09 2013 -0400
-
- BZ #15754: CVE-2013-4788
-
- The pointer guard used for pointer mangling was not initialized for
- static applications resulting in the security feature being disabled.
- The pointer guard is now correctly initialized to a random value for
- static applications. Existing static applications need to be
- recompiled to take advantage of the fix.
-
- The test tst-ptrguard1-static and tst-ptrguard1 add regression
- coverage to ensure the pointer guards are sufficiently random
- and initialized to a default value.
-
-diff --git a/csu/libc-start.c b/csu/libc-start.c
-index e5da3ef..c898d06 100644
---- a/csu/libc-start.c
-+++ b/csu/libc-start.c
-@@ -37,6 +37,12 @@ extern void __pthread_initialize_minimal (void);
- in thread local area. */
- uintptr_t __stack_chk_guard attribute_relro;
- # endif
-+# ifndef THREAD_SET_POINTER_GUARD
-+/* Only exported for architectures that don't store the pointer guard
-+ value in thread local area. */
-+uintptr_t __pointer_chk_guard_local
-+ attribute_relro attribute_hidden __attribute__ ((nocommon));
-+# endif
- #endif
-
- #ifdef HAVE_PTR_NTHREADS
-@@ -195,6 +201,16 @@ LIBC_START_MAIN (int (*main) (int, char **, char ** MAIN_AUXVEC_DECL),
- # else
- __stack_chk_guard = stack_chk_guard;
- # endif
-+
-+ /* Set up the pointer guard value. */
-+ uintptr_t pointer_chk_guard = _dl_setup_pointer_guard (_dl_random,
-+ stack_chk_guard);
-+# ifdef THREAD_SET_POINTER_GUARD
-+ THREAD_SET_POINTER_GUARD (pointer_chk_guard);
-+# else
-+ __pointer_chk_guard_local = pointer_chk_guard;
-+# endif
-+
- #endif
-
- /* Register the destructor of the dynamic linker if there is any. */
-diff --git a/ports/sysdeps/ia64/stackguard-macros.h b/ports/sysdeps/ia64/stackguard-macros.h
-index dc683c2..3907293 100644
---- a/ports/sysdeps/ia64/stackguard-macros.h
-+++ b/ports/sysdeps/ia64/stackguard-macros.h
-@@ -2,3 +2,6 @@
-
- #define STACK_CHK_GUARD \
- ({ uintptr_t x; asm ("adds %0 = -8, r13;; ld8 %0 = [%0]" : "=r" (x)); x; })
-+
-+#define POINTER_CHK_GUARD \
-+ ({ uintptr_t x; asm ("adds %0 = -16, r13;; ld8 %0 = [%0]" : "=r" (x)); x; })
-diff --git a/ports/sysdeps/tile/stackguard-macros.h b/ports/sysdeps/tile/stackguard-macros.h
-index 589ea2b..f2e041b 100644
---- a/ports/sysdeps/tile/stackguard-macros.h
-+++ b/ports/sysdeps/tile/stackguard-macros.h
-@@ -4,11 +4,17 @@
- # if __WORDSIZE == 64
- # define STACK_CHK_GUARD \
- ({ uintptr_t x; asm ("addi %0, tp, -16; ld %0, %0" : "=r" (x)); x; })
-+# define POINTER_CHK_GUARD \
-+ ({ uintptr_t x; asm ("addi %0, tp, -24; ld %0, %0" : "=r" (x)); x; })
- # else
- # define STACK_CHK_GUARD \
- ({ uintptr_t x; asm ("addi %0, tp, -8; ld4s %0, %0" : "=r" (x)); x; })
-+# define POINTER_CHK_GUARD \
-+ ({ uintptr_t x; asm ("addi %0, tp, -12; ld4s %0, %0" : "=r" (x)); x; })
- # endif
- #else
- # define STACK_CHK_GUARD \
- ({ uintptr_t x; asm ("addi %0, tp, -8; lw %0, %0" : "=r" (x)); x; })
-+# define POINTER_CHK_GUARD \
-+ ({ uintptr_t x; asm ("addi %0, tp, -12; lw %0, %0" : "=r" (x)); x; })
- #endif
-diff --git a/sysdeps/generic/stackguard-macros.h b/sysdeps/generic/stackguard-macros.h
-index ababf65..4fa3d96 100644
---- a/sysdeps/generic/stackguard-macros.h
-+++ b/sysdeps/generic/stackguard-macros.h
-@@ -2,3 +2,6 @@
-
- extern uintptr_t __stack_chk_guard;
- #define STACK_CHK_GUARD __stack_chk_guard
-+
-+extern uintptr_t __pointer_chk_guard_local;
-+#define POINTER_CHK_GUARD __pointer_chk_guard_local
-diff --git a/sysdeps/i386/stackguard-macros.h b/sysdeps/i386/stackguard-macros.h
-index 8c31e19..0397629 100644
---- a/sysdeps/i386/stackguard-macros.h
-+++ b/sysdeps/i386/stackguard-macros.h
-@@ -2,3 +2,11 @@
-
- #define STACK_CHK_GUARD \
- ({ uintptr_t x; asm ("movl %%gs:0x14, %0" : "=r" (x)); x; })
-+
-+#define POINTER_CHK_GUARD \
-+ ({ \
-+ uintptr_t x; \
-+ asm ("movl %%gs:%c1, %0" : "=r" (x) \
-+ : "i" (offsetof (tcbhead_t, pointer_guard))); \
-+ x; \
-+ })
-diff --git a/sysdeps/powerpc/powerpc32/stackguard-macros.h b/sysdeps/powerpc/powerpc32/stackguard-macros.h
-index 839f6a4..b3d0af8 100644
---- a/sysdeps/powerpc/powerpc32/stackguard-macros.h
-+++ b/sysdeps/powerpc/powerpc32/stackguard-macros.h
-@@ -2,3 +2,13 @@
-
- #define STACK_CHK_GUARD \
- ({ uintptr_t x; asm ("lwz %0,-28680(2)" : "=r" (x)); x; })
-+
-+#define POINTER_CHK_GUARD \
-+ ({ \
-+ uintptr_t x; \
-+ asm ("lwz %0,%1(2)" \
-+ : "=r" (x) \
-+ : "i" (offsetof (tcbhead_t, pointer_guard) - TLS_TCB_OFFSET - sizeof (tcbhead_t)) \
-+ ); \
-+ x; \
-+ })
-diff --git a/sysdeps/powerpc/powerpc64/stackguard-macros.h b/sysdeps/powerpc/powerpc64/stackguard-macros.h
-index 9da879c..4620f96 100644
---- a/sysdeps/powerpc/powerpc64/stackguard-macros.h
-+++ b/sysdeps/powerpc/powerpc64/stackguard-macros.h
-@@ -2,3 +2,13 @@
-
- #define STACK_CHK_GUARD \
- ({ uintptr_t x; asm ("ld %0,-28688(13)" : "=r" (x)); x; })
-+
-+#define POINTER_CHK_GUARD \
-+ ({ \
-+ uintptr_t x; \
-+ asm ("ld %0,%1(2)" \
-+ : "=r" (x) \
-+ : "i" (offsetof (tcbhead_t, pointer_guard) - TLS_TCB_OFFSET - sizeof (tcbhead_t)) \
-+ ); \
-+ x; \
-+ })
-diff --git a/sysdeps/s390/s390-32/stackguard-macros.h b/sysdeps/s390/s390-32/stackguard-macros.h
-index b74c579..449e8d4 100644
---- a/sysdeps/s390/s390-32/stackguard-macros.h
-+++ b/sysdeps/s390/s390-32/stackguard-macros.h
-@@ -2,3 +2,14 @@
-
- #define STACK_CHK_GUARD \
- ({ uintptr_t x; asm ("ear %0,%%a0; l %0,0x14(%0)" : "=a" (x)); x; })
-+
-+/* On s390/s390x there is no unique pointer guard, instead we use the
-+ same value as the stack guard. */
-+#define POINTER_CHK_GUARD \
-+ ({ \
-+ uintptr_t x; \
-+ asm ("ear %0,%%a0; l %0,%1(%0)" \
-+ : "=a" (x) \
-+ : "i" (offsetof (tcbhead_t, stack_guard))); \
-+ x; \
-+ })
-diff --git a/sysdeps/s390/s390-64/stackguard-macros.h b/sysdeps/s390/s390-64/stackguard-macros.h
-index 0cebb5f..c8270fb 100644
---- a/sysdeps/s390/s390-64/stackguard-macros.h
-+++ b/sysdeps/s390/s390-64/stackguard-macros.h
-@@ -2,3 +2,17 @@
-
- #define STACK_CHK_GUARD \
- ({ uintptr_t x; asm ("ear %0,%%a0; sllg %0,%0,32; ear %0,%%a1; lg %0,0x28(%0)" : "=a" (x)); x; })
-+
-+/* On s390/s390x there is no unique pointer guard, instead we use the
-+ same value as the stack guard. */
-+#define POINTER_CHK_GUARD \
-+ ({ \
-+ uintptr_t x; \
-+ asm ("ear %0,%%a0;" \
-+ "sllg %0,%0,32;" \
-+ "ear %0,%%a1;" \
-+ "lg %0,%1(%0)" \
-+ : "=a" (x) \
-+ : "i" (offsetof (tcbhead_t, stack_guard))); \
-+ x; \
-+ })
-diff --git a/sysdeps/sparc/sparc32/stackguard-macros.h b/sysdeps/sparc/sparc32/stackguard-macros.h
-index c0b02b0..1eef0f1 100644
---- a/sysdeps/sparc/sparc32/stackguard-macros.h
-+++ b/sysdeps/sparc/sparc32/stackguard-macros.h
-@@ -2,3 +2,6 @@
-
- #define STACK_CHK_GUARD \
- ({ uintptr_t x; asm ("ld [%%g7+0x14], %0" : "=r" (x)); x; })
-+
-+#define POINTER_CHK_GUARD \
-+ ({ uintptr_t x; asm ("ld [%%g7+0x18], %0" : "=r" (x)); x; })
-diff --git a/sysdeps/sparc/sparc64/stackguard-macros.h b/sysdeps/sparc/sparc64/stackguard-macros.h
-index 80f0635..cc0c12c 100644
---- a/sysdeps/sparc/sparc64/stackguard-macros.h
-+++ b/sysdeps/sparc/sparc64/stackguard-macros.h
-@@ -2,3 +2,6 @@
-
- #define STACK_CHK_GUARD \
- ({ uintptr_t x; asm ("ldx [%%g7+0x28], %0" : "=r" (x)); x; })
-+
-+#define POINTER_CHK_GUARD \
-+ ({ uintptr_t x; asm ("ldx [%%g7+0x30], %0" : "=r" (x)); x; })
-diff --git a/sysdeps/x86_64/stackguard-macros.h b/sysdeps/x86_64/stackguard-macros.h
-index d7fedb3..1948800 100644
---- a/sysdeps/x86_64/stackguard-macros.h
-+++ b/sysdeps/x86_64/stackguard-macros.h
-@@ -4,3 +4,8 @@
- ({ uintptr_t x; \
- asm ("mov %%fs:%c1, %0" : "=r" (x) \
- : "i" (offsetof (tcbhead_t, stack_guard))); x; })
-+
-+#define POINTER_CHK_GUARD \
-+ ({ uintptr_t x; \
-+ asm ("mov %%fs:%c1, %0" : "=r" (x) \
-+ : "i" (offsetof (tcbhead_t, pointer_guard))); x; })
diff --git a/pkgs/development/libraries/glibc/2.18/glibc-rh739743.patch b/pkgs/development/libraries/glibc/2.18/glibc-rh739743.patch
deleted file mode 100644
index c390b772b16..00000000000
--- a/pkgs/development/libraries/glibc/2.18/glibc-rh739743.patch
+++ /dev/null
@@ -1,55 +0,0 @@
-2009-04-26 Aurelien Jarno
-
- * sysdeps/posix/getaddrinfo.c (rfc3484_sort): don't assign native
- result if the result has no associated interface.
-
----
- sysdeps/posix/getaddrinfo.c | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
---- a/sysdeps/posix/getaddrinfo.c
-+++ b/sysdeps/posix/getaddrinfo.c
-@@ -1456,13 +1456,13 @@
-
- /* Fill in the results in all the records. */
- for (int i = 0; i < src->nresults; ++i)
-- if (src->results[i].index == a1_index)
-+ if (a1_index != -1 && src->results[i].index == a1_index)
- {
- assert (src->results[i].native == -1
- || src->results[i].native == a1_native);
- src->results[i].native = a1_native;
- }
-- else if (src->results[i].index == a2_index)
-+ else if (a2_index != -1 && src->results[i].index == a2_index)
- {
- assert (src->results[i].native == -1
- || src->results[i].native == a2_native);
-
-2009-03-15 Aurelien Jarno
-
- * sysdeps/posix/getaddrinfo.c (getaddrinfo): correctly detect
- interface for all 127.X.Y.Z addresses.
-
----
- sysdeps/posix/getaddrinfo.c | 9 ++++++++-
- 1 file changed, 8 insertions(+), 1 deletion(-)
-
---- a/sysdeps/posix/getaddrinfo.c
-+++ b/sysdeps/posix/getaddrinfo.c
-@@ -2265,7 +2265,14 @@
- tmp.addr[0] = 0;
- tmp.addr[1] = 0;
- tmp.addr[2] = htonl (0xffff);
-- tmp.addr[3] = sinp->sin_addr.s_addr;
-+ /* Special case for lo interface, the source address
-+ being possibly different than the interface
-+ address. */
-+ if ((ntohl(sinp->sin_addr.s_addr) & 0xff000000)
-+ == 0x7f000000)
-+ tmp.addr[3] = htonl(0x7f000001);
-+ else
-+ tmp.addr[3] = sinp->sin_addr.s_addr;
- }
- else
- {
diff --git a/pkgs/development/libraries/glibc/2.18/scanf.patch b/pkgs/development/libraries/glibc/2.18/scanf.patch
deleted file mode 100644
index 4eed86ca110..00000000000
--- a/pkgs/development/libraries/glibc/2.18/scanf.patch
+++ /dev/null
@@ -1,21 +0,0 @@
-https://sourceware.org/bugzilla/show_bug.cgi?id=15917
-
-commit a4966c6104918ac884ee1131a4ed23c5ad6b4c5a
-Author: Andreas Schwab
-Date: Thu Oct 31 12:51:03 2013 +0100
-
- Fix parsing of 0e+0 as float
-
-diff --git a/stdio-common/vfscanf.c b/stdio-common/vfscanf.c
-index 78dc2fc..e6fa8f3 100644
---- a/stdio-common/vfscanf.c
-+++ b/stdio-common/vfscanf.c
-@@ -1966,6 +1966,8 @@ _IO_vfscanf_internal (_IO_FILE *s, const char *format, _IO_va_list argptr,
- if (width > 0)
- --width;
- }
-+ else
-+ got_digit = 1;
- }
-
- while (1)
diff --git a/pkgs/development/libraries/glibc/2.18/strstr-sse42-hack.patch b/pkgs/development/libraries/glibc/2.18/strstr-sse42-hack.patch
deleted file mode 100644
index cdf4c025316..00000000000
--- a/pkgs/development/libraries/glibc/2.18/strstr-sse42-hack.patch
+++ /dev/null
@@ -1,14 +0,0 @@
-https://bugs.archlinux.org/task/36556
-diff --git a/sysdeps/x86_64/multiarch/strstr.c b/sysdeps/x86_64/multiarch/strstr.c
-index cd63b68..03d8b9a 100644
---- a/sysdeps/x86_64/multiarch/strstr.c
-+++ b/sysdeps/x86_64/multiarch/strstr.c
-@@ -86,7 +86,7 @@
- /* Simple replacement of movdqu to address 4KB boundary cross issue.
- If EOS occurs within less than 16B before 4KB boundary, we don't
- cross to next page. */
--static __m128i
-+static inline __m128i
- __m128i_strloadu (const unsigned char * p, __m128i zero)
- {
- if (__builtin_expect ((int) ((size_t) p & 0xfff) > 0xff0, 0))
diff --git a/pkgs/development/libraries/glibc/2.18/builder.sh b/pkgs/development/libraries/glibc/2.19/builder.sh
similarity index 100%
rename from pkgs/development/libraries/glibc/2.18/builder.sh
rename to pkgs/development/libraries/glibc/2.19/builder.sh
diff --git a/pkgs/development/libraries/glibc/2.18/common.nix b/pkgs/development/libraries/glibc/2.19/common.nix
similarity index 92%
rename from pkgs/development/libraries/glibc/2.18/common.nix
rename to pkgs/development/libraries/glibc/2.19/common.nix
index 518615b1739..b153d91934b 100644
--- a/pkgs/development/libraries/glibc/2.18/common.nix
+++ b/pkgs/development/libraries/glibc/2.19/common.nix
@@ -13,7 +13,7 @@ cross:
let
- version = "2.18";
+ version = "2.19";
in
@@ -44,31 +44,20 @@ stdenv.mkDerivation ({
/* Don't use /etc/ld.so.cache, for non-NixOS systems. */
./dont-use-system-ld-so-cache.patch
+ /* Don't use /etc/ld.so.preload, but /etc/ld-nix.so.preload. */
+ ./dont-use-system-ld-so-preload.patch
+
/* Add blowfish password hashing support. This is needed for
compatibility with old NixOS installations (since NixOS used
to default to blowfish). */
./glibc-crypt-blowfish.patch
- /* Fix for random "./sysdeps/posix/getaddrinfo.c:1467:
- rfc3484_sort: Assertion `src->results[i].native == -1 ||
- src->results[i].native == a2_native' failed." crashes. */
- ./glibc-rh739743.patch
-
- ./scanf.patch
-
/* The command "getconf CS_PATH" returns the default search path
"/bin:/usr/bin", which is inappropriate on NixOS machines. This
patch extends the search path by "/run/current-system/sw/bin". */
./fix_path_attribute_in_getconf.patch
-
- ./cve-2012-4412+4424.patch
- ./cve-2013-4237.patch
- ./cve-2013-4332.patch
- ./cve-2013-4458.patch
- ./cve-2013-4788.patch
-
- ./strstr-sse42-hack.patch
+ ./fix-math.patch
];
postPatch = ''
@@ -152,7 +141,7 @@ stdenv.mkDerivation ({
}
else fetchurl {
url = "mirror://gnu/glibc/glibc-${version}.tar.gz";
- sha256 = "0d3pnh6kg5r48ga5rg4lhwlc1062brr6fiqs4j23327gzssjgry8";
+ sha256 = "15n7x9mmzhd7w6s5hd9srx0h23b32gwb306x98k9ss940yvnvb8q";
};
# Remove absolute paths from `configure' & co.; build out-of-tree.
diff --git a/pkgs/development/libraries/glibc/2.18/default.nix b/pkgs/development/libraries/glibc/2.19/default.nix
similarity index 100%
rename from pkgs/development/libraries/glibc/2.18/default.nix
rename to pkgs/development/libraries/glibc/2.19/default.nix
diff --git a/pkgs/development/libraries/glibc/2.18/dont-use-system-ld-so-cache.patch b/pkgs/development/libraries/glibc/2.19/dont-use-system-ld-so-cache.patch
similarity index 100%
rename from pkgs/development/libraries/glibc/2.18/dont-use-system-ld-so-cache.patch
rename to pkgs/development/libraries/glibc/2.19/dont-use-system-ld-so-cache.patch
diff --git a/pkgs/development/libraries/glibc/2.19/dont-use-system-ld-so-preload.patch b/pkgs/development/libraries/glibc/2.19/dont-use-system-ld-so-preload.patch
new file mode 100644
index 00000000000..fabb6c3ec5e
--- /dev/null
+++ b/pkgs/development/libraries/glibc/2.19/dont-use-system-ld-so-preload.patch
@@ -0,0 +1,12 @@
+diff -rupN a/elf/rtld.c b/elf/rtld.c
+--- a/elf/rtld.c 2013-08-11 00:52:55.000000001 +0200
++++ b/elf/rtld.c 2014-02-18 13:56:19.000000001 +0100
+@@ -1639,7 +1639,7 @@ ERROR: ld.so: object '%s' cannot be load
+ open(). So we do this first. If it succeeds we do almost twice
+ the work but this does not matter, since it is not for production
+ use. */
+- static const char preload_file[] = "/etc/ld.so.preload";
++ static const char preload_file[] = "/etc/ld-nix.so.preload";
+ if (__builtin_expect (__access (preload_file, R_OK) == 0, 0))
+ {
+ /* Read the contents of the file. */
diff --git a/pkgs/development/libraries/glibc/2.19/fix-math.patch b/pkgs/development/libraries/glibc/2.19/fix-math.patch
new file mode 100644
index 00000000000..516f53954dd
--- /dev/null
+++ b/pkgs/development/libraries/glibc/2.19/fix-math.patch
@@ -0,0 +1,336 @@
+From: Siddhesh Poyarekar
+Date: Thu, 27 Feb 2014 15:42:09 +0000 (+0530)
+Subject: Fix sign of input to bsloww1 (BZ #16623)
+X-Git-Url: http://repo.or.cz/w/glibc.git/commitdiff_plain/1cadc85813d736f7682fa2eeadae639ab6b66c65
+
+Fix sign of input to bsloww1 (BZ #16623)
+
+In 84ba214c, I removed some redundant sign computations and in the
+process, I incorrectly got rid of a temporary variable, thus passing
+the absolute value of the input to bsloww1. This caused #16623.
+
+This fix undoes the incorrect change.
+
+[nix]: drop docs update (wouldn't apply)
+---
+
+diff --git a/math/auto-libm-test-in b/math/auto-libm-test-in
+index ac5348f..fafe96f 100644
+--- a/math/auto-libm-test-in
++++ b/math/auto-libm-test-in
+@@ -594,6 +594,7 @@ cos 0x1.0000010b239a9p0
+ cos 0x1.00000162a932bp0
+ cos 0x1.000002d452a10p0
+ cos 0x1.000005bc7d86dp0
++cos 0x1.200145a975ce6p32
+ cos 1
+ cos 2
+ cos 3
+@@ -1748,6 +1749,7 @@ sin 7
+ sin 8
+ sin 9
+ sin 10
++sin 0x1.2001469775ce6p32
+
+ sincos 0
+ sincos -0
+diff --git a/math/auto-libm-test-out b/math/auto-libm-test-out
+index 8f79359..59c08a7 100644
+--- a/math/auto-libm-test-out
++++ b/math/auto-libm-test-out
+@@ -74446,6 +74446,75 @@ cos 0x1.000005bc7d86dp0
+ = cos tonearest ldbl-128ibm 0x1.000005bc7d86dp+0L : 0x8.a513ba9f703d3ffffffcb92354p-4L : inexact-ok
+ = cos towardzero ldbl-128ibm 0x1.000005bc7d86dp+0L : 0x8.a513ba9f703d3ffffffcb92354p-4L : inexact-ok
+ = cos upward ldbl-128ibm 0x1.000005bc7d86dp+0L : 0x8.a513ba9f703d3ffffffcb92358p-4L : inexact-ok
++cos 0x1.200145a975ce6p32
++= cos downward flt-32 0x1.200146p+32f : -0xf.74fbep-4f : inexact-ok
++= cos tonearest flt-32 0x1.200146p+32f : -0xf.74fbdp-4f : inexact-ok
++= cos towardzero flt-32 0x1.200146p+32f : -0xf.74fbdp-4f : inexact-ok
++= cos upward flt-32 0x1.200146p+32f : -0xf.74fbdp-4f : inexact-ok
++= cos downward dbl-64 0x1.200146p+32 : -0xf.74fbd5498fe5p-4 : inexact-ok
++= cos tonearest dbl-64 0x1.200146p+32 : -0xf.74fbd5498fe5p-4 : inexact-ok
++= cos towardzero dbl-64 0x1.200146p+32 : -0xf.74fbd5498fe48p-4 : inexact-ok
++= cos upward dbl-64 0x1.200146p+32 : -0xf.74fbd5498fe48p-4 : inexact-ok
++= cos downward ldbl-96-intel 0x1.200146p+32L : -0xf.74fbd5498fe4c0dp-4L : inexact-ok
++= cos tonearest ldbl-96-intel 0x1.200146p+32L : -0xf.74fbd5498fe4c0cp-4L : inexact-ok
++= cos towardzero ldbl-96-intel 0x1.200146p+32L : -0xf.74fbd5498fe4c0cp-4L : inexact-ok
++= cos upward ldbl-96-intel 0x1.200146p+32L : -0xf.74fbd5498fe4c0cp-4L : inexact-ok
++= cos downward ldbl-96-m68k 0x1.200146p+32L : -0xf.74fbd5498fe4c0dp-4L : inexact-ok
++= cos tonearest ldbl-96-m68k 0x1.200146p+32L : -0xf.74fbd5498fe4c0cp-4L : inexact-ok
++= cos towardzero ldbl-96-m68k 0x1.200146p+32L : -0xf.74fbd5498fe4c0cp-4L : inexact-ok
++= cos upward ldbl-96-m68k 0x1.200146p+32L : -0xf.74fbd5498fe4c0cp-4L : inexact-ok
++= cos downward ldbl-128 0x1.200146p+32L : -0xf.74fbd5498fe4c0c71bd9e4ef59e8p-4L : inexact-ok
++= cos tonearest ldbl-128 0x1.200146p+32L : -0xf.74fbd5498fe4c0c71bd9e4ef59e8p-4L : inexact-ok
++= cos towardzero ldbl-128 0x1.200146p+32L : -0xf.74fbd5498fe4c0c71bd9e4ef59ep-4L : inexact-ok
++= cos upward ldbl-128 0x1.200146p+32L : -0xf.74fbd5498fe4c0c71bd9e4ef59ep-4L : inexact-ok
++= cos downward ldbl-128ibm 0x1.200146p+32L : -0xf.74fbd5498fe4c0c71bd9e4ef5cp-4L : inexact-ok
++= cos tonearest ldbl-128ibm 0x1.200146p+32L : -0xf.74fbd5498fe4c0c71bd9e4ef58p-4L : inexact-ok
++= cos towardzero ldbl-128ibm 0x1.200146p+32L : -0xf.74fbd5498fe4c0c71bd9e4ef58p-4L : inexact-ok
++= cos upward ldbl-128ibm 0x1.200146p+32L : -0xf.74fbd5498fe4c0c71bd9e4ef58p-4L : inexact-ok
++= cos downward flt-32 0x1.200144p+32f : 0xf.bc96cp-4f : inexact-ok
++= cos tonearest flt-32 0x1.200144p+32f : 0xf.bc96dp-4f : inexact-ok
++= cos towardzero flt-32 0x1.200144p+32f : 0xf.bc96cp-4f : inexact-ok
++= cos upward flt-32 0x1.200144p+32f : 0xf.bc96dp-4f : inexact-ok
++= cos downward dbl-64 0x1.200144p+32 : 0xf.bc96ca2c658a8p-4 : inexact-ok
++= cos tonearest dbl-64 0x1.200144p+32 : 0xf.bc96ca2c658a8p-4 : inexact-ok
++= cos towardzero dbl-64 0x1.200144p+32 : 0xf.bc96ca2c658a8p-4 : inexact-ok
++= cos upward dbl-64 0x1.200144p+32 : 0xf.bc96ca2c658bp-4 : inexact-ok
++= cos downward ldbl-96-intel 0x1.200144p+32L : 0xf.bc96ca2c658abf5p-4L : inexact-ok
++= cos tonearest ldbl-96-intel 0x1.200144p+32L : 0xf.bc96ca2c658abf6p-4L : inexact-ok
++= cos towardzero ldbl-96-intel 0x1.200144p+32L : 0xf.bc96ca2c658abf5p-4L : inexact-ok
++= cos upward ldbl-96-intel 0x1.200144p+32L : 0xf.bc96ca2c658abf6p-4L : inexact-ok
++= cos downward ldbl-96-m68k 0x1.200144p+32L : 0xf.bc96ca2c658abf5p-4L : inexact-ok
++= cos tonearest ldbl-96-m68k 0x1.200144p+32L : 0xf.bc96ca2c658abf6p-4L : inexact-ok
++= cos towardzero ldbl-96-m68k 0x1.200144p+32L : 0xf.bc96ca2c658abf5p-4L : inexact-ok
++= cos upward ldbl-96-m68k 0x1.200144p+32L : 0xf.bc96ca2c658abf6p-4L : inexact-ok
++= cos downward ldbl-128 0x1.200144p+32L : 0xf.bc96ca2c658abf5ace7b886a8fbp-4L : inexact-ok
++= cos tonearest ldbl-128 0x1.200144p+32L : 0xf.bc96ca2c658abf5ace7b886a8fbp-4L : inexact-ok
++= cos towardzero ldbl-128 0x1.200144p+32L : 0xf.bc96ca2c658abf5ace7b886a8fbp-4L : inexact-ok
++= cos upward ldbl-128 0x1.200144p+32L : 0xf.bc96ca2c658abf5ace7b886a8fb8p-4L : inexact-ok
++= cos downward ldbl-128ibm 0x1.200144p+32L : 0xf.bc96ca2c658abf5ace7b886a8cp-4L : inexact-ok
++= cos tonearest ldbl-128ibm 0x1.200144p+32L : 0xf.bc96ca2c658abf5ace7b886a9p-4L : inexact-ok
++= cos towardzero ldbl-128ibm 0x1.200144p+32L : 0xf.bc96ca2c658abf5ace7b886a8cp-4L : inexact-ok
++= cos upward ldbl-128ibm 0x1.200144p+32L : 0xf.bc96ca2c658abf5ace7b886a9p-4L : inexact-ok
++= cos downward dbl-64 0x1.200145a975ce6p+32 : -0x6.568e7ed3dffdp-4 : inexact-ok
++= cos tonearest dbl-64 0x1.200145a975ce6p+32 : -0x6.568e7ed3dffccp-4 : inexact-ok
++= cos towardzero dbl-64 0x1.200145a975ce6p+32 : -0x6.568e7ed3dffccp-4 : inexact-ok
++= cos upward dbl-64 0x1.200145a975ce6p+32 : -0x6.568e7ed3dffccp-4 : inexact-ok
++= cos downward ldbl-96-intel 0x1.200145a975ce6p+32L : -0x6.568e7ed3dffcdfe8p-4L : inexact-ok
++= cos tonearest ldbl-96-intel 0x1.200145a975ce6p+32L : -0x6.568e7ed3dffcdfep-4L : inexact-ok
++= cos towardzero ldbl-96-intel 0x1.200145a975ce6p+32L : -0x6.568e7ed3dffcdfep-4L : inexact-ok
++= cos upward ldbl-96-intel 0x1.200145a975ce6p+32L : -0x6.568e7ed3dffcdfep-4L : inexact-ok
++= cos downward ldbl-96-m68k 0x1.200145a975ce6p+32L : -0x6.568e7ed3dffcdfe8p-4L : inexact-ok
++= cos tonearest ldbl-96-m68k 0x1.200145a975ce6p+32L : -0x6.568e7ed3dffcdfep-4L : inexact-ok
++= cos towardzero ldbl-96-m68k 0x1.200145a975ce6p+32L : -0x6.568e7ed3dffcdfep-4L : inexact-ok
++= cos upward ldbl-96-m68k 0x1.200145a975ce6p+32L : -0x6.568e7ed3dffcdfep-4L : inexact-ok
++= cos downward ldbl-128 0x1.200145a975ce6p+32L : -0x6.568e7ed3dffcdfe227fd726840e8p-4L : inexact-ok
++= cos tonearest ldbl-128 0x1.200145a975ce6p+32L : -0x6.568e7ed3dffcdfe227fd726840e4p-4L : inexact-ok
++= cos towardzero ldbl-128 0x1.200145a975ce6p+32L : -0x6.568e7ed3dffcdfe227fd726840e4p-4L : inexact-ok
++= cos upward ldbl-128 0x1.200145a975ce6p+32L : -0x6.568e7ed3dffcdfe227fd726840e4p-4L : inexact-ok
++= cos downward ldbl-128ibm 0x1.200145a975ce6p+32L : -0x6.568e7ed3dffcdfe227fd726842p-4L : inexact-ok
++= cos tonearest ldbl-128ibm 0x1.200145a975ce6p+32L : -0x6.568e7ed3dffcdfe227fd72684p-4L : inexact-ok
++= cos towardzero ldbl-128ibm 0x1.200145a975ce6p+32L : -0x6.568e7ed3dffcdfe227fd72684p-4L : inexact-ok
++= cos upward ldbl-128ibm 0x1.200145a975ce6p+32L : -0x6.568e7ed3dffcdfe227fd72684p-4L : inexact-ok
+ cos 1
+ = cos downward flt-32 0x1p+0f : 0x8.a514p-4f : inexact-ok
+ = cos tonearest flt-32 0x1p+0f : 0x8.a514p-4f : inexact-ok
+@@ -157744,6 +157813,75 @@ sin 10
+ = sin tonearest ldbl-128ibm 0xap+0L : -0x8.b44f7af9a7a92ce7fb22be025p-4L : inexact-ok
+ = sin towardzero ldbl-128ibm 0xap+0L : -0x8.b44f7af9a7a92ce7fb22be024cp-4L : inexact-ok
+ = sin upward ldbl-128ibm 0xap+0L : -0x8.b44f7af9a7a92ce7fb22be024cp-4L : inexact-ok
++sin 0x1.2001469775ce6p32
++= sin downward flt-32 0x1.200148p+32f : -0x5.595d8p-4f : inexact-ok
++= sin tonearest flt-32 0x1.200148p+32f : -0x5.595d8p-4f : inexact-ok
++= sin towardzero flt-32 0x1.200148p+32f : -0x5.595d78p-4f : inexact-ok
++= sin upward flt-32 0x1.200148p+32f : -0x5.595d78p-4f : inexact-ok
++= sin downward dbl-64 0x1.200148p+32 : -0x5.595d7e536fe38p-4 : inexact-ok
++= sin tonearest dbl-64 0x1.200148p+32 : -0x5.595d7e536fe34p-4 : inexact-ok
++= sin towardzero dbl-64 0x1.200148p+32 : -0x5.595d7e536fe34p-4 : inexact-ok
++= sin upward dbl-64 0x1.200148p+32 : -0x5.595d7e536fe34p-4 : inexact-ok
++= sin downward ldbl-96-intel 0x1.200148p+32L : -0x5.595d7e536fe35eep-4L : inexact-ok
++= sin tonearest ldbl-96-intel 0x1.200148p+32L : -0x5.595d7e536fe35ed8p-4L : inexact-ok
++= sin towardzero ldbl-96-intel 0x1.200148p+32L : -0x5.595d7e536fe35ed8p-4L : inexact-ok
++= sin upward ldbl-96-intel 0x1.200148p+32L : -0x5.595d7e536fe35ed8p-4L : inexact-ok
++= sin downward ldbl-96-m68k 0x1.200148p+32L : -0x5.595d7e536fe35eep-4L : inexact-ok
++= sin tonearest ldbl-96-m68k 0x1.200148p+32L : -0x5.595d7e536fe35ed8p-4L : inexact-ok
++= sin towardzero ldbl-96-m68k 0x1.200148p+32L : -0x5.595d7e536fe35ed8p-4L : inexact-ok
++= sin upward ldbl-96-m68k 0x1.200148p+32L : -0x5.595d7e536fe35ed8p-4L : inexact-ok
++= sin downward ldbl-128 0x1.200148p+32L : -0x5.595d7e536fe35edbe2ad0df9d944p-4L : inexact-ok
++= sin tonearest ldbl-128 0x1.200148p+32L : -0x5.595d7e536fe35edbe2ad0df9d94p-4L : inexact-ok
++= sin towardzero ldbl-128 0x1.200148p+32L : -0x5.595d7e536fe35edbe2ad0df9d94p-4L : inexact-ok
++= sin upward ldbl-128 0x1.200148p+32L : -0x5.595d7e536fe35edbe2ad0df9d94p-4L : inexact-ok
++= sin downward ldbl-128ibm 0x1.200148p+32L : -0x5.595d7e536fe35edbe2ad0df9dap-4L : inexact-ok
++= sin tonearest ldbl-128ibm 0x1.200148p+32L : -0x5.595d7e536fe35edbe2ad0df9dap-4L : inexact-ok
++= sin towardzero ldbl-128ibm 0x1.200148p+32L : -0x5.595d7e536fe35edbe2ad0df9d8p-4L : inexact-ok
++= sin upward ldbl-128ibm 0x1.200148p+32L : -0x5.595d7e536fe35edbe2ad0df9d8p-4L : inexact-ok
++= sin downward flt-32 0x1.200146p+32f : 0x4.220ffp-4f : inexact-ok
++= sin tonearest flt-32 0x1.200146p+32f : 0x4.220ffp-4f : inexact-ok
++= sin towardzero flt-32 0x1.200146p+32f : 0x4.220ffp-4f : inexact-ok
++= sin upward flt-32 0x1.200146p+32f : 0x4.220ff8p-4f : inexact-ok
++= sin downward dbl-64 0x1.200146p+32 : 0x4.220ff25f5cfp-4 : inexact-ok
++= sin tonearest dbl-64 0x1.200146p+32 : 0x4.220ff25f5cf04p-4 : inexact-ok
++= sin towardzero dbl-64 0x1.200146p+32 : 0x4.220ff25f5cfp-4 : inexact-ok
++= sin upward dbl-64 0x1.200146p+32 : 0x4.220ff25f5cf04p-4 : inexact-ok
++= sin downward ldbl-96-intel 0x1.200146p+32L : 0x4.220ff25f5cf02a4p-4L : inexact-ok
++= sin tonearest ldbl-96-intel 0x1.200146p+32L : 0x4.220ff25f5cf02a48p-4L : inexact-ok
++= sin towardzero ldbl-96-intel 0x1.200146p+32L : 0x4.220ff25f5cf02a4p-4L : inexact-ok
++= sin upward ldbl-96-intel 0x1.200146p+32L : 0x4.220ff25f5cf02a48p-4L : inexact-ok
++= sin downward ldbl-96-m68k 0x1.200146p+32L : 0x4.220ff25f5cf02a4p-4L : inexact-ok
++= sin tonearest ldbl-96-m68k 0x1.200146p+32L : 0x4.220ff25f5cf02a48p-4L : inexact-ok
++= sin towardzero ldbl-96-m68k 0x1.200146p+32L : 0x4.220ff25f5cf02a4p-4L : inexact-ok
++= sin upward ldbl-96-m68k 0x1.200146p+32L : 0x4.220ff25f5cf02a48p-4L : inexact-ok
++= sin downward ldbl-128 0x1.200146p+32L : 0x4.220ff25f5cf02a464dbb3a679ccp-4L : inexact-ok
++= sin tonearest ldbl-128 0x1.200146p+32L : 0x4.220ff25f5cf02a464dbb3a679ccp-4L : inexact-ok
++= sin towardzero ldbl-128 0x1.200146p+32L : 0x4.220ff25f5cf02a464dbb3a679ccp-4L : inexact-ok
++= sin upward ldbl-128 0x1.200146p+32L : 0x4.220ff25f5cf02a464dbb3a679cc4p-4L : inexact-ok
++= sin downward ldbl-128ibm 0x1.200146p+32L : 0x4.220ff25f5cf02a464dbb3a679cp-4L : inexact-ok
++= sin tonearest ldbl-128ibm 0x1.200146p+32L : 0x4.220ff25f5cf02a464dbb3a679cp-4L : inexact-ok
++= sin towardzero ldbl-128ibm 0x1.200146p+32L : 0x4.220ff25f5cf02a464dbb3a679cp-4L : inexact-ok
++= sin upward ldbl-128ibm 0x1.200146p+32L : 0x4.220ff25f5cf02a464dbb3a679ep-4L : inexact-ok
++= sin downward dbl-64 0x1.2001469775ce6p+32 : -0x6.444fda50019fcp-4 : inexact-ok
++= sin tonearest dbl-64 0x1.2001469775ce6p+32 : -0x6.444fda50019f8p-4 : inexact-ok
++= sin towardzero dbl-64 0x1.2001469775ce6p+32 : -0x6.444fda50019f8p-4 : inexact-ok
++= sin upward dbl-64 0x1.2001469775ce6p+32 : -0x6.444fda50019f8p-4 : inexact-ok
++= sin downward ldbl-96-intel 0x1.2001469775ce6p+32L : -0x6.444fda50019f9f6p-4L : inexact-ok
++= sin tonearest ldbl-96-intel 0x1.2001469775ce6p+32L : -0x6.444fda50019f9f58p-4L : inexact-ok
++= sin towardzero ldbl-96-intel 0x1.2001469775ce6p+32L : -0x6.444fda50019f9f58p-4L : inexact-ok
++= sin upward ldbl-96-intel 0x1.2001469775ce6p+32L : -0x6.444fda50019f9f58p-4L : inexact-ok
++= sin downward ldbl-96-m68k 0x1.2001469775ce6p+32L : -0x6.444fda50019f9f6p-4L : inexact-ok
++= sin tonearest ldbl-96-m68k 0x1.2001469775ce6p+32L : -0x6.444fda50019f9f58p-4L : inexact-ok
++= sin towardzero ldbl-96-m68k 0x1.2001469775ce6p+32L : -0x6.444fda50019f9f58p-4L : inexact-ok
++= sin upward ldbl-96-m68k 0x1.2001469775ce6p+32L : -0x6.444fda50019f9f58p-4L : inexact-ok
++= sin downward ldbl-128 0x1.2001469775ce6p+32L : -0x6.444fda50019f9f5ba3779ca70604p-4L : inexact-ok
++= sin tonearest ldbl-128 0x1.2001469775ce6p+32L : -0x6.444fda50019f9f5ba3779ca706p-4L : inexact-ok
++= sin towardzero ldbl-128 0x1.2001469775ce6p+32L : -0x6.444fda50019f9f5ba3779ca706p-4L : inexact-ok
++= sin upward ldbl-128 0x1.2001469775ce6p+32L : -0x6.444fda50019f9f5ba3779ca706p-4L : inexact-ok
++= sin downward ldbl-128ibm 0x1.2001469775ce6p+32L : -0x6.444fda50019f9f5ba3779ca708p-4L : inexact-ok
++= sin tonearest ldbl-128ibm 0x1.2001469775ce6p+32L : -0x6.444fda50019f9f5ba3779ca706p-4L : inexact-ok
++= sin towardzero ldbl-128ibm 0x1.2001469775ce6p+32L : -0x6.444fda50019f9f5ba3779ca706p-4L : inexact-ok
++= sin upward ldbl-128ibm 0x1.2001469775ce6p+32L : -0x6.444fda50019f9f5ba3779ca706p-4L : inexact-ok
+ sincos 0
+ = sincos downward flt-32 0x0p+0f : 0x0p+0f 0x1p+0f : inexact-ok
+ = sincos tonearest flt-32 0x0p+0f : 0x0p+0f 0x1p+0f : inexact-ok
+diff --git a/sysdeps/ieee754/dbl-64/s_sin.c b/sysdeps/ieee754/dbl-64/s_sin.c
+index 6105e9f..50109b8 100644
+--- a/sysdeps/ieee754/dbl-64/s_sin.c
++++ b/sysdeps/ieee754/dbl-64/s_sin.c
+@@ -447,19 +447,21 @@ __sin (double x)
+ }
+ else
+ {
++ double t;
+ if (a > 0)
+ {
+ m = 1;
++ t = a;
+ db = da;
+ }
+ else
+ {
+ m = 0;
+- a = -a;
++ t = -a;
+ db = -da;
+ }
+- u.x = big + a;
+- y = a - (u.x - big);
++ u.x = big + t;
++ y = t - (u.x - big);
+ res = do_sin (u, y, db, &cor);
+ cor = (cor > 0) ? 1.035 * cor + eps : 1.035 * cor - eps;
+ retval = ((res == res + cor) ? ((m) ? res : -res)
+@@ -671,19 +673,21 @@ __cos (double x)
+ }
+ else
+ {
++ double t;
+ if (a > 0)
+ {
+ m = 1;
++ t = a;
+ db = da;
+ }
+ else
+ {
+ m = 0;
+- a = -a;
++ t = -a;
+ db = -da;
+ }
+- u.x = big + a;
+- y = a - (u.x - big);
++ u.x = big + t;
++ y = t - (u.x - big);
+ res = do_sin (u, y, db, &cor);
+ cor = (cor > 0) ? 1.035 * cor + eps : 1.035 * cor - eps;
+ retval = ((res == res + cor) ? ((m) ? res : -res)
+diff --git a/sysdeps/x86_64/fpu/libm-test-ulps b/sysdeps/x86_64/fpu/libm-test-ulps
+index f3980f8..544f1c7 100644
+--- a/sysdeps/x86_64/fpu/libm-test-ulps
++++ b/sysdeps/x86_64/fpu/libm-test-ulps
+@@ -10900,6 +10900,14 @@ idouble: 1
+ Test "cos_downward (0x1.0c152382d7365p+0)":
+ double: 1
+ idouble: 1
++Test "cos_downward (0x1.200145a975ce6p+32)":
++double: 1
++idouble: 1
++ildouble: 1
++ldouble: 1
++Test "cos_downward (0x1.200146p+32)":
++ildouble: 1
++ldouble: 1
+ Test "cos_downward (0x1.921fb4p+0)":
+ ildouble: 1
+ ldouble: 1
+@@ -11126,6 +11134,9 @@ idouble: 1
+ Test "cos_towardzero (0x1.0c152382d7365p+0)":
+ double: 1
+ idouble: 1
++Test "cos_towardzero (0x1.200146p+32)":
++double: 1
++idouble: 1
+ Test "cos_towardzero (0x1.921fb4p+0)":
+ ildouble: 1
+ ldouble: 1
+@@ -11258,6 +11269,17 @@ idouble: 1
+ Test "cos_upward (0x1.0c1524p+0)":
+ double: 1
+ idouble: 1
++Test "cos_upward (0x1.200144p+32)":
++double: 1
++idouble: 1
++Test "cos_upward (0x1.200145a975ce6p+32)":
++ildouble: 1
++ldouble: 1
++Test "cos_upward (0x1.200146p+32)":
++double: 1
++idouble: 1
++ildouble: 1
++ldouble: 1
+ Test "cos_upward (0x1.921fb4p+0)":
+ double: 1
+ idouble: 1
+@@ -15155,6 +15177,19 @@ double: 1
+ idouble: 1
+ ildouble: 1
+ ldouble: 1
++Test "sin_downward (0x1.2001469775ce6p+32)":
++double: 1
++idouble: 1
++ildouble: 1
++ldouble: 1
++Test "sin_downward (0x1.200146p+32)":
++double: 1
++idouble: 1
++Test "sin_downward (0x1.200148p+32)":
++double: 1
++idouble: 1
++ildouble: 1
++ldouble: 1
+ Test "sin_downward (0x1.921fb54442d18468p+0)":
+ ildouble: 1
+ ldouble: 1
+@@ -15383,6 +15418,9 @@ double: 1
+ idouble: 1
+ ildouble: 1
+ ldouble: 1
++Test "sin_towardzero (0x1.200146p+32)":
++double: 1
++idouble: 1
+ Test "sin_towardzero (0x1.921fb54442d18468p+0)":
+ ildouble: 1
+ ldouble: 1
+@@ -15532,6 +15570,12 @@ ldouble: 1
+ Test "sin_upward (-0x8.60a92p-4)":
+ ildouble: 1
+ ldouble: 1
++Test "sin_upward (0x1.2001469775ce6p+32)":
++ildouble: 1
++ldouble: 1
++Test "sin_upward (0x1.200148p+32)":
++ildouble: 1
++ldouble: 1
+ Test "sin_upward (0x1.921fb4p+0)":
+ double: 1
+ idouble: 1
diff --git a/pkgs/development/libraries/glibc/2.18/fix_path_attribute_in_getconf.patch b/pkgs/development/libraries/glibc/2.19/fix_path_attribute_in_getconf.patch
similarity index 100%
rename from pkgs/development/libraries/glibc/2.18/fix_path_attribute_in_getconf.patch
rename to pkgs/development/libraries/glibc/2.19/fix_path_attribute_in_getconf.patch
diff --git a/pkgs/development/libraries/glibc/2.18/glibc-crypt-blowfish.patch b/pkgs/development/libraries/glibc/2.19/glibc-crypt-blowfish.patch
similarity index 100%
rename from pkgs/development/libraries/glibc/2.18/glibc-crypt-blowfish.patch
rename to pkgs/development/libraries/glibc/2.19/glibc-crypt-blowfish.patch
diff --git a/pkgs/development/libraries/glibc/2.18/info.nix b/pkgs/development/libraries/glibc/2.19/info.nix
similarity index 100%
rename from pkgs/development/libraries/glibc/2.18/info.nix
rename to pkgs/development/libraries/glibc/2.19/info.nix
diff --git a/pkgs/development/libraries/glibc/2.18/locales-builder.sh b/pkgs/development/libraries/glibc/2.19/locales-builder.sh
similarity index 100%
rename from pkgs/development/libraries/glibc/2.18/locales-builder.sh
rename to pkgs/development/libraries/glibc/2.19/locales-builder.sh
diff --git a/pkgs/development/libraries/glibc/2.18/locales.nix b/pkgs/development/libraries/glibc/2.19/locales.nix
similarity index 100%
rename from pkgs/development/libraries/glibc/2.18/locales.nix
rename to pkgs/development/libraries/glibc/2.19/locales.nix
diff --git a/pkgs/development/libraries/glibc/2.18/nix-locale-archive.patch b/pkgs/development/libraries/glibc/2.19/nix-locale-archive.patch
similarity index 100%
rename from pkgs/development/libraries/glibc/2.18/nix-locale-archive.patch
rename to pkgs/development/libraries/glibc/2.19/nix-locale-archive.patch
diff --git a/pkgs/development/libraries/glibc/2.18/rpcgen-path.patch b/pkgs/development/libraries/glibc/2.19/rpcgen-path.patch
similarity index 100%
rename from pkgs/development/libraries/glibc/2.18/rpcgen-path.patch
rename to pkgs/development/libraries/glibc/2.19/rpcgen-path.patch
diff --git a/pkgs/development/libraries/gsasl/default.nix b/pkgs/development/libraries/gsasl/default.nix
index a4a3a01299c..70b4ab8639d 100644
--- a/pkgs/development/libraries/gsasl/default.nix
+++ b/pkgs/development/libraries/gsasl/default.nix
@@ -8,7 +8,10 @@ stdenv.mkDerivation rec {
sha256 = "1rci64cxvcfr8xcjpqc4inpfq7aw4snnsbf5xz7d30nhvv8n40ii";
};
- buildInputs = [ gss libidn ];
+ buildInputs = [ libidn ]
+ ++ stdenv.lib.optional (!stdenv.isDarwin) gss;
+
+ configureFlags = stdenv.lib.optionalString stdenv.isDarwin "--with-gssapi-impl=mit";
doCheck = true;
diff --git a/pkgs/development/libraries/gstreamer/bad/default.nix b/pkgs/development/libraries/gstreamer/bad/default.nix
index 7647c0f64db..eed4c12f254 100644
--- a/pkgs/development/libraries/gstreamer/bad/default.nix
+++ b/pkgs/development/libraries/gstreamer/bad/default.nix
@@ -1,11 +1,14 @@
{ stdenv, fetchurl, pkgconfig, python, gst-plugins-base, orc
-, faac, faad2, libass, libkate, libmms
+, faacSupport ? false, faac ? null
+, faad2, libass, libkate, libmms
, libmodplug, mpeg2dec, mpg123
, openjpeg, libopus, librsvg
, timidity, libvdpau, wayland
, libwebp, xvidcore, gnutls
}:
+assert faacSupport -> faac != null;
+
stdenv.mkDerivation rec {
name = "gst-plugins-bad-1.2.3";
@@ -32,10 +35,10 @@ stdenv.mkDerivation rec {
buildInputs = [
gst-plugins-base orc
- faac faad2 libass libkate libmms
+ faad2 libass libkate libmms
libmodplug mpeg2dec mpg123
openjpeg libopus librsvg
timidity libvdpau wayland
libwebp xvidcore gnutls
- ];
+ ] ++ stdenv.lib.optional faacSupport faac;
}
diff --git a/pkgs/development/libraries/gstreamer/core/setup-hook.sh b/pkgs/development/libraries/gstreamer/core/setup-hook.sh
index 4e75044e732..04863ab3b61 100644
--- a/pkgs/development/libraries/gstreamer/core/setup-hook.sh
+++ b/pkgs/development/libraries/gstreamer/core/setup-hook.sh
@@ -1,9 +1,9 @@
-addGstreamerLibPath () {
+addGstreamer1LibPath () {
if test -d "$1/lib/gstreamer-1.0"
then
export GST_PLUGIN_SYSTEM_PATH_1_0="${GST_PLUGIN_SYSTEM_PATH_1_0}${GST_PLUGIN_SYSTEM_PATH_1_0:+:}$1/lib/gstreamer-1.0"
fi
}
-envHooks=(${envHooks[@]} addGstreamerLibPath)
+envHooks=(${envHooks[@]} addGstreamer1LibPath)
diff --git a/pkgs/development/libraries/gtk+/3.x.nix b/pkgs/development/libraries/gtk+/3.x.nix
index c8e4299e1a7..82e2e41aff8 100644
--- a/pkgs/development/libraries/gtk+/3.x.nix
+++ b/pkgs/development/libraries/gtk+/3.x.nix
@@ -10,7 +10,7 @@ assert cupsSupport -> cups != null;
let
ver_maj = "3.12";
- ver_min = "0";
+ ver_min = "1";
version = "${ver_maj}.${ver_min}";
in
stdenv.mkDerivation rec {
@@ -18,7 +18,7 @@ stdenv.mkDerivation rec {
src = fetchurl {
url = "mirror://gnome/sources/gtk+/${ver_maj}/gtk+-${version}.tar.xz";
- sha256 = "0jvf9dawq82x1xsr2f56fw3y7yfwapgdj16gr4d5m6q2shf78sgb";
+ sha256 = "1kbp0bmyzh7lbxv9y349vrj3d0n0hn68r5kyvg5683snvdgsx6ki";
};
nativeBuildInputs = [ pkgconfig gettext gobjectIntrospection perl ];
diff --git a/pkgs/development/libraries/gvfs/default.nix b/pkgs/development/libraries/gvfs/default.nix
index 73b74a12c66..3f20147d0e9 100644
--- a/pkgs/development/libraries/gvfs/default.nix
+++ b/pkgs/development/libraries/gvfs/default.nix
@@ -31,8 +31,8 @@ stdenv.mkDerivation rec {
enableParallelBuilding = true;
# ToDo: one probably should specify schemas for samba and others here
- fixupPhase = ''
- wrapProgram $out/libexec/gvfsd --set GSETTINGS_SCHEMA_DIR "$out/share/glib-2.0/schemas"
+ preFixup = ''
+ wrapProgram $out/libexec/gvfsd --prefix XDG_DATA_DIRS : "$GSETTINGS_SCHEMAS_PATH"
'';
meta = {
diff --git a/pkgs/development/libraries/haskell/Chart-cairo/default.nix b/pkgs/development/libraries/haskell/Chart-cairo/default.nix
index 3b9e6fb4e33..90f93edd4dc 100644
--- a/pkgs/development/libraries/haskell/Chart-cairo/default.nix
+++ b/pkgs/development/libraries/haskell/Chart-cairo/default.nix
@@ -4,11 +4,12 @@
cabal.mkDerivation (self: {
pname = "Chart-cairo";
- version = "1.2";
- sha256 = "08aaf7yb2vry75g15md2012rnmyfrn7awwvba7c38d4h6vm95llg";
+ version = "1.2.2";
+ sha256 = "1bbi5bvrh8wmgzv5am5ndgdr68gd68ipparkkk9ld4majwf4vm6w";
buildDepends = [
cairo Chart colour dataDefaultClass lens mtl operational time
];
+ jailbreak = true;
meta = {
homepage = "https://github.com/timbod7/haskell-chart/wiki";
description = "Cairo backend for Charts";
diff --git a/pkgs/development/libraries/haskell/Chart-diagrams/default.nix b/pkgs/development/libraries/haskell/Chart-diagrams/default.nix
index 008869713ef..22e432f2f32 100644
--- a/pkgs/development/libraries/haskell/Chart-diagrams/default.nix
+++ b/pkgs/development/libraries/haskell/Chart-diagrams/default.nix
@@ -5,13 +5,14 @@
cabal.mkDerivation (self: {
pname = "Chart-diagrams";
- version = "1.2";
- sha256 = "11pvyasra4mxid6826z6rkjhr71lg37fihzr8mgvjw3arascgqxz";
+ version = "1.2.2";
+ sha256 = "144dy9vp3x04s03jrkyfqczpwayb8k7dq702w9wm3d8q4ysva62q";
buildDepends = [
blazeSvg Chart colour dataDefaultClass diagramsCore diagramsLib
diagramsPostscript diagramsSvg lens mtl operational SVGFonts text
time
];
+ jailbreak = true;
meta = {
homepage = "https://github.com/timbod7/haskell-chart/wiki";
description = "Diagrams backend for Charts";
diff --git a/pkgs/development/libraries/haskell/Chart-gtk/default.nix b/pkgs/development/libraries/haskell/Chart-gtk/default.nix
index a2e695a891d..8b1ce6b89e7 100644
--- a/pkgs/development/libraries/haskell/Chart-gtk/default.nix
+++ b/pkgs/development/libraries/haskell/Chart-gtk/default.nix
@@ -2,9 +2,10 @@
cabal.mkDerivation (self: {
pname = "Chart-gtk";
- version = "1.2";
- sha256 = "0qq72cf1m2gvcksa1jj5g9qi6b47pmpzh3grhs7kh3m7qyq0a56g";
+ version = "1.2.2";
+ sha256 = "1mg6nln0jwp6hals9vhhsfqiwix424fv1v1p4h99s0xwy5cna1z9";
buildDepends = [ cairo Chart ChartCairo colour gtk mtl time ];
+ jailbreak = true;
meta = {
homepage = "https://github.com/timbod7/haskell-chart/wiki";
description = "Utility functions for using the chart library with GTK";
diff --git a/pkgs/development/libraries/haskell/Chart/default.nix b/pkgs/development/libraries/haskell/Chart/default.nix
index 5f7e8c2cb4b..7604cd28b8e 100644
--- a/pkgs/development/libraries/haskell/Chart/default.nix
+++ b/pkgs/development/libraries/haskell/Chart/default.nix
@@ -2,8 +2,8 @@
cabal.mkDerivation (self: {
pname = "Chart";
- version = "1.2";
- sha256 = "0cvp2j2hgsdk93f4rbd8y7s11hlr3zg15qkpxhd7p7sl2k6j2r5x";
+ version = "1.2.2";
+ sha256 = "0yd3xca500lbzvlvhdsbrkiy53laikq6hc290rc061agvd535a7p";
buildDepends = [
colour dataDefaultClass lens mtl operational time
];
diff --git a/pkgs/development/libraries/haskell/DAV/default.nix b/pkgs/development/libraries/haskell/DAV/default.nix
index 1fc28b4e50b..ac5a6636e76 100644
--- a/pkgs/development/libraries/haskell/DAV/default.nix
+++ b/pkgs/development/libraries/haskell/DAV/default.nix
@@ -6,8 +6,8 @@
cabal.mkDerivation (self: {
pname = "DAV";
- version = "0.6.1";
- sha256 = "0j82fz5z9cwnl41qqs69gv0li25rkjndd8lnf4zy7bbdy558nxgz";
+ version = "0.6.2";
+ sha256 = "1alnjm0rfr7kwj6jax10bg8rcs8523n5dxyvw0mm65qykf78cprl";
isLibrary = true;
isExecutable = true;
buildDepends = [
diff --git a/pkgs/development/libraries/haskell/Extra/default.nix b/pkgs/development/libraries/haskell/Extra/default.nix
new file mode 100644
index 00000000000..2634f849114
--- /dev/null
+++ b/pkgs/development/libraries/haskell/Extra/default.nix
@@ -0,0 +1,19 @@
+{ cabal, bzlib, filepath, HUnit, mtl, network, pureMD5, QuickCheck
+, random, regexCompat, time, Unixutils, zlib
+}:
+
+cabal.mkDerivation (self: {
+ pname = "Extra";
+ version = "1.46.1";
+ sha256 = "0dgj72s60mhc36x7hpfdcdvxydq5d5aj006gxma9zz3hqzy5nnz9";
+ buildDepends = [
+ bzlib filepath HUnit mtl network pureMD5 QuickCheck random
+ regexCompat time Unixutils zlib
+ ];
+ meta = {
+ homepage = "http://src.seereason.com/haskell-extra";
+ description = "A grab bag of modules";
+ license = self.stdenv.lib.licenses.bsd3;
+ platforms = self.ghc.meta.platforms;
+ };
+})
diff --git a/pkgs/development/libraries/haskell/HStringTemplate/default.nix b/pkgs/development/libraries/haskell/HStringTemplate/default.nix
index 6f96bbbcb7f..0f02d96fcd4 100644
--- a/pkgs/development/libraries/haskell/HStringTemplate/default.nix
+++ b/pkgs/development/libraries/haskell/HStringTemplate/default.nix
@@ -4,8 +4,8 @@
cabal.mkDerivation (self: {
pname = "HStringTemplate";
- version = "0.7.1";
- sha256 = "0hqc1496xazihlww8j90m1cwzj7cihqbfjdly9s8kjf8d5my64ld";
+ version = "0.7.3";
+ sha256 = "1gw4v16nk0878qplcx6by2bl4280lwyn9a252p6ldaqlbk9vygw8";
buildDepends = [
blazeBuilder deepseq filepath mtl parsec syb text time utf8String
void
diff --git a/pkgs/development/libraries/haskell/HTF/default.nix b/pkgs/development/libraries/haskell/HTF/default.nix
index 877fa68ab00..aeb80822f61 100644
--- a/pkgs/development/libraries/haskell/HTF/default.nix
+++ b/pkgs/development/libraries/haskell/HTF/default.nix
@@ -5,8 +5,8 @@
cabal.mkDerivation (self: {
pname = "HTF";
- version = "0.11.2.1";
- sha256 = "194wjcs06cbxjfgfcax697405c0vlaklnvh705ffrxmrrww77z7l";
+ version = "0.11.3.4";
+ sha256 = "0db47fvp33k83dnhvpygprm06p3z397f5ci154vqk7krjpxb2ynx";
isLibrary = true;
isExecutable = true;
buildDepends = [
diff --git a/pkgs/development/libraries/haskell/HTTP/4000.2.11.nix b/pkgs/development/libraries/haskell/HTTP/4000.2.12.nix
similarity index 88%
rename from pkgs/development/libraries/haskell/HTTP/4000.2.11.nix
rename to pkgs/development/libraries/haskell/HTTP/4000.2.12.nix
index f48642462c6..b42703a403f 100644
--- a/pkgs/development/libraries/haskell/HTTP/4000.2.11.nix
+++ b/pkgs/development/libraries/haskell/HTTP/4000.2.12.nix
@@ -5,8 +5,8 @@
cabal.mkDerivation (self: {
pname = "HTTP";
- version = "4000.2.11";
- sha256 = "17jlmh3v6k0mhd9nh1y5pf2br17lkx4wp9sa7q81wvprw998nw97";
+ version = "4000.2.12";
+ sha256 = "0zaynz8s70xzqxxrr8yjxwc7qspd4q2ig1vqjz1p4qqm72rs3jwl";
buildDepends = [ mtl network parsec ];
testDepends = [
caseInsensitive conduit deepseq httpdShed httpTypes HUnit mtl
diff --git a/pkgs/development/libraries/haskell/HandsomeSoup/default.nix b/pkgs/development/libraries/haskell/HandsomeSoup/default.nix
new file mode 100644
index 00000000000..f20efdae4cf
--- /dev/null
+++ b/pkgs/development/libraries/haskell/HandsomeSoup/default.nix
@@ -0,0 +1,18 @@
+{ cabal, HTTP, hxt, hxtHttp, MaybeT, mtl, network, parsec
+, transformers
+}:
+
+cabal.mkDerivation (self: {
+ pname = "HandsomeSoup";
+ version = "0.3.2";
+ sha256 = "0ixqk32sfv6kj41vc6fzflv6f6jwvnkvcdf9pmgkc675218ggh53";
+ buildDepends = [
+ HTTP hxt hxtHttp MaybeT mtl network parsec transformers
+ ];
+ meta = {
+ homepage = "https://github.com/egonSchiele/HandsomeSoup";
+ description = "Work with HTML more easily in HXT";
+ license = self.stdenv.lib.licenses.bsd3;
+ platforms = self.ghc.meta.platforms;
+ };
+})
diff --git a/pkgs/development/libraries/haskell/Hipmunk/default.nix b/pkgs/development/libraries/haskell/Hipmunk/default.nix
index e2f78497a7a..faaed63399a 100644
--- a/pkgs/development/libraries/haskell/Hipmunk/default.nix
+++ b/pkgs/development/libraries/haskell/Hipmunk/default.nix
@@ -2,8 +2,8 @@
cabal.mkDerivation (self: {
pname = "Hipmunk";
- version = "5.2.0.12";
- sha256 = "0gybmwwij6gs3gsklcvck0nc1niyh6pvirnxgrcwclrz94ivpj42";
+ version = "5.2.0.13";
+ sha256 = "0ddf7cbwaswyszq9rs5jq353npbry8l2cc7p5wq9wq97yplz10bc";
buildDepends = [ StateVar transformers ];
meta = {
homepage = "https://github.com/meteficha/Hipmunk";
diff --git a/pkgs/development/libraries/haskell/TypeCompose/default.nix b/pkgs/development/libraries/haskell/TypeCompose/default.nix
index b7c1a23d3d5..083f438e170 100644
--- a/pkgs/development/libraries/haskell/TypeCompose/default.nix
+++ b/pkgs/development/libraries/haskell/TypeCompose/default.nix
@@ -2,8 +2,8 @@
cabal.mkDerivation (self: {
pname = "TypeCompose";
- version = "0.9.9";
- sha256 = "0i89r1yaglkcc1fdhn0m4hws5rqcpmkg32ddznch7a3rz1l9gqwg";
+ version = "0.9.10";
+ sha256 = "1wpldqdf6czl36fs4pvvj2z3kg1487sanqncp4rbmgrrhbfmqxxq";
meta = {
homepage = "https://github.com/conal/TypeCompose";
description = "Type composition classes & instances";
diff --git a/pkgs/development/libraries/haskell/Unixutils/default.nix b/pkgs/development/libraries/haskell/Unixutils/default.nix
new file mode 100644
index 00000000000..37c1aaf6cef
--- /dev/null
+++ b/pkgs/development/libraries/haskell/Unixutils/default.nix
@@ -0,0 +1,14 @@
+{ cabal, filepath, pureMD5, regexTdfa, zlib }:
+
+cabal.mkDerivation (self: {
+ pname = "Unixutils";
+ version = "1.52";
+ sha256 = "1gp04mc6irycwazykl9kpyhkkryn3hbnpn08ih6cjbsm3p8yi8b4";
+ buildDepends = [ filepath pureMD5 regexTdfa zlib ];
+ meta = {
+ homepage = "http://src.seereason.com/haskell-unixutils";
+ description = "A crude interface between Haskell and Unix-like operating systems";
+ license = self.stdenv.lib.licenses.bsd3;
+ platforms = self.ghc.meta.platforms;
+ };
+})
diff --git a/pkgs/development/libraries/haskell/active/default.nix b/pkgs/development/libraries/haskell/active/default.nix
index 99e217ba647..7bfb0a045ee 100644
--- a/pkgs/development/libraries/haskell/active/default.nix
+++ b/pkgs/development/libraries/haskell/active/default.nix
@@ -4,8 +4,8 @@
cabal.mkDerivation (self: {
pname = "active";
- version = "0.1.0.10";
- sha256 = "173ri9hv86sjfp3a0jp1y3v8rz0lfb6nz3yilcfvgc9sglcxa4bm";
+ version = "0.1.0.12";
+ sha256 = "0ra0wnpyc23sz2w9qk6afcxsrva55nv9vyv70dvw6xhc82vi3khs";
buildDepends = [ newtype semigroupoids semigroups vectorSpace ];
testDepends = [
newtype QuickCheck semigroupoids semigroups vectorSpace
diff --git a/pkgs/development/libraries/haskell/aeson-lens/default.nix b/pkgs/development/libraries/haskell/aeson-lens/default.nix
deleted file mode 100644
index f2d1915e122..00000000000
--- a/pkgs/development/libraries/haskell/aeson-lens/default.nix
+++ /dev/null
@@ -1,15 +0,0 @@
-{ cabal, aeson, doctest, lens, text, unorderedContainers, vector }:
-
-cabal.mkDerivation (self: {
- pname = "aeson-lens";
- version = "0.5.0.0";
- sha256 = "1pr8cxkx41wi7095cp1gpqrwadwx6azcrdi1kr1ik0fs6606dkks";
- buildDepends = [ aeson lens text unorderedContainers vector ];
- testDepends = [ doctest ];
- meta = {
- description = "Lens of Aeson";
- license = self.stdenv.lib.licenses.bsd3;
- platforms = self.ghc.meta.platforms;
- maintainers = [ self.stdenv.lib.maintainers.ocharles ];
- };
-})
diff --git a/pkgs/development/libraries/haskell/alsa-mixer/default.nix b/pkgs/development/libraries/haskell/alsa-mixer/default.nix
index 35cc7aa0c93..0e7ef5e2a9f 100644
--- a/pkgs/development/libraries/haskell/alsa-mixer/default.nix
+++ b/pkgs/development/libraries/haskell/alsa-mixer/default.nix
@@ -2,8 +2,8 @@
cabal.mkDerivation (self: {
pname = "alsa-mixer";
- version = "0.2.0.1";
- sha256 = "1306kw4w85d3pkdqjw8cwx77a2mbhw2hlmxcjczym1nsyp4rhyhr";
+ version = "0.2.0.2";
+ sha256 = "11sc2n879a8rb9yz54cb8vg8rplgapbymzy785p7n7638xx877hk";
buildDepends = [ alsaCore ];
buildTools = [ c2hs ];
extraLibraries = [ alsaLib ];
@@ -12,5 +12,6 @@ cabal.mkDerivation (self: {
description = "Bindings to the ALSA simple mixer API";
license = self.stdenv.lib.licenses.bsd3;
platforms = self.stdenv.lib.platforms.linux;
+ maintainers = with self.stdenv.lib.maintainers; [ ttuegel ];
};
})
diff --git a/pkgs/development/libraries/haskell/attoparsec-conduit/default.nix b/pkgs/development/libraries/haskell/attoparsec-conduit/default.nix
index 68b08e50686..21a15ea80e7 100644
--- a/pkgs/development/libraries/haskell/attoparsec-conduit/default.nix
+++ b/pkgs/development/libraries/haskell/attoparsec-conduit/default.nix
@@ -1,15 +1,14 @@
-{ cabal, attoparsec, conduit, hspec, resourcet, text, transformers
-}:
+{ cabal, conduit }:
cabal.mkDerivation (self: {
pname = "attoparsec-conduit";
- version = "1.0.1.2";
- sha256 = "1j05r7mvm83wgnka7asmwd1dj4ajkg548mryyhpr7dd53vn5lbx0";
- buildDepends = [ attoparsec conduit text transformers ];
- testDepends = [ attoparsec conduit hspec resourcet text ];
+ version = "1.1.0";
+ sha256 = "18xn3nzxfghcd88cana1jw85ijv0ysw3bp36fb6r5wsf6m79z01y";
+ buildDepends = [ conduit ];
+ noHaddock = true;
meta = {
homepage = "http://github.com/snoyberg/conduit";
- description = "Consume attoparsec parsers via conduit";
+ description = "Consume attoparsec parsers via conduit. (deprecated)";
license = self.stdenv.lib.licenses.mit;
platforms = self.ghc.meta.platforms;
maintainers = [ self.stdenv.lib.maintainers.andres ];
diff --git a/pkgs/development/libraries/haskell/authenticate-oauth/RSA2.patch b/pkgs/development/libraries/haskell/authenticate-oauth/RSA2.patch
new file mode 100644
index 00000000000..6a888aa3277
--- /dev/null
+++ b/pkgs/development/libraries/haskell/authenticate-oauth/RSA2.patch
@@ -0,0 +1,57 @@
+From c401c2c585b5345243211e981c123a92b995b448 Mon Sep 17 00:00:00 2001
+From: Sergei Trofimovich
+Date: Sat, 25 Jan 2014 13:35:52 +0300
+Subject: [PATCH] authenticate-oauth.cabal: allow RSA-2
+
+The only cosmetic change is rename of 'ha_SHA1' to 'hashSHA1'
+
+Signed-off-by: Sergei Trofimovich
+---
+ authenticate-oauth/Web/Authenticate/OAuth.hs | 10 ++++++++--
+ authenticate-oauth/authenticate-oauth.cabal | 2 +-
+ 2 files changed, 9 insertions(+), 3 deletions(-)
+
+diff --git a/authenticate-oauth/Web/Authenticate/OAuth.hs b/authenticate-oauth/Web/Authenticate/OAuth.hs
+index 3f38c8c..eccd0f1 100644
+--- a/authenticate-oauth/Web/Authenticate/OAuth.hs
++++ b/authenticate-oauth/Web/Authenticate/OAuth.hs
+@@ -21,7 +21,7 @@ module Web.Authenticate.OAuth
+ paramEncode, addScope, addMaybeProxy
+ ) where
+ import Blaze.ByteString.Builder (toByteString, Builder)
+-import Codec.Crypto.RSA (ha_SHA1, rsassa_pkcs1_v1_5_sign)
++import qualified Codec.Crypto.RSA as RSA
+ import Control.Exception
+ import Control.Monad
+ import Control.Monad.IO.Class (MonadIO, liftIO)
+@@ -346,7 +346,13 @@ genSign oa tok req =
+ PLAINTEXT ->
+ return $ BS.intercalate "&" $ map paramEncode [oauthConsumerSecret oa, tokenSecret tok]
+ RSASHA1 pr ->
+- liftM (encode . toStrict . rsassa_pkcs1_v1_5_sign ha_SHA1 pr) (getBaseString tok req)
++ liftM (encode . toStrict . RSA.rsassa_pkcs1_v1_5_sign
++#if MIN_VERSION_RSA(2, 0, 0)
++ RSA.hashSHA1
++#else
++ RSA.ha_SHA1
++#endif
++ pr) (getBaseString tok req)
+
+ #if MIN_VERSION_http_conduit(2, 0, 0)
+ addAuthHeader :: BS.ByteString -> Credential -> Request -> Request
+diff --git a/authenticate-oauth/authenticate-oauth.cabal b/authenticate-oauth/authenticate-oauth.cabal
+index 00507da..e11c3bd 100644
+--- a/authenticate-oauth/authenticate-oauth.cabal
++++ b/authenticate-oauth/authenticate-oauth.cabal
+@@ -19,7 +19,7 @@ library
+ , transformers >= 0.1 && < 0.4
+ , bytestring >= 0.9
+ , crypto-pubkey-types >= 0.1 && < 0.5
+- , RSA >= 1.2 && < 1.3
++ , RSA >= 1.2 && < 2.1
+ , time
+ , data-default
+ , base64-bytestring >= 0.1 && < 1.1
+--
+1.9.1
+
diff --git a/pkgs/development/libraries/haskell/authenticate-oauth/default.nix b/pkgs/development/libraries/haskell/authenticate-oauth/default.nix
index 15c8267ca3e..9a75bd0cea5 100644
--- a/pkgs/development/libraries/haskell/authenticate-oauth/default.nix
+++ b/pkgs/development/libraries/haskell/authenticate-oauth/default.nix
@@ -7,6 +7,8 @@ cabal.mkDerivation (self: {
pname = "authenticate-oauth";
version = "1.4.0.8";
sha256 = "1mc36d6lkmqywzsxhzwv4445mmwdz0rr5ibd2a1nbgw5c5jw76fy";
+ patches = [ ./RSA2.patch ];
+ patchFlags = "-p2";
buildDepends = [
base64Bytestring blazeBuilder blazeBuilderConduit conduit
cryptoPubkeyTypes dataDefault httpConduit httpTypes monadControl
@@ -17,5 +19,6 @@ cabal.mkDerivation (self: {
description = "Library to authenticate with OAuth for Haskell web applications";
license = self.stdenv.lib.licenses.bsd3;
platforms = self.ghc.meta.platforms;
+ maintainers = [ self.stdenv.lib.maintainers.ocharles ];
};
})
diff --git a/pkgs/development/libraries/haskell/aws/default.nix b/pkgs/development/libraries/haskell/aws/default.nix
index af8b2785aa9..7394583c667 100644
--- a/pkgs/development/libraries/haskell/aws/default.nix
+++ b/pkgs/development/libraries/haskell/aws/default.nix
@@ -1,21 +1,22 @@
-{ cabal, attempt, base64Bytestring, blazeBuilder, caseInsensitive
-, cereal, conduit, cryptoApi, cryptohash, cryptohashCryptoapi
-, dataDefault, failure, filepath, httpConduit, httpTypes
+{ cabal, aeson, base16Bytestring, base64Bytestring, blazeBuilder
+, byteable, caseInsensitive, cereal, conduit, conduitExtra
+, cryptohash, dataDefault, filepath, httpConduit, httpTypes
, liftedBase, monadControl, mtl, resourcet, text, time
-, transformers, utf8String, xmlConduit
+, transformers, unorderedContainers, utf8String, vector, xmlConduit
}:
cabal.mkDerivation (self: {
pname = "aws";
- version = "0.8.4";
- sha256 = "0p4m07lw33wd82phwfvyr1alqx3bsafnf25n60h1mss7l0rzyn0i";
+ version = "0.9";
+ sha256 = "07sdz179vqfdcnm6rrdg068xdyqw8m2565bdba5a1s987vdvps21";
isLibrary = true;
isExecutable = true;
buildDepends = [
- attempt base64Bytestring blazeBuilder caseInsensitive cereal
- conduit cryptoApi cryptohash cryptohashCryptoapi dataDefault
- failure filepath httpConduit httpTypes liftedBase monadControl mtl
- resourcet text time transformers utf8String xmlConduit
+ aeson base16Bytestring base64Bytestring blazeBuilder byteable
+ caseInsensitive cereal conduit conduitExtra cryptohash dataDefault
+ filepath httpConduit httpTypes liftedBase monadControl mtl
+ resourcet text time transformers unorderedContainers utf8String
+ vector xmlConduit
];
meta = {
homepage = "http://github.com/aristidb/aws";
diff --git a/pkgs/development/libraries/haskell/basic-prelude/default.nix b/pkgs/development/libraries/haskell/basic-prelude/default.nix
index 807b80b8122..b923e444b1e 100644
--- a/pkgs/development/libraries/haskell/basic-prelude/default.nix
+++ b/pkgs/development/libraries/haskell/basic-prelude/default.nix
@@ -4,8 +4,8 @@
cabal.mkDerivation (self: {
pname = "basic-prelude";
- version = "0.3.7";
- sha256 = "1lk4f41f226v7na1cw0c8y62lm3pgwmn4560g1wmhvyxcj7185q5";
+ version = "0.3.8";
+ sha256 = "0lywnsds0q1nr466s3pc2izfr58kp23z7ing9k7dlgbmh9cqxypg";
buildDepends = [
hashable liftedBase ReadArgs safe systemFilepath text transformers
unorderedContainers vector
diff --git a/pkgs/development/libraries/haskell/bert/default.nix b/pkgs/development/libraries/haskell/bert/default.nix
index e2d482b364e..96c421b708d 100644
--- a/pkgs/development/libraries/haskell/bert/default.nix
+++ b/pkgs/development/libraries/haskell/bert/default.nix
@@ -1,14 +1,14 @@
-{ cabal, async, binary, binaryConduit, conduit, mtl, network
-, networkConduit, parsec, smallcheck, tasty, tastyHunit
-, tastySmallcheck, time, void
+{ cabal, async, binary, binaryConduit, conduit, conduitExtra, mtl
+, network, parsec, smallcheck, tasty, tastyHunit, tastySmallcheck
+, time, void
}:
cabal.mkDerivation (self: {
pname = "bert";
- version = "1.2.2.1";
- sha256 = "1x23grykamyclx6a5jzyqwp3hwr2ma61zvmz89f3cj06sa49cgs0";
+ version = "1.2.2.2";
+ sha256 = "0bjrqgm0dpsrk1nivxmw2wvx33v7z7swgy3p5fb51vg7y81776cz";
buildDepends = [
- binary binaryConduit conduit mtl network networkConduit parsec time
+ binary binaryConduit conduit conduitExtra mtl network parsec time
void
];
testDepends = [
diff --git a/pkgs/development/libraries/haskell/binary-conduit/default.nix b/pkgs/development/libraries/haskell/binary-conduit/default.nix
index 0149fcabe72..4126910db75 100644
--- a/pkgs/development/libraries/haskell/binary-conduit/default.nix
+++ b/pkgs/development/libraries/haskell/binary-conduit/default.nix
@@ -1,14 +1,14 @@
{ cabal, binary, conduit, hspec, QuickCheck, quickcheckAssertions
-, vector
+, resourcet, vector
}:
cabal.mkDerivation (self: {
pname = "binary-conduit";
- version = "1.2";
- sha256 = "1m58zgmivapn51gs5983vpsivzkki94kkac014mwvnp90q46nkvx";
- buildDepends = [ binary conduit vector ];
+ version = "1.2.1.1";
+ sha256 = "0f6ki793fbgxpsqadfj796b4rbv6zhn4v4rrd48r48zzw9hmxmzd";
+ buildDepends = [ binary conduit resourcet vector ];
testDepends = [
- binary conduit hspec QuickCheck quickcheckAssertions
+ binary conduit hspec QuickCheck quickcheckAssertions resourcet
];
meta = {
homepage = "http://github.com/qnikst/binary-conduit";
diff --git a/pkgs/development/libraries/haskell/blaze-builder-conduit/default.nix b/pkgs/development/libraries/haskell/blaze-builder-conduit/default.nix
index 16c352b7a33..1c6670f17ab 100644
--- a/pkgs/development/libraries/haskell/blaze-builder-conduit/default.nix
+++ b/pkgs/development/libraries/haskell/blaze-builder-conduit/default.nix
@@ -1,18 +1,14 @@
-{ cabal, blazeBuilder, conduit, hspec, QuickCheck, text
-, transformers
-}:
+{ cabal, conduit }:
cabal.mkDerivation (self: {
pname = "blaze-builder-conduit";
- version = "1.0.0";
- sha256 = "15q0b0k5dxrp9cw2b4qf9mmjwz1mmxrn3890df5rc9z6yajajrc6";
- buildDepends = [ blazeBuilder conduit text transformers ];
- testDepends = [
- blazeBuilder conduit hspec QuickCheck transformers
- ];
+ version = "1.1.0";
+ sha256 = "0xxyn3lhcn1bkybhrl5dx68d0adf26ilf34gv0mxkwpfj7m7d3k3";
+ buildDepends = [ conduit ];
+ noHaddock = true;
meta = {
homepage = "http://github.com/snoyberg/conduit";
- description = "Convert streams of builders to streams of bytestrings";
+ description = "Convert streams of builders to streams of bytestrings. (deprecated)";
license = self.stdenv.lib.licenses.bsd3;
platforms = self.ghc.meta.platforms;
maintainers = [ self.stdenv.lib.maintainers.andres ];
diff --git a/pkgs/development/libraries/haskell/bytestring-show/default.nix b/pkgs/development/libraries/haskell/bytestring-show/default.nix
index b71b2a3ad83..19b8f15bc6d 100644
--- a/pkgs/development/libraries/haskell/bytestring-show/default.nix
+++ b/pkgs/development/libraries/haskell/bytestring-show/default.nix
@@ -2,8 +2,8 @@
cabal.mkDerivation (self: {
pname = "bytestring-show";
- version = "0.3.5.5";
- sha256 = "0vd8f3jrzi2s119rcn20k6srk6l7ypiars1mxw1n1jrjx8ill2y4";
+ version = "0.3.5.6";
+ sha256 = "04h81a0bh2fvnkby1qafnydb29gzk6d4d311i2lbn7lm2vyjw919";
buildDepends = [ binary ];
meta = {
homepage = "http://code.haskell.org/~dolio/";
diff --git a/pkgs/development/libraries/haskell/bzlib/default.nix b/pkgs/development/libraries/haskell/bzlib/default.nix
new file mode 100644
index 00000000000..cc9f244261b
--- /dev/null
+++ b/pkgs/development/libraries/haskell/bzlib/default.nix
@@ -0,0 +1,13 @@
+{ cabal, bzip2 }:
+
+cabal.mkDerivation (self: {
+ pname = "bzlib";
+ version = "0.5.0.4";
+ sha256 = "1vf37y7wknrihf7hipd6lihkmn7sszbgfb325my52yzbjs3baccd";
+ extraLibraries = [ bzip2 ];
+ meta = {
+ description = "Compression and decompression in the bzip2 format";
+ license = self.stdenv.lib.licenses.bsd3;
+ platforms = self.ghc.meta.platforms;
+ };
+})
diff --git a/pkgs/development/libraries/haskell/c2hsc/default.nix b/pkgs/development/libraries/haskell/c2hsc/default.nix
new file mode 100644
index 00000000000..ac52a88e63b
--- /dev/null
+++ b/pkgs/development/libraries/haskell/c2hsc/default.nix
@@ -0,0 +1,20 @@
+{ cabal, cmdargs, filepath, HStringTemplate, languageC, mtl, split
+, transformers
+}:
+
+cabal.mkDerivation (self: {
+ pname = "c2hsc";
+ version = "0.6.5";
+ sha256 = "0c5hzi4nw9n3ir17swbwymkymnpiw958z8r2hw6656ijwqkxvzgd";
+ isLibrary = false;
+ isExecutable = true;
+ buildDepends = [
+ cmdargs filepath HStringTemplate languageC mtl split transformers
+ ];
+ meta = {
+ homepage = "https://github.com/jwiegley/c2hsc";
+ description = "Convert C API header files to .hsc and .hsc.helper.c files";
+ license = self.stdenv.lib.licenses.bsd3;
+ platforms = self.ghc.meta.platforms;
+ };
+})
diff --git a/pkgs/development/libraries/haskell/cereal-conduit/default.nix b/pkgs/development/libraries/haskell/cereal-conduit/default.nix
index 4021b15df9c..fa13321fff7 100644
--- a/pkgs/development/libraries/haskell/cereal-conduit/default.nix
+++ b/pkgs/development/libraries/haskell/cereal-conduit/default.nix
@@ -2,9 +2,9 @@
cabal.mkDerivation (self: {
pname = "cereal-conduit";
- version = "0.7.2";
- sha256 = "03jlhpz82a7j7n0351db0h7pkxihik3fv0wgjny7i0vlq7gyqdpl";
- buildDepends = [ cereal conduit transformers ];
+ version = "0.7.2.1";
+ sha256 = "1qjx5y8hznpanchhjfrmi0r6vmiqsj0lh9x09n563gschs8dfisw";
+ buildDepends = [ cereal conduit resourcet transformers ];
testDepends = [ cereal conduit HUnit mtl resourcet transformers ];
meta = {
homepage = "https://github.com/litherum/cereal-conduit";
diff --git a/pkgs/development/libraries/haskell/cheapskate/default.nix b/pkgs/development/libraries/haskell/cheapskate/default.nix
new file mode 100644
index 00000000000..0ef18440e37
--- /dev/null
+++ b/pkgs/development/libraries/haskell/cheapskate/default.nix
@@ -0,0 +1,20 @@
+{ cabal, blazeHtml, dataDefault, mtl, syb, text, uniplate
+, xssSanitize
+}:
+
+cabal.mkDerivation (self: {
+ pname = "cheapskate";
+ version = "0.1.0.1";
+ sha256 = "0slrvbaamnwxx89kqjcr62058j00s2dw4c16q1swf817az2p66h8";
+ isLibrary = true;
+ isExecutable = true;
+ buildDepends = [
+ blazeHtml dataDefault mtl syb text uniplate xssSanitize
+ ];
+ meta = {
+ homepage = "http://github.com/jgm/cheapskate";
+ description = "Experimental markdown processor";
+ license = self.stdenv.lib.licenses.bsd3;
+ platforms = self.ghc.meta.platforms;
+ };
+})
diff --git a/pkgs/development/libraries/haskell/checkers/default.nix b/pkgs/development/libraries/haskell/checkers/default.nix
index 4742f5104da..06b89ba85b4 100644
--- a/pkgs/development/libraries/haskell/checkers/default.nix
+++ b/pkgs/development/libraries/haskell/checkers/default.nix
@@ -2,8 +2,8 @@
cabal.mkDerivation (self: {
pname = "checkers";
- version = "0.3.1";
- sha256 = "0lhy8bk8kkj540kjbc76j4x4xsprqwlmxdrss4r0j1bxgmfwha6p";
+ version = "0.3.2";
+ sha256 = "0v8i6754syvjh2p5qdqh95j3swkar9077gidsnahwk9h6qfsx6r3";
buildDepends = [ QuickCheck random ];
meta = {
description = "Check properties on standard classes and data structures";
diff --git a/pkgs/development/libraries/haskell/classy-prelude-conduit/default.nix b/pkgs/development/libraries/haskell/classy-prelude-conduit/default.nix
index eec5677a89f..5324054423b 100644
--- a/pkgs/development/libraries/haskell/classy-prelude-conduit/default.nix
+++ b/pkgs/development/libraries/haskell/classy-prelude-conduit/default.nix
@@ -5,8 +5,8 @@
cabal.mkDerivation (self: {
pname = "classy-prelude-conduit";
- version = "0.8.0";
- sha256 = "1br2gjzafxgq6ksxl895m5acaffnswd1dhcjppx6gnyfa6i3fq1m";
+ version = "0.9.0";
+ sha256 = "1lvi5n2km6l2saspiczpkvaq6670bp658kn83s334h6s6wlba3dz";
buildDepends = [
classyPrelude conduit conduitCombinators monadControl resourcet
systemFileio transformers void
diff --git a/pkgs/development/libraries/haskell/classy-prelude/default.nix b/pkgs/development/libraries/haskell/classy-prelude/default.nix
index 6768e6cfda3..4c142a23f3a 100644
--- a/pkgs/development/libraries/haskell/classy-prelude/default.nix
+++ b/pkgs/development/libraries/haskell/classy-prelude/default.nix
@@ -1,17 +1,17 @@
{ cabal, basicPrelude, chunkedData, enclosedExceptions, hashable
-, hspec, liftedBase, monoTraversable, QuickCheck, semigroups
+, hspec, liftedBase, monoTraversable, QuickCheck, semigroups, stm
, systemFilepath, text, time, transformers, unorderedContainers
, vector, vectorInstances
}:
cabal.mkDerivation (self: {
pname = "classy-prelude";
- version = "0.8.2";
- sha256 = "1kvab1vns1mp0i0nyn0flg2m6f2sl8w1yr2c0x54172f20rdm5lv";
+ version = "0.9.0";
+ sha256 = "1y4440jy7x9ns4kyb638f5lfa1h3vq3wwcwzkpswr8rf8f7z1bj6";
buildDepends = [
basicPrelude chunkedData enclosedExceptions hashable liftedBase
- monoTraversable semigroups systemFilepath text time transformers
- unorderedContainers vector vectorInstances
+ monoTraversable semigroups stm systemFilepath text time
+ transformers unorderedContainers vector vectorInstances
];
testDepends = [
hspec QuickCheck transformers unorderedContainers
diff --git a/pkgs/development/libraries/haskell/conduit-combinators/default.nix b/pkgs/development/libraries/haskell/conduit-combinators/default.nix
index 5431f3dbe3a..fdf5c4625fd 100644
--- a/pkgs/development/libraries/haskell/conduit-combinators/default.nix
+++ b/pkgs/development/libraries/haskell/conduit-combinators/default.nix
@@ -1,17 +1,18 @@
{ cabal, base16Bytestring, base64Bytestring, chunkedData, conduit
-, hspec, monoTraversable, mwcRandom, primitive, silently
-, systemFileio, systemFilepath, text, transformers
-, transformersBase, unixCompat, vector, void
+, conduitExtra, hspec, monadControl, monoTraversable, mwcRandom
+, primitive, resourcet, silently, systemFileio, systemFilepath
+, text, transformers, transformersBase, unixCompat, vector, void
}:
cabal.mkDerivation (self: {
pname = "conduit-combinators";
- version = "0.2.3.1";
- sha256 = "078i0727nhy75y6bxav6sxr1gz9cq04nvskdnzwabljppd34dqg4";
+ version = "0.2.4";
+ sha256 = "0pxzvxd1j48l7j2anv61bxv1accl0jc6vdf9vv0l3s2358smzwwv";
buildDepends = [
- base16Bytestring base64Bytestring chunkedData conduit
- monoTraversable mwcRandom primitive systemFileio systemFilepath
- text transformers transformersBase unixCompat vector void
+ base16Bytestring base64Bytestring chunkedData conduit conduitExtra
+ monadControl monoTraversable mwcRandom primitive resourcet
+ systemFileio systemFilepath text transformers transformersBase
+ unixCompat vector void
];
testDepends = [
base16Bytestring base64Bytestring chunkedData hspec monoTraversable
diff --git a/pkgs/development/libraries/haskell/conduit-extra/default.nix b/pkgs/development/libraries/haskell/conduit-extra/default.nix
index 82ab990947d..67b4186e606 100644
--- a/pkgs/development/libraries/haskell/conduit-extra/default.nix
+++ b/pkgs/development/libraries/haskell/conduit-extra/default.nix
@@ -1,13 +1,25 @@
-{ cabal }:
+{ cabal, attoparsec, blazeBuilder, conduit, exceptions, filepath
+, hspec, monadControl, network, primitive, resourcet
+, streamingCommons, text, transformers, transformersBase
+}:
cabal.mkDerivation (self: {
pname = "conduit-extra";
- version = "1.0.0";
- sha256 = "120c3zay8svdw3b9nqgxlrj45a1d4xf0sijkg367m7hp22szvz8a";
+ version = "1.1.0";
+ sha256 = "08s8nafsdkd4dwmi2vsid82z8iv178vm9jbb322ygnbpf2a9y96y";
+ buildDepends = [
+ attoparsec blazeBuilder conduit filepath monadControl network
+ primitive resourcet streamingCommons text transformers
+ transformersBase
+ ];
+ testDepends = [
+ attoparsec blazeBuilder conduit exceptions hspec resourcet text
+ transformers transformersBase
+ ];
noHaddock = true;
meta = {
homepage = "http://github.com/snoyberg/conduit";
- description = "Temporary placeholder package";
+ description = "Batteries included conduit: adapters for common libraries";
license = self.stdenv.lib.licenses.mit;
platforms = self.ghc.meta.platforms;
};
diff --git a/pkgs/development/libraries/haskell/conduit/default.nix b/pkgs/development/libraries/haskell/conduit/default.nix
index 8a73ef04d1d..ac6211f2b38 100644
--- a/pkgs/development/libraries/haskell/conduit/default.nix
+++ b/pkgs/development/libraries/haskell/conduit/default.nix
@@ -1,15 +1,15 @@
-{ cabal, hspec, liftedBase, mmorph, monadControl, mtl, QuickCheck
-, resourcet, text, textStreamDecode, transformers, transformersBase
-, void
+{ cabal, exceptions, hspec, liftedBase, mmorph, monadControl, mtl
+, QuickCheck, resourcet, text, textStreamDecode, transformers
+, transformersBase, void
}:
cabal.mkDerivation (self: {
pname = "conduit";
- version = "1.0.17.1";
- sha256 = "0s2cszwfmz7j249bdydh0d97r5br1p6nizw7ycbkxlmpcrmdvifk";
+ version = "1.1.0";
+ sha256 = "17y8fnvl9s3676sslhc04abs4zqh90l2rdcazxglv0sfrfsdgwnq";
buildDepends = [
- liftedBase mmorph monadControl mtl resourcet text textStreamDecode
- transformers transformersBase void
+ exceptions liftedBase mmorph monadControl mtl resourcet text
+ textStreamDecode transformers transformersBase void
];
testDepends = [
hspec mtl QuickCheck resourcet text transformers void
diff --git a/pkgs/development/libraries/haskell/convertible/1.0.11.1.nix b/pkgs/development/libraries/haskell/convertible/1.0.11.1.nix
new file mode 100644
index 00000000000..8a79e50527d
--- /dev/null
+++ b/pkgs/development/libraries/haskell/convertible/1.0.11.1.nix
@@ -0,0 +1,17 @@
+{ cabal, mtl, text, time }:
+
+cabal.mkDerivation (self: {
+ pname = "convertible";
+ version = "1.0.11.1";
+ sha256 = "1r50a2rpfsx0s7dv8ww5xck33b1mhy73gfilffrbqd4hxjgnxlj6";
+ isLibrary = true;
+ isExecutable = true;
+ buildDepends = [ mtl text time ];
+ meta = {
+ homepage = "http://hackage.haskell.org/cgi-bin/hackage-scripts/package/convertible";
+ description = "Typeclasses and instances for converting between types";
+ license = self.stdenv.lib.licenses.bsd3;
+ platforms = self.ghc.meta.platforms;
+ maintainers = [ self.stdenv.lib.maintainers.andres ];
+ };
+})
diff --git a/pkgs/development/libraries/haskell/convertible/default.nix b/pkgs/development/libraries/haskell/convertible/1.1.0.0.nix
similarity index 100%
rename from pkgs/development/libraries/haskell/convertible/default.nix
rename to pkgs/development/libraries/haskell/convertible/1.1.0.0.nix
diff --git a/pkgs/development/libraries/haskell/criterion/default.nix b/pkgs/development/libraries/haskell/criterion/default.nix
index ba8f1b70c77..e106138ef24 100644
--- a/pkgs/development/libraries/haskell/criterion/default.nix
+++ b/pkgs/development/libraries/haskell/criterion/default.nix
@@ -1,15 +1,15 @@
{ cabal, aeson, binary, deepseq, filepath, Glob, hastache, mtl
-, mwcRandom, parsec, statistics, time, transformers, vector
+, mwcRandom, parsec, statistics, text, time, transformers, vector
, vectorAlgorithms
}:
cabal.mkDerivation (self: {
pname = "criterion";
- version = "0.8.0.1";
- sha256 = "1f4wsaiyq0zks71jgfx43774vxkf9l362a9kfd2jhsnxx7zkv5sq";
+ version = "0.8.0.2";
+ sha256 = "126c3i9i88wqs5ihif4kpsc1gdqas57acd8h5jbyfqhgbwi1s7gz";
buildDepends = [
aeson binary deepseq filepath Glob hastache mtl mwcRandom parsec
- statistics time transformers vector vectorAlgorithms
+ statistics text time transformers vector vectorAlgorithms
];
meta = {
homepage = "https://github.com/bos/criterion";
diff --git a/pkgs/development/libraries/haskell/crypto-conduit/default.nix b/pkgs/development/libraries/haskell/crypto-conduit/default.nix
index 3668c46dc68..bcc357fbed3 100644
--- a/pkgs/development/libraries/haskell/crypto-conduit/default.nix
+++ b/pkgs/development/libraries/haskell/crypto-conduit/default.nix
@@ -1,15 +1,17 @@
-{ cabal, cereal, conduit, cryptoApi, cryptocipher
-, cryptohashCryptoapi, hspec, skein, transformers
+{ cabal, cereal, conduit, conduitExtra, cryptoApi, cryptocipher
+, cryptohashCryptoapi, hspec, resourcet, skein, transformers
}:
cabal.mkDerivation (self: {
pname = "crypto-conduit";
- version = "0.5.2.2";
- sha256 = "1969jys4za3m818jvnfcsv5hpc50bcvkrmy9lxr8fz854q01vhk2";
- buildDepends = [ cereal conduit cryptoApi transformers ];
+ version = "0.5.3";
+ sha256 = "1xvjfkwd4rqlgyz172s2mihfqz1pac84qhc72c4zw1nwadsh6dgl";
+ buildDepends = [
+ cereal conduit conduitExtra cryptoApi resourcet transformers
+ ];
testDepends = [
- cereal conduit cryptoApi cryptocipher cryptohashCryptoapi hspec
- skein transformers
+ cereal conduit conduitExtra cryptoApi cryptocipher
+ cryptohashCryptoapi hspec skein transformers
];
jailbreak = true;
doCheck = false;
diff --git a/pkgs/development/libraries/haskell/cryptohash-cryptoapi/default.nix b/pkgs/development/libraries/haskell/cryptohash-cryptoapi/default.nix
index 7041bcc5285..020b34298ad 100644
--- a/pkgs/development/libraries/haskell/cryptohash-cryptoapi/default.nix
+++ b/pkgs/development/libraries/haskell/cryptohash-cryptoapi/default.nix
@@ -2,8 +2,8 @@
cabal.mkDerivation (self: {
pname = "cryptohash-cryptoapi";
- version = "0.1.2";
- sha256 = "1i2qxyq5qk4jzgkl7kndy10sbmzmagamfnqvl300qm3msi9k0kfy";
+ version = "0.1.3";
+ sha256 = "0wj53p32js8lfg0i8akrljpash0jdiyv2vcqpmjbd4dq2fx81w2n";
buildDepends = [ cereal cryptoApi cryptohash tagged ];
meta = {
homepage = "http://github.com/vincenthz/hs-cryptohash-cryptoapi";
diff --git a/pkgs/development/libraries/haskell/data-hash/default.nix b/pkgs/development/libraries/haskell/data-hash/default.nix
new file mode 100644
index 00000000000..c8e4887063c
--- /dev/null
+++ b/pkgs/development/libraries/haskell/data-hash/default.nix
@@ -0,0 +1,15 @@
+{ cabal, QuickCheck, testFramework, testFrameworkQuickcheck2 }:
+
+cabal.mkDerivation (self: {
+ pname = "data-hash";
+ version = "0.2.0.0";
+ sha256 = "1bfsbc4fkg3jqgbgka1mg6k1fizynvvxbhf2zb0x1apgr579mcrm";
+ testDepends = [
+ QuickCheck testFramework testFrameworkQuickcheck2
+ ];
+ meta = {
+ description = "Combinators for building fast hashing functions";
+ license = self.stdenv.lib.licenses.bsd3;
+ platforms = self.ghc.meta.platforms;
+ };
+})
diff --git a/pkgs/development/libraries/haskell/data-ordlist/default.nix b/pkgs/development/libraries/haskell/data-ordlist/default.nix
new file mode 100644
index 00000000000..ca506bc01e9
--- /dev/null
+++ b/pkgs/development/libraries/haskell/data-ordlist/default.nix
@@ -0,0 +1,12 @@
+{ cabal }:
+
+cabal.mkDerivation (self: {
+ pname = "data-ordlist";
+ version = "0.4.6";
+ sha256 = "13gsvqifwlxcz10x704fy26288l0km2kfdlh4w9hl31a9vd427sx";
+ meta = {
+ description = "Set and bag operations on ordered lists";
+ license = self.stdenv.lib.licenses.bsd3;
+ platforms = self.ghc.meta.platforms;
+ };
+})
diff --git a/pkgs/development/libraries/haskell/diagrams/contrib.nix b/pkgs/development/libraries/haskell/diagrams/contrib.nix
index f2a654302b6..aca28a02490 100644
--- a/pkgs/development/libraries/haskell/diagrams/contrib.nix
+++ b/pkgs/development/libraries/haskell/diagrams/contrib.nix
@@ -7,8 +7,8 @@
cabal.mkDerivation (self: {
pname = "diagrams-contrib";
- version = "1.1.1.2";
- sha256 = "09dfnvriih4lkici34bj9nvww245hzl95crldblwyjwi2c8qcy69";
+ version = "1.1.1.4";
+ sha256 = "0n2r6k65kxvk5mwm193yhzwnj3bhignq4xdslfpv2m1afdvws2y1";
buildDepends = [
arithmoi circlePacking colour dataDefault dataDefaultClass
diagramsCore diagramsLib forceLayout lens MonadRandom mtl parsec
diff --git a/pkgs/development/libraries/haskell/diagrams/core.nix b/pkgs/development/libraries/haskell/diagrams/core.nix
index 3529faaf6af..eb9207a936f 100644
--- a/pkgs/development/libraries/haskell/diagrams/core.nix
+++ b/pkgs/development/libraries/haskell/diagrams/core.nix
@@ -4,8 +4,8 @@
cabal.mkDerivation (self: {
pname = "diagrams-core";
- version = "1.1.0.1";
- sha256 = "1jr827cd3qa631glwc9h247w0wnrx84gj2iwxj18b4y78d0ajz69";
+ version = "1.1.0.2";
+ sha256 = "1py1dk6w6f00kd48kxbdbxmd3rakxdmwgpb09g346vmkbxkj56mq";
buildDepends = [
dualTree lens MemoTrie monoidExtras newtype semigroups vectorSpace
vectorSpacePoints
diff --git a/pkgs/development/libraries/haskell/diagrams/lib.nix b/pkgs/development/libraries/haskell/diagrams/lib.nix
index c8c8bf5434d..fd839e42857 100644
--- a/pkgs/development/libraries/haskell/diagrams/lib.nix
+++ b/pkgs/development/libraries/haskell/diagrams/lib.nix
@@ -6,8 +6,8 @@
cabal.mkDerivation (self: {
pname = "diagrams-lib";
- version = "1.1.0.3";
- sha256 = "1g4kcmpqsnb25yqvd6yv026znp7s5jhnqg1nvfxcaq0zz84w9ckh";
+ version = "1.1.0.6";
+ sha256 = "125krfaf73k2m73scnjdl0d76acwc6n9vhvvaqxxy1ln57caqh5x";
buildDepends = [
active colour dataDefaultClass diagramsCore filepath fingertree
hashable intervals lens MemoTrie monoidExtras optparseApplicative
diff --git a/pkgs/development/libraries/haskell/diagrams/postscript.nix b/pkgs/development/libraries/haskell/diagrams/postscript.nix
index 9716177ede5..55e2c975b0e 100644
--- a/pkgs/development/libraries/haskell/diagrams/postscript.nix
+++ b/pkgs/development/libraries/haskell/diagrams/postscript.nix
@@ -5,8 +5,8 @@
cabal.mkDerivation (self: {
pname = "diagrams-postscript";
- version = "1.0.2.2";
- sha256 = "00xzzx6dvraa8gbk3agqvrmxjnpvq4hik7kahidw4k37hxyyvwm3";
+ version = "1.0.2.4";
+ sha256 = "0vjzvjyrbmnjgl8ln58a44nhh4abq5q2c6fvlpxpfhxh2ligsmas";
buildDepends = [
dataDefaultClass diagramsCore diagramsLib dlist filepath hashable
lens monoidExtras mtl semigroups split vectorSpace
diff --git a/pkgs/development/libraries/haskell/digestive-functors-aeson/default.nix b/pkgs/development/libraries/haskell/digestive-functors-aeson/default.nix
index 64137054a70..ba0866b72d7 100644
--- a/pkgs/development/libraries/haskell/digestive-functors-aeson/default.nix
+++ b/pkgs/development/libraries/haskell/digestive-functors-aeson/default.nix
@@ -1,14 +1,14 @@
-{ cabal, aeson, digestiveFunctors, HUnit, lens, mtl, safe, tasty
-, tastyHunit, text, vector
+{ cabal, aeson, digestiveFunctors, HUnit, lens, mtl, safe
+, scientific, tasty, tastyHunit, text, vector
}:
cabal.mkDerivation (self: {
pname = "digestive-functors-aeson";
- version = "1.1.6";
- sha256 = "1zhw0zksl48q9y699phadf6ixsyll52clr3yyhqghki6l820xwci";
+ version = "1.1.7";
+ sha256 = "07dnwmbcyb64yp51ijwsc84r6gf4rxxc4bi3wkzwxq1ijm1qhpni";
buildDepends = [ aeson digestiveFunctors lens safe text vector ];
testDepends = [
- aeson digestiveFunctors HUnit mtl tasty tastyHunit text
+ aeson digestiveFunctors HUnit mtl scientific tasty tastyHunit text
];
meta = {
homepage = "http://github.com/ocharles/digestive-functors-aeson";
diff --git a/pkgs/development/libraries/haskell/direct-sqlite/default.nix b/pkgs/development/libraries/haskell/direct-sqlite/default.nix
index 12e61ebb9ef..14be91cd1bf 100644
--- a/pkgs/development/libraries/haskell/direct-sqlite/default.nix
+++ b/pkgs/development/libraries/haskell/direct-sqlite/default.nix
@@ -2,8 +2,8 @@
cabal.mkDerivation (self: {
pname = "direct-sqlite";
- version = "2.3.11";
- sha256 = "0pd5qv8aq47d5n2sd99yblxiq70zvmy2rc71ys73a3d846k0ncs0";
+ version = "2.3.12";
+ sha256 = "14dcgmn3mfx69qx412dc8cxa4ia3adsf8gm5q4yscpp8rf78m178";
buildDepends = [ text ];
testDepends = [ base16Bytestring HUnit text ];
meta = {
diff --git a/pkgs/development/libraries/haskell/distributive/default.nix b/pkgs/development/libraries/haskell/distributive/default.nix
index 4a0167eb030..053f938ae56 100644
--- a/pkgs/development/libraries/haskell/distributive/default.nix
+++ b/pkgs/development/libraries/haskell/distributive/default.nix
@@ -4,13 +4,13 @@
cabal.mkDerivation (self: {
pname = "distributive";
- version = "0.4.1";
- sha256 = "0izsgasml3didklkk6z274fzfd1c6qnn0wlzprcz0bnd07zkh814";
+ version = "0.4.3.1";
+ sha256 = "17ny7nlxg6x08f88dyl15wsdhgi0cgafxdsl5wdw5vv6y0jsrx27";
buildDepends = [ tagged transformers transformersCompat ];
testDepends = [ doctest filepath ];
meta = {
homepage = "http://github.com/ekmett/distributive/";
- description = "Haskell 98 Distributive functors -- Dual to Traversable";
+ description = "Distributive functors -- Dual to Traversable";
license = self.stdenv.lib.licenses.bsd3;
platforms = self.ghc.meta.platforms;
};
diff --git a/pkgs/development/libraries/haskell/dns/default.nix b/pkgs/development/libraries/haskell/dns/default.nix
index 5b2d99fb90e..97a120f2123 100644
--- a/pkgs/development/libraries/haskell/dns/default.nix
+++ b/pkgs/development/libraries/haskell/dns/default.nix
@@ -1,19 +1,19 @@
{ cabal, attoparsec, attoparsecConduit, binary, blazeBuilder
-, conduit, doctest, hspec, iproute, mtl, network, networkConduit
-, random
+, conduit, conduitExtra, doctest, hspec, iproute, mtl, network
+, random, resourcet
}:
cabal.mkDerivation (self: {
pname = "dns";
- version = "1.2.0";
- sha256 = "1pzwvb1qycjw6qw34xhd4ap9jl0cc79d3i09b23bg0vqcz80vmpr";
+ version = "1.2.1";
+ sha256 = "0xv8mj2x8ijqgi7gnh2shr7ns9qghiczm3lw9n37mxk02zbvw8h0";
buildDepends = [
- attoparsec attoparsecConduit binary blazeBuilder conduit iproute
- mtl network networkConduit random
+ attoparsec attoparsecConduit binary blazeBuilder conduit
+ conduitExtra iproute mtl network random resourcet
];
testDepends = [
- attoparsec attoparsecConduit binary blazeBuilder conduit doctest
- hspec iproute mtl network networkConduit random
+ attoparsec attoparsecConduit binary blazeBuilder conduit
+ conduitExtra doctest hspec iproute mtl network random resourcet
];
testTarget = "spec";
meta = {
diff --git a/pkgs/development/libraries/haskell/dual-tree/default.nix b/pkgs/development/libraries/haskell/dual-tree/default.nix
index f8ef34a1723..7b2023c0812 100644
--- a/pkgs/development/libraries/haskell/dual-tree/default.nix
+++ b/pkgs/development/libraries/haskell/dual-tree/default.nix
@@ -2,8 +2,8 @@
cabal.mkDerivation (self: {
pname = "dual-tree";
- version = "0.2.0.1";
- sha256 = "0v9kdhnwq8nv30ci5q7n43abl0wag21i06wp8pv1xgrva4lhswm5";
+ version = "0.2.0.2";
+ sha256 = "0w0kfzij22209slddyzr2g77khcgpv4ridhvkgl8z3d5sp7ggby1";
buildDepends = [ monoidExtras newtype semigroups ];
jailbreak = true;
meta = {
diff --git a/pkgs/development/libraries/haskell/dyre/default.nix b/pkgs/development/libraries/haskell/dyre/default.nix
index 8b3d2cab677..178f01952ea 100644
--- a/pkgs/development/libraries/haskell/dyre/default.nix
+++ b/pkgs/development/libraries/haskell/dyre/default.nix
@@ -4,8 +4,8 @@
cabal.mkDerivation (self: {
pname = "dyre";
- version = "0.8.11";
- sha256 = "0sg5csshznbbyvq72s4sps7bkjlkfxiwcy4i3ip83lrxjw1msvr8";
+ version = "0.8.12";
+ sha256 = "10hnlysy4bjvvznk8v902mlk4jx95qf972clyi1l32xkqrf30972";
buildDepends = [
binary executablePath filepath ghcPaths ioStorage time xdgBasedir
];
diff --git a/pkgs/development/libraries/haskell/esqueleto/default.nix b/pkgs/development/libraries/haskell/esqueleto/default.nix
index fd314d12d51..9103480d48f 100644
--- a/pkgs/development/libraries/haskell/esqueleto/default.nix
+++ b/pkgs/development/libraries/haskell/esqueleto/default.nix
@@ -5,15 +5,16 @@
cabal.mkDerivation (self: {
pname = "esqueleto";
- version = "1.3.5";
- sha256 = "0lz17fr4by31h1qdw0djbsb1zx9xgll5iphqq18gp587l799iy2p";
+ version = "1.3.10";
+ sha256 = "0q333m7xaanxb1vzgf2yn6d7y3pgkbj9mjw5gnywms36v5zsfik7";
buildDepends = [
conduit monadLogger persistent resourcet tagged text transformers
unorderedContainers
];
testDepends = [
conduit hspec HUnit monadControl monadLogger persistent
- persistentSqlite persistentTemplate QuickCheck text transformers
+ persistentSqlite persistentTemplate QuickCheck resourcet text
+ transformers
];
meta = {
homepage = "https://github.com/meteficha/esqueleto";
diff --git a/pkgs/development/libraries/haskell/exceptions/default.nix b/pkgs/development/libraries/haskell/exceptions/default.nix
index a206b7c186e..5d58654e51d 100644
--- a/pkgs/development/libraries/haskell/exceptions/default.nix
+++ b/pkgs/development/libraries/haskell/exceptions/default.nix
@@ -4,8 +4,8 @@
cabal.mkDerivation (self: {
pname = "exceptions";
- version = "0.3.3.1";
- sha256 = "091frx3hmx7lq10z7f8q98pz0sa1lj23i7z4z98gh1980r525fah";
+ version = "0.5";
+ sha256 = "0l9gpifp23j6hvyq8p48rxsnv9adqbf7z096dzvd8v5xqqybgyxi";
buildDepends = [ mtl transformers ];
testDepends = [
mtl QuickCheck testFramework testFrameworkQuickcheck2 transformers
diff --git a/pkgs/development/libraries/haskell/fay-base/default.nix b/pkgs/development/libraries/haskell/fay-base/default.nix
index 6e9ed486884..fae2c8ee93f 100644
--- a/pkgs/development/libraries/haskell/fay-base/default.nix
+++ b/pkgs/development/libraries/haskell/fay-base/default.nix
@@ -2,8 +2,8 @@
cabal.mkDerivation (self: {
pname = "fay-base";
- version = "0.19.1";
- sha256 = "1b4v8l3adhcpply9yqk1pc1cgsvqlamvk60rvcb89kw5clrbvr4r";
+ version = "0.19.1.1";
+ sha256 = "1qn48aj7j33gvb6vmz986cqi41zvh62sbmmvwgyhpmrhsfkm5wkz";
buildDepends = [ fay ];
meta = {
homepage = "https://github.com/faylang/fay-base";
diff --git a/pkgs/development/libraries/haskell/fay/default.nix b/pkgs/development/libraries/haskell/fay/default.nix
index ec5f0a48b87..f7bf07b4fba 100644
--- a/pkgs/development/libraries/haskell/fay/default.nix
+++ b/pkgs/development/libraries/haskell/fay/default.nix
@@ -8,8 +8,8 @@
cabal.mkDerivation (self: {
pname = "fay";
- version = "0.19.1.1";
- sha256 = "1jjv7l4x1bxr4whhcn4vh4b3ac4wfnb6l322jmdj60nh9sj8dzpf";
+ version = "0.19.2";
+ sha256 = "08lq2x87gsf5szdj613k9h3qxzpb99hjhxnq3vggs2kf0ijp6xmh";
isLibrary = true;
isExecutable = true;
buildDepends = [
diff --git a/pkgs/development/libraries/haskell/fb/default.nix b/pkgs/development/libraries/haskell/fb/default.nix
index dbade4c9f84..89f8a2121f8 100644
--- a/pkgs/development/libraries/haskell/fb/default.nix
+++ b/pkgs/development/libraries/haskell/fb/default.nix
@@ -1,5 +1,5 @@
-{ cabal, aeson, attoparsec, attoparsecConduit, base16Bytestring
-, base64Bytestring, cereal, conduit, cryptoApi, cryptohash
+{ cabal, aeson, attoparsec, base16Bytestring, base64Bytestring
+, cereal, conduit, conduitExtra, cryptoApi, cryptohash
, cryptohashCryptoapi, dataDefault, hspec, httpConduit, httpTypes
, HUnit, liftedBase, monadControl, monadLogger, QuickCheck
, resourcet, text, time, transformers, transformersBase
@@ -8,18 +8,17 @@
cabal.mkDerivation (self: {
pname = "fb";
- version = "0.15.2";
- sha256 = "1nkgw4978kwhqs7h6rlsspx2f9dbmsywjn57v2fg1c1lg271rz1d";
+ version = "1.0";
+ sha256 = "1pkjpzhdysq5vn302wipz62w6v9fibpvd4smaylv8wgn09si91ji";
buildDepends = [
- aeson attoparsec attoparsecConduit base16Bytestring
- base64Bytestring cereal conduit cryptoApi cryptohash
- cryptohashCryptoapi dataDefault httpConduit httpTypes liftedBase
- monadControl monadLogger resourcet text time transformers
- transformersBase unorderedContainers
+ aeson attoparsec base16Bytestring base64Bytestring cereal conduit
+ conduitExtra cryptoApi cryptohash cryptohashCryptoapi dataDefault
+ httpConduit httpTypes liftedBase monadControl monadLogger resourcet
+ text time transformers transformersBase unorderedContainers
];
testDepends = [
aeson conduit dataDefault hspec httpConduit HUnit liftedBase
- monadControl QuickCheck text time transformers
+ monadControl QuickCheck resourcet text time transformers
];
doCheck = false;
meta = {
diff --git a/pkgs/development/libraries/haskell/fdo-notify/default.nix b/pkgs/development/libraries/haskell/fdo-notify/default.nix
new file mode 100644
index 00000000000..86f3d7e0d1d
--- /dev/null
+++ b/pkgs/development/libraries/haskell/fdo-notify/default.nix
@@ -0,0 +1,14 @@
+{ cabal, dbus }:
+
+cabal.mkDerivation (self: {
+ pname = "fdo-notify";
+ version = "0.3.1";
+ sha256 = "1n4zk1i7g34w0wk5zy8n4r63xbglxf62h8j78kv5fc2yn95l30vh";
+ buildDepends = [ dbus ];
+ meta = {
+ homepage = "http://bitbucket.org/taejo/fdo-notify/";
+ description = "Desktop Notifications client";
+ license = self.stdenv.lib.licenses.bsd3;
+ platforms = self.ghc.meta.platforms;
+ };
+})
diff --git a/pkgs/development/libraries/haskell/fsnotify/default.nix b/pkgs/development/libraries/haskell/fsnotify/default.nix
index 1ef55d105f7..3d308f6a88f 100644
--- a/pkgs/development/libraries/haskell/fsnotify/default.nix
+++ b/pkgs/development/libraries/haskell/fsnotify/default.nix
@@ -1,16 +1,18 @@
-{ cabal, Cabal, Glob, hinotify, hspec, QuickCheck, random
+{ stdenv, cabal, Cabal, Glob, hspec, QuickCheck, random
, systemFileio, systemFilepath, text, time, uniqueid
+, hinotify, hfsevents
}:
cabal.mkDerivation (self: {
pname = "fsnotify";
version = "0.0.11";
sha256 = "03m911pncyzgfdx4aj38azbbmj25fdm3s9l1w27zv0l730fy8ywq";
- buildDepends = [ hinotify systemFileio systemFilepath text time ];
+ buildDepends = [ systemFileio systemFilepath text time ] ++
+ (if stdenv.isDarwin then [ hfsevents ] else [ hinotify ]);
testDepends = [
- Cabal Glob hinotify hspec QuickCheck random systemFileio
+ Cabal Glob hspec QuickCheck random systemFileio
systemFilepath text time uniqueid
- ];
+ ] ++ (if stdenv.isDarwin then [ hfsevents ] else [ hinotify ]);
doCheck = false;
meta = {
description = "Cross platform library for file change notification";
diff --git a/pkgs/development/libraries/haskell/ftphs/default.nix b/pkgs/development/libraries/haskell/ftphs/default.nix
new file mode 100644
index 00000000000..c682c593ea6
--- /dev/null
+++ b/pkgs/development/libraries/haskell/ftphs/default.nix
@@ -0,0 +1,18 @@
+{ cabal, hslogger, MissingH, mtl, network, parsec, regexCompat }:
+
+cabal.mkDerivation (self: {
+ pname = "ftphs";
+ version = "1.0.9.1";
+ sha256 = "1whvawaifhi5xgmiagdayjf7m6p6vs71mvc4a4csd4vzzjr0a2yf";
+ isLibrary = true;
+ isExecutable = true;
+ buildDepends = [
+ hslogger MissingH mtl network parsec regexCompat
+ ];
+ meta = {
+ homepage = "http://software.complete.org/ftphs";
+ description = "FTP Client and Server Library";
+ license = "LGPL";
+ platforms = self.ghc.meta.platforms;
+ };
+})
diff --git a/pkgs/development/libraries/haskell/ghc-mod/default.nix b/pkgs/development/libraries/haskell/ghc-mod/default.nix
index 260fff8ae82..185f70785e5 100644
--- a/pkgs/development/libraries/haskell/ghc-mod/default.nix
+++ b/pkgs/development/libraries/haskell/ghc-mod/default.nix
@@ -1,20 +1,20 @@
-{ cabal, Cabal, convertible, doctest, emacs, filepath, ghcPaths
-, ghcSybUtils, hlint, hspec, ioChoice, syb, time, transformers
+{ cabal, Cabal, convertible, doctest, emacs, filepath, ghcSybUtils
+, hlint, hspec, ioChoice, syb, time, transformers
}:
cabal.mkDerivation (self: {
pname = "ghc-mod";
- version = "3.1.7";
- sha256 = "1mv6m1fcqkm4i27jw1aniwfq2dhpn4m7kicyq4l70zmkfr7y7c5s";
+ version = "4.0.2";
+ sha256 = "10ndlydx0ymz8fbcgjjnzyak7lly34012bsghwj0i0dc5ja1pic8";
isLibrary = true;
isExecutable = true;
buildDepends = [
- Cabal convertible filepath ghcPaths ghcSybUtils hlint ioChoice syb
- time transformers
+ Cabal convertible filepath ghcSybUtils hlint ioChoice syb time
+ transformers
];
testDepends = [
- Cabal convertible doctest filepath ghcPaths ghcSybUtils hlint hspec
- ioChoice syb time transformers
+ Cabal convertible doctest filepath ghcSybUtils hlint hspec ioChoice
+ syb time transformers
];
buildTools = [ emacs ];
postInstall = ''
diff --git a/pkgs/development/libraries/haskell/ghc-mtl/default.nix b/pkgs/development/libraries/haskell/ghc-mtl/default.nix
index 1379d4a8ee8..592961aa554 100644
--- a/pkgs/development/libraries/haskell/ghc-mtl/default.nix
+++ b/pkgs/development/libraries/haskell/ghc-mtl/default.nix
@@ -2,8 +2,8 @@
cabal.mkDerivation (self: {
pname = "ghc-mtl";
- version = "1.1.0.0";
- sha256 = "1vmiy00fsdp1jzmpjrz8wzxbv3185h27aspw412pmcr4v1n29kxc";
+ version = "1.2.0.0";
+ sha256 = "0fk3adc56nhi46nf2w5ybp3cd9l13qqbpd5nbhfhbqj3g73j8p5a";
buildDepends = [ exceptions extensibleExceptions mtl ];
meta = {
homepage = "http://hub.darcs.net/jcpetruzza/ghc-mtl";
diff --git a/pkgs/development/libraries/haskell/github/default.nix b/pkgs/development/libraries/haskell/github/default.nix
index 0c1d0b3135d..5fd23514583 100644
--- a/pkgs/development/libraries/haskell/github/default.nix
+++ b/pkgs/development/libraries/haskell/github/default.nix
@@ -13,6 +13,9 @@ cabal.mkDerivation (self: {
unorderedContainers vector
];
jailbreak = true;
+ patchPhase = ''
+ sed -i -e '/^import Data.Conduit (ResourceT)/d' Github/Private.hs
+ '';
meta = {
homepage = "https://github.com/fpco/github";
description = "Access to the Github API, v3";
diff --git a/pkgs/development/libraries/haskell/hakyll/default.nix b/pkgs/development/libraries/haskell/hakyll/default.nix
index cd051bd938c..5e40bb851f0 100644
--- a/pkgs/development/libraries/haskell/hakyll/default.nix
+++ b/pkgs/development/libraries/haskell/hakyll/default.nix
@@ -8,8 +8,8 @@
cabal.mkDerivation (self: {
pname = "hakyll";
- version = "4.5.0.0";
- sha256 = "19rmib508zcaada7xj0p84dbkjwzfiaxaszpmc763wlpx15azw8z";
+ version = "4.5.1.0";
+ sha256 = "0p78wscz9gwg1as49wjl49ydzbv972w6wmbmvhw1rfb9d5xana1i";
isLibrary = true;
isExecutable = true;
buildDepends = [
diff --git a/pkgs/development/libraries/haskell/hashed-storage/default.nix b/pkgs/development/libraries/haskell/hashed-storage/default.nix
index 77a4251259d..e2a82e13b3e 100644
--- a/pkgs/development/libraries/haskell/hashed-storage/default.nix
+++ b/pkgs/development/libraries/haskell/hashed-storage/default.nix
@@ -4,8 +4,8 @@
cabal.mkDerivation (self: {
pname = "hashed-storage";
- version = "0.5.10";
- sha256 = "1k7drnk0y5apjvwsiw85032yvxllbi7ndg6h9x207gnjxm64m0h5";
+ version = "0.5.11";
+ sha256 = "0s8mnayxlvwrrii2l63b372yi5g08br6gpbgz2256d8y128mwjvk";
isLibrary = true;
isExecutable = true;
buildDepends = [
diff --git a/pkgs/development/libraries/haskell/haskell-platform/2013.2.0.0.nix b/pkgs/development/libraries/haskell/haskell-platform/2013.2.0.0.nix
index 2e0181bd1a7..f209c39d438 100644
--- a/pkgs/development/libraries/haskell/haskell-platform/2013.2.0.0.nix
+++ b/pkgs/development/libraries/haskell/haskell-platform/2013.2.0.0.nix
@@ -30,6 +30,7 @@ cabal.mkDerivation (self : {
cp ${self.cabalFile} $sourceRoot/${self.pname}.cabal
cp ${self.setupFile} $sourceRoot/Setup.hs
touch $sourceRoot/LICENSE
+ sed -i -e 's|hashable *==1.1.2.5,|hashable,|' $sourceRoot/${self.pname}.cabal
'';
noHaddock = true;
meta = {
diff --git a/pkgs/development/libraries/haskell/haskell-src/1.0.1.6.nix b/pkgs/development/libraries/haskell/haskell-src/1.0.1.6.nix
new file mode 100644
index 00000000000..9e78f2800a7
--- /dev/null
+++ b/pkgs/development/libraries/haskell/haskell-src/1.0.1.6.nix
@@ -0,0 +1,15 @@
+{ cabal, happy, syb }:
+
+cabal.mkDerivation (self: {
+ pname = "haskell-src";
+ version = "1.0.1.6";
+ sha256 = "1vscvbsly7k0zqb7fi6bm38dfacyl8qgmv0h25fqkn95c0v5dif7";
+ buildDepends = [ syb ];
+ buildTools = [ happy ];
+ meta = {
+ description = "Support for manipulating Haskell source code";
+ license = self.stdenv.lib.licenses.bsd3;
+ platforms = self.ghc.meta.platforms;
+ maintainers = [ self.stdenv.lib.maintainers.andres ];
+ };
+})
diff --git a/pkgs/development/libraries/haskell/hfsevents/default.nix b/pkgs/development/libraries/haskell/hfsevents/default.nix
new file mode 100644
index 00000000000..624420fb0ca
--- /dev/null
+++ b/pkgs/development/libraries/haskell/hfsevents/default.nix
@@ -0,0 +1,16 @@
+{ cabal, cereal, mtl, text, gccApple }:
+
+cabal.mkDerivation (self: {
+ pname = "hfsevents";
+ version = "0.1.5";
+ sha256 = "0hp9jjj59smfcs51d9zjhyvgdbn46l0rl0jr98wbzg3qya0vwj5k";
+ buildDepends = [ cereal mtl text ];
+ buildTools = [ gccApple ];
+ configureFlags = "--ghc-option=-pgmc=${gccApple}/bin/gcc";
+ meta = {
+ homepage = "http://github.com/luite/hfsevents";
+ description = "File/folder watching for OS X";
+ license = self.stdenv.lib.licenses.bsd3;
+ platforms = self.stdenv.lib.platforms.darwin;
+ };
+})
diff --git a/pkgs/development/libraries/haskell/hint/default.nix b/pkgs/development/libraries/haskell/hint/default.nix
index 5534c2fc9da..09fdfe232a6 100644
--- a/pkgs/development/libraries/haskell/hint/default.nix
+++ b/pkgs/development/libraries/haskell/hint/default.nix
@@ -4,8 +4,8 @@
cabal.mkDerivation (self: {
pname = "hint";
- version = "0.4.0.0";
- sha256 = "0xs56ws7vwdjgvg7d31iqa111342an6rxvwhh7c3h4z1bq5l1l61";
+ version = "0.4.1.0";
+ sha256 = "1hc66yfzg9jrm5h3hd52rm4ca8ha0j93rhjpjh6hhzr4a40jv0pl";
buildDepends = [
exceptions extensibleExceptions filepath ghcMtl ghcPaths mtl random
utf8String
diff --git a/pkgs/development/libraries/haskell/hledger-web/build-fix.patch b/pkgs/development/libraries/haskell/hledger-web/build-fix.patch
new file mode 100644
index 00000000000..45862bf1679
--- /dev/null
+++ b/pkgs/development/libraries/haskell/hledger-web/build-fix.patch
@@ -0,0 +1,47 @@
+Only in hledger-web-0.22.4: dist
+diff -urw hledger-web-0.22.4-orig/Hledger/Web/Main.hs hledger-web-0.22.4/Hledger/Web/Main.hs
+--- hledger-web-0.22.4-orig/Hledger/Web/Main.hs 2014-04-07 13:00:41.168884350 +0200
++++ hledger-web-0.22.4/Hledger/Web/Main.hs 2014-04-07 13:14:46.584599468 +0200
+@@ -15,7 +15,8 @@
+ -- import Yesod.Default.Main (defaultMain)
+ import Settings -- (parseExtra)
+ import Application (makeApplication)
+-import Data.Conduit.Network (HostPreference(HostIPv4))
++import Data.String
++import Data.Conduit.Network
+ import Network.Wai.Handler.Warp (runSettings, defaultSettings, settingsPort)
+ import Network.Wai.Handler.Launch (runUrlPort)
+ --
+@@ -65,7 +66,7 @@
+ app <- makeApplication opts j' AppConfig{appEnv = Development
+ ,appPort = p
+ ,appRoot = pack u
+- ,appHost = HostIPv4
++ ,appHost = fromString "*4"
+ ,appExtra = Extra "" Nothing staticRoot
+ }
+ if server_ opts
+diff -urw hledger-web-0.22.4-orig/hledger-web.cabal hledger-web-0.22.4/hledger-web.cabal
+--- hledger-web-0.22.4-orig/hledger-web.cabal 2014-04-07 13:00:41.168884350 +0200
++++ hledger-web-0.22.4/hledger-web.cabal 2014-04-07 13:16:26.376772344 +0200
+@@ -128,7 +128,7 @@
+ , http-conduit
+ , http-client >= 0.2 && < 0.3
+ , HUnit
+- , network-conduit
++ , network-conduit, conduit-extra
+ , old-locale
+ , parsec
+ , regexpr >= 0.5.1
+@@ -220,7 +220,7 @@
+ , http-conduit
+ , http-client >= 0.2 && < 0.3
+ , HUnit
+- , network-conduit
++ , network-conduit, conduit-extra
+ , old-locale
+ , parsec
+ , regexpr >= 0.5.1
+Only in hledger-web-0.22.4: Setup
+Only in hledger-web-0.22.4: Setup.hi
+Only in hledger-web-0.22.4: Setup.o
diff --git a/pkgs/development/libraries/haskell/hledger-web/default.nix b/pkgs/development/libraries/haskell/hledger-web/default.nix
index eee84c338e6..58328ae9cf5 100644
--- a/pkgs/development/libraries/haskell/hledger-web/default.nix
+++ b/pkgs/development/libraries/haskell/hledger-web/default.nix
@@ -22,6 +22,7 @@ cabal.mkDerivation (self: {
testDepends = [ hspec yesod yesodTest ];
jailbreak = true;
doCheck = false;
+ patches = [ ./build-fix.patch ];
meta = {
homepage = "http://hledger.org";
description = "A web interface for the hledger accounting tool";
diff --git a/pkgs/development/libraries/haskell/hmatrix/default.nix b/pkgs/development/libraries/haskell/hmatrix/default.nix
index 51670f63973..bb0c48b9118 100644
--- a/pkgs/development/libraries/haskell/hmatrix/default.nix
+++ b/pkgs/development/libraries/haskell/hmatrix/default.nix
@@ -4,8 +4,8 @@
cabal.mkDerivation (self: {
pname = "hmatrix";
- version = "0.15.2.0";
- sha256 = "0rlgyqgl9x08f38nznbv50asbph0zp9dqk0l156hxz792590payl";
+ version = "0.15.2.1";
+ sha256 = "0pcs3dsxmaznsb82r71f4kf7xbwvj94cy1fmyya52nv3nldnk1jg";
buildDepends = [ binary deepseq random storableComplex vector ];
extraLibraries = [ blas gsl liblapack ];
meta = {
diff --git a/pkgs/development/libraries/haskell/hoogle/default.nix b/pkgs/development/libraries/haskell/hoogle/default.nix
index 53b037ec301..995a4ef5d9a 100644
--- a/pkgs/development/libraries/haskell/hoogle/default.nix
+++ b/pkgs/development/libraries/haskell/hoogle/default.nix
@@ -1,19 +1,19 @@
{ cabal, aeson, binary, blazeBuilder, Cabal, caseInsensitive
, cmdargs, conduit, deepseq, filepath, haskellSrcExts, httpTypes
-, parsec, QuickCheck, random, safe, shake, tagsoup, text, time
-, transformers, uniplate, vector, vectorAlgorithms, wai, warp
+, parsec, QuickCheck, random, resourcet, safe, shake, tagsoup, text
+, time, transformers, uniplate, vector, vectorAlgorithms, wai, warp
}:
cabal.mkDerivation (self: {
pname = "hoogle";
- version = "4.2.30";
- sha256 = "0vw0chqsq8wmi1mpdxj1c9g4ah7lqxm8rwh85j2vyp56vfscw9q1";
+ version = "4.2.31";
+ sha256 = "176lyj236ncq0lg7vbl4bbm1a98ficj82aranrhyxdjzmbk3i67x";
isLibrary = true;
isExecutable = true;
buildDepends = [
aeson binary blazeBuilder Cabal caseInsensitive cmdargs conduit
deepseq filepath haskellSrcExts httpTypes parsec QuickCheck random
- safe shake tagsoup text time transformers uniplate vector
+ resourcet safe shake tagsoup text time transformers uniplate vector
vectorAlgorithms wai warp
];
testDepends = [ filepath ];
diff --git a/pkgs/development/libraries/haskell/hspec-meta/default.nix b/pkgs/development/libraries/haskell/hspec-meta/default.nix
index 28edba11cac..c522dc9f968 100644
--- a/pkgs/development/libraries/haskell/hspec-meta/default.nix
+++ b/pkgs/development/libraries/haskell/hspec-meta/default.nix
@@ -5,8 +5,8 @@
cabal.mkDerivation (self: {
pname = "hspec-meta";
- version = "1.9.0";
- sha256 = "1jvx748aay8ln23p382y03gk6hc19f3z62za4326i0d3cyapfqdv";
+ version = "1.9.2";
+ sha256 = "0df54njh3i2gq10rkibqaq36xzv16pd2pp18wy28w6x5xff5hvm5";
isLibrary = true;
isExecutable = true;
buildDepends = [
diff --git a/pkgs/development/libraries/haskell/hspec/default.nix b/pkgs/development/libraries/haskell/hspec/default.nix
index 0c41ab471f8..8d316caf4c8 100644
--- a/pkgs/development/libraries/haskell/hspec/default.nix
+++ b/pkgs/development/libraries/haskell/hspec/default.nix
@@ -5,8 +5,8 @@
cabal.mkDerivation (self: {
pname = "hspec";
- version = "1.9.0";
- sha256 = "01nwxx63l9cl1smld7pwm59k6shs865iiy1jqwi97lkhzhy9cvhl";
+ version = "1.9.2";
+ sha256 = "0q8a1n03d70l86l2yy98j180xbnfq0ijgcf5llv439b65lc4zcyf";
isLibrary = true;
isExecutable = true;
buildDepends = [
diff --git a/pkgs/development/libraries/haskell/http-client-conduit/default.nix b/pkgs/development/libraries/haskell/http-client-conduit/default.nix
index 1c47b68f06c..019136e47ca 100644
--- a/pkgs/development/libraries/haskell/http-client-conduit/default.nix
+++ b/pkgs/development/libraries/haskell/http-client-conduit/default.nix
@@ -1,13 +1,14 @@
-{ cabal, conduit, httpClient, resourcet, transformers }:
+{ cabal, httpClient }:
cabal.mkDerivation (self: {
pname = "http-client-conduit";
- version = "0.2.0.1";
- sha256 = "0fy9vkxh7hvmp9ijifq8nx6y5y92n6d3s1vdyg53ln65pclc6jn5";
- buildDepends = [ conduit httpClient resourcet transformers ];
+ version = "0.3.0";
+ sha256 = "0k2vq9y7kfbkhcsszjr74ahq5nw5z7dbzjhw1ixbigcr56axsd19";
+ buildDepends = [ httpClient ];
+ noHaddock = true;
meta = {
homepage = "https://github.com/snoyberg/http-client";
- description = "Frontend support for using http-client with conduit";
+ description = "Frontend support for using http-client with conduit (deprecated)";
license = self.stdenv.lib.licenses.mit;
platforms = self.ghc.meta.platforms;
};
diff --git a/pkgs/development/libraries/haskell/http-client-multipart/default.nix b/pkgs/development/libraries/haskell/http-client-multipart/default.nix
index 068efdcb543..9cad23a7999 100644
--- a/pkgs/development/libraries/haskell/http-client-multipart/default.nix
+++ b/pkgs/development/libraries/haskell/http-client-multipart/default.nix
@@ -1,18 +1,14 @@
-{ cabal, blazeBuilder, filepath, httpClient, httpTypes, mimeTypes
-, random, text, transformers
-}:
+{ cabal, httpClient }:
cabal.mkDerivation (self: {
pname = "http-client-multipart";
- version = "0.2.0.0";
- sha256 = "1bahkysh771p3mrfan1gmm6jyx62w3k57ba4rsnx7h1gwbilm878";
- buildDepends = [
- blazeBuilder filepath httpClient httpTypes mimeTypes random text
- transformers
- ];
+ version = "0.3.0.0";
+ sha256 = "18za6s3658hgm95rrygghrz0b643c7nkzaimb14v2hv82w3k9crg";
+ buildDepends = [ httpClient ];
+ noHaddock = true;
meta = {
homepage = "https://github.com/snoyberg/http-client";
- description = "Generate multipart uploads for http-client";
+ description = "Generate multipart uploads for http-client. (deprecated)";
license = self.stdenv.lib.licenses.mit;
platforms = self.ghc.meta.platforms;
};
diff --git a/pkgs/development/libraries/haskell/http-client/default.nix b/pkgs/development/libraries/haskell/http-client/default.nix
index 7ebdd3cee6a..8816ec91a83 100644
--- a/pkgs/development/libraries/haskell/http-client/default.nix
+++ b/pkgs/development/libraries/haskell/http-client/default.nix
@@ -1,22 +1,22 @@
-{ cabal, base64Bytestring, blazeBuilder, caseInsensitive, cookie
-, dataDefaultClass, deepseq, failure, hspec, httpTypes
-, monadControl, network, publicsuffixlist, text, time, transformers
-, zlib, zlibBindings
+{ cabal, async, base64Bytestring, blazeBuilder, caseInsensitive
+, cookie, dataDefaultClass, deepseq, exceptions, filepath, hspec
+, httpTypes, mimeTypes, monadControl, network, publicsuffixlist
+, random, streamingCommons, text, time, transformers, zlib
}:
cabal.mkDerivation (self: {
pname = "http-client";
- version = "0.2.2.4";
- sha256 = "19dymsi39m2m7i99xsmcl9gigqm6jhynnv0w8w230mq8vraq1mcw";
+ version = "0.3.0.2";
+ sha256 = "1r858ml809c21q9q2kv0105y89cizncxym9mf1f0f165aa2hx71m";
buildDepends = [
base64Bytestring blazeBuilder caseInsensitive cookie
- dataDefaultClass deepseq failure httpTypes network publicsuffixlist
- text time transformers zlibBindings
+ dataDefaultClass deepseq exceptions filepath httpTypes mimeTypes
+ network publicsuffixlist random streamingCommons text time
+ transformers
];
testDepends = [
- base64Bytestring blazeBuilder caseInsensitive deepseq failure hspec
+ async base64Bytestring blazeBuilder caseInsensitive deepseq hspec
httpTypes monadControl network text time transformers zlib
- zlibBindings
];
doCheck = false;
meta = {
diff --git a/pkgs/development/libraries/haskell/http-conduit/default.nix b/pkgs/development/libraries/haskell/http-conduit/default.nix
index 398459f6076..1ea6ebafd8c 100644
--- a/pkgs/development/libraries/haskell/http-conduit/default.nix
+++ b/pkgs/development/libraries/haskell/http-conduit/default.nix
@@ -1,22 +1,22 @@
-{ cabal, blazeBuilder, caseInsensitive, conduit, connection, cookie
-, dataDefaultClass, hspec, httpClient, httpClientConduit
-, httpClientMultipart, httpClientTls, httpTypes, HUnit, liftedBase
-, network, networkConduit, resourcet, text, time, transformers
-, utf8String, wai, warp, warpTls
+{ cabal, blazeBuilder, caseInsensitive, conduit, conduitExtra
+, connection, cookie, dataDefaultClass, hspec, httpClient
+, httpClientTls, httpTypes, HUnit, liftedBase, monadControl, mtl
+, network, networkConduit, resourcet, streamingCommons, text, time
+, transformers, utf8String, wai, warp, warpTls
}:
cabal.mkDerivation (self: {
pname = "http-conduit";
- version = "2.0.0.8";
- sha256 = "1yralv1nalvdpgamnbjl8xm4lrx22m3v6jancrzisq38a680q96b";
+ version = "2.1.0";
+ sha256 = "1qlqhrrc130c8wvgbbbkb7qrm8gp48gkv5xanqgb26amvny98gsv";
buildDepends = [
- conduit httpClient httpClientConduit httpClientTls httpTypes
- liftedBase resourcet transformers
+ conduit httpClient httpClientTls httpTypes liftedBase monadControl
+ mtl resourcet transformers
];
testDepends = [
- blazeBuilder caseInsensitive conduit connection cookie
- dataDefaultClass hspec httpClient httpClientMultipart httpTypes
- HUnit liftedBase network networkConduit text time transformers
+ blazeBuilder caseInsensitive conduit conduitExtra connection cookie
+ dataDefaultClass hspec httpClient httpTypes HUnit liftedBase
+ network networkConduit streamingCommons text time transformers
utf8String wai warp warpTls
];
doCheck = false;
diff --git a/pkgs/development/libraries/haskell/http-reverse-proxy/default.nix b/pkgs/development/libraries/haskell/http-reverse-proxy/default.nix
index 957dbe02006..ff47ba14241 100644
--- a/pkgs/development/libraries/haskell/http-reverse-proxy/default.nix
+++ b/pkgs/development/libraries/haskell/http-reverse-proxy/default.nix
@@ -7,8 +7,8 @@
cabal.mkDerivation (self: {
pname = "http-reverse-proxy";
- version = "0.3.1.4";
- sha256 = "0j7k6njyp3qss08gja5p62zvqxdh7bpqfbzvkm23gdv8v1bgh5h6";
+ version = "0.3.1.5";
+ sha256 = "0rzwh5ph23592qycriam932bgb6q2nvjr7wayqz0sjvvxv661bk0";
buildDepends = [
async blazeBuilder caseInsensitive conduit conduitExtra
dataDefaultClass httpClient httpTypes liftedBase monadControl
@@ -16,8 +16,9 @@ cabal.mkDerivation (self: {
wai waiLogger word8
];
testDepends = [
- blazeBuilder conduit hspec httpConduit httpTypes liftedBase network
- networkConduit transformers wai warp
+ blazeBuilder conduit conduitExtra hspec httpConduit httpTypes
+ liftedBase network networkConduit resourcet streamingCommons
+ transformers wai warp
];
doCheck = false;
meta = {
diff --git a/pkgs/development/libraries/haskell/http-types/default.nix b/pkgs/development/libraries/haskell/http-types/default.nix
index ab523e07cf2..a3fa1c8c9ee 100644
--- a/pkgs/development/libraries/haskell/http-types/default.nix
+++ b/pkgs/development/libraries/haskell/http-types/default.nix
@@ -2,8 +2,8 @@
cabal.mkDerivation (self: {
pname = "http-types";
- version = "0.8.3";
- sha256 = "02l1lhl2ajbm5f7zq363nlb21dpdg1m0qsy330arccmds7z9g7a2";
+ version = "0.8.4";
+ sha256 = "0bz7g537if863vk29z72hndf1x019dj7shj1aa77pssrxma3a685";
buildDepends = [ blazeBuilder caseInsensitive text ];
testDepends = [ blazeBuilder hspec QuickCheck text ];
jailbreak = true;
diff --git a/pkgs/development/libraries/haskell/hxt-http/default.nix b/pkgs/development/libraries/haskell/hxt-http/default.nix
new file mode 100644
index 00000000000..14867df7fc1
--- /dev/null
+++ b/pkgs/development/libraries/haskell/hxt-http/default.nix
@@ -0,0 +1,14 @@
+{ cabal, HTTP, hxt, network, parsec }:
+
+cabal.mkDerivation (self: {
+ pname = "hxt-http";
+ version = "9.1.4";
+ sha256 = "176k71dc30cnjjr9y9vphs0aixs3ww16197qyc491qjrzhymm2g2";
+ buildDepends = [ HTTP hxt network parsec ];
+ meta = {
+ homepage = "http://www.fh-wedel.de/~si/HXmlToolbox/index.html";
+ description = "Interface to native Haskell HTTP package HTTP";
+ license = self.stdenv.lib.licenses.mit;
+ platforms = self.ghc.meta.platforms;
+ };
+})
diff --git a/pkgs/development/libraries/haskell/hxt-unicode/default.nix b/pkgs/development/libraries/haskell/hxt-unicode/default.nix
index fbe402cea5f..55017c4193e 100644
--- a/pkgs/development/libraries/haskell/hxt-unicode/default.nix
+++ b/pkgs/development/libraries/haskell/hxt-unicode/default.nix
@@ -2,8 +2,8 @@
cabal.mkDerivation (self: {
pname = "hxt-unicode";
- version = "9.0.2.1";
- sha256 = "1ng3qaiwkaav1kmf0yxkm44887xphbx6slva3fskzx0sgkd1v0vp";
+ version = "9.0.2.2";
+ sha256 = "1iljbk7f7d4wkl592bp0vw807683sqdxfnigindkrvr9p1xvwg8r";
buildDepends = [ hxtCharproperties ];
meta = {
homepage = "http://www.fh-wedel.de/~si/HXmlToolbox/index.html";
diff --git a/pkgs/development/libraries/haskell/hxt-xpath/default.nix b/pkgs/development/libraries/haskell/hxt-xpath/default.nix
new file mode 100644
index 00000000000..73e350bd77b
--- /dev/null
+++ b/pkgs/development/libraries/haskell/hxt-xpath/default.nix
@@ -0,0 +1,14 @@
+{ cabal, filepath, hxt, parsec }:
+
+cabal.mkDerivation (self: {
+ pname = "hxt-xpath";
+ version = "9.1.2.1";
+ sha256 = "0r9xzxwdqaj0arz9pv6f272dz73m83agbln9q9bclmgqys6l0kr9";
+ buildDepends = [ filepath hxt parsec ];
+ meta = {
+ homepage = "http://www.fh-wedel.de/~si/HXmlToolbox/index.html";
+ description = "The XPath modules for HXT";
+ license = "unknown";
+ platforms = self.ghc.meta.platforms;
+ };
+})
diff --git a/pkgs/development/libraries/haskell/hxt/default.nix b/pkgs/development/libraries/haskell/hxt/default.nix
index 820a6549d34..440be70a60b 100644
--- a/pkgs/development/libraries/haskell/hxt/default.nix
+++ b/pkgs/development/libraries/haskell/hxt/default.nix
@@ -4,8 +4,8 @@
cabal.mkDerivation (self: {
pname = "hxt";
- version = "9.3.1.3";
- sha256 = "1ynca1d0wzql3vny9wxi47bim64h1l56gdamwkfhh4snajqkamwd";
+ version = "9.3.1.4";
+ sha256 = "0klngcnq5rdhpwim2znzcljhqw8k3x7c91bgb16g008zp3lay1rf";
buildDepends = [
binary deepseq filepath HUnit hxtCharproperties hxtRegexXmlschema
hxtUnicode mtl network parsec
diff --git a/pkgs/development/libraries/haskell/intervals/default.nix b/pkgs/development/libraries/haskell/intervals/default.nix
index 88a001afadd..73e1d2d7197 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.4.2";
- sha256 = "08l7q22rlhyigls1qksf7lnb7g1yrkmdh9clq68xxaf6wzm26aaz";
+ version = "0.7";
+ sha256 = "00kwq57x72xi5kca7symb98nzs1j82r6bkgvr83aqpvq0ql9ka9d";
buildDepends = [ distributive ];
testDepends = [ doctest filepath ];
meta = {
diff --git a/pkgs/development/libraries/haskell/ipprint/default.nix b/pkgs/development/libraries/haskell/ipprint/default.nix
new file mode 100644
index 00000000000..e648ae19c3d
--- /dev/null
+++ b/pkgs/development/libraries/haskell/ipprint/default.nix
@@ -0,0 +1,13 @@
+{ cabal, Extra, haskellSrc }:
+
+cabal.mkDerivation (self: {
+ pname = "ipprint";
+ version = "0.5";
+ sha256 = "0h75k21blbnzvp5l20qsima557dx6zfrww79y7qsqf04pbd81j7s";
+ buildDepends = [ Extra haskellSrc ];
+ meta = {
+ description = "Tiny helper for pretty-printing values in ghci console";
+ license = self.stdenv.lib.licenses.bsd3;
+ platforms = self.ghc.meta.platforms;
+ };
+})
diff --git a/pkgs/development/libraries/haskell/language-c-inline/default.nix b/pkgs/development/libraries/haskell/language-c-inline/default.nix
new file mode 100644
index 00000000000..58c3e37c853
--- /dev/null
+++ b/pkgs/development/libraries/haskell/language-c-inline/default.nix
@@ -0,0 +1,16 @@
+{ cabal, filepath, languageCQuote, mainlandPretty }:
+
+cabal.mkDerivation (self: {
+ pname = "language-c-inline";
+ version = "0.3.0.1";
+ sha256 = "0dw1fqwg9hhwgvak0ykhafbxp4gnb2ww9lc83m8kzkyzn1ccb6hg";
+ buildDepends = [ filepath languageCQuote mainlandPretty ];
+ testDepends = [ languageCQuote ];
+ doCheck = false;
+ meta = {
+ homepage = "https://github.com/mchakravarty/language-c-inline/";
+ description = "Inline C & Objective-C code in Haskell for language interoperability";
+ license = self.stdenv.lib.licenses.bsd3;
+ platforms = self.ghc.meta.platforms;
+ };
+})
diff --git a/pkgs/development/libraries/haskell/language-c/default.nix b/pkgs/development/libraries/haskell/language-c/default.nix
index c415e3a2b93..188ca99a5be 100644
--- a/pkgs/development/libraries/haskell/language-c/default.nix
+++ b/pkgs/development/libraries/haskell/language-c/default.nix
@@ -2,8 +2,8 @@
cabal.mkDerivation (self: {
pname = "language-c";
- version = "0.4.3";
- sha256 = "0y5yn0jaairqixxqx7c80z5y5mc6czshps7wghjci1s39mn9cjf6";
+ version = "0.4.4";
+ sha256 = "0pfadijrcfvxvdrwk8n54pqvpmi4qa5w7s0l9shxbkvpj0dmnp50";
buildDepends = [ filepath syb ];
buildTools = [ alex happy ];
meta = {
diff --git a/pkgs/development/libraries/haskell/language-ecmascript/default.nix b/pkgs/development/libraries/haskell/language-ecmascript/default.nix
index 79404ffbcf0..1a53881fd29 100644
--- a/pkgs/development/libraries/haskell/language-ecmascript/default.nix
+++ b/pkgs/development/libraries/haskell/language-ecmascript/default.nix
@@ -5,8 +5,8 @@
cabal.mkDerivation (self: {
pname = "language-ecmascript";
- version = "0.16";
- sha256 = "1gz0089llxfmq9v2j5hp85h7w2vw50sgbl6dcd7i0s8m5zd3dmqg";
+ version = "0.16.1";
+ sha256 = "0pqb1r60jjmiwk9giaxnrp9a07h4a97kp6g0nznwpdy32x849gx3";
buildDepends = [
dataDefaultClass Diff mtl parsec QuickCheck testingFeat uniplate
wlPprint
diff --git a/pkgs/development/libraries/haskell/language-javascript/default.nix b/pkgs/development/libraries/haskell/language-javascript/default.nix
index 94d693aa7c8..647c3be498d 100644
--- a/pkgs/development/libraries/haskell/language-javascript/default.nix
+++ b/pkgs/development/libraries/haskell/language-javascript/default.nix
@@ -1,18 +1,17 @@
-{ cabal, blazeBuilder, Cabal, happy, HUnit, mtl, QuickCheck
-, testFramework, testFrameworkHunit, utf8Light, utf8String, alex
+{ cabal, alex, blazeBuilder, Cabal, happy, HUnit, mtl, QuickCheck
+, testFramework, testFrameworkHunit, utf8Light, utf8String
}:
cabal.mkDerivation (self: {
pname = "language-javascript";
- version = "0.5.9";
- sha256 = "1m1fs2vaw3yn9ryd49aprxc5l10xkr86mlxxf5bk6qp51wnp9xqh";
- buildDepends = [ blazeBuilder mtl utf8Light utf8String ];
+ version = "0.5.12";
+ sha256 = "1zzgjxqgfl6k2z4cwh0961ipfc5fminfdg2162g45h2nrv63mq05";
+ buildDepends = [ blazeBuilder mtl utf8String ];
testDepends = [
blazeBuilder Cabal HUnit mtl QuickCheck testFramework
testFrameworkHunit utf8Light utf8String
];
- buildTools = [ happy alex ];
- preConfigure = "rm -rv dist; $SHELL runalex.sh";
+ buildTools = [ alex happy ];
meta = {
homepage = "http://github.com/alanz/language-javascript";
description = "Parser for JavaScript";
diff --git a/pkgs/development/libraries/haskell/lens-aeson/default.nix b/pkgs/development/libraries/haskell/lens-aeson/default.nix
deleted file mode 100644
index 7ea890a5eb3..00000000000
--- a/pkgs/development/libraries/haskell/lens-aeson/default.nix
+++ /dev/null
@@ -1,23 +0,0 @@
-{ cabal, aeson, attoparsec, doctest, filepath, genericDeriving
-, lens, semigroups, simpleReflect, text, unorderedContainers
-, utf8String, vector
-}:
-
-cabal.mkDerivation (self: {
- pname = "lens-aeson";
- version = "0.1.2";
- sha256 = "1h0w8p227r8gzvgqjl210i0z7xxv3435vwyi3j7vkm7a05cdk03l";
- buildDepends = [
- aeson attoparsec lens text unorderedContainers utf8String vector
- ];
- testDepends = [
- doctest filepath genericDeriving semigroups simpleReflect
- ];
- meta = {
- homepage = "http://github.com/lens/lens-aeson/";
- description = "Law-abiding lenses for aeson";
- license = self.stdenv.lib.licenses.bsd3;
- platforms = self.ghc.meta.platforms;
- maintainers = [ self.stdenv.lib.maintainers.ocharles ];
- };
-})
diff --git a/pkgs/development/libraries/haskell/lens-datetime/default.nix b/pkgs/development/libraries/haskell/lens-datetime/default.nix
index 2de451f4177..72781f39cdb 100644
--- a/pkgs/development/libraries/haskell/lens-datetime/default.nix
+++ b/pkgs/development/libraries/haskell/lens-datetime/default.nix
@@ -2,11 +2,11 @@
cabal.mkDerivation (self: {
pname = "lens-datetime";
- version = "0.2";
- sha256 = "0wrs7alz1zfg1xrg04lhz01mrd1gcz2xr8b5mxfdvq94f5m87sdr";
+ version = "0.2.1";
+ sha256 = "1wqks7ynw3njlizdd9hvgrc1xjxcgcfck9ppj1lgg8wr3l2myi72";
buildDepends = [ lens time ];
meta = {
- homepage = "http://github.com/klao/lens-datetime";
+ homepage = "http://github.com/nilcons/lens-datetime";
description = "Lenses for Data.Time.* types";
license = self.stdenv.lib.licenses.bsd3;
platforms = self.ghc.meta.platforms;
diff --git a/pkgs/development/libraries/haskell/libjenkins/default.nix b/pkgs/development/libraries/haskell/libjenkins/default.nix
index 722e280c6e5..67f0b698d47 100644
--- a/pkgs/development/libraries/haskell/libjenkins/default.nix
+++ b/pkgs/development/libraries/haskell/libjenkins/default.nix
@@ -7,6 +7,7 @@ cabal.mkDerivation (self: {
pname = "libjenkins";
version = "0.4.2.0";
sha256 = "11013klk2gvcaf2d2gmi0bf3jg2m82li19szqlwb325kdjmdf546";
+ patches = [ ./new-conduit.patch ];
buildDepends = [
async conduit free httpClient httpConduit httpTypes lens
monadControl network text transformers xmlConduit
@@ -17,6 +18,7 @@ cabal.mkDerivation (self: {
transformers xmlConduit
];
doCheck = false;
+ jailbreak = true;
meta = {
description = "Jenkins API interface";
license = self.stdenv.lib.licenses.bsd3;
diff --git a/pkgs/development/libraries/haskell/libjenkins/new-conduit.patch b/pkgs/development/libraries/haskell/libjenkins/new-conduit.patch
new file mode 100644
index 00000000000..fda68fde5f9
--- /dev/null
+++ b/pkgs/development/libraries/haskell/libjenkins/new-conduit.patch
@@ -0,0 +1,23 @@
+diff -Naur libjenkins-0.4.2.0-orig/libjenkins.cabal libjenkins-0.4.2.0/libjenkins.cabal
+--- libjenkins-0.4.2.0-orig/libjenkins.cabal 2014-02-17 13:11:22.000000000 -0500
++++ libjenkins-0.4.2.0/libjenkins.cabal 2014-04-07 11:40:30.046473593 -0400
+@@ -52,6 +52,7 @@
+ , text >= 0.11
+ , transformers >= 0.3
+ , xml-conduit >= 1.1
++ , resourcet
+
+ test-suite doctest
+ default-language: Haskell2010
+diff -Naur libjenkins-0.4.2.0-orig/src/Jenkins/Rest/Internal.hs libjenkins-0.4.2.0/src/Jenkins/Rest/Internal.hs
+--- libjenkins-0.4.2.0-orig/src/Jenkins/Rest/Internal.hs 2014-02-17 13:11:22.000000000 -0500
++++ libjenkins-0.4.2.0/src/Jenkins/Rest/Internal.hs 2014-04-07 11:40:02.221415450 -0400
+@@ -22,7 +22,7 @@
+ import Control.Monad.Trans.Reader (ReaderT, runReaderT, ask, local)
+ import Control.Monad.Trans.Maybe (MaybeT(..), mapMaybeT)
+ import Data.ByteString.Lazy (ByteString)
+-import Data.Conduit (ResourceT)
++import Control.Monad.Trans.Resource (ResourceT)
+ import Data.Data (Data, Typeable)
+ import Data.Text (Text)
+ import qualified Data.Text.Encoding as Text
diff --git a/pkgs/development/libraries/haskell/logging/default.nix b/pkgs/development/libraries/haskell/logging/default.nix
new file mode 100644
index 00000000000..7cfcf147957
--- /dev/null
+++ b/pkgs/development/libraries/haskell/logging/default.nix
@@ -0,0 +1,19 @@
+{ cabal, binary, fastLogger, hspec, liftedBase, monadControl
+, monadLogger, pcreLight, text, time, transformers, vectorSpace
+}:
+
+cabal.mkDerivation (self: {
+ pname = "logging";
+ version = "1.4.0";
+ sha256 = "0xkk6j9wa5n0qg0wp7a9bwaz328hrjk1fwanpa515hh3gvz62g94";
+ buildDepends = [
+ binary fastLogger liftedBase monadControl monadLogger pcreLight
+ text time transformers vectorSpace
+ ];
+ testDepends = [ hspec monadLogger ];
+ meta = {
+ description = "Simplified logging in IO for application writers";
+ license = self.stdenv.lib.licenses.mit;
+ platforms = self.ghc.meta.platforms;
+ };
+})
diff --git a/pkgs/development/libraries/haskell/math-functions/default.nix b/pkgs/development/libraries/haskell/math-functions/default.nix
index 7faca58fd85..b14449626c8 100644
--- a/pkgs/development/libraries/haskell/math-functions/default.nix
+++ b/pkgs/development/libraries/haskell/math-functions/default.nix
@@ -12,6 +12,7 @@ cabal.mkDerivation (self: {
HUnit ieee754 QuickCheck testFramework testFrameworkHunit
testFrameworkQuickcheck2 vector
];
+ doCheck = false;
meta = {
homepage = "https://github.com/bos/math-functions";
description = "Special functions and Chebyshev polynomials";
diff --git a/pkgs/development/libraries/haskell/mime-mail/default.nix b/pkgs/development/libraries/haskell/mime-mail/default.nix
index 7ba50976168..80fc8e1b4af 100644
--- a/pkgs/development/libraries/haskell/mime-mail/default.nix
+++ b/pkgs/development/libraries/haskell/mime-mail/default.nix
@@ -1,16 +1,16 @@
{ cabal, base64Bytestring, blazeBuilder, filepath, hspec, random
-, text, sendmail ? "sendmail"
+, sendmail ? "sendmail", text
}:
cabal.mkDerivation (self: {
pname = "mime-mail";
- version = "0.4.4.2";
- sha256 = "0s38xgv6kycnfahqi5dnrjn3wkaq35w87cv8p12pq0qq2x7dvawd";
+ version = "0.4.5.1";
+ sha256 = "01r6dxdp3183ahggda6dizdz1c3qpmpyxn6csalzvss52ds4ilsf";
buildDepends = [
base64Bytestring blazeBuilder filepath random text
];
testDepends = [ blazeBuilder hspec text ];
- configureFlags = [ "--ghc-option=-DMIME_MAIL_SENDMAIL_PATH=\"${sendmail}\"" ];
+ configureFlags = "--ghc-option=-DMIME_MAIL_SENDMAIL_PATH=\"${sendmail}\"";
meta = {
homepage = "http://github.com/snoyberg/mime-mail";
description = "Compose MIME email messages";
diff --git a/pkgs/development/libraries/haskell/mime-types/default.nix b/pkgs/development/libraries/haskell/mime-types/default.nix
index 5dd5f65c9e7..50c25ada340 100644
--- a/pkgs/development/libraries/haskell/mime-types/default.nix
+++ b/pkgs/development/libraries/haskell/mime-types/default.nix
@@ -2,8 +2,8 @@
cabal.mkDerivation (self: {
pname = "mime-types";
- version = "0.1.0.3";
- sha256 = "0mzhkqcjlnrs9mwn2crsr1m2mf6pgygs1s3ks8akz1618v6jm6y1";
+ version = "0.1.0.4";
+ sha256 = "0bxhkwz8p7mhg5kspbpc5zm4k50pc0r5pzjr6807y88x8vjpvj2x";
buildDepends = [ text ];
meta = {
homepage = "https://github.com/yesodweb/wai";
diff --git a/pkgs/development/libraries/haskell/missing-foreign/default.nix b/pkgs/development/libraries/haskell/missing-foreign/default.nix
new file mode 100644
index 00000000000..9ffbc37468a
--- /dev/null
+++ b/pkgs/development/libraries/haskell/missing-foreign/default.nix
@@ -0,0 +1,12 @@
+{ cabal }:
+
+cabal.mkDerivation (self: {
+ pname = "missing-foreign";
+ version = "0.1.1";
+ sha256 = "11f8pknbarlj956nmalqhd2v704z7d7xbi61hs1q8vb2p36kc6wy";
+ meta = {
+ description = "Convenience functions for FFI work";
+ license = self.stdenv.lib.licenses.bsd3;
+ platforms = self.ghc.meta.platforms;
+ };
+})
diff --git a/pkgs/development/libraries/haskell/monad-extras/default.nix b/pkgs/development/libraries/haskell/monad-extras/default.nix
new file mode 100644
index 00000000000..9a66c5ab983
--- /dev/null
+++ b/pkgs/development/libraries/haskell/monad-extras/default.nix
@@ -0,0 +1,17 @@
+{ cabal, mmorph, monadControl, stm, transformers, transformersBase
+}:
+
+cabal.mkDerivation (self: {
+ pname = "monad-extras";
+ version = "0.5.7";
+ sha256 = "0dqj3n3ki679b6z5y7qw084chbahlqmj2vgj7yx0v552bl0ylzyj";
+ buildDepends = [
+ mmorph monadControl stm transformers transformersBase
+ ];
+ meta = {
+ homepage = "http://github.com/jwiegley/monad-extras";
+ description = "Extra utility functions for working with monads";
+ license = self.stdenv.lib.licenses.bsd3;
+ platforms = self.ghc.meta.platforms;
+ };
+})
diff --git a/pkgs/development/libraries/haskell/monad-logger/default.nix b/pkgs/development/libraries/haskell/monad-logger/default.nix
index 4aa394aff40..5468f4127fc 100644
--- a/pkgs/development/libraries/haskell/monad-logger/default.nix
+++ b/pkgs/development/libraries/haskell/monad-logger/default.nix
@@ -1,15 +1,16 @@
-{ cabal, blazeBuilder, conduit, fastLogger, liftedBase
-, monadControl, monadLoops, mtl, resourcet, stm, stmChans, text
-, transformers, transformersBase
+{ cabal, blazeBuilder, conduit, conduitExtra, exceptions
+, fastLogger, liftedBase, monadControl, monadLoops, mtl, resourcet
+, stm, stmChans, text, transformers, transformersBase
}:
cabal.mkDerivation (self: {
pname = "monad-logger";
- version = "0.3.4.1";
- sha256 = "1i5192060svqhc1iv215b98hah6p29bzdqin6ng5qpq8d44hdnpm";
+ version = "0.3.6";
+ sha256 = "0a3dbk3c1jv8zbxrb5vzf5ypwwzkamxd35rm8pjn13aqcnnznniq";
buildDepends = [
- blazeBuilder conduit fastLogger liftedBase monadControl monadLoops
- mtl resourcet stm stmChans text transformers transformersBase
+ blazeBuilder conduit conduitExtra exceptions fastLogger liftedBase
+ monadControl monadLoops mtl resourcet stm stmChans text
+ transformers transformersBase
];
meta = {
homepage = "https://github.com/kazu-yamamoto/logger";
diff --git a/pkgs/development/libraries/haskell/monoid-extras/default.nix b/pkgs/development/libraries/haskell/monoid-extras/default.nix
index 17df8cbeecc..b9987255c0f 100644
--- a/pkgs/development/libraries/haskell/monoid-extras/default.nix
+++ b/pkgs/development/libraries/haskell/monoid-extras/default.nix
@@ -2,8 +2,8 @@
cabal.mkDerivation (self: {
pname = "monoid-extras";
- version = "0.3.3.1";
- sha256 = "1176sazk10vapia1qvcm2rxckn2vxfav21277rsgf11hvn3lzznc";
+ version = "0.3.3.2";
+ sha256 = "0v4xir47ki83f9w2rii06w3jwrvqljnbiivgh6k8jxl0bdfslh11";
buildDepends = [ groups semigroupoids semigroups ];
jailbreak = true;
meta = {
diff --git a/pkgs/development/libraries/haskell/network-conduit-tls/default.nix b/pkgs/development/libraries/haskell/network-conduit-tls/default.nix
index 4884a462a6d..e4c5bb7ab6b 100644
--- a/pkgs/development/libraries/haskell/network-conduit-tls/default.nix
+++ b/pkgs/development/libraries/haskell/network-conduit-tls/default.nix
@@ -1,17 +1,18 @@
-{ cabal, conduit, connection, cprngAes, dataDefault, HUnit
-, monadControl, mtl, network, networkConduit, systemFileio
+{ cabal, conduit, conduitExtra, connection, cprngAes, dataDefault
+, HUnit, monadControl, mtl, network, streamingCommons, systemFileio
, systemFilepath, tls, transformers
}:
cabal.mkDerivation (self: {
pname = "network-conduit-tls";
- version = "1.0.4.2";
- sha256 = "1pgb6k6g10hy2k4sihj88n6w7400d4grja2crhhv1cydqdn858rc";
+ version = "1.1.0";
+ sha256 = "1q9wx7bvr4a65rkyfn2vd3h9bfpsvm9zcqqjhjsrgb91l6x5bdqi";
buildDepends = [
- conduit connection cprngAes dataDefault monadControl network
- networkConduit systemFileio systemFilepath tls transformers
+ conduit conduitExtra connection cprngAes dataDefault monadControl
+ network streamingCommons systemFileio systemFilepath tls
+ transformers
];
- testDepends = [ conduit connection HUnit mtl networkConduit ];
+ testDepends = [ conduit conduitExtra connection HUnit mtl ];
meta = {
homepage = "https://github.com/snoyberg/conduit";
description = "Create TLS-aware network code with conduits";
diff --git a/pkgs/development/libraries/haskell/network-conduit/default.nix b/pkgs/development/libraries/haskell/network-conduit/default.nix
index c2f00b68f8f..1f252c03660 100644
--- a/pkgs/development/libraries/haskell/network-conduit/default.nix
+++ b/pkgs/development/libraries/haskell/network-conduit/default.nix
@@ -1,17 +1,14 @@
-{ cabal, conduit, liftedBase, monadControl, network, transformers
-}:
+{ cabal, conduit }:
cabal.mkDerivation (self: {
pname = "network-conduit";
- version = "1.0.4";
- sha256 = "1a7p3gs0rczx0rhz27410rr6fzy3l0nsj6kk5wi0nqvqfyh7jb9c";
- buildDepends = [
- conduit liftedBase monadControl network transformers
- ];
- testDepends = [ conduit ];
+ version = "1.1.0";
+ sha256 = "06amxl8rg4zfnmgc1iyq5mxy9qihcqddqgqkbfvaf25mwr43992p";
+ buildDepends = [ conduit ];
+ noHaddock = true;
meta = {
homepage = "http://github.com/snoyberg/conduit";
- description = "Stream socket data using conduits";
+ description = "Stream socket data using conduits. (deprecated)";
license = self.stdenv.lib.licenses.bsd3;
platforms = self.ghc.meta.platforms;
maintainers = [ self.stdenv.lib.maintainers.andres ];
diff --git a/pkgs/development/libraries/haskell/network-simple/default.nix b/pkgs/development/libraries/haskell/network-simple/default.nix
index 72d8c8af8c8..cde31643c71 100644
--- a/pkgs/development/libraries/haskell/network-simple/default.nix
+++ b/pkgs/development/libraries/haskell/network-simple/default.nix
@@ -2,8 +2,8 @@
cabal.mkDerivation (self: {
pname = "network-simple";
- version = "0.3.0";
- sha256 = "046nbgdwazbqffcim1gxry1mf35yg41g52zdk86h9whhiwjzlywz";
+ version = "0.3.1";
+ sha256 = "0bk015d0np07887flah76vgrgrqaqj4x1sdxmghvazj8c78nkan8";
buildDepends = [ exceptions network transformers ];
meta = {
homepage = "https://github.com/k0001/network-simple";
diff --git a/pkgs/development/libraries/haskell/parsers/default.nix b/pkgs/development/libraries/haskell/parsers/0.10.3.nix
similarity index 100%
rename from pkgs/development/libraries/haskell/parsers/default.nix
rename to pkgs/development/libraries/haskell/parsers/0.10.3.nix
diff --git a/pkgs/development/libraries/haskell/parsers/0.11.nix b/pkgs/development/libraries/haskell/parsers/0.11.nix
new file mode 100644
index 00000000000..c5d91f167cc
--- /dev/null
+++ b/pkgs/development/libraries/haskell/parsers/0.11.nix
@@ -0,0 +1,19 @@
+{ cabal, attoparsec, charset, doctest, filepath, parsec, text
+, transformers, unorderedContainers
+}:
+
+cabal.mkDerivation (self: {
+ pname = "parsers";
+ version = "0.11";
+ sha256 = "0k3xm9ww4q2wkjik4n4ww6ys79kl7xyzbhcb7xi81jz9py0xciqd";
+ buildDepends = [
+ attoparsec charset parsec text transformers unorderedContainers
+ ];
+ testDepends = [ doctest filepath ];
+ meta = {
+ homepage = "http://github.com/ekmett/parsers/";
+ description = "Parsing combinators";
+ license = self.stdenv.lib.licenses.bsd3;
+ platforms = self.ghc.meta.platforms;
+ };
+})
diff --git a/pkgs/development/libraries/haskell/pipes-network/default.nix b/pkgs/development/libraries/haskell/pipes-network/default.nix
index b70527ecdad..1b816a704f2 100644
--- a/pkgs/development/libraries/haskell/pipes-network/default.nix
+++ b/pkgs/development/libraries/haskell/pipes-network/default.nix
@@ -7,6 +7,7 @@ cabal.mkDerivation (self: {
buildDepends = [
network networkSimple pipes pipesSafe transformers
];
+ jailbreak = true;
meta = {
homepage = "https://github.com/k0001/pipes-network";
description = "Use network sockets together with the pipes library";
diff --git a/pkgs/development/libraries/haskell/pipes-safe/default.nix b/pkgs/development/libraries/haskell/pipes-safe/default.nix
index dddc27157dd..c1d5a603da0 100644
--- a/pkgs/development/libraries/haskell/pipes-safe/default.nix
+++ b/pkgs/development/libraries/haskell/pipes-safe/default.nix
@@ -2,8 +2,8 @@
cabal.mkDerivation (self: {
pname = "pipes-safe";
- version = "2.0.2";
- sha256 = "004xjf0aqa73gxn8kj9844pwbkriv3hk9sbnwxx26pgvqvwjlrsj";
+ version = "2.1.0";
+ sha256 = "0qm02hwmrqlncnlxix7mdgzbf0mzally4k7ydwg06nqi35bb7s3j";
buildDepends = [ exceptions pipes transformers ];
meta = {
description = "Safety for the pipes ecosystem";
diff --git a/pkgs/development/libraries/haskell/pool-conduit/default.nix b/pkgs/development/libraries/haskell/pool-conduit/default.nix
index e7c1489d5cb..cb1682673af 100644
--- a/pkgs/development/libraries/haskell/pool-conduit/default.nix
+++ b/pkgs/development/libraries/haskell/pool-conduit/default.nix
@@ -2,14 +2,14 @@
cabal.mkDerivation (self: {
pname = "pool-conduit";
- version = "0.1.2.2";
- sha256 = "1jg7kymr1v82xl9122q9fly385jhm1hr2406g35ydl9wnh4aaiw8";
+ version = "0.1.2.3";
+ sha256 = "1myjbmbh0jm89ycx9d961mpgw8hp7al8wgnsls4p19gvr73gcbfv";
buildDepends = [
monadControl resourcePool resourcet transformers
];
meta = {
homepage = "http://www.yesodweb.com/book/persistent";
- description = "Resource pool allocations via ResourceT";
+ description = "Resource pool allocations via ResourceT. (deprecated)";
license = self.stdenv.lib.licenses.mit;
platforms = self.ghc.meta.platforms;
maintainers = [ self.stdenv.lib.maintainers.andres ];
diff --git a/pkgs/development/libraries/haskell/process-conduit/default.nix b/pkgs/development/libraries/haskell/process-conduit/default.nix
index 6148b9b508b..3ecd88515b2 100644
--- a/pkgs/development/libraries/haskell/process-conduit/default.nix
+++ b/pkgs/development/libraries/haskell/process-conduit/default.nix
@@ -1,13 +1,14 @@
-{ cabal, conduit, controlMonadLoop, hspec, mtl, shakespeare
-, shakespeareText, text
+{ cabal, conduit, controlMonadLoop, hspec, mtl, resourcet
+, shakespeare, shakespeareText, text
}:
cabal.mkDerivation (self: {
pname = "process-conduit";
- version = "1.0.0.2";
- sha256 = "0rz18x7gy8w1h2xq0il49k515n0y3gpxnl7mfgkczc86965w7fzj";
+ version = "1.1.0.0";
+ sha256 = "1b3snck651cpb7i3c78cn264zrjan3lzydf59209abkvb6fv1hql";
buildDepends = [
- conduit controlMonadLoop mtl shakespeare shakespeareText text
+ conduit controlMonadLoop mtl resourcet shakespeare shakespeareText
+ text
];
testDepends = [ conduit hspec ];
meta = {
diff --git a/pkgs/development/libraries/haskell/quickcheck-instances/default.nix b/pkgs/development/libraries/haskell/quickcheck-instances/default.nix
index 00ea65388fd..b45fab000ca 100644
--- a/pkgs/development/libraries/haskell/quickcheck-instances/default.nix
+++ b/pkgs/development/libraries/haskell/quickcheck-instances/default.nix
@@ -2,8 +2,8 @@
cabal.mkDerivation (self: {
pname = "quickcheck-instances";
- version = "0.3.7";
- sha256 = "0zf2b2zisfx7j7i4jnb79w5hhk5dy53w23fi876flx3vl6mfvszw";
+ version = "0.3.8";
+ sha256 = "0132a37zi1haz1aaggxa1hr421bcmxlbaa4m2l53m2rmr4z5mgkg";
buildDepends = [
hashable QuickCheck text time unorderedContainers
];
diff --git a/pkgs/development/libraries/haskell/quickcheck-io/default.nix b/pkgs/development/libraries/haskell/quickcheck-io/default.nix
index b7c33b6d1a0..9e345f80053 100644
--- a/pkgs/development/libraries/haskell/quickcheck-io/default.nix
+++ b/pkgs/development/libraries/haskell/quickcheck-io/default.nix
@@ -2,8 +2,8 @@
cabal.mkDerivation (self: {
pname = "quickcheck-io";
- version = "0.1.0";
- sha256 = "167ds7c7p1lcfsylxhq2sr0jxbviyim1n42dhyr0s0b6hazw8cjs";
+ version = "0.1.1";
+ sha256 = "16q3sqvxnaqmbb1zbda8f61mdlmmzxhrznqxab113lmg380nwfm2";
buildDepends = [ HUnit QuickCheck ];
meta = {
description = "Use HUnit assertions as QuickCheck properties";
diff --git a/pkgs/development/libraries/haskell/random-fu/default.nix b/pkgs/development/libraries/haskell/random-fu/default.nix
index 8dd228ad3db..41999e535e0 100644
--- a/pkgs/development/libraries/haskell/random-fu/default.nix
+++ b/pkgs/development/libraries/haskell/random-fu/default.nix
@@ -1,14 +1,14 @@
-{ cabal, erf, gamma, monadLoops, mtl, randomShuffle, randomSource
-, rvar, syb, transformers, vector
+{ cabal, erf, mathFunctions, monadLoops, mtl, randomShuffle
+, randomSource, rvar, syb, transformers, vector
}:
cabal.mkDerivation (self: {
pname = "random-fu";
- version = "0.2.4.0";
- sha256 = "1wiwh52qfs699mcj3ylwc97pyabczn6dr8j92qczs89g8vvi91wd";
+ version = "0.2.5.0";
+ sha256 = "1yfq7mvplzdk64i7z5ip8vjynn48a65z28xrhcv91qi0yjxsxdm0";
buildDepends = [
- erf gamma monadLoops mtl randomShuffle randomSource rvar syb
- transformers vector
+ erf mathFunctions monadLoops mtl randomShuffle randomSource rvar
+ syb transformers vector
];
meta = {
homepage = "https://github.com/mokus0/random-fu";
diff --git a/pkgs/development/libraries/haskell/resourcet/default.nix b/pkgs/development/libraries/haskell/resourcet/default.nix
index 8413802faa1..7995227a8c0 100644
--- a/pkgs/development/libraries/haskell/resourcet/default.nix
+++ b/pkgs/development/libraries/haskell/resourcet/default.nix
@@ -1,13 +1,14 @@
-{ cabal, hspec, liftedBase, mmorph, monadControl, mtl, transformers
-, transformersBase
+{ cabal, exceptions, hspec, liftedBase, mmorph, monadControl, mtl
+, transformers, transformersBase
}:
cabal.mkDerivation (self: {
pname = "resourcet";
- version = "0.4.10.2";
- sha256 = "0k0l4909b30hc2apxgzjz1rxbqqkhqnqchz53wi6zyhvbh46ffh6";
+ version = "1.1.1";
+ sha256 = "0v80wlxpcikr41p8wxa2kr184ghp94bgb5fwym9c27k8djig2awy";
buildDepends = [
- liftedBase mmorph monadControl mtl transformers transformersBase
+ exceptions liftedBase mmorph monadControl mtl transformers
+ transformersBase
];
testDepends = [ hspec liftedBase transformers ];
meta = {
diff --git a/pkgs/development/libraries/haskell/retry/default.nix b/pkgs/development/libraries/haskell/retry/default.nix
new file mode 100644
index 00000000000..d57898593b2
--- /dev/null
+++ b/pkgs/development/libraries/haskell/retry/default.nix
@@ -0,0 +1,15 @@
+{ cabal, dataDefault, liftedBase, monadControl, transformers }:
+
+cabal.mkDerivation (self: {
+ pname = "retry";
+ version = "0.3.0.0";
+ sha256 = "00yjk5784h4w1cckw17w1k5r94acc3ycnprk642ndgggz3lxm36n";
+ buildDepends = [
+ dataDefault liftedBase monadControl transformers
+ ];
+ meta = {
+ description = "Retry combinators for monadic actions that may fail";
+ license = self.stdenv.lib.licenses.bsd3;
+ platforms = self.ghc.meta.platforms;
+ };
+})
diff --git a/pkgs/development/libraries/haskell/sbv/default.nix b/pkgs/development/libraries/haskell/sbv/default.nix
new file mode 100644
index 00000000000..a4450bdc892
--- /dev/null
+++ b/pkgs/development/libraries/haskell/sbv/default.nix
@@ -0,0 +1,19 @@
+{ cabal, deepseq, filepath, HUnit, mtl, QuickCheck, random, syb }:
+
+cabal.mkDerivation (self: {
+ pname = "sbv";
+ version = "3.0";
+ sha256 = "16k9f0x4amg7mm8ib22nyk1rngrbf9311gl2m15hbdq49jp8ik9i";
+ isLibrary = true;
+ isExecutable = true;
+ buildDepends = [
+ deepseq filepath HUnit mtl QuickCheck random syb
+ ];
+ testDepends = [ filepath HUnit syb ];
+ meta = {
+ homepage = "http://leventerkok.github.com/sbv/";
+ description = "SMT Based Verification: Symbolic Haskell theorem prover using SMT solving";
+ license = self.stdenv.lib.licenses.bsd3;
+ platforms = self.ghc.meta.platforms;
+ };
+})
diff --git a/pkgs/development/libraries/haskell/scotty-hastache/default.nix b/pkgs/development/libraries/haskell/scotty-hastache/default.nix
index 76e6fe45ad1..7f10ad2d68f 100644
--- a/pkgs/development/libraries/haskell/scotty-hastache/default.nix
+++ b/pkgs/development/libraries/haskell/scotty-hastache/default.nix
@@ -1,14 +1,13 @@
-{ cabal, blazeHtml, blazeMarkup, filepath, hastache, httpTypes, mtl
-, scotty, text, wai, warp
+{ cabal, filepath, hastache, httpTypes, mtl, scotty, text, wai
+, warp
}:
cabal.mkDerivation (self: {
pname = "scotty-hastache";
- version = "0.2.0";
- sha256 = "105cxlasj4sl4ddzg8ms6k95078q10zcm2c86jcn76s0jmv95669";
+ version = "0.2.1";
+ sha256 = "1yyip8iq1n71iidmpbfs7rifxvpphyrcaf4z394rx36hq72ka8dn";
buildDepends = [
- blazeHtml blazeMarkup filepath hastache httpTypes mtl scotty text
- wai warp
+ filepath hastache httpTypes mtl scotty text wai warp
];
meta = {
homepage = "https://github.com/scotty-web/scotty-hastache";
diff --git a/pkgs/development/libraries/haskell/scotty/default.nix b/pkgs/development/libraries/haskell/scotty/default.nix
index 278a26d1536..cc5ae260477 100644
--- a/pkgs/development/libraries/haskell/scotty/default.nix
+++ b/pkgs/development/libraries/haskell/scotty/default.nix
@@ -1,15 +1,15 @@
-{ cabal, aeson, blazeBuilder, caseInsensitive, conduit, dataDefault
-, httpTypes, mtl, regexCompat, text, transformers, wai, waiExtra
-, warp
+{ cabal, aeson, blazeBuilder, caseInsensitive, conduit
+, conduitExtra, dataDefault, httpTypes, mtl, regexCompat, text
+, transformers, wai, waiExtra, warp
}:
cabal.mkDerivation (self: {
pname = "scotty";
- version = "0.7.1";
- sha256 = "07aj74jq0hh86ik4x5p5q65b47q44rrnd6mkp039wj9l6dmyrv3c";
+ version = "0.7.2";
+ sha256 = "1y14af3qciwycgaxzx6rjan2jgfchjzs4zbxzh8p8s1d0l4gsqlb";
buildDepends = [
- aeson blazeBuilder caseInsensitive conduit dataDefault httpTypes
- mtl regexCompat text transformers wai waiExtra warp
+ aeson blazeBuilder caseInsensitive conduit conduitExtra dataDefault
+ httpTypes mtl regexCompat text transformers wai waiExtra warp
];
jailbreak = true;
meta = {
diff --git a/pkgs/development/libraries/haskell/semigroups/default.nix b/pkgs/development/libraries/haskell/semigroups/default.nix
index 432eb77ae3e..22dfb5e8896 100644
--- a/pkgs/development/libraries/haskell/semigroups/default.nix
+++ b/pkgs/development/libraries/haskell/semigroups/default.nix
@@ -2,8 +2,8 @@
cabal.mkDerivation (self: {
pname = "semigroups";
- version = "0.12.2";
- sha256 = "0qk6m477iwk17j2a1yfxfkhvfrdv94nnx32zlqjqqxjfbi71c30g";
+ version = "0.13.0.1";
+ sha256 = "12zd1pvggjj81hi7vm9z8fxcwsg6r2xbsg3qjs8snnybadi0qlfl";
buildDepends = [ hashable nats text unorderedContainers ];
meta = {
homepage = "http://github.com/ekmett/semigroups/";
diff --git a/pkgs/development/libraries/haskell/shakespeare-css/default.nix b/pkgs/development/libraries/haskell/shakespeare-css/default.nix
index ae966a4501e..8f06ee67361 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.7.3";
- sha256 = "0f2l1i4h3h5xps74nx3gy1mbi96m12rzgidlh4ilxz6p7dx9wnbq";
+ version = "1.0.7.4";
+ sha256 = "1lb3w0498bdsd2cmz2ns11dv5abif0wsilbqy0ymfb1dgl2rbpmz";
buildDepends = [ parsec shakespeare text transformers ];
testDepends = [ hspec HUnit shakespeare text ];
meta = {
diff --git a/pkgs/development/libraries/haskell/smtps-gmail/default.nix b/pkgs/development/libraries/haskell/smtps-gmail/default.nix
index a61daf6de25..eb8d97805a0 100644
--- a/pkgs/development/libraries/haskell/smtps-gmail/default.nix
+++ b/pkgs/development/libraries/haskell/smtps-gmail/default.nix
@@ -4,8 +4,8 @@
cabal.mkDerivation (self: {
pname = "smtps-gmail";
- version = "1.1.0";
- sha256 = "0zr2ndpwfnb9pkv69vx94p0vpghl0khd0wbmccjpk6hlrp6fsj66";
+ version = "1.1.1";
+ sha256 = "1ccj9rmbplh0c7h6rpg3ry213nb1lrhf7hm2vl7kq9lv0nb7cy97";
buildDepends = [
base64Bytestring cprngAes dataDefault filepath mimeMail network
stringsearch text tls
@@ -16,8 +16,4 @@ cabal.mkDerivation (self: {
license = self.stdenv.lib.licenses.bsd3;
platforms = self.ghc.meta.platforms;
};
- # adding a Setup script as it's needed by nix
- preConfigure = ''
- printf "import Distribution.Simple\nmain = defaultMain\n" > Setup.hs
- '';
})
diff --git a/pkgs/development/libraries/haskell/snap-cors/default.nix b/pkgs/development/libraries/haskell/snap-cors/default.nix
new file mode 100644
index 00000000000..d805817838a
--- /dev/null
+++ b/pkgs/development/libraries/haskell/snap-cors/default.nix
@@ -0,0 +1,19 @@
+{ cabal, attoparsec, caseInsensitive, hashable, network, snap, text
+, transformers, unorderedContainers
+}:
+
+cabal.mkDerivation (self: {
+ pname = "snap-cors";
+ version = "1.2.2";
+ sha256 = "1f32sj7y87lr0wjs3j3ynh95c4j4yx4fzizbgdfnjai1apcjkhcs";
+ buildDepends = [
+ attoparsec caseInsensitive hashable network snap text transformers
+ unorderedContainers
+ ];
+ meta = {
+ homepage = "http://github.com/ocharles/snap-cors";
+ description = "Add CORS headers to Snap applications";
+ license = self.stdenv.lib.licenses.bsd3;
+ platforms = self.ghc.meta.platforms;
+ };
+})
diff --git a/pkgs/development/libraries/haskell/snap/loader-dynamic.nix b/pkgs/development/libraries/haskell/snap/loader-dynamic.nix
index abe4d4cc074..ec054cc8065 100644
--- a/pkgs/development/libraries/haskell/snap/loader-dynamic.nix
+++ b/pkgs/development/libraries/haskell/snap/loader-dynamic.nix
@@ -2,8 +2,8 @@
cabal.mkDerivation (self: {
pname = "snap-loader-dynamic";
- version = "0.10";
- sha256 = "0wnrsbnf3crfxhhraz4my08m6yhmqj632rv6cdy9ili3wxjkqd57";
+ version = "0.10.0.1";
+ sha256 = "0iqhspvfp0d6qivis2l3v0rqrnb8qbzvi4n53zgyb9cwvqxx5fix";
buildDepends = [ directoryTree hint mtl snapCore time ];
meta = {
homepage = "http://snapframework.com/";
diff --git a/pkgs/development/libraries/haskell/snap/server.nix b/pkgs/development/libraries/haskell/snap/server.nix
index 4634ec554eb..4dca1dea284 100644
--- a/pkgs/development/libraries/haskell/snap/server.nix
+++ b/pkgs/development/libraries/haskell/snap/server.nix
@@ -6,8 +6,8 @@
cabal.mkDerivation (self: {
pname = "snap-server";
- version = "0.9.4.1";
- sha256 = "07k7gndzmh4d2mghi8qv25frvdlgmn7497hh6j22ki0al0zrs0l9";
+ version = "0.9.4.2";
+ sha256 = "05na8gqbqy0nznasaxfkp4hr7h0s6ypm8000mhn50d27v8nk526m";
buildDepends = [
attoparsec attoparsecEnumerator blazeBuilder blazeBuilderEnumerator
caseInsensitive enumerator MonadCatchIOTransformers mtl network
diff --git a/pkgs/development/libraries/haskell/statistics/default.nix b/pkgs/development/libraries/haskell/statistics/0.10.5.2.nix
similarity index 100%
rename from pkgs/development/libraries/haskell/statistics/default.nix
rename to pkgs/development/libraries/haskell/statistics/0.10.5.2.nix
diff --git a/pkgs/development/libraries/haskell/statistics/0.11.0.0.nix b/pkgs/development/libraries/haskell/statistics/0.11.0.0.nix
new file mode 100644
index 00000000000..11d2ff6daa6
--- /dev/null
+++ b/pkgs/development/libraries/haskell/statistics/0.11.0.0.nix
@@ -0,0 +1,28 @@
+{ cabal, binary, deepseq, erf, HUnit, ieee754, mathFunctions
+, monadPar, mwcRandom, primitive, QuickCheck, testFramework
+, testFrameworkHunit, testFrameworkQuickcheck2, vector
+, vectorAlgorithms, vectorBinaryInstances
+}:
+
+cabal.mkDerivation (self: {
+ pname = "statistics";
+ version = "0.11.0.0";
+ sha256 = "1pmkdy7v78ajl5b5rjshgabhcakb9ji5wlq79ajr1b5adif1d1d9";
+ buildDepends = [
+ binary deepseq erf mathFunctions monadPar mwcRandom primitive
+ vector vectorAlgorithms vectorBinaryInstances
+ ];
+ testDepends = [
+ binary erf HUnit ieee754 mathFunctions mwcRandom primitive
+ QuickCheck testFramework testFrameworkHunit
+ testFrameworkQuickcheck2 vector vectorAlgorithms
+ ];
+ doCheck = false;
+ meta = {
+ homepage = "https://github.com/bos/statistics";
+ description = "A library of statistical types, data, and functions";
+ license = self.stdenv.lib.licenses.bsd3;
+ platforms = self.ghc.meta.platforms;
+ maintainers = [ self.stdenv.lib.maintainers.andres ];
+ };
+})
diff --git a/pkgs/development/libraries/haskell/stm-conduit/default.nix b/pkgs/development/libraries/haskell/stm-conduit/default.nix
index 07d1fc03bf0..201a2ea02f9 100644
--- a/pkgs/development/libraries/haskell/stm-conduit/default.nix
+++ b/pkgs/development/libraries/haskell/stm-conduit/default.nix
@@ -1,16 +1,17 @@
-{ cabal, async, cereal, cerealConduit, conduit, HUnit, liftedAsync
-, liftedBase, monadControl, monadLoops, QuickCheck, resourcet, stm
-, stmChans, testFramework, testFrameworkHunit
+{ cabal, async, cereal, cerealConduit, conduit, conduitExtra, HUnit
+, liftedAsync, liftedBase, monadControl, monadLoops, QuickCheck
+, resourcet, stm, stmChans, testFramework, testFrameworkHunit
, testFrameworkQuickcheck2, transformers
}:
cabal.mkDerivation (self: {
pname = "stm-conduit";
- version = "2.3.0";
- sha256 = "1qvzqzk822sc0sjblgqb5y73mggsvh70zpzz908isfiqcwp7llc4";
+ version = "2.4.0";
+ sha256 = "03ifxr3pspwmzf0xdh7mj3q1wiz13d86w9pdhiqa6b1d1qw6rvha";
buildDepends = [
- async cereal cerealConduit conduit liftedAsync liftedBase
- monadControl monadLoops resourcet stm stmChans transformers
+ async cereal cerealConduit conduit conduitExtra liftedAsync
+ liftedBase monadControl monadLoops resourcet stm stmChans
+ transformers
];
testDepends = [
conduit HUnit QuickCheck resourcet stm stmChans testFramework
diff --git a/pkgs/development/libraries/haskell/streaming-commons/default.nix b/pkgs/development/libraries/haskell/streaming-commons/default.nix
index fec0ddf79cd..4bcb46887bc 100644
--- a/pkgs/development/libraries/haskell/streaming-commons/default.nix
+++ b/pkgs/development/libraries/haskell/streaming-commons/default.nix
@@ -1,13 +1,13 @@
-{ cabal, deepseq, hspec, network, QuickCheck, text, transformers
-, zlib
+{ cabal, async, deepseq, hspec, network, QuickCheck, text
+, transformers, zlib
}:
cabal.mkDerivation (self: {
pname = "streaming-commons";
- version = "0.1.0.2";
- sha256 = "1idlhvlv5pg20xq8h4rmphyflvpc9q88krwm498mh3s4983ik28c";
+ version = "0.1.1";
+ sha256 = "1mzpdhdc5kq9pfpsjs6v1j1qa1pdj1ca4s32z4bjq751jayj6ds6";
buildDepends = [ network text transformers zlib ];
- testDepends = [ deepseq hspec QuickCheck text zlib ];
+ testDepends = [ async deepseq hspec network QuickCheck text zlib ];
meta = {
homepage = "https://github.com/fpco/streaming-commons";
description = "Common lower-level functions needed by various streaming data libraries";
diff --git a/pkgs/development/libraries/haskell/syntactic/default.nix b/pkgs/development/libraries/haskell/syntactic/default.nix
new file mode 100644
index 00000000000..e18cf7b5937
--- /dev/null
+++ b/pkgs/development/libraries/haskell/syntactic/default.nix
@@ -0,0 +1,22 @@
+{ cabal, constraints, dataHash, mtl, QuickCheck, tasty, tastyGolden
+, tastyQuickcheck, tastyTh, transformers, treeView, tuple
+, utf8String
+}:
+
+cabal.mkDerivation (self: {
+ pname = "syntactic";
+ version = "1.11";
+ sha256 = "1j4k4qwi17x9z0cjf9adndaj5wbs8prs36xpz2icf7mlwcr9pvrz";
+ buildDepends = [
+ constraints dataHash mtl transformers treeView tuple
+ ];
+ testDepends = [
+ mtl QuickCheck tasty tastyGolden tastyQuickcheck tastyTh utf8String
+ ];
+ meta = {
+ homepage = "https://github.com/emilaxelsson/syntactic";
+ description = "Generic abstract syntax, and utilities for embedded languages";
+ license = self.stdenv.lib.licenses.bsd3;
+ platforms = self.ghc.meta.platforms;
+ };
+})
diff --git a/pkgs/development/libraries/haskell/tagstream-conduit/default.nix b/pkgs/development/libraries/haskell/tagstream-conduit/default.nix
index c28301e4183..ecdcbb1b63c 100644
--- a/pkgs/development/libraries/haskell/tagstream-conduit/default.nix
+++ b/pkgs/development/libraries/haskell/tagstream-conduit/default.nix
@@ -1,17 +1,19 @@
{ cabal, attoparsec, attoparsecConduit, blazeBuilder
-, blazeBuilderConduit, caseInsensitive, conduit, dataDefault, hspec
-, HUnit, QuickCheck, text, transformers, xmlConduit
+, blazeBuilderConduit, caseInsensitive, conduit, conduitExtra
+, dataDefault, hspec, HUnit, QuickCheck, resourcet, text
+, transformers, xmlConduit
}:
cabal.mkDerivation (self: {
pname = "tagstream-conduit";
- version = "0.5.5";
- sha256 = "17157chhw610f8az6c25qzq5mmhpb1a8m12kdc2k8khgynpkrj5f";
+ version = "0.5.5.1";
+ sha256 = "0bpxjhqqqigfnwcxx3h2am5zmgr1lyaxaac3lnz490j6zf8x9jn7";
buildDepends = [
attoparsec attoparsecConduit blazeBuilder blazeBuilderConduit
- caseInsensitive conduit dataDefault text transformers xmlConduit
+ caseInsensitive conduit conduitExtra dataDefault resourcet text
+ transformers xmlConduit
];
- testDepends = [ conduit hspec HUnit QuickCheck text ];
+ testDepends = [ conduit hspec HUnit QuickCheck resourcet text ];
meta = {
homepage = "http://github.com/yihuang/tagstream-conduit";
description = "streamlined html tag parser";
diff --git a/pkgs/development/libraries/haskell/tasty/default.nix b/pkgs/development/libraries/haskell/tasty/default.nix
index 706053a3e03..13e4e37e4b0 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.8.0.2";
- sha256 = "0xn0qc1d7bq8s7988x58snq5ipvmi7g87rg89r1l21yxl6a85zw5";
+ version = "0.8.0.4";
+ sha256 = "016niwympxbxpg3yq7samgh92l20wxm2h6cwhqal4zdj8n9262j0";
buildDepends = [
ansiTerminal async deepseq mtl optparseApplicative regexTdfa stm
tagged unboundedDelays
diff --git a/pkgs/development/libraries/haskell/temporary/default.nix b/pkgs/development/libraries/haskell/temporary/default.nix
index cf5d76f8cd6..585eaf58682 100644
--- a/pkgs/development/libraries/haskell/temporary/default.nix
+++ b/pkgs/development/libraries/haskell/temporary/default.nix
@@ -2,8 +2,8 @@
cabal.mkDerivation (self: {
pname = "temporary";
- version = "1.2.0.1";
- sha256 = "12z8qnqn1fg9ymaav5ds7gk067lmj0bv1lhhxcnvmvjcpk1l5b54";
+ version = "1.2.0.2";
+ sha256 = "1ynvhmc6b385sn8qw3sni3cwmz7pmppns546416xil9mhbiya87z";
buildDepends = [ exceptions filepath transformers ];
jailbreak = true;
meta = {
diff --git a/pkgs/development/libraries/haskell/texmath/default.nix b/pkgs/development/libraries/haskell/texmath/default.nix
index 8dd3f5c6fc9..7c97f5b8e3f 100644
--- a/pkgs/development/libraries/haskell/texmath/default.nix
+++ b/pkgs/development/libraries/haskell/texmath/default.nix
@@ -2,8 +2,8 @@
cabal.mkDerivation (self: {
pname = "texmath";
- version = "0.6.6";
- sha256 = "0mbimlvqsfx6w4dvilidy5cd9732kf6bnfnn6n7rnmq88avxxnmc";
+ version = "0.6.6.1";
+ sha256 = "0s6rh4frjc76g1nmwhnnpnsszrnhpi9zx478zqiln1fg0yc9fhxq";
isLibrary = true;
isExecutable = true;
buildDepends = [ pandocTypes parsec syb xml ];
diff --git a/pkgs/development/libraries/haskell/text-icu/default.nix b/pkgs/development/libraries/haskell/text-icu/default.nix
index 6dc42beee40..222475b24bb 100644
--- a/pkgs/development/libraries/haskell/text-icu/default.nix
+++ b/pkgs/development/libraries/haskell/text-icu/default.nix
@@ -12,6 +12,7 @@ cabal.mkDerivation (self: {
testFrameworkQuickcheck2 text
];
extraLibraries = [ icu ];
+ doCheck = !self.stdenv.isDarwin;
meta = {
homepage = "https://github.com/bos/text-icu";
description = "Bindings to the ICU library";
diff --git a/pkgs/development/libraries/haskell/tf-random/default.nix b/pkgs/development/libraries/haskell/tf-random/default.nix
index 3ff0b2d9b84..79e27f87fc6 100644
--- a/pkgs/development/libraries/haskell/tf-random/default.nix
+++ b/pkgs/development/libraries/haskell/tf-random/default.nix
@@ -2,8 +2,8 @@
cabal.mkDerivation (self: {
pname = "tf-random";
- version = "0.4";
- sha256 = "0yi7699zswpsn9a39ccqkyd0117sppjnqggclnhs1wm7ql1glc27";
+ version = "0.5";
+ sha256 = "0445r2nns6009fmq0xbfpyv7jpzwv0snccjdg7hwj4xk4z0cwc1f";
buildDepends = [ primitive random time ];
meta = {
description = "High-quality splittable pseudorandom number generator";
diff --git a/pkgs/development/libraries/haskell/thyme/default.nix b/pkgs/development/libraries/haskell/thyme/default.nix
index 08563c6f2c5..e321f21b2ca 100644
--- a/pkgs/development/libraries/haskell/thyme/default.nix
+++ b/pkgs/development/libraries/haskell/thyme/default.nix
@@ -1,18 +1,18 @@
-{ cabal, aeson, attoparsec, Cabal, deepseq, filepath, lens
-, QuickCheck, random, systemPosixRedirect, text, time, transformers
+{ cabal, aeson, attoparsec, Cabal, deepseq, filepath, mtl
+, profunctors, QuickCheck, random, systemPosixRedirect, text, time
, vector, vectorSpace
}:
cabal.mkDerivation (self: {
pname = "thyme";
- version = "0.3.1.1";
- sha256 = "00c15zy7190mghpvrpwl0hp8w1mp386vvff8w2zdpgl792cvdby8";
+ version = "0.3.3.0";
+ sha256 = "0mpwwpc82xcdyawz87rcmvga1miw7cx538nnh379m2ibn0g71zaa";
buildDepends = [
- aeson attoparsec deepseq lens QuickCheck random text time
- transformers vector vectorSpace
+ aeson attoparsec deepseq mtl profunctors QuickCheck random text
+ time vector vectorSpace
];
testDepends = [
- attoparsec Cabal filepath lens QuickCheck random
+ attoparsec Cabal filepath mtl profunctors QuickCheck random
systemPosixRedirect text time vectorSpace
];
doCheck = false;
diff --git a/pkgs/development/libraries/haskell/time-recurrence/default.nix b/pkgs/development/libraries/haskell/time-recurrence/default.nix
new file mode 100644
index 00000000000..0e23f84ebfc
--- /dev/null
+++ b/pkgs/development/libraries/haskell/time-recurrence/default.nix
@@ -0,0 +1,19 @@
+{ cabal, dataOrdlist, HUnit, mtl, testFramework, testFrameworkHunit
+, time
+}:
+
+cabal.mkDerivation (self: {
+ pname = "time-recurrence";
+ version = "0.9.2";
+ sha256 = "1arqmkagmswimbh78qfz5bcilk9i14w29j4vf4i89d00vac3vrzm";
+ buildDepends = [ dataOrdlist mtl time ];
+ testDepends = [
+ dataOrdlist HUnit mtl testFramework testFrameworkHunit time
+ ];
+ meta = {
+ homepage = "http://github.com/hellertime/time-recurrence";
+ description = "Generate recurring dates";
+ license = self.stdenv.lib.licenses.gpl3;
+ platforms = self.ghc.meta.platforms;
+ };
+})
diff --git a/pkgs/development/libraries/haskell/timeparsers/default.nix b/pkgs/development/libraries/haskell/timeparsers/default.nix
new file mode 100644
index 00000000000..57c9c7e3da7
--- /dev/null
+++ b/pkgs/development/libraries/haskell/timeparsers/default.nix
@@ -0,0 +1,13 @@
+{ cabal, attoparsec, convertible, mtl, time }:
+
+cabal.mkDerivation (self: {
+ pname = "timeparsers";
+ version = "0.3.2";
+ sha256 = "1dicp58f2amn5rgmnlfjpv4aj7ak6jrdlba2marglddvj4ycq1h7";
+ buildDepends = [ attoparsec convertible mtl time ];
+ meta = {
+ description = "Attoparsec parsers for various Date/Time formats";
+ license = self.stdenv.lib.licenses.bsd3;
+ platforms = self.ghc.meta.platforms;
+ };
+})
diff --git a/pkgs/development/libraries/haskell/tree-view/default.nix b/pkgs/development/libraries/haskell/tree-view/default.nix
new file mode 100644
index 00000000000..7ceefb815d8
--- /dev/null
+++ b/pkgs/development/libraries/haskell/tree-view/default.nix
@@ -0,0 +1,13 @@
+{ cabal, mtl }:
+
+cabal.mkDerivation (self: {
+ pname = "tree-view";
+ version = "0.4";
+ sha256 = "0mzywp6nipc6zs98dy4ny2s3r9d745lqpjazfnj5y4hx8swyckgn";
+ buildDepends = [ mtl ];
+ meta = {
+ description = "Render trees as foldable HTML and Unicode art";
+ license = self.stdenv.lib.licenses.bsd3;
+ platforms = self.ghc.meta.platforms;
+ };
+})
diff --git a/pkgs/development/libraries/haskell/trifecta/default.nix b/pkgs/development/libraries/haskell/trifecta/default.nix
index d9a9a2a01c5..09f3b112c1b 100644
--- a/pkgs/development/libraries/haskell/trifecta/default.nix
+++ b/pkgs/development/libraries/haskell/trifecta/default.nix
@@ -6,25 +6,14 @@
cabal.mkDerivation (self: {
pname = "trifecta";
- version = "1.4.1";
- sha256 = "0w8x9n7n57y997iajm42z44nm846fj88shc04dffn1xif3jw5zfc";
+ version = "1.4.2";
+ sha256 = "13kj1xz2bxixsqsrywdx3snl1hjkyv437ifwfrys1m4hnkv4aqai";
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.8," \
- --replace "blaze-html >= 0.5 && < 0.7," "blaze-html >= 0.5 && < 0.8," \
- --replace "blaze-markup >= 0.5 && < 0.6," "blaze-markup >= 0.5 && < 0.7," \
- --replace "hashable >= 1.2.1 && < 1.3," "hashable >= 1.1 && < 1.3," \
- --replace "hashable >= 1.2 && < 1.3," "hashable >= 1.1 && < 1.3," \
- --replace "fingertree >= 0.0.1 && < 0.1," "fingertree >= 0.0.1 && < 0.2," \
- --replace "comonad == 3.*," "comonad >= 3 && < 5," \
- --replace "comonad >= 3 && < 4," "comonad >= 3 && < 5,"
- '';
meta = {
homepage = "http://github.com/ekmett/trifecta/";
description = "A modern parser combinator library with convenient diagnostics";
diff --git a/pkgs/development/libraries/haskell/twitter-conduit/default.nix b/pkgs/development/libraries/haskell/twitter-conduit/default.nix
new file mode 100644
index 00000000000..4d14ed4582a
--- /dev/null
+++ b/pkgs/development/libraries/haskell/twitter-conduit/default.nix
@@ -0,0 +1,28 @@
+{ cabal, aeson, attoparsec, attoparsecConduit, authenticateOauth
+, conduit, dataDefault, doctest, failure, filepath, hlint
+, httpClient, httpConduit, httpTypes, lens, liftedBase
+, monadControl, monadLogger, resourcet, shakespeare, text, time
+, transformers, transformersBase, twitterTypes
+}:
+
+cabal.mkDerivation (self: {
+ pname = "twitter-conduit";
+ version = "0.0.2.1";
+ sha256 = "1z0d8hwjrdw8gkww9zkn9cqv3g40my952li8pm3c164d7ywswszq";
+ isLibrary = true;
+ isExecutable = true;
+ buildDepends = [
+ aeson attoparsec attoparsecConduit authenticateOauth conduit
+ dataDefault failure httpClient httpConduit httpTypes lens
+ liftedBase monadControl monadLogger resourcet shakespeare text time
+ transformers transformersBase twitterTypes
+ ];
+ testDepends = [ doctest filepath hlint ];
+ meta = {
+ homepage = "https://github.com/himura/twitter-conduit";
+ description = "Twitter API package with conduit interface and Streaming API support";
+ license = self.stdenv.lib.licenses.bsd3;
+ platforms = self.ghc.meta.platforms;
+ maintainers = [ self.stdenv.lib.maintainers.ocharles ];
+ };
+})
diff --git a/pkgs/development/libraries/haskell/twitter-types/default.nix b/pkgs/development/libraries/haskell/twitter-types/default.nix
new file mode 100644
index 00000000000..05c37c02f41
--- /dev/null
+++ b/pkgs/development/libraries/haskell/twitter-types/default.nix
@@ -0,0 +1,23 @@
+{ cabal, aeson, attoparsec, httpTypes, HUnit, shakespeare
+, testFramework, testFrameworkHunit, testFrameworkThPrime, text
+, unorderedContainers
+}:
+
+cabal.mkDerivation (self: {
+ pname = "twitter-types";
+ version = "0.2.20140407";
+ sha256 = "171m7fqq82g630r1x5advq04qfkdljvc8d8ygyafr2x44ss2a996";
+ buildDepends = [ aeson httpTypes text unorderedContainers ];
+ testDepends = [
+ aeson attoparsec httpTypes HUnit shakespeare testFramework
+ testFrameworkHunit testFrameworkThPrime text unorderedContainers
+ ];
+ doCheck = false;
+ meta = {
+ homepage = "https://github.com/himura/twitter-types";
+ description = "Twitter JSON parser and types";
+ license = self.stdenv.lib.licenses.bsd3;
+ platforms = self.ghc.meta.platforms;
+ maintainers = [ self.stdenv.lib.maintainers.ocharles ];
+ };
+})
diff --git a/pkgs/development/libraries/haskell/unix-bytestring/default.nix b/pkgs/development/libraries/haskell/unix-bytestring/default.nix
index 174fc925aae..484ab6148a2 100644
--- a/pkgs/development/libraries/haskell/unix-bytestring/default.nix
+++ b/pkgs/development/libraries/haskell/unix-bytestring/default.nix
@@ -2,8 +2,8 @@
cabal.mkDerivation (self: {
pname = "unix-bytestring";
- version = "0.3.7";
- sha256 = "1qwgs2bwga057csfa8izq0kc5vwi2vcaz2snlcgp0h9vql3qmvrg";
+ version = "0.3.7.2";
+ sha256 = "0n1i7pcdwhs0wz6spf3pndr8i74qn0cdzr3p46w4r4mvvwr76i2s";
meta = {
homepage = "http://code.haskell.org/~wren/";
description = "Unix/Posix-specific functions for ByteStrings";
diff --git a/pkgs/development/libraries/haskell/uri/default.nix b/pkgs/development/libraries/haskell/uri/default.nix
new file mode 100644
index 00000000000..aa94c931e54
--- /dev/null
+++ b/pkgs/development/libraries/haskell/uri/default.nix
@@ -0,0 +1,14 @@
+{ cabal, parsec, safe, utf8String }:
+
+cabal.mkDerivation (self: {
+ pname = "uri";
+ version = "0.1.6.2";
+ sha256 = "0f2ms8awm4x7pw8ms6in0mxspqmnhv8bxas0947rkrzc5m9k0h3s";
+ buildDepends = [ parsec safe utf8String ];
+ meta = {
+ homepage = "http://gitorious.org/uri";
+ description = "Library for working with URIs";
+ license = self.stdenv.lib.licenses.bsd3;
+ platforms = self.ghc.meta.platforms;
+ };
+})
diff --git a/pkgs/development/libraries/haskell/vacuum-graphviz/default.nix b/pkgs/development/libraries/haskell/vacuum-graphviz/default.nix
new file mode 100644
index 00000000000..2db9e3c83c1
--- /dev/null
+++ b/pkgs/development/libraries/haskell/vacuum-graphviz/default.nix
@@ -0,0 +1,14 @@
+{ cabal, filepath, graphviz, vacuum }:
+
+cabal.mkDerivation (self: {
+ pname = "vacuum-graphviz";
+ version = "2.1.0.1";
+ sha256 = "093ba6n30a6gyifnk3bd50rkx8qldjqq9vsk92pnq152ibs36b2m";
+ buildDepends = [ filepath graphviz vacuum ];
+ jailbreak = true;
+ meta = {
+ description = "A library for transforming vacuum graphs into GraphViz output";
+ license = self.stdenv.lib.licenses.gpl3;
+ platforms = self.ghc.meta.platforms;
+ };
+})
diff --git a/pkgs/development/libraries/haskell/wai/default.nix b/pkgs/development/libraries/haskell/wai/default.nix
index a0164a3950c..18c6e08c0b3 100644
--- a/pkgs/development/libraries/haskell/wai/default.nix
+++ b/pkgs/development/libraries/haskell/wai/default.nix
@@ -4,8 +4,8 @@
cabal.mkDerivation (self: {
pname = "wai";
- version = "2.1.0.1";
- sha256 = "03gp3ijdpyyh7zic89laj0y4wsi8f49lbqlqq8w9msfgizjhvdv6";
+ version = "2.1.0.2";
+ sha256 = "02hj07s3vlhbd2hds5pyksghildadjqhr8mmiyabwb7ap8iybidg";
buildDepends = [
blazeBuilder conduit conduitExtra httpTypes network text
transformers vault
diff --git a/pkgs/development/libraries/haskell/warp-tls/default.nix b/pkgs/development/libraries/haskell/warp-tls/default.nix
index b04d9439d2d..cca9da9eb3d 100644
--- a/pkgs/development/libraries/haskell/warp-tls/default.nix
+++ b/pkgs/development/libraries/haskell/warp-tls/default.nix
@@ -5,8 +5,8 @@
cabal.mkDerivation (self: {
pname = "warp-tls";
- version = "2.0.3.2";
- sha256 = "1dqaq1z4gb3sya41hiwsxgl4f0v7sqza7aazf2vc7dd5x5izp02w";
+ version = "2.0.3.3";
+ sha256 = "03fjghsa9zvrvg7ickph577zzr62n91gsb99v9k47s4nd2xri2rj";
buildDepends = [
conduit conduitExtra cprngAes dataDefaultClass network
networkConduit resourcet streamingCommons tls transformers wai warp
diff --git a/pkgs/development/libraries/haskell/warp/default.nix b/pkgs/development/libraries/haskell/warp/default.nix
index c67ea5c25e0..75ccd0e6f5d 100644
--- a/pkgs/development/libraries/haskell/warp/default.nix
+++ b/pkgs/development/libraries/haskell/warp/default.nix
@@ -1,4 +1,4 @@
-{ cabal, blazeBuilder, blazeBuilderConduit, caseInsensitive
+{ cabal, async, blazeBuilder, blazeBuilderConduit, caseInsensitive
, conduit, conduitExtra, doctest, hashable, hspec, HTTP, httpDate
, httpTypes, HUnit, liftedBase, network, networkConduit, QuickCheck
, simpleSendfile, streamingCommons, text, time, transformers
@@ -7,8 +7,8 @@
cabal.mkDerivation (self: {
pname = "warp";
- version = "2.1.3.3";
- sha256 = "1dbarrjb6y4cbc1dc265b008b6d5qziqnikdbnbdlrwfzr97cz23";
+ version = "2.1.4";
+ sha256 = "090xbjqwj8wzxiaal2jdsk7dbqv07c1cw32w7v8xxi2dkvv6nwbb";
buildDepends = [
blazeBuilder blazeBuilderConduit caseInsensitive conduit
conduitExtra hashable httpDate httpTypes liftedBase network
@@ -16,7 +16,7 @@ cabal.mkDerivation (self: {
unixCompat void wai
];
testDepends = [
- blazeBuilder blazeBuilderConduit caseInsensitive conduit
+ async blazeBuilder blazeBuilderConduit caseInsensitive conduit
conduitExtra doctest hashable hspec HTTP httpDate httpTypes HUnit
liftedBase network networkConduit QuickCheck simpleSendfile
streamingCommons text time transformers unixCompat void wai
diff --git a/pkgs/development/libraries/haskell/websockets/default.nix b/pkgs/development/libraries/haskell/websockets/default.nix
index c0d500ace71..cc5caddb6ec 100644
--- a/pkgs/development/libraries/haskell/websockets/default.nix
+++ b/pkgs/development/libraries/haskell/websockets/default.nix
@@ -6,8 +6,8 @@
cabal.mkDerivation (self: {
pname = "websockets";
- version = "0.8.2.0";
- sha256 = "1gphlil7n0g9y6vqwyn9fc4sl2ccninznc59p11052j8q6yb34ia";
+ version = "0.8.2.1";
+ sha256 = "0ayh20a6xj3ab9ld3lmrazx94vbbf1xn65nxcpkq7cvm8ggim7a6";
buildDepends = [
attoparsec base64Bytestring binary blazeBuilder caseInsensitive
entropy ioStreams mtl network random SHA text
diff --git a/pkgs/development/libraries/haskell/xml-lens/default.nix b/pkgs/development/libraries/haskell/xml-lens/default.nix
new file mode 100644
index 00000000000..7c4496f974f
--- /dev/null
+++ b/pkgs/development/libraries/haskell/xml-lens/default.nix
@@ -0,0 +1,14 @@
+{ cabal, lens, text, xmlConduit }:
+
+cabal.mkDerivation (self: {
+ pname = "xml-lens";
+ version = "0.1.6.1";
+ sha256 = "093grvlpm19l3g10ka82xpzl2wr0gli71kfkbvk4gvg3194fkw4h";
+ buildDepends = [ lens text xmlConduit ];
+ meta = {
+ homepage = "https://github.com/fumieval/xml-lens";
+ description = "Lenses, traversals, prisms for xml-conduit";
+ license = self.stdenv.lib.licenses.bsd3;
+ platforms = self.ghc.meta.platforms;
+ };
+})
diff --git a/pkgs/development/libraries/haskell/yesod-auth/default.nix b/pkgs/development/libraries/haskell/yesod-auth/default.nix
index 93e1bb9cadd..182e6bcf5b2 100644
--- a/pkgs/development/libraries/haskell/yesod-auth/default.nix
+++ b/pkgs/development/libraries/haskell/yesod-auth/default.nix
@@ -9,8 +9,8 @@
cabal.mkDerivation (self: {
pname = "yesod-auth";
- version = "1.3.0.2";
- sha256 = "1lx9xz5jrr63256w64isndwr323khsyyn8ah1iv1vy7n54y9afpk";
+ version = "1.3.0.4";
+ sha256 = "0r4xhr9xg6n3jxpj3mrcaf4mgzz8h4is772k84sgnir5my9lrsr7";
buildDepends = [
aeson authenticate base16Bytestring blazeHtml blazeMarkup
cryptohash dataDefault emailValidate fileEmbed hamlet httpConduit
diff --git a/pkgs/development/libraries/haskell/yesod-bin/default.nix b/pkgs/development/libraries/haskell/yesod-bin/default.nix
index baf4a9dd4d5..46b78fcbd8f 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.7.4";
- sha256 = "1nhpn8855jhvjmh5fdvjic20lyx6k054kfp8j0lwvdcd79c7bl77";
+ version = "1.2.8";
+ sha256 = "0hic32k1ii1j2hrwxj7pc7vv26dmq8rv7h7as1fw0bwlysrnw8nm";
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 3083eb0c929..5051eaff698 100644
--- a/pkgs/development/libraries/haskell/yesod-core/default.nix
+++ b/pkgs/development/libraries/haskell/yesod-core/default.nix
@@ -1,26 +1,26 @@
{ cabal, aeson, async, attoparsecConduit, blazeBuilder, blazeHtml
, blazeMarkup, caseInsensitive, cereal, clientsession, conduit
-, conduitExtra, cookie, dataDefault, fastLogger, hamlet, hspec
-, httpTypes, HUnit, liftedBase, monadControl, monadLogger, network
-, networkConduit, parsec, pathPieces, QuickCheck, random, resourcet
-, safe, shakespeare, shakespeareCss, shakespeareI18n, shakespeareJs
-, streamingCommons, text, time, transformers, transformersBase
-, unixCompat, vector, wai, waiExtra, waiLogger, waiTest, warp
-, yesodRoutes
+, conduitExtra, cookie, dataDefault, exceptions, fastLogger, hamlet
+, hspec, httpTypes, HUnit, liftedBase, monadControl, monadLogger
+, mtl, network, networkConduit, parsec, pathPieces, QuickCheck
+, random, resourcet, safe, shakespeare, shakespeareCss
+, shakespeareI18n, shakespeareJs, streamingCommons, text, time
+, transformers, transformersBase, unixCompat, vector, wai, waiExtra
+, waiLogger, waiTest, warp, yesodRoutes
}:
cabal.mkDerivation (self: {
pname = "yesod-core";
- version = "1.2.9.2";
- sha256 = "1ip5rra426agqv5v2hmxcp1g3xjvi9wnixrpdnxvifflhr7gchfl";
+ version = "1.2.12";
+ sha256 = "0bgi140v2z25cfvcydzaif7id8mv341r8iclkiz0lbqxs7d29zxz";
buildDepends = [
aeson attoparsecConduit blazeBuilder blazeHtml blazeMarkup
caseInsensitive cereal clientsession conduit conduitExtra cookie
- dataDefault fastLogger hamlet httpTypes liftedBase monadControl
- monadLogger parsec pathPieces random resourcet safe shakespeare
- shakespeareCss shakespeareI18n shakespeareJs text time transformers
- transformersBase unixCompat vector wai waiExtra waiLogger warp
- yesodRoutes
+ dataDefault exceptions fastLogger hamlet httpTypes liftedBase
+ monadControl monadLogger mtl parsec pathPieces random resourcet
+ safe shakespeare shakespeareCss shakespeareI18n shakespeareJs text
+ time transformers transformersBase unixCompat vector wai waiExtra
+ waiLogger warp yesodRoutes
];
testDepends = [
async blazeBuilder conduit conduitExtra hamlet hspec httpTypes
diff --git a/pkgs/development/libraries/haskell/yesod-form/default.nix b/pkgs/development/libraries/haskell/yesod-form/default.nix
index a67eccb00c2..42e1f13242e 100644
--- a/pkgs/development/libraries/haskell/yesod-form/default.nix
+++ b/pkgs/development/libraries/haskell/yesod-form/default.nix
@@ -7,8 +7,8 @@
cabal.mkDerivation (self: {
pname = "yesod-form";
- version = "1.3.8.1";
- sha256 = "0cyvyr3whrbswawv5rcfmq9nhk3kf4d3vgfm8z01prcqdsc4yh21";
+ version = "1.3.8.2";
+ sha256 = "0sx2rk4z4hzwz3nzcg487wm5bdpdm612ikp0slfph1wkzc39h12a";
buildDepends = [
aeson attoparsec blazeBuilder blazeHtml blazeMarkup byteable
dataDefault emailValidate hamlet network persistent resourcet
diff --git a/pkgs/development/libraries/haskell/yesod-persistent/default.nix b/pkgs/development/libraries/haskell/yesod-persistent/default.nix
index a96db23f952..432adeee9af 100644
--- a/pkgs/development/libraries/haskell/yesod-persistent/default.nix
+++ b/pkgs/development/libraries/haskell/yesod-persistent/default.nix
@@ -5,8 +5,8 @@
cabal.mkDerivation (self: {
pname = "yesod-persistent";
- version = "1.2.2.2";
- sha256 = "112wr85k8a7ah1m5s8b9h1dm3hbglckdhngp12d67rccrr4mmgjq";
+ version = "1.2.2.3";
+ sha256 = "1699grrxb1qwfiivh9ihnczkcbwl4gcqdk7m02lc09r9gjr920p8";
buildDepends = [
blazeBuilder conduit persistent persistentTemplate resourcePool
resourcet transformers yesodCore
diff --git a/pkgs/development/libraries/haskell/zlib-conduit/default.nix b/pkgs/development/libraries/haskell/zlib-conduit/default.nix
index b283c496a29..3029cc8c3b6 100644
--- a/pkgs/development/libraries/haskell/zlib-conduit/default.nix
+++ b/pkgs/development/libraries/haskell/zlib-conduit/default.nix
@@ -1,16 +1,14 @@
-{ cabal, conduit, hspec, QuickCheck, resourcet, transformers, void
-, zlibBindings
-}:
+{ cabal, conduit }:
cabal.mkDerivation (self: {
pname = "zlib-conduit";
- version = "1.0.0";
- sha256 = "0q0l4qw1f2cwjj71n4i082ba47x1xba695q8xk0ky2vw5s8cg0bv";
- buildDepends = [ conduit transformers void zlibBindings ];
- testDepends = [ conduit hspec QuickCheck resourcet transformers ];
+ version = "1.1.0";
+ sha256 = "1b22mca8bbg7f84h8y0qsb5ckzg2dw1b26y27x7b7xdxqbwpz93a";
+ buildDepends = [ conduit ];
+ noHaddock = true;
meta = {
homepage = "http://github.com/snoyberg/conduit";
- description = "Streaming compression/decompression via conduits";
+ description = "Streaming compression/decompression via conduits. (deprecated)";
license = self.stdenv.lib.licenses.bsd3;
platforms = self.ghc.meta.platforms;
maintainers = [ self.stdenv.lib.maintainers.andres ];
diff --git a/pkgs/development/libraries/ibus/default.nix b/pkgs/development/libraries/ibus/default.nix
index 75eb1b4134c..905f11dfdc2 100644
--- a/pkgs/development/libraries/ibus/default.nix
+++ b/pkgs/development/libraries/ibus/default.nix
@@ -21,9 +21,9 @@ stdenv.mkDerivation rec {
preBuild = "patchShebangs ./scripts";
- postInstall = ''
+ preFixup = ''
for f in "$out"/bin/*; do
- wrapProgram "$f" --prefix XDG_DATA_DIRS : "$out/share" \
+ wrapProgram "$f" --prefix XDG_DATA_DIRS : "$out/share:$GSETTINGS_SCHEMAS_PATH" \
--prefix PYTHONPATH : "$(toPythonPath ${pygobject3})" \
--prefix LD_LIBRARY_PATH : "${gnome3.gtk3}/lib:${atk}/lib:$out/lib" \
--prefix GI_TYPELIB_PATH : "$GI_TYPELIB_PATH:$out/lib/girepository-1.0" \
diff --git a/pkgs/development/libraries/libdvdread/default.nix b/pkgs/development/libraries/libdvdread/default.nix
index ee5d2e5e50e..2593274d89b 100644
--- a/pkgs/development/libraries/libdvdread/default.nix
+++ b/pkgs/development/libraries/libdvdread/default.nix
@@ -1,11 +1,11 @@
{stdenv, fetchurl, libdvdcss}:
stdenv.mkDerivation {
- name = "libdvdread-4.1.3";
+ name = "libdvdread-4.2.1";
src = fetchurl {
- url = http://www.mplayerhq.hu/MPlayer/releases/dvdnav/libdvdread-4.1.3.tar.bz2;
- sha1 = "fc4c7ba3e49929191e057b435bc4f867583ea8d5";
+ url = http://dvdnav.mplayerhq.hu/releases/libdvdread-4.2.1.tar.xz;
+ sha256 = "af9b98f049580a6521d56c978b736d3d609562dd12955e11d50e26d97542dcd4";
};
buildInputs = [libdvdcss];
diff --git a/pkgs/development/libraries/libmusicbrainz/5.x.nix b/pkgs/development/libraries/libmusicbrainz/5.x.nix
new file mode 100644
index 00000000000..7cdb8fb4691
--- /dev/null
+++ b/pkgs/development/libraries/libmusicbrainz/5.x.nix
@@ -0,0 +1,25 @@
+{ stdenv, fetchurl, cmake, neon, libdiscid }:
+
+stdenv.mkDerivation rec {
+ name = "libmusicbrainz-5.0.1";
+
+ buildInputs = [ cmake neon libdiscid ];
+
+ src = fetchurl {
+ url = "https://github.com/downloads/metabrainz/libmusicbrainz/${name}.tar.gz";
+ md5 = "a0406b94c341c2b52ec0fe98f57cadf3";
+ };
+
+ dontUseCmakeBuildDir=true;
+
+ meta = {
+ homepage = http://musicbrainz.org/doc/libmusicbrainz;
+ description = "MusicBrainz Client Library (5.x version)";
+ longDescription = ''
+ The libmusicbrainz (also known as mb_client or MusicBrainz Client
+ Library) is a development library geared towards developers who wish to
+ add MusicBrainz lookup capabilities to their applications.'';
+ maintainers = [ stdenv.lib.maintainers.urkud ];
+ platforms = stdenv.lib.platforms.all;
+ };
+}
diff --git a/pkgs/development/libraries/libnotify/default.nix b/pkgs/development/libraries/libnotify/default.nix
index 00308bf9471..2b82fe2a4bc 100644
--- a/pkgs/development/libraries/libnotify/default.nix
+++ b/pkgs/development/libraries/libnotify/default.nix
@@ -1,4 +1,5 @@
-{ stdenv, fetchurl, pkgconfig, automake, autoconf, libtool, glib, gdk_pixbuf }:
+{ stdenv, fetchurl, pkgconfig, automake, autoconf, libtool
+, glib, gdk_pixbuf, gobjectIntrospection, autoreconfHook }:
stdenv.mkDerivation rec {
ver_maj = "0.7";
@@ -9,23 +10,15 @@ stdenv.mkDerivation rec {
url = "mirror://gnome/sources/libnotify/${ver_maj}/${name}.tar.xz";
sha256 = "0dyq8zgjnnzcah31axnx6afb21kl7bks1gvrg4hjh3nk02j1rxhf";
};
- src_m4 = fetchurl {
- url = "mirror://gentoo/distfiles/introspection-20110205.m4.tar.bz2";
- sha256 = "1cnqh7aaji648nfd5537v7xaak8hgww3bpifhwam7bl0sc3ad523";
- };
# see Gentoo ebuild - we don't need to depend on gtk+(2/3)
- preConfigure = ''
- cd m4
- tar xvf ${src_m4}
- cd ..
-
+ preAutoreconf = ''
sed -i -e 's:noinst_PROG:check_PROG:' tests/Makefile.am || die
sed -i -e '/PKG_CHECK_MODULES(TESTS/d' configure.ac || die
- AT_M4DIR=. autoreconf
'';
- buildInputs = [ pkgconfig automake autoconf glib gdk_pixbuf ];
+ buildInputs = [ pkgconfig automake autoconf autoreconfHook
+ libtool glib gdk_pixbuf gobjectIntrospection ];
meta = {
homepage = http://galago-project.org/; # very obsolete but found no better
diff --git a/pkgs/development/libraries/liboauth/default.nix b/pkgs/development/libraries/liboauth/default.nix
index 5a3b54544b5..b3eee8ed434 100644
--- a/pkgs/development/libraries/liboauth/default.nix
+++ b/pkgs/development/libraries/liboauth/default.nix
@@ -2,11 +2,11 @@
stdenv.mkDerivation rec {
- name = "liboauth-1.0.1";
+ name = "liboauth-1.0.2";
src = fetchurl {
url = "mirror://sourceforge/liboauth/${name}.tar.gz";
- sha256 = "12wdwq09nba8dzzcgcpbzmgcjr141ky69pm78s15hyyvw4px71sh";
+ sha256 = "1qs58yzydw20dmzvx22i541w641kwd6ja80s9na1az32n1krh6zv";
};
buildInputs = [ nss openssl ];
@@ -15,6 +15,7 @@ stdenv.mkDerivation rec {
platforms = platforms.linux;
description = "C library implementing the OAuth secure authentication protocol";
homepage = http://liboauth.sourceforge.net/;
+ repositories.git = https://github.com/x42/liboauth.git;
};
}
diff --git a/pkgs/development/libraries/libpwquality/default.nix b/pkgs/development/libraries/libpwquality/default.nix
new file mode 100644
index 00000000000..aaa39783fa7
--- /dev/null
+++ b/pkgs/development/libraries/libpwquality/default.nix
@@ -0,0 +1,12 @@
+{ stdenv, cracklib, fetchurl, python }:
+
+stdenv.mkDerivation rec {
+ name = "libpwquality-1.2.3";
+
+ src = fetchurl {
+ url = "https://fedorahosted.org/releases/l/i/libpwquality/${name}.tar.bz2";
+ sha256 = "0sjiabvl5277nfxyy96jdz65a0a3pmkkwrfbziwgik83gg77j75i";
+ };
+
+ buildInputs = [ cracklib python ];
+}
diff --git a/pkgs/development/libraries/libresample/default.nix b/pkgs/development/libraries/libresample/default.nix
new file mode 100644
index 00000000000..9ef1ada0a42
--- /dev/null
+++ b/pkgs/development/libraries/libresample/default.nix
@@ -0,0 +1,27 @@
+{stdenv, fetchurl, cmake}:
+
+let
+ patch = fetchurl {
+ url = http://ftp.debian.org/debian/pool/main/libr/libresample/libresample_0.1.3-3.diff.gz;
+ sha256 = "063w8rqxw87fc89gas47vk0ll7xl8cy7d8g70gm1l62bqkkajklx";
+ };
+in
+stdenv.mkDerivation {
+ name = "libresample-0.1.3";
+ src = fetchurl {
+ url = http://ftp.debian.org/debian/pool/main/libr/libresample/libresample_0.1.3.orig.tar.gz;
+ sha256 = "05a8mmh1bw5afqx0kfdqzmph4x2npcs4idx0p0v6q95lwf22l8i0";
+ };
+ patches = [ patch ];
+ preConfigure = ''
+ cat debian/patches/1001_shlib-cmake.patch | patch -p1
+ '';
+ buildInputs = [ cmake ];
+
+ meta = {
+ description = "A real-time library for sampling rate conversion library";
+ license = stdenv.lib.licenses.lgpl2Plus;
+ homepage = https://ccrma.stanford.edu/~jos/resample/Free_Resampling_Software.html;
+ maintainers = stdenv.lib.maintainers.sander;
+ };
+}
diff --git a/pkgs/development/libraries/libseccomp/default.nix b/pkgs/development/libraries/libseccomp/default.nix
new file mode 100644
index 00000000000..a66d31d2ec4
--- /dev/null
+++ b/pkgs/development/libraries/libseccomp/default.nix
@@ -0,0 +1,31 @@
+{ stdenv, fetchurl, getopt, bash }:
+
+stdenv.mkDerivation rec {
+ name = "libseccomp-${version}";
+ version = "2.1.1";
+
+ src = fetchurl {
+ url = "mirror://sourceforge/libseccomp/libseccomp-${version}.tar.gz";
+ sha256 = "0744mjx5m3jl1hzz13zypivl88m0wn44mf5gsrd3yf3w80gc24l8";
+ };
+
+ # This fixes the check for 'getopt' to function appropriately.
+ # Additionally, this package can optionally include the kernel
+ # headers if they exist, or use its own inline copy of the source
+ # for talking to the seccomp filter - we opt to always use the
+ # inline copy
+ patchPhase = ''
+ substituteInPlace ./configure --replace "/bin/bash" "${bash}/bin/bash"
+ substituteInPlace ./configure --replace "verify_deps getopt" ""
+ substituteInPlace ./configure --replace getopt ${getopt}/bin/getopt
+ substituteInPlace ./configure --replace 'opt_sysinc_seccomp="yes"' 'opt_sysinc_seccomp="no"'
+ '';
+
+ meta = {
+ description = "high level library for the Linux Kernel seccomp filter";
+ homepage = "http://sourceforge.net/projects/libseccomp";
+ license = stdenv.lib.licenses.lgpl2;
+ platforms = stdenv.lib.platforms.linux;
+ maintainers = [ stdenv.lib.maintainers.thoughtpolice ];
+ };
+}
diff --git a/pkgs/development/libraries/libsigcxx/default.nix b/pkgs/development/libraries/libsigcxx/default.nix
index a127e7322eb..610d14568ae 100644
--- a/pkgs/development/libraries/libsigcxx/default.nix
+++ b/pkgs/development/libraries/libsigcxx/default.nix
@@ -1,11 +1,11 @@
{ stdenv, fetchurl, pkgconfig, gnum4 }:
stdenv.mkDerivation rec {
- name = "libsigc++-2.2.11";
+ name = "libsigc++-2.3.1";
src = fetchurl {
- url = "mirror://gnome/sources/libsigc++/2.2/${name}.tar.xz";
- sha256 = "0ms93q7r8zznsqkfdj1ds9533f0aqfaw3kdkqv154rzmfigh8d4q";
+ url = "mirror://gnome/sources/libsigc++/2.3/${name}.tar.xz";
+ sha256 = "14q3sq6d43f6wfcmwhw4v1aal4ba0h5x9v6wkxy2dnqznd95il37";
};
buildInputs = [ pkgconfig gnum4 ];
diff --git a/pkgs/development/libraries/libtxc_dxtn_s2tc/default.nix b/pkgs/development/libraries/libtxc_dxtn_s2tc/default.nix
new file mode 100644
index 00000000000..86f5029e9a5
--- /dev/null
+++ b/pkgs/development/libraries/libtxc_dxtn_s2tc/default.nix
@@ -0,0 +1,23 @@
+{ stdenv, fetchurl, autoreconfHook, mesa }:
+
+let version = "1.0"; in
+
+stdenv.mkDerivation rec {
+ name = "libtxc_dxtn_s2tc-${version}";
+
+ src = fetchurl {
+ url = "https://github.com/divVerent/s2tc/archive/v${version}.tar.gz";
+ sha256 = "0ibfdib277fhbqvxzan0bmglwnsl1y1rw2g8skvz82l1sfmmn752";
+ };
+
+ buildInputs = [ autoreconfHook mesa ];
+
+ meta = {
+ description = "A patent-free S3TC compatible implementation";
+ homepage = https://github.com/divVerent/s2tc;
+ repositories.git = https://github.com/divVerent/s2tc.git;
+ license = stdenv.lib.licenses.mit;
+ platforms = stdenv.lib.platforms.linux;
+ maintainers = [ stdenv.lib.maintainers.page ];
+ };
+}
diff --git a/pkgs/development/libraries/liburcu/default.nix b/pkgs/development/libraries/liburcu/default.nix
index 44daabe6a73..e7f627f62f7 100644
--- a/pkgs/development/libraries/liburcu/default.nix
+++ b/pkgs/development/libraries/liburcu/default.nix
@@ -1,12 +1,12 @@
{ stdenv, fetchurl }:
stdenv.mkDerivation rec {
- version = "0.8.1";
+ version = "0.8.4";
name = "liburcu-${version}";
src = fetchurl {
url = "http://lttng.org/files/urcu/userspace-rcu-${version}.tar.bz2";
- sha256 = "07p0lh43j7i1606m4l1dxm195z6fcfz74fmx7q2d7mrhn2bzc240";
+ sha256 = "04py48xphylb246mpkzvld0yprj5h7cyv6pydr8b25aax5bs3h4n";
};
meta = with stdenv.lib; {
diff --git a/pkgs/development/libraries/libvirt-glib/default.nix b/pkgs/development/libraries/libvirt-glib/default.nix
new file mode 100644
index 00000000000..afce119e396
--- /dev/null
+++ b/pkgs/development/libraries/libvirt-glib/default.nix
@@ -0,0 +1,48 @@
+{ stdenv, fetchurl, pkgconfig, libvirt, glib, libxml2, intltool, libtool, yajl
+, nettle, libgcrypt, python, pygobject, gobjectIntrospection, libcap_ng
+}:
+
+stdenv.mkDerivation rec {
+ name = "libvirt-glib-0.1.8";
+
+ src = fetchurl {
+ url = "http://libvirt.org/sources/glib/${name}.tar.gz";
+ sha256 = "0ld7g9vlpdzx8rm90i8y1gnpygkn20x5z12gvsgms7dy5nala3ns";
+ };
+
+ buildInputs = [
+ pkgconfig libvirt glib libxml2 intltool libtool yajl nettle libgcrypt
+ python pygobject gobjectIntrospection libcap_ng
+ ];
+
+ # Compiler flag -fstack-protector-all fixes this build error:
+ #
+ # ./.libs/libvirt-glib-1.0.so: undefined reference to `__stack_chk_guard'
+ #
+ # And the extra include path fixes this build error:
+ #
+ # In file included from ../libvirt-gobject/libvirt-gobject-domain-device.h:30:0,
+ # from /tmp/nix-build-libvirt-glib-0.1.7.drv-2/libvirt-glib-0.1.7/libvirt-gobject/libvirt-gobject.h:33,
+ # from :4:
+ # ../libvirt-gobject/libvirt-gobject-domain.h:33:29: fatal error: libvirt/libvirt.h: No such file or directory
+ # compilation terminated.
+ # make[3]: *** [LibvirtGObject-1.0.gir] Error 1
+ preConfigure = ''
+ export NIX_CFLAGS_COMPILE="-fstack-protector-all -I${libvirt}/include"
+ '';
+
+ meta = with stdenv.lib; {
+ description = "Library for working with virtual machines";
+ longDescription = ''
+ libvirt-glib wraps libvirt to provide a high-level object-oriented API better
+ suited for glib-based applications, via three libraries:
+
+ - libvirt-glib - GLib main loop integration & misc helper APIs
+ - libvirt-gconfig - GObjects for manipulating libvirt XML documents
+ - libvirt-gobject - GObjects for managing libvirt objects
+ '';
+ homepage = http://libvirt.org/;
+ license = licenses.lgpl2Plus;
+ platforms = platforms.linux;
+ };
+}
diff --git a/pkgs/development/libraries/libxklavier/default.nix b/pkgs/development/libraries/libxklavier/default.nix
index cb3c3b23e7f..18f57473fb9 100644
--- a/pkgs/development/libraries/libxklavier/default.nix
+++ b/pkgs/development/libraries/libxklavier/default.nix
@@ -1,5 +1,5 @@
{ stdenv, fetchurl, pkgconfig, libX11, libXi, xkeyboard_config, libxml2
-, libICE, glib, libxkbfile, isocodes }:
+, libICE, glib, libxkbfile, isocodes, gobjectIntrospection }:
let
version = "5.3";
@@ -17,6 +17,8 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ pkgconfig ];
+ buildInputs = [ gobjectIntrospection ];
+
configureFlags = ''
--with-xkb-base=${xkeyboard_config}/etc/X11/xkb
--disable-xmodmap-support
diff --git a/pkgs/development/libraries/libyaml/default.nix b/pkgs/development/libraries/libyaml/default.nix
index 15ba83b757a..d0ad17048aa 100644
--- a/pkgs/development/libraries/libyaml/default.nix
+++ b/pkgs/development/libraries/libyaml/default.nix
@@ -1,13 +1,13 @@
{ stdenv, fetchurl }:
let
- version = "0.1.5";
+ version = "0.1.6";
in
stdenv.mkDerivation {
name = "libyaml-${version}";
src = fetchurl {
url = "http://pyyaml.org/download/libyaml/yaml-${version}.tar.gz";
- sha256 = "1vrv5ly58bkmcyc049ad180f2m8iav6l9h3v8l2fqdmrny7yx1zs";
+ sha256 = "0j9731s5zjb8mjx7wzf6vh7bsqi38ay564x6s9nri2nh9cdrg9kx";
};
meta = with stdenv.lib; {
diff --git a/pkgs/development/libraries/mesa/default.nix b/pkgs/development/libraries/mesa/default.nix
index e5cd54c572f..9452ae0a7c2 100644
--- a/pkgs/development/libraries/mesa/default.nix
+++ b/pkgs/development/libraries/mesa/default.nix
@@ -95,8 +95,7 @@ stdenv.mkDerivation {
;
enableParallelBuilding = true;
- #doCheck = true; # https://bugs.freedesktop.org/show_bug.cgi?id=67672,
- #tests for 10.* fail to link due to some RTTI problem
+ #doCheck = true; # https://bugs.freedesktop.org/show_bug.cgi?id=67672
# move gallium-related stuff to $drivers, so $out doesn't depend on LLVM;
# also move libOSMesa to $osmesa, as it's relatively big
@@ -152,11 +151,6 @@ stdenv.mkDerivation {
substituteInPlace "$out/lib/pkgconfig/dri.pc" --replace '$(drivers)' "${driverLink}"
'' + /* move vdpau drivers to $drivers/lib, so they are found */ ''
mv "$drivers"/lib/vdpau/* "$drivers"/lib/ && rmdir "$drivers"/lib/vdpau
- '' + /* add libGL* links from /run/opengl-driver */ ''
- (
- cd "$drivers/lib"
- cp -s "$out"/lib/*.so .
- )
'';
#ToDo: @vcunat isn't sure if drirc will be found when in $out/etc/, but it doesn't seem important ATM
diff --git a/pkgs/development/libraries/ncurses/default.nix b/pkgs/development/libraries/ncurses/default.nix
index 2e5db48b7df..993993cecd0 100644
--- a/pkgs/development/libraries/ncurses/default.nix
+++ b/pkgs/development/libraries/ncurses/default.nix
@@ -21,7 +21,7 @@ stdenv.mkDerivation (rec {
patches = [ ./patch-ac ];
configureFlags = ''
- --with-shared --without-debug --enable-pc-files
+ --with-shared --without-debug --enable-pc-files --enable-symlinks
${if unicode then "--enable-widec" else ""}${if cxx then "" else "--without-cxx-binding"}
'';
diff --git a/pkgs/development/libraries/openldap/default.nix b/pkgs/development/libraries/openldap/default.nix
index c4be3358049..c8e8ff35277 100644
--- a/pkgs/development/libraries/openldap/default.nix
+++ b/pkgs/development/libraries/openldap/default.nix
@@ -1,11 +1,11 @@
{stdenv, fetchurl, openssl, cyrus_sasl, db, groff}:
stdenv.mkDerivation rec {
- name = "openldap-2.4.38";
+ name = "openldap-2.4.39";
src = fetchurl {
url = "ftp://ftp.nl.uu.net/pub/unix/db/openldap/openldap-release/${name}.tgz";
- sha256 = "1l8zng86alhcmmmw09r1c4dzl7yvk6dy5fq9zia96pgck4srl848";
+ sha256 = "19zq9dc7dl03wmqd11fbsdii1npyq1vlicl3nxbfygqh8xrwhrw2";
};
buildInputs = [ openssl cyrus_sasl db groff ];
diff --git a/pkgs/development/libraries/openssl/default.nix b/pkgs/development/libraries/openssl/default.nix
index 7d7ccacd14a..0d57018dcd6 100644
--- a/pkgs/development/libraries/openssl/default.nix
+++ b/pkgs/development/libraries/openssl/default.nix
@@ -2,7 +2,7 @@
, withCryptodev ? false, cryptodevHeaders }:
let
- name = "openssl-1.0.1f";
+ name = "openssl-1.0.1g";
opensslCrossSystem = stdenv.lib.attrByPath [ "openssl" "system" ]
(throw "openssl needs its platform name cross building" null)
@@ -41,7 +41,7 @@ stdenv.mkDerivation {
"http://www.openssl.org/source/${name}.tar.gz"
"http://openssl.linux-mirror.org/source/${name}.tar.gz"
];
- sha256 = "0nnbr70dg67raqsqvlypzxa1v5xsv9gp91f9pavyckfn2w5sihkc";
+ sha256 = "0a70qdqccg16nw4bbawa6pjvzn05vfp5wkwg6jl0grch7f683jsk";
};
patches = patchesCross false;
diff --git a/pkgs/development/libraries/pango/default.nix b/pkgs/development/libraries/pango/default.nix
index b94a00b1b54..2dc71bb2d11 100644
--- a/pkgs/development/libraries/pango/default.nix
+++ b/pkgs/development/libraries/pango/default.nix
@@ -9,9 +9,9 @@ stdenv.mkDerivation rec {
sha256 = "08aqis6j8nd1lb4f2h4h9d9kjvp54iwf8zvqzss0qn4v7nfcjyvx";
};
- buildInputs = [ gobjectIntrospection ]
- ++ stdenv.lib.optionals stdenv.isDarwin [ gettext fontconfig ];
-
+ buildInputs = with stdenv.lib;
+ optional (!stdenv.isDarwin) gobjectIntrospection # build problems of itself and flex
+ ++ optionals stdenv.isDarwin [ gettext fontconfig ];
nativeBuildInputs = [ pkgconfig ];
diff --git a/pkgs/development/libraries/spice-gtk/default.nix b/pkgs/development/libraries/spice-gtk/default.nix
index 60bf24dfd78..adb1fe90558 100644
--- a/pkgs/development/libraries/spice-gtk/default.nix
+++ b/pkgs/development/libraries/spice-gtk/default.nix
@@ -1,6 +1,7 @@
{ stdenv, fetchurl, pkgconfig, gtk, spice_protocol, intltool, celt_0_5_1
, openssl, pulseaudio, pixman, gobjectIntrospection, libjpeg_turbo, zlib
-, cyrus_sasl, python, pygtk, autoconf, automake, libtool }:
+, cyrus_sasl, python, pygtk, autoconf, automake, libtool, usbredir
+, gtk3, enableGTK3 ? false }:
with stdenv.lib;
@@ -13,9 +14,9 @@ stdenv.mkDerivation rec {
};
buildInputs = [
- gtk spice_protocol celt_0_5_1 openssl pulseaudio pixman gobjectIntrospection
- libjpeg_turbo zlib cyrus_sasl python pygtk
- ];
+ spice_protocol celt_0_5_1 openssl pulseaudio pixman gobjectIntrospection
+ libjpeg_turbo zlib cyrus_sasl python pygtk usbredir
+ ] ++ (if enableGTK3 then [ gtk3 ] else [ gtk ]);
nativeBuildInputs = [ pkgconfig intltool libtool autoconf automake ];
@@ -31,7 +32,7 @@ stdenv.mkDerivation rec {
configureFlags = [
"--disable-maintainer-mode"
- "--with-gtk=2.0"
+ (if enableGTK3 then "--with-gtk3" else "--with-gtk=2.0")
];
dontDisableStatic = true; # Needed by the coroutine test
diff --git a/pkgs/development/libraries/sqlite/default.nix b/pkgs/development/libraries/sqlite/default.nix
index de96ab58eae..ec392e71531 100644
--- a/pkgs/development/libraries/sqlite/default.nix
+++ b/pkgs/development/libraries/sqlite/default.nix
@@ -3,11 +3,11 @@
assert readline != null -> ncurses != null;
stdenv.mkDerivation {
- name = "sqlite-3.8.0.2";
+ name = "sqlite-3.8.4.3";
src = fetchurl {
- url = http://www.sqlite.org/2013/sqlite-autoconf-3080002.tar.gz;
- sha1 = "294c30e882a0d45877bce09afe72d08ccfc6b650";
+ url = "http://www.sqlite.org/2014/sqlite-autoconf-3080403.tar.gz";
+ sha1 = "zd9nqg1fc41222hvzvmvzr92z80b3wvh";
};
buildInputs = [ readline ncurses ];
diff --git a/pkgs/development/libraries/telepathy/glib/default.nix b/pkgs/development/libraries/telepathy/glib/default.nix
index 78d2d520050..6c0806ec4cd 100644
--- a/pkgs/development/libraries/telepathy/glib/default.nix
+++ b/pkgs/development/libraries/telepathy/glib/default.nix
@@ -2,11 +2,11 @@
, gobjectIntrospection, valaSupport ? true, vala }:
stdenv.mkDerivation rec {
- name = "telepathy-glib-0.22.1";
+ name = "telepathy-glib-0.24.0";
src = fetchurl {
url = "${meta.homepage}/releases/telepathy-glib/${name}.tar.gz";
- sha256 = "0vf2drh7g55nxyd0mxyn9sf99m981dagnvv9yc3q9f4k8x092a78";
+ sha256 = "ae0002134991217f42e503c43dea7817853afc18863b913744d51ffa029818cf";
};
configureFlags = stdenv.lib.optional valaSupport "--enable-vala-bindings";
diff --git a/pkgs/development/libraries/usbredir/default.nix b/pkgs/development/libraries/usbredir/default.nix
new file mode 100644
index 00000000000..7f05daab021
--- /dev/null
+++ b/pkgs/development/libraries/usbredir/default.nix
@@ -0,0 +1,23 @@
+{ stdenv, fetchurl, pkgconfig, libusb }:
+
+stdenv.mkDerivation rec {
+ name = "usbredir-${version}";
+ version = "0.6";
+
+ src = fetchurl {
+ url = "http://spice-space.org/download/usbredir/${name}.tar.bz2";
+ sha256 = "028184960044ea4124030000b3c55a35c3238835116e3a0fbcaff449df2c8edf";
+ };
+
+ buildInputs = [ pkgconfig libusb ];
+ propagatedBuildInputs = [ libusb ];
+
+ meta = with stdenv.lib; {
+ description = "USB traffic redirection protocol";
+ homepage = http://spice-space.org/page/UsbRedir;
+ license = licenses.lgpl21;
+
+ maintainers = [ maintainers.offline ];
+ platforms = platforms.linux;
+ };
+}
diff --git a/pkgs/development/libraries/webkit/bison26.patch b/pkgs/development/libraries/webkit/bison26.patch
deleted file mode 100644
index 95898adeb8a..00000000000
--- a/pkgs/development/libraries/webkit/bison26.patch
+++ /dev/null
@@ -1,515 +0,0 @@
-Index: /trunk/Source/WebCore/ChangeLog
-===================================================================
---- /trunk/Source/WebCore/ChangeLog (revision 124098)
-+++ /trunk/Source/WebCore/ChangeLog (revision 124099)
-@@ -1,2 +1,27 @@
-+2012-07-30 Alexis Menard
-+
-+ Build fix with newer bison 2.6.
-+ https://bugs.webkit.org/show_bug.cgi?id=92264
-+
-+ Reviewed by Adam Barth.
-+
-+ As stated in http://www.gnu.org/software/bison/manual/html_node/Table-of-Symbols.html
-+ YYLEX_PARAM and YYPARSE_PARAM are depecreated since version 1.875. So far all Mac OS
-+ version I had access to as well as recent Linux runs at least version 2.3 so it's safe
-+ to use the replacement of these deprecated macros in favor of %lex-param and %parse-param.
-+ As announced http://lists.gnu.org/archive/html/info-gnu/2012-07/msg00011.html with the release
-+ of version 2.6 YYLEX_PARAM and YYPARSE_PARAM are not supported anymore.
-+
-+ No new tests : build fix and the patch should not trigger any regressions
-+
-+ * css/CSSGrammar.y:
-+ * css/CSSParser.cpp:
-+ * xml/XPathGrammar.y: Refactored a bit to not use an intermediate PARSER define.
-+ * xml/XPathParser.cpp: bison 2.6 declare xpathyyparse in the .h file now, i.e. XPathGrammar.h
-+ therefore including this file within the namespace {} declarations leads to xpathyyparse being
-+ defined part of WebCore::XPath namespaces but the actual implementation of xpathyyparse is in XPathGrammar.cpp
-+ (generated) and not implemented within the WebCore::XPath so it lead to linking issues. Last, XPathGrammar.h needs
-+ to be included after the other includes as it uses some XPath types. It breaks the style but CSSParser.cpp is doing the same.
-+
- 2012-07-30 Sadrul Habib Chowdhury
-
-Index: /trunk/Source/WebCore/css/CSSParser.cpp
-===================================================================
---- /trunk/Source/WebCore/css/CSSParser.cpp (revision 124098)
-+++ /trunk/Source/WebCore/css/CSSParser.cpp (revision 124099)
-@@ -115,5 +115,5 @@
- #endif
-
--extern int cssyyparse(void* parser);
-+extern int cssyyparse(WebCore::CSSParser*);
-
- using namespace std;
-Index: /trunk/Source/WebCore/css/CSSGrammar.y
-===================================================================
---- /trunk/Source/WebCore/css/CSSGrammar.y (revision 124098)
-+++ /trunk/Source/WebCore/css/CSSGrammar.y (revision 124099)
-@@ -54,11 +54,10 @@
- #define YYDEBUG 0
-
--// FIXME: Replace with %parse-param { CSSParser* parser } once we can depend on bison 2.x
--#define YYPARSE_PARAM parser
--#define YYLEX_PARAM parser
--
- %}
-
- %pure_parser
-+
-+%parse-param { CSSParser* parser }
-+%lex-param { CSSParser* parser }
-
- %union {
-@@ -90,5 +89,5 @@
- %{
-
--static inline int cssyyerror(const char*)
-+static inline int cssyyerror(void*, const char*)
- {
- return 1;
-Index: /trunk/Source/WebCore/xml/XPathParser.cpp
-===================================================================
---- /trunk/Source/WebCore/xml/XPathParser.cpp (revision 124098)
-+++ /trunk/Source/WebCore/xml/XPathParser.cpp (revision 124099)
-@@ -33,22 +33,19 @@
- #include "XPathException.h"
- #include "XPathNSResolver.h"
-+#include "XPathPath.h"
- #include "XPathStep.h"
- #include
- #include
-
--int xpathyyparse(void*);
--
-+using namespace WebCore;
- using namespace WTF;
- using namespace Unicode;
--
--namespace WebCore {
--namespace XPath {
--
--class LocationPath;
--
--#include "XPathGrammar.h"
-+using namespace XPath;
-+
-+extern int xpathyyparse(WebCore::XPath::Parser*);
-+#include "XPathGrammar.h"
-
- Parser* Parser::currentParser = 0;
--
-+
- enum XMLCat { NameStart, NameCont, NotPartOfName };
-
-@@ -631,4 +628,2 @@
- }
-
--}
--}
-Index: /trunk/Source/WebCore/xml/XPathGrammar.y
-===================================================================
---- /trunk/Source/WebCore/xml/XPathGrammar.y (revision 124098)
-+++ /trunk/Source/WebCore/xml/XPathGrammar.y (revision 124099)
-@@ -35,4 +35,5 @@
- #include "XPathPath.h"
- #include "XPathPredicate.h"
-+#include "XPathStep.h"
- #include "XPathVariableReference.h"
- #include
-@@ -45,6 +46,4 @@
- #define YYDEBUG 0
- #define YYMAXDEPTH 10000
--#define YYPARSE_PARAM parserParameter
--#define PARSER static_cast(parserParameter)
-
- using namespace WebCore;
-@@ -54,4 +53,5 @@
-
- %pure_parser
-+%parse-param { WebCore::XPath::Parser* parser }
-
- %union
-@@ -72,5 +72,5 @@
-
- static int xpathyylex(YYSTYPE* yylval) { return Parser::current()->lex(yylval); }
--static void xpathyyerror(const char*) { }
-+static void xpathyyerror(void*, const char*) { }
-
- %}
-@@ -119,5 +119,5 @@
- OrExpr
- {
-- PARSER->m_topExpr = $1;
-+ parser->m_topExpr = $1;
- }
- ;
-@@ -139,5 +139,5 @@
- {
- $$ = new LocationPath;
-- PARSER->registerParseNode($$);
-+ parser->registerParseNode($$);
- }
- |
-@@ -151,5 +151,5 @@
- $$ = $2;
- $$->insertFirstStep($1);
-- PARSER->unregisterParseNode($1);
-+ parser->unregisterParseNode($1);
- }
- ;
-@@ -160,6 +160,6 @@
- $$ = new LocationPath;
- $$->appendStep($1);
-- PARSER->unregisterParseNode($1);
-- PARSER->registerParseNode($$);
-+ parser->unregisterParseNode($1);
-+ parser->registerParseNode($$);
- }
- |
-@@ -167,5 +167,5 @@
- {
- $$->appendStep($3);
-- PARSER->unregisterParseNode($3);
-+ parser->unregisterParseNode($3);
- }
- |
-@@ -174,6 +174,6 @@
- $$->appendStep($2);
- $$->appendStep($3);
-- PARSER->unregisterParseNode($2);
-- PARSER->unregisterParseNode($3);
-+ parser->unregisterParseNode($2);
-+ parser->unregisterParseNode($3);
- }
- ;
-@@ -184,9 +184,9 @@
- if ($2) {
- $$ = new Step(Step::ChildAxis, *$1, *$2);
-- PARSER->deletePredicateVector($2);
-+ parser->deletePredicateVector($2);
- } else
- $$ = new Step(Step::ChildAxis, *$1);
-- PARSER->deleteNodeTest($1);
-- PARSER->registerParseNode($$);
-+ parser->deleteNodeTest($1);
-+ parser->registerParseNode($$);
- }
- |
-@@ -195,6 +195,6 @@
- String localName;
- String namespaceURI;
-- if (!PARSER->expandQName(*$1, localName, namespaceURI)) {
-- PARSER->m_gotNamespaceError = true;
-+ if (!parser->expandQName(*$1, localName, namespaceURI)) {
-+ parser->m_gotNamespaceError = true;
- YYABORT;
- }
-@@ -202,9 +202,9 @@
- if ($2) {
- $$ = new Step(Step::ChildAxis, Step::NodeTest(Step::NodeTest::NameTest, localName, namespaceURI), *$2);
-- PARSER->deletePredicateVector($2);
-+ parser->deletePredicateVector($2);
- } else
- $$ = new Step(Step::ChildAxis, Step::NodeTest(Step::NodeTest::NameTest, localName, namespaceURI));
-- PARSER->deleteString($1);
-- PARSER->registerParseNode($$);
-+ parser->deleteString($1);
-+ parser->registerParseNode($$);
- }
- |
-@@ -213,9 +213,9 @@
- if ($3) {
- $$ = new Step($1, *$2, *$3);
-- PARSER->deletePredicateVector($3);
-+ parser->deletePredicateVector($3);
- } else
- $$ = new Step($1, *$2);
-- PARSER->deleteNodeTest($2);
-- PARSER->registerParseNode($$);
-+ parser->deleteNodeTest($2);
-+ parser->registerParseNode($$);
- }
- |
-@@ -224,6 +224,6 @@
- String localName;
- String namespaceURI;
-- if (!PARSER->expandQName(*$2, localName, namespaceURI)) {
-- PARSER->m_gotNamespaceError = true;
-+ if (!parser->expandQName(*$2, localName, namespaceURI)) {
-+ parser->m_gotNamespaceError = true;
- YYABORT;
- }
-@@ -231,9 +231,9 @@
- if ($3) {
- $$ = new Step($1, Step::NodeTest(Step::NodeTest::NameTest, localName, namespaceURI), *$3);
-- PARSER->deletePredicateVector($3);
-+ parser->deletePredicateVector($3);
- } else
- $$ = new Step($1, Step::NodeTest(Step::NodeTest::NameTest, localName, namespaceURI));
-- PARSER->deleteString($2);
-- PARSER->registerParseNode($$);
-+ parser->deleteString($2);
-+ parser->registerParseNode($$);
- }
- |
-@@ -260,6 +260,6 @@
- $$ = new Step::NodeTest(Step::NodeTest::CommentNodeTest);
-
-- PARSER->deleteString($1);
-- PARSER->registerNodeTest($$);
-+ parser->deleteString($1);
-+ parser->registerNodeTest($$);
- }
- |
-@@ -267,6 +267,6 @@
- {
- $$ = new Step::NodeTest(Step::NodeTest::ProcessingInstructionNodeTest);
-- PARSER->deleteString($1);
-- PARSER->registerNodeTest($$);
-+ parser->deleteString($1);
-+ parser->registerNodeTest($$);
- }
- |
-@@ -274,7 +274,7 @@
- {
- $$ = new Step::NodeTest(Step::NodeTest::ProcessingInstructionNodeTest, $3->stripWhiteSpace());
-- PARSER->deleteString($1);
-- PARSER->deleteString($3);
-- PARSER->registerNodeTest($$);
-+ parser->deleteString($1);
-+ parser->deleteString($3);
-+ parser->registerNodeTest($$);
- }
- ;
-@@ -294,6 +294,6 @@
- $$ = new Vector;
- $$->append(new Predicate($1));
-- PARSER->unregisterParseNode($1);
-- PARSER->registerPredicateVector($$);
-+ parser->unregisterParseNode($1);
-+ parser->registerPredicateVector($$);
- }
- |
-@@ -301,5 +301,5 @@
- {
- $$->append(new Predicate($2));
-- PARSER->unregisterParseNode($2);
-+ parser->unregisterParseNode($2);
- }
- ;
-@@ -316,5 +316,5 @@
- {
- $$ = new Step(Step::DescendantOrSelfAxis, Step::NodeTest(Step::NodeTest::AnyNodeTest));
-- PARSER->registerParseNode($$);
-+ parser->registerParseNode($$);
- }
- ;
-@@ -324,5 +324,5 @@
- {
- $$ = new Step(Step::SelfAxis, Step::NodeTest(Step::NodeTest::AnyNodeTest));
-- PARSER->registerParseNode($$);
-+ parser->registerParseNode($$);
- }
- |
-@@ -330,5 +330,5 @@
- {
- $$ = new Step(Step::ParentAxis, Step::NodeTest(Step::NodeTest::AnyNodeTest));
-- PARSER->registerParseNode($$);
-+ parser->registerParseNode($$);
- }
- ;
-@@ -338,6 +338,6 @@
- {
- $$ = new VariableReference(*$1);
-- PARSER->deleteString($1);
-- PARSER->registerParseNode($$);
-+ parser->deleteString($1);
-+ parser->registerParseNode($$);
- }
- |
-@@ -350,6 +350,6 @@
- {
- $$ = new StringExpression(*$1);
-- PARSER->deleteString($1);
-- PARSER->registerParseNode($$);
-+ parser->deleteString($1);
-+ parser->registerParseNode($$);
- }
- |
-@@ -357,6 +357,6 @@
- {
- $$ = new Number($1->toDouble());
-- PARSER->deleteString($1);
-- PARSER->registerParseNode($$);
-+ parser->deleteString($1);
-+ parser->registerParseNode($$);
- }
- |
-@@ -370,6 +370,6 @@
- if (!$$)
- YYABORT;
-- PARSER->deleteString($1);
-- PARSER->registerParseNode($$);
-+ parser->deleteString($1);
-+ parser->registerParseNode($$);
- }
- |
-@@ -379,7 +379,7 @@
- if (!$$)
- YYABORT;
-- PARSER->deleteString($1);
-- PARSER->deleteExpressionVector($3);
-- PARSER->registerParseNode($$);
-+ parser->deleteString($1);
-+ parser->deleteExpressionVector($3);
-+ parser->registerParseNode($$);
- }
- ;
-@@ -390,6 +390,6 @@
- $$ = new Vector;
- $$->append($1);
-- PARSER->unregisterParseNode($1);
-- PARSER->registerExpressionVector($$);
-+ parser->unregisterParseNode($1);
-+ parser->registerExpressionVector($$);
- }
- |
-@@ -397,5 +397,5 @@
- {
- $$->append($3);
-- PARSER->unregisterParseNode($3);
-+ parser->unregisterParseNode($3);
- }
- ;
-@@ -413,7 +413,7 @@
- $$->addSubExpression($1);
- $$->addSubExpression($3);
-- PARSER->unregisterParseNode($1);
-- PARSER->unregisterParseNode($3);
-- PARSER->registerParseNode($$);
-+ parser->unregisterParseNode($1);
-+ parser->unregisterParseNode($3);
-+ parser->registerParseNode($$);
- }
- ;
-@@ -431,7 +431,7 @@
- $3->setAbsolute(true);
- $$ = new Path(static_cast($1), $3);
-- PARSER->unregisterParseNode($1);
-- PARSER->unregisterParseNode($3);
-- PARSER->registerParseNode($$);
-+ parser->unregisterParseNode($1);
-+ parser->unregisterParseNode($3);
-+ parser->registerParseNode($$);
- }
- |
-@@ -441,8 +441,8 @@
- $3->setAbsolute(true);
- $$ = new Path(static_cast($1), $3);
-- PARSER->unregisterParseNode($1);
-- PARSER->unregisterParseNode($2);
-- PARSER->unregisterParseNode($3);
-- PARSER->registerParseNode($$);
-+ parser->unregisterParseNode($1);
-+ parser->unregisterParseNode($2);
-+ parser->unregisterParseNode($3);
-+ parser->registerParseNode($$);
- }
- ;
-@@ -454,7 +454,7 @@
- {
- $$ = new Filter($1, *$2);
-- PARSER->unregisterParseNode($1);
-- PARSER->deletePredicateVector($2);
-- PARSER->registerParseNode($$);
-+ parser->unregisterParseNode($1);
-+ parser->deletePredicateVector($2);
-+ parser->registerParseNode($$);
- }
- ;
-@@ -466,7 +466,7 @@
- {
- $$ = new LogicalOp(LogicalOp::OP_Or, $1, $3);
-- PARSER->unregisterParseNode($1);
-- PARSER->unregisterParseNode($3);
-- PARSER->registerParseNode($$);
-+ parser->unregisterParseNode($1);
-+ parser->unregisterParseNode($3);
-+ parser->registerParseNode($$);
- }
- ;
-@@ -478,7 +478,7 @@
- {
- $$ = new LogicalOp(LogicalOp::OP_And, $1, $3);
-- PARSER->unregisterParseNode($1);
-- PARSER->unregisterParseNode($3);
-- PARSER->registerParseNode($$);
-+ parser->unregisterParseNode($1);
-+ parser->unregisterParseNode($3);
-+ parser->registerParseNode($$);
- }
- ;
-@@ -490,7 +490,7 @@
- {
- $$ = new EqTestOp($2, $1, $3);
-- PARSER->unregisterParseNode($1);
-- PARSER->unregisterParseNode($3);
-- PARSER->registerParseNode($$);
-+ parser->unregisterParseNode($1);
-+ parser->unregisterParseNode($3);
-+ parser->registerParseNode($$);
- }
- ;
-@@ -502,7 +502,7 @@
- {
- $$ = new EqTestOp($2, $1, $3);
-- PARSER->unregisterParseNode($1);
-- PARSER->unregisterParseNode($3);
-- PARSER->registerParseNode($$);
-+ parser->unregisterParseNode($1);
-+ parser->unregisterParseNode($3);
-+ parser->registerParseNode($$);
- }
- ;
-@@ -514,7 +514,7 @@
- {
- $$ = new NumericOp(NumericOp::OP_Add, $1, $3);
-- PARSER->unregisterParseNode($1);
-- PARSER->unregisterParseNode($3);
-- PARSER->registerParseNode($$);
-+ parser->unregisterParseNode($1);
-+ parser->unregisterParseNode($3);
-+ parser->registerParseNode($$);
- }
- |
-@@ -522,7 +522,7 @@
- {
- $$ = new NumericOp(NumericOp::OP_Sub, $1, $3);
-- PARSER->unregisterParseNode($1);
-- PARSER->unregisterParseNode($3);
-- PARSER->registerParseNode($$);
-+ parser->unregisterParseNode($1);
-+ parser->unregisterParseNode($3);
-+ parser->registerParseNode($$);
- }
- ;
-@@ -534,7 +534,7 @@
- {
- $$ = new NumericOp($2, $1, $3);
-- PARSER->unregisterParseNode($1);
-- PARSER->unregisterParseNode($3);
-- PARSER->registerParseNode($$);
-+ parser->unregisterParseNode($1);
-+ parser->unregisterParseNode($3);
-+ parser->registerParseNode($$);
- }
- ;
-@@ -547,6 +547,6 @@
- $$ = new Negative;
- $$->addSubExpression($2);
-- PARSER->unregisterParseNode($2);
-- PARSER->registerParseNode($$);
-+ parser->unregisterParseNode($2);
-+ parser->registerParseNode($$);
- }
- ;
diff --git a/pkgs/development/libraries/webkit/default.nix b/pkgs/development/libraries/webkit/default.nix
deleted file mode 100644
index ef4d259cb02..00000000000
--- a/pkgs/development/libraries/webkit/default.nix
+++ /dev/null
@@ -1,106 +0,0 @@
-args : with args;
-let
- s = import ./src-for-default.nix; # 1.8.3 needs newer gtk3, wait for x-updates
- version = lib.attrByPath ["version"] s.version args;
-in
-rec {
- src = fetchurl {
- url = s.url;
- sha256 = s.hash;
- };
-
- buildInputs = with xlibs; [
- pkgconfig libtool intltool autoconf automake gperf bison flex
- gtk3 gtk2 glib atk cairo pango fontconfig freetype libsoup gtkdoc
- libjpeg libpng libtiff libxml2 libxslt sqlite icu curl
- which libproxy geoclue enchant python ruby perl
- mesa libXt libXrender renderproto libXcomposite compositeproto
- libXdamage damageproto kbproto
- ];
-
- propagatedBuildInputs = [
- gstreamer gst_plugins_base gst_ffmpeg gst_plugins_good
- ];
-
- configureFlags = [
- # "--enable-3D-transforms" # no longer recognized
- "--enable-web-sockets"
- "--enable-web-timing"
-
- # https://bugs.webkit.org/show_bug.cgi?id=55294
- "--enable-image-resizer"
-
- "--enable-geolocation"
-
- # Not implemented?
- # "--enable-web-audio"
-
- "--enable-mathml"
-
- #"--enable-wml"
-
- # https://bugs.webkit.org/show_bug.cgi?id=45110
- #"--enable-indexed-database"
-
- # Doesn't work in release...
- #"--enable-xhtmlmp"
-
- # "--enable-input-speech"
-
- #"--enable-file-writer" # no longer recognized
- "--enable-blob"
-
- # https://bugs.webkit.org/show_bug.cgi?id=59430
- # "--enable-directory-upload"
-
- # https://bugs.webkit.org/show_bug.cgi?id=58443
- # "--enable-file-system"
-
- "--enable-dependency-tracking" # to fix parallel building
- ];
-
- # instead of enableParallelBuilding = true;
- makeFlags = "-j$NIX_BUILD_CORES";
-
- /* doConfigure should be specified separately */
- phaseNames = ["doPatch" "fixConfigure" /* "paranoidFixComments" */ "doConfigure" (doPatchShebangs ".")
- "doReplaceUsrBin" "doMakeInstall" "doAddPrograms"];
-
- patches = [ ./bison26.patch ]; # http://trac.webkit.org/changeset/124099
- patchFlags = "-p2";
-
- #doCheck = true; # tests still have problems
-
- doReplaceUsrBin = fullDepEntry (''
- for i in $(find . -name '*.pl') $(find . -name '*.pm'); do
- sed -e 's@/usr/bin/gcc@gcc@' -i $i
- done
- '') ["minInit" "doUnpack"];
-
- doAddPrograms = fullDepEntry (''
- mkdir -p $out/bin
- for i in Programs/.libs/* Programs/*; do
- cp $i $out/bin/webkit-program-$(basename $i) || true
- done
- '') ["minInit" "doMake" "defEnsureDir"];
-
- paranoidFixComments = fullDepEntry (''
- sed -re 's@( |^)//.*@/* & */@' -i $(find . -name '*.c' -o -name '*.h')
- '') ["minInit" "doUnpack"];
-
- # See http://archive.linuxfromscratch.org/mail-archives/blfs-dev/2012-April/022893.html
- fixConfigure = fullDepEntry (''
- sed -i -e 's/=GSTREAMER_0_10_REQUIRED_VERSION/=\$GSTREAMER_0_10_REQUIRED_VERSION/' \
- -e 's/=GSTREAMER_0_10_PLUGINS_BASE_REQUIRED_VERSION/=\$GSTREAMER_0_10_PLUGINS_BASE_REQUIRED_VERSION/' \
- configure{,.ac}
- '') ["minInit" "doUnpack"];
-
- name = s.name;
- meta = {
- description = "WebKit - a fast and correct HTML renderer";
- maintainers = [stdenv.lib.maintainers.raskin];
- };
- passthru = {
- inherit gstreamer gst_plugins_base gst_plugins_good gst_ffmpeg libsoup;
- };
-}
diff --git a/pkgs/development/libraries/webkit/gtk2.nix b/pkgs/development/libraries/webkit/gtk2.nix
deleted file mode 100644
index c2e3b9b06dd..00000000000
--- a/pkgs/development/libraries/webkit/gtk2.nix
+++ /dev/null
@@ -1,109 +0,0 @@
-
-args : with args;
-let
- s = import ./src-for-gtk2.nix;
- version = lib.attrByPath ["version"] s.version args;
-in
-rec {
- src = fetchurl {
- url = s.url;
- sha256 = s.hash;
- };
-
- buildInputs = with xlibs; [
- pkgconfig libtool intltool autoconf automake gperf bison flex
- gtk2 glib atk cairo pango fontconfig freetype libsoup gtkdoc
- libjpeg libpng libtiff libxml2 libxslt sqlite icu curl
- which libproxy geoclue enchant python ruby perl
- mesa libXt libXrender renderproto libXcomposite compositeproto
- libXdamage damageproto kbproto
- ];
-
- propagatedBuildInputs = [
- gstreamer gst_plugins_base gst_ffmpeg gst_plugins_good
- ];
-
- configureFlags = [
- "--with-gtk=2.0"
-
- # "--enable-3D-transforms" # no longer recognized
- "--enable-web-sockets"
- "--enable-web-timing"
-
- # https://bugs.webkit.org/show_bug.cgi?id=55294
- "--enable-image-resizer"
-
- "--enable-geolocation"
-
- # Not implemented?
- # "--enable-web-audio"
-
- "--enable-mathml"
-
- #"--enable-wml"
-
- # https://bugs.webkit.org/show_bug.cgi?id=45110
- #"--enable-indexed-database"
-
- # Doesn't work in release...
- #"--enable-xhtmlmp"
-
- # "--enable-input-speech"
-
- #"--enable-file-writer" # no longer recognized
- "--enable-blob"
-
- # https://bugs.webkit.org/show_bug.cgi?id=59430
- # "--enable-directory-upload"
-
- # https://bugs.webkit.org/show_bug.cgi?id=58443
- # "--enable-file-system"
-
- "--enable-dependency-tracking" # to fix parallel building
- ];
-
- # instead of enableParallelBuilding = true;
- makeFlags = "-j$NIX_BUILD_CORES";
-
- /* doConfigure should be specified separately */
- phaseNames = ["doPatch" "fixConfigure" /* "paranoidFixComments" */ "doConfigure" (doPatchShebangs ".")
- "doReplaceUsrBin" "doMakeInstall" "doAddPrograms"];
-
- patches = [ ./bison26.patch ]; # http://trac.webkit.org/changeset/124099
- patchFlags = "-p2";
-
- #doCheck = true; # tests still have problems
-
- doReplaceUsrBin = fullDepEntry (''
- for i in $(find . -name '*.pl') $(find . -name '*.pm'); do
- sed -e 's@/usr/bin/gcc@gcc@' -i $i
- done
- '') ["minInit" "doUnpack"];
-
- doAddPrograms = fullDepEntry (''
- mkdir -p $out/bin
- for i in Programs/.libs/* Programs/*; do
- cp $i $out/bin/webkit-program-$(basename $i) || true
- done
- '') ["minInit" "doMake" "defEnsureDir"];
-
- paranoidFixComments = fullDepEntry (''
- sed -re 's@( |^)//.*@/* & */@' -i $(find . -name '*.c' -o -name '*.h')
- '') ["minInit" "doUnpack"];
-
- # See http://archive.linuxfromscratch.org/mail-archives/blfs-dev/2012-April/022893.html
- fixConfigure = fullDepEntry (''
- sed -i -e 's/=GSTREAMER_0_10_REQUIRED_VERSION/=\$GSTREAMER_0_10_REQUIRED_VERSION/' \
- -e 's/=GSTREAMER_0_10_PLUGINS_BASE_REQUIRED_VERSION/=\$GSTREAMER_0_10_PLUGINS_BASE_REQUIRED_VERSION/' \
- configure{,.ac}
- '') ["minInit" "doUnpack"];
-
- name = s.name;
- meta = {
- description = "WebKit - a fast and correct HTML renderer";
- maintainers = [stdenv.lib.maintainers.raskin];
- };
- passthru = {
- inherit gstreamer gst_plugins_base gst_plugins_good gst_ffmpeg libsoup;
- };
-}
diff --git a/pkgs/development/libraries/webkit/src-for-default.nix b/pkgs/development/libraries/webkit/src-for-default.nix
deleted file mode 100644
index 65bcd435096..00000000000
--- a/pkgs/development/libraries/webkit/src-for-default.nix
+++ /dev/null
@@ -1,10 +0,0 @@
-rec {
- version="1.8.1";
- name="webkit-1.8.1";
- hash="0a1v3v8dp2cl332qr51j4fpl0rwpgxbf29hn3zdim9hcniv6l4ls";
- url="http://webkitgtk.org/releases/webkit-1.8.1.tar.xz";
- advertisedUrl="http://webkitgtk.org/releases/webkit-1.8.1.tar.xz";
-
-
-}
-
diff --git a/pkgs/development/libraries/webkit/src-for-gtk2.nix b/pkgs/development/libraries/webkit/src-for-gtk2.nix
deleted file mode 100644
index 65bcd435096..00000000000
--- a/pkgs/development/libraries/webkit/src-for-gtk2.nix
+++ /dev/null
@@ -1,10 +0,0 @@
-rec {
- version="1.8.1";
- name="webkit-1.8.1";
- hash="0a1v3v8dp2cl332qr51j4fpl0rwpgxbf29hn3zdim9hcniv6l4ls";
- url="http://webkitgtk.org/releases/webkit-1.8.1.tar.xz";
- advertisedUrl="http://webkitgtk.org/releases/webkit-1.8.1.tar.xz";
-
-
-}
-
diff --git a/pkgs/development/libraries/webkit/src-for-svn.nix b/pkgs/development/libraries/webkit/src-for-svn.nix
deleted file mode 100644
index f90bafbf6dc..00000000000
--- a/pkgs/development/libraries/webkit/src-for-svn.nix
+++ /dev/null
@@ -1,9 +0,0 @@
-rec {
- version="r86499";
- name="webkit-r86499";
- hash="04sfwri81x2d9y3z0v7rhrr40vn0bxcbnhb8a0gymqkwa1ngpzmp";
- url="http://builds.nightly.webkit.org/files/trunk/src/WebKit-r86499.tar.bz2";
- advertisedUrl="http://builds.nightly.webkit.org/files/trunk/src/WebKit-r86499.tar.bz2";
-
-
-}
diff --git a/pkgs/development/libraries/webkit/src-info-for-default.nix b/pkgs/development/libraries/webkit/src-info-for-default.nix
deleted file mode 100644
index c4e5b8a6fd6..00000000000
--- a/pkgs/development/libraries/webkit/src-info-for-default.nix
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- downloadPage = "http://webkitgtk.org/?page=download";
- versionExtractorSedScript = "s/.*-([.0-9]+)[.].*/\\1/";
- versionReferenceCreator = "s/-([.0-9.]+)[.]/-\${version}./";
- baseName = "webkit";
-}
diff --git a/pkgs/development/libraries/webkit/src-info-for-svn.nix b/pkgs/development/libraries/webkit/src-info-for-svn.nix
deleted file mode 100644
index 994cae544cb..00000000000
--- a/pkgs/development/libraries/webkit/src-info-for-svn.nix
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- downloadPage = "http://nightly.webkit.org/";
- versionExtractorSedScript = "s/.*-(r[0-9]+)[.].*/\\1/";
- versionReferenceCreator = "s/-(r[0-9.]+)[.]/-\${version}./";
- baseName = "webkit";
-}
diff --git a/pkgs/development/libraries/wildmidi/default.nix b/pkgs/development/libraries/wildmidi/default.nix
index eb55d1d60f4..5b3f9e03ac7 100644
--- a/pkgs/development/libraries/wildmidi/default.nix
+++ b/pkgs/development/libraries/wildmidi/default.nix
@@ -1,22 +1,22 @@
-{ stdenv, fetchurl, alsaLib, freepats }:
+{ stdenv, fetchurl, cmake, alsaLib, freepats }:
stdenv.mkDerivation rec {
- name = "wildmidi-0.2.3.5";
+ name = "wildmidi-0.3.6";
src = fetchurl {
- url = "mirror://sourceforge/project/wildmidi/wildmidi/${name}.tar.gz";
- sha256 = "0m75753mn0rbwja180c2qk53s149wp4k35dijr2i6pa7sc12fr00";
+ url = "https://github.com/Mindwerks/wildmidi/archive/${name}.tar.gz";
+ sha256 = "0y8r812f8h9jqlajwbzni7f23k8kfcp4wxz3jdq75z902bsmdzpf";
};
- # NOTE: $out in configureFlags, like this:
- # configureFlags = "--disable-werror --with-wildmidi-cfg=$out/etc/wildmidi.cfg";
- # is not expanded, so use this workaround:
- preConfigure = ''
- configureFlags="--disable-werror --with-wildmidi-cfg=$out/etc/wildmidi.cfg"
- '';
+ nativeBuildInputs = [ cmake ];
buildInputs = [ alsaLib ];
+ preConfigure = ''
+ substituteInPlace CMakeLists.txt \
+ --replace /etc/wildmidi $out/etc
+ '';
+
postInstall = ''
mkdir "$out"/etc
echo "dir ${freepats}" > "$out"/etc/wildmidi.cfg
diff --git a/pkgs/development/libraries/xmlrpc-c/default.nix b/pkgs/development/libraries/xmlrpc-c/default.nix
index ef7a65599a9..9f578e4b9dd 100644
--- a/pkgs/development/libraries/xmlrpc-c/default.nix
+++ b/pkgs/development/libraries/xmlrpc-c/default.nix
@@ -1,11 +1,11 @@
{ stdenv, fetchurl, curl }:
stdenv.mkDerivation rec {
- name = "xmlrpc-c-1.25.26";
+ name = "xmlrpc-c-1.25.27";
src = fetchurl {
url = "mirror://sourceforge/xmlrpc-c/${name}.tgz";
- sha256 = "1f82vsdkldhk1sfqyh6z0ylp5769x4fx3rnd2hw0c6fhx8swcmgj";
+ sha256 = "0g9m9n258lpbs42a2lagd4h7qim1g34gkaqyx8h50qrsk49ipspn";
};
buildInputs = [ curl ];
diff --git a/pkgs/development/mobile/titaniumenv/examples/default.nix b/pkgs/development/mobile/titaniumenv/examples/default.nix
index b81fcd41bcb..556b96975b4 100644
--- a/pkgs/development/mobile/titaniumenv/examples/default.nix
+++ b/pkgs/development/mobile/titaniumenv/examples/default.nix
@@ -4,15 +4,16 @@
, tiVersion ? "3.2.2.GA"
, rename ? false
, newBundleId ? "com.example.kitchensink", iosMobileProvisioningProfile ? null, iosCertificate ? null, iosCertificateName ? "Example", iosCertificatePassword ? ""
+, allowUnfree ? false
}:
let
- pkgs = import nixpkgs {};
+ pkgs = import nixpkgs { config.allowUnfree = allowUnfree; };
in
rec {
kitchensink_android_debug = pkgs.lib.genAttrs systems (system:
let
- pkgs = import nixpkgs { inherit system; };
+ pkgs = import nixpkgs { inherit system; config.allowUnfree = allowUnfree; };
in
import ./kitchensink {
inherit (pkgs) fetchgit;
@@ -23,7 +24,7 @@ rec {
kitchensink_android_release = pkgs.lib.genAttrs systems (system:
let
- pkgs = import nixpkgs { inherit system; };
+ pkgs = import nixpkgs { inherit system; config.allowUnfree = allowUnfree; };
in
import ./kitchensink {
inherit (pkgs) fetchgit;
@@ -35,7 +36,7 @@ rec {
emulate_kitchensink_debug = pkgs.lib.genAttrs systems (system:
let
- pkgs = import nixpkgs { inherit system; };
+ pkgs = import nixpkgs { inherit system; config.allowUnfree = allowUnfree; };
in
import ./emulate-kitchensink {
inherit (pkgs) androidenv;
@@ -44,7 +45,7 @@ rec {
emulate_kitchensink_release = pkgs.lib.genAttrs systems (system:
let
- pkgs = import nixpkgs { inherit system; };
+ pkgs = import nixpkgs { inherit system; config.allowUnfree = allowUnfree; };
in
import ./emulate-kitchensink {
inherit (pkgs) androidenv;
@@ -78,7 +79,7 @@ rec {
};
} else {}) // (if rename then
let
- pkgs = import nixpkgs { system = "x86_64-darwin"; };
+ pkgs = import nixpkgs { system = "x86_64-darwin"; config.allowUnfree = allowUnfree; };
in
{
kitchensink_ipa = import ./kitchensink {
diff --git a/pkgs/development/perl-modules/Compress-Raw-Zlib/default.nix b/pkgs/development/perl-modules/Compress-Raw-Zlib/default.nix
index 9310e3ca081..5d22970155b 100644
--- a/pkgs/development/perl-modules/Compress-Raw-Zlib/default.nix
+++ b/pkgs/development/perl-modules/Compress-Raw-Zlib/default.nix
@@ -1,11 +1,11 @@
{ fetchurl, buildPerlPackage, zlib, stdenv }:
buildPerlPackage rec {
- name = "Compress-Raw-Zlib-2.063";
+ name = "Compress-Raw-Zlib-2.065";
src = fetchurl {
- url = "mirror://cpan/modules/by-module/Compress/${name}.tar.gz";
- sha256 = "16cn9pq4pngncs3qhlam0yw2l0q7hq4qfdyxp03jaad6ndc4dzp9";
+ url = "mirror://cpan/authors/id/P/PM/PMQS/${name}.tar.gz";
+ sha256 = "1i09h3dvn8ipaj1l2nq2qd19wzhn7wcpbsipdkcniwi0sgy1kf1p";
};
preConfigure = ''
diff --git a/pkgs/development/perl-modules/DBD-Pg/default.nix b/pkgs/development/perl-modules/DBD-Pg/default.nix
index be5faa330ae..619f2f14b96 100644
--- a/pkgs/development/perl-modules/DBD-Pg/default.nix
+++ b/pkgs/development/perl-modules/DBD-Pg/default.nix
@@ -1,11 +1,11 @@
{ stdenv, fetchurl, buildPerlPackage, DBI, postgresql }:
buildPerlPackage rec {
- name = "DBD-Pg-2.19.3";
+ name = "DBD-Pg-3.0.0";
src = fetchurl {
- url = "mirror://cpan/modules/by-module/DBD/${name}.tar.gz";
- sha256 = "0ai6p2094hrh6kjlwfjvpw2z8wqa3scr4ba3p6rqza3z9c9hsd9p";
+ url = "mirror://cpan/authors/id/T/TU/TURNSTEP/${name}.tar.gz";
+ sha256 = "10s1dhpxxqfl421388l6gzfdm1gzxf5iah42i1w6yji9mgkz8hf8";
};
buildInputs = [ postgresql ];
diff --git a/pkgs/development/perl-modules/DBD-SQLite/default.nix b/pkgs/development/perl-modules/DBD-SQLite/default.nix
index 06688ded22a..7b1741c3d1e 100644
--- a/pkgs/development/perl-modules/DBD-SQLite/default.nix
+++ b/pkgs/development/perl-modules/DBD-SQLite/default.nix
@@ -1,11 +1,11 @@
{ stdenv, fetchurl, buildPerlPackage, DBI, sqlite }:
buildPerlPackage rec {
- name = "DBD-SQLite-1.37";
+ name = "DBD-SQLite-1.42";
src = fetchurl {
- url = "mirror://cpan/authors/id/A/AD/ADAMK/${name}.tar.gz";
- sha256 = "0197kvlziaj2wfdbzlhdlqmzvb29fmfyy6y2isbbwlg0b0f7ccd1";
+ url = "mirror://cpan/authors/id/I/IS/ISHIGAKI/${name}.tar.gz";
+ sha256 = "14x9cjsc8dz8ad1nad0bqiq9cbk1rjfb8h5y0rpk3pdl38y6afxb";
};
propagatedBuildInputs = [ DBI ];
diff --git a/pkgs/development/perl-modules/maatkit/default.nix b/pkgs/development/perl-modules/maatkit/default.nix
index d9a1f777f3a..b30e2f12fc6 100644
--- a/pkgs/development/perl-modules/maatkit/default.nix
+++ b/pkgs/development/perl-modules/maatkit/default.nix
@@ -1,11 +1,11 @@
{buildPerlPackage, stdenv, fetchurl, DBDmysql}:
buildPerlPackage rec {
- name = "maatkit-4790";
+ name = "maatkit-7540";
src = fetchurl {
url = "http://maatkit.googlecode.com/files/${name}.tar.gz" ;
- sha256 = "0lf6dgh1w96m234hrkhagyyvv1m1ldchpzsg6iswvkj6sbvv7d7h";
+ sha256 = "1a7rxrddkrsfxb2wj01ha91ld0vapfkqcy8j9p08l76zz2l8p2v1";
};
buildInputs = [ DBDmysql ] ;
diff --git a/pkgs/development/python-modules/generic/default.nix b/pkgs/development/python-modules/generic/default.nix
index d0234c29ed9..9dedd3ceae7 100644
--- a/pkgs/development/python-modules/generic/default.nix
+++ b/pkgs/development/python-modules/generic/default.nix
@@ -163,7 +163,6 @@ python.stdenv.mkDerivation (attrs // {
export PYTHONPATH="/tmp/$name/lib/${python.libPrefix}/site-packages:$PYTHONPATH"
python setup.py develop --prefix /tmp/$name
${postShellHook}
- return
'';
meta = with lib.maintainers; {
diff --git a/pkgs/development/python-modules/virtualenv-change-prefix.patch b/pkgs/development/python-modules/virtualenv-change-prefix.patch
index d3e588bd1cd..958187f982f 100644
--- a/pkgs/development/python-modules/virtualenv-change-prefix.patch
+++ b/pkgs/development/python-modules/virtualenv-change-prefix.patch
@@ -1,8 +1,23 @@
-Without this patch `virtualenv --python=python2.7 .` fails with an error because it notices that the python readline.so is not in the same path as python2.7. I assume this is to avoid copying the wrong file on systems where it is possible to find incompatible libraries by accident. Adding "/nix/store" to the prefix fixes this problem. Unfortunately readline is still not available if you just run `virtualenv .`.
+Without this patch `virtualenv --python=python2.7 .` fails with an
+error because it notices that the python readline.so is not in the
+same path as python2.7. I assume this is to avoid copying the wrong
+file on systems where it is possible to find incompatible libraries by
+accident. Adding "/nix/store" to the prefix fixes this problem.
---- virtualenv-1.8.4/virtualenv.py 2013-01-16 23:43:37.583615220 +0100
-+++ virtualenv-1.8.4/virtualenv.py 2013-01-16 23:44:47.885973431 +0100
-@@ -1135,17 +1135,7 @@
+A sitecustomize.py is created in the virtualenv which makes libraries
+from the python specified by the --python argument available to the
+virtualenv. For example, this makes readline and sqlite3 available
+when a wrapped python is specified. If no --python argument is passed,
+it will only add the path to the python used when building
+`virtualenv`, which is the unwrapped python, so sqlite3 won't be
+available.
+
+
+diff --git a/virtualenv.py b/virtualenv.py
+index d3e76a7..cb307fa 100755
+--- a/virtualenv.py
++++ b/virtualenv.py
+@@ -1051,17 +1051,7 @@ def path_locations(home_dir):
def change_prefix(filename, dst_prefix):
@@ -21,7 +36,7 @@ Without this patch `virtualenv --python=python2.7 .` fails with an error because
if hasattr(sys, 'real_prefix'):
prefixes.append(sys.real_prefix)
-@@ -1162,6 +1152,8 @@
+@@ -1078,6 +1068,8 @@ def change_prefix(filename, dst_prefix):
if src_prefix != os.sep: # sys.prefix == "/"
assert relpath[0] == os.sep
relpath = relpath[1:]
@@ -30,3 +45,15 @@ Without this patch `virtualenv --python=python2.7 .` fails with an error because
return join(dst_prefix, relpath)
assert False, "Filename %s does not start with any of these prefixes: %s" % \
(filename, prefixes)
+@@ -1190,6 +1182,11 @@ def install_python(home_dir, lib_dir, inc_dir, bin_dir, site_packages, clear, sy
+ site_filename_dst = change_prefix(site_filename, home_dir)
+ site_dir = os.path.dirname(site_filename_dst)
+ writefile(site_filename_dst, SITE_PY)
++ wrapper_path = join(prefix, "lib", py_version, "site-packages")
++ writefile(
++ join(site_dir, 'sitecustomize.py',),
++ "import sys; sys.path.append('%s')" % wrapper_path
++ )
+ writefile(join(site_dir, 'orig-prefix.txt'), prefix)
+ site_packages_filename = join(site_dir, 'no-global-site-packages.txt')
+ if not site_packages:
diff --git a/pkgs/development/tools/analysis/valgrind/default.nix b/pkgs/development/tools/analysis/valgrind/default.nix
index 97565bec98e..a6ea2c2f59d 100644
--- a/pkgs/development/tools/analysis/valgrind/default.nix
+++ b/pkgs/development/tools/analysis/valgrind/default.nix
@@ -8,6 +8,8 @@ stdenv.mkDerivation rec {
sha256 = "1w6n5qvxy2ssbczcl1c2yd2ggjn3ipay2hvpn10laly2dfh73bz6";
};
+ patches = [ ./glibc-2.19.patch ];
+
# Perl is needed for `cg_annotate'.
# GDB is needed to provide a sane default for `--db-command'.
nativeBuildInputs = [ perl ];
@@ -15,7 +17,7 @@ stdenv.mkDerivation rec {
enableParallelBuilding = true;
- patchPhase =
+ postPatch =
# Apple's GCC doesn't recognize `-arch' (as of version 4.2.1, build 5666).
''
echo "getting rid of the \`-arch' GCC option..."
diff --git a/pkgs/development/tools/analysis/valgrind/glibc-2.19.patch b/pkgs/development/tools/analysis/valgrind/glibc-2.19.patch
new file mode 100644
index 00000000000..137b0a325b0
--- /dev/null
+++ b/pkgs/development/tools/analysis/valgrind/glibc-2.19.patch
@@ -0,0 +1,39 @@
+https://projects.archlinux.org/svntogit/packages.git/plain/trunk/valgrind-3.9.0-glibc-2.19.patch?h=packages/valgrind
+
+diff -Naur valgrind-3.9.0-orig/configure valgrind-3.9.0/configure
+--- valgrind-3.9.0-orig/configure 2013-11-01 09:33:32.000000000 +1000
++++ valgrind-3.9.0/configure 2014-02-08 09:28:06.063248544 +1000
+@@ -6689,6 +6689,16 @@
+ DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}"
+ DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}"
+ ;;
++ 2.19)
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: 2.19 family" >&5
++$as_echo "2.19 family" >&6; }
++
++$as_echo "#define GLIBC_2_19 1" >>confdefs.h
++
++ DEFAULT_SUPP="glibc-2.X.supp ${DEFAULT_SUPP}"
++ DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}"
++ DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}"
++ ;;
+ darwin)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: Darwin" >&5
+ $as_echo "Darwin" >&6; }
+diff -Naur valgrind-3.9.0-orig/configure.ac valgrind-3.9.0/configure.ac
+--- valgrind-3.9.0-orig/configure.ac 2013-11-01 09:28:16.000000000 +1000
++++ valgrind-3.9.0/configure.ac 2014-02-08 09:27:38.870385366 +1000
+@@ -918,6 +918,13 @@
+ DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}"
+ DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}"
+ ;;
++ 2.19)
++ AC_MSG_RESULT(2.19 family)
++ AC_DEFINE([GLIBC_2_19], 1, [Define to 1 if you're using glibc 2.19.x])
++ DEFAULT_SUPP="glibc-2.X.supp ${DEFAULT_SUPP}"
++ DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}"
++ DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}"
++ ;;
+ darwin)
+ AC_MSG_RESULT(Darwin)
+ AC_DEFINE([DARWIN_LIBC], 1, [Define to 1 if you're using Darwin])
diff --git a/pkgs/development/tools/build-managers/buildbot-slave/default.nix b/pkgs/development/tools/build-managers/buildbot-slave/default.nix
index b28c4d9296f..f21be7cc48c 100644
--- a/pkgs/development/tools/build-managers/buildbot-slave/default.nix
+++ b/pkgs/development/tools/build-managers/buildbot-slave/default.nix
@@ -1,12 +1,12 @@
{ stdenv, buildPythonPackage, fetchurl, coreutils, twisted }:
buildPythonPackage (rec {
- name = "buildbot-slave-0.8.7p1";
+ name = "buildbot-slave-0.8.8";
namePrefix = "";
src = fetchurl {
url = "http://buildbot.googlecode.com/files/${name}.tar.gz";
- sha256 = "1p7a0srab6ifljh9vi25awvxfrxljj9s0hi1jipiiykyhjihgnxv";
+ sha256 = "1k1pk3y0rk6j01wc491jblryr4ajqg1ing9m3sjaw9s5sga34xcb";
};
patchPhase = ''
diff --git a/pkgs/development/tools/build-managers/buildbot/default.nix b/pkgs/development/tools/build-managers/buildbot/default.nix
index c872d67146b..2d7c63fdc7d 100644
--- a/pkgs/development/tools/build-managers/buildbot/default.nix
+++ b/pkgs/development/tools/build-managers/buildbot/default.nix
@@ -9,12 +9,12 @@
assert enableDebugClient -> pygobject != null && pyGtkGlade != null;
buildPythonPackage (rec {
- name = "buildbot-0.8.7p1";
+ name = "buildbot-0.8.8";
namePrefix = "";
src = fetchurl {
url = "http://buildbot.googlecode.com/files/${name}.tar.gz";
- sha256 = "0xjpk8510fhryl1g4mczz319h62il8hw9rh1rzvsfmffgf43zvld";
+ sha256 = "1l1rsy82zv8582wypw00ac0k0wsr82ky74f3np4clbrxv3ry64sh";
};
patchPhase =
diff --git a/pkgs/development/tools/build-managers/ninja/default.nix b/pkgs/development/tools/build-managers/ninja/default.nix
index b5c0b0a03da..75c2da8a28d 100644
--- a/pkgs/development/tools/build-managers/ninja/default.nix
+++ b/pkgs/development/tools/build-managers/ninja/default.nix
@@ -36,7 +36,7 @@ stdenv.mkDerivation rec {
'';
homepage = http://martine.github.io/ninja/;
license = licenses.asl20;
- platforms = platforms.linux;
+ platforms = platforms.unix;
maintainers = [ maintainers.bjornfor ];
};
}
diff --git a/pkgs/development/tools/documentation/haddock/2.14.1.nix b/pkgs/development/tools/documentation/haddock/2.14.2.nix
similarity index 88%
rename from pkgs/development/tools/documentation/haddock/2.14.1.nix
rename to pkgs/development/tools/documentation/haddock/2.14.2.nix
index c63503c85ba..c4677f202dd 100644
--- a/pkgs/development/tools/documentation/haddock/2.14.1.nix
+++ b/pkgs/development/tools/documentation/haddock/2.14.2.nix
@@ -4,8 +4,8 @@
cabal.mkDerivation (self: {
pname = "haddock";
- version = "2.14.1";
- sha256 = "1mxkphzdfd5c8dklfl09ajqwhw8ibvzl0cqrfr2j8rn0j03w46x6";
+ version = "2.14.2";
+ sha256 = "0h96jj6y093h4gcqpiq0nyv7h5wjg8ji7z1im9ydivmsv0627prk";
isLibrary = true;
isExecutable = true;
buildDepends = [ Cabal deepseq filepath ghcPaths xhtml ];
diff --git a/pkgs/development/tools/haskell/HaRe/default.nix b/pkgs/development/tools/haskell/HaRe/default.nix
index 11c36f320f2..7cbc6630584 100644
--- a/pkgs/development/tools/haskell/HaRe/default.nix
+++ b/pkgs/development/tools/haskell/HaRe/default.nix
@@ -7,8 +7,8 @@
cabal.mkDerivation (self: {
pname = "HaRe";
- version = "0.7.2.0";
- sha256 = "0i769mryjr3v9vh4zkdycpha8skq9xcdln3plrxx55bf42c4aqi9";
+ version = "0.7.2.2";
+ sha256 = "0w9cjs3r99k4mf835higcsllk0h8lbich1v9wb2pvwbqi3i9r0sp";
isLibrary = true;
isExecutable = true;
buildDepends = [
diff --git a/pkgs/development/tools/haskell/cabal-delete/default.nix b/pkgs/development/tools/haskell/cabal-delete/default.nix
new file mode 100644
index 00000000000..65a7b4d3211
--- /dev/null
+++ b/pkgs/development/tools/haskell/cabal-delete/default.nix
@@ -0,0 +1,34 @@
+{ cabal, fetchgit, bytestring ? null, containers ? null, directory ? null,
+ filepath, process ? null, attoparsec, ghcPaths, transformers }:
+
+let
+ tag = "0.5.2.0";
+in
+
+cabal.mkDerivation (self: {
+ pname = "cabal-delete";
+ version = "${tag}";
+ src = fetchgit {
+ url = git://github.com/iquiw/cabal-delete.git;
+ rev = "refs/tags/v${tag}";
+ sha256 = "1ap319isjg8bafm4jz2krfwvvg11hj5yk0g99a3l1a3a36hpdgzw";
+ };
+ isLibrary = false;
+ isExecutable = true;
+ buildDepends = [
+ bytestring
+ containers
+ directory
+ filepath
+ process
+ attoparsec
+ ghcPaths
+ transformers
+ ];
+ meta = {
+ homepage = "https://github.com/iquiw/cabal-delete";
+ description = "Uninstall packages installed by cabal";
+ license = self.stdenv.lib.licenses.bsd3;
+ platforms = self.ghc.meta.platforms;
+ };
+})
diff --git a/pkgs/development/tools/haskell/cabal-meta/default.nix b/pkgs/development/tools/haskell/cabal-meta/default.nix
new file mode 100644
index 00000000000..62048e2893b
--- /dev/null
+++ b/pkgs/development/tools/haskell/cabal-meta/default.nix
@@ -0,0 +1,18 @@
+{ cabal, hspec, shelly, systemFileio, systemFilepath, text }:
+
+cabal.mkDerivation (self: {
+ pname = "cabal-meta";
+ version = "0.4.1.2";
+ sha256 = "17ln9j0n9rb0kbnp37fi9yaf932dacrdmf3jrp301r886kh2a7kk";
+ isLibrary = true;
+ isExecutable = true;
+ doCheck = false;
+ buildDepends = [ shelly systemFileio systemFilepath text ];
+ testDepends = [ hspec shelly systemFilepath text ];
+ meta = {
+ homepage = "http://www.yesodweb.com/";
+ description = "build multiple packages at once";
+ license = self.stdenv.lib.licenses.bsd3;
+ platforms = self.ghc.meta.platforms;
+ };
+})
diff --git a/pkgs/development/tools/haskell/cabal2nix/default.nix b/pkgs/development/tools/haskell/cabal2nix/default.nix
index 9dc8536a4c0..7ad20ee066b 100644
--- a/pkgs/development/tools/haskell/cabal2nix/default.nix
+++ b/pkgs/development/tools/haskell/cabal2nix/default.nix
@@ -3,8 +3,8 @@
cabal.mkDerivation (self: {
pname = "cabal2nix";
- version = "1.60";
- sha256 = "1jp4rq8gfdz5knm9cbralhjyw2a391cck49422bskl7c23p94y3l";
+ version = "1.61";
+ sha256 = "058bwswkhsj3rbxl42n23ri79smmhkaj6wid4c6x02yl3m8l7xsy";
isLibrary = false;
isExecutable = true;
buildDepends = [ Cabal filepath hackageDb HTTP mtl regexPosix ];
diff --git a/pkgs/development/tools/haskell/hlint/default.nix b/pkgs/development/tools/haskell/hlint/default.nix
index 72ba1ba6b87..17ae7d508d3 100644
--- a/pkgs/development/tools/haskell/hlint/default.nix
+++ b/pkgs/development/tools/haskell/hlint/default.nix
@@ -4,8 +4,8 @@
cabal.mkDerivation (self: {
pname = "hlint";
- version = "1.8.59";
- sha256 = "14yn63zbbqwvxlis0kwga4mrz6qjr8kq1cq7f0rcilgqgh1dkwh8";
+ version = "1.8.60";
+ sha256 = "10kc4g9sipd5758n3x2xndaw1c887263gvff0y395drfgqh5qxal";
isLibrary = true;
isExecutable = true;
buildDepends = [
diff --git a/pkgs/development/tools/haskell/keter/default.nix b/pkgs/development/tools/haskell/keter/default.nix
index a56e64953c0..1cffefd6da3 100644
--- a/pkgs/development/tools/haskell/keter/default.nix
+++ b/pkgs/development/tools/haskell/keter/default.nix
@@ -1,26 +1,25 @@
{ cabal, aeson, async, attoparsec, blazeBuilder, caseInsensitive
-, conduit, dataDefault, filepath, fsnotify, hspec, httpClient
-, httpClientConduit, httpConduit, httpReverseProxy, httpTypes
-, liftedBase, mtl, network, networkConduit, networkConduitTls
-, random, regexTdfa, stm, systemFileio, systemFilepath, tar, text
-, time, transformers, unixCompat, unorderedContainers, vector, wai
-, waiAppStatic, waiExtra, warp, warpTls, yaml, zlib
+, conduit, conduitExtra, dataDefault, filepath, fsnotify, hspec
+, httpConduit, httpReverseProxy, httpTypes, liftedBase, mtl
+, network, networkConduitTls, random, regexTdfa, stm, systemFileio
+, systemFilepath, tar, text, time, transformers, unixCompat
+, unorderedContainers, vector, wai, waiAppStatic, waiExtra, warp
+, warpTls, yaml, zlib
}:
cabal.mkDerivation (self: {
pname = "keter";
- version = "1.2.1";
- sha256 = "160kw3c2h9i1rwhicm860ahanx9p9qskrnfxsa68484j0cmw1ga9";
+ version = "1.3.0";
+ sha256 = "1fvb93iga4c0kfv29ksrmn9bjznl7wfspg1v9a5d3svwrszl4is3";
isLibrary = true;
isExecutable = true;
buildDepends = [
aeson async attoparsec blazeBuilder caseInsensitive conduit
- dataDefault filepath fsnotify httpClient httpClientConduit
- httpConduit httpReverseProxy httpTypes liftedBase mtl network
- networkConduit networkConduitTls random regexTdfa stm systemFileio
- systemFilepath tar text time transformers unixCompat
- unorderedContainers vector wai waiAppStatic waiExtra warp warpTls
- yaml zlib
+ conduitExtra dataDefault filepath fsnotify httpConduit
+ httpReverseProxy httpTypes liftedBase mtl network networkConduitTls
+ random regexTdfa stm systemFileio systemFilepath tar text time
+ transformers unixCompat unorderedContainers vector wai waiAppStatic
+ waiExtra warp warpTls yaml zlib
];
testDepends = [ conduit hspec transformers ];
meta = {
diff --git a/pkgs/development/tools/haskell/rehoo/default.nix b/pkgs/development/tools/haskell/rehoo/default.nix
new file mode 100644
index 00000000000..016070f66c3
--- /dev/null
+++ b/pkgs/development/tools/haskell/rehoo/default.nix
@@ -0,0 +1,19 @@
+{ cabal, cmdargs, parallelIo, shelly, split, systemFilepath, text
+}:
+
+cabal.mkDerivation (self: {
+ pname = "rehoo";
+ version = "0.3.1";
+ sha256 = "0pwmz1q2866yj8hxbvha4v1smhppkd3jsrrhbhmbxw137l54ijgf";
+ isLibrary = false;
+ isExecutable = true;
+ buildDepends = [
+ cmdargs parallelIo shelly split systemFilepath text
+ ];
+ meta = {
+ homepage = "https://github.com/jwiegley/rehoo";
+ description = "Rebuild default.hoo from many .hoo files in the current directory";
+ license = self.stdenv.lib.licenses.bsd3;
+ platforms = self.ghc.meta.platforms;
+ };
+})
diff --git a/pkgs/development/tools/haskell/una/default.nix b/pkgs/development/tools/haskell/una/default.nix
new file mode 100644
index 00000000000..172949818a6
--- /dev/null
+++ b/pkgs/development/tools/haskell/una/default.nix
@@ -0,0 +1,16 @@
+{ cabal, cmdargs, filepath, ioStorage }:
+
+cabal.mkDerivation (self: {
+ pname = "una";
+ version = "2.1.0";
+ sha256 = "0gpycwd0dgnw7cdicpn19wv1xb4jq3j9dfzry2ilv85h02zkwfvh";
+ isLibrary = false;
+ isExecutable = true;
+ buildDepends = [ cmdargs filepath ioStorage ];
+ meta = {
+ homepage = "https://github.com/jwiegley/una";
+ description = "Universal un-archiver utility";
+ license = self.stdenv.lib.licenses.bsd3;
+ platforms = self.ghc.meta.platforms;
+ };
+})
diff --git a/pkgs/development/tools/misc/babeltrace/default.nix b/pkgs/development/tools/misc/babeltrace/default.nix
index d19bb24eb37..aa8e70b5edc 100644
--- a/pkgs/development/tools/misc/babeltrace/default.nix
+++ b/pkgs/development/tools/misc/babeltrace/default.nix
@@ -1,11 +1,11 @@
{ stdenv, fetchurl, pkgconfig, glib, libuuid, popt }:
stdenv.mkDerivation rec {
- name = "babeltrace-1.1.1";
+ name = "babeltrace-1.2.1";
src = fetchurl {
url = "http://www.efficios.com/files/babeltrace/${name}.tar.bz2";
- sha256 = "04jc1yd3aaq59fmpzswzc78cywpq7wzjfqdlsg7xc76ivb8cggfz";
+ sha256 = "1pwg0y57iy4c8wynb6bj7f6bxaiclmxcm4f3nllpw9brhbdzygc1";
};
buildInputs = [ pkgconfig glib libuuid popt ];
diff --git a/pkgs/development/tools/misc/global/default.nix b/pkgs/development/tools/misc/global/default.nix
index d1cd59d8828..fdb5f72af83 100644
--- a/pkgs/development/tools/misc/global/default.nix
+++ b/pkgs/development/tools/misc/global/default.nix
@@ -1,11 +1,11 @@
{ fetchurl, stdenv, libtool, ncurses }:
stdenv.mkDerivation rec {
- name = "global-6.2.9";
+ name = "global-6.2.12";
src = fetchurl {
url = "mirror://gnu/global/${name}.tar.gz";
- sha256 = "00y38kp0zbpjl9c9phldy7j2ihqc54qn4cdgk0azbjdsv75k3n6q";
+ sha256 = "05jkhya1cs6yqhkf8nw5x56adkxxrqyga7sq7hx44dbf7alczwfa";
};
buildInputs = [ libtool ncurses ];
@@ -42,6 +42,6 @@ stdenv.mkDerivation rec {
homepage = http://www.gnu.org/software/global/;
maintainers = [ stdenv.lib.maintainers.ludo ];
- platforms = stdenv.lib.platforms.gnu; # arbitrary choice
+ platforms = stdenv.lib.platforms.unix;
};
}
diff --git a/pkgs/development/tools/misc/lsof/default.nix b/pkgs/development/tools/misc/lsof/default.nix
index 2469a0210b3..ec3a5e9bcbf 100644
--- a/pkgs/development/tools/misc/lsof/default.nix
+++ b/pkgs/development/tools/misc/lsof/default.nix
@@ -12,7 +12,9 @@ stdenv.mkDerivation {
preBuild = "sed -i Makefile -e 's/^CFGF=/& -DHASIPv6=1/;';";
- configurePhase = "./Configure -n linux;";
+ configurePhase = if stdenv.isDarwin
+ then "./Configure -n darwin;"
+ else "./Configure -n linux;";
installPhase = ''
mkdir -p $out/bin $out/man/man8
diff --git a/pkgs/development/tools/misc/ltrace/default.nix b/pkgs/development/tools/misc/ltrace/default.nix
index a436f29df14..1d20d8eef45 100644
--- a/pkgs/development/tools/misc/ltrace/default.nix
+++ b/pkgs/development/tools/misc/ltrace/default.nix
@@ -1,17 +1,18 @@
{ stdenv, fetchurl, elfutils }:
stdenv.mkDerivation rec {
- name = "ltrace-0.5.3";
+ name = "ltrace-0.7.3";
src = fetchurl {
- url = ftp://ftp.debian.org/debian/pool/main/l/ltrace/ltrace_0.5.3.orig.tar.gz;
- sha256 = "0cmyw8zyw8b1gszrwizcm53cr0mig1iw3kv18v5952m9spb2frjw";
+ url = ftp://ftp.debian.org/debian/pool/main/l/ltrace/ltrace_0.7.3.orig.tar.bz2;
+ sha256 = "00wmbdghqbz6x95m1mcdd3wd46l6hgcr4wggdp049dbifh3qqvqf";
};
buildInputs = [ elfutils ];
- preBuild =
+ preConfigure =
''
+ configureFlags="--disable-werror"
makeFlagsArray=(INSTALL="install -c")
'';
diff --git a/pkgs/development/tools/misc/lttng-tools/default.nix b/pkgs/development/tools/misc/lttng-tools/default.nix
index 1d223d83a65..541385d8bec 100644
--- a/pkgs/development/tools/misc/lttng-tools/default.nix
+++ b/pkgs/development/tools/misc/lttng-tools/default.nix
@@ -1,11 +1,11 @@
{ stdenv, fetchurl, popt, libuuid, liburcu, lttngUst, kmod }:
stdenv.mkDerivation rec {
- name = "lttng-tools-2.3.0";
+ name = "lttng-tools-2.4.1";
src = fetchurl {
url = "https://lttng.org/files/lttng-tools/${name}.tar.bz2";
- sha256 = "16j55xqrh00mjbcvdmdkfxchavi7jsxlpnfjqc1g1d3x65ss9wri";
+ sha256 = "1v9f7a3c2shwgn4g759bblgr27h9ql9sfq71r1mbkf8rd235g2jr";
};
buildInputs = [ popt libuuid liburcu lttngUst ];
diff --git a/pkgs/development/tools/misc/lttng-ust/default.nix b/pkgs/development/tools/misc/lttng-ust/default.nix
index 014a97a9158..0cba211f28b 100644
--- a/pkgs/development/tools/misc/lttng-ust/default.nix
+++ b/pkgs/development/tools/misc/lttng-ust/default.nix
@@ -12,11 +12,11 @@
# Debian builds with std.h (systemtap).
stdenv.mkDerivation rec {
- name = "lttng-ust-2.3.0";
+ name = "lttng-ust-2.4.1";
src = fetchurl {
url = "https://lttng.org/files/lttng-ust/${name}.tar.bz2";
- sha256 = "1hazjybrppyaakvfp1bs92vx0n2sgcsw0m6i5hwq7xq8vij7cj4q";
+ sha256 = "1nx9b1haiylajzjy03wgfcy85nwg578c6gy8ip55y8cabjrw0hp1";
};
buildInputs = [ liburcu ];
diff --git a/pkgs/development/tools/misc/texinfo/5.2.nix b/pkgs/development/tools/misc/texinfo/5.2.nix
index 1bb8fca0ecf..0a7446fe534 100644
--- a/pkgs/development/tools/misc/texinfo/5.2.nix
+++ b/pkgs/development/tools/misc/texinfo/5.2.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, ncurses, perl, xz }:
+{ stdenv, fetchurl, ncurses, perl, xz, interactive ? false }:
stdenv.mkDerivation rec {
name = "texinfo-5.2";
@@ -8,7 +8,8 @@ stdenv.mkDerivation rec {
sha256 = "1njfwh2z34r2c4r0iqa7v24wmjzvsfyz4vplzry8ln3479lfywal";
};
- buildInputs = [ ncurses perl xz ];
+ buildInputs = [ perl xz ]
+ ++ stdenv.lib.optional interactive ncurses;
preInstall = ''
installFlags="TEXMF=$out/texmf-dist";
diff --git a/pkgs/development/tools/misc/uhd/default.nix b/pkgs/development/tools/misc/uhd/default.nix
index d49077a5ef6..67ef086941e 100644
--- a/pkgs/development/tools/misc/uhd/default.nix
+++ b/pkgs/development/tools/misc/uhd/default.nix
@@ -8,15 +8,15 @@
stdenv.mkDerivation rec {
name = "uhd-${version}";
- version = "3.5.4";
+ version = "3.7.0";
# UHD seems to use three different version number styles: x.y.z, xxx_yyy_zzz
# and xxx.yyy.zzz. Hrmpf...
src = fetchurl {
name = "${name}.tar.gz";
- url = "https://github.com/EttusResearch/uhd/archive/release_003_005_004.tar.gz";
- sha256 = "1l11dv72r4ynfpw58aacq0kjylzw85yapv3kzc76lg6qgdb0pqrd";
+ url = "https://github.com/EttusResearch/uhd/archive/release_003_007_000.tar.gz";
+ sha256 = "0x9imfy63s6wlbilr2n82c15nd33ix0mbap0q1xwh2pj1mk4d5jk";
};
cmakeFlags = "-DLIBUSB_INCLUDE_DIRS=${libusb1}/include/libusb-1.0";
@@ -27,10 +27,10 @@ stdenv.mkDerivation rec {
preConfigure = "cd host";
# Firmware images are downloaded (pre-built)
- uhdImagesName = "uhd-images_003.005.004-release";
+ uhdImagesName = "uhd-images_003.007.000-release";
uhdImagesSrc = fetchurl {
url = "http://files.ettus.com/binaries/maint_images/archive/${uhdImagesName}.tar.gz";
- sha256 = "0lgy9076vshlaq7l4n3q1hka3q4xxzdz7mqh7kawg4dziq7j8nl6";
+ sha256 = "0vb0rc5ji8n6l6ycvd7pbazxzm0ihvkmqm77jflqrd3kky8r722d";
};
postPhases = [ "installFirmware" ];
diff --git a/pkgs/development/tools/node-webkit/default.nix b/pkgs/development/tools/node-webkit/default.nix
new file mode 100644
index 00000000000..be125801bd5
--- /dev/null
+++ b/pkgs/development/tools/node-webkit/default.nix
@@ -0,0 +1,55 @@
+{ stdenv, fetchurl, buildEnv, makeWrapper
+, xlibs, alsaLib, dbus, glib, gtk, atk, pango, freetype, fontconfig
+, gdk_pixbuf, cairo, zlib, nss, nssTools, nspr, gconf, expat, udev}:
+let
+ bits = if stdenv.system == "x86_64-linux" then "x64"
+ else "ia32";
+
+ nwEnv = buildEnv {
+ name = "node-webkit-env";
+ paths = [
+ xlibs.libX11 xlibs.libXrender glib gtk atk pango cairo gdk_pixbuf
+ freetype fontconfig xlibs.libXcomposite alsaLib xlibs.libXdamage xlibs.libXext
+ xlibs.libXfixes nss nspr gconf expat dbus udev stdenv.gcc.gcc
+ ];
+ };
+
+in stdenv.mkDerivation rec {
+ name = "node-webkit-${version}";
+ version = "0.8.4";
+
+ src = fetchurl {
+ url = "https://s3.amazonaws.com/node-webkit/v${version}/node-webkit-v${version}-linux-${bits}.tar.gz";
+ sha256 = if bits == "x64" then
+ "91229edfb03349306c5ce101fdab2de55f7473cc7c36367e9611a0527d2ef591" else
+ "12axppynangh0q72swzqcmz2blncgm2dw9n489313ybnp2p42hnp";
+ };
+
+ patchPhase = ''
+ patchelf --set-interpreter "$(cat $NIX_GCC/nix-support/dynamic-linker)" nw
+ patchelf --set-interpreter "$(cat $NIX_GCC/nix-support/dynamic-linker)" nwsnapshot
+ '';
+
+ installPhase = let
+ LD_LIBRARY_PATH = "${nwEnv}/lib:${nwEnv}/lib64:$out/share/node-webkit";
+ in ''
+ ensureDir $out/bin
+ ensureDir $out/share/node-webkit
+ cp -R * $out/share/node-webkit
+
+ ln -s ${udev}/lib/libudev.so $out/share/node-webkit/libudev.so.0
+
+ makeWrapper $out/share/node-webkit/nw $out/bin/nw --prefix LD_LIBRARY_PATH : "${LD_LIBRARY_PATH}"
+ makeWrapper $out/share/node-webkit/nwsnapshot $out/bin/nwsnapshot --prefix LD_LIBRARY_PATH : "${LD_LIBRARY_PATH}"
+ '';
+
+ buildInputs = [ makeWrapper ];
+
+ meta = with stdenv.lib; {
+ description = "An app runtime based on Chromium and node.js";
+ homepage = https://github.com/rogerwang/node-webkit;
+ platforms = ["i686-linux" "x86_64-linux"];
+ maintainers = [ maintainers.offline ];
+ license = licenses.bsd3;
+ };
+}
diff --git a/pkgs/development/tools/parsing/flex/default.nix b/pkgs/development/tools/parsing/flex/2.5.35.nix
similarity index 100%
rename from pkgs/development/tools/parsing/flex/default.nix
rename to pkgs/development/tools/parsing/flex/2.5.35.nix
diff --git a/pkgs/development/tools/parsing/flex/2.5.39.nix b/pkgs/development/tools/parsing/flex/2.5.39.nix
new file mode 100644
index 00000000000..f12f89f6e24
--- /dev/null
+++ b/pkgs/development/tools/parsing/flex/2.5.39.nix
@@ -0,0 +1,30 @@
+{ stdenv, fetchurl, bison, m4 }:
+
+stdenv.mkDerivation {
+ name = "flex-2.5.39";
+
+ src = fetchurl {
+ url = mirror://sourceforge/flex/flex-2.5.39.tar.bz2;
+ sha256 = "0zv15giw3gma03y2bzw78hjfy49vyir7vbcgnh9bb3637dgvblmd";
+ };
+
+ buildInputs = [ bison ];
+
+ propagatedNativeBuildInputs = [ m4 ];
+
+ postConfigure = stdenv.lib.optionalString stdenv.isDarwin ''
+ sed -i Makefile -e 's/-no-undefined//;'
+ '';
+
+ crossAttrs = {
+ preConfigure = ''
+ export ac_cv_func_malloc_0_nonnull=yes
+ export ac_cv_func_realloc_0_nonnull=yes
+ '';
+ };
+
+ meta = {
+ homepage = http://flex.sourceforge.net/;
+ description = "A fast lexical analyser generator";
+ };
+}
diff --git a/pkgs/games/openttd/default.nix b/pkgs/games/openttd/default.nix
index 6b385bc2e56..7e2b4221d52 100644
--- a/pkgs/games/openttd/default.nix
+++ b/pkgs/games/openttd/default.nix
@@ -2,11 +2,11 @@
stdenv.mkDerivation rec {
name = "openttd-${version}";
- version = "1.3.3";
+ version = "1.4.0";
src = fetchurl {
url = "http://binaries.openttd.org/releases/${version}/${name}-source.tar.xz";
- sha256 = "0pfagqw8i1c6zrzarlwivrcac8b8ai1inam9qc01hj3h04nfv4b9";
+ sha256 = "0m89pr7m7xg71q1j3869dfrbhv88g90cw9zn0jlpg8crsj4wnnyq";
};
buildInputs = [ SDL libpng pkgconfig xz zlib freetype fontconfig ];
diff --git a/pkgs/misc/themes/gtk2/oxygen-gtk/default.nix b/pkgs/misc/themes/gtk2/oxygen-gtk/default.nix
index 1bd4d5f35b4..c3d846c566c 100644
--- a/pkgs/misc/themes/gtk2/oxygen-gtk/default.nix
+++ b/pkgs/misc/themes/gtk2/oxygen-gtk/default.nix
@@ -2,12 +2,12 @@
cmake, dbus_glib, glib, gtk, gdk_pixbuf, pkgconfig, xorg }:
stdenv.mkDerivation rec {
- version = "1.4.4";
+ version = "1.4.5";
name = "oxygen-gtk2-${version}";
src = fetchurl {
url = "mirror://kde/stable/oxygen-gtk2/${version}/src/${name}.tar.bz2";
- sha256 = "1w3300v7kclpaccvd0wsajgay4mgg2fbbi1nd0zak0p5nn40sqf8";
+ sha256 = "00ykq4aafakdkvww7kz84bvg9wc2gdji4m7z87f49hj1jxm84v2v";
};
buildInputs = [ cmake dbus_glib glib gtk gdk_pixbuf
diff --git a/pkgs/os-specific/linux/bluez/bluez5.nix b/pkgs/os-specific/linux/bluez/bluez5.nix
index ffa91e951a8..f9f5c185bbd 100644
--- a/pkgs/os-specific/linux/bluez/bluez5.nix
+++ b/pkgs/os-specific/linux/bluez/bluez5.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, pkgconfig, dbus, glib, libusb, alsaLib, python,
+{ stdenv, fetchurl, pkgconfig, dbus, glib, alsaLib, python,
pythonPackages, pythonDBus, readline, libsndfile, udev, libical,
systemd }:
@@ -16,7 +16,7 @@ stdenv.mkDerivation rec {
[ pythonDBus pygobject pygobject3 recursivePthLoader ];
buildInputs =
- [ pkgconfig dbus.libs glib libusb alsaLib python pythonPackages.wrapPython
+ [ pkgconfig dbus.libs glib alsaLib python pythonPackages.wrapPython
readline libsndfile udev libical
# Disables GStreamer; not clear what it gains us other than a
# zillion extra dependencies.
diff --git a/pkgs/os-specific/linux/busybox/default.nix b/pkgs/os-specific/linux/busybox/default.nix
index fd1e83100ed..7226acf0e57 100644
--- a/pkgs/os-specific/linux/busybox/default.nix
+++ b/pkgs/os-specific/linux/busybox/default.nix
@@ -37,11 +37,11 @@ let
in
stdenv.mkDerivation rec {
- name = "busybox-1.21.1";
+ name = "busybox-1.22.1";
src = fetchurl {
url = "http://busybox.net/downloads/${name}.tar.bz2";
- sha256 = "00qk938q90jv14mxmadm8pgs3jymkknc6xicw4512mn85s8y0nyd";
+ sha256 = "12v7nri79v8gns3inmz4k24q7pcnwi00hybs0wddfkcy1afh42xf";
};
configurePhase = ''
diff --git a/pkgs/os-specific/linux/cifs-utils/default.nix b/pkgs/os-specific/linux/cifs-utils/default.nix
index bef8de495ad..ce609c5be47 100644
--- a/pkgs/os-specific/linux/cifs-utils/default.nix
+++ b/pkgs/os-specific/linux/cifs-utils/default.nix
@@ -1,11 +1,11 @@
{ stdenv, fetchurl }:
stdenv.mkDerivation rec {
- name = "cifs-utils-6.2";
+ name = "cifs-utils-6.3";
src = fetchurl {
url = "ftp://ftp.samba.org/pub/linux-cifs/cifs-utils/${name}.tar.bz2";
- sha256 = "0cydya7l7xwxk2j1g1659kbvb4jzql11ivb6cldwwfg19qvnwrrl";
+ sha256 = "0nrpd3ibzfhdxgq1pw0jhzx163z5jvq4qcjxl35qlqj74lm3pxzz";
};
makeFlags = "root_sbindir=$(out)/sbin";
diff --git a/pkgs/os-specific/linux/cpufrequtils/default.nix b/pkgs/os-specific/linux/cpufrequtils/default.nix
index c94e22adb38..d056e60f2da 100644
--- a/pkgs/os-specific/linux/cpufrequtils/default.nix
+++ b/pkgs/os-specific/linux/cpufrequtils/default.nix
@@ -10,6 +10,11 @@ stdenv.mkDerivation rec {
sha256 = "127i38d4w1hv2dzdy756gmbhq25q3k34nqb2s0xlhsfhhdqs0lq0";
};
+ patches = [
+ # I am not 100% sure that this is ok, but it breaks repeatable builds.
+ ./remove-pot-creation-date.patch
+ ];
+
patchPhase = ''
sed -e "s@= /usr/bin/@= @g" \
-e "s@/usr/@$out/@" \
diff --git a/pkgs/os-specific/linux/cpufrequtils/remove-pot-creation-date.patch b/pkgs/os-specific/linux/cpufrequtils/remove-pot-creation-date.patch
new file mode 100644
index 00000000000..0116ed9eab0
--- /dev/null
+++ b/pkgs/os-specific/linux/cpufrequtils/remove-pot-creation-date.patch
@@ -0,0 +1,24 @@
+diff -u cpufrequtils-008/Makefile cpufrequtils-008.new/Makefile
+--- cpufrequtils-008/Makefile 2012-05-06 01:17:18.000000000 +0200
++++ cpufrequtils-008.new/Makefile 2013-08-16 20:52:29.961086536 +0200
+@@ -205,7 +205,8 @@
+ @xgettext --default-domain=$(PACKAGE) --add-comments \
+ --keyword=_ --keyword=N_ $(UTIL_SRC) && \
+ test -f $(PACKAGE).po && \
+- mv -f $(PACKAGE).po po/$(PACKAGE).pot
++ mv -f $(PACKAGE).po po/$(PACKAGE).pot && \
++ sed -i -e'/POT-Creation/d' po/*.pot
+
+ update-gmo: po/$(PACKAGE).pot
+ @for HLANG in $(LANGUAGES); do \
+@@ -217,6 +218,7 @@
+ echo "msgmerge for $$HLANG failed!"; \
+ rm -f po/$$HLANG.new.po; \
+ fi; \
++ sed -i -e'/POT-Creation/d' po/*.po; \
+ msgfmt --statistics -o po/$$HLANG.gmo po/$$HLANG.po; \
+ done;
+
+Common subdirectories: cpufrequtils-008/man and cpufrequtils-008.new/man
+Common subdirectories: cpufrequtils-008/po and cpufrequtils-008.new/po
+Common subdirectories: cpufrequtils-008/utils and cpufrequtils-008.new/utils
diff --git a/pkgs/os-specific/linux/gradm/default.nix b/pkgs/os-specific/linux/gradm/default.nix
index 680547be57c..62a3cfa631e 100644
--- a/pkgs/os-specific/linux/gradm/default.nix
+++ b/pkgs/os-specific/linux/gradm/default.nix
@@ -15,7 +15,6 @@ stdenv.mkDerivation rec {
substituteInPlace ./Makefile --replace "/usr/include/security/pam_" "${pam}/include/security/pam_"
substituteInPlace ./gradm_defs.h --replace "/sbin/grlearn" "$out/sbin/grlearn"
substituteInPlace ./gradm_defs.h --replace "/sbin/gradm" "$out/sbin/gradm"
- substituteInPlace ./gradm_defs.h --replace "/sbin/gradm_pam" "$out/sbin/gradm_pam"
'';
postInstall = ''
@@ -25,6 +24,8 @@ stdenv.mkDerivation rec {
KERNEL=="grsec", MODE="0622"
LABEL="permissions_end"
EOF
+
+ echo "inherit-learn /nix/store" >> $out/etc/grsec/learn_config
'';
makeFlags =
diff --git a/pkgs/os-specific/linux/hostapd/default.nix b/pkgs/os-specific/linux/hostapd/default.nix
index 410fa6a7ad6..a8988f0a452 100644
--- a/pkgs/os-specific/linux/hostapd/default.nix
+++ b/pkgs/os-specific/linux/hostapd/default.nix
@@ -2,11 +2,11 @@
stdenv.mkDerivation rec {
name = "hostapd-${version}";
- version = "2.0";
+ version = "2.1";
src = fetchurl {
url = "http://hostap.epitest.fi/releases/${name}.tar.gz";
- sha256 = "262ce394b930bccc3d65fb99ee380f28d36444978f524c845a98e8e29f4e9d35";
+ sha256 = "121gpcs1ws7m2v8jk091jhmz3pm2xmhwkv96gqkyb4k0bgsi0waw";
};
buildInputs = [ libnl openssl pkgconfig ];
@@ -23,6 +23,7 @@ stdenv.mkDerivation rec {
meta = with stdenv.lib; {
homepage = http://hostap.epitest.fi;
+ repositories.git = git://w1.fi/hostap.git;
description = "A user space daemon for access point and authentication servers";
license = licenses.gpl2;
maintainers = [ maintainers.phreedom ];
diff --git a/pkgs/os-specific/linux/kernel/common-config.nix b/pkgs/os-specific/linux/kernel/common-config.nix
index a2b139dc6fc..15473ea257c 100644
--- a/pkgs/os-specific/linux/kernel/common-config.nix
+++ b/pkgs/os-specific/linux/kernel/common-config.nix
@@ -167,8 +167,10 @@ with stdenv.lib;
STRICT_DEVMEM y # Filter access to /dev/mem
SECURITY_SELINUX_BOOTPARAM_VALUE 0 # Disable SELinux by default
DEVKMEM n # Disable /dev/kmem
- ${optionalString (versionOlder version "3.14") ''
+ ${if versionOlder version "3.14" then ''
CC_STACKPROTECTOR y # Detect buffer overflows on the stack
+ '' else ''
+ CC_STACKPROTECTOR_REGULAR y
''}
${optionalString (versionAtLeast version "3.12") ''
USER_NS y # Support for user namespaces
@@ -309,6 +311,11 @@ with stdenv.lib;
9P_FSCACHE y
9P_FS_POSIX_ACL y
+ # Enable transparent support for huge pages.
+ TRANSPARENT_HUGEPAGE? y
+ TRANSPARENT_HUGEPAGE_ALWAYS? n
+ TRANSPARENT_HUGEPAGE_MADVISE? y
+
${kernelPlatform.kernelExtraConfig or ""}
${extraConfig}
''
diff --git a/pkgs/os-specific/linux/kernel/linux-3.10.nix b/pkgs/os-specific/linux/kernel/linux-3.10.nix
index 4c6e01271fb..138dad2eda5 100644
--- a/pkgs/os-specific/linux/kernel/linux-3.10.nix
+++ b/pkgs/os-specific/linux/kernel/linux-3.10.nix
@@ -1,12 +1,12 @@
{ stdenv, fetchurl, ... } @ args:
import ./generic.nix (args // rec {
- version = "3.10.33";
+ version = "3.10.37";
extraMeta.branch = "3.10";
src = fetchurl {
url = "mirror://kernel/linux/kernel/v3.x/linux-${version}.tar.xz";
- sha256 = "0pdrzhdylan87nrhpz9dxx3da0008hkch4k1cjw46gg2jmxcryhh";
+ sha256 = "0dh52s9jdvgs75dai5zqlx52xahdrscp048yd96x699hcl3g99d7";
};
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
deleted file mode 100644
index 6c3c37663c6..00000000000
--- a/pkgs/os-specific/linux/kernel/linux-3.11.nix
+++ /dev/null
@@ -1,17 +0,0 @@
-{ stdenv, fetchurl, ... } @ args:
-
-import ./generic.nix (args // rec {
- version = "3.11.10";
- extraMeta.branch = "3.11";
-
- src = fetchurl {
- url = "mirror://kernel/linux/kernel/v3.x/linux-${version}.tar.xz";
- sha256 = "00g4rbkjsmyzzm9zmdll8qqs1mffa0pybwjpn9jnli2kgh9inzyb";
- };
-
- features.iwlwifi = true;
- features.efiBootStub = true;
- features.needsCifsUtils = true;
- features.canDisableNetfilterConntrackHelpers = true;
- features.netfilterRPFilter = true;
-})
diff --git a/pkgs/os-specific/linux/kernel/linux-3.12.nix b/pkgs/os-specific/linux/kernel/linux-3.12.nix
index e2ec7295a5f..e997e1951ef 100644
--- a/pkgs/os-specific/linux/kernel/linux-3.12.nix
+++ b/pkgs/os-specific/linux/kernel/linux-3.12.nix
@@ -1,12 +1,12 @@
{ stdenv, fetchurl, ... } @ args:
import ./generic.nix (args // rec {
- version = "3.12.14";
+ version = "3.12.17";
extraMeta.branch = "3.12";
src = fetchurl {
url = "mirror://kernel/linux/kernel/v3.x/linux-${version}.tar.xz";
- sha256 = "1fv5mr8y5kn7077brajgv6l4shs8044i6pkh6phv7ms5ywacbllx";
+ sha256 = "1knjmzk5gyab0b1prmna2bb8zz19sjmmjm24h6agmpq6q4bbnc5q";
};
features.iwlwifi = true;
diff --git a/pkgs/os-specific/linux/kernel/linux-3.13.nix b/pkgs/os-specific/linux/kernel/linux-3.13.nix
index c7658cc232e..e63756a8c68 100644
--- a/pkgs/os-specific/linux/kernel/linux-3.13.nix
+++ b/pkgs/os-specific/linux/kernel/linux-3.13.nix
@@ -1,12 +1,12 @@
{ stdenv, fetchurl, ... } @ args:
import ./generic.nix (args // rec {
- version = "3.13.7";
+ version = "3.13.10";
extraMeta.branch = "3.13";
src = fetchurl {
url = "mirror://kernel/linux/kernel/v3.x/linux-${version}.tar.xz";
- sha256 = "0llyc343hzk8a2vhv63xja269jfqaavz613x98y71qfi05ald524";
+ sha256 = "00j7123r4zxypas5bs5c8girii6jrz5dwg4zzicgj3gj3frirah3";
};
features.iwlwifi = true;
diff --git a/pkgs/os-specific/linux/kernel/linux-3.14.nix b/pkgs/os-specific/linux/kernel/linux-3.14.nix
index 31e6226a3de..e81619becdf 100644
--- a/pkgs/os-specific/linux/kernel/linux-3.14.nix
+++ b/pkgs/os-specific/linux/kernel/linux-3.14.nix
@@ -1,13 +1,12 @@
{ stdenv, fetchurl, ... } @ args:
import ./generic.nix (args // rec {
- version = "3.14";
+ version = "3.14.1";
extraMeta.branch = "3.14";
- modDirVersion = "3.14.0";
src = fetchurl {
url = "mirror://kernel/linux/kernel/v3.x/linux-${version}.tar.xz";
- sha256 = "61558aa490855f42b6340d1a1596be47454909629327c49a5e4e10268065dffa";
+ sha256 = "1njm8gvlj7cq0m1051yxszl4f63383a7sv1na13hkqkv36kipgqx";
};
features.iwlwifi = true;
diff --git a/pkgs/os-specific/linux/kernel/linux-3.2.nix b/pkgs/os-specific/linux/kernel/linux-3.2.nix
index cee4bf31dfe..a73ded41edf 100644
--- a/pkgs/os-specific/linux/kernel/linux-3.2.nix
+++ b/pkgs/os-specific/linux/kernel/linux-3.2.nix
@@ -1,12 +1,12 @@
{ stdenv, fetchurl, ... } @ args:
import ./generic.nix (args // rec {
- version = "3.2.55";
+ version = "3.2.57";
extraMeta.branch = "3.2";
src = fetchurl {
url = "mirror://kernel/linux/kernel/v3.x/linux-${version}.tar.xz";
- sha256 = "15fj7kd3ba52in1siqbdq45i7xzb53yy88l9k4bgfgds3j8wxj9m";
+ sha256 = "0njiqa5fi82a4dls9z1cp33lza00bg15x93c19bsyalp53xqbnab";
};
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 294f616242d..07712b4d01c 100644
--- a/pkgs/os-specific/linux/kernel/linux-3.4.nix
+++ b/pkgs/os-specific/linux/kernel/linux-3.4.nix
@@ -1,12 +1,12 @@
{ stdenv, fetchurl, ... } @ args:
import ./generic.nix (args // rec {
- version = "3.4.83";
+ version = "3.4.87";
extraMeta.branch = "3.4";
src = fetchurl {
url = "mirror://kernel/linux/kernel/v3.x/linux-${version}.tar.xz";
- sha256 = "1jammd31cgzymaqd2qwrm1shx5xwpaxmpnv658fix275fn35a8gb";
+ sha256 = "1b7isypwjnhvdqsjnq2gsylfasjk560fq0klx18gj3kvyx6ijmqd";
};
features.iwlwifi = true;
diff --git a/pkgs/os-specific/linux/kernel/manual-config.nix b/pkgs/os-specific/linux/kernel/manual-config.nix
index dd199814760..30e2a37cb91 100644
--- a/pkgs/os-specific/linux/kernel/manual-config.nix
+++ b/pkgs/os-specific/linux/kernel/manual-config.nix
@@ -100,9 +100,14 @@ let
ln -sv ${configfile} $buildRoot/.config
make $makeFlags "''${makeFlagsArray[@]}" oldconfig
runHook postConfigure
+
+ buildFlagsArray+=("KBUILD_BUILD_TIMESTAMP=Thu Jan 1 00:00:01 UTC 1970")
'';
- buildFlags = [ "KBUILD_BUILD_VERSION=1-NixOS" platform.kernelTarget ] ++ optional isModular "modules";
+ buildFlags = [
+ "KBUILD_BUILD_VERSION=1-NixOS"
+ platform.kernelTarget
+ ] ++ optional isModular "modules";
installFlags = [
"INSTALLKERNEL=${installkernel}"
@@ -198,6 +203,7 @@ let
repositories.git = https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git;
maintainers = [
maintainers.shlevy
+ maintainers.thoughtpolice
];
platforms = platforms.linux;
};
diff --git a/pkgs/os-specific/linux/kernel/patches.nix b/pkgs/os-specific/linux/kernel/patches.nix
index 492fe647a88..f42bf440c3b 100644
--- a/pkgs/os-specific/linux/kernel/patches.nix
+++ b/pkgs/os-specific/linux/kernel/patches.nix
@@ -18,6 +18,18 @@ let
};
};
+ grsecPatch = { grversion ? "3.0", kversion, revision, branch, sha256 }:
+ { name = "grsecurity-${grversion}-${kversion}";
+ inherit grversion kversion revision;
+ patch = fetchurl {
+ url = "http://grsecurity.net/${branch}/grsecurity-${grversion}-${kversion}-${revision}.patch";
+ inherit sha256;
+ };
+ features.grsecurity = true;
+ # The grsec kernel patchset includes AppArmor patches
+ features.apparmor = true;
+ };
+
makeAppArmorPatch = {apparmor, version}:
stdenv.mkDerivation {
name = "apparmor-${version}.patch";
@@ -26,6 +38,7 @@ let
cat ${apparmor}/kernel-patches/${version}/* > $out
'';
};
+
in
rec {
@@ -71,31 +84,29 @@ rec {
sha256 = "00b1rqgd4yr206dxp4mcymr56ymbjcjfa4m82pxw73khj032qw3j";
};
-
- grsecurity_3_0_3_2_55 =
- { name = "grsecurity-3.0-3.2.55";
- patch = fetchurl {
- url = http://grsecurity.net/stable/grsecurity-3.0-3.2.55-201403252026.patch;
- sha256 = "1jfy4cfzgfixyyq5436fzwhg9ch31ynq6d5sxzajqkvmprq5kbhn";
- };
- features.grsecurity = true;
- # The grsec kernel patch seems to include the apparmor patches as of 3.0-3.2.55
- features.apparmor = true;
+ grsecurity_stable = grsecPatch
+ { kversion = "3.2.57";
+ revision = "201404131252";
+ branch = "stable";
+ sha256 = "1yic257h2vy3175c34i54873lc93y0m57rw1d059wz1wxy9waiwl";
};
- grsecurity_3_0_3_13_7 =
- { name = "grsecurity-3.0-3.13.7";
- patch = fetchurl {
- url = http://grsecurity.net/test/grsecurity-3.0-3.13.7-201403252047.patch;
- sha256 = "0f3mhkf15fpgy28rkfkd0wnccvz2n7s21gppnksl5w9dlw8m7mib";
- };
- features.grsecurity = true;
- # The grsec kernel patch seems to include the apparmor patches as of 3.0-3.13.7
- features.apparmor = true;
+ grsecurity_vserver = grsecPatch
+ { kversion = "3.2.57";
+ revision = "vs2.3.2.16-201404131253";
+ branch = "vserver";
+ sha256 = "0grhd9hbk952dwr91syi5pda1iccmcd8s0l3ki13689z8ns35f7k";
};
- grsec_path =
- { name = "grsec-path";
+ grsecurity_unstable = grsecPatch
+ { kversion = "3.13.10";
+ revision = "201404141717";
+ branch = "test";
+ sha256 = "1vraf9g7za0syx5c1x1ks7kgaxc9mjspy6pvgrs0vi326v12sqnx";
+ };
+
+ grsec_fix_path =
+ { name = "grsec-fix-path";
patch = ./grsec-path.patch;
};
}
diff --git a/pkgs/os-specific/linux/lockdep/default.nix b/pkgs/os-specific/linux/lockdep/default.nix
new file mode 100644
index 00000000000..77cb43a7b53
--- /dev/null
+++ b/pkgs/os-specific/linux/lockdep/default.nix
@@ -0,0 +1,29 @@
+{ stdenv, fetchurl }:
+
+stdenv.mkDerivation rec {
+ name = "lockdep-${version}";
+ version = "3.14";
+
+ src = fetchurl {
+ url = "mirror://kernel/linux/kernel/v3.x/linux-${version}.tar.xz";
+ sha256 = "61558aa490855f42b6340d1a1596be47454909629327c49a5e4e10268065dffa";
+ };
+
+ preConfigure = "cd tools/lib/lockdep";
+ installPhase = ''
+ mkdir -p $out/bin $out/lib $out/include
+
+ cp -R include/liblockdep $out/include
+ make install DESTDIR=$out prefix=""
+
+ substituteInPlace $out/bin/lockdep --replace "./liblockdep.so" "$out/lib/liblockdep.so"
+ '';
+
+ meta = {
+ description = "userspace locking validation tool built on the Linux kernel";
+ homepage = "https://kernel.org/";
+ license = stdenv.lib.licenses.gpl2;
+ platforms = stdenv.lib.platforms.linux;
+ maintainers = [ stdenv.lib.maintainers.thoughtpolice ];
+ };
+}
diff --git a/pkgs/os-specific/linux/lttng-modules/default.nix b/pkgs/os-specific/linux/lttng-modules/default.nix
index 1673472036f..8e20bf1e3d3 100644
--- a/pkgs/os-specific/linux/lttng-modules/default.nix
+++ b/pkgs/os-specific/linux/lttng-modules/default.nix
@@ -1,12 +1,12 @@
{ stdenv, fetchurl, kernel }:
stdenv.mkDerivation rec {
- pname = "lttng-modules-2.3.0";
+ pname = "lttng-modules-2.4.1";
name = "${pname}-${kernel.version}";
src = fetchurl {
url = "https://lttng.org/files/lttng-modules/${pname}.tar.bz2";
- sha256 = "0l9fbmpsjvm5pbrc6axy8chdp21j4b8fm0hmjhpk658ll0iixmpb";
+ sha256 = "1qn1qm8lwqw9ri9wfkf6k3d58gl9rwffmpbpkwx21v1fw95zi92k";
};
patches = [ ./lttng-fix-build-error-on-linux-3.2.patch ];
diff --git a/pkgs/os-specific/linux/lxc/default.nix b/pkgs/os-specific/linux/lxc/default.nix
index d59bb142f9f..12305687c29 100644
--- a/pkgs/os-specific/linux/lxc/default.nix
+++ b/pkgs/os-specific/linux/lxc/default.nix
@@ -3,21 +3,25 @@
}:
stdenv.mkDerivation rec {
- name = "lxc-1.0.1";
+ name = "lxc-1.0.3";
src = fetchurl {
url = "http://github.com/lxc/lxc/archive/${name}.tar.gz";
- sha256 = "14fjzicv1s3niwag301i7m9vb9jlh3hnd9ks9jjkzp8xyxgb0rrv";
+ sha256 = "04k45jgj2i501yhm467s1a1yk7h7q0fjhspys158w1a2m1hari4z";
};
buildInputs = [ libcap apparmor perl docbook2x gnutls autoreconfHook pkgconfig ];
patches = [ ./install-localstatedir-in-store.patch ./support-db2x.patch ];
- preConfigure = "export XML_CATALOG_FILES=${docbook_xml_dtd_45}/xml/dtd/docbook/catalog.xml";
+ preConfigure = ''
+ export XML_CATALOG_FILES=${docbook_xml_dtd_45}/xml/dtd/docbook/catalog.xml
+ substituteInPlace doc/rootfs/Makefile.am --replace '@LXCROOTFSMOUNT@' '$out/lib/lxc/rootfs'
+ '';
configureFlags = [
"--localstatedir=/var"
+ "--with-rootfs-path=/var/lib/lxc/rootfs"
"--enable-doc"
"--enable-tests"
"--enable-apparmor"
diff --git a/pkgs/os-specific/linux/microcode/intel.nix b/pkgs/os-specific/linux/microcode/intel.nix
index d96a4943625..8de75fbc734 100644
--- a/pkgs/os-specific/linux/microcode/intel.nix
+++ b/pkgs/os-specific/linux/microcode/intel.nix
@@ -1,13 +1,13 @@
{ stdenv, fetchurl, microcode2ucode }:
-let version = "20130906"; in
+let version = "20140122"; in
stdenv.mkDerivation {
name = "microcode-intel-${version}";
src = fetchurl {
- url = "http://downloadmirror.intel.com/23166/eng/microcode-${version}.tgz";
- sha256 = "11k327icvijadq2zkgkc3sqwzraip9cviqm25566g09523ds0svv";
+ url = "http://downloadmirror.intel.com/23574/eng/microcode-${version}.tgz";
+ sha256 = "0r5ldb1jvrf0b6b112v3wdr7ikf2zky2jgby2lnqi1xwd34x42k8";
};
buildInputs = [ microcode2ucode ];
diff --git a/pkgs/os-specific/linux/musl/default.nix b/pkgs/os-specific/linux/musl/default.nix
new file mode 100644
index 00000000000..014591f0b55
--- /dev/null
+++ b/pkgs/os-specific/linux/musl/default.nix
@@ -0,0 +1,24 @@
+{ stdenv, fetchurl }:
+
+stdenv.mkDerivation rec {
+ name = "musl-${version}";
+ version = "1.0.0";
+
+ src = fetchurl {
+ url = "http://www.musl-libc.org/releases/${name}.tar.gz";
+ sha256 = "0chs9h8k4d0iwv8w7n1w02nll3ypwqa2gag6r4czznkj55fz9mqs";
+ };
+
+ enableParallelBuilding = true;
+ configurePhase = ''
+ ./configure --enable-shared --enable-static --prefix=$out --syslibdir=$out/lib
+ '';
+
+ meta = {
+ description = "An efficient, small, quality libc implementation";
+ homepage = "http://www.musl-libc.org";
+ license = stdenv.lib.licenses.mit;
+ platforms = stdenv.lib.platforms.linux;
+ maintainers = [ stdenv.lib.maintainers.thoughtpolice ];
+ };
+}
diff --git a/pkgs/os-specific/linux/nvidia-x11/default.nix b/pkgs/os-specific/linux/nvidia-x11/default.nix
index 7391a6fdf4c..74863496a0f 100644
--- a/pkgs/os-specific/linux/nvidia-x11/default.nix
+++ b/pkgs/os-specific/linux/nvidia-x11/default.nix
@@ -21,6 +21,8 @@ stdenv.mkDerivation {
builder = ./builder.sh;
+ patches = optional (kernel ? version && versionAtLeast kernel.version "3.14") ./kernel-3.14.patch;
+
src =
if stdenv.system == "i686-linux" then
fetchurl {
diff --git a/pkgs/os-specific/linux/nvidia-x11/kernel-3.14.patch b/pkgs/os-specific/linux/nvidia-x11/kernel-3.14.patch
new file mode 100644
index 00000000000..07fb7652d32
--- /dev/null
+++ b/pkgs/os-specific/linux/nvidia-x11/kernel-3.14.patch
@@ -0,0 +1,12 @@
+--- a/kernel/nv-linux.h 2014-01-09 04:49:25.000000000 +0200
++++ b/kernel/nv-linux.h 2014-02-05 16:46:55.552408568 +0200
+@@ -273,8 +273,7 @@
+ #endif
+
+ #if !defined(NV_VMWARE) && defined(CONFIG_ACPI)
+-#include
+-#include
++#include
+ #if defined(NV_ACPI_DEVICE_OPS_HAS_MATCH) || defined(ACPI_VIDEO_HID)
+ #define NV_LINUX_ACPI_EVENTS_SUPPORTED 1
+ #endif
diff --git a/pkgs/os-specific/linux/procps/watch.nix b/pkgs/os-specific/linux/procps/watch.nix
new file mode 100644
index 00000000000..2547e26def4
--- /dev/null
+++ b/pkgs/os-specific/linux/procps/watch.nix
@@ -0,0 +1,29 @@
+{ stdenv, fetchurl, ncurses }:
+
+stdenv.mkDerivation {
+ name = "watch-0.2.0";
+
+ src = fetchurl {
+ url = http://procps.sourceforge.net/procps-3.2.8.tar.gz;
+ sha256 = "0d8mki0q4yamnkk4533kx8mc0jd879573srxhg6r2fs3lkc6iv8i";
+ };
+
+ buildInputs = [ ncurses ];
+
+ makeFlags = "watch usrbin_execdir=$(out)/bin" +
+ (if stdenv.isDarwin then " PKG_LDFLAGS=" else "");
+
+ enableParallelBuilding = true;
+
+ crossAttrs = {
+ CC = stdenv.cross.config + "-gcc";
+ };
+
+ installPhase = "mkdir $out; mkdir -p $out/bin; cp -p watch $out/bin";
+
+ meta = {
+ homepage = http://sourceforge.net/projects/procps/;
+ description = "Utility for watch the output of a given command at intervals";
+ platforms = stdenv.lib.platforms.unix;
+ };
+}
diff --git a/pkgs/os-specific/linux/shadow/default.nix b/pkgs/os-specific/linux/shadow/default.nix
index 1055fccd8aa..9d024ae3109 100644
--- a/pkgs/os-specific/linux/shadow/default.nix
+++ b/pkgs/os-specific/linux/shadow/default.nix
@@ -26,6 +26,8 @@ stdenv.mkDerivation rec {
patches = [ ./keep-path.patch dots_in_usernames ];
+ outputs = [ "out" "su" ];
+
# Assume System V `setpgrp (void)', which is the default on GNU variants
# (`AC_FUNC_SETPGRP' is not cross-compilation capable.)
preConfigure = "export ac_cv_func_setpgrp_void=yes";
@@ -35,10 +37,14 @@ stdenv.mkDerivation rec {
substituteInPlace lib/nscd.c --replace /usr/sbin/nscd ${glibc}/sbin/nscd
'';
- # Don't install ‘groups’, since coreutils already provides it.
postInstall =
''
+ # Don't install ‘groups’, since coreutils already provides it.
rm $out/bin/groups $out/share/man/man1/groups.*
+
+ # Move the su binary into the su package
+ mkdir -p $su/bin
+ mv $out/bin/su $su/bin
'';
meta = {
diff --git a/pkgs/os-specific/linux/sysdig/default.nix b/pkgs/os-specific/linux/sysdig/default.nix
new file mode 100644
index 00000000000..6f5bb3869bb
--- /dev/null
+++ b/pkgs/os-specific/linux/sysdig/default.nix
@@ -0,0 +1,41 @@
+{stdenv, fetchurl, cmake, luajit, kernel}:
+let
+ s = # Generated upstream information
+ rec {
+ baseName="sysdig";
+ version="0.1.79";
+ name="${baseName}-${version}";
+ hash="04ng4q859xxlpsnavx6rcgmq7frzgbzxm0p5zmdsmhz8m6hfvz7l";
+ url="https://github.com/draios/sysdig/archive/0.1.79.tar.gz";
+ sha256="04ng4q859xxlpsnavx6rcgmq7frzgbzxm0p5zmdsmhz8m6hfvz7l";
+ };
+ buildInputs = [
+ cmake luajit kernel
+ ];
+in
+stdenv.mkDerivation {
+ inherit (s) name version;
+ inherit buildInputs;
+ src = fetchurl {
+ inherit (s) url sha256;
+ };
+
+ cmakeFlags = [
+ "-DUSE_BUNDLED_LUAJIT=OFF"
+ ];
+ makeFlags = [
+ "KERNELDIR=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build"
+ ];
+ postInstall = ''
+ mkdir -p $out/lib/modules/${kernel.modDirVersion}/misc/sysdig
+ cp driver/*.ko $out/lib/modules/${kernel.modDirVersion}/misc/sysdig
+ '';
+
+ meta = {
+ inherit (s) version;
+ description = ''A tracepoint-based system tracing tool for Linux'';
+ license = stdenv.lib.licenses.gpl2 ;
+ maintainers = [stdenv.lib.maintainers.raskin];
+ platforms = stdenv.lib.platforms.linux;
+ };
+}
diff --git a/pkgs/os-specific/linux/sysdig/default.upstream b/pkgs/os-specific/linux/sysdig/default.upstream
new file mode 100644
index 00000000000..7071d982500
--- /dev/null
+++ b/pkgs/os-specific/linux/sysdig/default.upstream
@@ -0,0 +1,3 @@
+url https://github.com/draios/sysdig/releases
+ensure_choice
+version '.*/([0-9.]+)[.]tar[.].*' '\1'
diff --git a/pkgs/os-specific/linux/udisks/1-default.nix b/pkgs/os-specific/linux/udisks/1-default.nix
index 485880f0cbb..09731d54ab7 100644
--- a/pkgs/os-specific/linux/udisks/1-default.nix
+++ b/pkgs/os-specific/linux/udisks/1-default.nix
@@ -3,14 +3,14 @@
, libxslt, docbook_xsl, utillinux }:
stdenv.mkDerivation rec {
- name = "udisks-1.0.5";
+ name = "udisks-1.0.4";
src = fetchurl {
url = "http://hal.freedesktop.org/releases/${name}.tar.gz";
- sha256 = "0wbg3jrv8limdgvcygf4dqin3y6d30y9pcmmk711vq571vmq5v7j";
+ sha256 = "1xgqifddwaavmjc8c30i0mdffyirsld7c6qhfyjw7f9khwv8jjw5";
};
- patches = [ ./purity.patch ./no-pci-db.patch ];
+ patches = [ ./purity.patch ./no-pci-db.patch ./cve-2014-0004.patch ];
postPatch =
''
@@ -19,11 +19,6 @@ stdenv.mkDerivation rec {
substituteInPlace src/main.c --replace \
"/sbin:/bin:/usr/sbin:/usr/bin" \
"${utillinux}/bin:${mdadm}/sbin:/var/run/current-system/sw/bin:/var/run/current-system/sw/sbin"
-
- # For some reason @libexec@ is set to 'lib/' when building.
- # Passing --libexecdir in configureFlags didn't help.
- substituteInPlace data/systemd/udisks.service.in \
- --replace "@libexecdir@" "$out/libexec"
'';
buildInputs =
@@ -33,11 +28,7 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ pkgconfig ];
- configureFlags = [
- "--localstatedir=/var"
- "--enable-lvm2"
- "--with-systemdsystemunitdir=$(out)/etc/systemd/system"
- ];
+ configureFlags = "--localstatedir=/var --enable-lvm2";
meta = {
homepage = http://www.freedesktop.org/wiki/Software/udisks;
diff --git a/pkgs/os-specific/linux/udisks/cve-2014-0004.patch b/pkgs/os-specific/linux/udisks/cve-2014-0004.patch
new file mode 100644
index 00000000000..ce907507538
--- /dev/null
+++ b/pkgs/os-specific/linux/udisks/cve-2014-0004.patch
@@ -0,0 +1,82 @@
+commit ebf61ed8471a45cf8bce7231de00cb1bbc140708
+Author: Martin Pitt
+Date: Wed Mar 5 14:07:44 2014 +0100
+
+ Fix buffer overflow in mount path parsing
+
+ In the mount monitor we parse mount points from /proc/self/mountinfo. Ensure
+ that we don't overflow the buffers on platforms where mount paths could be
+ longer than PATH_MAX (unknown if that can actually happen), as at least the
+ mount paths for hotpluggable devices are somewhat user-controlled.
+
+ Thanks to Florian Weimer for discovering this bug, and to David Zeuthen
+ for his initial patch!
+
+ CVE-2014-0004
+
+Index: udisks-1.0.4/src/mount-monitor.c
+===================================================================
+--- udisks-1.0.4.orig/src/mount-monitor.c 2011-08-25 20:27:33.000000000 +0200
++++ udisks-1.0.4/src/mount-monitor.c 2014-03-10 13:38:18.309406561 +0100
+@@ -39,6 +39,11 @@
+ #include "mount.h"
+ #include "private.h"
+
++/* build a %Ns format string macro with N == PATH_MAX */
++#define xstr(s) str(s)
++#define str(s) #s
++#define PATH_MAX_FMT "%" xstr(PATH_MAX) "s"
++
+ /*--------------------------------------------------------------------------------------------------------------*/
+
+ enum
+@@ -320,8 +325,8 @@ mount_monitor_ensure (MountMonitor *moni
+ guint mount_id;
+ guint parent_id;
+ guint major, minor;
+- gchar encoded_root[PATH_MAX];
+- gchar encoded_mount_point[PATH_MAX];
++ gchar encoded_root[PATH_MAX + 1];
++ gchar encoded_mount_point[PATH_MAX + 1];
+ gchar *mount_point;
+ dev_t dev;
+
+@@ -329,7 +334,7 @@ mount_monitor_ensure (MountMonitor *moni
+ continue;
+
+ if (sscanf (lines[n],
+- "%d %d %d:%d %s %s",
++ "%d %d %d:%d " PATH_MAX_FMT " " PATH_MAX_FMT,
+ &mount_id,
+ &parent_id,
+ &major,
+@@ -340,6 +345,8 @@ mount_monitor_ensure (MountMonitor *moni
+ g_warning ("Error parsing line '%s'", lines[n]);
+ continue;
+ }
++ encoded_root[sizeof encoded_root - 1] = '\0';
++ encoded_mount_point[sizeof encoded_mount_point - 1] = '\0';
+
+ /* ignore mounts where only a subtree of a filesystem is mounted */
+ if (g_strcmp0 (encoded_root, "/") != 0)
+@@ -358,15 +365,17 @@ mount_monitor_ensure (MountMonitor *moni
+ sep = strstr (lines[n], " - ");
+ if (sep != NULL)
+ {
+- gchar fstype[PATH_MAX];
+- gchar mount_source[PATH_MAX];
++ gchar fstype[PATH_MAX + 1];
++ gchar mount_source[PATH_MAX + 1];
+ struct stat statbuf;
+
+- if (sscanf (sep + 3, "%s %s", fstype, mount_source) != 2)
++ if (sscanf (sep + 3, PATH_MAX_FMT " " PATH_MAX_FMT, fstype, mount_source) != 2)
+ {
+ g_warning ("Error parsing things past - for '%s'", lines[n]);
+ continue;
+ }
++ fstype[sizeof fstype - 1] = '\0';
++ mount_source[sizeof mount_source - 1] = '\0';
+
+ if (g_strcmp0 (fstype, "btrfs") != 0)
+ continue;
diff --git a/pkgs/os-specific/linux/util-linux/default.nix b/pkgs/os-specific/linux/util-linux/default.nix
index 3f676d37dd8..ec43ee1e64f 100644
--- a/pkgs/os-specific/linux/util-linux/default.nix
+++ b/pkgs/os-specific/linux/util-linux/default.nix
@@ -36,6 +36,10 @@ stdenv.mkDerivation rec {
++ stdenv.lib.optional (ncurses != null) ncurses
++ stdenv.lib.optional (perl != null) perl;
+ postInstall = ''
+ rm $out/bin/su # su should be supplied by the su package (shadow)
+ '';
+
enableParallelBuilding = true;
meta = {
diff --git a/pkgs/os-specific/linux/v4l2loopback/default.nix b/pkgs/os-specific/linux/v4l2loopback/default.nix
index af1cf6d320c..5b88d4c7556 100644
--- a/pkgs/os-specific/linux/v4l2loopback/default.nix
+++ b/pkgs/os-specific/linux/v4l2loopback/default.nix
@@ -23,7 +23,7 @@ stdenv.mkDerivation rec {
];
meta = with stdenv.lib; {
- description = "a kernel module to create V4L2 loopback devices";
+ description = "A kernel module to create V4L2 loopback devices";
homepage = https://github.com/umlaeute/v4l2loopback;
license = licenses.gpl2;
maintainers = [ maintainers.iElectric ];
diff --git a/pkgs/servers/apcupsd/default.nix b/pkgs/servers/apcupsd/default.nix
index 6489d4dceff..ad8685d3d42 100644
--- a/pkgs/servers/apcupsd/default.nix
+++ b/pkgs/servers/apcupsd/default.nix
@@ -2,13 +2,15 @@
, enableCgiScripts ? true, gd
}:
+assert enableCgiScripts -> gd != null;
+
stdenv.mkDerivation rec {
pname = "apcupsd";
- name = "${pname}-3.14.11";
+ name = "${pname}-3.14.12";
src = fetchurl {
url = "mirror://sourceforge/${pname}/${name}.tar.gz";
- sha256 = "0wrb8vdc872f1x0gw21b5c81h0vxvsc7yks5qzbq2j3hkbl2vixd";
+ sha256 = "0h54ahj65nqrgmdcg81h1gp0zlxg9hwwhg8pmx6z9zcwn4y70kqv";
};
buildInputs = [ pkgconfig utillinux man ] ++ stdenv.lib.optional enableCgiScripts gd;
diff --git a/pkgs/servers/http/apache-httpd/2.4.nix b/pkgs/servers/http/apache-httpd/2.4.nix
index 2bbe9798de4..7deab6584f8 100644
--- a/pkgs/servers/http/apache-httpd/2.4.nix
+++ b/pkgs/servers/http/apache-httpd/2.4.nix
@@ -14,12 +14,12 @@ assert sslSupport -> aprutil.sslSupport && openssl != null;
assert ldapSupport -> aprutil.ldapSupport && openldap != null;
stdenv.mkDerivation rec {
- version = "2.4.7";
+ version = "2.4.9";
name = "apache-httpd-${version}";
src = fetchurl {
url = "mirror://apache/httpd/httpd-${version}.tar.bz2";
- sha256 = "06z7ij0avr8f3rvp6ifk3dn8j73i17cn4avz4fp1as43061qsdk4";
+ sha256 = "00vnhki0rdwlhl4cjgvkq5vpf8szx2sdd3yi7bcg7jj7z86wk37p";
};
buildInputs = [perl] ++
diff --git a/pkgs/servers/http/apache-modules/mod_dnssd/default.nix b/pkgs/servers/http/apache-modules/mod_dnssd/default.nix
new file mode 100644
index 00000000000..06f12820a10
--- /dev/null
+++ b/pkgs/servers/http/apache-modules/mod_dnssd/default.nix
@@ -0,0 +1,28 @@
+{ stdenv, fetchurl, pkgconfig, apacheHttpd_2_2, apr, avahi }:
+
+stdenv.mkDerivation rec {
+ name = "mod_dnssd-0.6";
+
+ src = fetchurl {
+ url = "http://0pointer.de/lennart/projects/mod_dnssd/${name}.tar.gz";
+ sha256 = "2cd171d76eba398f03c1d5bcc468a1756f4801cd8ed5bd065086e4374997c5aa";
+ };
+
+ configureFlags = [ "--disable-lynx" ];
+
+ buildInputs = [ pkgconfig apacheHttpd_2_2 avahi apr ];
+
+ installPhase = ''
+ mkdir -p $out/modules
+ cp src/.libs/mod_dnssd.so $out/modules
+ '';
+
+ meta = with stdenv.lib; {
+ homepage = http://0pointer.de/lennart/projects/mod_dnssd;
+ description = "Provide Zeroconf support via DNS-SD using Avahi";
+ license = licenses.asl20;
+ platforms = platforms.linux;
+ maintainers = with maintainers; [ lethalman ];
+ };
+}
+
diff --git a/pkgs/servers/monitoring/munin/default.nix b/pkgs/servers/monitoring/munin/default.nix
index a0c0423042e..8d1b03ddf34 100644
--- a/pkgs/servers/monitoring/munin/default.nix
+++ b/pkgs/servers/monitoring/munin/default.nix
@@ -1,15 +1,14 @@
-{ stdenv, fetchgit, makeWrapper, which, coreutils, rrdtool, perl, perlPackages
+{ stdenv, fetchurl, makeWrapper, which, coreutils, rrdtool, perl, perlPackages
, python, ruby, openjdk, nettools
}:
stdenv.mkDerivation rec {
- version = "2.0.19";
+ version = "2.0.20";
name = "munin-${version}";
- src = fetchgit {
- url = "git://github.com/munin-monitoring/munin.git";
- rev = "refs/tags/${version}";
- sha256 = "0027rrdrmcql68b475jlxnfgkijbfngynkjpdii6fgaszswqz3ay";
+ src = fetchurl {
+ url = "https://github.com/munin-monitoring/munin/archive/${version}.tar.gz";
+ sha256 = "17b24fsr8abipq09hipnh6cd4h2aiwyzyjhg0wpplngwals54qmc";
};
buildInputs = [
diff --git a/pkgs/servers/news/leafnode/default.nix b/pkgs/servers/news/leafnode/default.nix
new file mode 100644
index 00000000000..9da83fe891f
--- /dev/null
+++ b/pkgs/servers/news/leafnode/default.nix
@@ -0,0 +1,28 @@
+{ stdenv, fetchurl, pcre }:
+
+stdenv.mkDerivation rec {
+ name = "leafnode-2.0.0.alpha20121101a.12";
+
+ src = fetchurl {
+ url = "http://home.pages.de/~mandree/leafnode/beta/leafnode-2.0.0.alpha20121101a.tar.bz2";
+ sha256 = "096w4gxj08m3vwmyv4sxpmbl8dn6mzqfmrhc32jgyca6qzlrdin8";
+ };
+
+ configureFlags = "--enable-runas-user=nobody";
+
+ postConfigure = ''
+ # The is_validfqdn is far too restrictive, and only allows
+ # Internet-facing servers to run. In order to run leafnode via
+ # localhost only, we need to disable this check.
+ sed -i validatefqdn.c -e 's/int is_validfqdn(const char \*f) {/int is_validfqdn(const char *f) { return 1;/;'
+ '';
+
+ buildInputs = [ pcre];
+
+ meta = {
+ homepage = "http://leafnode.sourceforge.net/";
+ description = "Leafnode implements a store & forward NNTP proxy";
+ license = "X11";
+ platforms = stdenv.lib.platforms.unix;
+ };
+}
diff --git a/pkgs/servers/rippled/default.nix b/pkgs/servers/rippled/default.nix
new file mode 100644
index 00000000000..66a0743b367
--- /dev/null
+++ b/pkgs/servers/rippled/default.nix
@@ -0,0 +1,32 @@
+{ stdenv, fetchurl, scons, pkgconfig, openssl, protobuf, boost155, zlib}:
+
+stdenv.mkDerivation rec {
+ name = "rippled-${version}";
+ version = "0.23.0";
+
+ src = fetchurl {
+ url = "https://github.com/ripple/rippled/archive/${version}.tar.gz";
+ sha256 = "0js734sk11jn19fyp403mk6p62azlc6s9kyhr5jfg466fiak537p";
+ };
+
+ patches = [ ./scons-env.patch ];
+
+ buildInputs = [ scons pkgconfig openssl protobuf boost155 zlib ];
+
+ RIPPLED_BOOST_HOME = boost155.out;
+ RIPPLED_ZLIB_HOME = zlib.out;
+ buildPhase = "scons build/rippled";
+
+ installPhase = ''
+ mkdir -p $out/bin
+ cp build/rippled $out/bin/
+ '';
+
+ meta = {
+ description = "Ripple P2P payment network reference server";
+ homepage = "https://ripple.com";
+ maintainers = stdenv.lib.maintainers.emery;
+ license = stdenv.lib.licenses.isc;
+ platforms = stdenv.lib.platforms.linux;
+ };
+}
\ No newline at end of file
diff --git a/pkgs/servers/rippled/scons-env.patch b/pkgs/servers/rippled/scons-env.patch
new file mode 100644
index 00000000000..5b80e77bb2e
--- /dev/null
+++ b/pkgs/servers/rippled/scons-env.patch
@@ -0,0 +1,46 @@
+diff --git a/SConstruct b/SConstruct
+index 8ba8bbd..95eab3b 100644
+--- a/SConstruct
++++ b/SConstruct
+@@ -24,6 +24,8 @@ USING_CLANG = OSX or os.environ.get('CC', None) == 'clang'
+ #
+ BOOST_HOME = os.environ.get("RIPPLED_BOOST_HOME", None)
+
++ZLIB_HOME = os.environ.get("RIPPLED_ZLIB_HOME", None)
++
+
+ if OSX or Ubuntu or Debian or Archlinux:
+ CTAGS = 'ctags'
+@@ -36,7 +38,7 @@ else:
+ # scons tools
+ #
+
+-HONOR_ENVS = ['CC', 'CXX', 'PATH']
++HONOR_ENVS = ['CC', 'CXX', 'PATH', 'PKG_CONFIG_PATH']
+
+ env = Environment(
+ tools = ['default', 'protoc'],
+@@ -156,8 +158,8 @@ INCLUDE_PATHS = [
+ 'build/proto'
+ ]
+
+-# if BOOST_HOME:
+-# INCLUDE_PATHS.append(BOOST_HOME)
++if BOOST_HOME:
++ INCLUDE_PATHS.append("%s/include" % BOOST_HOME)
+
+ #-------------------------------------------------------------------------------
+ #
+@@ -261,7 +263,11 @@ env.Append(
+ # such, as installed into `/usr/lib/`
+ if BOOST_HOME is not None:
+ env.Prepend(
+- LIBPATH = ["%s/stage/lib" % BOOST_HOME])
++ LIBPATH = ["%s/lib" % BOOST_HOME])
++
++if ZLIB_HOME is not None:
++ env.Prepend(
++ LIBPATH = ["%s/lib" % ZLIB_HOME])
+
+ if not OSX:
+ env.Append(LINKFLAGS = [
diff --git a/pkgs/servers/sql/mariadb/default.nix b/pkgs/servers/sql/mariadb/default.nix
index db6797a8d68..a6105c12890 100644
--- a/pkgs/servers/sql/mariadb/default.nix
+++ b/pkgs/servers/sql/mariadb/default.nix
@@ -1,11 +1,11 @@
{ stdenv, fetchurl, cmake, ncurses, openssl, bison, boost, libxml2, libaio, judy, libevent, groff }:
stdenv.mkDerivation rec {
- name = "mariadb-10.0.8";
+ name = "mariadb-10.0.10";
src = fetchurl {
- url = "http://tweedo.com/mirror/mariadb/${name}/kvm-tarbake-jaunty-x86/${name}.tar.gz";
- md5 = "2b925d0beae8101f1f3f98102da91bf7";
+ url = "https://fossies.org/linux/misc/${name}.tar.gz";
+ md5 = "14ce22b8197d4eae88d237776d47220f";
};
buildInputs = [ cmake ncurses openssl bison boost libxml2 libaio judy libevent groff ];
diff --git a/pkgs/servers/sql/postgresql/9.3.x.nix b/pkgs/servers/sql/postgresql/9.3.x.nix
index 3b5c820c94d..672eeb8da6e 100644
--- a/pkgs/servers/sql/postgresql/9.3.x.nix
+++ b/pkgs/servers/sql/postgresql/9.3.x.nix
@@ -1,5 +1,7 @@
{ stdenv, fetchurl, zlib, readline, libossp_uuid }:
+with stdenv.lib;
+
let version = "9.3.3"; in
stdenv.mkDerivation rec {
@@ -10,13 +12,13 @@ stdenv.mkDerivation rec {
sha256 = "e925d8abe7157bd8bece6b7c0dd0c343d87a2b4336f85f4681ce596af99c3879";
};
- buildInputs = [ zlib readline libossp_uuid ];
+ buildInputs = [ zlib readline ] ++ optionals (!stdenv.isDarwin) [ libossp_uuid ];
enableParallelBuilding = true;
makeFlags = [ "world" ];
- configureFlags =
+ configureFlags = optional (!stdenv.isDarwin)
''
--with-ossp-uuid
'';
diff --git a/pkgs/shells/ipython/default.nix b/pkgs/shells/ipython/default.nix
index b9b9129cb48..cb0cc95c4ce 100644
--- a/pkgs/shells/ipython/default.nix
+++ b/pkgs/shells/ipython/default.nix
@@ -13,12 +13,12 @@ assert qtconsoleSupport == true -> pyqt4 != null;
assert pylabQtSupport == true -> pyqt4 != null && sip != null;
buildPythonPackage rec {
- name = "ipython-1.1.0";
+ name = "ipython-2.0.0";
namePrefix = "";
src = fetchurl {
url = "http://pypi.python.org/packages/source/i/ipython/${name}.tar.gz";
- sha256 = "1glivwy7k2dciy0y5i39syngip84nrqhpggn4glmpd2s49jllkkc";
+ sha256 = "0fl9sznx83y2ck8wh5zr8avzjm5hz6r0xz38ij2fil3gin7w10sf";
};
propagatedBuildInputs = [
diff --git a/pkgs/shells/zsh/default.nix b/pkgs/shells/zsh/default.nix
index 50a33700b3b..37ffb09288e 100644
--- a/pkgs/shells/zsh/default.nix
+++ b/pkgs/shells/zsh/default.nix
@@ -2,13 +2,13 @@
let
- version = "5.0.2";
+ version = "5.0.5";
documentation = fetchurl {
url = "mirror://sourceforge/zsh/zsh-${version}-doc.tar.bz2";
- sha256 = "99ee08cfc91935af8714bd98db652f016d6c7a8a71ba7c6d6223910cd0b7fbf1";
+ sha256 = "1wljqii2lkz5kc4y3xs65isnahvnlj678b9zv31bn444mapjpwp4";
};
-
+
in
stdenv.mkDerivation {
@@ -16,9 +16,9 @@ stdenv.mkDerivation {
src = fetchurl {
url = "mirror://sourceforge/zsh/zsh-${version}.tar.bz2";
- sha256 = "eb220ae5a8076191ec6b4c6a5a2f18122d074a19f25b45f0320b44b8166c5a03";
+ sha256 = "1bwfz9n850pclzmzrb437icfhzv1s5pgh2dhs92f194gdkxx4936";
};
-
+
buildInputs = [ ncurses coreutils ];
preConfigure = ''
diff --git a/pkgs/stdenv/generic/default.nix b/pkgs/stdenv/generic/default.nix
index f1cf34b160c..4ee9251f4bb 100644
--- a/pkgs/stdenv/generic/default.nix
+++ b/pkgs/stdenv/generic/default.nix
@@ -14,9 +14,9 @@ let lib = import ../../../lib; in lib.makeOverridable (
let
- allowUnfree = config.allowUnfree or true && builtins.getEnv "HYDRA_DISALLOW_UNFREE" != "1";
+ allowUnfree = config.allowUnfree or false || builtins.getEnv "NIXPKGS_ALLOW_UNFREE" == "1";
- allowBroken = builtins.getEnv "NIXPKGS_ALLOW_BROKEN" == "1";
+ allowBroken = config.allowBroken or false || builtins.getEnv "NIXPKGS_ALLOW_BROKEN" == "1";
unsafeGetAttrPos = builtins.unsafeGetAttrPos or (n: as: null);
@@ -58,7 +58,16 @@ let
pos' = if pos != null then "‘" + pos.file + ":" + toString pos.line + "’" else "«unknown-file»";
in
if !allowUnfree && (let l = lib.lists.toList attrs.meta.license or []; in lib.lists.elem "unfree" l || lib.lists.elem "unfree-redistributable" l) then
- throw "package ‘${attrs.name}’ in ${pos'} has an unfree license, refusing to evaluate"
+ throw ''package ‘${attrs.name}’ in ${pos'} has an unfree license, refusing to evaluate.
+ You can set
+ { nixpkgs.config.allowUnfree = true; }
+ in configuration.nix to override this.
+ If you use Nix standalone, you can add
+ { config.allowUnfree = true; }
+ to ~/.nixpkgs/config.nix or pass
+ --arg config '{ allowUnfree = true; }'
+ on the command line.
+ ''
else if !allowBroken && attrs.meta.broken or false then
throw "you can't use package ‘${attrs.name}’ in ${pos'} because it has been marked as broken"
else if !allowBroken && attrs.meta.platforms or null != null && !lib.lists.elem result.system attrs.meta.platforms then
diff --git a/pkgs/stdenv/generic/setup.sh b/pkgs/stdenv/generic/setup.sh
index 4740c638633..1d79a45678c 100644
--- a/pkgs/stdenv/generic/setup.sh
+++ b/pkgs/stdenv/generic/setup.sh
@@ -304,9 +304,11 @@ substitute() {
local -a params=("$@")
- local n p pattern replacement varName
+ local n p pattern replacement varName content
- local content="$(cat $input)"
+ # a slightly hacky way to keep newline at the end
+ content="$(cat $input; echo -n X)"
+ content="${content%X}"
for ((n = 2; n < ${#params[*]}; n += 1)); do
p=${params[$n]}
@@ -877,7 +879,7 @@ genericBuild() {
if [ -z "$phases" ]; then
phases="$prePhases unpackPhase patchPhase $preConfigurePhases \
configurePhase $preBuildPhases buildPhase checkPhase \
- $preInstallPhases installPhase fixupPhase installCheckPhase \
+ $preInstallPhases installPhase $preFixupPhases fixupPhase installCheckPhase \
$preDistPhases distPhase $postPhases";
fi
diff --git a/pkgs/stdenv/mingw/setup.sh b/pkgs/stdenv/mingw/setup.sh
index 592580a829e..c757eb7ae54 100755
--- a/pkgs/stdenv/mingw/setup.sh
+++ b/pkgs/stdenv/mingw/setup.sh
@@ -725,7 +725,7 @@ genericBuild() {
if test -z "$phases"; then
phases="$prePhases unpackPhase patchPhase $preConfigurePhases \
configurePhase $preBuildPhases buildPhase checkPhase \
- $preInstallPhases installPhase fixupPhase \
+ $preInstallPhases installPhase $preFixupPhases fixupPhase \
$preDistPhases distPhase $postPhases";
fi
diff --git a/pkgs/tools/X11/xdg-user-dirs/default.nix b/pkgs/tools/X11/xdg-user-dirs/default.nix
new file mode 100644
index 00000000000..bb26c0f46ce
--- /dev/null
+++ b/pkgs/tools/X11/xdg-user-dirs/default.nix
@@ -0,0 +1,20 @@
+{ stdenv, fetchurl, libxslt, docbook_xsl }:
+
+stdenv.mkDerivation rec {
+ name = "xdg-user-dirs-0.15";
+
+ src = fetchurl {
+ url = "http://user-dirs.freedesktop.org/releases/${name}.tar.gz";
+ sha256 = "20b4a751f41d0554bce3e0ce5e8d934be98cc62d48f0b90a894c3e1916552786";
+ };
+
+ buildInputs = [ libxslt docbook_xsl ];
+
+ meta = with stdenv.lib; {
+ homepage = http://freedesktop.org/wiki/Software/xdg-user-dirs;
+ description = "A tool to help manage well known user directories like the desktop folder and the music folder";
+ license = licenses.gpl2;
+ maintainers = with maintainers; [ lethalman ];
+ platforms = platforms.linux;
+ };
+}
diff --git a/pkgs/tools/admin/gtk-vnc/default.nix b/pkgs/tools/admin/gtk-vnc/default.nix
index d4c45b7ba96..c3a82b2e4a2 100644
--- a/pkgs/tools/admin/gtk-vnc/default.nix
+++ b/pkgs/tools/admin/gtk-vnc/default.nix
@@ -1,8 +1,8 @@
-{ stdenv, fetchurl
+{ stdenv, fetchurl, gobjectIntrospection
, python, gtk, pygtk, gnutls, cairo, libtool, glib, pkgconfig, libtasn1
, libffi, cyrus_sasl, intltool, perl, perlPackages, firefoxPkgs, pulseaudio
-, kbproto, libX11, libXext, xextproto, pygobject, libgcrypt }:
-
+, kbproto, libX11, libXext, xextproto, pygobject, libgcrypt, gtk3, vala
+, pygobject3, enableGTK3 ? false }:
stdenv.mkDerivation rec {
name = "gtk-vnc-${version}";
@@ -14,21 +14,24 @@ stdenv.mkDerivation rec {
};
buildInputs = [
- python gtk pygtk gnutls cairo libtool pkgconfig glib libffi libgcrypt
- intltool cyrus_sasl pulseaudio pygobject perl perlPackages.TextCSV
- ];
+ python gnutls cairo libtool pkgconfig glib libffi libgcrypt
+ intltool cyrus_sasl pulseaudio perl perlPackages.TextCSV
+ gobjectIntrospection
+ ] ++ (if enableGTK3 then [ gtk3 vala pygobject3 ] else [ gtk pygtk pygobject ]);
NIX_CFLAGS_COMPILE = "-fstack-protector-all";
configureFlags = [
"--with-python"
"--with-examples"
+ (if enableGTK3 then "--with-gtk=3.0" else "--with-gtk=2.0")
];
- makeFlags = "CODEGENDIR=${pygobject}/share/pygobject/2.0/codegen/ DEFSDIR=${pygtk}/share/pygtk/2.0/defs/";
+ makeFlags = stdenv.lib.optionalString (!enableGTK3)
+ "CODEGENDIR=${pygobject}/share/pygobject/2.0/codegen/ DEFSDIR=${pygtk}/share/pygtk/2.0/defs/";
meta = with stdenv.lib; {
description = "A GTK VNC widget";
- maintainers = with maintainers; [ raskin ];
+ maintainers = with maintainers; [ raskin offline ];
platforms = platforms.linux;
license = licenses.lgpl21;
};
diff --git a/pkgs/tools/archivers/unrar/default.nix b/pkgs/tools/archivers/unrar/default.nix
index c790f767f12..a3ab95d1ab8 100644
--- a/pkgs/tools/archivers/unrar/default.nix
+++ b/pkgs/tools/archivers/unrar/default.nix
@@ -1,28 +1,32 @@
{stdenv, fetchurl}:
+
+let
+ version = "5.1.2";
+in
stdenv.mkDerivation {
- name = "unrar-3.9.10";
+ name = "unrar-${version}";
src = fetchurl {
- url = http://www.rarlab.com/rar/unrarsrc-3.9.10.tar.gz;
- sha256 = "0yi0i2j4srca8cag96ajc80m5xb5328ydzjab6y8h1bhypc2fiiv";
+ url = "http://www.rarlab.com/rar/unrarsrc-${version}.tar.gz";
+ sha256 = "0344cn4w3lw2111m3g431khiyndx9ibbp952bli1inx2fixps9cq";
};
- # Add a missing objects to the library
- #patchPhase = ''
- # sed -i 's/^\(LIB_OBJ=.*\)/\1 recvol.o rs.o/' makefile.unix
- #'';
-
- buildPhase = ''
- make -f makefile.unix unrar
- rm *.o
- make -f makefile.unix lib CXXFLAGS="-fPIC -O2 -DSILENT";
+ patchPhase = ''
+ sed -i \
+ -e "/CXX=/d" \
+ -e "/CXXFLAGS=/d" \
+ makefile
'';
installPhase = ''
- mkdir -p $out/bin $out/lib
+ mkdir -p $out/bin
cp unrar $out/bin
- cp libunrar.so $out/lib
'';
- buildInputs = [];
+ meta = {
+ description = "Utility for RAR archives";
+ license = "freeware";
+ maintainers = [ stdenv.lib.maintainers.emery ];
+ platforms = stdenv.lib.platforms.linux; # arbitrary
+ };
}
diff --git a/pkgs/tools/backup/duply/default.nix b/pkgs/tools/backup/duply/default.nix
index 91718fc02f7..73ef23059f4 100644
--- a/pkgs/tools/backup/duply/default.nix
+++ b/pkgs/tools/backup/duply/default.nix
@@ -3,11 +3,11 @@
}:
stdenv.mkDerivation {
- name = "duply-1.6.0";
+ name = "duply-1.7.3";
src = fetchurl {
- url = "mirror://sourceforge/project/ftplicity/duply%20%28simple%20duplicity%29/1.6.x/duply_1.6.0.tgz";
- sha256 = "1i1yy4z6fcf3lq2k72cqcyqspm7pa1m949f8l9yscjm47bwp5g8f";
+ url = "mirror://sourceforge/project/ftplicity/duply%20%28simple%20duplicity%29/1.7.x/duply_1.7.3.tgz";
+ sha256 = "1lq5gwz69l8g4ki4anvmjdngbs9nin124j1zb9kbcnqj0s5jkbp0";
};
buildInputs = [ txt2man makeWrapper ];
diff --git a/pkgs/tools/backup/httrack/default.nix b/pkgs/tools/backup/httrack/default.nix
index 4fa3345d220..a77689c85fc 100644
--- a/pkgs/tools/backup/httrack/default.nix
+++ b/pkgs/tools/backup/httrack/default.nix
@@ -1,12 +1,12 @@
{ stdenv, fetchurl, zlib, openssl }:
stdenv.mkDerivation rec {
- version = "3.47.27";
+ version = "3.48.3";
name = "httrack-${version}";
src = fetchurl {
url = "http://mirror.httrack.com/httrack-${version}.tar.gz";
- sha256 = "1qgrs9wdqq4v9ywlb1b89i95w4a36y741l49xbpmb7mb7nvbz5kw";
+ sha256 = "1lg5rrql01q3z7fwcij5p64r22x4vbswcky80gajx5f62kxlxn0r";
};
buildInputs = [ zlib openssl ];
diff --git a/pkgs/tools/filesystems/btrfsprogs/default.nix b/pkgs/tools/filesystems/btrfsprogs/default.nix
index 16c5b58c38d..a41b2f28d85 100644
--- a/pkgs/tools/filesystems/btrfsprogs/default.nix
+++ b/pkgs/tools/filesystems/btrfsprogs/default.nix
@@ -1,13 +1,13 @@
{ stdenv, fetchurl, attr, acl, zlib, libuuid, e2fsprogs, lzo }:
-let version = "3.12"; in
+let version = "3.14"; in
stdenv.mkDerivation rec {
name = "btrfs-progs-${version}";
src = fetchurl {
url = "mirror://kernel/linux/kernel/people/mason/btrfs-progs/btrfs-progs-v${version}.tar.xz";
- sha256 = "1pwcjf9jqdiy8445r1xkazqa07xmapnn0ylyz7yzphci3ib66zh9";
+ sha256 = "1qjy4bc96nfzkdjp6hwb85aasqs87nkmgi8pl6qa6cpvml3627cq";
};
buildInputs = [ attr acl zlib libuuid e2fsprogs lzo ];
diff --git a/pkgs/tools/filesystems/e2fsprogs/default.nix b/pkgs/tools/filesystems/e2fsprogs/default.nix
index 16e836e2ddc..dcbf7235e49 100644
--- a/pkgs/tools/filesystems/e2fsprogs/default.nix
+++ b/pkgs/tools/filesystems/e2fsprogs/default.nix
@@ -17,7 +17,7 @@ stdenv.mkDerivation rec {
};
# libuuid, libblkid, uuidd and fsck are in util-linux-ng (the "libuuid" dependency).
- configureFlags = "--enable-elf-shlibs --disable-libuuid --disable-libblkid --disable-uuidd --disable-fsck";
+ configureFlags = "--enable-elf-shlibs --disable-libuuid --disable-libblkid --disable-uuidd --disable-fsck --enable-symlink-install";
enableParallelBuilding = true;
diff --git a/pkgs/tools/filesystems/f2fs-tools/default.nix b/pkgs/tools/filesystems/f2fs-tools/default.nix
index 72f417ff10b..f52ead32acd 100644
--- a/pkgs/tools/filesystems/f2fs-tools/default.nix
+++ b/pkgs/tools/filesystems/f2fs-tools/default.nix
@@ -21,5 +21,7 @@ stdenv.mkDerivation rec {
homepage = "http://git.kernel.org/cgit/linux/kernel/git/jaegeuk/f2fs-tools.git/";
description = "Userland tools for the f2fs filesystem";
license = stdenv.lib.licenses.gpl2;
+ platforms = stdenv.lib.platforms.linux;
+ maintainers = [ stdenv.lib.maintainers.emery ];
};
}
diff --git a/pkgs/tools/filesystems/mtpfs/default.nix b/pkgs/tools/filesystems/mtpfs/default.nix
new file mode 100644
index 00000000000..7725b0d7af8
--- /dev/null
+++ b/pkgs/tools/filesystems/mtpfs/default.nix
@@ -0,0 +1,26 @@
+{ stdenv, fetchurl, pkgconfig, fuse, libmtp, glib, libmad, libid3tag }:
+
+stdenv.mkDerivation rec {
+ name = "mtpfs-1.1";
+
+ buildInputs = [ pkgconfig fuse libmtp glib libid3tag libmad ];
+
+ # adding LIBS is a hack, duno why it does not find libid3tag.so by adding buildInputs
+ preConfigure = ''
+ export MAD_CFLAGS=${libmad}/include
+ export MAD_LIBS=${libmad}/lib/libmad.so
+ export LIBS=${libid3tag}/lib/libid3tag.so
+ '';
+
+ src = fetchurl {
+ url = "http://www.adebenham.com/files/mtp/${name}.tar.gz";
+ sha256 = "07acrqb17kpif2xcsqfqh5j4axvsa4rnh6xwnpqab5b9w5ykbbqv";
+ };
+
+ meta = {
+ homepage = https://code.google.com/p/mtpfs/;
+ description = "FUSE Filesystem providing access to MTP devices";
+ platforms = stdenv.lib.platforms.all;
+ maintainers = [ stdenv.lib.maintainers.qknight ];
+ };
+}
diff --git a/pkgs/tools/graphics/qrencode/default.nix b/pkgs/tools/graphics/qrencode/default.nix
index 3b83a18fd36..892ef54cdee 100644
--- a/pkgs/tools/graphics/qrencode/default.nix
+++ b/pkgs/tools/graphics/qrencode/default.nix
@@ -1,11 +1,11 @@
{ stdenv, fetchurl, libpng, pkgconfig }:
stdenv.mkDerivation rec {
- name = "qrencode-3.2.0";
+ name = "qrencode-3.4.3";
src = fetchurl {
url = "${meta.homepage}/${name}.tar.bz2";
- sha256 = "13q6cz2lif8d7y95f8sgfqaxc1qr0sz9nl2xh71lfmx7v5ybri03";
+ sha256 = "163sb580p570p27imc6jhkfdw15kzp8vy1jq92nip1rwa63i9myz";
};
buildInputs = [ libpng ];
diff --git a/pkgs/tools/misc/apparix/default.nix b/pkgs/tools/misc/apparix/default.nix
new file mode 100644
index 00000000000..693ca27a88d
--- /dev/null
+++ b/pkgs/tools/misc/apparix/default.nix
@@ -0,0 +1,20 @@
+{ stdenv, fetchurl }:
+
+stdenv.mkDerivation rec {
+ name = "apparix-11-062";
+
+ src = fetchurl {
+ url = "http://micans.org/apparix/src/${name}.tar.gz";
+ sha256 = "211bb5f67b32ba7c3e044a13e4e79eb998ca017538e9f4b06bc92d5953615235";
+ };
+
+ doCheck = true;
+
+ meta = with stdenv.lib; {
+ homepage = http://micans.org/apparix;
+ description = "Add directory bookmarks, distant listing, and distant editing to the command line";
+ maintainers = with maintainers; [ lethalman ];
+ license = licenses.gpl2;
+ platforms = platforms.linux;
+ };
+}
diff --git a/pkgs/tools/misc/coreutils/default.nix b/pkgs/tools/misc/coreutils/default.nix
index e5f9eb1be2c..b0dbb049cbf 100644
--- a/pkgs/tools/misc/coreutils/default.nix
+++ b/pkgs/tools/misc/coreutils/default.nix
@@ -58,7 +58,9 @@ let
# and {Open,Free}BSD.
doCheck = stdenv ? glibc;
- enableParallelBuilding = true;
+ # Saw random failures like ‘help2man: can't get '--help' info from
+ # man/sha512sum.td/sha512sum’.
+ enableParallelBuilding = false;
NIX_LDFLAGS = optionalString selinuxSupport "-lsepol";
diff --git a/pkgs/tools/misc/logstash-forwarder/default.nix b/pkgs/tools/misc/logstash-forwarder/default.nix
new file mode 100644
index 00000000000..52180c75c98
--- /dev/null
+++ b/pkgs/tools/misc/logstash-forwarder/default.nix
@@ -0,0 +1,19 @@
+{ stdenv, fetchgit, go }:
+stdenv.mkDerivation {
+ name = "logstash-forwarder-20140410";
+ src = fetchgit {
+ url = https://github.com/elasticsearch/logstash-forwarder.git;
+ rev = "ec504792108ab6536b45bcf6dff6d26a6b56fef3";
+ sha256 = "309545ceaec171bee997cad260bef1433e041b9f3bfe617d475bcf79924f943d";
+ };
+ buildInputs = [ go ];
+ installPhase = ''
+ mkdir -p $out/bin
+ cp build/bin/logstash-forwarder $out/bin
+ '';
+
+ meta = {
+ license = stdenv.lib.licenses.asl20;
+ homepage = https://github.com/elasticsearch/logstash-forwarder;
+ };
+}
diff --git a/pkgs/tools/misc/mc/default.nix b/pkgs/tools/misc/mc/default.nix
index 88194ec0fdf..594947ba13d 100644
--- a/pkgs/tools/misc/mc/default.nix
+++ b/pkgs/tools/misc/mc/default.nix
@@ -2,11 +2,11 @@
, libX11, libICE, perl, zip, unzip, gettext, slang}:
stdenv.mkDerivation rec {
- name = "mc-4.8.11";
+ name = "mc-4.8.12";
src = fetchurl {
- url = http://www.midnight-commander.org/downloads/mc-4.8.11.tar.bz2;
- sha256 = "1yjm6rp9h3491mar7vdw88mgvydmz7zdj97mmjkqyf5bidx4w2hf";
+ url = http://www.midnight-commander.org/downloads/mc-4.8.12.tar.bz2;
+ sha256 = "15lkwcis0labshq9k8c2fqdwv8az2c87qpdqwp5p31s8gb1gqm0h";
};
buildInputs = [ pkgconfig perl glib gpm slang zip unzip file gettext libX11 libICE e2fsprogs ];
@@ -14,6 +14,7 @@ stdenv.mkDerivation rec {
meta = {
description = "File Manager and User Shell for the GNU Project";
homepage = http://www.midnight-commander.org;
+ repositories.git = git://github.com/MidnightCommander/mc.git;
license = "GPLv2+";
maintainers = [ stdenv.lib.maintainers.sander ];
};
diff --git a/pkgs/tools/misc/mdbtools/git.nix b/pkgs/tools/misc/mdbtools/git.nix
index e7342d9b3e6..2805514965e 100644
--- a/pkgs/tools/misc/mdbtools/git.nix
+++ b/pkgs/tools/misc/mdbtools/git.nix
@@ -1,22 +1,25 @@
{ stdenv, fetchurl, fetchgit, glib, readline, bison, flex, pkgconfig,
- libiconv, autoconf, automake, libtool }:
+ libiconv, autoconf, automake, libtool, which, txt2man, gnome_doc_utils,
+ scrollkeeper}:
stdenv.mkDerivation {
name = "mdbtools-git";
src = fetchgit {
url = "http://github.com/brianb/mdbtools.git";
- rev = "5ac44b69d9375cca3e1055b70fd22abf7fbf17ab";
- sha256 = "094e6b480c6fda3a000d0d8539b209d2d7c204a440660a21c11f2e1c9b3aa345";
+ rev = "dfd752ec022097ee1e0999173aa604d8a0c0ca8b";
+ sha256 = "0ibj36yxlhwjgi7cj170lwpbzdbgidkq5p8raa59v76bdrxwmb0n";
};
buildInputs = [glib readline bison flex pkgconfig libiconv autoconf automake
- libtool];
+ libtool which txt2man gnome_doc_utils scrollkeeper ];
preConfigure = ''
sed -e 's@static \(GHashTable [*]mdb_backends;\)@\1@' -i src/libmdb/backend.c
- export NIX_LDFLAGS="$NIX_LDFLAGS -liconv"
- ./autogen.sh
+ sed -e '/ENABLE_GTK_DOC/aAM_CONDITIONAL(HAVE_GNOME_DOC_UTILS, test x$enable_gtk_doc = xyes)' \
+ -e '/ENABLE_GTK_DOC/aAM_CONDITIONAL(ENABLE_SK, test x$enable_scrollkeeper = xyes)' \
+ -i configure.ac
+ autoreconf -i -f
'';
meta = {
diff --git a/pkgs/tools/misc/minicom/default.nix b/pkgs/tools/misc/minicom/default.nix
index 2ab1195020c..8ede3aa918b 100644
--- a/pkgs/tools/misc/minicom/default.nix
+++ b/pkgs/tools/misc/minicom/default.nix
@@ -1,11 +1,11 @@
{ stdenv, fetchurl, ncurses }:
stdenv.mkDerivation rec {
- name = "minicom-2.6.2";
+ name = "minicom-2.7";
src = fetchurl {
- url = "http://alioth.debian.org/frs/download.php/file/3869/${name}.tar.gz";
- sha256 = "0s4ibk8scspm8a0raf5s4zgp9b82c4bn529rir9abzqlg5gj3kzk";
+ url = "http://alioth.debian.org/frs/download.php/file/3977/${name}.tar.gz";
+ sha256 = "1x04m4k7c71j5cnhzpjrbz43dd96k4mpkd0l87v5skrgp1isdhws";
};
buildInputs = [ncurses];
diff --git a/pkgs/tools/misc/multitail/default.nix b/pkgs/tools/misc/multitail/default.nix
index 805dbd3f17c..96d3764abd4 100644
--- a/pkgs/tools/misc/multitail/default.nix
+++ b/pkgs/tools/misc/multitail/default.nix
@@ -10,6 +10,8 @@ stdenv.mkDerivation {
buildInputs = [ ncurses ];
+ makeFlags = stdenv.lib.optionalString stdenv.isDarwin "-f makefile.macosx";
+
installPhase = ''
ensureDir $out/bin
cp multitail $out/bin
diff --git a/pkgs/tools/misc/pastebinit/default.nix b/pkgs/tools/misc/pastebinit/default.nix
new file mode 100644
index 00000000000..cf41de29c50
--- /dev/null
+++ b/pkgs/tools/misc/pastebinit/default.nix
@@ -0,0 +1,33 @@
+{ stdenv, fetchurl, python3Packages }:
+
+python3Packages.buildPythonPackage rec {
+ version = "1.4.1";
+ name = "pastebinit-${version}";
+
+ src = fetchurl {
+ url = "https://launchpad.net/pastebinit/trunk/${version}/+download/${name}.tar.bz2";
+ md5 = "b771872a9483cf92be90a3e4420fd3c9";
+ };
+
+ configurePhase = "export DETERMINISTIC_BUILD=1";
+
+ buildPhase = "";
+
+ installPhase = ''
+ mkdir -p $out/bin
+ mkdir -p $out/etc
+ cp -a pastebinit $out/bin
+ cp -a pastebin.d $out/etc
+ substituteInPlace $out/bin/pastebinit --replace "'/etc/pastebin.d" "'$out/etc/pastebin.d"
+ '';
+
+ doCheck = false;
+
+ meta = with stdenv.lib; {
+ homepage = https://launchpad.net/pastebinit;
+ description = "A software that lets you send anything you want directly to a pastebin from the command line";
+ maintainers = with maintainers; [ lethalman ];
+ license = licenses.gpl2;
+ platforms = platforms.linux;
+ };
+}
diff --git a/pkgs/tools/misc/units/default.nix b/pkgs/tools/misc/units/default.nix
index 0d1a962cbf6..84f0f63bd25 100644
--- a/pkgs/tools/misc/units/default.nix
+++ b/pkgs/tools/misc/units/default.nix
@@ -1,13 +1,14 @@
{stdenv, fetchurl}:
stdenv.mkDerivation {
- name = "units-2.02";
+ name = "units-2.10";
src = fetchurl {
- url = mirror://gnu/units/units-2.02.tar.gz;
- sha256 = "16jfji9g1zc99agd5dcinajinhcxr4dgq2lrbc9md69ir5qgld1b";
+ url = mirror://gnu/units/units-2.10.tar.gz;
+ sha256 = "0fa4bk5aqyis5zisz6l8mqqk76njj6zgx3pbrjp5kvraz1dz78lc";
};
meta = {
description = "Unit conversion tool";
+ platforms = stdenv.lib.platforms.linux;
};
}
diff --git a/pkgs/tools/misc/youtube-dl/default.nix b/pkgs/tools/misc/youtube-dl/default.nix
index 6e2f92e9c1c..1a99cb291c4 100644
--- a/pkgs/tools/misc/youtube-dl/default.nix
+++ b/pkgs/tools/misc/youtube-dl/default.nix
@@ -1,14 +1,14 @@
{ stdenv, fetchurl, python, zip }:
let
- version = "2014.03.30.1";
+ version = "2014.04.02";
in
stdenv.mkDerivation rec {
name = "youtube-dl-${version}";
src = fetchurl {
url = "http://youtube-dl.org/downloads/${version}/${name}.tar.gz";
- sha256 = "07xdhgc2sgr7bqkaxwcihvx6l0m6alp3i8d0ij7cxrk6b6rvwrgx";
+ sha256 = "1c9d5wjl0aaqfvz868wbkr3dwby9vjkx0hkbnwx0wnpg48nlnwpm";
};
buildInputs = [ python ];
diff --git a/pkgs/tools/networking/cjdns/builder.sh b/pkgs/tools/networking/cjdns/builder.sh
new file mode 100644
index 00000000000..c2e3701c046
--- /dev/null
+++ b/pkgs/tools/networking/cjdns/builder.sh
@@ -0,0 +1,9 @@
+source $stdenv/setup
+
+unpackPhase
+cd git-export
+
+bash do
+
+mkdir -p $out/sbin
+cp cjdroute $out/sbin
diff --git a/pkgs/tools/networking/cjdns/default.nix b/pkgs/tools/networking/cjdns/default.nix
index b42f202099b..48e21f4507e 100644
--- a/pkgs/tools/networking/cjdns/default.nix
+++ b/pkgs/tools/networking/cjdns/default.nix
@@ -1,31 +1,27 @@
-{ stdenv, fetchgit, cmake }:
+{ stdenv, fetchgit, nodejs, which, python27 }:
let
- rev = "f7b02ac0cc";
+ date = "20140303";
+ rev = "f11ce1fd4795b0173ac0ef18c8a6f752aa824adb";
in
stdenv.mkDerivation {
- name = "cjdns-20130620-${stdenv.lib.strings.substring 0 7 rev}";
+ name = "cjdns-${date}-${stdenv.lib.strings.substring 0 7 rev}";
src = fetchgit {
- url = "https://github.com/cjdelisle/cjdns.git";
+ url = "git://github.com/cjdelisle/cjdns.git";
inherit rev;
- sha256 = "1580a62yhph62nv7q2jdqrbkyk9a9g5i17snibkxyykc7rili5zq";
+ sha256 = "1bxhf9f1v0slf9mz3ll6jf45mkwvwxlf3yqxx9k23kjyr1nsc8s8";
};
- preConfigure = ''
- sed -i -e '/toolchain.*CACHE/d' CMakeLists.txt
- '';
+ buildInputs = [ which python27 nodejs];
- doCheck = true;
- checkPhase = "ctest";
-
- buildInputs = [ cmake ];
+ builder = ./builder.sh;
meta = {
homepage = https://github.com/cjdelisle/cjdns;
description = "Encrypted networking for regular people";
- license = "GPLv3+";
- maintainers = with stdenv.lib.maintainers; [viric];
- platforms = with stdenv.lib.platforms; linux;
+ license = stdenv.lib.licenses.gpl3;
+ maintainers = with stdenv.lib.maintainers; [ viric emery ];
+ platforms = stdenv.lib.platforms.linux;
};
}
diff --git a/pkgs/tools/networking/dd-agent/default.nix b/pkgs/tools/networking/dd-agent/default.nix
index d9fa49320a5..1e0f26cc92c 100644
--- a/pkgs/tools/networking/dd-agent/default.nix
+++ b/pkgs/tools/networking/dd-agent/default.nix
@@ -1,16 +1,16 @@
-{ stdenv, fetchurl, python, sysstat, unzip }:
+{ stdenv, fetchurl, python, sysstat, unzip, tornado, makeWrapper }:
stdenv.mkDerivation rec {
- version = "4.0.1";
+ version = "4.2.0";
name = "dd-agent-${version}";
src = fetchurl {
url = "https://github.com/DataDog/dd-agent/archive/${version}.zip";
- sha256 = "0gybdbjkj7qwnzic03xkypagb30zhm22gp3nkwrdhi8fdmwz3nm1";
+ sha256 = "0lp3h3flb50i64kgkj9kyyf3p1xm0nipxi22w5pmhb71l678d216";
};
- buildInputs = [ python unzip ];
- propagatedBuildInputs = [ python ];
+ buildInputs = [ python unzip makeWrapper ];
+ propagatedBuildInputs = [ python tornado ];
postUnpack = "export sourceRoot=$sourceRoot/packaging";
@@ -21,6 +21,7 @@ stdenv.mkDerivation rec {
postInstall = ''
mv $out/usr/* $out
rmdir $out/usr
+ wrapProgram $out/bin/dd-forwarder --prefix PYTHONPATH : $PYTHONPATH
'';
meta = {
diff --git a/pkgs/tools/networking/dnsmasq/default.nix b/pkgs/tools/networking/dnsmasq/default.nix
index 0c5dfc6fd74..d8f62913ad5 100644
--- a/pkgs/tools/networking/dnsmasq/default.nix
+++ b/pkgs/tools/networking/dnsmasq/default.nix
@@ -1,11 +1,11 @@
{ stdenv, fetchurl }:
stdenv.mkDerivation rec {
- name = "dnsmasq-2.68";
+ name = "dnsmasq-2.69";
src = fetchurl {
url = "http://www.thekelleys.org.uk/dnsmasq/${name}.tar.gz";
- sha256 = "0bvw16i83ybiajskma59zjiqw59vzlcqf8f69k0crwak3zb1j820";
+ sha256 = "1zf4d6kjbsn6gwfwvmch1y84q67na1qhh0gyd50ip1vjsmw2l4i7";
};
makeFlags = "DESTDIR= BINDIR=$(out)/bin MANDIR=$(out)/man LOCALEDIR=$(out)/share/locale";
diff --git a/pkgs/tools/networking/iperf/default.nix b/pkgs/tools/networking/iperf/default.nix
index 2ee8a90cb4a..33d8ee2fd63 100644
--- a/pkgs/tools/networking/iperf/default.nix
+++ b/pkgs/tools/networking/iperf/default.nix
@@ -11,7 +11,7 @@ stdenv.mkDerivation rec {
meta = with stdenv.lib; {
homepage = "http://sourceforge.net/projects/iperf/";
description = "Tool to measure IP bandwidth using UDP or TCP";
- platforms = platforms.linux;
+ platforms = platforms.unix;
license = "as-is";
};
}
diff --git a/pkgs/tools/networking/lftp/default.nix b/pkgs/tools/networking/lftp/default.nix
index 2bc575bbd02..434ddbce3e7 100644
--- a/pkgs/tools/networking/lftp/default.nix
+++ b/pkgs/tools/networking/lftp/default.nix
@@ -1,20 +1,22 @@
{ stdenv, fetchurl, gnutls, pkgconfig, readline, zlib, xz }:
stdenv.mkDerivation rec {
- name = "lftp-4.4.5";
+ name = "lftp-4.4.15";
src = fetchurl {
- url = "ftp://ftp.tuwien.ac.at/infosys/browsers/ftp/lftp/${name}.tar.xz";
- sha256 = "1p3nxsd2an9pdwc3vgwxy8p5nnjrc7mhilikjaddy62cyvxdbpxq";
+ url = "http://lftp.yar.ru/ftp/${name}.tar.gz";
+ sha256 = "1iw0xvvi9wr7grm6dwbxgm8ms98pg5skj44q477gxzrrff9dvvvp";
};
patches = [ ./no-gets.patch ];
buildInputs = [ gnutls pkgconfig readline zlib ];
- meta = {
- homepage = http://lftp.yar.ru/;
+ meta = with stdenv.lib; {
description = "A file transfer program supporting a number of network protocols";
- license = "GPL";
+ homepage = http://lftp.yar.ru/;
+ license = licenses.gpl3;
+ platforms = platforms.linux;
+ maintainers = [ maintainers.bjornfor ];
};
}
diff --git a/pkgs/tools/networking/mailutils/default.nix b/pkgs/tools/networking/mailutils/default.nix
index 8ebe7df35e7..3ac82e51bf8 100644
--- a/pkgs/tools/networking/mailutils/default.nix
+++ b/pkgs/tools/networking/mailutils/default.nix
@@ -51,5 +51,8 @@ stdenv.mkDerivation rec {
# Some of the dependencies fail to build on {cyg,dar}win.
platforms = stdenv.lib.platforms.gnu;
+
+ # Tests fail since gcc 4.8
+ broken = true;
};
}
diff --git a/pkgs/tools/networking/miniupnpd/default.nix b/pkgs/tools/networking/miniupnpd/default.nix
index b5002d22990..ef3db0a4a21 100644
--- a/pkgs/tools/networking/miniupnpd/default.nix
+++ b/pkgs/tools/networking/miniupnpd/default.nix
@@ -1,20 +1,16 @@
-{ stdenv, fetchurl, iptables, libnfnetlink, libnetfilter_conntrack }:
+{ stdenv, fetchurl, iptables, libnfnetlink }:
assert stdenv.isLinux;
stdenv.mkDerivation rec {
- name = "miniupnpd-1.7.20121005";
+ name = "miniupnpd-1.8.20140401";
src = fetchurl {
url = "http://miniupnp.free.fr/files/download.php?file=${name}.tar.gz";
- sha256 = "03kaxj808hgj1zf2528pzilgywgh70mh0qivjb5nm3spziiq32sv";
+ sha256 = "1gfdbfqcw6ih830si51yzqbyymgcbwkiv9vk5dwnxs78b7xgyv88";
};
- buildInputs = [ iptables libnfnetlink libnetfilter_conntrack ];
-
- patchPhase = ''
- sed -i -e 's/upnputils\.o -lnfnetlink/upnputils.o/' Makefile.linux
- '';
+ buildInputs = [ iptables libnfnetlink ];
NIX_CFLAGS_COMPILE = "-DIPTABLES_143";
@@ -24,12 +20,9 @@ stdenv.mkDerivation rec {
makeFlags = "LIBS=";
- installFlags = "PREFIX=$(out) INSTALLPREFIX=$(out)";
+ buildFlags = "miniupnpd genuuid";
- preInstall =
- ''
- mkdir -p $out/share/man/man8
- '';
+ installFlags = "PREFIX=$(out) INSTALLPREFIX=$(out)";
meta = {
homepage = http://miniupnp.free.fr/;
diff --git a/pkgs/tools/networking/mosh/default.nix b/pkgs/tools/networking/mosh/default.nix
index 2708210af80..e781af7c235 100644
--- a/pkgs/tools/networking/mosh/default.nix
+++ b/pkgs/tools/networking/mosh/default.nix
@@ -28,6 +28,6 @@ stdenv.mkDerivation rec {
'';
license = "GPLv3+";
maintainers = with stdenv.lib.maintainers; [viric];
- platforms = with stdenv.lib.platforms; linux;
+ platforms = stdenv.lib.platforms.unix;
};
}
diff --git a/pkgs/tools/networking/mtr/default.nix b/pkgs/tools/networking/mtr/default.nix
index 45dcb087bd7..c463c94d610 100644
--- a/pkgs/tools/networking/mtr/default.nix
+++ b/pkgs/tools/networking/mtr/default.nix
@@ -10,10 +10,10 @@ let
(builtins.attrNames (builtins.removeAttrs x helperArgNames));
sourceInfo = rec {
baseName="mtr";
- version="0.82";
+ version="0.85";
name="${baseName}-${version}";
url="ftp://ftp.bitwizard.nl/${baseName}/${name}.tar.gz";
- hash="185nx4y6xn7vv6l3pbyc0ljmwfl4si4zszwad1jkbq1scb4mgd7k";
+ hash="1jqrz8mil3lraaqgc87dyvx8d4bf3vq232pfx9mksxnkbphp4qvd";
};
in
rec {
@@ -25,9 +25,11 @@ rec {
inherit (sourceInfo) name version;
inherit buildInputs;
+ patches = [ ./edd425.patch ];
+
/* doConfigure should be removed if not needed */
- phaseNames = ["doConfigure" "doMakeInstall"];
-
+ phaseNames = ["doConfigure" "doPatch" "doMakeInstall"];
+
meta = {
description = "A network diagnostics tool";
maintainers = with a.lib.maintainers;
@@ -35,7 +37,7 @@ rec {
raskin
];
platforms = with a.lib.platforms;
- linux;
+ unix;
license = a.lib.licenses.gpl2;
};
passthru = {
diff --git a/pkgs/tools/networking/mtr/edd425.patch b/pkgs/tools/networking/mtr/edd425.patch
new file mode 100644
index 00000000000..b950cacd2e5
--- /dev/null
+++ b/pkgs/tools/networking/mtr/edd425.patch
@@ -0,0 +1,218 @@
+diff --git a/asn.c b/asn.c
+index eac8d5e..33622ca 100644
+--- a/asn.c
++++ b/asn.c
+@@ -16,6 +16,8 @@
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
++#include "config.h"
++
+ #include
+ #include
+ #include
+@@ -35,7 +37,6 @@
+ #include
+ #include
+
+-#include "config.h"
+ #include "mtr.h"
+ #include "asn.h"
+
+diff --git a/curses.c b/curses.c
+index eacc40d..b96daee 100644
+--- a/curses.c
++++ b/curses.c
+@@ -16,7 +16,8 @@
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+-#include
++#include "config.h"
++
+ #include
+ #include
+
+diff --git a/display.c b/display.c
+index aa369ee..3545467 100644
+--- a/display.c
++++ b/display.c
+@@ -16,7 +16,8 @@
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+-#include
++#include "config.h"
++
+ #include