mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-11-11 04:02:55 +03:00
Merge remote-tracking branch 'upstream/master' into staging
This commit is contained in:
commit
568b37384a
3
.gitattributes
vendored
3
.gitattributes
vendored
@ -11,3 +11,6 @@ doc/default.nix linguist-documentation=false
|
|||||||
|
|
||||||
nixos/doc/** linguist-documentation
|
nixos/doc/** linguist-documentation
|
||||||
nixos/doc/default.nix linguist-documentation=false
|
nixos/doc/default.nix linguist-documentation=false
|
||||||
|
|
||||||
|
nixos/modules/module-list.nix merge=union
|
||||||
|
pkgs/top-level/all-packages.nix merge=union
|
||||||
|
@ -322,6 +322,43 @@ following incompatible changes:</para>
|
|||||||
<link xlink:href="https://github.com/rvl/pump.io-nixos">external module</link>.
|
<link xlink:href="https://github.com/rvl/pump.io-nixos">external module</link>.
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
The Prosody XMPP server has received a major update. The following modules were renamed:
|
||||||
|
<itemizedlist>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
<option>services.prosody.modules.httpserver</option> is now <option>services.prosody.modules.http_files</option>
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
<option>services.prosody.modules.console</option> is now <option>services.prosody.modules.admin_telnet</option>
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</itemizedlist>
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
Many new modules are now core modules, most notably <option>services.prosody.modules.carbons</option>
|
||||||
|
and <option>services.prosody.modules.mam</option>.
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
The better-performing <literal>libevent</literal> backend is now enabled by default.
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
<literal>withCommunityModules</literal> now passes through the modules to <option>services.prosody.extraModules</option>.
|
||||||
|
Use <literal>withOnlyInstalledCommunityModules</literal> for modules that should not be enabled directly, e.g <literal>lib_ldap</literal>.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
All prometheus exporter modules are now defined as submodules.
|
||||||
|
The exporters are configured using <literal>services.prometheus.exporters</literal>.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
</itemizedlist>
|
</itemizedlist>
|
||||||
|
|
||||||
</section>
|
</section>
|
||||||
|
@ -54,7 +54,7 @@ in
|
|||||||
environment.systemPackages =
|
environment.systemPackages =
|
||||||
[ pkgs.w3m # needed for the manual anyway
|
[ pkgs.w3m # needed for the manual anyway
|
||||||
pkgs.testdisk # useful for repairing boot problems
|
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.parted
|
||||||
pkgs.ddrescue
|
pkgs.ddrescue
|
||||||
pkgs.ccrypt
|
pkgs.ccrypt
|
||||||
|
@ -363,6 +363,7 @@
|
|||||||
./services/misc/rippled.nix
|
./services/misc/rippled.nix
|
||||||
./services/misc/ripple-data-api.nix
|
./services/misc/ripple-data-api.nix
|
||||||
./services/misc/rogue.nix
|
./services/misc/rogue.nix
|
||||||
|
./services/misc/serviio.nix
|
||||||
./services/misc/siproxd.nix
|
./services/misc/siproxd.nix
|
||||||
./services/misc/snapper.nix
|
./services/misc/snapper.nix
|
||||||
./services/misc/sonarr.nix
|
./services/misc/sonarr.nix
|
||||||
@ -398,16 +399,7 @@
|
|||||||
./services/monitoring/osquery.nix
|
./services/monitoring/osquery.nix
|
||||||
./services/monitoring/prometheus/default.nix
|
./services/monitoring/prometheus/default.nix
|
||||||
./services/monitoring/prometheus/alertmanager.nix
|
./services/monitoring/prometheus/alertmanager.nix
|
||||||
./services/monitoring/prometheus/blackbox-exporter.nix
|
./services/monitoring/prometheus/exporters.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/riemann.nix
|
./services/monitoring/riemann.nix
|
||||||
./services/monitoring/riemann-dash.nix
|
./services/monitoring/riemann-dash.nix
|
||||||
./services/monitoring/riemann-tools.nix
|
./services/monitoring/riemann-tools.nix
|
||||||
@ -640,7 +632,6 @@
|
|||||||
./services/web-apps/atlassian/jira.nix
|
./services/web-apps/atlassian/jira.nix
|
||||||
./services/web-apps/frab.nix
|
./services/web-apps/frab.nix
|
||||||
./services/web-apps/mattermost.nix
|
./services/web-apps/mattermost.nix
|
||||||
./services/web-apps/nixbot.nix
|
|
||||||
./services/web-apps/nexus.nix
|
./services/web-apps/nexus.nix
|
||||||
./services/web-apps/pgpkeyserver-lite.nix
|
./services/web-apps/pgpkeyserver-lite.nix
|
||||||
./services/web-apps/matomo.nix
|
./services/web-apps/matomo.nix
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
environment.systemPackages = [
|
environment.systemPackages = [
|
||||||
pkgs.w3m-nox # needed for the manual anyway
|
pkgs.w3m-nox # needed for the manual anyway
|
||||||
pkgs.testdisk # useful for repairing boot problems
|
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.efibootmgr
|
||||||
pkgs.efivar
|
pkgs.efivar
|
||||||
pkgs.parted
|
pkgs.parted
|
||||||
|
@ -240,5 +240,11 @@ with lib;
|
|||||||
|
|
||||||
# Xen
|
# Xen
|
||||||
(mkRenamedOptionModule [ "virtualisation" "xen" "qemu-package" ] [ "virtualisation" "xen" "package-qemu" ])
|
(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.
|
||||||
|
'' ));
|
||||||
}
|
}
|
||||||
|
92
nixos/modules/services/misc/serviio.nix
Normal file
92
nixos/modules/services/misc/serviio.nix
Normal file
@ -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
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
@ -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";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
@ -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}
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
172
nixos/modules/services/monitoring/prometheus/exporters.nix
Normal file
172
nixos/modules/services/monitoring/prometheus/exporters.nix
Normal file
@ -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
|
||||||
|
<option>services.prometheus.exporters.${name}.openFirewall</option>
|
||||||
|
is true. It is used as `ip46tables -I INPUT <option>firewallFilter</option> -j ACCEPT`.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
user = mkOption {
|
||||||
|
type = types.str;
|
||||||
|
default = "nobody";
|
||||||
|
description = ''
|
||||||
|
User name under which the ${name} exporter shall be run.
|
||||||
|
Has no effect when <option>systemd.services.prometheus-${name}-exporter.serviceConfig.DynamicUser</option> is true.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
group = mkOption {
|
||||||
|
type = types.str;
|
||||||
|
default = "nobody";
|
||||||
|
description = ''
|
||||||
|
Group under which the ${name} exporter shall be run.
|
||||||
|
Has no effect when <option>systemd.services.prometheus-${name}-exporter.serviceConfig.DynamicUser</option> 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;
|
||||||
|
}
|
135
nixos/modules/services/monitoring/prometheus/exporters.xml
Normal file
135
nixos/modules/services/monitoring/prometheus/exporters.xml
Normal file
@ -0,0 +1,135 @@
|
|||||||
|
<chapter xmlns="http://docbook.org/ns/docbook"
|
||||||
|
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||||
|
xmlns:xi="http://www.w3.org/2001/XInclude"
|
||||||
|
version="5.0"
|
||||||
|
xml:id="module-services-prometheus-exporters">
|
||||||
|
|
||||||
|
<title>Prometheus exporters</title>
|
||||||
|
|
||||||
|
<para>Prometheus exporters provide metrics for the <link xlink:href="https://prometheus.io">prometheus monitoring system</link>.</para>
|
||||||
|
|
||||||
|
<section><title>Configuration</title>
|
||||||
|
<para>One of the most common exporters is the <link xlink:href="https://github.com/prometheus/node_exporter">node exporter</link>, it provides hardware and OS metrics from the host it's running on. The exporter could be configured as follows:
|
||||||
|
<programlisting>
|
||||||
|
services.promtheus.exporters.node = {
|
||||||
|
enable = true;
|
||||||
|
enabledCollectors = [
|
||||||
|
"logind"
|
||||||
|
"systemd"
|
||||||
|
];
|
||||||
|
disabledCollectors = [
|
||||||
|
"textfile"
|
||||||
|
];
|
||||||
|
openFirewall = true;
|
||||||
|
firewallFilter = "-i br0 -p tcp -m tcp --dport 9100";
|
||||||
|
};
|
||||||
|
</programlisting>
|
||||||
|
It should now serve all metrics from the collectors
|
||||||
|
that are explicitly enabled and the ones that are
|
||||||
|
<link xlink:href="https://github.com/prometheus/node_exporter#enabled-by-default">enabled by default</link>, via http under <literal>/metrics</literal>. In this example the firewall should just
|
||||||
|
allow incoming connections to the exporter's port on the bridge interface <literal>br0</literal>
|
||||||
|
(this would have to be configured seperately of course).
|
||||||
|
For more information about configuration see <literal>man configuration.nix</literal> or
|
||||||
|
search through the <link xlink:href="https://nixos.org/nixos/options.html#prometheus.exporters">available options</link>.
|
||||||
|
</para>
|
||||||
|
</section>
|
||||||
|
<section><title>Adding a new exporter</title>
|
||||||
|
<para>To add a new exporter, it has to be packaged first (see <literal>nixpkgs/pkgs/servers/monitoring/prometheus/</literal> for examples), then a module can be added. The postfix exporter is used in this example:</para>
|
||||||
|
<itemizedlist>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
Some default options for all exporters are provided by
|
||||||
|
<literal>nixpkgs/nixos/modules/services/monitoring/prometheus/exporters.nix</literal>:
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
<listitem override='none'>
|
||||||
|
<itemizedlist>
|
||||||
|
<listitem><para><literal>enable</literal></para></listitem>
|
||||||
|
<listitem><para><literal>port</literal></para></listitem>
|
||||||
|
<listitem><para><literal>listenAddress</literal></para></listitem>
|
||||||
|
<listitem><para><literal>extraFlags</literal></para></listitem>
|
||||||
|
<listitem><para><literal>openFirewall</literal></para></listitem>
|
||||||
|
<listitem><para><literal>firewallFilter</literal></para></listitem>
|
||||||
|
<listitem><para><literal>user</literal></para></listitem>
|
||||||
|
<listitem><para><literal>group</literal></para></listitem>
|
||||||
|
</itemizedlist>
|
||||||
|
</listitem>
|
||||||
|
<listitem>
|
||||||
|
<para>As there is already a package available, the module can now be added.
|
||||||
|
This is accomplished by adding a new file to the
|
||||||
|
<literal>nixos/modules/services/monitoring/prometheus/exporters/</literal> directory,
|
||||||
|
which will be called postfix.nix and contains all exporter specific options
|
||||||
|
and configuration:
|
||||||
|
<programlisting>
|
||||||
|
# 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}
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
</programlisting>
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
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:
|
||||||
|
<literal>nixpkgs/nixos/modules/services/prometheus/exporters.nix</literal>
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</itemizedlist>
|
||||||
|
</section>
|
||||||
|
</chapter>
|
@ -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";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
@ -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}
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
@ -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}
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
@ -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}
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
@ -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 <literal>config.services.minio.accessKey</literal>.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
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 <literal>config.services.minio.secretKey</literal>.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
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}
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
@ -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}
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
@ -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}
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
@ -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}
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
@ -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}
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
@ -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}
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
@ -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}
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
@ -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}
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
@ -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";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
@ -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 <literal>config.services.minio.accessKey</literal>.
|
|
||||||
'';
|
|
||||||
} // 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 <literal>config.services.minio.secretKey</literal>.
|
|
||||||
'';
|
|
||||||
} // 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}
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
@ -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";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
@ -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";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
@ -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";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
@ -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}
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
@ -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";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
@ -15,6 +15,7 @@ let
|
|||||||
description = "Path to the key file.";
|
description = "Path to the key file.";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# TODO: rename to certificate to match the prosody config
|
||||||
cert = mkOption {
|
cert = mkOption {
|
||||||
type = types.path;
|
type = types.path;
|
||||||
description = "Path to the certificate file.";
|
description = "Path to the certificate file.";
|
||||||
@ -30,7 +31,7 @@ let
|
|||||||
};
|
};
|
||||||
|
|
||||||
moduleOpts = {
|
moduleOpts = {
|
||||||
|
# Generally required
|
||||||
roster = mkOption {
|
roster = mkOption {
|
||||||
type = types.bool;
|
type = types.bool;
|
||||||
default = true;
|
default = true;
|
||||||
@ -61,12 +62,38 @@ let
|
|||||||
description = "Service discovery";
|
description = "Service discovery";
|
||||||
};
|
};
|
||||||
|
|
||||||
legacyauth = mkOption {
|
# Not essential, but recommended
|
||||||
|
carbons = mkOption {
|
||||||
type = types.bool;
|
type = types.bool;
|
||||||
default = true;
|
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 {
|
version = mkOption {
|
||||||
type = types.bool;
|
type = types.bool;
|
||||||
default = true;
|
default = true;
|
||||||
@ -91,36 +118,112 @@ let
|
|||||||
description = "Replies to XMPP pings with pongs";
|
description = "Replies to XMPP pings with pongs";
|
||||||
};
|
};
|
||||||
|
|
||||||
console = mkOption {
|
register = mkOption {
|
||||||
type = types.bool;
|
type = types.bool;
|
||||||
default = false;
|
default = true;
|
||||||
description = "telnet to port 5582";
|
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 {
|
bosh = mkOption {
|
||||||
type = types.bool;
|
type = types.bool;
|
||||||
default = false;
|
default = false;
|
||||||
description = "Enable BOSH clients, aka 'Jabber over HTTP'";
|
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 {
|
websocket = mkOption {
|
||||||
type = types.bool;
|
type = types.bool;
|
||||||
default = false;
|
default = false;
|
||||||
description = "Enable WebSocket support";
|
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:
|
toLua = x:
|
||||||
if builtins.isString x then ''"${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.isInt x then toString x
|
||||||
|
else if builtins.isList x then ''{ ${lib.concatStringsSep ", " (map (n: toLua n) x) } }''
|
||||||
else throw "Invalid Lua value";
|
else throw "Invalid Lua value";
|
||||||
|
|
||||||
createSSLOptsStr = o: ''
|
createSSLOptsStr = o: ''
|
||||||
@ -198,6 +301,59 @@ in
|
|||||||
description = "Allow account creation";
|
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;
|
modules = moduleOpts;
|
||||||
|
|
||||||
extraModules = mkOption {
|
extraModules = mkOption {
|
||||||
@ -206,6 +362,12 @@ in
|
|||||||
description = "Enable custom modules";
|
description = "Enable custom modules";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
extraPluginPaths = mkOption {
|
||||||
|
type = types.listOf types.path;
|
||||||
|
default = [];
|
||||||
|
description = "Addtional path in which to look find plugins/modules";
|
||||||
|
};
|
||||||
|
|
||||||
virtualHosts = mkOption {
|
virtualHosts = mkOption {
|
||||||
|
|
||||||
description = "Define the virtual hosts";
|
description = "Define the virtual hosts";
|
||||||
@ -255,38 +417,48 @@ in
|
|||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
|
|
||||||
environment.systemPackages = [ pkgs.prosody ];
|
environment.systemPackages = [ cfg.package ];
|
||||||
|
|
||||||
environment.etc."prosody/prosody.cfg.lua".text = ''
|
environment.etc."prosody/prosody.cfg.lua".text = ''
|
||||||
|
|
||||||
pidfile = "/var/lib/prosody/prosody.pid"
|
pidfile = "/var/lib/prosody/prosody.pid"
|
||||||
|
|
||||||
|
|
||||||
log = "*syslog"
|
log = "*syslog"
|
||||||
|
|
||||||
data_path = "/var/lib/prosody"
|
data_path = "/var/lib/prosody"
|
||||||
|
plugin_paths = {
|
||||||
allow_registration = ${boolToString cfg.allowRegistration};
|
${lib.concatStringsSep ", " (map (n: "\"${n}\"") cfg.extraPluginPaths) }
|
||||||
|
}
|
||||||
${ optionalString cfg.modules.console "console_enabled = true;" }
|
|
||||||
|
|
||||||
${ optionalString (cfg.ssl != null) (createSSLOptsStr cfg.ssl) }
|
${ 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 = {
|
modules_enabled = {
|
||||||
|
|
||||||
${ lib.concatStringsSep "\n\ \ " (lib.mapAttrsToList
|
${ lib.concatStringsSep "\n\ \ " (lib.mapAttrsToList
|
||||||
(name: val: optionalString val ''"${name}";'')
|
(name: val: optionalString val "${toLua name};")
|
||||||
cfg.modules) }
|
cfg.modules) }
|
||||||
|
${ lib.concatStringsSep "\n" (map (x: "${toLua x};") cfg.package.communityModules)}
|
||||||
${ optionalString cfg.allowRegistration "\"register\"\;" }
|
${ lib.concatStringsSep "\n" (map (x: "${toLua x};") cfg.extraModules)}
|
||||||
|
|
||||||
${ lib.concatStringsSep "\n" (map (x: "\"${x}\";") cfg.extraModules)}
|
|
||||||
|
|
||||||
"posix";
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
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 }
|
${ cfg.extraConfig }
|
||||||
|
|
||||||
${ lib.concatStringsSep "\n" (lib.mapAttrsToList (n: v: ''
|
${ lib.concatStringsSep "\n" (lib.mapAttrsToList (n: v: ''
|
||||||
|
@ -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;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
@ -344,6 +344,7 @@ in rec {
|
|||||||
tests.predictable-interface-names = callSubTests tests/predictable-interface-names.nix {};
|
tests.predictable-interface-names = callSubTests tests/predictable-interface-names.nix {};
|
||||||
tests.printing = callTest tests/printing.nix {};
|
tests.printing = callTest tests/printing.nix {};
|
||||||
tests.prometheus = callTest tests/prometheus.nix {};
|
tests.prometheus = callTest tests/prometheus.nix {};
|
||||||
|
tests.prosody = callTest tests/prosody.nix {};
|
||||||
tests.proxy = callTest tests/proxy.nix {};
|
tests.proxy = callTest tests/proxy.nix {};
|
||||||
# tests.quagga = callTest tests/quagga.nix {};
|
# tests.quagga = callTest tests/quagga.nix {};
|
||||||
tests.quake3 = callTest tests/quake3.nix {};
|
tests.quake3 = callTest tests/quake3.nix {};
|
||||||
|
75
nixos/tests/prosody.nix
Normal file
75
nixos/tests/prosody.nix
Normal file
@ -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');
|
||||||
|
'';
|
||||||
|
}
|
@ -1,5 +1,5 @@
|
|||||||
{ stdenv, fetchurl, meson, ninja, pkgconfig, vala_0_38, gettext
|
{ stdenv, fetchurl, substituteAll, meson, ninja, pkgconfig, vala_0_40, gettext
|
||||||
, gnome3, libnotify, intltool, itstool, glib, gtk3, libxml2
|
, gnome3, libnotify, itstool, glib, gtk3, libxml2
|
||||||
, coreutils, libsecret, pcre, libxkbcommon, wrapGAppsHook
|
, coreutils, libsecret, pcre, libxkbcommon, wrapGAppsHook
|
||||||
, libpthreadstubs, libXdmcp, epoxy, at-spi2-core, dbus, libgpgerror
|
, libpthreadstubs, libXdmcp, epoxy, at-spi2-core, dbus, libgpgerror
|
||||||
, appstream-glib, desktop-file-utils, duplicity
|
, appstream-glib, desktop-file-utils, duplicity
|
||||||
@ -15,20 +15,14 @@ stdenv.mkDerivation rec {
|
|||||||
};
|
};
|
||||||
|
|
||||||
patches = [
|
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 = [
|
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
|
appstream-glib desktop-file-utils libxml2 wrapGAppsHook
|
||||||
];
|
];
|
||||||
|
|
||||||
@ -40,6 +34,8 @@ stdenv.mkDerivation rec {
|
|||||||
|
|
||||||
propagatedUserEnvPkgs = [ duplicity ];
|
propagatedUserEnvPkgs = [ duplicity ];
|
||||||
|
|
||||||
|
PKG_CONFIG_LIBNAUTILUS_EXTENSION_EXTENSIONDIR = "${placeholder "out"}/lib/nautilus/extensions-3.0";
|
||||||
|
|
||||||
postInstall = ''
|
postInstall = ''
|
||||||
glib-compile-schemas $out/share/glib-2.0/schemas
|
glib-compile-schemas $out/share/glib-2.0/schemas
|
||||||
'';
|
'';
|
||||||
|
@ -1,12 +1,11 @@
|
|||||||
diff --git a/deja-dup/nautilus/meson.build b/deja-dup/nautilus/meson.build
|
--- a/libdeja/tools/duplicity/DuplicityInstance.vala
|
||||||
index 04b136f3..ed8f7cba 100644
|
+++ b/libdeja/tools/duplicity/DuplicityInstance.vala
|
||||||
--- a/deja-dup/nautilus/meson.build
|
@@ -159,7 +159,7 @@
|
||||||
+++ b/deja-dup/nautilus/meson.build
|
// We already are pretty sure we don't have other duplicities in our
|
||||||
@@ -31,6 +31,6 @@ shared_module('deja-dup', ['NautilusExtension.c'],
|
// archive directories, because we use our own and we ensure we only have
|
||||||
link_with: [dirhandling],
|
// one deja-dup running at a time via DBus.
|
||||||
dependencies: [nautilus_dep],
|
- Posix.system("/bin/rm -f " + Shell.quote(cache_dir) + "/*/lockfile.lock");
|
||||||
install: true,
|
+ Posix.system("@coreutils@/bin/rm -f " + Shell.quote(cache_dir) + "/*/lockfile.lock");
|
||||||
- install_dir: nautilus_dep.get_pkgconfig_variable('extensiondir'))
|
|
||||||
+ install_dir: join_paths(get_option('libdir'), 'nautilus', 'extensions-3.0'))
|
|
||||||
|
|
||||||
endif
|
Process.spawn_async_with_pipes(null, real_argv, real_envp,
|
||||||
|
SpawnFlags.SEARCH_PATH |
|
||||||
|
@ -211,7 +211,7 @@ let
|
|||||||
});
|
});
|
||||||
|
|
||||||
buildWebStorm = { name, version, src, license, description, wmClass, update-channel }:
|
buildWebStorm = { name, version, src, license, description, wmClass, update-channel }:
|
||||||
(mkJetBrainsProduct {
|
lib.overrideDerivation (mkJetBrainsProduct {
|
||||||
inherit name version src wmClass jdk;
|
inherit name version src wmClass jdk;
|
||||||
product = "WebStorm";
|
product = "WebStorm";
|
||||||
meta = with stdenv.lib; {
|
meta = with stdenv.lib; {
|
||||||
@ -225,8 +225,13 @@ let
|
|||||||
maintainers = with maintainers; [ abaldeau ];
|
maintainers = with maintainers; [ abaldeau ];
|
||||||
platforms = platforms.linux;
|
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
|
in
|
||||||
|
|
||||||
{
|
{
|
||||||
|
@ -4,12 +4,12 @@ with stdenv.lib;
|
|||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
name = "kakoune-unstable-${version}";
|
name = "kakoune-unstable-${version}";
|
||||||
version = "2018-02-15";
|
version = "2018-03-22";
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
repo = "kakoune";
|
repo = "kakoune";
|
||||||
owner = "mawww";
|
owner = "mawww";
|
||||||
rev = "f5e39972eb525166dc5b1d963067f79990991a75";
|
rev = "f8e297acef1be0657b779fea5256f606a6c6a3a3";
|
||||||
sha256 = "160a302xg6nfzx49dkis6ij20kyzr63kxvcv8ld3l07l8k69g80r";
|
sha256 = "14xmw3lkwzppm9bns55nmyb1lfihzhdyisf6xjqlszdj4mcf94jl";
|
||||||
};
|
};
|
||||||
nativeBuildInputs = [ pkgconfig ];
|
nativeBuildInputs = [ pkgconfig ];
|
||||||
buildInputs = [ ncurses asciidoc docbook_xsl libxslt ];
|
buildInputs = [ ncurses asciidoc docbook_xsl libxslt ];
|
||||||
|
68
pkgs/applications/editors/texmacs/common.nix
Normal file
68
pkgs/applications/editors/texmacs/common.nix
Normal file
@ -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;
|
||||||
|
};
|
||||||
|
}
|
59
pkgs/applications/editors/texmacs/darwin.nix
Normal file
59
pkgs/applications/editors/texmacs/darwin.nix
Normal file
@ -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;
|
||||||
|
};
|
||||||
|
}
|
29
pkgs/applications/editors/texmacs/darwin.patch
Normal file
29
pkgs/applications/editors/texmacs/darwin.patch
Normal file
@ -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 <spawn.h>
|
||||||
|
#include <unistd.h>
|
||||||
|
#include <sys/wait.h>
|
||||||
|
+#include <pthread.h>
|
||||||
|
|
||||||
|
// for thread safe strings
|
||||||
|
#include <string>
|
@ -1,41 +1,21 @@
|
|||||||
{stdenv, fetchurl, guile_1_8, qt4, zlib, xmodmap, which, makeWrapper, freetype,
|
{ stdenv, callPackage,
|
||||||
tex ? null,
|
fetchurl, guile_1_8, qt4, zlib, xmodmap, which, makeWrapper, freetype,
|
||||||
aspell ? null,
|
tex ? null,
|
||||||
ghostscriptX ? null,
|
aspell ? null,
|
||||||
extraFonts ? false,
|
ghostscriptX ? null,
|
||||||
chineseFonts ? false,
|
extraFonts ? false,
|
||||||
japaneseFonts ? false,
|
chineseFonts ? false,
|
||||||
koreanFonts ? false }:
|
japaneseFonts ? false,
|
||||||
|
koreanFonts ? false }:
|
||||||
|
|
||||||
let
|
let
|
||||||
pname = "TeXmacs";
|
pname = "TeXmacs";
|
||||||
version = "1.99.2";
|
version = "1.99.2";
|
||||||
extraFontsSrc = fetchurl {
|
common = callPackage ./common.nix {
|
||||||
url = "ftp://ftp.texmacs.org/pub/TeXmacs/fonts/TeXmacs-extra-fonts-1.0-noarch.tar.gz";
|
inherit tex extraFonts chineseFonts japaneseFonts koreanFonts;
|
||||||
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";
|
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation {
|
||||||
name = "${pname}-${version}";
|
name = "${pname}-${version}";
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
@ -45,56 +25,21 @@ stdenv.mkDerivation rec {
|
|||||||
|
|
||||||
buildInputs = [ guile_1_8 qt4 makeWrapper ghostscriptX freetype ];
|
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 : " +
|
postInstall = "wrapProgram $out/bin/texmacs --suffix PATH : " +
|
||||||
(if ghostscriptX == null then "" else "${ghostscriptX}/bin:") +
|
(if ghostscriptX == null then "" else "${ghostscriptX}/bin:") +
|
||||||
(if aspell == null then "" else "${aspell}/bin:") +
|
(if aspell == null then "" else "${aspell}/bin:") +
|
||||||
(if tex == null then "" else "${tex}/bin:") +
|
(if tex == null then "" else "${tex}/bin:") +
|
||||||
"${xmodmap}/bin:${which}/bin";
|
"${xmodmap}/bin:${which}/bin";
|
||||||
|
|
||||||
|
inherit (common) postPatch;
|
||||||
|
|
||||||
postFixup = ''
|
postFixup = ''
|
||||||
bin="$out/libexec/TeXmacs/bin/texmacs.bin"
|
bin="$out/libexec/TeXmacs/bin/texmacs.bin"
|
||||||
rpath=$(patchelf --print-rpath "$bin")
|
rpath=$(patchelf --print-rpath "$bin")
|
||||||
patchelf --set-rpath "$rpath:${zlib.out}/lib" "$bin"
|
patchelf --set-rpath "$rpath:${zlib.out}/lib" "$bin"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = {
|
meta = common.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;
|
|
||||||
maintainers = [ stdenv.lib.maintainers.roconnor ];
|
maintainers = [ stdenv.lib.maintainers.roconnor ];
|
||||||
platforms = stdenv.lib.platforms.gnu; # arbitrary choice
|
platforms = stdenv.lib.platforms.gnu; # arbitrary choice
|
||||||
};
|
};
|
||||||
|
@ -50,13 +50,13 @@
|
|||||||
|
|
||||||
mkDerivation rec {
|
mkDerivation rec {
|
||||||
name = "digikam-${version}";
|
name = "digikam-${version}";
|
||||||
version = "5.8.0";
|
version = "5.9.0";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "KDE";
|
owner = "KDE";
|
||||||
repo = "digikam";
|
repo = "digikam";
|
||||||
rev = "v${version}";
|
rev = "v${version}";
|
||||||
sha256 = "1bvidg0fn92xvw5brhb34lm7m4iy4jb5xpvnhbgh8vik2m4n41w1";
|
sha256 = "09diw273h9i7rss89ba82yrfy6jb2njv3k0dknrrg7bb998vrw2d";
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [ cmake doxygen extra-cmake-modules kdoctools wrapGAppsHook ];
|
nativeBuildInputs = [ cmake doxygen extra-cmake-modules kdoctools wrapGAppsHook ];
|
||||||
|
82
pkgs/applications/misc/mucommander/default.nix
Normal file
82
pkgs/applications/misc/mucommander/default.nix
Normal file
@ -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;
|
||||||
|
};
|
||||||
|
}
|
@ -1,5 +1,5 @@
|
|||||||
{ stdenv, fetchurl, pkgconfig, writeText, libX11, ncurses, libXext, libXft
|
{ stdenv, fetchurl, pkgconfig, writeText, makeWrapper, libX11, ncurses, libXext
|
||||||
, fontconfig, conf ? null, patches ? [], extraLibs ? []}:
|
, libXft, fontconfig, dmenu, conf ? null, patches ? [], extraLibs ? []}:
|
||||||
|
|
||||||
with stdenv.lib;
|
with stdenv.lib;
|
||||||
|
|
||||||
@ -17,11 +17,12 @@ in stdenv.mkDerivation rec {
|
|||||||
configFile = optionalString (conf!=null) (writeText "config.def.h" conf);
|
configFile = optionalString (conf!=null) (writeText "config.def.h" conf);
|
||||||
preBuild = optionalString (conf!=null) "cp ${configFile} config.def.h";
|
preBuild = optionalString (conf!=null) "cp ${configFile} config.def.h";
|
||||||
|
|
||||||
nativeBuildInputs = [ pkgconfig ];
|
nativeBuildInputs = [ pkgconfig makeWrapper ];
|
||||||
buildInputs = [ libX11 ncurses libXext libXft fontconfig ] ++ extraLibs;
|
buildInputs = [ libX11 ncurses libXext libXft fontconfig ] ++ extraLibs;
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
TERMINFO=$out/share/terminfo make install PREFIX=$out
|
TERMINFO=$out/share/terminfo make install PREFIX=$out
|
||||||
|
wrapProgram "$out/bin/st" --prefix PATH : "${dmenu}/bin"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
|
@ -1,21 +1,18 @@
|
|||||||
{ qt5, stdenv }:
|
{ qt5, stdenv }:
|
||||||
|
|
||||||
let mkTelegram = args: qt5.callPackage (import ./generic.nix args) { };
|
let
|
||||||
in {
|
mkTelegram = args: qt5.callPackage (import ./generic.nix args) { };
|
||||||
stable = mkTelegram {
|
stableVersion = {
|
||||||
stable = true;
|
stable = true;
|
||||||
version = "1.2.6";
|
version = "1.2.14";
|
||||||
sha256Hash = "15g0m2wwqfp13wd7j31p8cx1kpylx5m8ljaksnsqdkgyr9l1ar8w";
|
sha256Hash = "1412bls4qmfsa4nlqrxrc1j1jslhj6rhg8k69blhks9grrz36s1l";
|
||||||
# svn log svn://svn.archlinux.org/community/telegram-desktop/trunk
|
# svn log svn://svn.archlinux.org/community/telegram-desktop/trunk
|
||||||
archPatchesRevision = "283641";
|
archPatchesRevision = "310557";
|
||||||
archPatchesHash = "0v4213vrabfa2dmwnqgb8n6hl54938mw9glaim3amyslxphmdrfb";
|
archPatchesHash = "1v134dal3xiapgh3akfr61vh62j24m9vkb62kckwvap44iqb0hlk";
|
||||||
};
|
};
|
||||||
preview = mkTelegram {
|
in {
|
||||||
|
stable = mkTelegram stableVersion;
|
||||||
|
preview = mkTelegram (stableVersion // {
|
||||||
stable = false;
|
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";
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
@ -117,16 +117,18 @@ mkDerivation rec {
|
|||||||
# This is necessary to run Telegram in a pure environment.
|
# This is necessary to run Telegram in a pure environment.
|
||||||
wrapProgram $out/bin/telegram-desktop \
|
wrapProgram $out/bin/telegram-desktop \
|
||||||
--prefix QT_PLUGIN_PATH : "${qtbase}/${qtbase.qtPluginPrefix}" \
|
--prefix QT_PLUGIN_PATH : "${qtbase}/${qtbase.qtPluginPrefix}" \
|
||||||
|
--suffix XDG_DATA_DIRS : "${gtk3}/share/gsettings-schemas/${gtk3.name}/" \
|
||||||
--set XDG_RUNTIME_DIR "XDG-RUNTIME-DIR"
|
--set XDG_RUNTIME_DIR "XDG-RUNTIME-DIR"
|
||||||
sed -i $out/bin/telegram-desktop \
|
sed -i $out/bin/telegram-desktop \
|
||||||
-e "s,'XDG-RUNTIME-DIR',\"\''${XDG_RUNTIME_DIR:-/run/user/\$(id --user)}\","
|
-e "s,'XDG-RUNTIME-DIR',\"\''${XDG_RUNTIME_DIR:-/run/user/\$(id --user)}\","
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
description = "Telegram Desktop messaging app";
|
description = "Telegram Desktop messaging app "
|
||||||
|
+ (if stable then "(stable version)" else "(pre-release)");
|
||||||
license = licenses.gpl3;
|
license = licenses.gpl3;
|
||||||
platforms = [ "x86_64-linux" "i686-linux" ];
|
platforms = [ "x86_64-linux" "i686-linux" ];
|
||||||
homepage = https://desktop.telegram.org/;
|
homepage = https://desktop.telegram.org/;
|
||||||
maintainers = with maintainers; [ abbradar garbas primeos ];
|
maintainers = with maintainers; [ primeos abbradar garbas ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
buildGoPackage rec {
|
buildGoPackage rec {
|
||||||
name = "rclone-${version}";
|
name = "rclone-${version}";
|
||||||
version = "1.39";
|
version = "1.40";
|
||||||
|
|
||||||
goPackagePath = "github.com/ncw/rclone";
|
goPackagePath = "github.com/ncw/rclone";
|
||||||
|
|
||||||
@ -10,7 +10,7 @@ buildGoPackage rec {
|
|||||||
owner = "ncw";
|
owner = "ncw";
|
||||||
repo = "rclone";
|
repo = "rclone";
|
||||||
rev = "v${version}";
|
rev = "v${version}";
|
||||||
sha256 = "1x9qxhqkbyd7kd52ai9p996ppslh73xarn5w4ljaa97wwm5vwwsg";
|
sha256 = "01q9g5g4va1s91xzvxpq8lj9jcrbl66cik383cpxwmcv04qcqgw9";
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = [ "bin" "out" "man" ];
|
outputs = [ "bin" "out" "man" ];
|
||||||
|
@ -941,8 +941,8 @@ rec {
|
|||||||
};
|
};
|
||||||
|
|
||||||
ubuntu1710i386 = {
|
ubuntu1710i386 = {
|
||||||
name = "ubuntu-17.10-xenial-i386";
|
name = "ubuntu-17.10-artful-i386";
|
||||||
fullName = "Ubuntu 17.10 Xenial (i386)";
|
fullName = "Ubuntu 17.10 Artful (i386)";
|
||||||
packagesLists =
|
packagesLists =
|
||||||
[ (fetchurl {
|
[ (fetchurl {
|
||||||
url = mirror://ubuntu/dists/artful/main/binary-i386/Packages.xz;
|
url = mirror://ubuntu/dists/artful/main/binary-i386/Packages.xz;
|
||||||
|
@ -6,6 +6,8 @@ in
|
|||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
name = "${pname}-${version}";
|
name = "${pname}-${version}";
|
||||||
|
|
||||||
|
outputs = [ "out" "dev" ];
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "mirror://gnome/sources/${pname}/${gnome3.versionBranch version}/${name}.tar.xz";
|
url = "mirror://gnome/sources/${pname}/${gnome3.versionBranch version}/${name}.tar.xz";
|
||||||
sha256 = "0c26x8gi3ivmhlbqcmiag4jwrkvcy28ld24j55nqr3jikb904a5v";
|
sha256 = "0c26x8gi3ivmhlbqcmiag4jwrkvcy28ld24j55nqr3jikb904a5v";
|
||||||
@ -13,11 +15,12 @@ stdenv.mkDerivation rec {
|
|||||||
|
|
||||||
doCheck = true;
|
doCheck = true;
|
||||||
|
|
||||||
patches = [ ./fix_introspection_paths.patch ];
|
|
||||||
|
|
||||||
nativeBuildInputs = [ pkgconfig autoconf vala gobjectIntrospection ];
|
nativeBuildInputs = [ pkgconfig autoconf vala gobjectIntrospection ];
|
||||||
buildInputs = [ glib ];
|
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 = {
|
passthru = {
|
||||||
updateScript = gnome3.updateScript {
|
updateScript = gnome3.updateScript {
|
||||||
packageName = pname;
|
packageName = pname;
|
||||||
|
@ -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
|
|
@ -24,19 +24,19 @@ stdenv.mkDerivation rec {
|
|||||||
nativeBuildInputs = [ makeWrapper gawk pkgconfig ];
|
nativeBuildInputs = [ makeWrapper gawk pkgconfig ];
|
||||||
buildInputs = [ readline libtool ];
|
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 ];
|
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
|
# Guile needs patching to preset results for the configure tests
|
||||||
# about pthreads, which work only in native builds.
|
# about pthreads, which work only in native builds.
|
||||||
preConfigure = ''
|
preConfigure = ''
|
||||||
@ -45,6 +45,22 @@ stdenv.mkDerivation rec {
|
|||||||
fi
|
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.
|
# One test fails.
|
||||||
# ERROR: file: "libtest-asmobs", message: "file not found"
|
# ERROR: file: "libtest-asmobs", message: "file not found"
|
||||||
# This is fixed here:
|
# This is fixed here:
|
||||||
|
@ -1,14 +1,14 @@
|
|||||||
{ stdenv, agda, fetchFromGitHub, ghcWithPackages }:
|
{ stdenv, agda, fetchFromGitHub, ghcWithPackages }:
|
||||||
|
|
||||||
agda.mkDerivation (self: rec {
|
agda.mkDerivation (self: rec {
|
||||||
version = "0.14";
|
version = "0.15";
|
||||||
name = "agda-stdlib-${version}";
|
name = "agda-stdlib-${version}";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
repo = "agda-stdlib";
|
repo = "agda-stdlib";
|
||||||
owner = "agda";
|
owner = "agda";
|
||||||
rev = "v${version}";
|
rev = "v${version}";
|
||||||
sha256 = "0qx72w6lwskp18q608f95j5dcxb9xr4q4mzdkxp01sgib8v2v56l";
|
sha256 = "0c2vfib4fmljy98c3s3s7jmpjlqxvsbv7wf6qxr38kamwzbryrjj";
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [ (ghcWithPackages (self : [ self.filemanip ])) ];
|
nativeBuildInputs = [ (ghcWithPackages (self : [ self.filemanip ])) ];
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
{stdenv, fetchurl, boost, openssl}:
|
{stdenv, fetchurl, boost, openssl}:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
name = "asio-1.10.8";
|
name = "asio-1.12.0";
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "mirror://sourceforge/asio/${name}.tar.bz2";
|
url = "mirror://sourceforge/asio/${name}.tar.bz2";
|
||||||
sha256 = "0jgdl4fxw0hwy768rl3lhdc0czz7ak7czf3dg10j21pdpfpfvpi6";
|
sha256 = "1bfk746kcs3cmvfvxjp3w9y6zpybjj8s002jjd3snrp2syd0nd9c";
|
||||||
};
|
};
|
||||||
|
|
||||||
propagatedBuildInputs = [ boost ];
|
propagatedBuildInputs = [ boost ];
|
||||||
|
@ -3,14 +3,14 @@
|
|||||||
}:
|
}:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
version = "19.9";
|
version = "19.10";
|
||||||
name = "dlib-${version}";
|
name = "dlib-${version}";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "davisking";
|
owner = "davisking";
|
||||||
repo = "dlib";
|
repo = "dlib";
|
||||||
rev ="v${version}";
|
rev ="v${version}";
|
||||||
sha256 = "0lc54r928j9dg7f2wn25m887z24d31wrc14v2hn6aknp1z084lrc";
|
sha256 = "0sgxblf4n33b8wgblyblmrkwydvy1yh7fzll1b6c4zgkz675w0m5";
|
||||||
};
|
};
|
||||||
|
|
||||||
postPatch = ''
|
postPatch = ''
|
||||||
|
@ -2,12 +2,12 @@
|
|||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
name = "${pname}-${version}";
|
name = "${pname}-${version}";
|
||||||
pname = "fflas-ffpack";
|
pname = "fflas-ffpack";
|
||||||
version = "2.2.2";
|
version = "2.3.2";
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "linbox-team";
|
owner = "linbox-team";
|
||||||
repo = "${pname}";
|
repo = "${pname}";
|
||||||
rev = "v${version}";
|
rev = "v${version}";
|
||||||
sha256 = "0k1f4pb7azrm6ajncvg7vni7ixfmn6fssd5ld4xddbi6jqbsf9rd";
|
sha256 = "1cqhassj2dny3gx0iywvmnpq8ca0d6m82xl5rz4mb8gaxr2kwddl";
|
||||||
};
|
};
|
||||||
nativeBuildInputs = [ autoreconfHook pkgconfig ];
|
nativeBuildInputs = [ autoreconfHook pkgconfig ];
|
||||||
buildInputs = [ givaro (liblapack.override {shared = true;}) openblas];
|
buildInputs = [ givaro (liblapack.override {shared = true;}) openblas];
|
||||||
|
@ -62,7 +62,7 @@ stdenv.mkDerivation rec {
|
|||||||
ln -s ${appliance} $out/lib/guestfs
|
ln -s ${appliance} $out/lib/guestfs
|
||||||
'';
|
'';
|
||||||
|
|
||||||
doInstallCheck = true;
|
doInstallCheck = appliance != null;
|
||||||
installCheckPhase = ''
|
installCheckPhase = ''
|
||||||
export HOME=$(mktemp -d) # avoid access to /homeless-shelter/.guestfish
|
export HOME=$(mktemp -d) # avoid access to /homeless-shelter/.guestfish
|
||||||
|
|
||||||
|
@ -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
|
let
|
||||||
version = "1.3.0";
|
version = "1.3.0";
|
||||||
@ -12,6 +12,14 @@ in stdenv.mkDerivation rec {
|
|||||||
sha256 = "0b7aynr6ggigwhjkfzi8x3dwz15blj4grkg9hysbgjh6lvzpy9jc";
|
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 ];
|
nativeBuildInputs = [ autoconf automake intltool libtool pkgconfig ];
|
||||||
|
|
||||||
buildInputs = [ glib ];
|
buildInputs = [ glib ];
|
||||||
|
@ -29,15 +29,13 @@ in stdenv.mkDerivation rec {
|
|||||||
alsaLib ffmpeg libjack2 libudev libva xorg.libX11 sbc SDL2
|
alsaLib ffmpeg libjack2 libudev libva xorg.libX11 sbc SDL2
|
||||||
];
|
];
|
||||||
|
|
||||||
patches = [
|
|
||||||
./fix-paths.patch
|
|
||||||
];
|
|
||||||
|
|
||||||
mesonFlags = [
|
mesonFlags = [
|
||||||
"-Denable_docs=true"
|
"-Denable_docs=true"
|
||||||
"-Denable_gstreamer=true"
|
"-Denable_gstreamer=true"
|
||||||
];
|
];
|
||||||
|
|
||||||
|
PKG_CONFIG_SYSTEMD_SYSTEMDUSERUNITDIR = "${placeholder "out"}/lib/systemd/user";
|
||||||
|
|
||||||
FONTCONFIG_FILE = fontsConf; # Fontconfig error: Cannot load default config file
|
FONTCONFIG_FILE = fontsConf; # Fontconfig error: Cannot load default config file
|
||||||
|
|
||||||
doCheck = true;
|
doCheck = true;
|
||||||
|
@ -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)
|
|
||||||
|
|
@ -19,23 +19,18 @@ in stdenv.mkDerivation rec {
|
|||||||
};
|
};
|
||||||
|
|
||||||
buildInputs = [
|
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
|
libjpeg_turbo zlib cyrus_sasl python pygtk usbredir gtk3 epoxy
|
||||||
polkit acl usbutils
|
polkit acl usbutils
|
||||||
];
|
];
|
||||||
|
|
||||||
nativeBuildInputs = [ pkgconfig gettext libsoup autoreconfHook vala ];
|
nativeBuildInputs = [ pkgconfig gettext libsoup autoreconfHook vala gobjectIntrospection ];
|
||||||
|
|
||||||
NIX_CFLAGS_COMPILE = "-fno-stack-protector";
|
PKG_CONFIG_POLKIT_GOBJECT_1_POLICYDIR = "${placeholder "out"}/share/polkit-1/actions";
|
||||||
|
|
||||||
# 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"
|
|
||||||
'';
|
|
||||||
|
|
||||||
configureFlags = [
|
configureFlags = [
|
||||||
"--with-gtk3"
|
"--with-gtk3"
|
||||||
|
"--enable-introspection"
|
||||||
"--enable-vala"
|
"--enable-vala"
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -12,6 +12,7 @@
|
|||||||
, certificateFile ? null
|
, certificateFile ? null
|
||||||
, certificatePassword ? null
|
, certificatePassword ? null
|
||||||
, provisioningProfile ? null
|
, provisioningProfile ? null
|
||||||
|
, signMethod ? null
|
||||||
, generateIPA ? false
|
, generateIPA ? false
|
||||||
, generateXCArchive ? false
|
, generateXCArchive ? false
|
||||||
, enableWirelessDistribution ? false
|
, enableWirelessDistribution ? false
|
||||||
@ -21,7 +22,7 @@
|
|||||||
, title ? null
|
, 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;
|
assert enableWirelessDistribution -> installURL != null && bundleId != null && version != null && title != null;
|
||||||
|
|
||||||
let
|
let
|
||||||
@ -82,13 +83,34 @@ stdenv.mkDerivation {
|
|||||||
# Do the building
|
# 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
|
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 release ''
|
||||||
${stdenv.lib.optionalString generateIPA ''
|
${stdenv.lib.optionalString generateIPA ''
|
||||||
|
# Create export plist file
|
||||||
|
cat > "${name}.plist" <<EOF
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
|
<plist version="1.0">
|
||||||
|
<dict>
|
||||||
|
<key>provisioningProfiles</key>
|
||||||
|
<dict>
|
||||||
|
<key>${bundleId}</key>
|
||||||
|
<string>$PROVISIONING_PROFILE</string>
|
||||||
|
</dict>
|
||||||
|
<key>method</key>
|
||||||
|
<string>${signMethod}</string>
|
||||||
|
${stdenv.lib.optionalString (signMethod == "enterprise" || signMethod == "ad-hoc") ''
|
||||||
|
<key>compileBitcode</key>
|
||||||
|
<false/>
|
||||||
|
''}
|
||||||
|
</dict>
|
||||||
|
</plist>
|
||||||
|
EOF
|
||||||
|
|
||||||
# Produce an IPA file
|
# 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
|
# Add IPA to Hydra build products
|
||||||
mkdir -p $out/nix-support
|
mkdir -p $out/nix-support
|
||||||
echo "file binary-dist \"$(echo $out/*.ipa)\"" > $out/nix-support/hydra-build-products
|
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
|
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
|
# Delete our temp keychain
|
||||||
${deleteKeychain}
|
${deleteKeychain}
|
||||||
|
@ -24,16 +24,16 @@
|
|||||||
|
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
pname = "notebook";
|
pname = "notebook";
|
||||||
version = "5.4.0";
|
version = "5.4.1";
|
||||||
|
|
||||||
src = fetchPypi {
|
src = fetchPypi {
|
||||||
inherit pname version;
|
inherit pname version;
|
||||||
sha256 = "dd431fad9bdd25aa9ff8265da096ef770475e21bf1d327982611a7de5cd904ca";
|
sha256 = "01l6yp78sp27vns4cxh8ybr7x0pixxn97cp0i3w6s0lv1v8l6qbx";
|
||||||
};
|
};
|
||||||
|
|
||||||
LC_ALL = "en_US.utf8";
|
LC_ALL = "en_US.utf8";
|
||||||
|
|
||||||
buildInputs = [ nose glibcLocales ]
|
checkInputs = [ nose glibcLocales ]
|
||||||
++ (if isPy3k then [ nose_warnings_filters ] else [ mock ]);
|
++ (if isPy3k then [ nose_warnings_filters ] else [ mock ]);
|
||||||
|
|
||||||
propagatedBuildInputs = [
|
propagatedBuildInputs = [
|
||||||
@ -44,8 +44,8 @@ buildPythonPackage rec {
|
|||||||
# disable warning_filters
|
# disable warning_filters
|
||||||
preCheck = lib.optionalString (!isPy3k) ''
|
preCheck = lib.optionalString (!isPy3k) ''
|
||||||
echo "" > setup.cfg
|
echo "" > setup.cfg
|
||||||
cat setup.cfg
|
|
||||||
'';
|
'';
|
||||||
|
|
||||||
checkPhase = ''
|
checkPhase = ''
|
||||||
runHook preCheck
|
runHook preCheck
|
||||||
mkdir tmp
|
mkdir tmp
|
||||||
|
50
pkgs/development/tools/haskell/hyper-haskell/default.nix
Normal file
50
pkgs/development/tools/haskell/hyper-haskell/default.nix
Normal file
@ -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 <<EOF
|
||||||
|
#!${stdenv.shell}
|
||||||
|
export PATH="${binPath}:\$PATH"
|
||||||
|
exec ${electron}/bin/electron $out/app "\$@"
|
||||||
|
EOF
|
||||||
|
chmod 755 $out/bin/hyper-haskell
|
||||||
|
'';
|
||||||
|
|
||||||
|
meta = with stdenv.lib; {
|
||||||
|
description = "The strongly hyped graphical interpreter for the Haskell programming language";
|
||||||
|
homepage = "https://github.com/HeinrichApfelmus/hyper-haskell";
|
||||||
|
license = licenses.bsd3;
|
||||||
|
maintainers = [ maintainers.rvl ];
|
||||||
|
};
|
||||||
|
}
|
21
pkgs/development/tools/haskell/hyper-haskell/server.nix
Normal file
21
pkgs/development/tools/haskell/hyper-haskell/server.nix
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
{ stdenv, ghcWithPackages, makeWrapper, packages }:
|
||||||
|
|
||||||
|
let
|
||||||
|
hyperHaskellEnv = ghcWithPackages (self: [ self.hyper-haskell-server ] ++ packages self);
|
||||||
|
in stdenv.mkDerivation {
|
||||||
|
name = "hyper-haskell-server-with-packages";
|
||||||
|
|
||||||
|
nativeBuildInputs = [ makeWrapper ];
|
||||||
|
|
||||||
|
buildCommand = ''
|
||||||
|
mkdir -p $out/bin
|
||||||
|
makeWrapper ${hyperHaskellEnv}/bin/hyper-haskell-server $out/bin/hyper-haskell-server \
|
||||||
|
--set NIX_GHC ${hyperHaskellEnv}/bin/ghc \
|
||||||
|
--set NIX_GHCPKG ${hyperHaskellEnv}/bin/ghc-pkg \
|
||||||
|
--set NIX_GHC_LIBDIR ${hyperHaskellEnv}/lib/ghc-*
|
||||||
|
'';
|
||||||
|
|
||||||
|
# trivial derivation
|
||||||
|
preferLocalBuild = true;
|
||||||
|
allowSubstitutes = false;
|
||||||
|
}
|
42
pkgs/misc/cups/drivers/brlaser/default.nix
Normal file
42
pkgs/misc/cups/drivers/brlaser/default.nix
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
{ stdenv, fetchFromGitHub, cmake, zlib, cups, ghostscript }:
|
||||||
|
|
||||||
|
stdenv.mkDerivation rec {
|
||||||
|
|
||||||
|
name = "brlaser";
|
||||||
|
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "pdewacht";
|
||||||
|
repo = "brlaser";
|
||||||
|
rev = "a52149823373e11f918d9e6a56eda7242935c99b";
|
||||||
|
sha256 = "12d8g0aispdj2virf6vrvb0vx6d6ardjg3qyav75shsm1f94ids6";
|
||||||
|
};
|
||||||
|
|
||||||
|
buildInputs = [ cmake zlib cups ];
|
||||||
|
|
||||||
|
preConfigure = ''
|
||||||
|
cmakeFlags="$cmakeFlags -DCUPS_SERVER_BIN=$out/lib/cups/ -DCUPS_DATA_DIR=$out/share/cups/"
|
||||||
|
'';
|
||||||
|
|
||||||
|
meta = with stdenv.lib; {
|
||||||
|
description = "A CUPS driver for Brother laser printers";
|
||||||
|
longDescription =
|
||||||
|
''
|
||||||
|
Although most Brother printers support a standard printer language such as PCL or PostScript, not all do. If you have a monochrome Brother laser printer (or multi-function device) and the other open source drivers don't work, this one might help.
|
||||||
|
|
||||||
|
This driver is known to work with these printers:
|
||||||
|
|
||||||
|
Brother DCP-1510
|
||||||
|
Brother DCP-7030
|
||||||
|
Brother DCP-7040
|
||||||
|
Brother DCP-7055
|
||||||
|
Brother DCP-7055W
|
||||||
|
Brother DCP-7065DN
|
||||||
|
Brother HL-L2300D
|
||||||
|
Brother MFC-7360N
|
||||||
|
'';
|
||||||
|
homepage = https://github.com/pdewacht/brlaser;
|
||||||
|
license = licenses.gpl2;
|
||||||
|
platforms = platforms.unix;
|
||||||
|
maintainers = with maintainers; [ StijnDW ];
|
||||||
|
};
|
||||||
|
}
|
@ -2,13 +2,13 @@
|
|||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
name = "adapta-gtk-theme-${version}";
|
name = "adapta-gtk-theme-${version}";
|
||||||
version = "3.93.0.1";
|
version = "3.93.0.174";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "adapta-project";
|
owner = "adapta-project";
|
||||||
repo = "adapta-gtk-theme";
|
repo = "adapta-gtk-theme";
|
||||||
rev = version;
|
rev = version;
|
||||||
sha256 = "0l662l66ja8dsakcgwg6ab69lkl0va0r5h74dr6yjdsy0q4h2m7h";
|
sha256 = "0fkvcpx2vhyr3z74r5mcpjh293w3cfm07axj8dj84nl2hi6im8b6";
|
||||||
};
|
};
|
||||||
|
|
||||||
preferLocalBuild = true;
|
preferLocalBuild = true;
|
||||||
|
@ -17,13 +17,8 @@ stdenv.mkDerivation rec {
|
|||||||
|
|
||||||
buildInputs = [ dbus glib linuxHeaders systemd ];
|
buildInputs = [ dbus glib linuxHeaders systemd ];
|
||||||
|
|
||||||
enableParallelBuilding = true;
|
PKG_CONFIG_SYSTEMD_SYSTEMDSYSTEMUNITDIR = "${placeholder "out"}/lib/systemd/system";
|
||||||
|
PKG_CONFIG_SYSTEMD_SYSTEMDUSERUNITDIR = "${placeholder "out"}/lib/systemd/user";
|
||||||
prePatch = ''
|
|
||||||
substituteInPlace meson.build \
|
|
||||||
--replace "dep_systemd.get_pkgconfig_variable('systemdsystemunitdir')" "'$out/lib/systemd/system'" \
|
|
||||||
--replace "dep_systemd.get_pkgconfig_variable('systemduserunitdir')" "'$out/lib/systemd/user'"
|
|
||||||
'';
|
|
||||||
|
|
||||||
postInstall = ''
|
postInstall = ''
|
||||||
install -Dm644 ../README $out/share/doc/dbus-broker/README
|
install -Dm644 ../README $out/share/doc/dbus-broker/README
|
||||||
@ -32,8 +27,6 @@ stdenv.mkDerivation rec {
|
|||||||
-e 's,^ExecReload.*busctl,ExecReload=${systemd}/bin/busctl,'
|
-e 's,^ExecReload.*busctl,ExecReload=${systemd}/bin/busctl,'
|
||||||
'';
|
'';
|
||||||
|
|
||||||
checkPhase = "ninja test";
|
|
||||||
|
|
||||||
doCheck = true;
|
doCheck = true;
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with stdenv.lib; {
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
{ stdenv, fetchurl }:
|
{ stdenv, fetchurl }:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
name = "hdparm-9.54";
|
name = "hdparm-9.55";
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "mirror://sourceforge/hdparm/${name}.tar.gz";
|
url = "mirror://sourceforge/hdparm/${name}.tar.gz";
|
||||||
sha256 = "0ghnhdj7wfw6acfyhdawpfa5n9kvkvzgi1fw6i7sghgbjx5nhyjd";
|
sha256 = "1ivdvrzimaayiq03by8mcq0mhmdljndj06h012zkdpw34irnpixm";
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
{ stdenv, buildPackages, hostPlatform, fetchurl, perl, buildLinux, ... } @ args:
|
{ stdenv, buildPackages, hostPlatform, fetchurl, perl, buildLinux, ... } @ args:
|
||||||
|
|
||||||
buildLinux (args // rec {
|
buildLinux (args // rec {
|
||||||
version = "4.4.122";
|
version = "4.4.123";
|
||||||
extraMeta.branch = "4.4";
|
extraMeta.branch = "4.4";
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "mirror://kernel/linux/kernel/v4.x/linux-${version}.tar.xz";
|
url = "mirror://kernel/linux/kernel/v4.x/linux-${version}.tar.xz";
|
||||||
sha256 = "1hxph2bn2wdamk1p5sxl2szgsk4aybb0245x1rvf85a6skhjqc7g";
|
sha256 = "115mvgwcx2syjrn943k4qqyvqkysdm6rgq97dhf1gcxf671qb204";
|
||||||
};
|
};
|
||||||
} // (args.argsOverride or {}))
|
} // (args.argsOverride or {}))
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
{ stdenv, buildPackages, hostPlatform, fetchurl, perl, buildLinux, ... } @ args:
|
{ stdenv, buildPackages, hostPlatform, fetchurl, perl, buildLinux, ... } @ args:
|
||||||
|
|
||||||
buildLinux (args // rec {
|
buildLinux (args // rec {
|
||||||
version = "4.9.88";
|
version = "4.9.89";
|
||||||
extraMeta.branch = "4.9";
|
extraMeta.branch = "4.9";
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "mirror://kernel/linux/kernel/v4.x/linux-${version}.tar.xz";
|
url = "mirror://kernel/linux/kernel/v4.x/linux-${version}.tar.xz";
|
||||||
sha256 = "094cxc86ajnsai1vwy76mmg7l3b9lvhk6mw6746lsr3fnzv1fkq7";
|
sha256 = "0a9l2gkyr1nhaak6vyjwgjn01ywpxwa8zp5fhw8rjnfk44bf2hql";
|
||||||
};
|
};
|
||||||
} // (args.argsOverride or {}))
|
} // (args.argsOverride or {}))
|
||||||
|
@ -3,9 +3,9 @@
|
|||||||
with stdenv.lib;
|
with stdenv.lib;
|
||||||
|
|
||||||
let
|
let
|
||||||
version = "4.15.11";
|
version = "4.15.12";
|
||||||
revision = "a";
|
revision = "a";
|
||||||
sha256 = "09xyg3i2m5cv9cpl3pry579p40iphzsn1pif7046rvc7zfrjzl8d";
|
sha256 = "1n0sqhqvm9p6w1yh7si8rw84qxf9c5kch7pvjyrp51ir1xh7grfr";
|
||||||
|
|
||||||
# modVersion needs to be x.y.z, will automatically add .0 if needed
|
# modVersion needs to be x.y.z, will automatically add .0 if needed
|
||||||
modVersion = concatStrings (intersperse "." (take 3 (splitString "." "${version}.0")));
|
modVersion = concatStrings (intersperse "." (take 3 (splitString "." "${version}.0")));
|
||||||
|
@ -4,14 +4,14 @@
|
|||||||
|
|
||||||
assert enableSeccomp -> libseccomp != null;
|
assert enableSeccomp -> libseccomp != null;
|
||||||
|
|
||||||
let version = "9.12.0"; in
|
let version = "9.12.1"; in
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
name = "bind-${version}";
|
name = "bind-${version}";
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "http://ftp.isc.org/isc/bind9/${version}/${name}.tar.gz";
|
url = "http://ftp.isc.org/isc/bind9/${version}/${name}.tar.gz";
|
||||||
sha256 = "10iwkghl5g50b7wc17bsb9wa0dh2gd57bjlk6ynixhywz6dhx1r9";
|
sha256 = "043mjcw405qa0ghm5dkhfsq35gsy279724fz3mjqpr1mbi14dr0n";
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = [ "out" "lib" "dev" "man" "dnsutils" "host" ];
|
outputs = [ "out" "lib" "dev" "man" "dnsutils" "host" ];
|
||||||
|
@ -2,11 +2,11 @@
|
|||||||
|
|
||||||
python3Packages.buildPythonApplication rec {
|
python3Packages.buildPythonApplication rec {
|
||||||
name = "nextcloud-news-updater-${version}";
|
name = "nextcloud-news-updater-${version}";
|
||||||
version = "10.0.0";
|
version = "10.0.1";
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "mirror://pypi/n/nextcloud_news_updater/nextcloud_news_updater-${version}.tar.gz";
|
url = "mirror://pypi/n/nextcloud_news_updater/nextcloud_news_updater-${version}.tar.gz";
|
||||||
sha256 = "00pscz0p4s10y1ymb6sm0gx4a5wdbhimn30582x8i28n58nnl8j0";
|
sha256 = "14jj3w417wfsm1ki34d980b0s6vfn8i29g4c66qb2fizdq1d0z6q";
|
||||||
};
|
};
|
||||||
|
|
||||||
doCheck = false;
|
doCheck = false;
|
||||||
|
@ -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);
|
|
@ -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 ];
|
|
||||||
};
|
|
||||||
}
|
|
@ -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) {
|
|
||||||
|
|
@ -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;
|
|
||||||
}
|
|
@ -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
|
|
30
pkgs/servers/serviio/default.nix
Normal file
30
pkgs/servers/serviio/default.nix
Normal file
@ -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;
|
||||||
|
};
|
||||||
|
}
|
@ -1,14 +1,13 @@
|
|||||||
{ stdenv, fetchurl, libidn, openssl, makeWrapper, fetchhg
|
{ stdenv, fetchurl, libidn, openssl, makeWrapper, fetchhg
|
||||||
, lua5, luasocket, luasec, luaexpat, luafilesystem, luabitop
|
, lua5, luasocket, luasec, luaexpat, luafilesystem, luabitop
|
||||||
, withLibevent ? true, luaevent ? null
|
, withLibevent ? true, luaevent ? null
|
||||||
, withZlib ? true, luazlib ? null
|
|
||||||
, withDBI ? true, luadbi ? null
|
, withDBI ? true, luadbi ? null
|
||||||
# use withExtraLibs to add additional dependencies of community modules
|
# use withExtraLibs to add additional dependencies of community modules
|
||||||
, withExtraLibs ? [ ]
|
, withExtraLibs ? [ ]
|
||||||
|
, withOnlyInstalledCommunityModules ? [ ]
|
||||||
, withCommunityModules ? [ ] }:
|
, withCommunityModules ? [ ] }:
|
||||||
|
|
||||||
assert withLibevent -> luaevent != null;
|
assert withLibevent -> luaevent != null;
|
||||||
assert withZlib -> luazlib != null;
|
|
||||||
assert withDBI -> luadbi != null;
|
assert withDBI -> luadbi != null;
|
||||||
|
|
||||||
with stdenv.lib;
|
with stdenv.lib;
|
||||||
@ -16,7 +15,6 @@ with stdenv.lib;
|
|||||||
let
|
let
|
||||||
libs = [ luasocket luasec luaexpat luafilesystem luabitop ]
|
libs = [ luasocket luasec luaexpat luafilesystem luabitop ]
|
||||||
++ optional withLibevent luaevent
|
++ optional withLibevent luaevent
|
||||||
++ optional withZlib luazlib
|
|
||||||
++ optional withDBI luadbi
|
++ optional withDBI luadbi
|
||||||
++ withExtraLibs;
|
++ withExtraLibs;
|
||||||
getPath = lib : type : "${lib}/lib/lua/${lua5.luaversion}/?.${type};${lib}/share/lua/${lua5.luaversion}/?.${type}";
|
getPath = lib : type : "${lib}/lib/lua/${lua5.luaversion}/?.${type};${lib}/share/lua/${lua5.luaversion}/?.${type}";
|
||||||
@ -27,21 +25,22 @@ let
|
|||||||
in
|
in
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
version = "0.9.12";
|
version = "0.10.0";
|
||||||
name = "prosody-${version}";
|
name = "prosody-${version}";
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "http://prosody.im/downloads/source/${name}.tar.gz";
|
url = "http://prosody.im/downloads/source/${name}.tar.gz";
|
||||||
sha256 = "139yxqpinajl32ryrybvilh54ddb1q6s0ajjhlcs4a0rnwia6n8s";
|
sha256 = "1644jy5dk46vahmh6nna36s79k8k668sbi3qamjb4q3c4m3y853l";
|
||||||
};
|
};
|
||||||
|
|
||||||
communityModules = fetchhg {
|
communityModules = fetchhg {
|
||||||
url = "https://hg.prosody.im/prosody-modules";
|
url = "https://hg.prosody.im/prosody-modules";
|
||||||
rev = "9a3e51f348fe";
|
rev = "150a7bd59043";
|
||||||
sha256 = "09g4vi52rv0r3jzcm0bsgp4ngqq6iapfbxfh0l7qj36qnajp4vm6";
|
sha256 = "0nfx3lngcy88nd81gb7v4kh3nz1bzsm67bxgpd2lprk54diqcrz1";
|
||||||
};
|
};
|
||||||
|
|
||||||
buildInputs = [ lua5 makeWrapper libidn openssl ];
|
buildInputs = [ lua5 makeWrapper libidn openssl ]
|
||||||
|
++ optional withDBI luadbi;
|
||||||
|
|
||||||
configureFlags = [
|
configureFlags = [
|
||||||
"--ostype=linux"
|
"--ostype=linux"
|
||||||
@ -52,7 +51,7 @@ stdenv.mkDerivation rec {
|
|||||||
postInstall = ''
|
postInstall = ''
|
||||||
${concatMapStringsSep "\n" (module: ''
|
${concatMapStringsSep "\n" (module: ''
|
||||||
cp -r $communityModules/mod_${module} $out/lib/prosody/modules/
|
cp -r $communityModules/mod_${module} $out/lib/prosody/modules/
|
||||||
'') withCommunityModules}
|
'') (withCommunityModules ++ withOnlyInstalledCommunityModules)}
|
||||||
wrapProgram $out/bin/prosody \
|
wrapProgram $out/bin/prosody \
|
||||||
--set LUA_PATH '${luaPath};' \
|
--set LUA_PATH '${luaPath};' \
|
||||||
--set LUA_CPATH '${luaCPath};'
|
--set LUA_CPATH '${luaCPath};'
|
||||||
@ -62,11 +61,13 @@ stdenv.mkDerivation rec {
|
|||||||
--set LUA_CPATH '${luaCPath};'
|
--set LUA_CPATH '${luaCPath};'
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
passthru.communityModules = withCommunityModules;
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
description = "Open-source XMPP application server written in Lua";
|
description = "Open-source XMPP application server written in Lua";
|
||||||
license = licenses.mit;
|
license = licenses.mit;
|
||||||
homepage = http://www.prosody.im;
|
homepage = https://prosody.im;
|
||||||
platforms = platforms.linux;
|
platforms = platforms.linux;
|
||||||
maintainers = [ ];
|
maintainers = with maintainers; [ fpletz globin ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -1,18 +1,16 @@
|
|||||||
{ stdenv, fetchurl, bash-completion
|
{ stdenv, fetchurl, bash-completion
|
||||||
, glib, polkit, pkgconfig, gettext, gusb, lcms2, sqlite, systemd, dbus
|
, 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 }:
|
, libgudev, sane-backends, udev, gnome3, makeWrapper }:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
name = "colord-1.4.1";
|
name = "colord-1.4.2";
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "http://www.freedesktop.org/software/colord/releases/${name}.tar.xz";
|
url = "http://www.freedesktop.org/software/colord/releases/${name}.tar.xz";
|
||||||
sha256 = "0m854clp8szvq38z16jpazzlqfb3lb3icxcfnsisfrc25748y1ib";
|
sha256 = "19zc9gldz469jshl16av7na459kwr5nhvs2pz98xm5lw582xaw2c";
|
||||||
};
|
};
|
||||||
|
|
||||||
enableParallelBuilding = true;
|
|
||||||
|
|
||||||
mesonFlags = [
|
mesonFlags = [
|
||||||
"-Denable-sane=true"
|
"-Denable-sane=true"
|
||||||
"-Denable-vala=true"
|
"-Denable-vala=true"
|
||||||
@ -23,19 +21,20 @@ stdenv.mkDerivation rec {
|
|||||||
"-Denable-docs=false"
|
"-Denable-docs=false"
|
||||||
];
|
];
|
||||||
|
|
||||||
patches = [
|
nativeBuildInputs = [ meson pkgconfig vala_0_40 ninja gettext libxml2 gobjectIntrospection makeWrapper ];
|
||||||
./fix-build-paths.patch
|
|
||||||
];
|
|
||||||
|
|
||||||
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 = ''
|
postInstall = ''
|
||||||
glib-compile-schemas $out/share/glib-2.0/schemas
|
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 = ''
|
postFixup = ''
|
||||||
wrapProgram "$out/libexec/colord-session" \
|
wrapProgram "$out/libexec/colord-session" \
|
||||||
--prefix XDG_DATA_DIRS : "$GSETTINGS_SCHEMAS_PATH:$out/share" \
|
--prefix XDG_DATA_DIRS : "$GSETTINGS_SCHEMAS_PATH:$out/share" \
|
||||||
|
@ -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,
|
|
@ -4,13 +4,13 @@
|
|||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
name = "fwup-${version}";
|
name = "fwup-${version}";
|
||||||
version = "0.18.1";
|
version = "1.0.0";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "fhunleth";
|
owner = "fhunleth";
|
||||||
repo = "fwup";
|
repo = "fwup";
|
||||||
rev = "v${version}";
|
rev = "v${version}";
|
||||||
sha256 = "0qdld8jy1rkpfzbfhnssr58q1gciln3pw9m6fj0jarfgja4gj31l";
|
sha256 = "1v79q5s4lm8scrz9nmqcszyh40is6k7hkr15r4aljyfbp1gamsfs";
|
||||||
};
|
};
|
||||||
|
|
||||||
doCheck = true;
|
doCheck = true;
|
||||||
|
@ -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;
|
|
||||||
};
|
|
||||||
}
|
|
@ -3904,8 +3904,6 @@ with pkgs;
|
|||||||
|
|
||||||
nitrogen = callPackage ../tools/X11/nitrogen {};
|
nitrogen = callPackage ../tools/X11/nitrogen {};
|
||||||
|
|
||||||
nixbot = callPackage ../tools/misc/nixbot {};
|
|
||||||
|
|
||||||
notify-desktop = callPackage ../tools/misc/notify-desktop {};
|
notify-desktop = callPackage ../tools/misc/notify-desktop {};
|
||||||
|
|
||||||
nkf = callPackage ../tools/text/nkf {};
|
nkf = callPackage ../tools/text/nkf {};
|
||||||
@ -5036,10 +5034,15 @@ with pkgs;
|
|||||||
|
|
||||||
tewisay = callPackage ../tools/misc/tewisay { };
|
tewisay = callPackage ../tools/misc/tewisay { };
|
||||||
|
|
||||||
texmacs = callPackage ../applications/editors/texmacs {
|
texmacs = if stdenv.isDarwin
|
||||||
tex = texlive.combined.scheme-small;
|
then callPackage ../applications/editors/texmacs/darwin.nix {
|
||||||
extraFonts = true;
|
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 { };
|
texmaker = libsForQt5.callPackage ../applications/editors/texmaker { };
|
||||||
|
|
||||||
@ -12252,8 +12255,9 @@ with pkgs;
|
|||||||
hyp = callPackage ../servers/http/hyp/default.nix { };
|
hyp = callPackage ../servers/http/hyp/default.nix { };
|
||||||
|
|
||||||
prosody = callPackage ../servers/xmpp/prosody {
|
prosody = callPackage ../servers/xmpp/prosody {
|
||||||
lua5 = lua5_1;
|
# _compat can probably be removed on next minor version after 0.10.0
|
||||||
inherit (lua51Packages) luasocket luasec luaexpat luafilesystem luabitop luaevent luazlib luadbi;
|
lua5 = lua5_2_compat;
|
||||||
|
inherit (lua52Packages) luasocket luasec luaexpat luafilesystem luabitop luaevent luadbi;
|
||||||
};
|
};
|
||||||
|
|
||||||
biboumi = callPackage ../servers/xmpp/biboumi { };
|
biboumi = callPackage ../servers/xmpp/biboumi { };
|
||||||
@ -12422,7 +12426,6 @@ with pkgs;
|
|||||||
oauth2_proxy = callPackage ../servers/oauth2_proxy { };
|
oauth2_proxy = callPackage ../servers/oauth2_proxy { };
|
||||||
|
|
||||||
openafs = callPackage ../servers/openafs { tsmbac = null; ncurses = null; };
|
openafs = callPackage ../servers/openafs { tsmbac = null; ncurses = null; };
|
||||||
openpts = callPackage ../servers/openpts { };
|
|
||||||
|
|
||||||
openresty = callPackage ../servers/http/openresty { };
|
openresty = callPackage ../servers/http/openresty { };
|
||||||
|
|
||||||
@ -16036,6 +16039,20 @@ with pkgs;
|
|||||||
hyper = callPackage ../applications/misc/hyper { inherit (gnome2) GConf; };
|
hyper = callPackage ../applications/misc/hyper { inherit (gnome2) GConf; };
|
||||||
hyperterm = self.hyper;
|
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 { };
|
jackline = callPackage ../applications/networking/instant-messengers/jackline { };
|
||||||
|
|
||||||
slack = callPackage ../applications/networking/instant-messengers/slack { };
|
slack = callPackage ../applications/networking/instant-messengers/slack { };
|
||||||
@ -16746,6 +16763,8 @@ with pkgs;
|
|||||||
|
|
||||||
mtpaint = callPackage ../applications/graphics/mtpaint { };
|
mtpaint = callPackage ../applications/graphics/mtpaint { };
|
||||||
|
|
||||||
|
mucommander = callPackage ../applications/misc/mucommander { };
|
||||||
|
|
||||||
multimarkdown = callPackage ../tools/typesetting/multimarkdown { };
|
multimarkdown = callPackage ../tools/typesetting/multimarkdown { };
|
||||||
|
|
||||||
multimon-ng = callPackage ../applications/misc/multimon-ng { };
|
multimon-ng = callPackage ../applications/misc/multimon-ng { };
|
||||||
@ -20608,6 +20627,8 @@ with pkgs;
|
|||||||
snapscanFirmware = config.sane.snapscanFirmware or null;
|
snapscanFirmware = config.sane.snapscanFirmware or null;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
brlaser = callPackage ../misc/cups/drivers/brlaser { };
|
||||||
|
|
||||||
brscan4 = callPackage ../applications/graphics/sane/backends/brscan4 { };
|
brscan4 = callPackage ../applications/graphics/sane/backends/brscan4 { };
|
||||||
|
|
||||||
mkSaneConfig = callPackage ../applications/graphics/sane/config.nix { };
|
mkSaneConfig = callPackage ../applications/graphics/sane/config.nix { };
|
||||||
@ -20626,6 +20647,8 @@ with pkgs;
|
|||||||
|
|
||||||
seafile-shared = callPackage ../misc/seafile-shared { };
|
seafile-shared = callPackage ../misc/seafile-shared { };
|
||||||
|
|
||||||
|
serviio = callPackage ../servers/serviio {};
|
||||||
|
|
||||||
slock = callPackage ../misc/screensavers/slock {
|
slock = callPackage ../misc/screensavers/slock {
|
||||||
conf = config.slock.conf or null;
|
conf = config.slock.conf or null;
|
||||||
};
|
};
|
||||||
|
@ -167,15 +167,14 @@ let
|
|||||||
};
|
};
|
||||||
|
|
||||||
luaevent = buildLuaPackage rec {
|
luaevent = buildLuaPackage rec {
|
||||||
version = "0.4.3";
|
version = "0.4.4";
|
||||||
name = "luaevent-${version}";
|
name = "luaevent-${version}";
|
||||||
disabled = isLua52;
|
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "harningt";
|
owner = "harningt";
|
||||||
repo = "luaevent";
|
repo = "luaevent";
|
||||||
rev = "v${version}";
|
rev = "v${version}";
|
||||||
sha256 = "1c1n2zqx5rwfwkqaq1jj8gvx1vswvbihj2sy445w28icz1xfhpik";
|
sha256 = "1krzxr0jkv3gmhpckp02byhdd9s5dd0hpyqc8irc8i79dd8x0p53";
|
||||||
};
|
};
|
||||||
|
|
||||||
preBuild = ''
|
preBuild = ''
|
||||||
|
@ -6350,19 +6350,19 @@ let self = _self // overrides; _self = with self; {
|
|||||||
};
|
};
|
||||||
|
|
||||||
GSSAPI = buildPerlPackage rec {
|
GSSAPI = buildPerlPackage rec {
|
||||||
name = "GSSAPPI-0.28";
|
name = "GSSAPI-0.28";
|
||||||
src = fetchurl {
|
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";
|
sha256 = "1mkhwxjjlhr58pd770i9gnf7zy7jj092iv6jfbnb8bvnc5xjr3vx";
|
||||||
};
|
};
|
||||||
buildInputs = [ TestPod ];
|
buildInputs = [ TestPod ];
|
||||||
propagatedBuildInputs = [ pkgs.heimdalFull ];
|
propagatedBuildInputs = [ pkgs.krb5Full.dev ];
|
||||||
meta = {
|
meta = {
|
||||||
maintainers = [ maintainers.limeytexan ];
|
maintainers = [ maintainers.limeytexan ];
|
||||||
description = "Perl extension providing access to the GSSAPIv2 library";
|
description = "Perl extension providing access to the GSSAPIv2 library";
|
||||||
license = with stdenv.lib.licenses; [ artistic1 gpl1Plus ];
|
license = with stdenv.lib.licenses; [ artistic1 gpl1Plus ];
|
||||||
};
|
};
|
||||||
makeMakerFlags = "--gssapiimpl ${pkgs.heimdalFull.out}";
|
makeMakerFlags = "--gssapiimpl ${pkgs.krb5Full.dev}";
|
||||||
};
|
};
|
||||||
|
|
||||||
Gtk2 = buildPerlPackage rec {
|
Gtk2 = buildPerlPackage rec {
|
||||||
@ -16529,11 +16529,14 @@ let self = _self // overrides; _self = with self; {
|
|||||||
};
|
};
|
||||||
|
|
||||||
YAMLLibYAML = buildPerlPackage rec {
|
YAMLLibYAML = buildPerlPackage rec {
|
||||||
name = "YAML-LibYAML-0.59";
|
name = "YAML-LibYAML-0.69";
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "mirror://cpan/authors/id/I/IN/INGY/${name}.tar.gz";
|
url = "mirror://cpan/authors/id/T/TI/TINITA/${name}.tar.gz";
|
||||||
sha256 = "0m4zr6gm5rzwvxwd2x7rklr659jl8gsa5bxc5h25904nbvpj9x4x";
|
sha256 = "06msvj3vmjszl5zj1k7g47ll0kkds9gdb5sky0q27lh4zw1vlj33";
|
||||||
};
|
};
|
||||||
|
preBuild = ''
|
||||||
|
sed -i 's/FULLPERL *= "/FULLPERL = /' LibYAML/Makefile
|
||||||
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
WebServiceLinode = buildPerlModule rec {
|
WebServiceLinode = buildPerlModule rec {
|
||||||
|
Loading…
Reference in New Issue
Block a user