diff --git a/.gitattributes b/.gitattributes
index a636295ebd67..14bee08e3811 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -11,3 +11,6 @@ doc/default.nix linguist-documentation=false
nixos/doc/** linguist-documentation
nixos/doc/default.nix linguist-documentation=false
+
+nixos/modules/module-list.nix merge=union
+pkgs/top-level/all-packages.nix merge=union
diff --git a/nixos/doc/manual/release-notes/rl-1803.xml b/nixos/doc/manual/release-notes/rl-1803.xml
index b755245a69fb..60c17c60413e 100644
--- a/nixos/doc/manual/release-notes/rl-1803.xml
+++ b/nixos/doc/manual/release-notes/rl-1803.xml
@@ -322,6 +322,43 @@ following incompatible changes:
external module.
+
+
+ The Prosody XMPP server has received a major update. The following modules were renamed:
+
+
+
+ is now
+
+
+
+
+ is now
+
+
+
+
+
+
+ Many new modules are now core modules, most notably
+ and .
+
+
+
+ The better-performing libevent backend is now enabled by default.
+
+
+
+ withCommunityModules now passes through the modules to .
+ Use withOnlyInstalledCommunityModules for modules that should not be enabled directly, e.g lib_ldap.
+
+
+
+
+ All prometheus exporter modules are now defined as submodules.
+ The exporters are configured using services.prometheus.exporters.
+
+
diff --git a/nixos/modules/installer/cd-dvd/system-tarball-fuloong2f.nix b/nixos/modules/installer/cd-dvd/system-tarball-fuloong2f.nix
index ba84cd51098f..6d4ba96dba0c 100644
--- a/nixos/modules/installer/cd-dvd/system-tarball-fuloong2f.nix
+++ b/nixos/modules/installer/cd-dvd/system-tarball-fuloong2f.nix
@@ -54,7 +54,7 @@ in
environment.systemPackages =
[ pkgs.w3m # needed for the manual anyway
pkgs.testdisk # useful for repairing boot problems
- pkgs.mssys # for writing Microsoft boot sectors / MBRs
+ pkgs.ms-sys # for writing Microsoft boot sectors / MBRs
pkgs.parted
pkgs.ddrescue
pkgs.ccrypt
diff --git a/nixos/modules/module-list.nix b/nixos/modules/module-list.nix
index e0c0ec2711b8..d47600fbc61a 100644
--- a/nixos/modules/module-list.nix
+++ b/nixos/modules/module-list.nix
@@ -363,6 +363,7 @@
./services/misc/rippled.nix
./services/misc/ripple-data-api.nix
./services/misc/rogue.nix
+ ./services/misc/serviio.nix
./services/misc/siproxd.nix
./services/misc/snapper.nix
./services/misc/sonarr.nix
@@ -398,16 +399,7 @@
./services/monitoring/osquery.nix
./services/monitoring/prometheus/default.nix
./services/monitoring/prometheus/alertmanager.nix
- ./services/monitoring/prometheus/blackbox-exporter.nix
- ./services/monitoring/prometheus/collectd-exporter.nix
- ./services/monitoring/prometheus/fritzbox-exporter.nix
- ./services/monitoring/prometheus/json-exporter.nix
- ./services/monitoring/prometheus/minio-exporter.nix
- ./services/monitoring/prometheus/nginx-exporter.nix
- ./services/monitoring/prometheus/node-exporter.nix
- ./services/monitoring/prometheus/snmp-exporter.nix
- ./services/monitoring/prometheus/unifi-exporter.nix
- ./services/monitoring/prometheus/varnish-exporter.nix
+ ./services/monitoring/prometheus/exporters.nix
./services/monitoring/riemann.nix
./services/monitoring/riemann-dash.nix
./services/monitoring/riemann-tools.nix
@@ -640,7 +632,6 @@
./services/web-apps/atlassian/jira.nix
./services/web-apps/frab.nix
./services/web-apps/mattermost.nix
- ./services/web-apps/nixbot.nix
./services/web-apps/nexus.nix
./services/web-apps/pgpkeyserver-lite.nix
./services/web-apps/matomo.nix
diff --git a/nixos/modules/profiles/base.nix b/nixos/modules/profiles/base.nix
index 39b8553976eb..3bf06a951193 100644
--- a/nixos/modules/profiles/base.nix
+++ b/nixos/modules/profiles/base.nix
@@ -9,7 +9,7 @@
environment.systemPackages = [
pkgs.w3m-nox # needed for the manual anyway
pkgs.testdisk # useful for repairing boot problems
- pkgs.mssys # for writing Microsoft boot sectors / MBRs
+ pkgs.ms-sys # for writing Microsoft boot sectors / MBRs
pkgs.efibootmgr
pkgs.efivar
pkgs.parted
diff --git a/nixos/modules/rename.nix b/nixos/modules/rename.nix
index 489d7d8b9b50..b0ca274b939f 100644
--- a/nixos/modules/rename.nix
+++ b/nixos/modules/rename.nix
@@ -240,5 +240,11 @@ with lib;
# Xen
(mkRenamedOptionModule [ "virtualisation" "xen" "qemu-package" ] [ "virtualisation" "xen" "package-qemu" ])
- ];
+ ] ++ (flip map [ "blackboxExporter" "collectdExporter" "fritzboxExporter"
+ "jsonExporter" "minioExporter" "nginxExporter" "nodeExporter"
+ "snmpExporter" "unifiExporter" "varnishExporter" ]
+ (opt: mkRemovedOptionModule [ "services" "prometheus" "${opt}" ] ''
+ The prometheus exporters are now configured using `services.prometheus.exporters'.
+ See the 18.03 release notes for more information.
+ '' ));
}
diff --git a/nixos/modules/services/misc/serviio.nix b/nixos/modules/services/misc/serviio.nix
new file mode 100644
index 000000000000..a6612e9c6adb
--- /dev/null
+++ b/nixos/modules/services/misc/serviio.nix
@@ -0,0 +1,92 @@
+{ config, lib, pkgs, ... }:
+
+with lib;
+
+let
+
+ cfg = config.services.serviio;
+
+ serviioStart = pkgs.writeScript "serviio.sh" ''
+ #!${pkgs.bash}/bin/sh
+
+ SERVIIO_HOME=${pkgs.serviio}
+
+ # Setup the classpath
+ SERVIIO_CLASS_PATH="$SERVIIO_HOME/lib/*:$SERVIIO_HOME/config"
+
+ # Setup Serviio specific properties
+ JAVA_OPTS="-Djava.net.preferIPv4Stack=true -Djava.awt.headless=true -Dorg.restlet.engine.loggerFacadeClass=org.restlet.ext.slf4j.Slf4jLoggerFacade
+ -Dderby.system.home=${cfg.dataDir}/library -Dserviio.home=${cfg.dataDir} -Dffmpeg.location=${pkgs.ffmpeg}/bin/ffmpeg -Ddcraw.location=${pkgs.dcraw}/bin/dcraw"
+
+ # Execute the JVM in the foreground
+ exec ${pkgs.jre}/bin/java -Xmx512M -Xms20M -XX:+UseG1GC -XX:GCTimeRatio=1 -XX:MinHeapFreeRatio=10 -XX:MaxHeapFreeRatio=20 $JAVA_OPTS -classpath "$SERVIIO_CLASS_PATH" org.serviio.MediaServer "$@"
+ '';
+
+in {
+
+ ###### interface
+ options = {
+ services.serviio = {
+
+ enable = mkOption {
+ type = types.bool;
+ default = false;
+ description = ''
+ Whether to enable the Serviio Media Server.
+ '';
+ };
+
+ dataDir = mkOption {
+ type = types.path;
+ default = "/var/lib/serviio";
+ description = ''
+ The directory where serviio stores its state, data, etc.
+ '';
+ };
+
+ };
+ };
+
+ ###### implementation
+
+ config = mkIf cfg.enable {
+ systemd.services.serviio = {
+ description = "Serviio Media Server";
+ after = [ "local-fs.target" "network.target" ];
+ wantedBy = [ "multi-user.target" ];
+ path = [ pkgs.serviio ];
+ serviceConfig = {
+ User = "serviio";
+ Group = "serviio";
+ ExecStart = "${serviioStart}";
+ ExecStop = "${serviioStart} -stop";
+ };
+ };
+
+ users.extraUsers = [
+ {
+ name = "serviio";
+ group = "serviio";
+ home = cfg.dataDir;
+ description = "Serviio Media Server User";
+ createHome = true;
+ isSystemUser = true;
+ }
+ ];
+
+ users.extraGroups = [
+ { name = "serviio";}
+ ];
+
+ networking.firewall = {
+ allowedTCPPorts = [
+ 8895 # serve UPnP responses
+ 23423 # console
+ 23424 # mediabrowser
+ ];
+ allowedUDPPorts = [
+ 1900 # UPnP service discovey
+ ];
+ };
+ };
+}
diff --git a/nixos/modules/services/monitoring/prometheus/blackbox-exporter.nix b/nixos/modules/services/monitoring/prometheus/blackbox-exporter.nix
deleted file mode 100644
index ce2e1cf2d74b..000000000000
--- a/nixos/modules/services/monitoring/prometheus/blackbox-exporter.nix
+++ /dev/null
@@ -1,68 +0,0 @@
-{ config, pkgs, lib, ... }:
-
-with lib;
-
-let
- cfg = config.services.prometheus.blackboxExporter;
-in {
- options = {
- services.prometheus.blackboxExporter = {
- enable = mkEnableOption "prometheus blackbox exporter";
-
- configFile = mkOption {
- type = types.path;
- description = ''
- Path to configuration file.
- '';
- };
-
- port = mkOption {
- type = types.int;
- default = 9115;
- description = ''
- Port to listen on.
- '';
- };
-
- extraFlags = mkOption {
- type = types.listOf types.str;
- default = [];
- description = ''
- Extra commandline options when launching the blackbox exporter.
- '';
- };
-
- openFirewall = mkOption {
- type = types.bool;
- default = false;
- description = ''
- Open port in firewall for incoming connections.
- '';
- };
- };
- };
-
- config = mkIf cfg.enable {
- networking.firewall.allowedTCPPorts = optional cfg.openFirewall cfg.port;
-
- systemd.services.prometheus-blackbox-exporter = {
- description = "Prometheus exporter for blackbox probes";
- unitConfig.Documentation = "https://github.com/prometheus/blackbox_exporter";
- wantedBy = [ "multi-user.target" ];
- serviceConfig = {
- User = "nobody";
- Restart = "always";
- PrivateTmp = true;
- WorkingDirectory = /tmp;
- AmbientCapabilities = [ "CAP_NET_RAW" ]; # for ping probes
- ExecStart = ''
- ${pkgs.prometheus-blackbox-exporter}/bin/blackbox_exporter \
- --web.listen-address :${toString cfg.port} \
- --config.file ${cfg.configFile} \
- ${concatStringsSep " \\\n " cfg.extraFlags}
- '';
- ExecReload = "${pkgs.coreutils}/bin/kill -HUP $MAINPID";
- };
- };
- };
-}
diff --git a/nixos/modules/services/monitoring/prometheus/collectd-exporter.nix b/nixos/modules/services/monitoring/prometheus/collectd-exporter.nix
deleted file mode 100644
index f8a5b9576a11..000000000000
--- a/nixos/modules/services/monitoring/prometheus/collectd-exporter.nix
+++ /dev/null
@@ -1,128 +0,0 @@
-{ config, pkgs, lib, ... }:
-
-with lib;
-
-let
- cfg = config.services.prometheus.collectdExporter;
-
- collectSettingsArgs = if (cfg.collectdBinary.enable) then ''
- -collectd.listen-address ${optionalString (cfg.collectdBinary.listenAddress != null) cfg.collectdBinary.listenAddress}:${toString cfg.collectdBinary.port} \
- -collectd.security-level ${cfg.collectdBinary.securityLevel} \
- '' else "";
-
-in {
- options = {
- services.prometheus.collectdExporter = {
- enable = mkEnableOption "prometheus collectd exporter";
-
- port = mkOption {
- type = types.int;
- default = 9103;
- description = ''
- Port to listen on.
- This is used for scraping as well as the to receive collectd data via the write_http plugin.
- '';
- };
-
- listenAddress = mkOption {
- type = types.nullOr types.str;
- default = null;
- example = "0.0.0.0";
- description = ''
- Address to listen on for web interface, telemetry and collectd JSON data.
- '';
- };
-
- collectdBinary = {
- enable = mkEnableOption "collectd binary protocol receiver";
-
- authFile = mkOption {
- default = null;
- type = types.nullOr types.path;
- description = "File mapping user names to pre-shared keys (passwords).";
- };
-
- port = mkOption {
- type = types.int;
- default = 25826;
- description = ''Network address on which to accept collectd binary network packets.'';
- };
-
- listenAddress = mkOption {
- type = types.nullOr types.str;
- default = null;
- example = "0.0.0.0";
- description = ''
- Address to listen on for binary network packets.
- '';
- };
-
- securityLevel = mkOption {
- type = types.enum ["None" "Sign" "Encrypt"];
- default = "None";
- description = ''
- Minimum required security level for accepted packets.
- '';
- };
- };
-
- extraFlags = mkOption {
- type = types.listOf types.str;
- default = [];
- description = ''
- Extra commandline options when launching the collectd exporter.
- '';
- };
-
- logFormat = mkOption {
- type = types.str;
- default = "logger:stderr";
- example = "logger:syslog?appname=bob&local=7 or logger:stdout?json=true";
- description = ''
- Set the log target and format.
- '';
- };
-
- logLevel = mkOption {
- type = types.enum ["debug" "info" "warn" "error" "fatal"];
- default = "info";
- description = ''
- Only log messages with the given severity or above.
- '';
- };
-
- openFirewall = mkOption {
- type = types.bool;
- default = false;
- description = ''
- Open port in firewall for incoming connections.
- '';
- };
- };
- };
-
- config = mkIf cfg.enable {
- networking.firewall.allowedTCPPorts = (optional cfg.openFirewall cfg.port) ++
- (optional (cfg.openFirewall && cfg.collectdBinary.enable) cfg.collectdBinary.port);
-
- systemd.services.prometheus-collectd-exporter = {
- description = "Prometheus exporter for Collectd metrics";
- unitConfig.Documentation = "https://github.com/prometheus/collectd_exporter";
- wantedBy = [ "multi-user.target" ];
- serviceConfig = {
- DynamicUser = true;
- Restart = "always";
- PrivateTmp = true;
- WorkingDirectory = /tmp;
- ExecStart = ''
- ${pkgs.prometheus-collectd-exporter}/bin/collectd_exporter \
- -log.format ${cfg.logFormat} \
- -log.level ${cfg.logLevel} \
- -web.listen-address ${optionalString (cfg.listenAddress != null) cfg.listenAddress}:${toString cfg.port} \
- ${collectSettingsArgs} \
- ${concatStringsSep " " cfg.extraFlags}
- '';
- };
- };
- };
-}
diff --git a/nixos/modules/services/monitoring/prometheus/exporters.nix b/nixos/modules/services/monitoring/prometheus/exporters.nix
new file mode 100644
index 000000000000..8d6ca1e40a19
--- /dev/null
+++ b/nixos/modules/services/monitoring/prometheus/exporters.nix
@@ -0,0 +1,172 @@
+{ config, pkgs, lib, ... }:
+
+with lib;
+
+let
+ cfg = config.services.prometheus.exporters;
+
+ # each attribute in `exporterOpts` is expected to have specified:
+ # - port (types.int): port on which the exporter listens
+ # - serviceOpts (types.attrs): config that is merged with the
+ # default definition of the exporter's
+ # systemd service
+ # - extraOpts (types.attrs): extra configuration options to
+ # configure the exporter with, which
+ # are appended to the default options
+ #
+ # Note that `extraOpts` is optional, but a script for the exporter's
+ # systemd service must be provided by specifying either
+ # `serviceOpts.script` or `serviceOpts.serviceConfig.ExecStart`
+ exporterOpts = {
+ blackbox = import ./exporters/blackbox.nix { inherit config lib pkgs; };
+ collectd = import ./exporters/collectd.nix { inherit config lib pkgs; };
+ fritzbox = import ./exporters/fritzbox.nix { inherit config lib pkgs; };
+ json = import ./exporters/json.nix { inherit config lib pkgs; };
+ minio = import ./exporters/minio.nix { inherit config lib pkgs; };
+ nginx = import ./exporters/nginx.nix { inherit config lib pkgs; };
+ node = import ./exporters/node.nix { inherit config lib pkgs; };
+ postfix = import ./exporters/postfix.nix { inherit config lib pkgs; };
+ snmp = import ./exporters/snmp.nix { inherit config lib pkgs; };
+ unifi = import ./exporters/unifi.nix { inherit config lib pkgs; };
+ varnish = import ./exporters/varnish.nix { inherit config lib pkgs; };
+ };
+
+ mkExporterOpts = ({ name, port }: {
+ enable = mkEnableOption "the prometheus ${name} exporter";
+ port = mkOption {
+ type = types.int;
+ default = port;
+ description = ''
+ Port to listen on.
+ '';
+ };
+ listenAddress = mkOption {
+ type = types.str;
+ default = "0.0.0.0";
+ description = ''
+ Address to listen on.
+ '';
+ };
+ extraFlags = mkOption {
+ type = types.listOf types.str;
+ default = [];
+ description = ''
+ Extra commandline options to pass to the ${name} exporter.
+ '';
+ };
+ openFirewall = mkOption {
+ type = types.bool;
+ default = false;
+ description = ''
+ Open port in firewall for incoming connections.
+ '';
+ };
+ firewallFilter = mkOption {
+ type = types.str;
+ default = "-p tcp -m tcp --dport ${toString port}";
+ example = literalExample ''
+ "-i eth0 -p tcp -m tcp --dport ${toString port}"
+ '';
+ description = ''
+ Specify a filter for iptables to use when
+
+ is true. It is used as `ip46tables -I INPUT -j ACCEPT`.
+ '';
+ };
+ user = mkOption {
+ type = types.str;
+ default = "nobody";
+ description = ''
+ User name under which the ${name} exporter shall be run.
+ Has no effect when is true.
+ '';
+ };
+ group = mkOption {
+ type = types.str;
+ default = "nobody";
+ description = ''
+ Group under which the ${name} exporter shall be run.
+ Has no effect when is true.
+ '';
+ };
+ });
+
+ mkSubModule = { name, port, extraOpts, serviceOpts }: {
+ ${name} = mkOption {
+ type = types.submodule {
+ options = (mkExporterOpts {
+ inherit name port;
+ } // extraOpts);
+ };
+ internal = true;
+ default = {};
+ };
+ };
+
+ mkSubModules = (foldl' (a: b: a//b) {}
+ (mapAttrsToList (name: opts: mkSubModule {
+ inherit name;
+ inherit (opts) port serviceOpts;
+ extraOpts = opts.extraOpts or {};
+ }) exporterOpts)
+ );
+
+ mkExporterConf = { name, conf, serviceOpts }:
+ mkIf conf.enable {
+ networking.firewall.extraCommands = mkIf conf.openFirewall ''
+ ip46tables -I INPUT ${conf.firewallFilter} -j ACCEPT
+ '';
+ systemd.services."prometheus-${name}-exporter" = mkMerge ([{
+ wantedBy = [ "multi-user.target" ];
+ after = [ "network.target" ];
+ serviceConfig = {
+ Restart = mkDefault "always";
+ PrivateTmp = mkDefault true;
+ WorkingDirectory = mkDefault /tmp;
+ } // mkIf (!(serviceOpts.serviceConfig.DynamicUser or false)) {
+ User = conf.user;
+ Group = conf.group;
+ };
+ } serviceOpts ]);
+ };
+in
+{
+ options.services.prometheus.exporters = mkOption {
+ type = types.submodule {
+ options = (mkSubModules);
+ };
+ description = "Prometheus exporter configuration";
+ default = {};
+ example = literalExample ''
+ {
+ node = {
+ enable = true;
+ enabledCollectors = [ "systemd" ];
+ };
+ varnish.enable = true;
+ }
+ '';
+ };
+
+ config = mkMerge ([{
+ assertions = [{
+ assertion = (cfg.snmp.configurationPath == null) != (cfg.snmp.configuration == null);
+ message = ''
+ Please ensure you have either `services.prometheus.exporters.snmp.configuration'
+ or `services.prometheus.exporters.snmp.configurationPath' set!
+ '';
+ }];
+ }] ++ [(mkIf config.services.minio.enable {
+ services.prometheus.exporters.minio.minioAddress = mkDefault "http://localhost:9000";
+ services.prometheus.exporters.minio.minioAccessKey = mkDefault config.services.minio.accessKey;
+ services.prometheus.exporters.minio.minioAccessSecret = mkDefault config.services.minio.secretKey;
+ })] ++ (mapAttrsToList (name: conf:
+ mkExporterConf {
+ inherit name;
+ inherit (conf) serviceOpts;
+ conf = cfg.${name};
+ }) exporterOpts)
+ );
+
+ meta.doc = ./exporters.xml;
+}
diff --git a/nixos/modules/services/monitoring/prometheus/exporters.xml b/nixos/modules/services/monitoring/prometheus/exporters.xml
new file mode 100644
index 000000000000..4f0bcb298106
--- /dev/null
+++ b/nixos/modules/services/monitoring/prometheus/exporters.xml
@@ -0,0 +1,135 @@
+
+
+Prometheus exporters
+
+Prometheus exporters provide metrics for the prometheus monitoring system.
+
+Configuration
+ One of the most common exporters is the node exporter, it provides hardware and OS metrics from the host it's running on. The exporter could be configured as follows:
+
+ services.promtheus.exporters.node = {
+ enable = true;
+ enabledCollectors = [
+ "logind"
+ "systemd"
+ ];
+ disabledCollectors = [
+ "textfile"
+ ];
+ openFirewall = true;
+ firewallFilter = "-i br0 -p tcp -m tcp --dport 9100";
+ };
+
+It should now serve all metrics from the collectors
+that are explicitly enabled and the ones that are
+enabled by default, via http under /metrics. In this example the firewall should just
+allow incoming connections to the exporter's port on the bridge interface br0
+(this would have to be configured seperately of course).
+For more information about configuration see man configuration.nix or
+search through the available options.
+
+
+Adding a new exporter
+ To add a new exporter, it has to be packaged first (see nixpkgs/pkgs/servers/monitoring/prometheus/ for examples), then a module can be added. The postfix exporter is used in this example:
+
+
+
+ Some default options for all exporters are provided by
+ nixpkgs/nixos/modules/services/monitoring/prometheus/exporters.nix:
+
+
+
+
+ enable
+ port
+ listenAddress
+ extraFlags
+ openFirewall
+ firewallFilter
+ user
+ group
+
+
+
+ As there is already a package available, the module can now be added.
+ This is accomplished by adding a new file to the
+ nixos/modules/services/monitoring/prometheus/exporters/ directory,
+ which will be called postfix.nix and contains all exporter specific options
+ and configuration:
+
+ # nixpgs/nixos/modules/services/prometheus/exporters/postfix.nix
+ { config, lib, pkgs }:
+
+ with lib;
+
+ let
+ # for convenience we define cfg here
+ cfg = config.services.prometheus.exporters.postfix;
+ in
+ {
+ port = 9154; # The postfix exporter listens on this port by default
+
+ # `extraOpts` is an attribute set which contains additional options
+ # (and optional overrides for default options).
+ # Note that this attribute is optional.
+ extraOpts = {
+ telemetryPath = mkOption {
+ type = types.str;
+ default = "/metrics";
+ description = ''
+ Path under which to expose metrics.
+ '';
+ };
+ logfilePath = mkOption {
+ type = types.path;
+ default = /var/log/postfix_exporter_input.log;
+ example = /var/log/mail.log;
+ description = ''
+ Path where Postfix writes log entries.
+ This file will be truncated by this exporter!
+ '';
+ };
+ showqPath = mkOption {
+ type = types.path;
+ default = /var/spool/postfix/public/showq;
+ example = /var/lib/postfix/queue/public/showq;
+ description = ''
+ Path at which Postfix places its showq socket.
+ '';
+ };
+ };
+
+ # `serviceOpts` is an attribute set which contains configuration
+ # for the exporter's systemd service. One of
+ # `serviceOpts.script` and `serviceOpts.serviceConfig.ExecStart`
+ # has to be specified here. This will be merged with the default
+ # service confiuration.
+ serviceOpts = {
+ serviceConfig = {
+ ExecStart = ''
+ ${pkgs.prometheus-postfix-exporter}/bin/postfix_exporter \
+ --web.listen-address ${cfg.listenAddress}:${toString cfg.port} \
+ --web.telemetry-path ${cfg.telemetryPath} \
+ ${concatStringsSep " \\\n " cfg.extraFlags}
+ '';
+ };
+ };
+ }
+
+
+
+
+
+ This should already be enough for the postfix exporter. Additionally one could
+ now add assertions and conditional default values. This can be done in the
+ 'meta-module' that combines all exporter definitions and generates the submodules:
+ nixpkgs/nixos/modules/services/prometheus/exporters.nix
+
+
+
+
+
diff --git a/nixos/modules/services/monitoring/prometheus/exporters/blackbox.nix b/nixos/modules/services/monitoring/prometheus/exporters/blackbox.nix
new file mode 100644
index 000000000000..d09d1c4f3663
--- /dev/null
+++ b/nixos/modules/services/monitoring/prometheus/exporters/blackbox.nix
@@ -0,0 +1,31 @@
+{ config, lib, pkgs }:
+
+with lib;
+
+let
+ cfg = config.services.prometheus.exporters.blackbox;
+in
+{
+ port = 9115;
+ extraOpts = {
+ configFile = mkOption {
+ type = types.path;
+ description = ''
+ Path to configuration file.
+ '';
+ };
+ };
+ serviceOpts = {
+ serviceConfig = {
+ AmbientCapabilities = [ "CAP_NET_RAW" ]; # for ping probes
+ DynamicUser = true;
+ ExecStart = ''
+ ${pkgs.prometheus-blackbox-exporter}/bin/blackbox_exporter \
+ --web.listen-address ${cfg.listenAddress}:${toString cfg.port} \
+ --config.file ${cfg.configFile} \
+ ${concatStringsSep " \\\n " cfg.extraFlags}
+ '';
+ ExecReload = "${pkgs.coreutils}/bin/kill -HUP $MAINPID";
+ };
+ };
+}
diff --git a/nixos/modules/services/monitoring/prometheus/exporters/collectd.nix b/nixos/modules/services/monitoring/prometheus/exporters/collectd.nix
new file mode 100644
index 000000000000..0eba3527162d
--- /dev/null
+++ b/nixos/modules/services/monitoring/prometheus/exporters/collectd.nix
@@ -0,0 +1,78 @@
+{ config, lib, pkgs }:
+
+with lib;
+
+let
+ cfg = config.services.prometheus.exporters.collectd;
+in
+{
+ port = 9103;
+ extraOpts = {
+ collectdBinary = {
+ enable = mkEnableOption "collectd binary protocol receiver";
+
+ authFile = mkOption {
+ default = null;
+ type = types.nullOr types.path;
+ description = "File mapping user names to pre-shared keys (passwords).";
+ };
+
+ port = mkOption {
+ type = types.int;
+ default = 25826;
+ description = ''Network address on which to accept collectd binary network packets.'';
+ };
+
+ listenAddress = mkOption {
+ type = types.str;
+ default = "0.0.0.0";
+ description = ''
+ Address to listen on for binary network packets.
+ '';
+ };
+
+ securityLevel = mkOption {
+ type = types.enum ["None" "Sign" "Encrypt"];
+ default = "None";
+ description = ''
+ Minimum required security level for accepted packets.
+ '';
+ };
+ };
+
+ logFormat = mkOption {
+ type = types.str;
+ default = "logger:stderr";
+ example = "logger:syslog?appname=bob&local=7 or logger:stdout?json=true";
+ description = ''
+ Set the log target and format.
+ '';
+ };
+
+ logLevel = mkOption {
+ type = types.enum ["debug" "info" "warn" "error" "fatal"];
+ default = "info";
+ description = ''
+ Only log messages with the given severity or above.
+ '';
+ };
+ };
+ serviceOpts = let
+ collectSettingsArgs = if (cfg.collectdBinary.enable) then ''
+ -collectd.listen-address ${cfg.collectdBinary.listenAddress}:${toString cfg.collectdBinary.port} \
+ -collectd.security-level ${cfg.collectdBinary.securityLevel} \
+ '' else "";
+ in {
+ serviceConfig = {
+ DynamicUser = true;
+ ExecStart = ''
+ ${pkgs.prometheus-collectd-exporter}/bin/collectd_exporter \
+ -log.format ${cfg.logFormat} \
+ -log.level ${cfg.logLevel} \
+ -web.listen-address ${cfg.listenAddress}:${toString cfg.port} \
+ ${collectSettingsArgs} \
+ ${concatStringsSep " \\\n " cfg.extraFlags}
+ '';
+ };
+ };
+}
diff --git a/nixos/modules/services/monitoring/prometheus/exporters/fritzbox.nix b/nixos/modules/services/monitoring/prometheus/exporters/fritzbox.nix
new file mode 100644
index 000000000000..a3f1d9d31323
--- /dev/null
+++ b/nixos/modules/services/monitoring/prometheus/exporters/fritzbox.nix
@@ -0,0 +1,39 @@
+{ config, lib, pkgs }:
+
+with lib;
+
+let
+ cfg = config.services.prometheus.exporters.fritzbox;
+in
+{
+ port = 9133;
+ extraOpts = {
+ gatewayAddress = mkOption {
+ type = types.str;
+ default = "fritz.box";
+ description = ''
+ The hostname or IP of the FRITZ!Box.
+ '';
+ };
+
+ gatewayPort = mkOption {
+ type = types.int;
+ default = 49000;
+ description = ''
+ The port of the FRITZ!Box UPnP service.
+ '';
+ };
+ };
+ serviceOpts = {
+ serviceConfig = {
+ DynamicUser = true;
+ ExecStart = ''
+ ${pkgs.prometheus-fritzbox-exporter}/bin/fritzbox_exporter \
+ -listen-address ${cfg.listenAddress}:${toString cfg.port} \
+ -gateway-address ${cfg.gatewayAddress} \
+ -gateway-port ${toString cfg.gatewayPort} \
+ ${concatStringsSep " \\\n " cfg.extraFlags}
+ '';
+ };
+ };
+}
diff --git a/nixos/modules/services/monitoring/prometheus/exporters/json.nix b/nixos/modules/services/monitoring/prometheus/exporters/json.nix
new file mode 100644
index 000000000000..a5494e85e016
--- /dev/null
+++ b/nixos/modules/services/monitoring/prometheus/exporters/json.nix
@@ -0,0 +1,36 @@
+{ config, lib, pkgs }:
+
+with lib;
+
+let
+ cfg = config.services.prometheus.exporters.json;
+in
+{
+ port = 7979;
+ extraOpts = {
+ url = mkOption {
+ type = types.str;
+ description = ''
+ URL to scrape JSON from.
+ '';
+ };
+ configFile = mkOption {
+ type = types.path;
+ description = ''
+ Path to configuration file.
+ '';
+ };
+ listenAddress = {}; # not used
+ };
+ serviceOpts = {
+ serviceConfig = {
+ DynamicUser = true;
+ ExecStart = ''
+ ${pkgs.prometheus-json-exporter}/bin/prometheus-json-exporter \
+ --port ${toString cfg.port} \
+ ${cfg.url} ${cfg.configFile} \
+ ${concatStringsSep " \\\n " cfg.extraFlags}
+ '';
+ };
+ };
+}
diff --git a/nixos/modules/services/monitoring/prometheus/exporters/minio.nix b/nixos/modules/services/monitoring/prometheus/exporters/minio.nix
new file mode 100644
index 000000000000..3cc4ffdbc8fd
--- /dev/null
+++ b/nixos/modules/services/monitoring/prometheus/exporters/minio.nix
@@ -0,0 +1,65 @@
+{ config, lib, pkgs }:
+
+with lib;
+
+let
+ cfg = config.services.prometheus.exporters.minio;
+in
+{
+ port = 9290;
+ extraOpts = {
+ minioAddress = mkOption {
+ type = types.str;
+ example = "https://10.0.0.1:9000";
+ description = ''
+ The URL of the minio server.
+ Use HTTPS if Minio accepts secure connections only.
+ By default this connects to the local minio server if enabled.
+ '';
+ };
+
+ minioAccessKey = mkOption {
+ type = types.str;
+ example = "yourMinioAccessKey";
+ description = ''
+ The value of the Minio access key.
+ It is required in order to connect to the server.
+ By default this uses the one from the local minio server if enabled
+ and config.services.minio.accessKey.
+ '';
+ };
+
+ minioAccessSecret = mkOption {
+ type = types.str;
+ description = ''
+ The value of the Minio access secret.
+ It is required in order to connect to the server.
+ By default this uses the one from the local minio server if enabled
+ and config.services.minio.secretKey.
+ '';
+ };
+
+ minioBucketStats = mkOption {
+ type = types.bool;
+ default = false;
+ description = ''
+ Collect statistics about the buckets and files in buckets.
+ It requires more computation, use it carefully in case of large buckets..
+ '';
+ };
+ };
+ serviceOpts = {
+ serviceConfig = {
+ DynamicUser = true;
+ ExecStart = ''
+ ${pkgs.prometheus-minio-exporter}/bin/minio-exporter \
+ -web.listen-address ${cfg.listenAddress}:${toString cfg.port} \
+ -minio.server ${cfg.minioAddress} \
+ -minio.access-key ${cfg.minioAccessKey} \
+ -minio.access-secret ${cfg.minioAccessSecret} \
+ ${optionalString cfg.minioBucketStats "-minio.bucket-stats"} \
+ ${concatStringsSep " \\\n " cfg.extraFlags}
+ '';
+ };
+ };
+}
diff --git a/nixos/modules/services/monitoring/prometheus/exporters/nginx.nix b/nixos/modules/services/monitoring/prometheus/exporters/nginx.nix
new file mode 100644
index 000000000000..6a3ba2d0457c
--- /dev/null
+++ b/nixos/modules/services/monitoring/prometheus/exporters/nginx.nix
@@ -0,0 +1,31 @@
+{ config, lib, pkgs }:
+
+with lib;
+
+let
+ cfg = config.services.prometheus.exporters.nginx;
+in
+{
+ port = 9113;
+ extraOpts = {
+ scrapeUri = mkOption {
+ type = types.string;
+ default = "http://localhost/nginx_status";
+ description = ''
+ Address to access the nginx status page.
+ Can be enabled with services.nginx.statusPage = true.
+ '';
+ };
+ };
+ serviceOpts = {
+ serviceConfig = {
+ DynamicUser = true;
+ ExecStart = ''
+ ${pkgs.prometheus-nginx-exporter}/bin/nginx_exporter \
+ -nginx.scrape_uri '${cfg.scrapeUri}' \
+ -telemetry.address ${cfg.listenAddress}:${toString cfg.port} \
+ ${concatStringsSep " \\\n " cfg.extraFlags}
+ '';
+ };
+ };
+}
diff --git a/nixos/modules/services/monitoring/prometheus/exporters/node.nix b/nixos/modules/services/monitoring/prometheus/exporters/node.nix
new file mode 100644
index 000000000000..c85f5f9cfb2d
--- /dev/null
+++ b/nixos/modules/services/monitoring/prometheus/exporters/node.nix
@@ -0,0 +1,39 @@
+{ config, lib, pkgs }:
+
+with lib;
+
+let
+ cfg = config.services.prometheus.exporters.node;
+in
+{
+ port = 9100;
+ extraOpts = {
+ enabledCollectors = mkOption {
+ type = types.listOf types.string;
+ default = [];
+ example = ''[ "systemd" ]'';
+ description = ''
+ Collectors to enable. The collectors listed here are enabled in addition to the default ones.
+ '';
+ };
+ disabledCollectors = mkOption {
+ type = types.listOf types.str;
+ default = [];
+ example = ''[ "timex" ]'';
+ description = ''
+ Collectors to disable which are enabled by default.
+ '';
+ };
+ };
+ serviceOpts = {
+ serviceConfig = {
+ ExecStart = ''
+ ${pkgs.prometheus-node-exporter}/bin/node_exporter \
+ ${concatMapStringsSep " " (x: "--collector." + x) cfg.enabledCollectors} \
+ ${concatMapStringsSep " " (x: "--no-collector." + x) cfg.disabledCollectors} \
+ --web.listen-address ${cfg.listenAddress}:${toString cfg.port} \
+ ${concatStringsSep " \\\n " cfg.extraFlags}
+ '';
+ };
+ };
+}
diff --git a/nixos/modules/services/monitoring/prometheus/exporters/postfix.nix b/nixos/modules/services/monitoring/prometheus/exporters/postfix.nix
new file mode 100644
index 000000000000..1e909aa27d83
--- /dev/null
+++ b/nixos/modules/services/monitoring/prometheus/exporters/postfix.nix
@@ -0,0 +1,46 @@
+{ config, lib, pkgs }:
+
+with lib;
+
+let
+ cfg = config.services.prometheus.exporters.postfix;
+in
+{
+ port = 9154;
+ extraOpts = {
+ telemetryPath = mkOption {
+ type = types.str;
+ default = "/metrics";
+ description = ''
+ Path under which to expose metrics.
+ '';
+ };
+ logfilePath = mkOption {
+ type = types.path;
+ default = "/var/log/postfix_exporter_input.log";
+ example = "/var/log/mail.log";
+ description = ''
+ Path where Postfix writes log entries.
+ This file will be truncated by this exporter!
+ '';
+ };
+ showqPath = mkOption {
+ type = types.path;
+ default = "/var/spool/postfix/public/showq";
+ example = "/var/lib/postfix/queue/public/showq";
+ description = ''
+ Path where Postfix places it's showq socket.
+ '';
+ };
+ };
+ serviceOpts = {
+ serviceConfig = {
+ ExecStart = ''
+ ${pkgs.prometheus-postfix-exporter}/bin/postfix_exporter \
+ --web.listen-address ${cfg.listenAddress}:${toString cfg.port} \
+ --web.telemetry-path ${cfg.telemetryPath} \
+ ${concatStringsSep " \\\n " cfg.extraFlags}
+ '';
+ };
+ };
+}
diff --git a/nixos/modules/services/monitoring/prometheus/exporters/snmp.nix b/nixos/modules/services/monitoring/prometheus/exporters/snmp.nix
new file mode 100644
index 000000000000..404cd0a1896b
--- /dev/null
+++ b/nixos/modules/services/monitoring/prometheus/exporters/snmp.nix
@@ -0,0 +1,71 @@
+{ config, lib, pkgs }:
+
+with lib;
+
+let
+ cfg = config.services.prometheus.exporters.snmp;
+in
+{
+ port = 9116;
+ extraOpts = {
+ configurationPath = mkOption {
+ type = types.nullOr types.path;
+ default = null;
+ description = ''
+ Path to a snmp exporter configuration file. Mutually exclusive with 'configuration' option.
+ '';
+ example = "./snmp.yml";
+ };
+
+ configuration = mkOption {
+ type = types.nullOr types.attrs;
+ default = {};
+ description = ''
+ Snmp exporter configuration as nix attribute set. Mutually exclusive with 'configurationPath' option.
+ '';
+ example = ''
+ {
+ "default" = {
+ "version" = 2;
+ "auth" = {
+ "community" = "public";
+ };
+ };
+ };
+ '';
+ };
+
+ logFormat = mkOption {
+ type = types.str;
+ default = "logger:stderr";
+ description = ''
+ Set the log target and format.
+ '';
+ };
+
+ logLevel = mkOption {
+ type = types.enum ["debug" "info" "warn" "error" "fatal"];
+ default = "info";
+ description = ''
+ Only log messages with the given severity or above.
+ '';
+ };
+ };
+ serviceOpts = let
+ configFile = if cfg.configurationPath != null
+ then cfg.configurationPath
+ else "${pkgs.writeText "snmp-eporter-conf.yml" (builtins.toJSON cfg.configuration)}";
+ in {
+ serviceConfig = {
+ DynamicUser = true;
+ ExecStart = ''
+ ${pkgs.prometheus-snmp-exporter.bin}/bin/snmp_exporter \
+ -config.file ${configFile} \
+ -log.format ${cfg.logFormat} \
+ -log.level ${cfg.logLevel} \
+ -web.listen-address ${cfg.listenAddress}:${toString cfg.port} \
+ ${concatStringsSep " \\\n " cfg.extraFlags}
+ '';
+ };
+ };
+}
diff --git a/nixos/modules/services/monitoring/prometheus/exporters/unifi.nix b/nixos/modules/services/monitoring/prometheus/exporters/unifi.nix
new file mode 100644
index 000000000000..011dcbe208e4
--- /dev/null
+++ b/nixos/modules/services/monitoring/prometheus/exporters/unifi.nix
@@ -0,0 +1,67 @@
+{ config, lib, pkgs }:
+
+with lib;
+
+let
+ cfg = config.services.prometheus.exporters.unifi;
+in
+{
+ port = 9130;
+ extraOpts = {
+ unifiAddress = mkOption {
+ type = types.str;
+ example = "https://10.0.0.1:8443";
+ description = ''
+ URL of the UniFi Controller API.
+ '';
+ };
+
+ unifiInsecure = mkOption {
+ type = types.bool;
+ default = false;
+ description = ''
+ If enabled skip the verification of the TLS certificate of the UniFi Controller API.
+ Use with caution.
+ '';
+ };
+
+ unifiUsername = mkOption {
+ type = types.str;
+ example = "ReadOnlyUser";
+ description = ''
+ username for authentication against UniFi Controller API.
+ '';
+ };
+
+ unifiPassword = mkOption {
+ type = types.str;
+ description = ''
+ Password for authentication against UniFi Controller API.
+ '';
+ };
+
+ unifiTimeout = mkOption {
+ type = types.str;
+ default = "5s";
+ example = "2m";
+ description = ''
+ Timeout including unit for UniFi Controller API requests.
+ '';
+ };
+ };
+ serviceOpts = {
+ serviceConfig = {
+ DynamicUser = true;
+ ExecStart = ''
+ ${pkgs.prometheus-unifi-exporter}/bin/unifi_exporter \
+ -telemetry.addr ${cfg.listenAddress}:${toString cfg.port} \
+ -unifi.addr ${cfg.unifiAddress} \
+ -unifi.username ${cfg.unifiUsername} \
+ -unifi.password ${cfg.unifiPassword} \
+ -unifi.timeout ${cfg.unifiTimeout} \
+ ${optionalString cfg.unifiInsecure "-unifi.insecure" } \
+ ${concatStringsSep " \\\n " cfg.extraFlags}
+ '';
+ };
+ };
+}
diff --git a/nixos/modules/services/monitoring/prometheus/exporters/varnish.nix b/nixos/modules/services/monitoring/prometheus/exporters/varnish.nix
new file mode 100644
index 000000000000..b439a83e7aa2
--- /dev/null
+++ b/nixos/modules/services/monitoring/prometheus/exporters/varnish.nix
@@ -0,0 +1,21 @@
+{ config, lib, pkgs }:
+
+with lib;
+
+let
+ cfg = config.services.prometheus.exporters.varnish;
+in
+{
+ port = 9131;
+ serviceOpts = {
+ path = [ pkgs.varnish ];
+ serviceConfig = {
+ DynamicUser = true;
+ ExecStart = ''
+ ${pkgs.prometheus-varnish-exporter}/bin/prometheus_varnish_exporter \
+ -web.listen-address ${cfg.listenAddress}:${toString cfg.port} \
+ ${concatStringsSep " \\\n " cfg.extraFlags}
+ '';
+ };
+ };
+}
diff --git a/nixos/modules/services/monitoring/prometheus/fritzbox-exporter.nix b/nixos/modules/services/monitoring/prometheus/fritzbox-exporter.nix
deleted file mode 100644
index 6da39b6519cb..000000000000
--- a/nixos/modules/services/monitoring/prometheus/fritzbox-exporter.nix
+++ /dev/null
@@ -1,76 +0,0 @@
-{ config, pkgs, lib, ... }:
-
-with lib;
-
-let
- cfg = config.services.prometheus.fritzboxExporter;
-in {
- options = {
- services.prometheus.fritzboxExporter = {
- enable = mkEnableOption "prometheus fritzbox exporter";
-
- port = mkOption {
- type = types.int;
- default = 9133;
- description = ''
- Port to listen on.
- '';
- };
-
- gatewayAddress = mkOption {
- type = types.str;
- default = "fritz.box";
- description = ''
- The hostname or IP of the FRITZ!Box.
- '';
- };
-
- gatewayPort = mkOption {
- type = types.int;
- default = 49000;
- description = ''
- The port of the FRITZ!Box UPnP service.
- '';
- };
-
- extraFlags = mkOption {
- type = types.listOf types.str;
- default = [];
- description = ''
- Extra commandline options when launching the fritzbox exporter.
- '';
- };
-
- openFirewall = mkOption {
- type = types.bool;
- default = false;
- description = ''
- Open port in firewall for incoming connections.
- '';
- };
- };
- };
-
- config = mkIf cfg.enable {
- networking.firewall.allowedTCPPorts = optional cfg.openFirewall cfg.port;
-
- systemd.services.prometheus-fritzbox-exporter = {
- description = "Prometheus exporter for FRITZ!Box via UPnP";
- unitConfig.Documentation = "https://github.com/ndecker/fritzbox_exporter";
- wantedBy = [ "multi-user.target" ];
- serviceConfig = {
- User = "nobody";
- Restart = "always";
- PrivateTmp = true;
- WorkingDirectory = /tmp;
- ExecStart = ''
- ${pkgs.prometheus-fritzbox-exporter}/bin/fritzbox_exporter \
- -listen-address :${toString cfg.port} \
- -gateway-address ${cfg.gatewayAddress} \
- -gateway-port ${toString cfg.gatewayPort} \
- ${concatStringsSep " \\\n " cfg.extraFlags}
- '';
- };
- };
- };
-}
diff --git a/nixos/modules/services/monitoring/prometheus/json-exporter.nix b/nixos/modules/services/monitoring/prometheus/json-exporter.nix
deleted file mode 100644
index 6bc56df9834b..000000000000
--- a/nixos/modules/services/monitoring/prometheus/json-exporter.nix
+++ /dev/null
@@ -1,74 +0,0 @@
-{ config, pkgs, lib, ... }:
-
-with lib;
-
-let
- cfg = config.services.prometheus.jsonExporter;
-in {
- options = {
- services.prometheus.jsonExporter = {
- enable = mkEnableOption "prometheus JSON exporter";
-
- url = mkOption {
- type = types.str;
- description = ''
- URL to scrape JSON from.
- '';
- };
-
- configFile = mkOption {
- type = types.path;
- description = ''
- Path to configuration file.
- '';
- };
-
- port = mkOption {
- type = types.int;
- default = 7979;
- description = ''
- Port to listen on.
- '';
- };
-
- extraFlags = mkOption {
- type = types.listOf types.str;
- default = [];
- description = ''
- Extra commandline options when launching the JSON exporter.
- '';
- };
-
- openFirewall = mkOption {
- type = types.bool;
- default = false;
- description = ''
- Open port in firewall for incoming connections.
- '';
- };
- };
- };
-
- config = mkIf cfg.enable {
- networking.firewall.allowedTCPPorts = optional cfg.openFirewall cfg.port;
-
- systemd.services.prometheus-json-exporter = {
- description = "Prometheus exporter for JSON over HTTP";
- unitConfig.Documentation = "https://github.com/kawamuray/prometheus-json-exporter";
- wantedBy = [ "multi-user.target" ];
- serviceConfig = {
- User = "nobody";
- Restart = "always";
- PrivateTmp = true;
- WorkingDirectory = /tmp;
- ExecStart = ''
- ${pkgs.prometheus-json-exporter}/bin/prometheus-json-exporter \
- --port ${toString cfg.port} \
- ${cfg.url} ${cfg.configFile} \
- ${concatStringsSep " \\\n " cfg.extraFlags}
- '';
- ExecReload = "${pkgs.coreutils}/bin/kill -HUP $MAINPID";
- };
- };
- };
-}
diff --git a/nixos/modules/services/monitoring/prometheus/minio-exporter.nix b/nixos/modules/services/monitoring/prometheus/minio-exporter.nix
deleted file mode 100644
index 4314671523cf..000000000000
--- a/nixos/modules/services/monitoring/prometheus/minio-exporter.nix
+++ /dev/null
@@ -1,117 +0,0 @@
-{ config, pkgs, lib, ... }:
-
-with lib;
-
-let
- cfg = config.services.prometheus.minioExporter;
-in {
- options = {
- services.prometheus.minioExporter = {
- enable = mkEnableOption "prometheus minio exporter";
-
- port = mkOption {
- type = types.int;
- default = 9290;
- description = ''
- Port to listen on.
- '';
- };
-
- listenAddress = mkOption {
- type = types.nullOr types.str;
- default = null;
- example = "0.0.0.0";
- description = ''
- Address to listen on for web interface and telemetry.
- '';
- };
-
- minioAddress = mkOption {
- type = types.str;
- example = "https://10.0.0.1:9000";
- default = if config.services.minio.enable then "http://localhost:9000" else null;
- description = ''
- The URL of the minio server.
- Use HTTPS if Minio accepts secure connections only.
- By default this connects to the local minio server if enabled.
- '';
- };
-
- minioAccessKey = mkOption ({
- type = types.str;
- example = "BKIKJAA5BMMU2RHO6IBB";
- description = ''
- The value of the Minio access key.
- It is required in order to connect to the server.
- By default this uses the one from the local minio server if enabled
- and config.services.minio.accessKey.
- '';
- } // optionalAttrs (config.services.minio.enable && config.services.minio.accessKey != "") {
- default = config.services.minio.accessKey;
- });
-
- minioAccessSecret = mkOption ({
- type = types.str;
- description = ''
- The calue of the Minio access secret.
- It is required in order to connect to the server.
- By default this uses the one from the local minio server if enabled
- and config.services.minio.secretKey.
- '';
- } // optionalAttrs (config.services.minio.enable && config.services.minio.secretKey != "") {
- default = config.services.minio.secretKey;
- });
-
- minioBucketStats = mkOption {
- type = types.bool;
- default = false;
- description = ''
- Collect statistics about the buckets and files in buckets.
- It requires more computation, use it carefully in case of large buckets..
- '';
- };
-
- extraFlags = mkOption {
- type = types.listOf types.str;
- default = [];
- description = ''
- Extra commandline options when launching the minio exporter.
- '';
- };
-
- openFirewall = mkOption {
- type = types.bool;
- default = false;
- description = ''
- Open port in firewall for incoming connections.
- '';
- };
- };
- };
-
- config = mkIf cfg.enable {
- networking.firewall.allowedTCPPorts = optional cfg.openFirewall cfg.port;
-
- systemd.services.prometheus-minio-exporter = {
- description = "Prometheus exporter for Minio server metrics";
- unitConfig.Documentation = "https://github.com/joe-pll/minio-exporter";
- wantedBy = [ "multi-user.target" ];
- after = optional config.services.minio.enable "minio.service";
- serviceConfig = {
- DynamicUser = true;
- Restart = "always";
- PrivateTmp = true;
- WorkingDirectory = /tmp;
- ExecStart = ''
- ${pkgs.prometheus-minio-exporter}/bin/minio-exporter \
- -web.listen-address ${optionalString (cfg.listenAddress != null) cfg.listenAddress}:${toString cfg.port} \
- -minio.server ${cfg.minioAddress} \
- -minio.access-key ${cfg.minioAccessKey} \
- -minio.access-secret ${cfg.minioAccessSecret} \
- ${optionalString cfg.minioBucketStats "-minio.bucket-stats"} \
- ${concatStringsSep " \\\n " cfg.extraFlags}
- '';
- };
- };
- };
-}
diff --git a/nixos/modules/services/monitoring/prometheus/nginx-exporter.nix b/nixos/modules/services/monitoring/prometheus/nginx-exporter.nix
deleted file mode 100644
index 1ccafee3b18b..000000000000
--- a/nixos/modules/services/monitoring/prometheus/nginx-exporter.nix
+++ /dev/null
@@ -1,78 +0,0 @@
-{ config, pkgs, lib, ... }:
-
-with lib;
-
-let
- cfg = config.services.prometheus.nginxExporter;
-in {
- options = {
- services.prometheus.nginxExporter = {
- enable = mkEnableOption "prometheus nginx exporter";
-
- port = mkOption {
- type = types.int;
- default = 9113;
- description = ''
- Port to listen on.
- '';
- };
-
- listenAddress = mkOption {
- type = types.string;
- default = "0.0.0.0";
- description = ''
- Address to listen on.
- '';
- };
-
- scrapeUri = mkOption {
- type = types.string;
- default = "http://localhost/nginx_status";
- description = ''
- Address to access the nginx status page.
- Can be enabled with services.nginx.statusPage = true.
- '';
- };
-
- extraFlags = mkOption {
- type = types.listOf types.str;
- default = [];
- description = ''
- Extra commandline options when launching the nginx exporter.
- '';
- };
-
- openFirewall = mkOption {
- type = types.bool;
- default = false;
- description = ''
- Open port in firewall for incoming connections.
- '';
- };
- };
- };
-
- config = mkIf cfg.enable {
- networking.firewall.allowedTCPPorts = optional cfg.openFirewall cfg.port;
-
- systemd.services.prometheus-nginx-exporter = {
- after = [ "network.target" "nginx.service" ];
- description = "Prometheus exporter for nginx metrics";
- unitConfig.Documentation = "https://github.com/discordianfish/nginx_exporter";
- wantedBy = [ "multi-user.target" ];
- serviceConfig = {
- User = "nobody";
- Restart = "always";
- PrivateTmp = true;
- WorkingDirectory = /tmp;
- ExecStart = ''
- ${pkgs.prometheus-nginx-exporter}/bin/nginx_exporter \
- -nginx.scrape_uri '${cfg.scrapeUri}' \
- -telemetry.address ${cfg.listenAddress}:${toString cfg.port} \
- ${concatStringsSep " \\\n " cfg.extraFlags}
- '';
- ExecReload = "${pkgs.coreutils}/bin/kill -HUP $MAINPID";
- };
- };
- };
-}
diff --git a/nixos/modules/services/monitoring/prometheus/node-exporter.nix b/nixos/modules/services/monitoring/prometheus/node-exporter.nix
deleted file mode 100644
index bad4389ce799..000000000000
--- a/nixos/modules/services/monitoring/prometheus/node-exporter.nix
+++ /dev/null
@@ -1,87 +0,0 @@
-{ config, pkgs, lib, ... }:
-
-with lib;
-
-let
- cfg = config.services.prometheus.nodeExporter;
-in {
- options = {
- services.prometheus.nodeExporter = {
- enable = mkEnableOption "prometheus node exporter";
-
- port = mkOption {
- type = types.int;
- default = 9100;
- description = ''
- Port to listen on.
- '';
- };
-
- listenAddress = mkOption {
- type = types.string;
- default = "0.0.0.0";
- description = ''
- Address to listen on.
- '';
- };
-
- enabledCollectors = mkOption {
- type = types.listOf types.string;
- default = [];
- example = ''[ "systemd" ]'';
- description = ''
- Collectors to enable. The collectors listed here are enabled in addition to the default ones.
- '';
- };
-
- disabledCollectors = mkOption {
- type = types.listOf types.str;
- default = [];
- example = ''[ "timex" ]'';
- description = ''
- Collectors to disable which are enabled by default.
- '';
- };
-
- extraFlags = mkOption {
- type = types.listOf types.str;
- default = [];
- description = ''
- Extra commandline options when launching the node exporter.
- '';
- };
-
- openFirewall = mkOption {
- type = types.bool;
- default = false;
- description = ''
- Open port in firewall for incoming connections.
- '';
- };
- };
- };
-
- config = mkIf cfg.enable {
- networking.firewall.allowedTCPPorts = optional cfg.openFirewall cfg.port;
-
- systemd.services.prometheus-node-exporter = {
- description = "Prometheus exporter for machine metrics";
- unitConfig.Documentation = "https://github.com/prometheus/node_exporter";
- wantedBy = [ "multi-user.target" ];
- script = ''
- exec ${pkgs.prometheus-node-exporter}/bin/node_exporter \
- ${concatMapStringsSep " " (x: "--collector." + x) cfg.enabledCollectors} \
- ${concatMapStringsSep " " (x: "--no-collector." + x) cfg.disabledCollectors} \
- --web.listen-address ${cfg.listenAddress}:${toString cfg.port} \
- ${concatStringsSep " \\\n " cfg.extraFlags}
- '';
- serviceConfig = {
- User = "nobody";
- Restart = "always";
- PrivateTmp = true;
- WorkingDirectory = /tmp;
- ExecReload = "${pkgs.coreutils}/bin/kill -HUP $MAINPID";
- };
- };
- };
-}
diff --git a/nixos/modules/services/monitoring/prometheus/snmp-exporter.nix b/nixos/modules/services/monitoring/prometheus/snmp-exporter.nix
deleted file mode 100644
index fe33f8c1f04d..000000000000
--- a/nixos/modules/services/monitoring/prometheus/snmp-exporter.nix
+++ /dev/null
@@ -1,127 +0,0 @@
-{ config, pkgs, lib, ... }:
-
-with lib;
-
-let
- cfg = config.services.prometheus.snmpExporter;
- mkConfigFile = pkgs.writeText "snmp.yml" (if cfg.configurationPath == null then builtins.toJSON cfg.configuration else builtins.readFile cfg.configurationPath);
-in {
- options = {
- services.prometheus.snmpExporter = {
- enable = mkEnableOption "Prometheus snmp exporter";
-
- user = mkOption {
- type = types.str;
- default = "nobody";
- description = ''
- User name under which snmp exporter shall be run.
- '';
- };
-
- group = mkOption {
- type = types.str;
- default = "nogroup";
- description = ''
- Group under which snmp exporter shall be run.
- '';
- };
-
- port = mkOption {
- type = types.int;
- default = 9116;
- description = ''
- Port to listen on.
- '';
- };
-
- listenAddress = mkOption {
- type = types.nullOr types.str;
- default = null;
- description = ''
- Address to listen on for web interface and telemetry.
- '';
- };
-
- configurationPath = mkOption {
- type = types.nullOr types.path;
- default = null;
- description = ''
- Path to a snmp exporter configuration file. Mutually exclusive with 'configuration' option.
- '';
- example = "./snmp.yml";
- };
-
- configuration = mkOption {
- type = types.nullOr types.attrs;
- default = {};
- description = ''
- Snmp exporter configuration as nix attribute set. Mutually exclusive with 'configurationPath' option.
- '';
- example = ''
- {
- "default" = {
- "version" = 2;
- "auth" = {
- "community" = "public";
- };
- };
- };
- '';
- };
-
- logFormat = mkOption {
- type = types.str;
- default = "logger:stderr";
- description = ''
- Set the log target and format.
- '';
- };
-
- logLevel = mkOption {
- type = types.enum ["debug" "info" "warn" "error" "fatal"];
- default = "info";
- description = ''
- Only log messages with the given severity or above.
- '';
- };
-
- openFirewall = mkOption {
- type = types.bool;
- default = false;
- description = ''
- Open port in firewall for incoming connections.
- '';
- };
- };
- };
-
- config = mkIf cfg.enable {
- networking.firewall.allowedTCPPorts = optional cfg.openFirewall cfg.port;
-
- assertions = singleton
- {
- assertion = (cfg.configurationPath == null) != (cfg.configuration == null);
- message = "Please ensure you have either 'configuration' or 'configurationPath' set!";
- };
-
- systemd.services.prometheus-snmp-exporter = {
- wantedBy = [ "multi-user.target" ];
- after = [ "network.target" ];
- script = ''
- ${pkgs.prometheus-snmp-exporter.bin}/bin/snmp_exporter \
- -config.file ${mkConfigFile} \
- -log.format ${cfg.logFormat} \
- -log.level ${cfg.logLevel} \
- -web.listen-address ${optionalString (cfg.listenAddress != null) cfg.listenAddress}:${toString cfg.port}
- '';
-
- serviceConfig = {
- User = cfg.user;
- Group = cfg.group;
- Restart = "always";
- PrivateTmp = true;
- WorkingDirectory = "/tmp";
- };
- };
- };
-}
diff --git a/nixos/modules/services/monitoring/prometheus/unifi-exporter.nix b/nixos/modules/services/monitoring/prometheus/unifi-exporter.nix
deleted file mode 100644
index 0a56d6ae95a5..000000000000
--- a/nixos/modules/services/monitoring/prometheus/unifi-exporter.nix
+++ /dev/null
@@ -1,105 +0,0 @@
-{ config, pkgs, lib, ... }:
-
-with lib;
-
-let
- cfg = config.services.prometheus.unifiExporter;
-in {
- options = {
- services.prometheus.unifiExporter = {
- enable = mkEnableOption "prometheus unifi exporter";
-
- port = mkOption {
- type = types.int;
- default = 9130;
- description = ''
- Port to listen on.
- '';
- };
-
- unifiAddress = mkOption {
- type = types.str;
- example = "https://10.0.0.1:8443";
- description = ''
- URL of the UniFi Controller API.
- '';
- };
-
- unifiInsecure = mkOption {
- type = types.bool;
- default = false;
- description = ''
- If enabled skip the verification of the TLS certificate of the UniFi Controller API.
- Use with caution.
- '';
- };
-
- unifiUsername = mkOption {
- type = types.str;
- example = "ReadOnlyUser";
- description = ''
- username for authentication against UniFi Controller API.
- '';
- };
-
- unifiPassword = mkOption {
- type = types.str;
- description = ''
- Password for authentication against UniFi Controller API.
- '';
- };
-
- unifiTimeout = mkOption {
- type = types.str;
- default = "5s";
- example = "2m";
- description = ''
- Timeout including unit for UniFi Controller API requests.
- '';
- };
-
- extraFlags = mkOption {
- type = types.listOf types.str;
- default = [];
- description = ''
- Extra commandline options when launching the unifi exporter.
- '';
- };
-
- openFirewall = mkOption {
- type = types.bool;
- default = false;
- description = ''
- Open port in firewall for incoming connections.
- '';
- };
- };
- };
-
- config = mkIf cfg.enable {
- networking.firewall.allowedTCPPorts = optional cfg.openFirewall cfg.port;
-
- systemd.services.prometheus-unifi-exporter = {
- description = "Prometheus exporter for UniFi Controller metrics";
- unitConfig.Documentation = "https://github.com/mdlayher/unifi_exporter";
- wantedBy = [ "multi-user.target" ];
- after = optional config.services.unifi.enable "unifi.service";
- serviceConfig = {
- User = "nobody";
- Restart = "always";
- PrivateTmp = true;
- WorkingDirectory = /tmp;
- ExecStart = ''
- ${pkgs.prometheus-unifi-exporter}/bin/unifi_exporter \
- -telemetry.addr :${toString cfg.port} \
- -unifi.addr ${cfg.unifiAddress} \
- -unifi.username ${cfg.unifiUsername} \
- -unifi.password ${cfg.unifiPassword} \
- -unifi.timeout ${cfg.unifiTimeout} \
- ${optionalString cfg.unifiInsecure "-unifi.insecure" } \
- ${concatStringsSep " \\\n " cfg.extraFlags}
- '';
- };
- };
- };
-}
diff --git a/nixos/modules/services/monitoring/prometheus/varnish-exporter.nix b/nixos/modules/services/monitoring/prometheus/varnish-exporter.nix
deleted file mode 100644
index 143ebb62aeac..000000000000
--- a/nixos/modules/services/monitoring/prometheus/varnish-exporter.nix
+++ /dev/null
@@ -1,61 +0,0 @@
-{ config, pkgs, lib, ... }:
-
-# Shamelessly cribbed from nginx-exporter.nix. ~ C.
-with lib;
-
-let
- cfg = config.services.prometheus.varnishExporter;
-in {
- options = {
- services.prometheus.varnishExporter = {
- enable = mkEnableOption "prometheus Varnish exporter";
-
- port = mkOption {
- type = types.int;
- default = 9131;
- description = ''
- Port to listen on.
- '';
- };
-
- extraFlags = mkOption {
- type = types.listOf types.str;
- default = [];
- description = ''
- Extra commandline options when launching the Varnish exporter.
- '';
- };
-
- openFirewall = mkOption {
- type = types.bool;
- default = false;
- description = ''
- Open port in firewall for incoming connections.
- '';
- };
- };
- };
-
- config = mkIf cfg.enable {
- networking.firewall.allowedTCPPorts = optional cfg.openFirewall cfg.port;
-
- systemd.services.prometheus-varnish-exporter = {
- description = "Prometheus exporter for Varnish metrics";
- unitConfig.Documentation = "https://github.com/jonnenauha/prometheus_varnish_exporter";
- wantedBy = [ "multi-user.target" ];
- path = [ pkgs.varnish ];
- script = ''
- exec ${pkgs.prometheus-varnish-exporter}/bin/prometheus_varnish_exporter \
- -web.listen-address :${toString cfg.port} \
- ${concatStringsSep " \\\n " cfg.extraFlags}
- '';
- serviceConfig = {
- User = "nobody";
- Restart = "always";
- PrivateTmp = true;
- WorkingDirectory = /tmp;
- ExecReload = "${pkgs.coreutils}/bin/kill -HUP $MAINPID";
- };
- };
- };
-}
diff --git a/nixos/modules/services/networking/prosody.nix b/nixos/modules/services/networking/prosody.nix
index 9d7e6d6018af..d57ebb61f636 100644
--- a/nixos/modules/services/networking/prosody.nix
+++ b/nixos/modules/services/networking/prosody.nix
@@ -15,6 +15,7 @@ let
description = "Path to the key file.";
};
+ # TODO: rename to certificate to match the prosody config
cert = mkOption {
type = types.path;
description = "Path to the certificate file.";
@@ -30,7 +31,7 @@ let
};
moduleOpts = {
-
+ # Generally required
roster = mkOption {
type = types.bool;
default = true;
@@ -61,12 +62,38 @@ let
description = "Service discovery";
};
- legacyauth = mkOption {
+ # Not essential, but recommended
+ carbons = mkOption {
type = types.bool;
default = true;
- description = "Legacy authentication. Only used by some old clients and bots";
+ description = "Keep multiple clients in sync";
};
+ pep = mkOption {
+ type = types.bool;
+ default = true;
+ description = "Enables users to publish their mood, activity, playing music and more";
+ };
+
+ private = mkOption {
+ type = types.bool;
+ default = true;
+ description = "Private XML storage (for room bookmarks, etc.)";
+ };
+
+ blocklist = mkOption {
+ type = types.bool;
+ default = true;
+ description = "Allow users to block communications with other users";
+ };
+
+ vcard = mkOption {
+ type = types.bool;
+ default = true;
+ description = "Allow users to set vCards";
+ };
+
+ # Nice to have
version = mkOption {
type = types.bool;
default = true;
@@ -91,36 +118,112 @@ let
description = "Replies to XMPP pings with pongs";
};
- console = mkOption {
+ register = mkOption {
type = types.bool;
- default = false;
- description = "telnet to port 5582";
+ default = true;
+ description = "Allow users to register on this server using a client and change passwords";
};
+ mam = mkOption {
+ type = types.bool;
+ default = false;
+ description = "Store messages in an archive and allow users to access it";
+ };
+
+ # Admin interfaces
+ admin_adhoc = mkOption {
+ type = types.bool;
+ default = true;
+ description = "Allows administration via an XMPP client that supports ad-hoc commands";
+ };
+
+ admin_telnet = mkOption {
+ type = types.bool;
+ default = false;
+ description = "Opens telnet console interface on localhost port 5582";
+ };
+
+ # HTTP modules
bosh = mkOption {
type = types.bool;
default = false;
description = "Enable BOSH clients, aka 'Jabber over HTTP'";
};
- httpserver = mkOption {
- type = types.bool;
- default = false;
- description = "Serve static files from a directory over HTTP";
- };
-
websocket = mkOption {
type = types.bool;
default = false;
description = "Enable WebSocket support";
};
+ http_files = mkOption {
+ type = types.bool;
+ default = false;
+ description = "Serve static files from a directory over HTTP";
+ };
+
+ # Other specific functionality
+ limits = mkOption {
+ type = types.bool;
+ default = false;
+ description = "Enable bandwidth limiting for XMPP connections";
+ };
+
+ groups = mkOption {
+ type = types.bool;
+ default = false;
+ description = "Shared roster support";
+ };
+
+ server_contact_info = mkOption {
+ type = types.bool;
+ default = false;
+ description = "Publish contact information for this service";
+ };
+
+ announce = mkOption {
+ type = types.bool;
+ default = false;
+ description = "Send announcement to all online users";
+ };
+
+ welcome = mkOption {
+ type = types.bool;
+ default = false;
+ description = "Welcome users who register accounts";
+ };
+
+ watchregistrations = mkOption {
+ type = types.bool;
+ default = false;
+ description = "Alert admins of registrations";
+ };
+
+ motd = mkOption {
+ type = types.bool;
+ default = false;
+ description = "Send a message to users when they log in";
+ };
+
+ legacyauth = mkOption {
+ type = types.bool;
+ default = false;
+ description = "Legacy authentication. Only used by some old clients and bots";
+ };
+
+ proxy65 = mkOption {
+ type = types.bool;
+ default = false;
+ description = "Enables a file transfer proxy service which clients behind NAT can use";
+ };
+
};
toLua = x:
if builtins.isString x then ''"${x}"''
- else if builtins.isBool x then toString x
+ else if builtins.isBool x then (if x == true then "true" else "false")
else if builtins.isInt x then toString x
+ else if builtins.isList x then ''{ ${lib.concatStringsSep ", " (map (n: toLua n) x) } }''
else throw "Invalid Lua value";
createSSLOptsStr = o: ''
@@ -198,6 +301,59 @@ in
description = "Allow account creation";
};
+ c2sRequireEncryption = mkOption {
+ type = types.bool;
+ default = true;
+ description = ''
+ Force clients to use encrypted connections? This option will
+ prevent clients from authenticating unless they are using encryption.
+ '';
+ };
+
+ s2sRequireEncryption = mkOption {
+ type = types.bool;
+ default = true;
+ description = ''
+ Force servers to use encrypted connections? This option will
+ prevent servers from authenticating unless they are using encryption.
+ Note that this is different from authentication.
+ '';
+ };
+
+ s2sSecureAuth = mkOption {
+ type = types.bool;
+ default = false;
+ description = ''
+ Force certificate authentication for server-to-server connections?
+ This provides ideal security, but requires servers you communicate
+ with to support encryption AND present valid, trusted certificates.
+ For more information see https://prosody.im/doc/s2s#security
+ '';
+ };
+
+ s2sInsecureDomains = mkOption {
+ type = types.listOf types.str;
+ default = [];
+ example = [ "insecure.example.com" ];
+ description = ''
+ Some servers have invalid or self-signed certificates. You can list
+ remote domains here that will not be required to authenticate using
+ certificates. They will be authenticated using DNS instead, even
+ when s2s_secure_auth is enabled.
+ '';
+ };
+
+ s2sSecureDomains = mkOption {
+ type = types.listOf types.str;
+ default = [];
+ example = [ "jabber.org" ];
+ description = ''
+ Even if you leave s2s_secure_auth disabled, you can still require valid
+ certificates for some domains by specifying a list here.
+ '';
+ };
+
+
modules = moduleOpts;
extraModules = mkOption {
@@ -206,6 +362,12 @@ in
description = "Enable custom modules";
};
+ extraPluginPaths = mkOption {
+ type = types.listOf types.path;
+ default = [];
+ description = "Addtional path in which to look find plugins/modules";
+ };
+
virtualHosts = mkOption {
description = "Define the virtual hosts";
@@ -255,38 +417,48 @@ in
config = mkIf cfg.enable {
- environment.systemPackages = [ pkgs.prosody ];
+ environment.systemPackages = [ cfg.package ];
environment.etc."prosody/prosody.cfg.lua".text = ''
pidfile = "/var/lib/prosody/prosody.pid"
-
log = "*syslog"
data_path = "/var/lib/prosody"
-
- allow_registration = ${boolToString cfg.allowRegistration};
-
- ${ optionalString cfg.modules.console "console_enabled = true;" }
+ plugin_paths = {
+ ${lib.concatStringsSep ", " (map (n: "\"${n}\"") cfg.extraPluginPaths) }
+ }
${ optionalString (cfg.ssl != null) (createSSLOptsStr cfg.ssl) }
- admins = { ${lib.concatStringsSep ", " (map (n: "\"${n}\"") cfg.admins) } };
+ admins = ${toLua cfg.admins}
+
+ -- we already build with libevent, so we can just enable it for a more performant server
+ use_libevent = true
modules_enabled = {
${ lib.concatStringsSep "\n\ \ " (lib.mapAttrsToList
- (name: val: optionalString val ''"${name}";'')
+ (name: val: optionalString val "${toLua name};")
cfg.modules) }
-
- ${ optionalString cfg.allowRegistration "\"register\"\;" }
-
- ${ lib.concatStringsSep "\n" (map (x: "\"${x}\";") cfg.extraModules)}
-
- "posix";
+ ${ lib.concatStringsSep "\n" (map (x: "${toLua x};") cfg.package.communityModules)}
+ ${ lib.concatStringsSep "\n" (map (x: "${toLua x};") cfg.extraModules)}
};
+ allow_registration = ${toLua cfg.allowRegistration}
+
+ c2s_require_encryption = ${toLua cfg.c2sRequireEncryption}
+
+ s2s_require_encryption = ${toLua cfg.s2sRequireEncryption}
+
+ s2s_secure_auth = ${toLua cfg.s2sSecureAuth}
+
+ s2s_insecure_domains = ${toLua cfg.s2sInsecureDomains}
+
+ s2s_secure_domains = ${toLua cfg.s2sSecureDomains}
+
+
${ cfg.extraConfig }
${ lib.concatStringsSep "\n" (lib.mapAttrsToList (n: v: ''
diff --git a/nixos/modules/services/web-apps/nixbot.nix b/nixos/modules/services/web-apps/nixbot.nix
deleted file mode 100644
index 0592d01bf369..000000000000
--- a/nixos/modules/services/web-apps/nixbot.nix
+++ /dev/null
@@ -1,149 +0,0 @@
-{ config, lib, pkgs, ... }:
-
-with lib;
-
-let
- cfg = config.services.nixbot;
- pyramidIni = ''
- ###
- # app configuration
- # http://docs.pylonsproject.org/projects/pyramid/en/1.7-branch/narr/environment.html
- ###
-
- [app:main]
- use = egg:nixbot
-
- nixbot.github_token = ${cfg.githubToken}
- nixbot.bot_name = ${cfg.botName}
- nixbot.repo = ${cfg.repo}
- nixbot.pr_repo = ${cfg.prRepo}
- nixbot.hydra_jobsets_repo = ${cfg.hydraJobsetsRepo}
- nixbot.github_secret = justnotsorandom
- nixbot.public_url = ${cfg.publicUrl}
- nixbot.repo_dir = ${cfg.repoDir}
-
- pyramid.reload_templates = false
- pyramid.debug_authorization = false
- pyramid.debug_notfound = false
- pyramid.debug_routematch = false
- pyramid.default_locale_name = en
-
- # By default, the toolbar only appears for clients from IP addresses
- # '127.0.0.1' and '::1'.
- # debugtoolbar.hosts = 127.0.0.1 ::1
-
- ###
- # wsgi server configuration
- ###
-
- [server:main]
- use = egg:waitress#main
- host = 0.0.0.0
- port = 6543
-
- ###
- # logging configuration
- # http://docs.pylonsproject.org/projects/pyramid/en/1.7-branch/narr/logging.html
- ###
-
- [loggers]
- keys = root, nixbot
-
- [handlers]
- keys = console
-
- [formatters]
- keys = generic
-
- [logger_root]
- level = INFO
- handlers = console
-
- [logger_nixbot]
- level = INFO
- handlers =
- qualname = nixbot
-
- [handler_console]
- class = StreamHandler
- args = (sys.stderr,)
- level = NOTSET
- formatter = generic
-
- [formatter_generic]
- format = %(asctime)s %(levelname)-5.5s [%(name)s:%(lineno)s][%(threadName)s] %(message)s
- '';
-in {
- options = {
- services.nixbot = {
- enable = mkEnableOption "nixbot";
-
- botName = mkOption {
- type = types.str;
- description = "The bot's github user account name.";
- default = "nixbot";
- };
-
- githubToken = mkOption {
- type = types.str;
- description = "The bot's github user account token.";
- example = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa";
- };
-
- repo = mkOption {
- type = types.str;
- description = "The github repository to check for PRs.";
- example = "nixos/nixpkgs";
- };
-
- prRepo = mkOption {
- type = types.str;
- description = "The github repository to push the testing branches to.";
- example = "nixos/nixpkgs-pr";
- };
-
- hydraJobsetsRepo = mkOption {
- type = types.str;
- description = "The github repository to push the hydra jobset definitions to.";
- example = "nixos/hydra-jobsets";
- };
-
- publicUrl = mkOption {
- type = types.str;
- description = "The public URL the bot is reachable at (Github hook endpoint).";
- example = "https://nixbot.nixos.org";
- };
-
- repoDir = mkOption {
- type = types.path;
- description = "The directory the repositories are stored in.";
- default = "/var/lib/nixbot";
- };
- };
- };
-
- config = mkIf cfg.enable {
- users.extraUsers.nixbot = {
- createHome = true;
- home = cfg.repoDir;
- };
-
- systemd.services.nixbot = let
- env = pkgs.python3.buildEnv.override {
- extraLibs = [ pkgs.nixbot ];
- };
- in {
- after = [ "network.target" ];
- wantedBy = [ "multi-user.target" ];
- script = ''
- ${env}/bin/pserve ${pkgs.writeText "production.ini" pyramidIni}
- '';
-
- serviceConfig = {
- User = "nixbot";
- Group = "nogroup";
- PermissionsStartOnly = true;
- };
- };
- };
-}
diff --git a/nixos/release.nix b/nixos/release.nix
index 0b8d7318cd8a..9b4aa4b0399d 100644
--- a/nixos/release.nix
+++ b/nixos/release.nix
@@ -344,6 +344,7 @@ in rec {
tests.predictable-interface-names = callSubTests tests/predictable-interface-names.nix {};
tests.printing = callTest tests/printing.nix {};
tests.prometheus = callTest tests/prometheus.nix {};
+ tests.prosody = callTest tests/prosody.nix {};
tests.proxy = callTest tests/proxy.nix {};
# tests.quagga = callTest tests/quagga.nix {};
tests.quake3 = callTest tests/quake3.nix {};
diff --git a/nixos/tests/prosody.nix b/nixos/tests/prosody.nix
new file mode 100644
index 000000000000..fcebfaf74e12
--- /dev/null
+++ b/nixos/tests/prosody.nix
@@ -0,0 +1,75 @@
+import ./make-test.nix {
+ name = "prosody";
+
+ machine = { config, pkgs, ... }: {
+ services.prosody = {
+ enable = true;
+ # TODO: use a self-signed certificate
+ c2sRequireEncryption = false;
+ };
+ environment.systemPackages = let
+ sendMessage = pkgs.writeScriptBin "send-message" ''
+ #!/usr/bin/env python3
+ # Based on the sleekxmpp send_client example, look there for more details:
+ # https://github.com/fritzy/SleekXMPP/blob/develop/examples/send_client.py
+ import sleekxmpp
+
+ class SendMsgBot(sleekxmpp.ClientXMPP):
+ """
+ A basic SleekXMPP bot that will log in, send a message,
+ and then log out.
+ """
+ def __init__(self, jid, password, recipient, message):
+ sleekxmpp.ClientXMPP.__init__(self, jid, password)
+
+ self.recipient = recipient
+ self.msg = message
+
+ self.add_event_handler("session_start", self.start, threaded=True)
+
+ def start(self, event):
+ self.send_presence()
+ self.get_roster()
+
+ self.send_message(mto=self.recipient,
+ mbody=self.msg,
+ mtype='chat')
+
+ self.disconnect(wait=True)
+
+
+ if __name__ == '__main__':
+ xmpp = SendMsgBot("test1@localhost", "test1", "test2@localhost", "Hello World!")
+ xmpp.register_plugin('xep_0030') # Service Discovery
+ xmpp.register_plugin('xep_0199') # XMPP Ping
+
+ # TODO: verify certificate
+ # If you want to verify the SSL certificates offered by a server:
+ # xmpp.ca_certs = "path/to/ca/cert"
+
+ if xmpp.connect(('localhost', 5222)):
+ xmpp.process(block=True)
+ else:
+ print("Unable to connect.")
+ sys.exit(1)
+ '';
+ in [ (pkgs.python3.withPackages (ps: [ ps.sleekxmpp ])) sendMessage ];
+ };
+
+ testScript = ''
+ $machine->waitForUnit('prosody.service');
+ $machine->succeed('prosodyctl status') =~ /Prosody is running/;
+
+ # set password to 'test' (it's asked twice)
+ $machine->succeed('yes test1 | prosodyctl adduser test1@localhost');
+ # set password to 'y'
+ $machine->succeed('yes | prosodyctl adduser test2@localhost');
+ # correct password to 'test2'
+ $machine->succeed('yes test2 | prosodyctl passwd test2@localhost');
+
+ $machine->succeed("send-message");
+
+ $machine->succeed('prosodyctl deluser test1@localhost');
+ $machine->succeed('prosodyctl deluser test2@localhost');
+ '';
+}
diff --git a/pkgs/applications/backup/deja-dup/default.nix b/pkgs/applications/backup/deja-dup/default.nix
index b0d8ae8d3cf6..1ea4b4d27506 100644
--- a/pkgs/applications/backup/deja-dup/default.nix
+++ b/pkgs/applications/backup/deja-dup/default.nix
@@ -1,5 +1,5 @@
-{ stdenv, fetchurl, meson, ninja, pkgconfig, vala_0_38, gettext
-, gnome3, libnotify, intltool, itstool, glib, gtk3, libxml2
+{ stdenv, fetchurl, substituteAll, meson, ninja, pkgconfig, vala_0_40, gettext
+, gnome3, libnotify, itstool, glib, gtk3, libxml2
, coreutils, libsecret, pcre, libxkbcommon, wrapGAppsHook
, libpthreadstubs, libXdmcp, epoxy, at-spi2-core, dbus, libgpgerror
, appstream-glib, desktop-file-utils, duplicity
@@ -15,20 +15,14 @@ stdenv.mkDerivation rec {
};
patches = [
- ./fix-paths.patch
+ (substituteAll {
+ src = ./fix-paths.patch;
+ inherit coreutils;
+ })
];
- postPatch = ''
- substituteInPlace libdeja/tools/duplicity/DuplicityInstance.vala --replace \
- "/bin/rm" \
- "${coreutils}/bin/rm"
- '';
-
- # couldn't find gio/gdesktopappinfo.h
- NIX_CFLAGS_COMPILE = "-I${glib.dev}/include/gio-unix-2.0";
-
nativeBuildInputs = [
- meson ninja pkgconfig vala_0_38 gettext intltool itstool
+ meson ninja pkgconfig vala_0_40 gettext itstool
appstream-glib desktop-file-utils libxml2 wrapGAppsHook
];
@@ -40,6 +34,8 @@ stdenv.mkDerivation rec {
propagatedUserEnvPkgs = [ duplicity ];
+ PKG_CONFIG_LIBNAUTILUS_EXTENSION_EXTENSIONDIR = "${placeholder "out"}/lib/nautilus/extensions-3.0";
+
postInstall = ''
glib-compile-schemas $out/share/glib-2.0/schemas
'';
diff --git a/pkgs/applications/backup/deja-dup/fix-paths.patch b/pkgs/applications/backup/deja-dup/fix-paths.patch
index 1cc57e6a54a2..26126fdc9d56 100644
--- a/pkgs/applications/backup/deja-dup/fix-paths.patch
+++ b/pkgs/applications/backup/deja-dup/fix-paths.patch
@@ -1,12 +1,11 @@
-diff --git a/deja-dup/nautilus/meson.build b/deja-dup/nautilus/meson.build
-index 04b136f3..ed8f7cba 100644
---- a/deja-dup/nautilus/meson.build
-+++ b/deja-dup/nautilus/meson.build
-@@ -31,6 +31,6 @@ shared_module('deja-dup', ['NautilusExtension.c'],
- link_with: [dirhandling],
- dependencies: [nautilus_dep],
- install: true,
-- install_dir: nautilus_dep.get_pkgconfig_variable('extensiondir'))
-+ install_dir: join_paths(get_option('libdir'), 'nautilus', 'extensions-3.0'))
+--- a/libdeja/tools/duplicity/DuplicityInstance.vala
++++ b/libdeja/tools/duplicity/DuplicityInstance.vala
+@@ -159,7 +159,7 @@
+ // We already are pretty sure we don't have other duplicities in our
+ // archive directories, because we use our own and we ensure we only have
+ // one deja-dup running at a time via DBus.
+- Posix.system("/bin/rm -f " + Shell.quote(cache_dir) + "/*/lockfile.lock");
++ Posix.system("@coreutils@/bin/rm -f " + Shell.quote(cache_dir) + "/*/lockfile.lock");
- endif
+ Process.spawn_async_with_pipes(null, real_argv, real_envp,
+ SpawnFlags.SEARCH_PATH |
diff --git a/pkgs/applications/editors/jetbrains/default.nix b/pkgs/applications/editors/jetbrains/default.nix
index a4a71c12820e..3c5574388236 100644
--- a/pkgs/applications/editors/jetbrains/default.nix
+++ b/pkgs/applications/editors/jetbrains/default.nix
@@ -211,7 +211,7 @@ let
});
buildWebStorm = { name, version, src, license, description, wmClass, update-channel }:
- (mkJetBrainsProduct {
+ lib.overrideDerivation (mkJetBrainsProduct {
inherit name version src wmClass jdk;
product = "WebStorm";
meta = with stdenv.lib; {
@@ -225,8 +225,13 @@ let
maintainers = with maintainers; [ abaldeau ];
platforms = platforms.linux;
};
+ }) (attrs: {
+ patchPhase = (attrs.patchPhase or "") + optionalString (stdenv.isLinux) ''
+ # Webstorm tries to use bundled jre if available.
+ # Lets prevent this for the moment
+ rm -r jre64
+ '';
});
-
in
{
diff --git a/pkgs/applications/editors/kakoune/default.nix b/pkgs/applications/editors/kakoune/default.nix
index 404160668b45..868dfaf3d12a 100644
--- a/pkgs/applications/editors/kakoune/default.nix
+++ b/pkgs/applications/editors/kakoune/default.nix
@@ -4,12 +4,12 @@ with stdenv.lib;
stdenv.mkDerivation rec {
name = "kakoune-unstable-${version}";
- version = "2018-02-15";
+ version = "2018-03-22";
src = fetchFromGitHub {
repo = "kakoune";
owner = "mawww";
- rev = "f5e39972eb525166dc5b1d963067f79990991a75";
- sha256 = "160a302xg6nfzx49dkis6ij20kyzr63kxvcv8ld3l07l8k69g80r";
+ rev = "f8e297acef1be0657b779fea5256f606a6c6a3a3";
+ sha256 = "14xmw3lkwzppm9bns55nmyb1lfihzhdyisf6xjqlszdj4mcf94jl";
};
nativeBuildInputs = [ pkgconfig ];
buildInputs = [ ncurses asciidoc docbook_xsl libxslt ];
diff --git a/pkgs/applications/editors/texmacs/common.nix b/pkgs/applications/editors/texmacs/common.nix
new file mode 100644
index 000000000000..ec2498aa69b9
--- /dev/null
+++ b/pkgs/applications/editors/texmacs/common.nix
@@ -0,0 +1,68 @@
+{ stdenv, fetchurl, tex, extraFonts, chineseFonts, japaneseFonts, koreanFonts }:
+rec {
+ extraFontsSrc = fetchurl {
+ url = "ftp://ftp.texmacs.org/pub/TeXmacs/fonts/TeXmacs-extra-fonts-1.0-noarch.tar.gz";
+ sha256 = "0hylgjmd95y9yahbblmawkkw0i71vb145xxv2xqrmff81301n6k7";
+ };
+
+ fullFontsSrc = fetchurl {
+ url = "ftp://ftp.texmacs.org/pub/TeXmacs/fonts/TeXmacs-windows-fonts-1.0-noarch.tar.gz";
+ sha256 = "1yxzjpqpm7kvx0ly5jmfpzlfhsh41b0ibn1v84qv6xy73r2vis2f";
+ };
+
+ chineseFontsSrc = fetchurl {
+ url = "ftp://ftp.texmacs.org/pub/TeXmacs/fonts/TeXmacs-chinese-fonts.tar.gz";
+ sha256 = "0yprqjsx5mfsaxr525mcm3xqwcadzxp14njm38ir1325baada2fp";
+ };
+
+ japaneseFontsSrc = fetchurl {
+ url = "ftp://ftp.texmacs.org/pub/TeXmacs/fonts/TeXmacs-japanese-fonts.tar.gz";
+ sha256 = "1dn6zvsa7gk59d61xicwpbapab3rm6kz48rp5w1bhmihxixw21jn";
+ };
+
+ koreanFontsSrc = fetchurl {
+ url = "ftp://ftp.texmacs.org/pub/TeXmacs/fonts/TeXmacs-korean-fonts.tar.gz";
+ sha256 = "07axg57mqm3jbnm4lawx0h3r2h56xv9acwzjppryfklw4c27f5hh";
+ };
+
+ postPatch = (if tex == null then ''
+ gunzip < ${fullFontsSrc} | (cd TeXmacs && tar xvf -)
+ '' else if extraFonts then ''
+ gunzip < ${extraFontsSrc} | (cd TeXmacs && tar xvf -)
+ '' else "") +
+ (if chineseFonts then ''
+ gunzip < ${chineseFontsSrc} | (cd TeXmacs && tar xvf -)
+ '' else "") +
+ (if japaneseFonts then ''
+ gunzip < ${japaneseFontsSrc} | (cd TeXmacs && tar xvf -)
+ '' else "") +
+ (if koreanFonts then ''
+ gunzip < ${koreanFontsSrc} | (cd TeXmacs && tar xvf -)
+ '' else "");
+
+
+ meta = {
+ description = "WYSIWYW editing platform with special features for scientists";
+ longDescription =
+ '' GNU TeXmacs is a free wysiwyw (what you see is what you want)
+ editing platform with special features for scientists. The software
+ aims to provide a unified and user friendly framework for editing
+ structured documents with different types of content (text,
+ graphics, mathematics, interactive content, etc.). The rendering
+ engine uses high-quality typesetting algorithms so as to produce
+ professionally looking documents, which can either be printed out or
+ presented from a laptop.
+
+ The software includes a text editor with support for mathematical
+ formulas, a small technical picture editor and a tool for making
+ presentations from a laptop. Moreover, TeXmacs can be used as an
+ interface for many external systems for computer algebra, numerical
+ analysis, statistics, etc. New presentation styles can be written
+ by the user and new features can be added to the editor using the
+ Scheme extension language. A native spreadsheet and tools for
+ collaborative authoring are planned for later.
+ '';
+ homepage = http://texmacs.org/;
+ license = stdenv.lib.licenses.gpl2Plus;
+ };
+}
diff --git a/pkgs/applications/editors/texmacs/darwin.nix b/pkgs/applications/editors/texmacs/darwin.nix
new file mode 100644
index 000000000000..e319ccf39b1b
--- /dev/null
+++ b/pkgs/applications/editors/texmacs/darwin.nix
@@ -0,0 +1,59 @@
+{ stdenv, callPackage, fetchurl, makeWrapper,
+ guile_1_8, qt4, zlib, freetype, CoreFoundation, Cocoa, gettext, libiconv, ghostscript,
+ tex ? null,
+ aspell ? null,
+ netpbm ? null,
+ imagemagick ? null,
+ extraFonts ? false,
+ chineseFonts ? false,
+ japaneseFonts ? false,
+ koreanFonts ? false }:
+let
+ version = "1.99.4";
+ common = callPackage ./common.nix {
+ inherit tex extraFonts chineseFonts japaneseFonts koreanFonts;
+ };
+in
+stdenv.mkDerivation {
+ name = "TeXmacs-${version}";
+
+ src= fetchurl {
+ url = "http://www.texmacs.org/Download/ftp/tmftp/source/TeXmacs-${version}-src.tar.gz";
+ sha256 = "1z8sj0xd1ncbl7ipzfsib6lmc7ahgvmiw61ln5zxm2l88jf7qc1a";
+ };
+
+ patches = [ ./darwin.patch ];
+
+ buildInputs = [ guile_1_8.dev qt4 freetype CoreFoundation Cocoa gettext libiconv ghostscript ];
+
+ GUILE_CPPFLAGS="-D_THREAD_SAFE -I${guile_1_8.dev}/include -I${guile_1_8.dev}/include/guile ";
+
+ NIX_LDFLAGS="${zlib}/lib/libz.dylib";
+
+ buildPhase = ''
+ substituteInPlace Makefile \
+ --replace 'find -d $(MACOS_PACKAGE_TEXMACS)' 'find $(MACOS_PACKAGE_TEXMACS) -depth' \
+ --replace '$(MACOS_PACKAGE_SRC)/bundle-libs.sh' 'true'
+ make MACOS_BUNDLE
+ '';
+
+ installPhase = ''
+ mkdir -p $out/Applications
+ cp -R ../distr/TeXmacs-${version}.app $out/Applications
+ '';
+
+ inherit (common) postPatch;
+
+ postInstall = "wrapProgram $out/Applications/TeXmacs-${version}/Contents/MacOS/TeXmacs --suffix PATH : " +
+ "${ghostscript}/bin:" +
+ (if aspell == null then "" else "${aspell}/bin:") +
+ (if tex == null then "" else "${tex}/bin:") +
+ (if netpbm == null then "" else "${netpbm}/bin:") +
+ (if imagemagick == null then "" else "${imagemagick}/bin:");
+
+ enableParallelBuilding = true;
+
+ meta = common.meta // {
+ platforms = stdenv.lib.platforms.darwin;
+ };
+}
diff --git a/pkgs/applications/editors/texmacs/darwin.patch b/pkgs/applications/editors/texmacs/darwin.patch
new file mode 100644
index 000000000000..2cb33fbbef30
--- /dev/null
+++ b/pkgs/applications/editors/texmacs/darwin.patch
@@ -0,0 +1,29 @@
+--- a/configure
++++ b/configure
+@@ -7461,7 +7461,7 @@ $as_echo "final adjustments for cygwin host" >&6; }
+ CONFIG_QTPIPES="yes"
+ CONFIG_CXXFLAGS="-I${prefix}/include"
+ CONFIG_BSHARED=""
+- CONFIG_BFLAGS="-framework Cocoa -framework IOKit"
++ CONFIG_BFLAGS="-framework Cocoa -framework IOKit -framework CoreFoundation"
+ CONFIG_BPATH=""
+ CONFIG_SO="dylib"
+ CONFIG_LIB_PATH="DYLD_LIBRARY_PATH"
+@@ -8281,6 +8281,7 @@ _ASEOF
+ if $QMAKE ${additional_qmake_flags} ; then :; else
+ as_fn_error $? "Calling $QMAKE failed." "$LINENO" 5
+ fi
++ echo "QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.10" >> $pro_file
+ # Try to compile a simple Qt app.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can build a simple Qt app" >&5
+ $as_echo_n "checking whether we can build a simple Qt app... " >&6; }
+--- a/src/Plugins/Unix/unix_sys_utils.cpp
++++ b/src/Plugins/Unix/unix_sys_utils.cpp
+@@ -17,6 +17,7 @@
+ #include
+ #include
+ #include
++#include
+
+ // for thread safe strings
+ #include
diff --git a/pkgs/applications/editors/texmacs/default.nix b/pkgs/applications/editors/texmacs/default.nix
index e51813459c6f..447e729d4f9b 100644
--- a/pkgs/applications/editors/texmacs/default.nix
+++ b/pkgs/applications/editors/texmacs/default.nix
@@ -1,41 +1,21 @@
-{stdenv, fetchurl, guile_1_8, qt4, zlib, xmodmap, which, makeWrapper, freetype,
- tex ? null,
- aspell ? null,
- ghostscriptX ? null,
- extraFonts ? false,
- chineseFonts ? false,
- japaneseFonts ? false,
- koreanFonts ? false }:
+{ stdenv, callPackage,
+ fetchurl, guile_1_8, qt4, zlib, xmodmap, which, makeWrapper, freetype,
+ tex ? null,
+ aspell ? null,
+ ghostscriptX ? null,
+ extraFonts ? false,
+ chineseFonts ? false,
+ japaneseFonts ? false,
+ koreanFonts ? false }:
-let
+let
pname = "TeXmacs";
version = "1.99.2";
- extraFontsSrc = fetchurl {
- url = "ftp://ftp.texmacs.org/pub/TeXmacs/fonts/TeXmacs-extra-fonts-1.0-noarch.tar.gz";
- sha256 = "0hylgjmd95y9yahbblmawkkw0i71vb145xxv2xqrmff81301n6k7";
- };
-
- fullFontsSrc = fetchurl {
- url = "ftp://ftp.texmacs.org/pub/TeXmacs/fonts/TeXmacs-windows-fonts-1.0-noarch.tar.gz";
- sha256 = "1yxzjpqpm7kvx0ly5jmfpzlfhsh41b0ibn1v84qv6xy73r2vis2f";
- };
-
- chineseFontsSrc = fetchurl {
- url = "ftp://ftp.texmacs.org/pub/TeXmacs/fonts/TeXmacs-chinese-fonts.tar.gz";
- sha256 = "0yprqjsx5mfsaxr525mcm3xqwcadzxp14njm38ir1325baada2fp";
- };
-
- japaneseFontsSrc = fetchurl {
- url = "ftp://ftp.texmacs.org/pub/TeXmacs/fonts/TeXmacs-japanese-fonts.tar.gz";
- sha256 = "1dn6zvsa7gk59d61xicwpbapab3rm6kz48rp5w1bhmihxixw21jn";
- };
-
- koreanFontsSrc = fetchurl {
- url = "ftp://ftp.texmacs.org/pub/TeXmacs/fonts/TeXmacs-korean-fonts.tar.gz";
- sha256 = "07axg57mqm3jbnm4lawx0h3r2h56xv9acwzjppryfklw4c27f5hh";
+ common = callPackage ./common.nix {
+ inherit tex extraFonts chineseFonts japaneseFonts koreanFonts;
};
in
-stdenv.mkDerivation rec {
+stdenv.mkDerivation {
name = "${pname}-${version}";
src = fetchurl {
@@ -45,56 +25,21 @@ stdenv.mkDerivation rec {
buildInputs = [ guile_1_8 qt4 makeWrapper ghostscriptX freetype ];
- patchPhase = (if tex == null then ''
- gunzip < ${fullFontsSrc} | (cd TeXmacs && tar xvf -)
- '' else if extraFonts then ''
- gunzip < ${extraFontsSrc} | (cd TeXmacs && tar xvf -)
- '' else "") +
- (if chineseFonts then ''
- gunzip < ${chineseFontsSrc} | (cd TeXmacs && tar xvf -)
- '' else "") +
- (if japaneseFonts then ''
- gunzip < ${japaneseFontsSrc} | (cd TeXmacs && tar xvf -)
- '' else "") +
- (if koreanFonts then ''
- gunzip < ${koreanFontsSrc} | (cd TeXmacs && tar xvf -)
- '' else "");
-
postInstall = "wrapProgram $out/bin/texmacs --suffix PATH : " +
(if ghostscriptX == null then "" else "${ghostscriptX}/bin:") +
(if aspell == null then "" else "${aspell}/bin:") +
(if tex == null then "" else "${tex}/bin:") +
"${xmodmap}/bin:${which}/bin";
+ inherit (common) postPatch;
+
postFixup = ''
bin="$out/libexec/TeXmacs/bin/texmacs.bin"
rpath=$(patchelf --print-rpath "$bin")
patchelf --set-rpath "$rpath:${zlib.out}/lib" "$bin"
'';
- meta = {
- description = "WYSIWYW editing platform with special features for scientists";
- longDescription =
- '' GNU TeXmacs is a free wysiwyw (what you see is what you want)
- editing platform with special features for scientists. The software
- aims to provide a unified and user friendly framework for editing
- structured documents with different types of content (text,
- graphics, mathematics, interactive content, etc.). The rendering
- engine uses high-quality typesetting algorithms so as to produce
- professionally looking documents, which can either be printed out or
- presented from a laptop.
-
- The software includes a text editor with support for mathematical
- formulas, a small technical picture editor and a tool for making
- presentations from a laptop. Moreover, TeXmacs can be used as an
- interface for many external systems for computer algebra, numerical
- analysis, statistics, etc. New presentation styles can be written
- by the user and new features can be added to the editor using the
- Scheme extension language. A native spreadsheet and tools for
- collaborative authoring are planned for later.
- '';
- homepage = http://texmacs.org/;
- license = stdenv.lib.licenses.gpl2Plus;
+ meta = common.meta // {
maintainers = [ stdenv.lib.maintainers.roconnor ];
platforms = stdenv.lib.platforms.gnu; # arbitrary choice
};
diff --git a/pkgs/applications/graphics/digikam/default.nix b/pkgs/applications/graphics/digikam/default.nix
index 9dd0722541f4..633a1d9bd6e6 100644
--- a/pkgs/applications/graphics/digikam/default.nix
+++ b/pkgs/applications/graphics/digikam/default.nix
@@ -50,13 +50,13 @@
mkDerivation rec {
name = "digikam-${version}";
- version = "5.8.0";
+ version = "5.9.0";
src = fetchFromGitHub {
owner = "KDE";
repo = "digikam";
rev = "v${version}";
- sha256 = "1bvidg0fn92xvw5brhb34lm7m4iy4jb5xpvnhbgh8vik2m4n41w1";
+ sha256 = "09diw273h9i7rss89ba82yrfy6jb2njv3k0dknrrg7bb998vrw2d";
};
nativeBuildInputs = [ cmake doxygen extra-cmake-modules kdoctools wrapGAppsHook ];
diff --git a/pkgs/applications/misc/mucommander/default.nix b/pkgs/applications/misc/mucommander/default.nix
new file mode 100644
index 000000000000..fdb236194f9c
--- /dev/null
+++ b/pkgs/applications/misc/mucommander/default.nix
@@ -0,0 +1,82 @@
+{ stdenv, fetchFromGitHub, gradle_3_5, perl, makeWrapper, jre }:
+
+let
+ version = "0.9.2";
+ name = "mucommander-${version}";
+
+ src = fetchFromGitHub {
+ owner = "mucommander";
+ repo = "mucommander";
+ rev = version;
+ sha256 = "1fvij0yjjz56hsyddznx7mdgq1zm25fkng3axl03iyrij976z7b8";
+ };
+
+ postPatch = ''
+ # there is no .git anyway
+ substituteInPlace build.gradle \
+ --replace "git = org.ajoberstar.grgit.Grgit.open(file('.'))" "" \
+ --replace "revision = git.head().id" "revision = 'abcdefgh'"
+
+ # disable gradle plugins with native code and their targets
+ perl -i.bak1 -pe "s#(^\s*id '.+' version '.+'$)#// \1#" build.gradle
+ perl -i.bak2 -pe "s#(.*)#// \1# if /^(buildscript|task portable|task nsis|task proguard|task tgz|task\(afterEclipseImport\)|launch4j|macAppBundle|buildRpm|buildDeb|shadowJar)/ ... /^}/" build.gradle
+
+ # fix source encoding
+ find . -type f -name build.gradle \
+ -exec perl -i.bak3 -pe "s#(repositories\.jcenter\(\))#
+ \1
+ compileJava.options.encoding = 'UTF-8'
+ compileTestJava.options.encoding = 'UTF-8'
+ #" {} \;
+ '';
+
+ # fake build to pre-download deps into fixed-output derivation
+ deps = stdenv.mkDerivation {
+ name = "${name}-deps";
+ inherit src postPatch;
+ nativeBuildInputs = [ gradle_3_5 perl ];
+ buildPhase = ''
+ export GRADLE_USER_HOME=$(mktemp -d)
+ gradle --no-daemon build
+ '';
+ # perl code mavenizes pathes (com.squareup.okio/okio/1.13.0/a9283170b7305c8d92d25aff02a6ab7e45d06cbe/okio-1.13.0.jar -> com/squareup/okio/okio/1.13.0/okio-1.13.0.jar)
+ installPhase = ''
+ find $GRADLE_USER_HOME/caches/modules-2 -type f -regex '.*\.\(jar\|pom\)' \
+ | perl -pe 's#(.*/([^/]+)/([^/]+)/([^/]+)/[0-9a-f]{30,40}/([^/\s]+))$# ($x = $2) =~ tr|\.|/|; "install -Dm444 $1 \$out/$x/$3/$4/$5" #e' \
+ | sh
+ '';
+ outputHashAlgo = "sha256";
+ outputHashMode = "recursive";
+ outputHash = "199a9rc1pp9jjwpy83743qhjczfz0d1mkbic6si9bh8l62nw8qc7";
+ };
+
+in stdenv.mkDerivation {
+ inherit name src postPatch;
+ nativeBuildInputs = [ gradle_3_5 perl makeWrapper ];
+
+ buildPhase = ''
+ export GRADLE_USER_HOME=$(mktemp -d)
+
+ # point to offline repo
+ find . -type f -name build.gradle \
+ -exec perl -i.bak3 -pe "s#repositories\.jcenter\(\)#
+ repositories { mavenLocal(); maven { url '${deps}' } }
+ #" {} \;
+
+ gradle --offline --no-daemon build
+ '';
+
+ installPhase = ''
+ mkdir $out
+ tar xvf build/distributions/mucommander-${version}.tar --directory=$out --strip=1
+ wrapProgram $out/bin/mucommander --set JAVA_HOME ${jre}
+ '';
+
+ meta = with stdenv.lib; {
+ homepage = http://www.mucommander.com/;
+ description = "Cross-platform file manager";
+ license = licenses.gpl3;
+ maintainers = with maintainers; [ volth ];
+ platforms = platforms.all;
+ };
+}
diff --git a/pkgs/applications/misc/st/default.nix b/pkgs/applications/misc/st/default.nix
index 825a37faf1ef..c7512a8ac271 100644
--- a/pkgs/applications/misc/st/default.nix
+++ b/pkgs/applications/misc/st/default.nix
@@ -1,5 +1,5 @@
-{ stdenv, fetchurl, pkgconfig, writeText, libX11, ncurses, libXext, libXft
-, fontconfig, conf ? null, patches ? [], extraLibs ? []}:
+{ stdenv, fetchurl, pkgconfig, writeText, makeWrapper, libX11, ncurses, libXext
+, libXft, fontconfig, dmenu, conf ? null, patches ? [], extraLibs ? []}:
with stdenv.lib;
@@ -17,11 +17,12 @@ in stdenv.mkDerivation rec {
configFile = optionalString (conf!=null) (writeText "config.def.h" conf);
preBuild = optionalString (conf!=null) "cp ${configFile} config.def.h";
- nativeBuildInputs = [ pkgconfig ];
+ nativeBuildInputs = [ pkgconfig makeWrapper ];
buildInputs = [ libX11 ncurses libXext libXft fontconfig ] ++ extraLibs;
installPhase = ''
TERMINFO=$out/share/terminfo make install PREFIX=$out
+ wrapProgram "$out/bin/st" --prefix PATH : "${dmenu}/bin"
'';
meta = {
diff --git a/pkgs/applications/networking/instant-messengers/telegram/tdesktop/default.nix b/pkgs/applications/networking/instant-messengers/telegram/tdesktop/default.nix
index adf718a70ea1..afba9ab022ad 100644
--- a/pkgs/applications/networking/instant-messengers/telegram/tdesktop/default.nix
+++ b/pkgs/applications/networking/instant-messengers/telegram/tdesktop/default.nix
@@ -1,21 +1,18 @@
{ qt5, stdenv }:
-let mkTelegram = args: qt5.callPackage (import ./generic.nix args) { };
-in {
- stable = mkTelegram {
+let
+ mkTelegram = args: qt5.callPackage (import ./generic.nix args) { };
+ stableVersion = {
stable = true;
- version = "1.2.6";
- sha256Hash = "15g0m2wwqfp13wd7j31p8cx1kpylx5m8ljaksnsqdkgyr9l1ar8w";
+ version = "1.2.14";
+ sha256Hash = "1412bls4qmfsa4nlqrxrc1j1jslhj6rhg8k69blhks9grrz36s1l";
# svn log svn://svn.archlinux.org/community/telegram-desktop/trunk
- archPatchesRevision = "283641";
- archPatchesHash = "0v4213vrabfa2dmwnqgb8n6hl54938mw9glaim3amyslxphmdrfb";
+ archPatchesRevision = "310557";
+ archPatchesHash = "1v134dal3xiapgh3akfr61vh62j24m9vkb62kckwvap44iqb0hlk";
};
- preview = mkTelegram {
+in {
+ stable = mkTelegram stableVersion;
+ preview = mkTelegram (stableVersion // {
stable = false;
- version = "1.2.12";
- sha256Hash = "1b9qc4a14jqjl30z4bjh1zbqsmgl25kdp0hj8p7xbj34zlkzfw5m";
- # svn ls -v --depth empty svn://svn.archlinux.org/community/telegram-desktop/trunk
- archPatchesRevision = "308775";
- archPatchesHash = "0ggx64kdadrbd4bw5z0wi0fdg6hni7n9nxz9dp56p8hlw1wgpsls";
- };
+ });
}
diff --git a/pkgs/applications/networking/instant-messengers/telegram/tdesktop/generic.nix b/pkgs/applications/networking/instant-messengers/telegram/tdesktop/generic.nix
index 89bc3da56b8a..7027e70f0c88 100644
--- a/pkgs/applications/networking/instant-messengers/telegram/tdesktop/generic.nix
+++ b/pkgs/applications/networking/instant-messengers/telegram/tdesktop/generic.nix
@@ -117,16 +117,18 @@ mkDerivation rec {
# This is necessary to run Telegram in a pure environment.
wrapProgram $out/bin/telegram-desktop \
--prefix QT_PLUGIN_PATH : "${qtbase}/${qtbase.qtPluginPrefix}" \
+ --suffix XDG_DATA_DIRS : "${gtk3}/share/gsettings-schemas/${gtk3.name}/" \
--set XDG_RUNTIME_DIR "XDG-RUNTIME-DIR"
sed -i $out/bin/telegram-desktop \
-e "s,'XDG-RUNTIME-DIR',\"\''${XDG_RUNTIME_DIR:-/run/user/\$(id --user)}\","
'';
meta = {
- description = "Telegram Desktop messaging app";
+ description = "Telegram Desktop messaging app "
+ + (if stable then "(stable version)" else "(pre-release)");
license = licenses.gpl3;
platforms = [ "x86_64-linux" "i686-linux" ];
homepage = https://desktop.telegram.org/;
- maintainers = with maintainers; [ abbradar garbas primeos ];
+ maintainers = with maintainers; [ primeos abbradar garbas ];
};
}
diff --git a/pkgs/applications/networking/sync/rclone/default.nix b/pkgs/applications/networking/sync/rclone/default.nix
index 71df7a0fb1e7..aa2a971b15f6 100644
--- a/pkgs/applications/networking/sync/rclone/default.nix
+++ b/pkgs/applications/networking/sync/rclone/default.nix
@@ -2,7 +2,7 @@
buildGoPackage rec {
name = "rclone-${version}";
- version = "1.39";
+ version = "1.40";
goPackagePath = "github.com/ncw/rclone";
@@ -10,7 +10,7 @@ buildGoPackage rec {
owner = "ncw";
repo = "rclone";
rev = "v${version}";
- sha256 = "1x9qxhqkbyd7kd52ai9p996ppslh73xarn5w4ljaa97wwm5vwwsg";
+ sha256 = "01q9g5g4va1s91xzvxpq8lj9jcrbl66cik383cpxwmcv04qcqgw9";
};
outputs = [ "bin" "out" "man" ];
diff --git a/pkgs/build-support/vm/default.nix b/pkgs/build-support/vm/default.nix
index 8ab1fbc88731..49588a589937 100644
--- a/pkgs/build-support/vm/default.nix
+++ b/pkgs/build-support/vm/default.nix
@@ -941,8 +941,8 @@ rec {
};
ubuntu1710i386 = {
- name = "ubuntu-17.10-xenial-i386";
- fullName = "Ubuntu 17.10 Xenial (i386)";
+ name = "ubuntu-17.10-artful-i386";
+ fullName = "Ubuntu 17.10 Artful (i386)";
packagesLists =
[ (fetchurl {
url = mirror://ubuntu/dists/artful/main/binary-i386/Packages.xz;
diff --git a/pkgs/desktops/gnome-3/core/libgee/default.nix b/pkgs/desktops/gnome-3/core/libgee/default.nix
index a5ce9ee5e105..a65d0f401f0e 100644
--- a/pkgs/desktops/gnome-3/core/libgee/default.nix
+++ b/pkgs/desktops/gnome-3/core/libgee/default.nix
@@ -6,6 +6,8 @@ in
stdenv.mkDerivation rec {
name = "${pname}-${version}";
+ outputs = [ "out" "dev" ];
+
src = fetchurl {
url = "mirror://gnome/sources/${pname}/${gnome3.versionBranch version}/${name}.tar.xz";
sha256 = "0c26x8gi3ivmhlbqcmiag4jwrkvcy28ld24j55nqr3jikb904a5v";
@@ -13,11 +15,12 @@ stdenv.mkDerivation rec {
doCheck = true;
- patches = [ ./fix_introspection_paths.patch ];
-
nativeBuildInputs = [ pkgconfig autoconf vala gobjectIntrospection ];
buildInputs = [ glib ];
+ PKG_CONFIG_GOBJECT_INTROSPECTION_1_0_GIRDIR = "${placeholder "dev"}/share/gir-1.0";
+ PKG_CONFIG_GOBJECT_INTROSPECTION_1_0_TYPELIBDIR = "${placeholder "out"}/lib/girepository-1.0";
+
passthru = {
updateScript = gnome3.updateScript {
packageName = pname;
diff --git a/pkgs/desktops/gnome-3/core/libgee/fix_introspection_paths.patch b/pkgs/desktops/gnome-3/core/libgee/fix_introspection_paths.patch
deleted file mode 100644
index 67003f451645..000000000000
--- a/pkgs/desktops/gnome-3/core/libgee/fix_introspection_paths.patch
+++ /dev/null
@@ -1,13 +0,0 @@
---- fix_introspection_paths.patch/configure 2014-01-07 17:43:53.521339338 +0000
-+++ fix_introspection_paths.patch/configure-fix 2014-01-07 17:45:11.068635069 +0000
-@@ -12085,8 +12085,8 @@
- INTROSPECTION_SCANNER=`$PKG_CONFIG --variable=g_ir_scanner gobject-introspection-1.0`
- INTROSPECTION_COMPILER=`$PKG_CONFIG --variable=g_ir_compiler gobject-introspection-1.0`
- INTROSPECTION_GENERATE=`$PKG_CONFIG --variable=g_ir_generate gobject-introspection-1.0`
-- INTROSPECTION_GIRDIR=`$PKG_CONFIG --variable=girdir gobject-introspection-1.0`
-- INTROSPECTION_TYPELIBDIR="$($PKG_CONFIG --variable=typelibdir gobject-introspection-1.0)"
-+ INTROSPECTION_GIRDIR="${datadir}/gir-1.0"
-+ INTROSPECTION_TYPELIBDIR="${libdir}/girepository-1.0"
- INTROSPECTION_CFLAGS=`$PKG_CONFIG --cflags gobject-introspection-1.0`
- INTROSPECTION_LIBS=`$PKG_CONFIG --libs gobject-introspection-1.0`
- INTROSPECTION_MAKEFILE=`$PKG_CONFIG --variable=datadir gobject-introspection-1.0`/gobject-introspection-1.0/Makefile.introspection
diff --git a/pkgs/development/interpreters/guile/1.8.nix b/pkgs/development/interpreters/guile/1.8.nix
index 6a2fdbdea436..cf42c9a7b683 100644
--- a/pkgs/development/interpreters/guile/1.8.nix
+++ b/pkgs/development/interpreters/guile/1.8.nix
@@ -24,19 +24,19 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ makeWrapper gawk pkgconfig ];
buildInputs = [ readline libtool ];
- propagatedBuildInputs = [ gmp ];
+ propagatedBuildInputs = [
+ gmp
+
+ # XXX: These ones aren't normally needed here, but `libguile*.la' has '-l'
+ # flags for them without corresponding '-L' flags. Adding them here will add
+ # the needed `-L' flags. As for why the `.la' file lacks the `-L' flags,
+ # see below.
+ libtool
+ ];
+
patches = [ ./cpp-4.5.patch ];
-
- postInstall = ''
- wrapProgram $out/bin/guile-snarf --prefix PATH : "${gawk}/bin"
- '';
-
- preBuild = ''
- sed -e '/lt_dlinit/a lt_dladdsearchdir("'$out/lib'");' -i libguile/dynl.c
- '';
-
# Guile needs patching to preset results for the configure tests
# about pthreads, which work only in native builds.
preConfigure = ''
@@ -45,6 +45,22 @@ stdenv.mkDerivation rec {
fi
'';
+ preBuild = ''
+ sed -e '/lt_dlinit/a lt_dladdsearchdir("'$out/lib'");' -i libguile/dynl.c
+ '';
+
+
+ postInstall = ''
+ wrapProgram $out/bin/guile-snarf --prefix PATH : "${gawk}/bin"
+ ''
+ # XXX: See http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/18903 for
+ # why `--with-libunistring-prefix' and similar options coming from
+ # `AC_LIB_LINKFLAGS_BODY' don't work on NixOS/x86_64.
+ + ''
+ sed -i "$out/lib/pkgconfig/guile"-*.pc \
+ -e "s|-lltdl|-L${libtool.lib}/lib -lltdl|g"
+ '';
+
# One test fails.
# ERROR: file: "libtest-asmobs", message: "file not found"
# This is fixed here:
diff --git a/pkgs/development/libraries/agda/agda-stdlib/default.nix b/pkgs/development/libraries/agda/agda-stdlib/default.nix
index 815e0f20b54e..c72572139c68 100644
--- a/pkgs/development/libraries/agda/agda-stdlib/default.nix
+++ b/pkgs/development/libraries/agda/agda-stdlib/default.nix
@@ -1,14 +1,14 @@
{ stdenv, agda, fetchFromGitHub, ghcWithPackages }:
agda.mkDerivation (self: rec {
- version = "0.14";
+ version = "0.15";
name = "agda-stdlib-${version}";
src = fetchFromGitHub {
repo = "agda-stdlib";
owner = "agda";
rev = "v${version}";
- sha256 = "0qx72w6lwskp18q608f95j5dcxb9xr4q4mzdkxp01sgib8v2v56l";
+ sha256 = "0c2vfib4fmljy98c3s3s7jmpjlqxvsbv7wf6qxr38kamwzbryrjj";
};
nativeBuildInputs = [ (ghcWithPackages (self : [ self.filemanip ])) ];
diff --git a/pkgs/development/libraries/asio/default.nix b/pkgs/development/libraries/asio/default.nix
index dae8657388f7..ad601359019e 100644
--- a/pkgs/development/libraries/asio/default.nix
+++ b/pkgs/development/libraries/asio/default.nix
@@ -1,11 +1,11 @@
{stdenv, fetchurl, boost, openssl}:
stdenv.mkDerivation rec {
- name = "asio-1.10.8";
+ name = "asio-1.12.0";
src = fetchurl {
url = "mirror://sourceforge/asio/${name}.tar.bz2";
- sha256 = "0jgdl4fxw0hwy768rl3lhdc0czz7ak7czf3dg10j21pdpfpfvpi6";
+ sha256 = "1bfk746kcs3cmvfvxjp3w9y6zpybjj8s002jjd3snrp2syd0nd9c";
};
propagatedBuildInputs = [ boost ];
diff --git a/pkgs/development/libraries/dlib/default.nix b/pkgs/development/libraries/dlib/default.nix
index 53ec9949f170..d3e2f6c9c983 100644
--- a/pkgs/development/libraries/dlib/default.nix
+++ b/pkgs/development/libraries/dlib/default.nix
@@ -3,14 +3,14 @@
}:
stdenv.mkDerivation rec {
- version = "19.9";
+ version = "19.10";
name = "dlib-${version}";
src = fetchFromGitHub {
owner = "davisking";
repo = "dlib";
rev ="v${version}";
- sha256 = "0lc54r928j9dg7f2wn25m887z24d31wrc14v2hn6aknp1z084lrc";
+ sha256 = "0sgxblf4n33b8wgblyblmrkwydvy1yh7fzll1b6c4zgkz675w0m5";
};
postPatch = ''
diff --git a/pkgs/development/libraries/fflas-ffpack/default.nix b/pkgs/development/libraries/fflas-ffpack/default.nix
index 0e4e897e27a4..edea352ae2dd 100644
--- a/pkgs/development/libraries/fflas-ffpack/default.nix
+++ b/pkgs/development/libraries/fflas-ffpack/default.nix
@@ -2,12 +2,12 @@
stdenv.mkDerivation rec {
name = "${pname}-${version}";
pname = "fflas-ffpack";
- version = "2.2.2";
+ version = "2.3.2";
src = fetchFromGitHub {
owner = "linbox-team";
repo = "${pname}";
rev = "v${version}";
- sha256 = "0k1f4pb7azrm6ajncvg7vni7ixfmn6fssd5ld4xddbi6jqbsf9rd";
+ sha256 = "1cqhassj2dny3gx0iywvmnpq8ca0d6m82xl5rz4mb8gaxr2kwddl";
};
nativeBuildInputs = [ autoreconfHook pkgconfig ];
buildInputs = [ givaro (liblapack.override {shared = true;}) openblas];
diff --git a/pkgs/development/libraries/libguestfs/default.nix b/pkgs/development/libraries/libguestfs/default.nix
index 258157c11789..106de68d367a 100644
--- a/pkgs/development/libraries/libguestfs/default.nix
+++ b/pkgs/development/libraries/libguestfs/default.nix
@@ -62,7 +62,7 @@ stdenv.mkDerivation rec {
ln -s ${appliance} $out/lib/guestfs
'';
- doInstallCheck = true;
+ doInstallCheck = appliance != null;
installCheckPhase = ''
export HOME=$(mktemp -d) # avoid access to /homeless-shelter/.guestfish
diff --git a/pkgs/development/libraries/libmypaint/default.nix b/pkgs/development/libraries/libmypaint/default.nix
index 0583d94ef7f4..8719f19acc1d 100644
--- a/pkgs/development/libraries/libmypaint/default.nix
+++ b/pkgs/development/libraries/libmypaint/default.nix
@@ -1,4 +1,4 @@
-{stdenv, autoconf, automake, fetchFromGitHub, glib, intltool, json_c, libtool, pkgconfig}:
+{stdenv, autoconf, automake, fetchFromGitHub, fetchpatch, glib, intltool, json_c, libtool, pkgconfig}:
let
version = "1.3.0";
@@ -12,6 +12,14 @@ in stdenv.mkDerivation rec {
sha256 = "0b7aynr6ggigwhjkfzi8x3dwz15blj4grkg9hysbgjh6lvzpy9jc";
};
+ patches = [
+ # build with automake 1.16
+ (fetchpatch {
+ url = https://github.com/mypaint/libmypaint/commit/40d9077a80be13942476f164bddfabe842ab2a45.patch;
+ sha256 = "1dclh7apgvr2bvzy9z3rgas3hk9pf2hpf5h52q94kmx8s4a47qpi";
+ })
+ ];
+
nativeBuildInputs = [ autoconf automake intltool libtool pkgconfig ];
buildInputs = [ glib ];
diff --git a/pkgs/development/libraries/pipewire/default.nix b/pkgs/development/libraries/pipewire/default.nix
index 90174bf749ad..57580de2401b 100644
--- a/pkgs/development/libraries/pipewire/default.nix
+++ b/pkgs/development/libraries/pipewire/default.nix
@@ -29,15 +29,13 @@ in stdenv.mkDerivation rec {
alsaLib ffmpeg libjack2 libudev libva xorg.libX11 sbc SDL2
];
- patches = [
- ./fix-paths.patch
- ];
-
mesonFlags = [
"-Denable_docs=true"
"-Denable_gstreamer=true"
];
+ PKG_CONFIG_SYSTEMD_SYSTEMDUSERUNITDIR = "${placeholder "out"}/lib/systemd/user";
+
FONTCONFIG_FILE = fontsConf; # Fontconfig error: Cannot load default config file
doCheck = true;
diff --git a/pkgs/development/libraries/pipewire/fix-paths.patch b/pkgs/development/libraries/pipewire/fix-paths.patch
deleted file mode 100644
index 5a07c6271e14..000000000000
--- a/pkgs/development/libraries/pipewire/fix-paths.patch
+++ /dev/null
@@ -1,8 +0,0 @@
---- a/src/daemon/systemd/user/meson.build
-+++ b/src/daemon/systemd/user/meson.build
-@@ -1,4 +1,4 @@
--systemd_user_services_dir = systemd.get_pkgconfig_variable('systemduserunitdir')
-+systemd_user_services_dir = join_paths(get_option('prefix'), 'etc', 'systemd', 'user')
-
- install_data(sources : 'pipewire.socket', install_dir : systemd_user_services_dir)
-
diff --git a/pkgs/development/libraries/spice-gtk/default.nix b/pkgs/development/libraries/spice-gtk/default.nix
index a626abc6577b..f9b3de36b2c4 100644
--- a/pkgs/development/libraries/spice-gtk/default.nix
+++ b/pkgs/development/libraries/spice-gtk/default.nix
@@ -19,23 +19,18 @@ in stdenv.mkDerivation rec {
};
buildInputs = [
- spice-protocol celt_0_5_1 openssl libpulseaudio pixman gobjectIntrospection
+ spice-protocol celt_0_5_1 openssl libpulseaudio pixman
libjpeg_turbo zlib cyrus_sasl python pygtk usbredir gtk3 epoxy
polkit acl usbutils
];
- nativeBuildInputs = [ pkgconfig gettext libsoup autoreconfHook vala ];
+ nativeBuildInputs = [ pkgconfig gettext libsoup autoreconfHook vala gobjectIntrospection ];
- NIX_CFLAGS_COMPILE = "-fno-stack-protector";
-
- # put polkit action in the $out/share/polkit-1/actions
- preAutoreconf = ''
- substituteInPlace configure.ac \
- --replace 'POLICYDIR=`''${PKG_CONFIG} polkit-gobject-1 --variable=policydir`' "POLICYDIR=$out/share/polkit-1/actions"
- '';
+ PKG_CONFIG_POLKIT_GOBJECT_1_POLICYDIR = "${placeholder "out"}/share/polkit-1/actions";
configureFlags = [
"--with-gtk3"
+ "--enable-introspection"
"--enable-vala"
];
diff --git a/pkgs/development/mobile/xcodeenv/build-app.nix b/pkgs/development/mobile/xcodeenv/build-app.nix
index d208f26ab670..a94f2745894b 100644
--- a/pkgs/development/mobile/xcodeenv/build-app.nix
+++ b/pkgs/development/mobile/xcodeenv/build-app.nix
@@ -12,6 +12,7 @@
, certificateFile ? null
, certificatePassword ? null
, provisioningProfile ? null
+, signMethod ? null
, generateIPA ? false
, generateXCArchive ? false
, enableWirelessDistribution ? false
@@ -21,7 +22,7 @@
, title ? null
}:
-assert release -> codeSignIdentity != null && certificateFile != null && certificatePassword != null && provisioningProfile != null;
+assert release -> codeSignIdentity != null && certificateFile != null && certificatePassword != null && provisioningProfile != null && signMethod != null;
assert enableWirelessDistribution -> installURL != null && bundleId != null && version != null && title != null;
let
@@ -82,13 +83,34 @@ stdenv.mkDerivation {
# Do the building
export LD=clang # To avoid problem with -isysroot parameter that is unrecognized by the stock ld. Comparison with an impure build shows that it uses clang instead. Ugly, but it works
- xcodebuild -target ${_target} -configuration ${_configuration} ${stdenv.lib.optionalString (scheme != null) "-scheme ${scheme}"} -sdk ${_sdk} TARGETED_DEVICE_FAMILY="1, 2" ONLY_ACTIVE_ARCH=NO CONFIGURATION_TEMP_DIR=$TMPDIR CONFIGURATION_BUILD_DIR=$out ${if generateXCArchive then "archive" else ""} ${xcodeFlags} ${if release then ''"CODE_SIGN_IDENTITY=${codeSignIdentity}" PROVISIONING_PROFILE=$PROVISIONING_PROFILE OTHER_CODE_SIGN_FLAGS="--keychain $HOME/Library/Keychains/$keychainName-db"'' else ""}
+ xcodebuild -target ${_target} -configuration ${_configuration} ${stdenv.lib.optionalString (scheme != null) "-scheme ${scheme}"} -sdk ${_sdk} TARGETED_DEVICE_FAMILY="1, 2" ONLY_ACTIVE_ARCH=NO CONFIGURATION_TEMP_DIR=$TMPDIR CONFIGURATION_BUILD_DIR=$out ${if generateIPA || generateXCArchive then "-archivePath \"${name}.xcarchive\" archive" else ""} ${if release then ''PROVISIONING_PROFILE=$PROVISIONING_PROFILE OTHER_CODE_SIGN_FLAGS="--keychain $HOME/Library/Keychains/$keychainName-db"'' else ""} ${xcodeFlags}
${stdenv.lib.optionalString release ''
${stdenv.lib.optionalString generateIPA ''
+ # Create export plist file
+ cat > "${name}.plist" <
+
+
+
+ provisioningProfiles
+
+ ${bundleId}
+ $PROVISIONING_PROFILE
+
+ method
+ ${signMethod}
+ ${stdenv.lib.optionalString (signMethod == "enterprise" || signMethod == "ad-hoc") ''
+ compileBitcode
+
+ ''}
+
+
+ EOF
+
# Produce an IPA file
- xcrun -sdk iphoneos PackageApplication -v $out/*.app -o "$out/${name}.ipa"
-
+ xcodebuild -exportArchive -archivePath "${name}.xcarchive" -exportOptionsPlist "${name}.plist" -exportPath $out
+
# Add IPA to Hydra build products
mkdir -p $out/nix-support
echo "file binary-dist \"$(echo $out/*.ipa)\"" > $out/nix-support/hydra-build-products
@@ -99,6 +121,10 @@ stdenv.mkDerivation {
echo "doc install \"$out/$appname.html\"" >> $out/nix-support/hydra-build-products
''}
''}
+ ${stdenv.lib.optionalString generateXCArchive ''
+ mkdir -p $out
+ mv "${name}.xcarchive" $out
+ ''}
# Delete our temp keychain
${deleteKeychain}
diff --git a/pkgs/development/python-modules/notebook/default.nix b/pkgs/development/python-modules/notebook/default.nix
index d4e7de2872d4..37c5774bba25 100644
--- a/pkgs/development/python-modules/notebook/default.nix
+++ b/pkgs/development/python-modules/notebook/default.nix
@@ -24,16 +24,16 @@
buildPythonPackage rec {
pname = "notebook";
- version = "5.4.0";
+ version = "5.4.1";
src = fetchPypi {
inherit pname version;
- sha256 = "dd431fad9bdd25aa9ff8265da096ef770475e21bf1d327982611a7de5cd904ca";
+ sha256 = "01l6yp78sp27vns4cxh8ybr7x0pixxn97cp0i3w6s0lv1v8l6qbx";
};
LC_ALL = "en_US.utf8";
- buildInputs = [ nose glibcLocales ]
+ checkInputs = [ nose glibcLocales ]
++ (if isPy3k then [ nose_warnings_filters ] else [ mock ]);
propagatedBuildInputs = [
@@ -44,8 +44,8 @@ buildPythonPackage rec {
# disable warning_filters
preCheck = lib.optionalString (!isPy3k) ''
echo "" > setup.cfg
- cat setup.cfg
'';
+
checkPhase = ''
runHook preCheck
mkdir tmp
diff --git a/pkgs/development/tools/haskell/hyper-haskell/default.nix b/pkgs/development/tools/haskell/hyper-haskell/default.nix
new file mode 100644
index 000000000000..31697750a702
--- /dev/null
+++ b/pkgs/development/tools/haskell/hyper-haskell/default.nix
@@ -0,0 +1,50 @@
+{ stdenv, fetchFromGitHub, writeText, jshon, electron, hyper-haskell-server, extra-packages ? [] }:
+
+let
+ binPath = stdenv.lib.makeBinPath ([ hyper-haskell-server ] ++ extra-packages);
+
+in stdenv.mkDerivation rec {
+ name = "hyper-haskell-${version}";
+ version = "0.1.0.2";
+
+ src = fetchFromGitHub {
+ owner = "HeinrichApfelmus";
+ repo = "hyper-haskell";
+ rev = "v${version}";
+ sha256 = "1k38h7qx12z7463z8466pji0nwfkp4qkg7q83kns2mzmwmw5jnmb";
+ };
+
+ propagatedBuildInputs = extra-packages;
+
+ buildCommand = ''
+ mkdir -p $out/bin $out/share/hyper-haskell/worksheets $out/share/applications $out/share/icons/hicolor/scalable/apps $out/share/mime/packages
+
+ # Electron app
+ cp -R $src/app $out
+
+ # Desktop Launcher
+ cp $src/resources/hyper-haskell.desktop $out/share/applications/hyper-haskell.desktop
+ cp $src/resources/icons/icon.svg $out/share/icons/hicolor/scalable/apps/hyper-haskell.svg
+ cp $src/resources/shared-mime-info.xml $out/share/mime/packages/hyper-haskell.xml
+
+ # install example worksheets with backend set to nix
+ for worksheet in "$src/worksheets/"*.hhs; do
+ ${jshon}/bin/jshon -e settings -s nix -i packageTool -p < $worksheet > $out/share/hyper-haskell/worksheets/`basename $worksheet`
+ done
+
+ # install electron wrapper script
+ cat > $out/bin/hyper-haskell < libseccomp != null;
-let version = "9.12.0"; in
+let version = "9.12.1"; in
stdenv.mkDerivation rec {
name = "bind-${version}";
src = fetchurl {
url = "http://ftp.isc.org/isc/bind9/${version}/${name}.tar.gz";
- sha256 = "10iwkghl5g50b7wc17bsb9wa0dh2gd57bjlk6ynixhywz6dhx1r9";
+ sha256 = "043mjcw405qa0ghm5dkhfsq35gsy279724fz3mjqpr1mbi14dr0n";
};
outputs = [ "out" "lib" "dev" "man" "dnsutils" "host" ];
diff --git a/pkgs/servers/nextcloud/news-updater.nix b/pkgs/servers/nextcloud/news-updater.nix
index a78b3d59095e..0fcb5047549d 100644
--- a/pkgs/servers/nextcloud/news-updater.nix
+++ b/pkgs/servers/nextcloud/news-updater.nix
@@ -2,11 +2,11 @@
python3Packages.buildPythonApplication rec {
name = "nextcloud-news-updater-${version}";
- version = "10.0.0";
+ version = "10.0.1";
src = fetchurl {
url = "mirror://pypi/n/nextcloud_news_updater/nextcloud_news_updater-${version}.tar.gz";
- sha256 = "00pscz0p4s10y1ymb6sm0gx4a5wdbhimn30582x8i28n58nnl8j0";
+ sha256 = "14jj3w417wfsm1ki34d980b0s6vfn8i29g4c66qb2fizdq1d0z6q";
};
doCheck = false;
diff --git a/pkgs/servers/openpts/bugs.patch b/pkgs/servers/openpts/bugs.patch
deleted file mode 100644
index d818bafbc9f3..000000000000
--- a/pkgs/servers/openpts/bugs.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-diff -urNp openpts-0.2.6-cvs-patched/src/fsm.c openpts-0.2.6-current/src/fsm.c
---- openpts-0.2.6-cvs-patched/src/fsm.c 2012-01-05 03:49:15.000000000 -0500
-+++ openpts-0.2.6-current/src/fsm.c 2012-01-09 12:11:17.338706205 -0500
-@@ -934,7 +934,7 @@ char *getEventString(OPENPTS_PCR_EVENT_W
- /* event */
- event = eventWrapper->event;
- if (event != NULL) {
-- // len = snprintf(buf, size, "PCR[%d],TYPE=%d", (int)event->ulPcrIndex, event->eventType);
-+ snprintf(buf, size, "PCR[%d],TYPE=%d", (int)event->ulPcrIndex, event->eventType);
- } else {
- LOG(LOG_ERR, "NULL event\n"); // TODO(munetoh)
- xfree(buf);
diff --git a/pkgs/servers/openpts/default.nix b/pkgs/servers/openpts/default.nix
deleted file mode 100644
index 27731af3803e..000000000000
--- a/pkgs/servers/openpts/default.nix
+++ /dev/null
@@ -1,54 +0,0 @@
-{ stdenv, fetchurl, autoconf, automake, pkgconfig, libtool, trousers, openssl, libxml2, libuuid, gettext, perl }:
-
-stdenv.mkDerivation rec {
- name = "openpts-${version}";
- version = "0.2.6";
-
- src = fetchurl {
- url = "http://jaist.dl.osdn.jp/openpts/54410/openpts-${version}.tar.gz";
- sha256 = "1b5phshl49fxr5y3g5zz75gm0n4cw8i7n29x5f1a95xkwrjpazi0";
- };
-
- # patches from https://apps.fedoraproject.org/packages/openpts/sources/patches/
- patches = [ ./bugs.patch ./zlib.patch ./tboot.patch ./ptsc.patch ];
-
- nativeBuildInputs = [ pkgconfig ];
- buildInputs = [ autoconf automake libtool trousers openssl libxml2 libuuid gettext ];
-
- preConfigure = ''
- substituteInPlace include/Makefile.am --replace "./cvs2msg.pl" "${perl}/bin/perl cvs2msg.pl";
- $SHELL bootstrap.sh
- '';
-
- configureFlags = [ "--with-tss" "--with-aru" "--with-tboot" "--enable-tnc" "--with-aide" ];
-
- NIX_CFLAGS_COMPILE = "-I${trousers}/include/trousers -I${trousers}/include/tss -Wno-deprecated-declarations";
-
- preInstall = ''
- mkdir -p $out
- mkdir -p $out/etc
- cp -p dist/ptsc.conf.in $out/etc/ptsc.conf
- cp -p dist/ptsv.conf.in $out/etc/ptsv.conf
- mkdir -p $out/share/openpts/models
- cp -p models/*.uml $out/share/openpts/models/
-
- mkdir -p $out/share/openpts/tpm_emulator
- cp dist/tpm_emulator/README.rhel $out/share/openpts/tpm_emulator/README
- cp dist/tpm_emulator/binary_bios_measurements $out/share/openpts/tpm_emulator/
- cp dist/tpm_emulator/tcsd $out/share/openpts/tpm_emulator/
-
- mkdir -p $out/share/openpts/tboot
- cp dist/tboot/README.fedora15 $out/share/openpts/tboot/README
- cp dist/tboot/ptsc.conf.fedora15 $out/share/openpts/tboot/ptsc.conf
- cp dist/tboot/tcsd.conf.fedora15 $out/share/openpts/tboot/tcsd.conf
- cp dist/tboot/tcsd.fedora15 $out/share/openpts/tboot/tcsd
- '';
-
- meta = {
- description = "TCG Platform Trust Service (PTS)";
- homepage = http://sourceforge.jp/projects/openpts;
- license = stdenv.lib.licenses.cpl10;
- platforms = stdenv.lib.platforms.linux;
- maintainers = with stdenv.lib.maintainers; [ tstrobel ];
- };
-}
diff --git a/pkgs/servers/openpts/ptsc.patch b/pkgs/servers/openpts/ptsc.patch
deleted file mode 100644
index b6fcde740744..000000000000
--- a/pkgs/servers/openpts/ptsc.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-diff -urNp openpts-0.2.6-patched/src/ptsc.c openpts-0.2.6-current/src/ptsc.c
---- openpts-0.2.6-patched/src/ptsc.c 2012-08-21 15:57:07.733841433 -0400
-+++ openpts-0.2.6-current/src/ptsc.c 2012-08-21 16:13:26.479732504 -0400
-@@ -457,7 +457,10 @@ void ptsc_lock(void) {
- exit(1);
- }
- oldgrp = getegid();
-- setegid(grp.gr_gid);
-+ if(setegid(grp.gr_gid) != 0){
-+ LOG(LOG_ERR, "setegid fail");
-+ exit(1);
-+ }
- }
-
- oldmask = umask(0);
-@@ -467,7 +470,10 @@ void ptsc_lock(void) {
- }
- if (grpent) {
- chmod(LOCK_DIR, 02775);
-- setegid(oldgrp);
-+ if(setegid(oldgrp) != 0){
-+ LOG(LOG_ERR, "setegid fail");
-+ exit(1);
-+ }
- }
- fd = open(LOCK_FILE, O_RDWR | O_CREAT | O_TRUNC, 0660);
- if (fd < 0) {
-
diff --git a/pkgs/servers/openpts/tboot.patch b/pkgs/servers/openpts/tboot.patch
deleted file mode 100644
index 6ecee5839202..000000000000
--- a/pkgs/servers/openpts/tboot.patch
+++ /dev/null
@@ -1,21 +0,0 @@
-diff -urNp openpts-0.2.6-patched/src/tboot2iml.c openpts-0.2.6-current/src/tboot2iml.c
---- openpts-0.2.6-patched/src/tboot2iml.c 2012-07-23 16:30:12.381361421 -0400
-+++ openpts-0.2.6-current/src/tboot2iml.c 2012-07-23 17:25:59.053945778 -0400
-@@ -531,7 +531,7 @@ int sinit_acm_hash(char *filename, int s
-
-
- int sha1sum_unzip(char *filename, int *filesize, BYTE *digest) {
-- FILE *fp;
-+ gzFile fp;
- char buf[2048];
- SHA_CTX sha_ctx;
- int len;
-@@ -541,7 +541,7 @@ int sha1sum_unzip(char *filename, int *f
-
- /* open */
- fp = gzopen(filename, "rb");
-- if (fp == NULL) {
-+ if (fp == Z_NULL) {
- LOG(LOG_ERR, "File %s does not exist\n", filename);
- return 0;
- }
diff --git a/pkgs/servers/openpts/zlib.patch b/pkgs/servers/openpts/zlib.patch
deleted file mode 100644
index 7fa3fce10fe9..000000000000
--- a/pkgs/servers/openpts/zlib.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-diff -urNp openpts-0.2.6-cvs-patched/src/Makefile.am openpts-0.2.6-current/src/Makefile.am
---- openpts-0.2.6-cvs-patched/src/Makefile.am 2012-01-05 03:49:15.000000000 -0500
-+++ openpts-0.2.6-current/src/Makefile.am 2012-01-09 14:12:02.507361732 -0500
-@@ -30,7 +30,7 @@ localedir = $(datadir)/locale
-
-
- AM_CPPFLAGS = -I$(top_srcdir)/include $(LIBXML2_CFLAGS) $(TSS_CFLAGS) -I../include -DLOCALEDIR=\"$(localedir)\"
--AM_LDFLAGS = $(LIBXML2_LIBS) $(LIBCRYPTO_LIBS) $(TSS_LIBS) -lopenpts
-+AM_LDFLAGS = $(LIBXML2_LIBS) $(LIBCRYPTO_LIBS) $(TSS_LIBS) -lz -lopenpts
- # $(LIBINTL) -lopenpts
-
- if HAVE_LIBUUID
diff --git a/pkgs/servers/serviio/default.nix b/pkgs/servers/serviio/default.nix
new file mode 100644
index 000000000000..876cc01592e9
--- /dev/null
+++ b/pkgs/servers/serviio/default.nix
@@ -0,0 +1,30 @@
+{ stdenv, fetchurl }:
+
+stdenv.mkDerivation rec {
+ name = "serviio-${version}";
+ version = "1.9";
+
+ src = fetchurl {
+ url = "http://download.serviio.org/releases/${name}-linux.tar.gz";
+ sha256 = "0vi9dwpdrk087gpi0xib0hwpvdmaf9g99nfdfx2r3wmmdzw7wysl";
+ };
+
+ phases = ["unpackPhase" "installPhase"];
+
+ installPhase = ''
+ mkdir -p $out
+ cp -R config legal lib library plugins LICENCE.txt NOTICE.txt README.txt RELEASE_NOTES.txt $out
+ '';
+
+ meta = with stdenv.lib; {
+ homepage = http://serviio.org;
+ description = "UPnP Media Streaming Server";
+ longDescription = ''
+ Serviio is a free media server. It allows you to stream your media files (music, video or images)
+ to any DLNA-certified renderer device (e.g. a TV set, Bluray player, games console) on your home network.
+ '';
+ license = licenses.unfree;
+ maintainers = [ maintainers.thpham ];
+ platforms = platforms.linux;
+ };
+}
\ No newline at end of file
diff --git a/pkgs/servers/xmpp/prosody/default.nix b/pkgs/servers/xmpp/prosody/default.nix
index b0e3492c0da1..2d0e1a529dac 100644
--- a/pkgs/servers/xmpp/prosody/default.nix
+++ b/pkgs/servers/xmpp/prosody/default.nix
@@ -1,14 +1,13 @@
{ stdenv, fetchurl, libidn, openssl, makeWrapper, fetchhg
, lua5, luasocket, luasec, luaexpat, luafilesystem, luabitop
, withLibevent ? true, luaevent ? null
-, withZlib ? true, luazlib ? null
, withDBI ? true, luadbi ? null
# use withExtraLibs to add additional dependencies of community modules
, withExtraLibs ? [ ]
+, withOnlyInstalledCommunityModules ? [ ]
, withCommunityModules ? [ ] }:
assert withLibevent -> luaevent != null;
-assert withZlib -> luazlib != null;
assert withDBI -> luadbi != null;
with stdenv.lib;
@@ -16,7 +15,6 @@ with stdenv.lib;
let
libs = [ luasocket luasec luaexpat luafilesystem luabitop ]
++ optional withLibevent luaevent
- ++ optional withZlib luazlib
++ optional withDBI luadbi
++ withExtraLibs;
getPath = lib : type : "${lib}/lib/lua/${lua5.luaversion}/?.${type};${lib}/share/lua/${lua5.luaversion}/?.${type}";
@@ -27,21 +25,22 @@ let
in
stdenv.mkDerivation rec {
- version = "0.9.12";
+ version = "0.10.0";
name = "prosody-${version}";
src = fetchurl {
url = "http://prosody.im/downloads/source/${name}.tar.gz";
- sha256 = "139yxqpinajl32ryrybvilh54ddb1q6s0ajjhlcs4a0rnwia6n8s";
+ sha256 = "1644jy5dk46vahmh6nna36s79k8k668sbi3qamjb4q3c4m3y853l";
};
communityModules = fetchhg {
url = "https://hg.prosody.im/prosody-modules";
- rev = "9a3e51f348fe";
- sha256 = "09g4vi52rv0r3jzcm0bsgp4ngqq6iapfbxfh0l7qj36qnajp4vm6";
+ rev = "150a7bd59043";
+ sha256 = "0nfx3lngcy88nd81gb7v4kh3nz1bzsm67bxgpd2lprk54diqcrz1";
};
- buildInputs = [ lua5 makeWrapper libidn openssl ];
+ buildInputs = [ lua5 makeWrapper libidn openssl ]
+ ++ optional withDBI luadbi;
configureFlags = [
"--ostype=linux"
@@ -52,7 +51,7 @@ stdenv.mkDerivation rec {
postInstall = ''
${concatMapStringsSep "\n" (module: ''
cp -r $communityModules/mod_${module} $out/lib/prosody/modules/
- '') withCommunityModules}
+ '') (withCommunityModules ++ withOnlyInstalledCommunityModules)}
wrapProgram $out/bin/prosody \
--set LUA_PATH '${luaPath};' \
--set LUA_CPATH '${luaCPath};'
@@ -62,11 +61,13 @@ stdenv.mkDerivation rec {
--set LUA_CPATH '${luaCPath};'
'';
+ passthru.communityModules = withCommunityModules;
+
meta = {
description = "Open-source XMPP application server written in Lua";
license = licenses.mit;
- homepage = http://www.prosody.im;
+ homepage = https://prosody.im;
platforms = platforms.linux;
- maintainers = [ ];
+ maintainers = with maintainers; [ fpletz globin ];
};
}
diff --git a/pkgs/tools/misc/colord/default.nix b/pkgs/tools/misc/colord/default.nix
index 9af7de8b35e4..043ea44bb8c8 100644
--- a/pkgs/tools/misc/colord/default.nix
+++ b/pkgs/tools/misc/colord/default.nix
@@ -1,18 +1,16 @@
{ stdenv, fetchurl, bash-completion
, glib, polkit, pkgconfig, gettext, gusb, lcms2, sqlite, systemd, dbus
-, gobjectIntrospection, argyllcms, meson, ninja, libxml2, vala_0_38
+, gobjectIntrospection, argyllcms, meson, ninja, libxml2, vala_0_40
, libgudev, sane-backends, udev, gnome3, makeWrapper }:
stdenv.mkDerivation rec {
- name = "colord-1.4.1";
+ name = "colord-1.4.2";
src = fetchurl {
url = "http://www.freedesktop.org/software/colord/releases/${name}.tar.xz";
- sha256 = "0m854clp8szvq38z16jpazzlqfb3lb3icxcfnsisfrc25748y1ib";
+ sha256 = "19zc9gldz469jshl16av7na459kwr5nhvs2pz98xm5lw582xaw2c";
};
- enableParallelBuilding = true;
-
mesonFlags = [
"-Denable-sane=true"
"-Denable-vala=true"
@@ -23,19 +21,20 @@ stdenv.mkDerivation rec {
"-Denable-docs=false"
];
- patches = [
- ./fix-build-paths.patch
- ];
+ nativeBuildInputs = [ meson pkgconfig vala_0_40 ninja gettext libxml2 gobjectIntrospection makeWrapper ];
- nativeBuildInputs = [ meson pkgconfig vala_0_38 ninja gettext libxml2 gobjectIntrospection makeWrapper ];
-
- buildInputs = [ glib polkit gusb lcms2 sqlite systemd dbus
- bash-completion argyllcms libgudev sane-backends ];
+ buildInputs = [ glib polkit gusb lcms2 sqlite systemd dbus bash-completion argyllcms libgudev sane-backends ];
postInstall = ''
glib-compile-schemas $out/share/glib-2.0/schemas
'';
+ PKG_CONFIG_SYSTEMD_SYSTEMDSYSTEMUNITDIR = "${placeholder "out"}/lib/systemd/system";
+ PKG_CONFIG_SYSTEMD_SYSTEMDUSERUNITDIR = "${placeholder "out"}/lib/systemd/user";
+ PKG_CONFIG_SYSTEMD_TMPFILESDIR = "${placeholder "out"}/lib/tmpfiles.d";
+ PKG_CONFIG_BASH_COMPLETION_COMPLETIONSDIR= "${placeholder "out"}/share/bash-completion/completions";
+ PKG_CONFIG_UDEV_UDEVDIR = "${placeholder "out"}/lib/udev";
+
postFixup = ''
wrapProgram "$out/libexec/colord-session" \
--prefix XDG_DATA_DIRS : "$GSETTINGS_SCHEMAS_PATH:$out/share" \
diff --git a/pkgs/tools/misc/colord/fix-build-paths.patch b/pkgs/tools/misc/colord/fix-build-paths.patch
deleted file mode 100644
index d4bf0f36ad74..000000000000
--- a/pkgs/tools/misc/colord/fix-build-paths.patch
+++ /dev/null
@@ -1,74 +0,0 @@
---- a/contrib/session-helper/meson.build
-+++ b/contrib/session-helper/meson.build
-@@ -21,7 +21,7 @@
- output : 'colord-session.service',
- configuration : con2,
- install: true,
-- install_dir: systemd.get_pkgconfig_variable('systemduserunitdir'),
-+ install_dir: join_paths(get_option('prefix'), 'etc', 'systemd', 'user'),
- )
- endif
-
---- a/data/meson.build
-+++ b/data/meson.build
-@@ -8,13 +8,13 @@
-
- if get_option('enable-systemd')
- install_data('colord.conf',
-- install_dir: systemd.get_pkgconfig_variable('tmpfilesdir')
-+ install_dir: join_paths(get_option('prefix'), 'lib', 'tmpfiles.d')
- )
- endif
-
- if get_option('enable-bash-completion')
- install_data('colormgr',
-- install_dir: bash_completion.get_pkgconfig_variable('completionsdir')
-+ install_dir: join_paths(get_option('prefix'), 'etc', 'bash_completion.d')
- )
- endif
-
-@@ -31,7 +31,7 @@
- output : 'colord.service',
- configuration : con2,
- install: true,
-- install_dir: systemd.get_pkgconfig_variable('systemdsystemunitdir'),
-+ install_dir: join_paths(get_option('prefix'), 'etc', 'systemd', 'system'),
- )
- endif
-
-@@ -50,5 +50,5 @@
- output : 'org.freedesktop.ColorManager.conf',
- configuration : con2,
- install: true,
-- install_dir: join_paths(get_option('datadir'), 'dbus-1', 'system.d') ,
-+ install_dir: join_paths(get_option('prefix'), 'etc', 'dbus-1', 'system.d') ,
- )
---- a/meson.build
-+++ b/meson.build
-@@ -258,6 +258,3 @@
- subdir('policy')
- subdir('rules')
- subdir('src')
--
--meson.add_install_script('meson_post_install.sh',
-- localstatedir, get_option('with-daemon-user'))
---- a/rules/meson.build
-+++ b/rules/meson.build
-@@ -9,5 +9,5 @@
- sensor_rules_in,
- '95-cd-devices.rules',
- ],
-- install_dir : join_paths(udev.get_pkgconfig_variable('udevdir'), 'rules.d')
-+ install_dir : join_paths(get_option('prefix'), 'lib', 'udev', 'rules.d')
- )
---- a/src/plugins/meson.build
-+++ b/src/plugins/meson.build
-@@ -66,7 +66,7 @@
- install_dir: join_paths(get_option('libdir'), 'colord-plugins'),
- c_args : [
- cargs,
-- '-DCOLORD_SANE_BINARY="' + join_paths(get_option('libexecdir'), 'colord-sane' + '"'),
-+ '-DCOLORD_SANE_BINARY="' + join_paths(get_option('prefix'), get_option('libexecdir'), 'colord-sane' + '"'),
- ],
- dependencies : [
- gio,
diff --git a/pkgs/tools/misc/fwup/default.nix b/pkgs/tools/misc/fwup/default.nix
index 592707be20ab..e7e40bc851e2 100644
--- a/pkgs/tools/misc/fwup/default.nix
+++ b/pkgs/tools/misc/fwup/default.nix
@@ -4,13 +4,13 @@
stdenv.mkDerivation rec {
name = "fwup-${version}";
- version = "0.18.1";
+ version = "1.0.0";
src = fetchFromGitHub {
owner = "fhunleth";
repo = "fwup";
rev = "v${version}";
- sha256 = "0qdld8jy1rkpfzbfhnssr58q1gciln3pw9m6fj0jarfgja4gj31l";
+ sha256 = "1v79q5s4lm8scrz9nmqcszyh40is6k7hkr15r4aljyfbp1gamsfs";
};
doCheck = true;
diff --git a/pkgs/tools/misc/nixbot/default.nix b/pkgs/tools/misc/nixbot/default.nix
deleted file mode 100644
index 554aa0bccee2..000000000000
--- a/pkgs/tools/misc/nixbot/default.nix
+++ /dev/null
@@ -1,25 +0,0 @@
-{ stdenv, python3Packages, fetchFromGitHub }:
-
-python3Packages.buildPythonApplication rec {
- name = "nixbot-unstable-2016-10-09";
-
- src = fetchFromGitHub {
- owner = "domenkozar";
- repo = "nixbot";
- rev = "dc490e4954cb08f0eff97f74ad39dedb54670aa9";
- sha256 = "1l8rlhd2b7x5m79vb2vgszachygasv0pk8drnwgxyvsn0k88xcan";
- };
-
- propagatedBuildInputs = with python3Packages; [
- pygit2 pyramid waitress github3_py
- ];
-
- doCheck = false;
-
- meta = with stdenv.lib; {
- description = "Github bot for reviewing/testing pull requests with the help of Hydra";
- maintainers = with maintainers; [ domenkozar fpletz globin ];
- license = licenses.asl20;
- homepage = https://github.com/domenkozar/nixbot;
- };
-}
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index fcf257026180..6b44af12aaac 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -3904,8 +3904,6 @@ with pkgs;
nitrogen = callPackage ../tools/X11/nitrogen {};
- nixbot = callPackage ../tools/misc/nixbot {};
-
notify-desktop = callPackage ../tools/misc/notify-desktop {};
nkf = callPackage ../tools/text/nkf {};
@@ -5036,10 +5034,15 @@ with pkgs;
tewisay = callPackage ../tools/misc/tewisay { };
- texmacs = callPackage ../applications/editors/texmacs {
- tex = texlive.combined.scheme-small;
- extraFonts = true;
- };
+ texmacs = if stdenv.isDarwin
+ then callPackage ../applications/editors/texmacs/darwin.nix {
+ inherit (darwin.apple_sdk.frameworks) CoreFoundation Cocoa;
+ tex = texlive.combined.scheme-small;
+ extraFonts = true;
+ } else callPackage ../applications/editors/texmacs {
+ tex = texlive.combined.scheme-small;
+ extraFonts = true;
+ };
texmaker = libsForQt5.callPackage ../applications/editors/texmaker { };
@@ -12252,8 +12255,9 @@ with pkgs;
hyp = callPackage ../servers/http/hyp/default.nix { };
prosody = callPackage ../servers/xmpp/prosody {
- lua5 = lua5_1;
- inherit (lua51Packages) luasocket luasec luaexpat luafilesystem luabitop luaevent luazlib luadbi;
+ # _compat can probably be removed on next minor version after 0.10.0
+ lua5 = lua5_2_compat;
+ inherit (lua52Packages) luasocket luasec luaexpat luafilesystem luabitop luaevent luadbi;
};
biboumi = callPackage ../servers/xmpp/biboumi { };
@@ -12422,7 +12426,6 @@ with pkgs;
oauth2_proxy = callPackage ../servers/oauth2_proxy { };
openafs = callPackage ../servers/openafs { tsmbac = null; ncurses = null; };
- openpts = callPackage ../servers/openpts { };
openresty = callPackage ../servers/http/openresty { };
@@ -16036,6 +16039,20 @@ with pkgs;
hyper = callPackage ../applications/misc/hyper { inherit (gnome2) GConf; };
hyperterm = self.hyper;
+ hyper-haskell-server-with-packages = callPackage ../development/tools/haskell/hyper-haskell/server.nix {
+ inherit (haskellPackages) ghcWithPackages;
+ packages = self: with self; [];
+ };
+
+ hyper-haskell = callPackage ../development/tools/haskell/hyper-haskell {
+ hyper-haskell-server = hyper-haskell-server-with-packages.override {
+ packages = self: with self; [
+ hyper-extra diagrams csound-catalog
+ ];
+ };
+ extra-packages = [ csound ];
+ };
+
jackline = callPackage ../applications/networking/instant-messengers/jackline { };
slack = callPackage ../applications/networking/instant-messengers/slack { };
@@ -16746,6 +16763,8 @@ with pkgs;
mtpaint = callPackage ../applications/graphics/mtpaint { };
+ mucommander = callPackage ../applications/misc/mucommander { };
+
multimarkdown = callPackage ../tools/typesetting/multimarkdown { };
multimon-ng = callPackage ../applications/misc/multimon-ng { };
@@ -20608,6 +20627,8 @@ with pkgs;
snapscanFirmware = config.sane.snapscanFirmware or null;
};
+ brlaser = callPackage ../misc/cups/drivers/brlaser { };
+
brscan4 = callPackage ../applications/graphics/sane/backends/brscan4 { };
mkSaneConfig = callPackage ../applications/graphics/sane/config.nix { };
@@ -20626,6 +20647,8 @@ with pkgs;
seafile-shared = callPackage ../misc/seafile-shared { };
+ serviio = callPackage ../servers/serviio {};
+
slock = callPackage ../misc/screensavers/slock {
conf = config.slock.conf or null;
};
diff --git a/pkgs/top-level/lua-packages.nix b/pkgs/top-level/lua-packages.nix
index 0cc4482f402a..a23de670836b 100644
--- a/pkgs/top-level/lua-packages.nix
+++ b/pkgs/top-level/lua-packages.nix
@@ -167,15 +167,14 @@ let
};
luaevent = buildLuaPackage rec {
- version = "0.4.3";
+ version = "0.4.4";
name = "luaevent-${version}";
- disabled = isLua52;
src = fetchFromGitHub {
owner = "harningt";
repo = "luaevent";
rev = "v${version}";
- sha256 = "1c1n2zqx5rwfwkqaq1jj8gvx1vswvbihj2sy445w28icz1xfhpik";
+ sha256 = "1krzxr0jkv3gmhpckp02byhdd9s5dd0hpyqc8irc8i79dd8x0p53";
};
preBuild = ''
diff --git a/pkgs/top-level/perl-packages.nix b/pkgs/top-level/perl-packages.nix
index 688af3e28e70..13554ff6ee68 100644
--- a/pkgs/top-level/perl-packages.nix
+++ b/pkgs/top-level/perl-packages.nix
@@ -6350,19 +6350,19 @@ let self = _self // overrides; _self = with self; {
};
GSSAPI = buildPerlPackage rec {
- name = "GSSAPPI-0.28";
+ name = "GSSAPI-0.28";
src = fetchurl {
- url = "http://search.cpan.org/CPAN/authors/id/A/AG/AGROLMS/GSSAPI-0.28.tar.gz";
+ url = "mirror://cpan/authors/id/A/AG/AGROLMS/${name}.tar.gz";
sha256 = "1mkhwxjjlhr58pd770i9gnf7zy7jj092iv6jfbnb8bvnc5xjr3vx";
};
buildInputs = [ TestPod ];
- propagatedBuildInputs = [ pkgs.heimdalFull ];
+ propagatedBuildInputs = [ pkgs.krb5Full.dev ];
meta = {
maintainers = [ maintainers.limeytexan ];
description = "Perl extension providing access to the GSSAPIv2 library";
license = with stdenv.lib.licenses; [ artistic1 gpl1Plus ];
};
- makeMakerFlags = "--gssapiimpl ${pkgs.heimdalFull.out}";
+ makeMakerFlags = "--gssapiimpl ${pkgs.krb5Full.dev}";
};
Gtk2 = buildPerlPackage rec {
@@ -16529,11 +16529,14 @@ let self = _self // overrides; _self = with self; {
};
YAMLLibYAML = buildPerlPackage rec {
- name = "YAML-LibYAML-0.59";
+ name = "YAML-LibYAML-0.69";
src = fetchurl {
- url = "mirror://cpan/authors/id/I/IN/INGY/${name}.tar.gz";
- sha256 = "0m4zr6gm5rzwvxwd2x7rklr659jl8gsa5bxc5h25904nbvpj9x4x";
+ url = "mirror://cpan/authors/id/T/TI/TINITA/${name}.tar.gz";
+ sha256 = "06msvj3vmjszl5zj1k7g47ll0kkds9gdb5sky0q27lh4zw1vlj33";
};
+ preBuild = ''
+ sed -i 's/FULLPERL *= "/FULLPERL = /' LibYAML/Makefile
+ '';
};
WebServiceLinode = buildPerlModule rec {