git.iko.soy/typeable/nixpkgs
on master help sign in
Merge master into staging-next
commit54065ae20d6c91cab54aa706d6e819baf673b80c authorFrederik Rietdijk <fridh@fridh.nl> dateSat 13 Jul 2019, 09:45 (7 years ago) parent22cb7f27803ff3
125 files changed+2484−1506
doc/stdenv.xml−1 lib/tests/release.nix+4−11 maintainers/maintainer-list.nix+15 nixos/doc/manual/release-notes/rl-1909.xml+14−3 nixos/modules/hardware/opengl.nix+15−5 nixos/modules/hardware/video/amdgpu-pro.nix+2−1 nixos/modules/hardware/video/ati.nix+2−1 nixos/modules/hardware/video/nvidia.nix−1 nixos/modules/misc/ids.nix+1−1 nixos/modules/module-list.nix+2 nixos/modules/rename.nix+4 nixos/modules/services/monitoring/zabbix-agent.nix+104−59 nixos/modules/services/monitoring/zabbix-proxy.nix+290 nixos/modules/services/monitoring/zabbix-server.nix+254−87 nixos/modules/services/networking/dhcpcd.nix+1−1 nixos/modules/services/networking/kresd.nix+5−2 nixos/modules/services/torrent/deluge.nix+70−21 nixos/modules/services/web-apps/zabbix.nix+225 nixos/modules/services/web-servers/apache-httpd/foswiki.nix−78 nixos/modules/services/web-servers/apache-httpd/trac.nix−121 nixos/modules/services/web-servers/apache-httpd/zabbix.nix−84 nixos/modules/services/x11/xserver.nix+3−4 nixos/modules/system/boot/loader/grub/install-grub.pl+23 nixos/modules/tasks/auto-upgrade.nix+27−5 nixos/modules/virtualisation/parallels-guest.nix+2−1 nixos/tests/deluge.nix+4−2 nixos/tests/installer.nix+101−29 nixos/tests/trac.nix−74 pkgs/applications/altcoins/clightning.nix+2−11 pkgs/applications/audio/radiotray-ng/default.nix+5−4 pkgs/applications/audio/radiotray-ng/no-dl-googletest.patch+3−3 pkgs/applications/editors/jupyter/kernel.nix+8−8 pkgs/applications/editors/vscode/vscode.nix+3−3 pkgs/applications/editors/vscode/vscodium.nix+3−3 pkgs/applications/misc/archiver/default.nix+9−11 pkgs/applications/misc/archiver/deps.nix−56 pkgs/applications/misc/cdrtools/default.nix+3−3 pkgs/applications/misc/electrum/default.nix+25−11 pkgs/applications/misc/mako/default.nix+10−1 pkgs/applications/misc/overmind/default.nix+8−8 pkgs/applications/misc/zathura/pdf-poppler/default.nix+2−2 pkgs/applications/networking/browsers/chromium/plugins.nix+2−2 pkgs/applications/networking/browsers/mozilla-plugins/flashplayer/default.nix+5−5 pkgs/applications/networking/browsers/mozilla-plugins/flashplayer/standalone.nix+3−3 pkgs/applications/networking/cluster/kube-router/default.nix+7−8 pkgs/applications/networking/gns3/default.nix+3−3 pkgs/applications/networking/instant-messengers/gajim/default.nix+4−4 pkgs/applications/networking/mumble/default.nix+3−3 pkgs/applications/science/machine-learning/fasttext/default.nix+3−3 pkgs/applications/version-management/git-and-tools/hub/default.nix+2−2 pkgs/applications/virtualization/dynamips/default.nix+2−2 pkgs/applications/virtualization/virt-manager/default.nix+15−5 pkgs/applications/virtualization/virt-viewer/default.nix−1 pkgs/applications/window-managers/sway/idle.nix+2−6 pkgs/build-support/fetchurl/default.nix+7−3 pkgs/build-support/fetchurl/mirrors.nix+5−4 pkgs/development/go-packages/generic/default.nix+7−2 pkgs/development/interpreters/python/build-python-package-wheel.nix+1−1 pkgs/development/interpreters/python/fetchpypi.nix+28 pkgs/development/libraries/SDL_gpu/default.nix+36 pkgs/development/libraries/discord-rpc/default.nix+40 pkgs/development/libraries/qt-5/5.12/qtwebengine-darwin-no-platform-check.patch+12 pkgs/development/libraries/qtpbfimageplugin/default.nix+39 pkgs/development/libraries/soundtouch/default.nix+15−13 pkgs/development/libraries/spice-gtk/default.nix+4−1 pkgs/development/python-modules/aiorpcx/default.nix+2−2 pkgs/development/python-modules/anonip/default.nix+24 pkgs/development/python-modules/deap/default.nix+3−3 pkgs/development/python-modules/fasttext/default.nix+3−3 pkgs/development/python-modules/flask-caching/default.nix+7−9 pkgs/development/python-modules/m2crypto/default.nix+2−2 pkgs/development/python-modules/msrest/default.nix+2−2 pkgs/development/python-modules/pytest-flask/default.nix+31 pkgs/development/python-modules/pytest-xprocess/default.nix+32 pkgs/development/python-modules/sklearn-deap/default.nix+2−1 pkgs/development/python-modules/spacy/default.nix+3−1 pkgs/development/python-modules/suds-jurko/default.nix+1−2 pkgs/development/python-modules/swagger-spec-validator/default.nix+37 pkgs/development/python-modules/thinc/default.nix+3−3 pkgs/development/tools/build-managers/mage/default.nix+13−15 pkgs/development/tools/continuous-integration/gitlab-runner/default.nix+4−4 pkgs/development/tools/distgen/default.nix+32 pkgs/development/tools/rust/cargo-xbuild/default.nix+3−3 pkgs/games/minecraft-server/default.nix+24−47 pkgs/misc/screensavers/betterlockscreen/default.nix+5−5 pkgs/os-specific/linux/firmware/fwupd/add-option-for-installation-sysconfdir.patch+27−46 pkgs/os-specific/linux/firmware/fwupd/default.nix+18−9 pkgs/os-specific/linux/firmware/fwupd/fix-paths.patch+57−1 pkgs/os-specific/linux/kernel/linux-testing-bcachefs.nix+4−4 pkgs/os-specific/linux/nvidia-x11/default.nix+4−4 pkgs/os-specific/linux/nvidia-x11/settings.nix+11 pkgs/servers/dns/knot-resolver/default.nix+48−46 pkgs/servers/foswiki/default.nix−44 pkgs/servers/mautrix-whatsapp/default.nix+3−3 pkgs/servers/mautrix-whatsapp/deps.nix+46−36 pkgs/servers/monitoring/zabbix/2.0.nix−92 pkgs/servers/monitoring/zabbix/2.2.nix−104 pkgs/servers/monitoring/zabbix/3.4.nix−41 pkgs/servers/monitoring/zabbix/agent.nix+38 pkgs/servers/monitoring/zabbix/default.nix−75 pkgs/servers/monitoring/zabbix/proxy.nix+79 pkgs/servers/monitoring/zabbix/server.nix+86 pkgs/servers/monitoring/zabbix/versions.nix+16 pkgs/servers/monitoring/zabbix/web.nix+32 pkgs/servers/routinator/default.nix+23 pkgs/tools/admin/clair/default.nix+5−5 pkgs/tools/archivers/zpaq/default.nix+8−9 pkgs/tools/filesystems/bcachefs-tools/default.nix+3−3 pkgs/tools/misc/debootstrap/default.nix+8−8 pkgs/tools/misc/lesspipe/default.nix+3−3 pkgs/tools/misc/most/default.nix+15−8 pkgs/tools/misc/oppai-ng/default.nix+34 pkgs/tools/misc/youtube-dl/default.nix+2−2 pkgs/tools/networking/axel/default.nix+10−7 pkgs/tools/networking/grpcui/default.nix+23 pkgs/tools/networking/i2p/default.nix+2−2 pkgs/tools/package-management/xbps/default.nix+5−5 pkgs/tools/security/gnupg/22.nix+2−2 pkgs/tools/security/saml2aws/default.nix+3−2 pkgs/tools/security/saml2aws/deps.nix+81 pkgs/tools/system/acpica-tools/default.nix+3−3 pkgs/top-level/all-packages.nix+40−14 pkgs/top-level/make-tarball.nix+2−15 pkgs/top-level/php-packages.nix+2−2 pkgs/top-level/python-packages.nix+14−22
doc/stdenv.xml−1
@@ -997,7 +997,6 @@ passthru.updateScript = [ ../../update.sh pname "--requested-release=unstable" ]
997997 </para>
998998 </listitem>
999999 </varlistentry>
1000− <varlistentry>
10011000 <varlistentry>
10021001 <term>
10031002 <varname>dontMakeSourcesWritable</varname>
lib/tests/release.nix+4−11
@@ -1,11 +1,9 @@
11{ pkgs ? import ((import ../.).cleanSource ../..) {} }:
22
3−pkgs.stdenv.mkDerivation {
4− name = "nixpkgs-lib-tests";
5− buildInputs = [ pkgs.nix ];
3+pkgs.runCommandNoCC "nixpkgs-lib-tests" {
4+ buildInputs = [ pkgs.nix (import ./check-eval.nix) ];
65 NIX_PATH="nixpkgs=${pkgs.path}";
7−
8− buildCommand = ''
6+} ''
97 datadir="${pkgs.nix}/share"
108 export TEST_ROOT=$(pwd)/test-tmp
119 export NIX_BUILD_HOOK=
@@ -22,10 +20,5 @@ pkgs.stdenv.mkDerivation {
2220 cd ${pkgs.path}/lib/tests
2321 bash ./modules.sh
2422
25− [[ "$(nix-instantiate --eval --strict misc.nix)" == "[ ]" ]]
26−
27− [[ "$(nix-instantiate --eval --strict systems.nix)" == "[ ]" ]]
28−
2923 touch $out
30− '';
31−}
24+''
maintainers/maintainer-list.nix+15
@@ -4080,6 +4080,16 @@
40804080 github = "pradeepchhetri";
40814081 name = "Pradeep Chhetri";
40824082 };
4083+ pradyuman = {
4084+ email = "me@pradyuman.co";
4085+ github = "pradyuman";
4086+ name = "Pradyuman Vig";
4087+ keys = [
4088+ { longkeyid = "rsa4096/4F74D5361C4CA31E";
4089+ fingerprint = "240B 57DE 4271 2480 7CE3 EAC8 4F74 D536 1C4C A31E";
4090+ }
4091+ ];
4092+ };
40834093 prikhi = {
40844094 email = "pavan.rikhi@gmail.com";
40854095 github = "prikhi";
@@ -4726,6 +4736,11 @@
47264736 github = "sigma";
47274737 name = "Yann Hodique";
47284738 };
4739+ sikmir = {
4740+ email = "sikmir@gmail.com";
4741+ github = "sikmir";
4742+ name = "Nikolay Korotkiy";
4743+ };
47294744 simonvandel = {
47304745 email = "simon.vandel@gmail.com";
47314746 github = "simonvandel";
nixos/doc/manual/release-notes/rl-1909.xml+14−3
@@ -137,9 +137,9 @@
137137 <listitem>
138138 <para>
139139 Several of the apache subservices have been replaced with full NixOS
140− modules including LimeSurvey and WordPress.
141− These modules can be enabled using the <option>services.limesurvey.enable</option>
142− and <option>services.wordpress.enable</option> options.
140+ modules including LimeSurvey, WordPress, and Zabbix.
141+ These modules can be enabled using the <option>services.limesurvey.enable</option>,
142+ <option>services.wordpress.enable</option>, and <option>services.zabbixWeb.enable</option> options.
143143 </para>
144144 </listitem>
145145 <listitem>
@@ -318,6 +318,17 @@
318318 The <literal>mercurial</literal> <literal>httpd.extraSubservice</literal> has been removed from nixpkgs due to lack of maintainer.
319319 </para>
320320 </listitem>
321+ <listitem>
322+ <para>
323+ The <literal>trac</literal> <literal>httpd.extraSubservice</literal> has been removed from nixpkgs because it was unmaintained.
324+ </para>
325+ </listitem>
326+ <listitem>
327+ <para>
328+ The <literal>foswiki</literal> package and associated <literal>httpd.extraSubservice</literal> have been removed
329+ from nixpkgs due to lack of maintainer.
330+ </para>
331+ </listitem>
321332 </itemizedlist>
322333 </section>
323334</section>
nixos/modules/hardware/opengl.nix+15−5
@@ -118,6 +118,19 @@ in
118118 set. This can be used to add OpenCL drivers, VA-API/VDPAU drivers etc.
119119 '';
120120 };
121+
122+ setLdLibraryPath = mkOption {
123+ type = types.bool;
124+ internal = true;
125+ default = false;
126+ description = ''
127+ Whether the <literal>LD_LIBRARY_PATH</literal> environment variable
128+ should be set to the locations of driver libraries. Drivers which
129+ rely on overriding libraries should set this to true. Drivers which
130+ support <literal>libglvnd</literal> and other dispatch libraries
131+ instead of overriding libraries should not set this.
132+ '';
133+ };
121134 };
122135
123136 };
@@ -145,11 +158,8 @@ in
145158 )
146159 ];
147160
148− environment.sessionVariables.LD_LIBRARY_PATH =
149− [ "/run/opengl-driver/lib" ] ++ optional cfg.driSupport32Bit "/run/opengl-driver-32/lib";
150−
151− environment.variables.XDG_DATA_DIRS =
152− [ "/run/opengl-driver/share" ] ++ optional cfg.driSupport32Bit "/run/opengl-driver-32/share";
161+ environment.sessionVariables.LD_LIBRARY_PATH = mkIf cfg.setLdLibraryPath
162+ ([ "/run/opengl-driver/lib" ] ++ optional cfg.driSupport32Bit "/run/opengl-driver-32/lib");
153163
154164 hardware.opengl.package = mkDefault (makePackage pkgs);
155165 hardware.opengl.package32 = mkDefault (makePackage pkgs.pkgsi686Linux);
nixos/modules/hardware/video/amdgpu-pro.nix+2−1
@@ -30,10 +30,11 @@ in
3030 nixpkgs.config.xorg.abiCompat = "1.19";
3131
3232 services.xserver.drivers = singleton
33− { name = "amdgpu"; modules = [ package ]; libPath = [ package ]; };
33+ { name = "amdgpu"; modules = [ package ]; };
3434
3535 hardware.opengl.package = package;
3636 hardware.opengl.package32 = package32;
37+ hardware.opengl.setLdLibraryPath = true;
3738
3839 boot.extraModulePackages = [ package ];
3940
nixos/modules/hardware/video/ati.nix+2−1
@@ -21,10 +21,11 @@ in
2121 nixpkgs.config.xorg.abiCompat = "1.17";
2222
2323 services.xserver.drivers = singleton
24− { name = "fglrx"; modules = [ ati_x11 ]; libPath = [ "${ati_x11}/lib" ]; };
24+ { name = "fglrx"; modules = [ ati_x11 ]; };
2525
2626 hardware.opengl.package = ati_x11;
2727 hardware.opengl.package32 = pkgs.pkgsi686Linux.linuxPackages.ati_drivers_x11.override { libsOnly = true; kernel = null; };
28+ hardware.opengl.setLdLibraryPath = true;
2829
2930 environment.systemPackages = [ ati_x11 ];
3031
nixos/modules/hardware/video/nvidia.nix−1
@@ -138,7 +138,6 @@ in
138138 services.xserver.drivers = singleton {
139139 name = "nvidia";
140140 modules = [ nvidia_x11.bin ];
141− libPath = [ nvidia_x11 ];
142141 deviceSection = optionalString optimusCfg.enable
143142 ''
144143 BusID "${optimusCfg.nvidiaBusId}"
nixos/modules/misc/ids.nix+1−1
@@ -516,7 +516,7 @@
516516 tss = 176;
517517 #memcached = 177; # unused, removed 2018-01-03
518518 #ntp = 179; # unused
519− #zabbix = 180; # unused
519+ zabbix = 180;
520520 #redis = 181; # unused, removed 2018-01-03
521521 #unifi = 183; # unused
522522 #uptimed = 184; # unused
nixos/modules/module-list.nix+2
@@ -516,6 +516,7 @@
516516 ./services/monitoring/uptime.nix
517517 ./services/monitoring/vnstat.nix
518518 ./services/monitoring/zabbix-agent.nix
519+ ./services/monitoring/zabbix-proxy.nix
519520 ./services/monitoring/zabbix-server.nix
520521 ./services/network-filesystems/beegfs.nix
521522 ./services/network-filesystems/cachefilesd.nix
@@ -782,6 +783,7 @@
782783 ./services/web-apps/virtlyst.nix
783784 ./services/web-apps/wordpress.nix
784785 ./services/web-apps/youtrack.nix
786+ ./services/web-apps/zabbix.nix
785787 ./services/web-servers/apache-httpd/default.nix
786788 ./services/web-servers/caddy.nix
787789 ./services/web-servers/fcgiwrap.nix
nixos/modules/rename.nix+4
@@ -171,6 +171,9 @@ with lib;
171171 The starting time can be configured via <literal>services.postgresqlBackup.startAt</literal>.
172172 '')
173173
174+ # zabbixServer
175+ (mkRenamedOptionModule [ "services" "zabbixServer" "dbServer" ] [ "services" "zabbixServer" "database" "host" ])
176+
174177 # Profile splitting
175178 (mkRenamedOptionModule [ "virtualisation" "growPartition" ] [ "boot" "growPartition" ])
176179
@@ -214,6 +217,7 @@ with lib;
214217 (mkRemovedOptionModule [ "services" "winstone" ] "The corresponding package was removed from nixpkgs.")
215218 (mkRemovedOptionModule [ "services" "mysql" "pidDir" ] "Don't wait for pidfiles, describe dependencies through systemd")
216219 (mkRemovedOptionModule [ "services" "mysql" "rootPassword" ] "Use socket authentication or set the password outside of the nix store.")
220+ (mkRemovedOptionModule [ "services" "zabbixServer" "dbPassword" ] "Use services.zabbixServer.database.passwordFile instead.")
217221
218222 # ZSH
219223 (mkRenamedOptionModule [ "programs" "zsh" "enableSyntaxHighlighting" ] [ "programs" "zsh" "syntaxHighlighting" "enable" ])
nixos/modules/services/monitoring/zabbix-agent.nix+104−59
@@ -1,73 +1,118 @@
1−# Zabbix agent daemon.
21{ config, lib, pkgs, ... }:
32
4−with lib;
5−
63let
7−
84 cfg = config.services.zabbixAgent;
95
10− zabbix = cfg.package;
11−
12− stateDir = "/run/zabbix";
13−
14− logDir = "/var/log/zabbix";
15−
16− pidFile = "${stateDir}/zabbix_agentd.pid";
6+ inherit (lib) mkDefault mkEnableOption mkIf mkOption;
7+ inherit (lib) attrValues concatMapStringsSep literalExample optionalString types;
178
18− configFile = pkgs.writeText "zabbix_agentd.conf"
19− ''
20− Server = ${cfg.server}
9+ user = "zabbix-agent";
10+ group = "zabbix-agent";
2111
22− LogFile = ${logDir}/zabbix_agentd
23−
24− PidFile = ${pidFile}
25−
26− StartAgents = 1
12+ moduleEnv = pkgs.symlinkJoin {
13+ name = "zabbix-agent-module-env";
14+ paths = attrValues cfg.modules;
15+ };
2716
28− ${config.services.zabbixAgent.extraConfig}
29− '';
17+ configFile = pkgs.writeText "zabbix_agent.conf" ''
18+ LogType = console
19+ Server = ${cfg.server}
20+ ListenIP = ${cfg.listen.ip}
21+ ListenPort = ${toString cfg.listen.port}
22+ ${optionalString (cfg.modules != {}) "LoadModulePath = ${moduleEnv}/lib"}
23+ ${concatMapStringsSep "\n" (name: "LoadModule = ${name}") (builtins.attrNames cfg.modules)}
24+ ${cfg.extraConfig}
25+ '';
3026
3127in
3228
3329{
34−
35− ###### interface
30+ # interface
3631
3732 options = {
3833
3934 services.zabbixAgent = {
35+ enable = mkEnableOption "the Zabbix Agent";
4036
41− enable = mkOption {
42− default = false;
37+ package = mkOption {
38+ type = types.package;
39+ default = pkgs.zabbix.agent;
40+ defaultText = "pkgs.zabbix.agent";
41+ description = "The Zabbix package to use.";
42+ };
43+
44+ extraPackages = mkOption {
45+ type = types.listOf types.package;
46+ default = with pkgs; [ nettools ];
47+ defaultText = "[ nettools ]";
48+ example = "[ nettools mysql ]";
4349 description = ''
44− Whether to run the Zabbix monitoring agent on this machine.
45− It will send monitoring data to a Zabbix server.
50+ Packages to be added to the Zabbix <envar>PATH</envar>.
51+ Typically used to add executables for scripts, but can be anything.
4652 '';
4753 };
4854
49− package = mkOption {
50− type = types.attrs; # Note: pkgs.zabbixXY isn't a derivation, but an attrset of { server = ...; agent = ...; }.
51− default = pkgs.zabbix;
52− defaultText = "pkgs.zabbix";
53− example = literalExample "pkgs.zabbix34";
54− description = ''
55− The Zabbix package to use.
55+ modules = mkOption {
56+ type = types.attrsOf types.package;
57+ description = "A set of modules to load.";
58+ default = {};
59+ example = literalExample ''
60+ {
61+ "dummy.so" = pkgs.stdenv.mkDerivation {
62+ name = "zabbix-dummy-module-''${cfg.package.version}";
63+ src = cfg.package.src;
64+ buildInputs = [ cfg.package ];
65+ sourceRoot = "zabbix-''${cfg.package.version}/src/modules/dummy";
66+ installPhase = '''
67+ mkdir -p $out/lib
68+ cp dummy.so $out/lib/
69+ ''';
70+ };
71+ }
5672 '';
5773 };
5874
5975 server = mkOption {
60− default = "127.0.0.1";
76+ type = types.str;
6177 description = ''
6278 The IP address or hostname of the Zabbix server to connect to.
6379 '';
6480 };
6581
82+ listen = {
83+ ip = mkOption {
84+ type = types.str;
85+ default = "0.0.0.0";
86+ description = ''
87+ List of comma delimited IP addresses that the agent should listen on.
88+ '';
89+ };
90+
91+ port = mkOption {
92+ type = types.port;
93+ default = 10050;
94+ description = ''
95+ Agent will listen on this port for connections from the server.
96+ '';
97+ };
98+ };
99+
100+ openFirewall = mkOption {
101+ type = types.bool;
102+ default = false;
103+ description = ''
104+ Open ports in the firewall for the Zabbix Agent.
105+ '';
106+ };
107+
108+ # TODO: for bonus points migrate this to https://github.com/NixOS/rfcs/pull/42
66109 extraConfig = mkOption {
67110 default = "";
68111 type = types.lines;
69112 description = ''
70− Configuration that is injected verbatim into the configuration file.
113+ Configuration that is injected verbatim into the configuration file. Refer to
114+ <link xlink:href="https://www.zabbix.com/documentation/current/manual/appendix/config/zabbix_agentd"/>
115+ for details on supported values.
71116 '';
72117 };
73118
@@ -75,38 +120,38 @@ in
75120
76121 };
77122
78−
79− ###### implementation
123+ # implementation
80124
81125 config = mkIf cfg.enable {
82126
83− users.users = mkIf (!config.services.zabbixServer.enable) (singleton
84− { name = "zabbix";
85− uid = config.ids.uids.zabbix;
86− description = "Zabbix daemon user";
87− });
127+ networking.firewall = mkIf cfg.openFirewall {
128+ allowedTCPPorts = [ cfg.listen.port ];
129+ };
88130
89− systemd.services."zabbix-agent" =
90− { description = "Zabbix Agent";
131+ users.users.${user} = {
132+ description = "Zabbix Agent daemon user";
133+ inherit group;
134+ };
91135
92− wantedBy = [ "multi-user.target" ];
136+ users.groups.${group} = { };
93137
94− path = [ pkgs.nettools ];
138+ systemd.services."zabbix-agent" = {
139+ description = "Zabbix Agent";
95140
96− preStart =
97− ''
98− mkdir -m 0755 -p ${stateDir} ${logDir}
99− chown zabbix ${stateDir} ${logDir}
100− '';
141+ wantedBy = [ "multi-user.target" ];
101142
102− serviceConfig.ExecStart = "@${zabbix.agent}/sbin/zabbix_agentd zabbix_agentd --config ${configFile}";
103− serviceConfig.Type = "forking";
104− serviceConfig.RemainAfterExit = true;
105− serviceConfig.Restart = "always";
106− serviceConfig.RestartSec = 2;
107− };
143+ path = [ "/run/wrappers" ] ++ cfg.extraPackages;
144+
145+ serviceConfig = {
146+ ExecStart = "@${cfg.package}/sbin/zabbix_agentd zabbix_agentd -f --config ${configFile}";
147+ Restart = "always";
148+ RestartSec = 2;
108149
109− environment.systemPackages = [ zabbix.agent ];
150+ User = user;
151+ Group = group;
152+ PrivateTmp = true;
153+ };
154+ };
110155
111156 };
112157
nixos/modules/services/monitoring/zabbix-proxy.nixnew file+290
@@ -0,0 +1,290 @@
1+{ config, lib, pkgs, ... }:
2+
3+let
4+ cfg = config.services.zabbixProxy;
5+ pgsql = config.services.postgresql;
6+ mysql = config.services.mysql;
7+
8+ inherit (lib) mkDefault mkEnableOption mkIf mkOption;
9+ inherit (lib) attrValues concatMapStringsSep literalExample optional optionalAttrs optionalString types;
10+
11+ user = "zabbix";
12+ group = "zabbix";
13+ runtimeDir = "/run/zabbix";
14+ stateDir = "/var/lib/zabbix";
15+ passwordFile = "${runtimeDir}/zabbix-dbpassword.conf";
16+
17+ moduleEnv = pkgs.symlinkJoin {
18+ name = "zabbix-proxy-module-env";
19+ paths = attrValues cfg.modules;
20+ };
21+
22+ configFile = pkgs.writeText "zabbix_proxy.conf" ''
23+ LogType = console
24+ ListenIP = ${cfg.listen.ip}
25+ ListenPort = ${toString cfg.listen.port}
26+ # TODO: set to cfg.database.socket if database type is pgsql?
27+ DBHost = ${optionalString (cfg.database.createLocally != true) cfg.database.host}
28+ ${optionalString (cfg.database.createLocally != true) "DBPort = ${cfg.database.port}"}
29+ DBName = ${cfg.database.name}
30+ DBUser = ${cfg.database.user}
31+ ${optionalString (cfg.database.passwordFile != null) "Include ${passwordFile}"}
32+ ${optionalString (mysqlLocal && cfg.database.socket != null) "DBSocket = ${cfg.database.socket}"}
33+ SocketDir = ${runtimeDir}
34+ FpingLocation = /run/wrappers/bin/fping
35+ ${optionalString (cfg.modules != {}) "LoadModulePath = ${moduleEnv}/lib"}
36+ ${concatMapStringsSep "\n" (name: "LoadModule = ${name}") (builtins.attrNames cfg.modules)}
37+ ${cfg.extraConfig}
38+ '';
39+
40+ mysqlLocal = cfg.database.createLocally && cfg.database.type == "mysql";
41+ pgsqlLocal = cfg.database.createLocally && cfg.database.type == "pgsql";
42+
43+in
44+
45+{
46+ # interface
47+
48+ options = {
49+
50+ services.zabbixProxy = {
51+ enable = mkEnableOption "the Zabbix Proxy";
52+
53+ package = mkOption {
54+ type = types.package;
55+ default =
56+ if cfg.database.type == "mysql" then pkgs.zabbix.proxy-mysql
57+ else if cfg.database.type == "pgsql" then pkgs.zabbix.proxy-pgsql
58+ else pkgs.zabbix.proxy-sqlite;
59+ defaultText = "pkgs.zabbix.proxy-pgsql";
60+ description = "The Zabbix package to use.";
61+ };
62+
63+ extraPackages = mkOption {
64+ type = types.listOf types.package;
65+ default = with pkgs; [ nettools nmap traceroute ];
66+ defaultText = "[ nettools nmap traceroute ]";
67+ description = ''
68+ Packages to be added to the Zabbix <envar>PATH</envar>.
69+ Typically used to add executables for scripts, but can be anything.
70+ '';
71+ };
72+
73+ modules = mkOption {
74+ type = types.attrsOf types.package;
75+ description = "A set of modules to load.";
76+ default = {};
77+ example = literalExample ''
78+ {
79+ "dummy.so" = pkgs.stdenv.mkDerivation {
80+ name = "zabbix-dummy-module-''${cfg.package.version}";
81+ src = cfg.package.src;
82+ buildInputs = [ cfg.package ];
83+ sourceRoot = "zabbix-''${cfg.package.version}/src/modules/dummy";
84+ installPhase = '''
85+ mkdir -p $out/lib
86+ cp dummy.so $out/lib/
87+ ''';
88+ };
89+ }
90+ '';
91+ };
92+
93+ database = {
94+ type = mkOption {
95+ type = types.enum [ "mysql" "pgsql" "sqlite" ];
96+ example = "mysql";
97+ default = "pgsql";
98+ description = "Database engine to use.";
99+ };
100+
101+ host = mkOption {
102+ type = types.str;
103+ default = "localhost";
104+ description = "Database host address.";
105+ };
106+
107+ port = mkOption {
108+ type = types.int;
109+ default = if cfg.database.type == "mysql" then mysql.port else pgsql.port;
110+ description = "Database host port.";
111+ };
112+
113+ name = mkOption {
114+ type = types.str;
115+ default = "zabbix";
116+ description = "Database name.";
117+ };
118+
119+ user = mkOption {
120+ type = types.str;
121+ default = "zabbix";
122+ description = "Database user.";
123+ };
124+
125+ passwordFile = mkOption {
126+ type = types.nullOr types.path;
127+ default = null;
128+ example = "/run/keys/zabbix-dbpassword";
129+ description = ''
130+ A file containing the password corresponding to
131+ <option>database.user</option>.
132+ '';
133+ };
134+
135+ socket = mkOption {
136+ type = types.nullOr types.path;
137+ default = null;
138+ example = "/run/postgresql";
139+ description = "Path to the unix socket file to use for authentication.";
140+ };
141+
142+ createLocally = mkOption {
143+ type = types.bool;
144+ default = true;
145+ description = "Whether to create a local database automatically.";
146+ };
147+ };
148+
149+ listen = {
150+ ip = mkOption {
151+ type = types.str;
152+ default = "0.0.0.0";
153+ description = ''
154+ List of comma delimited IP addresses that the trapper should listen on.
155+ Trapper will listen on all network interfaces if this parameter is missing.
156+ '';
157+ };
158+
159+ port = mkOption {
160+ type = types.port;
161+ default = 10051;
162+ description = ''
163+ Listen port for trapper.
164+ '';
165+ };
166+ };
167+
168+ openFirewall = mkOption {
169+ type = types.bool;
170+ default = false;
171+ description = ''
172+ Open ports in the firewall for the Zabbix Proxy.
173+ '';
174+ };
175+
176+ # TODO: for bonus points migrate this to https://github.com/NixOS/rfcs/pull/42
177+ extraConfig = mkOption {
178+ default = "";
179+ type = types.lines;
180+ description = ''
181+ Configuration that is injected verbatim into the configuration file. Refer to
182+ <link xlink:href="https://www.zabbix.com/documentation/current/manual/appendix/config/zabbix_proxy"/>
183+ for details on supported values.
184+ '';
185+ };
186+
187+ };
188+
189+ };
190+
191+ # implementation
192+
193+ config = mkIf cfg.enable {
194+
195+ assertions = [
196+ { assertion = !config.services.zabbixServer.enable;
197+ message = "Please choose one of services.zabbixServer or services.zabbixProxy.";
198+ }
199+ { assertion = cfg.database.createLocally -> cfg.database.user == user;
200+ message = "services.zabbixProxy.database.user must be set to ${user} if services.zabbixProxy.database.createLocally is set true";
201+ }
202+ { assertion = cfg.database.createLocally -> cfg.database.passwordFile == null;
203+ message = "a password cannot be specified if services.zabbixProxy.database.createLocally is set to true";
204+ }
205+ ];
206+
207+ networking.firewall = mkIf cfg.openFirewall {
208+ allowedTCPPorts = [ cfg.listen.port ];
209+ };
210+
211+ services.mysql = optionalAttrs mysqlLocal {
212+ enable = true;
213+ package = mkDefault pkgs.mariadb;
214+ ensureDatabases = [ cfg.database.name ];
215+ ensureUsers = [
216+ { name = cfg.database.user;
217+ ensurePermissions = { "${cfg.database.name}.*" = "ALL PRIVILEGES"; };
218+ }
219+ ];
220+ };
221+
222+ services.postgresql = optionalAttrs pgsqlLocal {
223+ enable = true;
224+ ensureDatabases = [ cfg.database.name ];
225+ ensureUsers = [
226+ { name = cfg.database.user;
227+ ensurePermissions = { "DATABASE ${cfg.database.name}" = "ALL PRIVILEGES"; };
228+ }
229+ ];
230+ };
231+
232+ users.users.${user} = {
233+ description = "Zabbix daemon user";
234+ uid = config.ids.uids.zabbix;
235+ inherit group;
236+ };
237+
238+ users.groups.${group} = {
239+ gid = config.ids.gids.zabbix;
240+ };
241+
242+ security.wrappers = {
243+ fping.source = "${pkgs.fping}/bin/fping";
244+ };
245+
246+ systemd.services."zabbix-proxy" = {
247+ description = "Zabbix Proxy";
248+
249+ wantedBy = [ "multi-user.target" ];
250+ after = optional mysqlLocal "mysql.service" ++ optional pgsqlLocal "postgresql.service";
251+
252+ path = [ "/run/wrappers" ] ++ cfg.extraPackages;
253+ preStart = optionalString pgsqlLocal ''
254+ if ! test -e "${stateDir}/db-created"; then
255+ cat ${cfg.package}/share/zabbix/database/postgresql/schema.sql | ${pgsql.package}/bin/psql ${cfg.database.name}
256+ cat ${cfg.package}/share/zabbix/database/postgresql/images.sql | ${pgsql.package}/bin/psql ${cfg.database.name}
257+ cat ${cfg.package}/share/zabbix/database/postgresql/data.sql | ${pgsql.package}/bin/psql ${cfg.database.name}
258+ touch "${stateDir}/db-created"
259+ fi
260+ '' + optionalString mysqlLocal ''
261+ if ! test -e "${stateDir}/db-created"; then
262+ cat ${cfg.package}/share/zabbix/database/mysql/schema.sql | ${mysql.package}/bin/mysql ${cfg.database.name}
263+ cat ${cfg.package}/share/zabbix/database/mysql/images.sql | ${mysql.package}/bin/mysql ${cfg.database.name}
264+ cat ${cfg.package}/share/zabbix/database/mysql/data.sql | ${mysql.package}/bin/mysql ${cfg.database.name}
265+ touch "${stateDir}/db-created"
266+ fi
267+ '' + optionalString (cfg.database.passwordFile != null) ''
268+ # create a copy of the supplied password file in a format zabbix can consume
269+ touch ${passwordFile}
270+ chmod 0600 ${passwordFile}
271+ echo -n "DBPassword = " > ${passwordFile}
272+ cat ${cfg.database.passwordFile} >> ${passwordFile}
273+ '';
274+
275+ serviceConfig = {
276+ ExecStart = "@${cfg.package}/sbin/zabbix_proxy zabbix_proxy -f --config ${configFile}";
277+ Restart = "always";
278+ RestartSec = 2;
279+
280+ User = user;
281+ Group = group;
282+ RuntimeDirectory = "zabbix";
283+ StateDirectory = "zabbix";
284+ PrivateTmp = true;
285+ };
286+ };
287+
288+ };
289+
290+}
nixos/modules/services/monitoring/zabbix-server.nix+254−87
@@ -1,125 +1,292 @@
1−# Zabbix server daemon.
21{ config, lib, pkgs, ... }:
32
4−with lib;
5−
63let
7−
84 cfg = config.services.zabbixServer;
5+ pgsql = config.services.postgresql;
6+ mysql = config.services.mysql;
97
10− stateDir = "/run/zabbix";
8+ inherit (lib) mkDefault mkEnableOption mkIf mkOption;
9+ inherit (lib) attrValues concatMapStringsSep literalExample optional optionalAttrs optionalString types;
1110
12− logDir = "/var/log/zabbix";
11+ user = "zabbix";
12+ group = "zabbix";
13+ runtimeDir = "/run/zabbix";
14+ stateDir = "/var/lib/zabbix";
15+ passwordFile = "${runtimeDir}/zabbix-dbpassword.conf";
1316
14− libDir = "/var/lib/zabbix";
17+ moduleEnv = pkgs.symlinkJoin {
18+ name = "zabbix-server-module-env";
19+ paths = attrValues cfg.modules;
20+ };
1521
16− pidFile = "${stateDir}/zabbix_server.pid";
22+ configFile = pkgs.writeText "zabbix_server.conf" ''
23+ LogType = console
24+ ListenIP = ${cfg.listen.ip}
25+ ListenPort = ${toString cfg.listen.port}
26+ # TODO: set to cfg.database.socket if database type is pgsql?
27+ DBHost = ${optionalString (cfg.database.createLocally != true) cfg.database.host}
28+ ${optionalString (cfg.database.createLocally != true) "DBPort = ${cfg.database.port}"}
29+ DBName = ${cfg.database.name}
30+ DBUser = ${cfg.database.user}
31+ ${optionalString (cfg.database.passwordFile != null) "Include ${passwordFile}"}
32+ ${optionalString (mysqlLocal && cfg.database.socket != null) "DBSocket = ${cfg.database.socket}"}
33+ SocketDir = ${runtimeDir}
34+ FpingLocation = /run/wrappers/bin/fping
35+ ${optionalString (cfg.modules != {}) "LoadModulePath = ${moduleEnv}/lib"}
36+ ${concatMapStringsSep "\n" (name: "LoadModule = ${name}") (builtins.attrNames cfg.modules)}
37+ ${cfg.extraConfig}
38+ '';
39+
40+ mysqlLocal = cfg.database.createLocally && cfg.database.type == "mysql";
41+ pgsqlLocal = cfg.database.createLocally && cfg.database.type == "pgsql";
1742
18− configFile = pkgs.writeText "zabbix_server.conf"
19− ''
20− LogFile = ${logDir}/zabbix_server
43+in
2144
22− PidFile = ${pidFile}
45+{
46+ # interface
2347
24− ${optionalString (cfg.dbServer != "localhost") ''
25− DBHost = ${cfg.dbServer}
26− ''}
48+ options = {
2749
28− DBName = zabbix
50+ services.zabbixServer = {
51+ enable = mkEnableOption "the Zabbix Server";
2952
30− DBUser = zabbix
53+ package = mkOption {
54+ type = types.package;
55+ default = if cfg.database.type == "mysql" then pkgs.zabbix.server-mysql else pkgs.zabbix.server-pgsql;
56+ defaultText = "pkgs.zabbix.server-pgsql";
57+ description = "The Zabbix package to use.";
58+ };
3159
32− ${optionalString (cfg.dbPassword != "") ''
33− DBPassword = ${cfg.dbPassword}
34− ''}
60+ extraPackages = mkOption {
61+ type = types.listOf types.package;
62+ default = with pkgs; [ nettools nmap traceroute ];
63+ defaultText = "[ nettools nmap traceroute ]";
64+ description = ''
65+ Packages to be added to the Zabbix <envar>PATH</envar>.
66+ Typically used to add executables for scripts, but can be anything.
67+ '';
68+ };
3569
36− ${config.services.zabbixServer.extraConfig}
37− '';
70+ modules = mkOption {
71+ type = types.attrsOf types.package;
72+ description = "A set of modules to load.";
73+ default = {};
74+ example = literalExample ''
75+ {
76+ "dummy.so" = pkgs.stdenv.mkDerivation {
77+ name = "zabbix-dummy-module-''${cfg.package.version}";
78+ src = cfg.package.src;
79+ buildInputs = [ cfg.package ];
80+ sourceRoot = "zabbix-''${cfg.package.version}/src/modules/dummy";
81+ installPhase = '''
82+ mkdir -p $out/lib
83+ cp dummy.so $out/lib/
84+ ''';
85+ };
86+ }
87+ '';
88+ };
3889
39− useLocalPostgres = cfg.dbServer == "localhost" || cfg.dbServer == "";
90+ database = {
91+ type = mkOption {
92+ type = types.enum [ "mysql" "pgsql" ];
93+ example = "mysql";
94+ default = "pgsql";
95+ description = "Database engine to use.";
96+ };
97+
98+ host = mkOption {
99+ type = types.str;
100+ default = "localhost";
101+ description = "Database host address.";
102+ };
103+
104+ port = mkOption {
105+ type = types.int;
106+ default = if cfg.database.type == "mysql" then mysql.port else pgsql.port;
107+ description = "Database host port.";
108+ };
109+
110+ name = mkOption {
111+ type = types.str;
112+ default = "zabbix";
113+ description = "Database name.";
114+ };
115+
116+ user = mkOption {
117+ type = types.str;
118+ default = "zabbix";
119+ description = "Database user.";
120+ };
121+
122+ passwordFile = mkOption {
123+ type = types.nullOr types.path;
124+ default = null;
125+ example = "/run/keys/zabbix-dbpassword";
126+ description = ''
127+ A file containing the password corresponding to
128+ <option>database.user</option>.
129+ '';
130+ };
131+
132+ socket = mkOption {
133+ type = types.nullOr types.path;
134+ default = null;
135+ example = "/run/postgresql";
136+ description = "Path to the unix socket file to use for authentication.";
137+ };
138+
139+ createLocally = mkOption {
140+ type = types.bool;
141+ default = true;
142+ description = "Whether to create a local database automatically.";
143+ };
144+ };
40145
41−in
146+ listen = {
147+ ip = mkOption {
148+ type = types.str;
149+ default = "0.0.0.0";
150+ description = ''
151+ List of comma delimited IP addresses that the trapper should listen on.
152+ Trapper will listen on all network interfaces if this parameter is missing.
153+ '';
154+ };
42155
43−{
156+ port = mkOption {
157+ type = types.port;
158+ default = 10051;
159+ description = ''
160+ Listen port for trapper.
161+ '';
162+ };
163+ };
44164
45− ###### interface
165+ openFirewall = mkOption {
166+ type = types.bool;
167+ default = false;
168+ description = ''
169+ Open ports in the firewall for the Zabbix Server.
170+ '';
171+ };
46172
47− options = {
173+ # TODO: for bonus points migrate this to https://github.com/NixOS/rfcs/pull/42
174+ extraConfig = mkOption {
175+ default = "";
176+ type = types.lines;
177+ description = ''
178+ Configuration that is injected verbatim into the configuration file. Refer to
179+ <link xlink:href="https://www.zabbix.com/documentation/current/manual/appendix/config/zabbix_server"/>
180+ for details on supported values.
181+ '';
182+ };
48183
49− services.zabbixServer.enable = mkOption {
50− default = false;
51− type = types.bool;
52− description = ''
53− Whether to run the Zabbix server on this machine.
54− '';
55184 };
56185
57− services.zabbixServer.dbServer = mkOption {
58− default = "localhost";
59− type = types.str;
60− description = ''
61− Hostname or IP address of the database server.
62− Use an empty string ("") to use peer authentication.
63− '';
64− };
186+ };
65187
66− services.zabbixServer.dbPassword = mkOption {
67− default = "";
68− type = types.str;
69− description = "Password used to connect to the database server.";
70− };
188+ # implementation
71189
72− services.zabbixServer.extraConfig = mkOption {
73− default = "";
74− type = types.lines;
75− description = ''
76− Configuration that is injected verbatim into the configuration file.
77− '';
190+ config = mkIf cfg.enable {
191+
192+ assertions = [
193+ { assertion = cfg.database.createLocally -> cfg.database.user == user;
194+ message = "services.zabbixServer.database.user must be set to ${user} if services.zabbixServer.database.createLocally is set true";
195+ }
196+ { assertion = cfg.database.createLocally -> cfg.database.passwordFile == null;
197+ message = "a password cannot be specified if services.zabbixServer.database.createLocally is set to true";
198+ }
199+ ];
200+
201+ networking.firewall = mkIf cfg.openFirewall {
202+ allowedTCPPorts = [ cfg.listen.port ];
78203 };
79204
80− };
205+ services.mysql = optionalAttrs mysqlLocal {
206+ enable = true;
207+ package = mkDefault pkgs.mariadb;
208+ ensureDatabases = [ cfg.database.name ];
209+ ensureUsers = [
210+ { name = cfg.database.user;
211+ ensurePermissions = { "${cfg.database.name}.*" = "ALL PRIVILEGES"; };
212+ }
213+ ];
214+ };
81215
82− ###### implementation
216+ services.postgresql = optionalAttrs pgsqlLocal {
217+ enable = true;
218+ ensureDatabases = [ cfg.database.name ];
219+ ensureUsers = [
220+ { name = cfg.database.user;
221+ ensurePermissions = { "DATABASE ${cfg.database.name}" = "ALL PRIVILEGES"; };
222+ }
223+ ];
224+ };
83225
84− config = mkIf cfg.enable {
226+ users.users.${user} = {
227+ description = "Zabbix daemon user";
228+ uid = config.ids.uids.zabbix;
229+ inherit group;
230+ };
85231
86− services.postgresql.enable = useLocalPostgres;
232+ users.groups.${group} = {
233+ gid = config.ids.gids.zabbix;
234+ };
87235
88− users.users = singleton
89− { name = "zabbix";
90− uid = config.ids.uids.zabbix;
91− description = "Zabbix daemon user";
92− };
236+ security.wrappers = {
237+ fping.source = "${pkgs.fping}/bin/fping";
238+ };
93239
94− systemd.services."zabbix-server" =
95− { description = "Zabbix Server";
96−
97− wantedBy = [ "multi-user.target" ];
98− after = optional useLocalPostgres "postgresql.service";
99−
100− preStart =
101− ''
102− mkdir -m 0755 -p ${stateDir} ${logDir} ${libDir}
103− chown zabbix ${stateDir} ${logDir} ${libDir}
104−
105− if ! test -e "${libDir}/db-created"; then
106− ${pkgs.su}/bin/su -s "$SHELL" ${config.services.postgresql.superUser} -c '${pkgs.postgresql}/bin/createuser --no-superuser --no-createdb --no-createrole zabbix' || true
107− ${pkgs.su}/bin/su -s "$SHELL" ${config.services.postgresql.superUser} -c '${pkgs.postgresql}/bin/createdb --owner zabbix zabbix' || true
108− cat ${pkgs.zabbix.server}/share/zabbix/db/schema/postgresql.sql | ${pkgs.su}/bin/su -s "$SHELL" zabbix -c '${pkgs.postgresql}/bin/psql zabbix'
109− cat ${pkgs.zabbix.server}/share/zabbix/db/data/images_pgsql.sql | ${pkgs.su}/bin/su -s "$SHELL" zabbix -c '${pkgs.postgresql}/bin/psql zabbix'
110− cat ${pkgs.zabbix.server}/share/zabbix/db/data/data.sql | ${pkgs.su}/bin/su -s "$SHELL" zabbix -c '${pkgs.postgresql}/bin/psql zabbix'
111− touch "${libDir}/db-created"
112− fi
113− '';
240+ systemd.services."zabbix-server" = {
241+ description = "Zabbix Server";
242+
243+ wantedBy = [ "multi-user.target" ];
244+ after = optional mysqlLocal "mysql.service" ++ optional pgsqlLocal "postgresql.service";
245+
246+ path = [ "/run/wrappers" ] ++ cfg.extraPackages;
247+ preStart = ''
248+ # pre 19.09 compatibility
249+ if test -e "${runtimeDir}/db-created"; then
250+ mv "${runtimeDir}/db-created" "${stateDir}/"
251+ fi
252+ '' + optionalString pgsqlLocal ''
253+ if ! test -e "${stateDir}/db-created"; then
254+ cat ${cfg.package}/share/zabbix/database/postgresql/schema.sql | ${pgsql.package}/bin/psql ${cfg.database.name}
255+ cat ${cfg.package}/share/zabbix/database/postgresql/images.sql | ${pgsql.package}/bin/psql ${cfg.database.name}
256+ cat ${cfg.package}/share/zabbix/database/postgresql/data.sql | ${pgsql.package}/bin/psql ${cfg.database.name}
257+ touch "${stateDir}/db-created"
258+ fi
259+ '' + optionalString mysqlLocal ''
260+ if ! test -e "${stateDir}/db-created"; then
261+ cat ${cfg.package}/share/zabbix/database/mysql/schema.sql | ${mysql.package}/bin/mysql ${cfg.database.name}
262+ cat ${cfg.package}/share/zabbix/database/mysql/images.sql | ${mysql.package}/bin/mysql ${cfg.database.name}
263+ cat ${cfg.package}/share/zabbix/database/mysql/data.sql | ${mysql.package}/bin/mysql ${cfg.database.name}
264+ touch "${stateDir}/db-created"
265+ fi
266+ '' + optionalString (cfg.database.passwordFile != null) ''
267+ # create a copy of the supplied password file in a format zabbix can consume
268+ touch ${passwordFile}
269+ chmod 0600 ${passwordFile}
270+ echo -n "DBPassword = " > ${passwordFile}
271+ cat ${cfg.database.passwordFile} >> ${passwordFile}
272+ '';
114273
115− path = [ pkgs.nettools ];
274+ serviceConfig = {
275+ ExecStart = "@${cfg.package}/sbin/zabbix_server zabbix_server -f --config ${configFile}";
276+ Restart = "always";
277+ RestartSec = 2;
116278
117− serviceConfig.ExecStart = "@${pkgs.zabbix.server}/sbin/zabbix_server zabbix_server --config ${configFile}";
118− serviceConfig.Type = "forking";
119− serviceConfig.Restart = "always";
120− serviceConfig.RestartSec = 2;
121− serviceConfig.PIDFile = pidFile;
279+ User = user;
280+ Group = group;
281+ RuntimeDirectory = "zabbix";
282+ StateDirectory = "zabbix";
283+ PrivateTmp = true;
122284 };
285+ };
286+
287+ systemd.services.httpd.after =
288+ optional (config.services.zabbixWeb.enable && mysqlLocal) "mysql.service" ++
289+ optional (config.services.zabbixWeb.enable && pgsqlLocal) "postgresql.service";
123290
124291 };
125292
nixos/modules/services/networking/dhcpcd.nix+1−1
@@ -162,7 +162,7 @@ in
162162
163163 wantedBy = [ "multi-user.target" ] ++ optional (!hasDefaultGatewaySet) "network-online.target";
164164 wants = [ "network.target" "systemd-udev-settle.service" ];
165− before = [ "network.target" ];
165+ before = [ "network-online.target" ];
166166 after = [ "systemd-udev-settle.service" ];
167167
168168 # Stopping dhcpcd during a reconfiguration is undesirable
nixos/modules/services/networking/kresd.nix+5−2
@@ -80,8 +80,11 @@ in
8080 # Syntax depends on being IPv6 or IPv4.
8181 (iface: if elem ":" (stringToCharacters iface) then "[${iface}]:53" else "${iface}:53")
8282 cfg.interfaces;
83− socketConfig.ListenDatagram = listenStreams;
84− socketConfig.FreeBind = true;
83+ socketConfig = {
84+ ListenDatagram = listenStreams;
85+ FreeBind = true;
86+ FileDescriptorName = "dns";
87+ };
8588 };
8689
8790 systemd.sockets.kresd-tls = mkIf (cfg.listenTLS != []) rec {
nixos/modules/services/torrent/deluge.nix+70−21
@@ -118,36 +118,74 @@ in {
118118 more informations.
119119 '';
120120 };
121+
122+ user = mkOption {
123+ type = types.str;
124+ default = "deluge";
125+ description = ''
126+ User account under which deluge runs.
127+ '';
128+ };
129+
130+ group = mkOption {
131+ type = types.str;
132+ default = "deluge";
133+ description = ''
134+ Group under which deluge runs.
135+ '';
136+ };
137+
138+ extraPackages = mkOption {
139+ type = types.listOf types.package;
140+ default = [];
141+ description = ''
142+ Extra packages available at runtime to enable Deluge's plugins. For example,
143+ extraction utilities are required for the built-in "Extractor" plugin.
144+ This always contains unzip, gnutar, xz, p7zip and bzip2.
145+ '';
146+ };
121147 };
122148
123149 deluge.web = {
124150 enable = mkEnableOption "Deluge Web daemon";
151+
125152 port = mkOption {
126− type = types.port;
153+ type = types.port;
127154 default = 8112;
128155 description = ''
129156 Deluge web UI port.
130157 '';
131158 };
159+
160+ openFirewall = mkOption {
161+ type = types.bool;
162+ default = false;
163+ description = ''
164+ Open ports in the firewall for deluge web daemon
165+ '';
166+ };
132167 };
133168 };
134169 };
135170
136171 config = mkIf cfg.enable {
137172
138− systemd.tmpfiles.rules = [ "d '${configDir}' 0770 deluge deluge" ]
173+ # Provide a default set of `extraPackages`.
174+ services.deluge.extraPackages = with pkgs; [ unzip gnutar xz p7zip bzip2 ];
175+
176+ systemd.tmpfiles.rules = [ "d '${configDir}' 0770 ${cfg.user} ${cfg.group}" ]
139177 ++ optional (cfg.config ? "download_location")
140− "d '${cfg.config.download_location}' 0770 deluge deluge"
178+ "d '${cfg.config.download_location}' 0770 ${cfg.user} ${cfg.group}"
141179 ++ optional (cfg.config ? "torrentfiles_location")
142− "d '${cfg.config.torrentfiles_location}' 0770 deluge deluge"
180+ "d '${cfg.config.torrentfiles_location}' 0770 ${cfg.user} ${cfg.group}"
143181 ++ optional (cfg.config ? "move_completed_path")
144− "d '${cfg.config.move_completed_path}' 0770 deluge deluge";
182+ "d '${cfg.config.move_completed_path}' 0770 ${cfg.user} ${cfg.group}";
145183
146184 systemd.services.deluged = {
147185 after = [ "network.target" ];
148186 description = "Deluge BitTorrent Daemon";
149187 wantedBy = [ "multi-user.target" ];
150− path = [ pkgs.deluge ];
188+ path = [ pkgs.deluge ] ++ cfg.extraPackages;
151189 serviceConfig = {
152190 ExecStart = ''
153191 ${pkgs.deluge}/bin/deluged \
@@ -157,8 +195,8 @@ in {
157195 # To prevent "Quit & shutdown daemon" from working; we want systemd to
158196 # manage it!
159197 Restart = "on-success";
160− User = "deluge";
161− Group = "deluge";
198+ User = cfg.user;
199+ Group = cfg.group;
162200 UMask = "0002";
163201 LimitNOFILE = cfg.openFilesLimit;
164202 };
@@ -177,26 +215,37 @@ in {
177215 --config ${configDir} \
178216 --port ${toString cfg.web.port}
179217 '';
180− User = "deluge";
181− Group = "deluge";
218+ User = cfg.user;
219+ Group = cfg.group;
182220 };
183221 };
184222
185− networking.firewall = mkIf (cfg.declarative && cfg.openFirewall && !(cfg.config.random_port or true)) {
186− allowedTCPPortRanges = singleton (listToRange (cfg.config.listen_ports or listenPortsDefault));
187− allowedUDPPortRanges = singleton (listToRange (cfg.config.listen_ports or listenPortsDefault));
188− };
223+ networking.firewall = mkMerge [
224+ (mkIf (cfg.declarative && cfg.openFirewall && !(cfg.config.random_port or true)) {
225+ allowedTCPPortRanges = singleton (listToRange (cfg.config.listen_ports or listenPortsDefault));
226+ allowedUDPPortRanges = singleton (listToRange (cfg.config.listen_ports or listenPortsDefault));
227+ })
228+ (mkIf (cfg.web.openFirewall) {
229+ allowedTCPPorts = [ cfg.web.port ];
230+ })
231+ ];
189232
190233 environment.systemPackages = [ pkgs.deluge ];
191234
192− users.users.deluge = {
193− group = "deluge";
194− uid = config.ids.uids.deluge;
195− home = cfg.dataDir;
196− createHome = true;
197− description = "Deluge Daemon user";
235+ users.users = mkIf (cfg.user == "deluge") {
236+ deluge = {
237+ group = cfg.group;
238+ uid = config.ids.uids.deluge;
239+ home = cfg.dataDir;
240+ createHome = true;
241+ description = "Deluge Daemon user";
242+ };
198243 };
199244
200− users.groups.deluge.gid = config.ids.gids.deluge;
245+ users.groups = mkIf (cfg.group == "deluge") {
246+ deluge = {
247+ gid = config.ids.gids.deluge;
248+ };
249+ };
201250 };
202251}
nixos/modules/services/web-apps/zabbix.nixnew file+225
@@ -0,0 +1,225 @@
1+{ config, lib, pkgs, ... }:
2+
3+let
4+
5+ inherit (lib) mkDefault mkEnableOption mkForce mkIf mkMerge mkOption types;
6+ inherit (lib) literalExample mapAttrs optionalString;
7+
8+ cfg = config.services.zabbixWeb;
9+ fpm = config.services.phpfpm.pools.zabbix;
10+
11+ user = "zabbix";
12+ group = "zabbix";
13+ stateDir = "/var/lib/zabbix";
14+
15+ zabbixConfig = pkgs.writeText "zabbix.conf.php" ''
16+ <?php
17+ // Zabbix GUI configuration file.
18+ global $DB;
19+ $DB['TYPE'] = '${ { "mysql" = "MYSQL"; "pgsql" = "POSTGRESQL"; "oracle" = "ORACLE"; }.${cfg.database.type} }';
20+ $DB['SERVER'] = '${cfg.database.host}';
21+ $DB['PORT'] = '${toString cfg.database.port}';
22+ $DB['DATABASE'] = '${cfg.database.name}';
23+ $DB['USER'] = '${cfg.database.user}';
24+ $DB['PASSWORD'] = ${if cfg.database.passwordFile != null then "file_get_contents('${cfg.database.passwordFile}')" else "''"};
25+ // Schema name. Used for IBM DB2 and PostgreSQL.
26+ $DB['SCHEMA'] = ''';
27+ $ZBX_SERVER = '${cfg.server.address}';
28+ $ZBX_SERVER_PORT = '${toString cfg.server.port}';
29+ $ZBX_SERVER_NAME = ''';
30+ $IMAGE_FORMAT_DEFAULT = IMAGE_FORMAT_PNG;
31+ '';
32+
33+in
34+{
35+ # interface
36+
37+ options.services = {
38+ zabbixWeb = {
39+ enable = mkEnableOption "the Zabbix web interface";
40+
41+ package = mkOption {
42+ type = types.package;
43+ default = pkgs.zabbix.web;
44+ defaultText = "zabbix.web";
45+ description = "Which Zabbix package to use.";
46+ };
47+
48+ server = {
49+ port = mkOption {
50+ type = types.int;
51+ description = "The port of the Zabbix server to connect to.";
52+ default = 10051;
53+ };
54+
55+ address = mkOption {
56+ type = types.str;
57+ description = "The IP address or hostname of the Zabbix server to connect to.";
58+ default = "localhost";
59+ };
60+ };
61+
62+ database = {
63+ type = mkOption {
64+ type = types.enum [ "mysql" "pgsql" "oracle" ];
65+ example = "mysql";
66+ default = "pgsql";
67+ description = "Database engine to use.";
68+ };
69+
70+ host = mkOption {
71+ type = types.str;
72+ default = "";
73+ description = "Database host address.";
74+ };
75+
76+ port = mkOption {
77+ type = types.int;
78+ default =
79+ if cfg.database.type == "mysql" then config.services.mysql.port
80+ else if cfg.database.type == "pgsql" then config.services.postgresql.port
81+ else 1521;
82+ description = "Database host port.";
83+ };
84+
85+ name = mkOption {
86+ type = types.str;
87+ default = "zabbix";
88+ description = "Database name.";
89+ };
90+
91+ user = mkOption {
92+ type = types.str;
93+ default = "zabbix";
94+ description = "Database user.";
95+ };
96+
97+ passwordFile = mkOption {
98+ type = types.nullOr types.path;
99+ default = null;
100+ example = "/run/keys/zabbix-dbpassword";
101+ description = ''
102+ A file containing the password corresponding to
103+ <option>database.user</option>.
104+ '';
105+ };
106+
107+ socket = mkOption {
108+ type = types.nullOr types.path;
109+ default = null;
110+ example = "/run/postgresql";
111+ description = "Path to the unix socket file to use for authentication.";
112+ };
113+ };
114+
115+ virtualHost = mkOption {
116+ type = types.submodule ({
117+ options = import ../web-servers/apache-httpd/per-server-options.nix {
118+ inherit lib;
119+ forMainServer = false;
120+ };
121+ });
122+ example = {
123+ hostName = "zabbix.example.org";
124+ enableSSL = true;
125+ adminAddr = "webmaster@example.org";
126+ sslServerCert = "/var/lib/acme/zabbix.example.org/full.pem";
127+ sslServerKey = "/var/lib/acme/zabbix.example.org/key.pem";
128+ };
129+ description = ''
130+ Apache configuration can be done by adapting <literal>services.httpd.virtualHosts.&lt;name&gt;</literal>.
131+ See <xref linkend="opt-services.httpd.virtualHosts"/> for further information.
132+ '';
133+ };
134+
135+ poolConfig = mkOption {
136+ type = types.lines;
137+ default = ''
138+ pm = dynamic
139+ pm.max_children = 32
140+ pm.start_servers = 2
141+ pm.min_spare_servers = 2
142+ pm.max_spare_servers = 4
143+ pm.max_requests = 500
144+ '';
145+ description = ''
146+ Options for the Zabbix PHP pool. See the documentation on <literal>php-fpm.conf</literal> for details on configuration directives.
147+ '';
148+ };
149+
150+ };
151+ };
152+
153+ # implementation
154+
155+ config = mkIf cfg.enable {
156+
157+ systemd.tmpfiles.rules = [
158+ "d '${stateDir}' 0750 ${user} ${group} - -"
159+ "d '${stateDir}/session' 0750 ${user} ${config.services.httpd.group} - -"
160+ ];
161+
162+ services.phpfpm.pools.zabbix = {
163+ phpOptions = ''
164+ # https://www.zabbix.com/documentation/current/manual/installation/install
165+ memory_limit = 128M
166+ post_max_size = 16M
167+ upload_max_filesize = 2M
168+ max_execution_time = 300
169+ max_input_time = 300
170+ session.auto_start = 0
171+ mbstring.func_overload = 0
172+ always_populate_raw_post_data = -1
173+ # https://bbs.archlinux.org/viewtopic.php?pid=1745214#p1745214
174+ session.save_path = ${stateDir}/session
175+ '' + optionalString (config.time.timeZone != null) ''
176+ date.timezone = "${config.time.timeZone}"
177+ '' + optionalString (cfg.database.type == "oracle") ''
178+ extension=${pkgs.phpPackages.oci8}/lib/php/extensions/oci8.so
179+ '';
180+ listen = "/run/phpfpm/zabbix.sock";
181+ extraConfig = ''
182+ listen.owner = ${config.services.httpd.user};
183+ listen.group = ${config.services.httpd.group};
184+ user = ${user};
185+ group = ${config.services.httpd.group};
186+ env[ZABBIX_CONFIG] = ${zabbixConfig}
187+ ${cfg.poolConfig}
188+ '';
189+ };
190+
191+ services.httpd = {
192+ enable = true;
193+ adminAddr = mkDefault cfg.virtualHost.adminAddr;
194+ extraModules = [ "proxy_fcgi" ];
195+ virtualHosts = [ (mkMerge [
196+ cfg.virtualHost {
197+ documentRoot = mkForce "${cfg.package}/share/zabbix";
198+ extraConfig = ''
199+ <Directory "${cfg.package}/share/zabbix">
200+ <FilesMatch "\.php$">
201+ <If "-f %{REQUEST_FILENAME}">
202+ SetHandler "proxy:unix:${fpm.listen}|fcgi://localhost/"
203+ </If>
204+ </FilesMatch>
205+ AllowOverride all
206+ Options -Indexes
207+ DirectoryIndex index.php
208+ </Directory>
209+ '';
210+ }
211+ ]) ];
212+ };
213+
214+ users.users.${user} = mapAttrs (name: mkDefault) {
215+ description = "Zabbix daemon user";
216+ uid = config.ids.uids.zabbix;
217+ inherit group;
218+ };
219+
220+ users.groups.${group} = mapAttrs (name: mkDefault) {
221+ gid = config.ids.gids.zabbix;
222+ };
223+
224+ };
225+}
nixos/modules/services/web-servers/apache-httpd/foswiki.nixdeleted−78
@@ -1,78 +0,0 @@
1−{ config, pkgs, lib, serverInfo, ... }:
2−let
3− inherit (pkgs) foswiki;
4− inherit (serverInfo.serverConfig) user group;
5− inherit (config) vardir;
6−in
7−{
8− options.vardir = lib.mkOption {
9− type = lib.types.path;
10− default = "/var/www/foswiki";
11− description = "The directory where variable foswiki data will be stored and served from.";
12− };
13−
14− # TODO: this will probably need to be better customizable
15− extraConfig =
16− let httpd-conf = pkgs.runCommand "foswiki-httpd.conf"
17− { preferLocalBuild = true; }
18− ''
19− substitute '${foswiki}/foswiki_httpd_conf.txt' "$out" \
20− --replace /var/www/foswiki/ "${vardir}/"
21− '';
22− in
23− ''
24− RewriteEngine on
25− RewriteRule /foswiki/(.*) ${vardir}/$1
26−
27− <Directory "${vardir}">
28− Require all granted
29− </Directory>
30−
31− Include ${httpd-conf}
32− <Directory "${vardir}/pub">
33− Options FollowSymlinks
34− </Directory>
35− '';
36−
37− /** This handles initial setup and updates.
38− It will probably need some tweaking, maybe per-site. */
39− startupScript = pkgs.writeScript "foswiki_startup.sh" (
40− let storeLink = "${vardir}/package"; in
41− ''
42− [ -e '${storeLink}' ] || needs_setup=1
43− mkdir -p '${vardir}'
44− cd '${vardir}'
45− ln -sf -T '${foswiki}' '${storeLink}'
46−
47− if [ -n "$needs_setup" ]; then # do initial setup
48− mkdir -p bin lib
49− # setup most of data/ as copies only
50− cp -r '${foswiki}'/data '${vardir}/'
51− rm -r '${vardir}'/data/{System,mime.types}
52− ln -sr -t '${vardir}/data/' '${storeLink}'/data/{System,mime.types}
53−
54− ln -sr '${storeLink}/locale' .
55−
56− mkdir pub
57− ln -sr '${storeLink}/pub/System' pub/
58−
59− mkdir templates
60− ln -sr '${storeLink}'/templates/* templates/
61−
62− ln -sr '${storeLink}/tools' .
63−
64− mkdir -p '${vardir}'/working/{logs,tmp}
65− ln -sr '${storeLink}/working/README' working/ # used to check dir validity
66−
67− chown -R '${user}:${group}' .
68− chmod +w -R .
69− fi
70−
71− # bin/* and lib/* shall always be overwritten, in case files are added
72− ln -srf '${storeLink}'/bin/* '${vardir}/bin/'
73− ln -srf '${storeLink}'/lib/* '${vardir}/lib/'
74− ''
75− /* Symlinking bin/ one-by-one ensures that ${vardir}/lib/LocalSite.cfg
76− is used instead of ${foswiki}/... */
77− );
78−}
nixos/modules/services/web-servers/apache-httpd/trac.nixdeleted−121
@@ -1,121 +0,0 @@
1−{ config, lib, pkgs, serverInfo, ... }:
2−
3−with lib;
4−
5−let
6−
7− # Build a Subversion instance with Apache modules and Swig/Python bindings.
8− subversion = pkgs.subversion.override {
9− bdbSupport = true;
10− httpServer = true;
11− pythonBindings = true;
12− apacheHttpd = httpd;
13− };
14−
15− httpd = serverInfo.serverConfig.package;
16−
17− versionPre24 = versionOlder httpd.version "2.4";
18−
19−in
20−
21−{
22−
23− options = {
24−
25− projectsLocation = mkOption {
26− description = "URL path in which Trac projects can be accessed";
27− default = "/projects";
28− };
29−
30− projects = mkOption {
31− description = "List of projects that should be provided by Trac. If they are not defined yet empty projects are created.";
32− default = [];
33− example =
34− [ { identifier = "myproject";
35− name = "My Project";
36− databaseURL="postgres://root:password@/tracdb";
37− subversionRepository="/data/subversion/myproject";
38− }
39− ];
40− };
41−
42− user = mkOption {
43− default = "wwwrun";
44− description = "User account under which Trac runs.";
45− };
46−
47− group = mkOption {
48− default = "wwwrun";
49− description = "Group under which Trac runs.";
50− };
51−
52− ldapAuthentication = {
53− enable = mkOption {
54− default = false;
55− description = "Enable the ldap authentication in trac";
56− };
57−
58− url = mkOption {
59− default = "ldap://127.0.0.1/dc=example,dc=co,dc=ke?uid?sub?(objectClass=inetOrgPerson)";
60− description = "URL of the LDAP authentication";
61− };
62−
63− name = mkOption {
64− default = "Trac server";
65− description = "AuthName";
66− };
67− };
68−
69− };
70−
71− extraModules = singleton
72− { name = "python"; path = "${pkgs.mod_python}/modules/mod_python.so"; };
73−
74− extraConfig = ''
75− <Location ${config.projectsLocation}>
76− SetHandler mod_python
77− PythonHandler trac.web.modpython_frontend
78− PythonOption TracEnvParentDir /var/trac/projects
79− PythonOption TracUriRoot ${config.projectsLocation}
80− PythonOption PYTHON_EGG_CACHE /var/trac/egg-cache
81− </Location>
82− ${if config.ldapAuthentication.enable then ''
83− <LocationMatch "^${config.projectsLocation}[^/]+/login$">
84− AuthType Basic
85− AuthName "${config.ldapAuthentication.name}"
86− AuthBasicProvider "ldap"
87− AuthLDAPURL "${config.ldapAuthentication.url}"
88− ${if versionPre24 then "authzldapauthoritative Off" else ""}
89− require valid-user
90− </LocationMatch>
91− '' else ""}
92− '';
93−
94− globalEnvVars = singleton
95− { name = "PYTHONPATH";
96− value =
97− makeSearchPathOutput "lib" "lib/${pkgs.python.libPrefix}/site-packages"
98− [ pkgs.mod_python
99− pkgs.pythonPackages.trac
100− pkgs.pythonPackages.setuptools
101− pkgs.pythonPackages.genshi
102− pkgs.pythonPackages.psycopg2
103− subversion
104− ];
105− };
106−
107− startupScript = pkgs.writeScript "activateTrac" ''
108− mkdir -p /var/trac
109− chown ${config.user}:${config.group} /var/trac
110−
111− ${concatMapStrings (project:
112− ''
113− if [ ! -d /var/trac/${project.identifier} ]
114− then
115− export PYTHONPATH=${pkgs.pythonPackages.psycopg2}/lib/${pkgs.python.libPrefix}/site-packages
116− ${pkgs.pythonPackages.trac}/bin/trac-admin /var/trac/${project.identifier} initenv "${project.name}" "${project.databaseURL}" svn "${project.subversionRepository}"
117− fi
118− '' ) (config.projects)}
119− '';
120−
121−}
nixos/modules/services/web-servers/apache-httpd/zabbix.nixdeleted−84
@@ -1,84 +0,0 @@
1−{ config, lib, pkgs, serverInfo, ... }:
2−
3−with lib;
4−
5−let
6−
7− # The Zabbix PHP frontend needs to be able to write its
8− # configuration settings (the connection info to the database) to
9− # the "conf" subdirectory. So symlink $out/conf to some directory
10− # outside of the Nix store where we want to keep this stateful info.
11− # Note that different instances of the frontend will therefore end
12− # up with their own copies of the PHP sources. !!! Alternatively,
13− # we could generate zabbix.conf.php declaratively.
14− zabbixPHP = pkgs.runCommand "${pkgs.zabbix.server.name}-php" {}
15− ''
16− cp -rs ${pkgs.zabbix.server}/share/zabbix/php "$out"
17− chmod -R u+w $out
18− ln -s "${if config.configFile == null
19− then "${config.stateDir}/zabbix.conf.php"
20− else config.configFile}" "$out/conf/zabbix.conf.php"
21− '';
22−
23−in
24−
25−{
26−
27− enablePHP = true;
28−
29− phpOptions =
30− ''
31− post_max_size = 32M
32− max_execution_time = 300
33− max_input_time = 300
34− '';
35−
36− extraConfig = ''
37− Alias ${config.urlPrefix}/ ${zabbixPHP}/
38−
39− <Directory ${zabbixPHP}>
40− DirectoryIndex index.php
41− Order deny,allow
42− Allow from *
43− </Directory>
44− '';
45−
46− startupScript = pkgs.writeScript "zabbix-startup-hook" ''
47− mkdir -p ${config.stateDir}
48− chown -R ${serverInfo.serverConfig.user} ${config.stateDir}
49− '';
50−
51− # The frontend needs "ps" to find out whether zabbix_server is running.
52− extraServerPath = [ pkgs.procps ];
53−
54− options = {
55−
56− urlPrefix = mkOption {
57− default = "/zabbix";
58− description = "
59− The URL prefix under which the Zabbix service appears.
60− Use the empty string to have it appear in the server root.
61− ";
62− };
63−
64− configFile = mkOption {
65− default = null;
66− type = types.nullOr types.path;
67− description = ''
68− The configuration file (zabbix.conf.php) which contains the database
69− connection settings. If not set, the configuration settings will created
70− by the web installer.
71− '';
72− };
73−
74− stateDir = mkOption {
75− default = "/var/lib/zabbix/frontend";
76− description = "
77− Directory where the dynamically generated configuration data
78− of the PHP frontend will be stored.
79− ";
80− };
81−
82− };
83−
84−}
nixos/modules/services/x11/xserver.nix+3−4
@@ -662,10 +662,9 @@ in
662662 restartIfChanged = false;
663663
664664 environment =
665− {
666− LD_LIBRARY_PATH = concatStringsSep ":" ([ "/run/opengl-driver/lib" ]
667− ++ concatLists (catAttrs "libPath" cfg.drivers));
668− } // cfg.displayManager.job.environment;
665+ optionalAttrs config.hardware.opengl.setLdLibraryPath
666+ { LD_LIBRARY_PATH = pkgs.addOpenGLRunpath.driverLink; }
667+ // cfg.displayManager.job.environment;
669668
670669 preStart =
671670 ''
nixos/modules/system/boot/loader/grub/install-grub.pl+23
@@ -407,6 +407,29 @@ addEntry("NixOS - Default", $defaultConfig);
407407
408408$conf .= "$extraEntries\n" unless $extraEntriesBeforeNixOS;
409409
410+# Find all the children of the current default configuration
411+# Do not search for grand children
412+my @links = sort (glob "$defaultConfig/fine-tune/*");
413+foreach my $link (@links) {
414+
415+ my $entryName = "";
416+
417+ my $cfgName = readFile("$link/configuration-name");
418+
419+ my $date = strftime("%F", localtime(lstat($link)->mtime));
420+ my $version =
421+ -e "$link/nixos-version"
422+ ? readFile("$link/nixos-version")
423+ : basename((glob(dirname(Cwd::abs_path("$link/kernel")) . "/lib/modules/*"))[0]);
424+
425+ if ($cfgName) {
426+ $entryName = $cfgName;
427+ } else {
428+ $entryName = "($date - $version)";
429+ }
430+ addEntry("NixOS - $entryName", $link);
431+}
432+
410433my $grubBootPath = $grubBoot->path;
411434# extraEntries could refer to @bootRoot@, which we have to substitute
412435$conf =~ s/\@bootRoot\@/$grubBootPath/g;
nixos/modules/tasks/auto-upgrade.nix+27−5
@@ -53,6 +53,16 @@ let cfg = config.system.autoUpgrade; in
5353 '';
5454 };
5555
56+ allowReboot = mkOption {
57+ default = false;
58+ type = types.bool;
59+ description = ''
60+ Reboot the system into the new generation instead of a switch
61+ if the new generation uses a different kernel, kernel modules
62+ or initrd than the booted system.
63+ '';
64+ };
65+
5666 };
5767
5868 };
@@ -78,11 +88,23 @@ let cfg = config.system.autoUpgrade; in
7888 HOME = "/root";
7989 } // config.networking.proxy.envVars;
8090
81− path = [ pkgs.gnutar pkgs.xz.bin pkgs.gitMinimal config.nix.package.out ];
82−
83− script = ''
84− ${config.system.build.nixos-rebuild}/bin/nixos-rebuild switch ${toString cfg.flags}
85− '';
91+ path = [ pkgs.coreutils pkgs.gnutar pkgs.xz.bin pkgs.gitMinimal config.nix.package.out ];
92+
93+ script = let
94+ nixos-rebuild = "${config.system.build.nixos-rebuild}/bin/nixos-rebuild";
95+ in
96+ if cfg.allowReboot then ''
97+ ${nixos-rebuild} boot ${toString cfg.flags}
98+ booted="$(readlink /run/booted-system/{initrd,kernel,kernel-modules})"
99+ built="$(readlink /nix/var/nix/profiles/system/{initrd,kernel,kernel-modules})"
100+ if [ "$booted" = "$built" ]; then
101+ ${nixos-rebuild} switch ${toString cfg.flags}
102+ else
103+ /run/current-system/sw/bin/shutdown -r +1
104+ fi
105+ '' else ''
106+ ${nixos-rebuild} switch ${toString cfg.flags}
107+ '';
86108
87109 startAt = cfg.dates;
88110 };
nixos/modules/virtualisation/parallels-guest.nix+2−1
@@ -47,7 +47,7 @@ in
4747 config = mkIf config.hardware.parallels.enable {
4848 services.xserver = {
4949 drivers = singleton
50− { name = "prlvideo"; modules = [ prl-tools ]; libPath = [ prl-tools ]; };
50+ { name = "prlvideo"; modules = [ prl-tools ]; };
5151
5252 screenSection = ''
5353 Option "NoMTRR"
@@ -65,6 +65,7 @@ in
6565
6666 hardware.opengl.package = prl-tools;
6767 hardware.opengl.package32 = pkgs.pkgsi686Linux.linuxPackages.prl-tools.override { libsOnly = true; kernel = null; };
68+ hardware.opengl.setLdLibraryPath = true;
6869
6970 services.udev.packages = [ prl-tools ];
7071
nixos/tests/deluge.nix+4−2
@@ -8,9 +8,11 @@ import ./make-test.nix ({ pkgs, ...} : {
88 simple = {
99 services.deluge = {
1010 enable = true;
11− web.enable = true;
11+ web = {
12+ enable = true;
13+ openFirewall = true;
14+ };
1215 };
13− networking.firewall.allowedTCPPorts = [ 8112 ];
1416 };
1517
1618 declarative =
nixos/tests/installer.nix+101−29
@@ -67,6 +67,7 @@ let
6767 # partitions and filesystems.
6868 testScriptFun = { bootLoader, createPartitions, grubVersion, grubDevice, grubUseEfi
6969 , grubIdentifier, preBootCommands, extraConfig
70+ , testCloneConfig
7071 }:
7172 let
7273 iface = if grubVersion == 1 then "ide" else "virtio";
@@ -85,6 +86,7 @@ let
8586 in if !isEfi && !(pkgs.stdenv.isi686 || pkgs.stdenv.isx86_64) then
8687 throw "Non-EFI boot methods are only supported on i686 / x86_64"
8788 else ''
89+
8890 $machine->start;
8991
9092 # Make sure that we get a login prompt etc.
@@ -185,6 +187,43 @@ let
185187 ${preBootCommands}
186188 $machine->waitForUnit("network.target");
187189 $machine->shutdown;
190+
191+ # Tests for validating clone configuration entries in grub menu
192+ ${optionalString testCloneConfig ''
193+ # Reboot Machine
194+ $machine = createMachine({ ${hdFlags} qemuFlags => "${qemuFlags}", name => "clone-default-config" });
195+ ${preBootCommands}
196+ $machine->waitForUnit("multi-user.target");
197+
198+ # Booted configuration name should be Home
199+ # This is not the name that shows in the grub menu.
200+ # The default configuration is always shown as "Default"
201+ $machine->succeed("cat /run/booted-system/configuration-name >&2");
202+ $machine->succeed("cat /run/booted-system/configuration-name | grep Home");
203+
204+ # We should find **not** a file named /etc/gitconfig
205+ $machine->fail("test -e /etc/gitconfig");
206+
207+ # Set grub to boot the second configuration
208+ $machine->succeed("grub-reboot 1");
209+
210+ $machine->shutdown;
211+
212+ # Reboot Machine
213+ $machine = createMachine({ ${hdFlags} qemuFlags => "${qemuFlags}", name => "clone-alternate-config" });
214+ ${preBootCommands}
215+
216+ $machine->waitForUnit("multi-user.target");
217+ # Booted configuration name should be Work
218+ $machine->succeed("cat /run/booted-system/configuration-name >&2");
219+ $machine->succeed("cat /run/booted-system/configuration-name | grep Work");
220+
221+ # We should find a file named /etc/gitconfig
222+ $machine->succeed("test -e /etc/gitconfig");
223+
224+ $machine->shutdown;
225+ ''}
226+
188227 '';
189228
190229
@@ -194,6 +233,7 @@ let
194233 , bootLoader ? "grub" # either "grub" or "systemd-boot"
195234 , grubVersion ? 2, grubDevice ? "/dev/vda", grubIdentifier ? "uuid", grubUseEfi ? false
196235 , enableOCR ? false, meta ? {}
236+ , testCloneConfig ? false
197237 }:
198238 makeTest {
199239 inherit enableOCR;
@@ -269,7 +309,8 @@ let
269309
270310 testScript = testScriptFun {
271311 inherit bootLoader createPartitions preBootCommands
272− grubVersion grubDevice grubIdentifier grubUseEfi extraConfig;
312+ grubVersion grubDevice grubIdentifier grubUseEfi extraConfig
313+ testCloneConfig;
273314 };
274315 };
275316
@@ -304,32 +345,24 @@ let
304345 '';
305346 };
306347
307−
308−in {
309−
310− # !!! `parted mkpart' seems to silently create overlapping partitions.
311−
312−
313348 # The (almost) simplest partitioning scheme: a swap partition and
314349 # one big filesystem partition.
315− simple = makeInstallerTest "simple"
316− { createPartitions =
317− ''
318− $machine->succeed(
319− "flock /dev/vda parted --script /dev/vda -- mklabel msdos"
320− . " mkpart primary linux-swap 1M 1024M"
321− . " mkpart primary ext2 1024M -1s",
322− "udevadm settle",
323− "mkswap /dev/vda1 -L swap",
324− "swapon -L swap",
325− "mkfs.ext3 -L nixos /dev/vda2",
326− "mount LABEL=nixos /mnt",
327− );
328− '';
329− };
330−
331− # Simple GPT/UEFI configuration using systemd-boot with 3 partitions: ESP, swap & root filesystem
332− simpleUefiSystemdBoot = makeInstallerTest "simpleUefiSystemdBoot"
350+ simple-test-config = { createPartitions =
351+ ''
352+ $machine->succeed(
353+ "flock /dev/vda parted --script /dev/vda -- mklabel msdos"
354+ . " mkpart primary linux-swap 1M 1024M"
355+ . " mkpart primary ext2 1024M -1s",
356+ "udevadm settle",
357+ "mkswap /dev/vda1 -L swap",
358+ "swapon -L swap",
359+ "mkfs.ext3 -L nixos /dev/vda2",
360+ "mount LABEL=nixos /mnt",
361+ );
362+ '';
363+ };
364+
365+ simple-uefi-grub-config =
333366 { createPartitions =
334367 ''
335368 $machine->succeed(
@@ -348,10 +381,45 @@ in {
348381 "mount LABEL=BOOT /mnt/boot",
349382 );
350383 '';
351− bootLoader = "systemd-boot";
384+ bootLoader = "grub";
385+ grubUseEfi = true;
352386 };
353387
354− simpleUefiGrub = makeInstallerTest "simpleUefiGrub"
388+ clone-test-extraconfig = { extraConfig =
389+ ''
390+ environment.systemPackages = [ pkgs.grub2 ];
391+ boot.loader.grub.configurationName = "Home";
392+ nesting.clone = [
393+ {
394+ boot.loader.grub.configurationName = lib.mkForce "Work";
395+
396+ environment.etc = {
397+ "gitconfig".text = "
398+ [core]
399+ gitproxy = none for work.com
400+ ";
401+ };
402+ }
403+ ];
404+ '';
405+ testCloneConfig = true;
406+ };
407+
408+
409+in {
410+
411+ # !!! `parted mkpart' seems to silently create overlapping partitions.
412+
413+
414+ # The (almost) simplest partitioning scheme: a swap partition and
415+ # one big filesystem partition.
416+ simple = makeInstallerTest "simple" simple-test-config;
417+
418+ # Test cloned configurations with the simple grub configuration
419+ simpleClone = makeInstallerTest "simpleClone" (simple-test-config // clone-test-extraconfig);
420+
421+ # Simple GPT/UEFI configuration using systemd-boot with 3 partitions: ESP, swap & root filesystem
422+ simpleUefiSystemdBoot = makeInstallerTest "simpleUefiSystemdBoot"
355423 { createPartitions =
356424 ''
357425 $machine->succeed(
@@ -370,10 +438,14 @@ in {
370438 "mount LABEL=BOOT /mnt/boot",
371439 );
372440 '';
373− bootLoader = "grub";
374− grubUseEfi = true;
441+ bootLoader = "systemd-boot";
375442 };
376443
444+ simpleUefiGrub = makeInstallerTest "simpleUefiGrub" simple-uefi-grub-config;
445+
446+ # Test cloned configurations with the uefi grub configuration
447+ simpleUefiGrubClone = makeInstallerTest "simpleUefiGrubClone" (simple-uefi-grub-config // clone-test-extraconfig);
448+
377449 # Same as the previous, but now with a separate /boot partition.
378450 separateBoot = makeInstallerTest "separateBoot"
379451 { createPartitions =
nixos/tests/trac.nixdeleted−74
@@ -1,74 +0,0 @@
1−import ./make-test.nix ({ pkgs, ... }: {
2− name = "trac";
3− meta = with pkgs.stdenv.lib.maintainers; {
4− maintainers = [ eelco ];
5− };
6−
7− nodes = {
8− storage =
9− { ... }:
10− { services.nfs.server.enable = true;
11− services.nfs.server.exports = ''
12− /repos 192.168.1.0/255.255.255.0(rw,no_root_squash)
13− '';
14− services.nfs.server.createMountPoints = true;
15− };
16−
17− postgresql =
18− { pkgs, ... }:
19− { services.postgresql.enable = true;
20− services.postgresql.package = pkgs.postgresql;
21− services.postgresql.enableTCPIP = true;
22− services.postgresql.authentication = ''
23− # Generated file; do not edit!
24− local all all trust
25− host all all 127.0.0.1/32 trust
26− host all all ::1/128 trust
27− host all all 192.168.1.0/24 trust
28− '';
29− };
30−
31− webserver =
32− { pkgs, ... }:
33− { fileSystems = pkgs.lib.mkVMOverride
34− [ { mountPoint = "/repos";
35− device = "storage:/repos";
36− fsType = "nfs";
37− }
38− ];
39− services.httpd.enable = true;
40− services.httpd.adminAddr = "root@localhost";
41− services.httpd.extraSubservices = [ { serviceType = "trac"; } ];
42− environment.systemPackages = [ pkgs.pythonPackages.trac pkgs.subversion ];
43− };
44−
45− client =
46− { ... }:
47− { imports = [ ./common/x11.nix ];
48− services.xserver.desktopManager.plasma5.enable = true;
49− };
50− };
51−
52− testScript =
53− ''
54− startAll;
55−
56− $postgresql->waitForUnit("postgresql");
57− $postgresql->succeed("createdb trac");
58−
59− $webserver->succeed("mkdir -p /repos/trac");
60− $webserver->succeed("svnadmin create /repos/trac");
61−
62− $webserver->waitForUnit("httpd");
63− $webserver->waitForFile("/var/trac");
64− $webserver->succeed("mkdir -p /var/trac/projects/test");
65− $webserver->succeed("PYTHONPATH=${pkgs.pythonPackages.psycopg2}/lib/${pkgs.python.libPrefix}/site-packages trac-admin /var/trac/projects/test initenv Test postgres://root\@postgresql/trac svn /repos/trac");
66−
67− $client->waitForX;
68− $client->execute("konqueror http://webserver/projects/test &");
69− $client->waitForWindow(qr/Test.*Konqueror/);
70− $client->sleep(30); # loading takes a long time
71−
72− $client->screenshot("screen");
73− '';
74−})
pkgs/applications/altcoins/clightning.nix+2−11
@@ -4,11 +4,11 @@
44with stdenv.lib;
55stdenv.mkDerivation rec {
66 name = "clightning-${version}";
7− version = "0.7.0";
7+ version = "0.7.1";
88
99 src = fetchurl {
1010 url = "https://github.com/ElementsProject/lightning/releases/download/v${version}/clightning-v${version}.zip";
11− sha256 = "448022c2433cbf19bbd0f726344b0500c0c21ee5cc2291edf6b622f094cb3a15";
11+ sha256 = "557be34410f27a8d55d9f31a40717a8f5e99829f2bd114c24e7ca1dd5f6b7d85";
1212 };
1313
1414 enableParallelBuilding = true;
@@ -18,15 +18,6 @@ stdenv.mkDerivation rec {
1818
1919 makeFlags = [ "prefix=$(out) VERSION=v${version}" ];
2020
21− patches = [
22− # remove after 0.7.0
23− (fetchpatch {
24− name = "fix-0.7.0-build.patch";
25− url = "https://github.com/ElementsProject/lightning/commit/ffc03d2bc84dc42f745959fbb6c8007cf0a6f701.patch";
26− sha256 = "1m5fiz3m8k3nk09nldii8ij94bg6fqllqgdbiwj3sy12vihs8c4v";
27− })
28− ];
29−
3021 configurePhase = ''
3122 ./configure --prefix=$out --disable-developer --disable-valgrind
3223 '';
pkgs/applications/audio/radiotray-ng/default.nix+5−4
@@ -39,14 +39,14 @@ let
3939 pythonInputs = with python2.pkgs; [ python2 lxml ];
4040in
4141stdenv.mkDerivation rec {
42− name = "radiotray-ng-${version}";
43− version = "0.2.5";
42+ pname = "radiotray-ng";
43+ version = "0.2.6";
4444
4545 src = fetchFromGitHub {
4646 owner = "ebruck";
4747 repo = "radiotray-ng";
4848 rev = "v${version}";
49− sha256 = "1crvpn1mgrv7bd2k683mpgs59785mkrjvmp1f14iyq4qrr0f9zzi";
49+ sha256 = "0khrfxjas2ldh0kksq7l811srqy16ahjxchvz0hhykx5hykymxlb";
5050 };
5151
5252 nativeBuildInputs = [ cmake pkgconfig wrapGAppsHook makeWrapper ];
@@ -64,9 +64,10 @@ stdenv.mkDerivation rec {
6464 patches = [ ./no-dl-googletest.patch ];
6565
6666 postPatch = ''
67− for x in debian/CMakeLists.txt include/radiotray-ng/common.hpp data/*.desktop; do
67+ for x in package/CMakeLists.txt include/radiotray-ng/common.hpp data/*.desktop; do
6868 substituteInPlace $x --replace /usr $out
6969 done
70+ substituteInPlace package/CMakeLists.txt --replace /etc/xdg/autostart $out/etc/xdg/autostart
7071
7172 # We don't find the radiotray-ng-notification icon otherwise
7273 substituteInPlace data/radiotray-ng.desktop \
pkgs/applications/audio/radiotray-ng/no-dl-googletest.patch+3−3
@@ -1,4 +1,4 @@
1−From 2ce91cd2244e61d54e0c0a3b26851912240b0667 Mon Sep 17 00:00:00 2001
1+From b6f7a9e2e0194c6baed63a33b7beff359080b8d9 Mon Sep 17 00:00:00 2001
22From: Will Dietz <w@wdtz.org>
33Date: Sat, 16 Mar 2019 11:40:00 -0500
44Subject: [PATCH] don't download googletest
@@ -9,7 +9,7 @@ Subject: [PATCH] don't download googletest
99 2 files changed, 19 deletions(-)
1010
1111diff --git a/CMakeLists.txt b/CMakeLists.txt
12−index fc1b9de..301c266 100644
12+index ddba1be..3396705 100644
1313--- a/CMakeLists.txt
1414+++ b/CMakeLists.txt
1515@@ -70,25 +70,7 @@ endif()
@@ -51,5 +51,5 @@ index 859c048..58ab5c2 100644
5151 target_include_directories(${target} PRIVATE ${JSONCPP_INCLUDE_DIRS})
5252 gtest_discover_tests(${target})
5353--
54−2.21.GIT
54+2.22.0
5555
pkgs/applications/editors/jupyter/kernel.nix+8−8
@@ -37,15 +37,15 @@ in
3737 installPhase = ''
3838 mkdir kernels
3939
40− ${concatStringsSep "\n" (mapAttrsToList (kernelName: kernel:
40+ ${concatStringsSep "\n" (mapAttrsToList (kernelName: unfilteredKernel:
4141 let
42− config = builtins.toJSON {
43− display_name = if (kernel.displayName != "")
44− then kernel.displayName
45− else kernelName;
46− argv = kernel.argv;
47− language = kernel.language;
48− };
42+ allowedKernelKeys = ["argv" "displayName" "language" "interruptMode" "env" "metadata" "logo32" "logo64"];
43+ kernel = filterAttrs (n: v: (any (x: x == n) allowedKernelKeys)) unfilteredKernel;
44+ config = builtins.toJSON (
45+ kernel
46+ // {display_name = if (kernel.displayName != "") then kernel.displayName else kernelName;}
47+ // (optionalAttrs (kernel ? interruptMode) { interrupt_mode = kernel.interruptMode; })
48+ );
4949 logo32 =
5050 if (kernel.logo32 != null)
5151 then "ln -s ${kernel.logo32} 'kernels/${kernelName}/logo-32x32.png';"
pkgs/applications/editors/vscode/vscode.nix+3−3
@@ -11,13 +11,13 @@ let
1111 archive_fmt = if system == "x86_64-darwin" then "zip" else "tar.gz";
1212
1313 sha256 = {
14− "x86_64-linux" = "02h71b9m9w4nc8g9iy2kafg041brli4zwv7pv6i1qg6p5cf2jdfx";
15− "x86_64-darwin" = "1awq0rwiizwbjqf7crv59qr7m7rmgpfba0b4qx2bpx1mn25fmq56";
14+ "x86_64-linux" = "1ck13xpnfklfc81jd8d5md09fcp0gjypacdqj276mzhr5mig29cd";
15+ "x86_64-darwin" = "0xpzm372swv0by22saxib16fvvvfjr7d68aj3l5dsl5c9a8v23qj";
1616 }.${system};
1717in
1818 callPackage ./generic.nix rec {
1919
20− version = "1.36.0";
20+ version = "1.36.1";
2121 pname = "vscode";
2222
2323 executableName = "code" + lib.optionalString isInsiders "-insiders";
pkgs/applications/editors/vscode/vscodium.nix+3−3
@@ -11,13 +11,13 @@ let
1111 archive_fmt = if system == "x86_64-darwin" then "zip" else "tar.gz";
1212
1313 sha256 = {
14− "x86_64-linux" = "09vmq87az0f91xwyfby85pnn4mg0rlf7pyvs5bkrxv0r8jxxfpq7";
15− "x86_64-darwin" = "16yzzmlf3v9aj7dyglqjxdksabv0cc98w6kdv5rbfw865hj4bbck";
14+ "x86_64-linux" = "1ay4zvkbln2wf2j1d71mn13b6p2fqvzgz45mzrgaqwsszhbg4xzp";
15+ "x86_64-darwin" = "17r9krb1qd92ybx078hkw9zlyym6kbnmbl91vjdilsq77bkf9jmw";
1616 }.${system};
1717in
1818 callPackage ./generic.nix rec {
1919
20− version = "1.36.0";
20+ version = "1.36.1";
2121 pname = "vscodium";
2222
2323 executableName = "codium";
pkgs/applications/misc/archiver/default.nix+9−11
@@ -1,26 +1,24 @@
1−{ buildGoPackage
1+{ buildGoModule
22, fetchFromGitHub
33, lib
44}:
55
6−buildGoPackage rec {
7− name = "archiver-${version}";
8− version = "3.0.0";
9−
10− goPackagePath = "github.com/mholt/archiver";
6+buildGoModule rec {
7+ pname = "archiver";
8+ version = "3.2.0";
119
1210 src = fetchFromGitHub {
1311 owner = "mholt";
14− repo = "archiver";
12+ repo = pname;
1513 rev = "v${version}";
16− sha256 = "1wngv51333h907mp6nbzd9dq6r0x06mag2cij92912jcbzy0q8bk";
14+ sha256 = "1kq2cyhbniwdabk426j493cs8d4nj35vmznm9031rrdd9ln5h9gl";
1715 };
1816
19− goDeps = ./deps.nix;
17+ modSha256 = "13vwgqpw7ypq6mrvwmnl8n38x0h89ymryrrzkf7ya478fp00vclj";
2018
2119 meta = with lib; {
22− description = "Easily create and extract .zip, .tar, .tar.gz, .tar.bz2, .tar.xz, .tar.lz4, .tar.sz, and .rar (extract-only) files with Go";
23− homepage = https://github.com/mholt/archiver;
20+ description = "Easily create & extract archives, and compress & decompress files of various formats";
21+ homepage = "https://github.com/mholt/archiver";
2422 license = licenses.mit;
2523 maintainers = with maintainers; [ kalbasit ];
2624 platforms = platforms.all;
pkgs/applications/misc/archiver/deps.nixdeleted−56
@@ -1,56 +0,0 @@
1−[
2− {
3− goPackagePath = "github.com/dsnet/compress";
4− fetch = {
5− type = "git";
6− url = "https://github.com/dsnet/compress";
7− rev = "cc9eb1d7ad760af14e8f918698f745e80377af4f";
8− sha256 = "159liclywmyb6zx88ga5gn42hfl4cpk1660zss87fkx31hdq9fgx";
9− };
10− }
11− {
12− goPackagePath = "github.com/golang/snappy";
13− fetch = {
14− type = "git";
15− url = "https://github.com/golang/snappy";
16− rev = "2e65f85255dbc3072edf28d6b5b8efc472979f5a";
17− sha256 = "05w6mpc4qcy0pv8a2bzng8nf4s5rf5phfang4jwy9rgf808q0nxf";
18− };
19− }
20− {
21− goPackagePath = "github.com/nwaples/rardecode";
22− fetch = {
23− type = "git";
24− url = "https://github.com/nwaples/rardecode";
25− rev = "197ef08ef68c4454ae5970a9c2692d6056ceb8d7";
26− sha256 = "0vvijw7va283dbdvnf4bgkn7bjngxqzk1rzdpy8sl343r62bmh4g";
27− };
28− }
29− {
30− goPackagePath = "github.com/pierrec/lz4";
31− fetch = {
32− type = "git";
33− url = "https://github.com/pierrec/lz4";
34− rev = "623b5a2f4d2a41e411730dcdfbfdaeb5c0c4564e";
35− sha256 = "1hhf7vyz5irrqs7ixdmvsvzmy9izv3ha8jbyy0cs486h61nzqkki";
36− };
37− }
38− {
39− goPackagePath = "github.com/ulikunitz/xz";
40− fetch = {
41− type = "git";
42− url = "https://github.com/ulikunitz/xz";
43− rev = "590df8077fbcb06ad62d7714da06c00e5dd2316d";
44− sha256 = "07mivr4aiw3b8qzwajsxyjlpbkf3my4xx23lv0yryc4pciam5lhy";
45− };
46− }
47− {
48− goPackagePath = "github.com/xi2/xz";
49− fetch = {
50− type = "git";
51− url = "https://github.com/xi2/xz";
52− rev = "48954b6210f8d154cb5f8484d3a3e1f83489309e";
53− sha256 = "178r0fa2dpzxf0sabs7dn0c8fa7vs87zlxk6spkn374ls9pir7nq";
54− };
55− }
56−]
pkgs/applications/misc/cdrtools/default.nix+3−3
@@ -1,4 +1,4 @@
1−{ stdenv, fetchurl, acl, libcap }:
1+{ stdenv, fetchurl, acl, libcap, Carbon, IOKit }:
22
33stdenv.mkDerivation rec {
44 name = "cdrtools-${version}";
@@ -11,7 +11,7 @@ stdenv.mkDerivation rec {
1111
1212 patches = [ ./fix-paths.patch ];
1313
14− buildInputs = [ acl libcap ];
14+ buildInputs = if stdenv.isDarwin then [ Carbon IOKit ] else [ acl libcap ];
1515
1616 postPatch = ''
1717 sed "/\.mk3/d" -i libschily/Targets.man
@@ -28,7 +28,7 @@ stdenv.mkDerivation rec {
2828 homepage = https://sourceforge.net/projects/cdrtools/;
2929 description = "Highly portable CD/DVD/BluRay command line recording software";
3030 license = with licenses; [ gpl2 lgpl2 cddl ];
31− platforms = platforms.linux;
31+ platforms = with platforms; linux ++ darwin;
3232 # Licensing issues: This package contains code licensed under CDDL, GPL2
3333 # and LGPL2. There is a debate regarding the legality of distributing this
3434 # package in binary form.
pkgs/applications/misc/electrum/default.nix+25−11
@@ -1,4 +1,5 @@
11{ stdenv, fetchurl, fetchFromGitHub, python3, python3Packages, zbar, secp256k1
2+, enableQt ? !stdenv.isDarwin
23
34
45# for updater.nix
@@ -14,14 +15,23 @@
1415}:
1516
1617let
17− version = "3.3.7";
18+ version = "3.3.8";
19+
20+ libsecp256k1_name =
21+ if stdenv.isLinux then "libsecp256k1.so.0"
22+ else if stdenv.isDarwin then "libsecp256k1.0.dylib"
23+ else "libsecp256k1${stdenv.hostPlatform.extensions.sharedLibrary}";
24+
25+ libzbar_name =
26+ if stdenv.isLinux then "libzbar.so.0"
27+ else "libzbar${stdenv.hostPlatform.extensions.sharedLibrary}";
1828
1929 # Not provided in official source releases, which are what upstream signs.
2030 tests = fetchFromGitHub {
2131 owner = "spesmilo";
2232 repo = "electrum";
2333 rev = version;
24− sha256 = "1g2kbbsi6k105q6s0la20h12gz8dzka5kdcjbdhs12jqsjfx3lr0";
34+ sha256 = "1di8ba77kgapcys0d7h5nx1qqakv3s60c6sp8skw8p69ramsl73c";
2535
2636 extraPostFetch = ''
2737 mv $out ./all
@@ -36,7 +46,7 @@ python3Packages.buildPythonApplication rec {
3646
3747 src = fetchurl {
3848 url = "https://download.electrum.org/${version}/Electrum-${version}.tar.gz";
39− sha256 = "13ahc4zqpgzmck2r663sqqgz86xsd83r5qqi26mh2vazy1i6pykz";
49+ sha256 = "1g00cj1pmckd4xis8r032wmraiv3vd3zc803hnyxa2bnhj8z3bg2";
4050 };
4151
4252 postUnpack = ''
@@ -56,9 +66,7 @@ python3Packages.buildPythonApplication rec {
5666 protobuf
5767 pyaes
5868 pycryptodomex
59− pyqt5
6069 pysocks
61− qdarkstyle
6270 qrcode
6371 requests
6472 tlslite-ng
@@ -70,15 +78,20 @@ python3Packages.buildPythonApplication rec {
7078
7179 # TODO plugins
7280 # amodem
73− ];
81+ ] ++ stdenv.lib.optionals enableQt [ pyqt5 qdarkstyle ];
7482
7583 preBuild = ''
7684 sed -i 's,usr_share = .*,usr_share = "'$out'/share",g' setup.py
77− sed -i "s|name = 'libzbar.*'|name='${zbar}/lib/libzbar.so'|" electrum/qrscanner.py
78− substituteInPlace ./electrum/ecc_fast.py --replace libsecp256k1.so.0 ${secp256k1}/lib/libsecp256k1.so.0
79− '';
80−
81− postInstall = ''
85+ substituteInPlace ./electrum/ecc_fast.py \
86+ --replace ${libsecp256k1_name} ${secp256k1}/lib/libsecp256k1${stdenv.hostPlatform.extensions.sharedLibrary}
87+ '' + (if enableQt then ''
88+ substituteInPlace ./electrum/qrscanner.py \
89+ --replace ${libzbar_name} ${zbar}/lib/libzbar${stdenv.hostPlatform.extensions.sharedLibrary}
90+ '' else ''
91+ sed -i '/qdarkstyle/d' contrib/requirements/requirements.txt
92+ '');
93+
94+ postInstall = stdenv.lib.optionalString stdenv.isLinux ''
8295 # Despite setting usr_share above, these files are installed under
8396 # $out/nix ...
8497 mv $out/${python3.sitePackages}/nix/store"/"*/share $out
@@ -123,6 +136,7 @@ python3Packages.buildPythonApplication rec {
123136 '';
124137 homepage = https://electrum.org/;
125138 license = licenses.mit;
139+ platforms = platforms.all;
126140 maintainers = with maintainers; [ ehmry joachifm np ];
127141 };
128142}
pkgs/applications/misc/mako/default.nix+10−1
@@ -1,6 +1,7 @@
11{ stdenv, fetchFromGitHub, meson, ninja, pkgconfig, scdoc
22, systemd, pango, cairo, gdk_pixbuf
3−, wayland, wayland-protocols }:
3+, wayland, wayland-protocols
4+, fetchpatch }:
45
56stdenv.mkDerivation rec {
67 pname = "mako";
@@ -13,6 +14,14 @@ stdenv.mkDerivation rec {
1314 sha256 = "17azdc37xsbmx13fkfp23vg9lznrv9fh6nhagn64wdq3nhsxm3b6";
1415 };
1516
17+ # to be removed with next release
18+ patches = [
19+ (fetchpatch {
20+ url = "https://github.com/emersion/mako/commit/ca8e763f06756136c534b1bbd2e5b536be6b1995.patch";
21+ sha256 = "09mi7nn2vwc69igxxc6y2m36n3snhsz0ady99yabhrzl17k4ryds";
22+ })
23+ ];
24+
1625 nativeBuildInputs = [ meson ninja pkgconfig scdoc wayland-protocols ];
1726 buildInputs = [ systemd pango cairo gdk_pixbuf wayland ];
1827
pkgs/applications/misc/overmind/default.nix+8−8
@@ -1,25 +1,25 @@
1−{ stdenv, buildGoPackage, fetchFromGitHub, tmux, which, makeWrapper }:
1+{ lib, buildGoPackage, fetchFromGitHub, tmux, which, makeWrapper }:
22
33buildGoPackage rec {
4− name = "overmind-${version}";
5− version = "2.0.1";
4+ pname = "overmind";
5+ version = "2.0.2";
66 goPackagePath = "github.com/DarthSim/overmind";
77
88 nativeBuildInputs = [ makeWrapper ];
99
1010 postInstall = ''
11− wrapProgram "$bin/bin/overmind" --prefix PATH : "${stdenv.lib.makeBinPath [ tmux which ]}"
11+ wrapProgram "$bin/bin/overmind" --prefix PATH : "${lib.makeBinPath [ tmux which ]}"
1212 '';
1313
1414 src = fetchFromGitHub {
1515 owner = "DarthSim";
16− repo = "overmind";
16+ repo = pname;
1717 rev = "v${version}";
18− sha256 = "1j3cpcfgacn5ic19sgrs1djn5jr4d7j7lxaz0vbaf414lrl76qz8";
18+ sha256 = "0cns19gqkfxsiiyfxhb05cjp1iv2fb40x47gp8djrwwzcd1r6zxh";
1919 };
2020
21− meta = with stdenv.lib; {
22− homepage = https://github.com/DarthSim/overmind;
21+ meta = with lib; {
22+ homepage = "https://github.com/DarthSim/overmind";
2323 description = "Process manager for Procfile-based applications and tmux";
2424 license = with licenses; [ mit ];
2525 maintainers = [ maintainers.adisbladis ];
pkgs/applications/misc/zathura/pdf-poppler/default.nix+2−2
@@ -5,8 +5,8 @@ stdenv.mkDerivation rec {
55 name = "zathura-pdf-poppler-${version}";
66
77 src = fetchurl {
8− url = "https://pwmt.org/projects/zathura/plugins/download/${name}.tar.xz";
9− sha256 = "1p4jcny0jniygns78mcf0nlm298dszh49qpmjmackrm6dq8hc25y";
8+ url = "https://git.pwmt.org/pwmt/zathura-pdf-poppler/-/archive/${version}/${name}.tar.gz";
9+ sha256 = "0c15rnwh42m3ybrhax01bl36w0iynaq8xg6l08riml3cyljypi9l";
1010 };
1111
1212 nativeBuildInputs = [ meson ninja pkgconfig zathura_core ];
pkgs/applications/networking/browsers/chromium/plugins.nix+2−2
@@ -100,11 +100,11 @@ let
100100
101101 flash = stdenv.mkDerivation rec {
102102 name = "flashplayer-ppapi-${version}";
103− version = "32.0.0.207";
103+ version = "32.0.0.223";
104104
105105 src = fetchzip {
106106 url = "https://fpdownload.adobe.com/pub/flashplayer/pdc/${version}/flash_player_ppapi_linux.x86_64.tar.gz";
107− sha256 = "09bbrlnw343ygcibyjfa27r8gjdg1dcxx85d3v4v93wfi29nl789";
107+ sha256 = "0xm6jcdip4gki267ldw106l5j43im0ji2zjsarvi7n2nvvnwwgnl";
108108 stripRoot = false;
109109 };
110110
pkgs/applications/networking/browsers/mozilla-plugins/flashplayer/default.nix+5−5
@@ -74,7 +74,7 @@ let
7474in
7575stdenv.mkDerivation rec {
7676 name = "flashplayer-${version}";
77− version = "32.0.0.207";
77+ version = "32.0.0.223";
7878
7979 src = fetchurl {
8080 url =
@@ -85,14 +85,14 @@ stdenv.mkDerivation rec {
8585 sha256 =
8686 if debug then
8787 if arch == "x86_64" then
88− "0v5dlqaapr29qyb2pm57yafnmxdxin7shn1xqsx2sc9xwmvmaw7v"
88+ "165zsh4dzzsy38kc8yxp0jdygk4qid5xd642gchlky7z6fwza223"
8989 else
90− "0ygxcvn6srjg9clayfri86c64inwidp9qk25hbsbyr8m8gghpwqb"
90+ "1by2zqw9xgvpf1jnbf5qjl3kcjn5wxznl44f47f8h2gkgcnrf749"
9191 else
9292 if arch == "x86_64" then
93− "1y1c65vfsvapqsl2q6vm75m5jyksjwnfs6f6ijcpg0dmf5f4fypy"
93+ "07hbg98pgpp81v2sr4vw8siava7wkg1r6hg8i6rg00w9mhvn9vcz"
9494 else
95− "1h9samf24l0ix6188p940h7l989nwkzlrvv7qdxczj3p62zzvqfy";
95+ "1z2nmznmwvg3crdj3gbz2bxvi8dq2jk5yiwk79y90h199nsan1n2";
9696 };
9797
9898 nativeBuildInputs = [ unzip ];
pkgs/applications/networking/browsers/mozilla-plugins/flashplayer/standalone.nix+3−3
@@ -50,7 +50,7 @@
5050
5151stdenv.mkDerivation rec {
5252 name = "flashplayer-standalone-${version}";
53− version = "32.0.0.207";
53+ version = "32.0.0.223";
5454
5555 src = fetchurl {
5656 url =
@@ -60,9 +60,9 @@ stdenv.mkDerivation rec {
6060 "https://fpdownload.macromedia.com/pub/flashplayer/updaters/32/flash_player_sa_linux.x86_64.tar.gz";
6161 sha256 =
6262 if debug then
63− "0z08da6xhjvsxn9xymcnpphap2h0ydj784ms1f950l84rdl4qrr4"
63+ "1f3098vfznnx8d7rimgbalr2728jhzwca9val7pdi9b8yf9labwk"
6464 else
65− "0d2pxggrzamrg143bvic0qa2v70jpplnahihfa4q2rbvy0l3i2pq";
65+ "005iyajgp55ww25rcyxg5g0kbzddp6izfly9p4agahmzlzv18y4h";
6666 };
6767
6868 nativeBuildInputs = [ unzip ];
pkgs/applications/networking/cluster/kube-router/default.nix+7−8
@@ -1,17 +1,16 @@
1−{ stdenv, buildGoPackage, fetchFromGitHub }:
1+{ lib, buildGoPackage, fetchFromGitHub }:
22
33buildGoPackage rec {
4− name = "kube-router-${version}";
5− version = "0.2.5";
6− rev = "v${version}";
4+ pname = "kube-router";
5+ version = "0.3.1";
76
87 goPackagePath = "github.com/cloudnativelabs/kube-router";
98
109 src = fetchFromGitHub {
11− inherit rev;
1210 owner = "cloudnativelabs";
13− repo = "kube-router";
14− sha256 = "1j6q6kg4qj75v2mdy9ivvwq8mx9fpdf0w08959l8imrp5byd56wv";
11+ repo = pname;
12+ rev = "v${version}";
13+ sha256 = "06azrghcxp6n4bvrqxpwhmg60qk4jqcrkl1lh1rardlzhl71lk1h";
1514 };
1615
1716 buildFlagsArray = ''
@@ -22,7 +21,7 @@ buildGoPackage rec {
2221 ${goPackagePath}/pkg/cmd.buildDate=Nix
2322 '';
2423
25− meta = with stdenv.lib; {
24+ meta = with lib; {
2625 homepage = "https://www.kube-router.io/";
2726 description = "All-in-one router, firewall and service proxy for Kubernetes";
2827 license = licenses.asl20;
pkgs/applications/networking/gns3/default.nix+3−3
@@ -2,7 +2,7 @@
22
33let
44 stableVersion = "2.1.21";
5− previewVersion = "2.2.0b3";
5+ previewVersion = "2.2.0b4";
66 addVersion = args:
77 let version = if args.stable then stableVersion else previewVersion;
88 branch = if args.stable then "stable" else "preview";
@@ -18,7 +18,7 @@ in {
1818 };
1919 guiPreview = mkGui {
2020 stable = false;
21− sha256Hash = "1bzy95zqinwrrga7qj6gvpzvz34w4ddhvgmpgq3p1lwzixpqg1w7";
21+ sha256Hash = "03jlg4ncs69gv1dn1zsdm0ipvlg6r0lwf8myxric6vv4ks7qqd3w";
2222 };
2323
2424 serverStable = mkServer {
@@ -27,6 +27,6 @@ in {
2727 };
2828 serverPreview = mkServer {
2929 stable = false;
30− sha256Hash = "1bq4ww6qhhl0qw6yj7cf7yg54yb4y8mxlnwss6hgbyfv5fz9rxjp";
30+ sha256Hash = "0mzn62649hmmqq8z2vphqvi0w38jwq8ps4zzbl1dqygbf4gadnqa";
3131 };
3232}
pkgs/applications/networking/instant-messengers/gajim/default.nix+4−4
@@ -7,7 +7,7 @@
77, xvfb_run, dbus
88
99# Optional dependencies
10−, enableJingle ? true, farstream, gstreamer, gst-plugins-base, gst-libav, gst-plugins-ugly
10+, enableJingle ? true, farstream, gstreamer, gst-plugins-base, gst-libav, gst-plugins-ugly, libnice
1111, enableE2E ? true
1212, enableSecrets ? true, libsecret
1313, enableRST ? true, docutils
@@ -33,14 +33,14 @@ python3.pkgs.buildPythonApplication rec {
3333 '';
3434
3535 buildInputs = [
36− gobject-introspection gtk3 gnome3.adwaita-icon-theme
37− ] ++ lib.optionals enableJingle [ farstream gstreamer gst-plugins-base gst-libav gst-plugins-ugly ]
36+ gobject-introspection gtk3 gnome3.adwaita-icon-theme wrapGAppsHook
37+ ] ++ lib.optionals enableJingle [ farstream gstreamer gst-plugins-base gst-libav gst-plugins-ugly libnice ]
3838 ++ lib.optional enableSecrets libsecret
3939 ++ lib.optional enableSpelling gspell
4040 ++ lib.optional enableUPnP gupnp-igd;
4141
4242 nativeBuildInputs = [
43− gettext wrapGAppsHook
43+ gettext
4444 ];
4545
4646 propagatedBuildInputs = with python3.pkgs; [
pkgs/applications/networking/mumble/default.nix+3−3
@@ -139,15 +139,15 @@ let
139139 };
140140
141141 gitSource = rec {
142− version = "2018-07-01";
142+ version = "2019-07-10";
143143 qtVersion = 5;
144144
145145 # Needs submodules
146146 src = fetchFromGitHub {
147147 owner = "mumble-voip";
148148 repo = "mumble";
149− rev = "c19ac8c0b0f934d2ff206858d7cb66352d6eb418";
150− sha256 = "1mzp1bgn49ycs16d6r8icqq35wq25198fs084vyq6j5f78ni7pvz";
149+ rev = "41b265584654c7ac216fd3ccb9c141734d3f839b";
150+ sha256 = "00irlzz5q4drmsfbwrkyy7p7w8a5fc1ip5vyicq3g3cy58dprpqr";
151151 fetchSubmodules = true;
152152 };
153153 };
pkgs/applications/science/machine-learning/fasttext/default.nix+3−3
@@ -2,13 +2,13 @@
22
33stdenv.mkDerivation rec {
44 pname = "fasttext";
5− version = "0.2.0";
5+ version = "0.9.1";
66
77 src = fetchFromGitHub {
88 owner = "facebookresearch";
99 repo = "fastText";
10− rev = version;
11− sha256 = "1fcrz648r2s80bf7vc0l371xillz5jk3ldaiv9jb7wnsyri831b4";
10+ rev = "v${version}";
11+ sha256 = "1cbzz98qn8aypp4r5kwwwc9wiq5bwzv51kcsb15xjfs9lz8h3rii";
1212 };
1313
1414 nativeBuildInputs = [ cmake ];
pkgs/applications/version-management/git-and-tools/hub/default.nix+2−2
@@ -2,7 +2,7 @@
22
33buildGoPackage rec {
44 pname = "hub";
5− version = "2.12.1";
5+ version = "2.12.2";
66
77 goPackagePath = "github.com/github/hub";
88
@@ -13,7 +13,7 @@ buildGoPackage rec {
1313 owner = "github";
1414 repo = pname;
1515 rev = "v${version}";
16− sha256 = "0i9bqcgdidl5zawkpq2fjrimzbb37i1m2fisvj32d27fsp1824bk";
16+ sha256 = "0sxfmjg26s86m5xa9nbj8287kg12kygxw6gggahal6v7zjhwcvaz";
1717 };
1818
1919 nativeBuildInputs = [ groff utillinux ];
pkgs/applications/virtualization/dynamips/default.nix+2−2
@@ -3,13 +3,13 @@
33stdenv.mkDerivation rec {
44 name = "${pname}-${version}";
55 pname = "dynamips";
6− version = "0.2.20";
6+ version = "0.2.21";
77
88 src = fetchFromGitHub {
99 owner = "GNS3";
1010 repo = pname;
1111 rev = "v${version}";
12− sha256 = "1841h0m0k0p3c3ify4imafjk7jigcj2zlr8rn3iyp7jnafkxqik7";
12+ sha256 = "0pvdqs6kjz0x0wqb5f1k3r25dg82wssm7wz4psm0m6bxsvf5l0i5";
1313 };
1414
1515 nativeBuildInputs = [ cmake ];
pkgs/applications/virtualization/virt-manager/default.nix+15−5
@@ -1,13 +1,18 @@
11{ stdenv, fetchurl, python3Packages, intltool, file
22, wrapGAppsHook, gtk-vnc, vte, avahi, dconf
33, gobject-introspection, libvirt-glib, system-libvirt
4−, gsettings-desktop-schemas, glib, libosinfo, gnome3, gtk3
4+, gsettings-desktop-schemas, glib, libosinfo, gnome3
5+, gtksourceview4
56, spiceSupport ? true, spice-gtk ? null
67, cpio, e2fsprogs, findutils, gzip
78}:
89
910with stdenv.lib;
1011
12+# TODO: remove after there's support for setupPyDistFlags
13+let
14+ setuppy = ../../../development/interpreters/python/run_setup.py;
15+in
1116python3Packages.buildPythonApplication rec {
1217 name = "virt-manager-${version}";
1318 version = "2.2.0";
@@ -19,13 +24,14 @@ python3Packages.buildPythonApplication rec {
1924 };
2025
2126 nativeBuildInputs = [
22− wrapGAppsHook intltool file
27+ intltool file
2328 gobject-introspection # for setup hook populating GI_TYPELIB_PATH
2429 ];
2530
2631 buildInputs = [
32+ wrapGAppsHook
2733 libvirt-glib vte dconf gtk-vnc gnome3.adwaita-icon-theme avahi
28− gsettings-desktop-schemas libosinfo gtk3
34+ gsettings-desktop-schemas libosinfo gtksourceview4
2935 gobject-introspection # Temporary fix, see https://github.com/NixOS/nixpkgs/issues/56943
3036 ] ++ optional spiceSupport spice-gtk;
3137
@@ -43,8 +49,12 @@ python3Packages.buildPythonApplication rec {
4349 ${python3Packages.python.interpreter} setup.py configure --prefix=$out
4450 '';
4551
46− postInstall = ''
47− ${glib.dev}/bin/glib-compile-schemas "$out"/share/glib-2.0/schemas
52+ # TODO: remove after there's support for setupPyDistFlags
53+ buildPhase = ''
54+ runHook preBuild
55+ cp ${setuppy} nix_run_setup
56+ ${python3Packages.python.pythonForBuild.interpreter} nix_run_setup --no-update-icon-cache build_ext bdist_wheel
57+ runHook postBuild
4858 '';
4959
5060 preFixup = ''
pkgs/applications/virtualization/virt-viewer/default.nix−1
@@ -30,7 +30,6 @@ stdenv.mkDerivation rec {
3030 xen
3131 ] ++ optionals spiceSupport [
3232 spice-gtk spice-protocol libcap gdbm
33− gst_all_1.gst-plugins-base gst_all_1.gst-plugins-good
3433 ];
3534
3635 # Required for USB redirection PolicyKit rules file
pkgs/applications/window-managers/sway/idle.nix+2−6
@@ -5,19 +5,15 @@
55
66stdenv.mkDerivation rec {
77 name = "swayidle-${version}";
8− version = "1.4";
8+ version = "1.5";
99
1010 src = fetchFromGitHub {
1111 owner = "swaywm";
1212 repo = "swayidle";
1313 rev = version;
14− sha256 = "1fpacy9jwfi3vd94sgsy8qgx5092rm3vsplj2zjbmxkak1gjn56n";
14+ sha256 = "05qi96j58xqxjiighay1d39rfanxcpn6vlynj23mb5dymxvlaq9n";
1515 };
1616
17− postPatch = ''
18− sed -iE "s/version: '1\.3',/version: '${version}',/" meson.build
19− '';
20−
2117 nativeBuildInputs = [ meson ninja pkgconfig scdoc ];
2218 buildInputs = [ wayland wayland-protocols systemd ];
2319
pkgs/build-support/fetchurl/default.nix+7−3
@@ -49,8 +49,11 @@ in
4949 # first element of `urls').
5050 name ? ""
5151
52− # Different ways of specifying the hash.
53−, outputHash ? ""
52+, # SRI hash.
53+ hash ? ""
54+
55+, # Legacy ways of specifying the hash.
56+ outputHash ? ""
5457, outputHashAlgo ? ""
5558, md5 ? ""
5659, sha1 ? ""
@@ -103,7 +106,8 @@ let
103106 else throw "fetchurl requires either `url` or `urls` to be set";
104107
105108 hash_ =
106− if md5 != "" then throw "fetchurl does not support md5 anymore, please use sha256 or sha512"
109+ if hash != "" then { outputHashAlgo = null; outputHash = hash; }
110+ else if md5 != "" then throw "fetchurl does not support md5 anymore, please use sha256 or sha512"
107111 else if (outputHash != "" && outputHashAlgo != "") then { inherit outputHashAlgo outputHash; }
108112 else if sha512 != "" then { outputHashAlgo = "sha512"; outputHash = sha512; }
109113 else if sha256 != "" then { outputHashAlgo = "sha256"; outputHash = sha256; }
pkgs/build-support/fetchurl/mirrors.nix+5−4
@@ -409,9 +409,10 @@ rec {
409409
410410 # Alsa Project
411411 alsa = [
412− ftp://ftp.alsa-project.org/pub/
413− http://alsa.cybermirror.org/
414− http://www.mirrorservice.org/sites/ftp.alsa-project.org/pub/
415− http://alsa.mirror.fr/
412+ https://www.alsa-project.org/files/pub/
413+ ftp://ftp.alsa-project.org/pub/
414+ http://alsa.cybermirror.org/
415+ http://www.mirrorservice.org/sites/ftp.alsa-project.org/pub/
416+ http://alsa.mirror.fr/
416417 ];
417418}
pkgs/development/go-packages/generic/default.nix+7−2
@@ -72,14 +72,19 @@ let
7272
7373 goPath = if goDeps != null then importGodeps { depsFile = goDeps; } ++ extraSrcs
7474 else extraSrcs;
75− package = go.stdenv.mkDerivation (
75+ package = stdenv.mkDerivation (
7676 (builtins.removeAttrs args [ "goPackageAliases" "disabled" "extraSrcs"]) // {
7777
7878 nativeBuildInputs = [ removeReferencesTo go ]
7979 ++ (lib.optional (!dontRenameImports) govers) ++ nativeBuildInputs;
8080 buildInputs = buildInputs;
8181
82− inherit (go) GOOS GOARCH;
82+ inherit (go) GOOS GOARCH GO386 CGO_ENABLED;
83+
84+ GOHOSTARCH = go.GOHOSTARCH or null;
85+ GOHOSTOS = go.GOHOSTOS or null;
86+
87+ GOARM = toString (stdenv.lib.intersectLists [(stdenv.hostPlatform.parsed.cpu.version or "")] ["5" "6" "7"]);
8388
8489 configurePhase = args.configurePhase or ''
8590 runHook preConfigure
pkgs/development/interpreters/python/build-python-package-wheel.nix+1−1
@@ -8,7 +8,7 @@
88attrs // {
99 unpackPhase = ''
1010 mkdir dist
11− cp $src dist/"''${src#*-}"
11+ cp "$src" "dist/$(stripHash "$src")"
1212 '';
1313
1414 # Wheels are pre-compiled
pkgs/development/interpreters/python/fetchpypi.nixnew file+28
@@ -0,0 +1,28 @@
1+# `fetchPypi` function for fetching artifacts from PyPI.
2+{ fetchurl
3+, makeOverridable
4+}:
5+
6+let
7+ computeUrl = {format ? "setuptools", ... } @attrs: let
8+ computeWheelUrl = {pname, version, python ? "py2.py3", abi ? "none", platform ? "any"}:
9+ # Fetch a wheel. By default we fetch an universal wheel.
10+ # See https://www.python.org/dev/peps/pep-0427/#file-name-convention for details regarding the optional arguments.
11+ "https://files.pythonhosted.org/packages/${python}/${builtins.substring 0 1 pname}/${pname}/${pname}-${version}-${python}-${abi}-${platform}.whl";
12+
13+ computeSourceUrl = {pname, version, extension ? "tar.gz"}:
14+ # Fetch a source tarball.
15+ "mirror://pypi/${builtins.substring 0 1 pname}/${pname}/${pname}-${version}.${extension}";
16+
17+ compute = (if format == "wheel" then computeWheelUrl
18+ else if format == "setuptools" then computeSourceUrl
19+ else throw "Unsupported format ${format}");
20+
21+ in compute (builtins.removeAttrs attrs ["format"]);
22+
23+in makeOverridable( {format ? "setuptools", sha256 ? "", hash ? "", ... } @attrs:
24+ let
25+ url = computeUrl (builtins.removeAttrs attrs ["sha256" "hash"]) ;
26+ in fetchurl {
27+ inherit url sha256 hash;
28+ })
pkgs/development/libraries/SDL_gpu/default.nixnew file+36
@@ -0,0 +1,36 @@
1+{ stdenv, fetchFromGitHub, cmake, SDL2, libGLU }:
2+
3+stdenv.mkDerivation rec {
4+ pname = "SDL_gpu-unstable";
5+ version = "2019-01-24";
6+
7+ src = fetchFromGitHub {
8+ owner = "grimfang4";
9+ repo = "sdl-gpu";
10+ rev = "e3d350b325a0e0d0b3007f69ede62313df46c6ef";
11+ sha256 = "0kibcaim01inb6xxn4mr6affn4hm50vz9kahb5k9iz8dmdsrhxy1";
12+ };
13+
14+ nativeBuildInputs = [ cmake ];
15+ buildInputs = [ SDL2 libGLU ];
16+
17+ cmakeFlags = [
18+ "-DSDL_gpu_BUILD_DEMOS=OFF"
19+ "-DSDL_gpu_BUILD_TOOLS=OFF"
20+ "-DSDL_gpu_BUILD_VIDEO_TEST=OFF"
21+ "-DSDL_gpu_BUILD_TESTS=OFF"
22+ ];
23+
24+ patchPhase = ''
25+ sed -ie '210s#''${OUTPUT_DIR}/lib#''${CMAKE_INSTALL_LIBDIR}#' src/CMakeLists.txt
26+ sed -ie '213s#''${OUTPUT_DIR}/lib#''${CMAKE_INSTALL_LIBDIR}#' src/CMakeLists.txt
27+ '';
28+
29+ meta = with stdenv.lib; {
30+ description = "A library for high-performance, modern 2D graphics with SDL written in C";
31+ homepage = "https://github.com/grimfang4/sdl-gpu";
32+ license = licenses.mit;
33+ maintainers = with maintainers; [ pmiddend ];
34+ platforms = platforms.linux;
35+ };
36+}
pkgs/development/libraries/discord-rpc/default.nixnew file+40
@@ -0,0 +1,40 @@
1+{ stdenv
2+, fetchFromGitHub
3+, cmake
4+, rapidjson
5+, AppKit
6+, buildExamples ? false
7+}:
8+
9+stdenv.mkDerivation rec {
10+ pname = "discord-rpc";
11+ version = "3.4.0";
12+
13+ src = fetchFromGitHub {
14+ owner = "discordapp";
15+ repo = pname;
16+ rev = "v${version}";
17+ sha256 = "04cxhqdv5r92lrpnhxf8702a8iackdf3sfk1050z7pijbijiql2a";
18+ };
19+
20+ nativeBuildInputs = [
21+ cmake
22+ ];
23+
24+ buildInputs = [
25+ rapidjson
26+ ] ++ stdenv.lib.optional stdenv.isDarwin AppKit;
27+
28+ cmakeFlags = [
29+ "-DBUILD_SHARED_LIBS=true"
30+ "-DBUILD_EXAMPLES=${stdenv.lib.boolToString buildExamples}"
31+ ];
32+
33+ meta = with stdenv.lib; {
34+ description = "Official library to interface with the Discord client";
35+ homepage = "https://github.com/discordapp/discord-rpc";
36+ license = licenses.mit;
37+ maintainers = with maintainers; [ tadeokondrak ];
38+ platforms = platforms.all;
39+ };
40+}
pkgs/development/libraries/qt-5/5.12/qtwebengine-darwin-no-platform-check.patch+12
@@ -19,3 +19,15 @@ diff --git a/mkspecs/features/platform.prf b/mkspecs/features/platform.prf
1919 }
2020 } else {
2121 skipBuild("Unknown platform. Qt WebEngine only supports Linux, Windows, and macOS.")
22+diff --git a/src/core/config/mac_osx.pri b/src/core/config/mac_osx.pri
23+--- a/src/core/config/mac_osx.pri
24++++ b/src/core/config/mac_osx.pri
25+@@ -5,8 +5,6 @@ load(functions)
26+ # otherwise query for it.
27+ QMAKE_MAC_SDK_VERSION = $$eval(QMAKE_MAC_SDK.$${QMAKE_MAC_SDK}.SDKVersion)
28+ isEmpty(QMAKE_MAC_SDK_VERSION) {
29+- QMAKE_MAC_SDK_VERSION = $$system("/usr/bin/xcodebuild -sdk $${QMAKE_MAC_SDK} -version SDKVersion 2>/dev/null")
30+- isEmpty(QMAKE_MAC_SDK_VERSION): error("Could not resolve SDK version for \'$${QMAKE_MAC_SDK}\'")
31+ }
32+
33+ QMAKE_CLANG_DIR = "/usr"
pkgs/development/libraries/qtpbfimageplugin/default.nixnew file+39
@@ -0,0 +1,39 @@
1+{ stdenv, fetchFromGitHub, qmake, qtbase, protobuf }:
2+
3+stdenv.mkDerivation rec {
4+ pname = "qtpbfimageplugin";
5+ version = "1.4";
6+
7+ src = fetchFromGitHub {
8+ owner = "tumic0";
9+ repo = "QtPBFImagePlugin";
10+ rev = version;
11+ sha256 = "0d39i7rmhrmm2df49gd47zm37gnz3fmyr6hfc6hhzvk08jb6956r";
12+ };
13+
14+ nativeBuildInputs = [ qmake ];
15+ buildInputs = [ qtbase protobuf ];
16+
17+ postPatch = ''
18+ # Fix plugin dir
19+ substituteInPlace pbfplugin.pro \
20+ --replace "\$\$[QT_INSTALL_PLUGINS]" "$out/$qtPluginPrefix"
21+
22+ # Fix darwin build
23+ substituteInPlace pbfplugin.pro \
24+ --replace '$$PROTOBUF/lib/libprotobuf-lite.a' '${protobuf}/lib/libprotobuf-lite.dylib'
25+ '';
26+
27+ meta = with stdenv.lib; {
28+ description = "Qt image plugin for displaying Mapbox vector tiles";
29+ longDescription = ''
30+ QtPBFImagePlugin is a Qt image plugin that enables applications capable of
31+ displaying raster MBTiles maps or raster XYZ online maps to also display PBF
32+ vector tiles without (almost) any application modifications.
33+ '';
34+ homepage = https://github.com/tumic0/QtPBFImagePlugin;
35+ license = licenses.lgpl3;
36+ maintainers = [ maintainers.sikmir ];
37+ platforms = platforms.unix;
38+ };
39+}
pkgs/development/libraries/soundtouch/default.nix+15−13
@@ -1,22 +1,24 @@
1−{stdenv, fetchurl, autoconf, automake, libtool}:
1+{stdenv, lib, fetchFromGitLab, autoconf, automake, libtool}:
22
33stdenv.mkDerivation rec {
4− pName = "soundtouch";
5− name = "${pName}-2.0.0";
6− src = fetchurl {
7− url = "https://www.surina.net/soundtouch/${name}.tar.gz";
8− sha256 = "09cxr02mfyj2bg731bj0i9hh565x8l9p91aclxs8wpqv8b8zf96j";
4+ pname = "soundtouch";
5+ version = "2.1.2";
6+
7+ src = fetchFromGitLab {
8+ owner = pname;
9+ repo = pname;
10+ rev = version;
11+ sha256 = "174wgm3s0inmbnkrlnspxjwm2014qhjhkbdqa5r8rbfi0nzqxzsz";
912 };
1013
11− buildInputs = [ autoconf automake libtool ];
14+ nativeBuildInputs = [ autoconf automake libtool ];
1215
1316 preConfigure = "./bootstrap";
1417
15− meta = {
16− description = "A program and library for changing the tempo, pitch and playback rate of audio";
17− homepage = http://www.surina.net/soundtouch/;
18− downloadPage = http://www.surina.net/soundtouch/sourcecode.html;
19− license = stdenv.lib.licenses.lgpl21;
20− platforms = stdenv.lib.platforms.all;
18+ meta = with lib; {
19+ description = "A program and library for changing the tempo, pitch and playback rate of audio";
20+ homepage = "http://www.surina.net/soundtouch/";
21+ license = licenses.lgpl21;
22+ platforms = platforms.all;
2123 };
2224}
pkgs/development/libraries/spice-gtk/default.nix+4−1
@@ -87,10 +87,13 @@ stdenv.mkDerivation rec {
8787 vala
8888 ];
8989
90+ propagatedBuildInputs = [
91+ gst_all_1.gst-plugins-base gst_all_1.gst-plugins-good
92+ ];
93+
9094 buildInputs = [
9195 cyrus_sasl
9296 epoxy
93− gst_all_1.gst-plugins-base
9497 gtk3
9598 json-glib
9699 libcacard
pkgs/development/python-modules/aiorpcx/default.nix+2−2
@@ -2,12 +2,12 @@
22
33buildPythonPackage rec {
44 pname = "aiorpcx";
5− version = "0.17.0";
5+ version = "0.18.3";
66
77 src = fetchPypi {
88 inherit version;
99 pname = "aiorpcX";
10− sha256 = "14np5r75rs0v45vsv20vbzmnv3qisvm9mdllj1j9s1633cvcik0k";
10+ sha256 = "0k545hc7wl6sh1svydzbv6x7sx5pig2pqkl3yxs9riwmvzawx9xp";
1111 };
1212
1313 propagatedBuildInputs = [ attrs ];
pkgs/development/python-modules/anonip/default.nixnew file+24
@@ -0,0 +1,24 @@
1+{ stdenv, lib, buildPythonPackage, fetchFromGitHub, ipaddress, isPy27 }:
2+
3+buildPythonPackage rec {
4+ pname = "anonip";
5+ version = "1.0.0";
6+
7+ src = fetchFromGitHub {
8+ owner = "DigitaleGesellschaft";
9+ repo = "Anonip";
10+ rev = "v${version}";
11+ sha256 = "0y5xqivcinp6pwx4whc8ca1n2wxrvff7a2lpbz2dhivilfanmljs";
12+ };
13+
14+ propagatedBuildInputs = lib.optionals isPy27 [ ipaddress ];
15+
16+ checkPhase = "python tests.py";
17+
18+ meta = with stdenv.lib; {
19+ homepage = "https://github.com/DigitaleGesellschaft/Anonip";
20+ description = "A tool to anonymize IP-addresses in log-files";
21+ license = licenses.bsd3;
22+ maintainers = [ maintainers.mmahut ];
23+ };
24+}
pkgs/development/python-modules/deap/default.nix+3−3
@@ -2,11 +2,11 @@
22
33buildPythonPackage rec {
44 pname = "deap";
5− version = "1.2.2";
5+ version = "1.3.0";
66
77 src = fetchPypi {
88 inherit pname version;
9− sha256 = "95c63e66d755ec206c80fdb2908851c0bef420ee8651ad7be4f0578e9e909bcf";
9+ sha256 = "102r11pxb36xkq5bjv1lpkss77v278f5xdv6lvkbjdvqryydf3yd";
1010 };
1111
1212 propagatedBuildInputs = [ numpy matplotlib ];
@@ -17,7 +17,7 @@ buildPythonPackage rec {
1717
1818 meta = with stdenv.lib; {
1919 description = "DEAP is a novel evolutionary computation framework for rapid prototyping and testing of ideas.";
20− homepage = https://github.com/DEAP/deap;
20+ homepage = "https://github.com/DEAP/deap";
2121 license = licenses.lgpl3;
2222 maintainers = with maintainers; [ psyanticy ];
2323 };
pkgs/development/python-modules/fasttext/default.nix+3−3
@@ -2,13 +2,13 @@
22
33buildPythonPackage rec {
44 pname = "fasttext";
5− version = "0.2.0";
5+ version = "0.9.1";
66
77 src = fetchFromGitHub {
88 owner = "facebookresearch";
99 repo = "fastText";
10− rev = version;
11− sha256 = "1fcrz648r2s80bf7vc0l371xillz5jk3ldaiv9jb7wnsyri831b4";
10+ rev = "v${version}";
11+ sha256 = "1cbzz98qn8aypp4r5kwwwc9wiq5bwzv51kcsb15xjfs9lz8h3rii";
1212 };
1313
1414 buildInputs = [ pybind11 ];
pkgs/development/python-modules/flask-caching/default.nix+7−9
@@ -1,28 +1,26 @@
1−{ lib, buildPythonPackage, fetchPypi, flask, pytest, pytestcov }:
1+{ lib, buildPythonPackage, fetchPypi, flask, pytest, pytestcov, pytest-xprocess }:
22
33buildPythonPackage rec {
44 pname = "Flask-Caching";
5− version = "1.4.0";
5+ version = "1.7.2";
66
77 src = fetchPypi {
88 inherit pname version;
9− sha256 = "e34f24631ba240e09fe6241e1bf652863e0cff06a1a94598e23be526bc2e4985";
9+ sha256 = "17jnnmnpdflv120yhsfbnpick06iias6f2hcxmf1mi1nr35kdqjj";
1010 };
1111
1212 propagatedBuildInputs = [ flask ];
1313
14− checkInputs = [ pytest pytestcov ];
14+ checkInputs = [ pytest pytestcov pytest-xprocess ];
1515
16+ # backend_cache relies on pytest-cache, which is a stale package from 2013
1617 checkPhase = ''
17− py.test
18+ pytest -k 'not backend_cache'
1819 '';
1920
20− # https://github.com/sh4nks/flask-caching/pull/74
21− doCheck = false;
22−
2321 meta = with lib; {
2422 description = "Adds caching support to your Flask application";
25− homepage = https://github.com/sh4nks/flask-caching;
23+ homepage = "https://github.com/sh4nks/flask-caching";
2624 license = licenses.bsd3;
2725 };
2826}
pkgs/development/python-modules/m2crypto/default.nix+2−2
@@ -9,12 +9,12 @@
99
1010
1111buildPythonPackage rec {
12− version = "0.32.0";
12+ version = "0.35.2";
1313 pname = "M2Crypto";
1414
1515 src = fetchPypi {
1616 inherit pname version;
17− sha256 = "09d3zs2ivyxbi0fa42mnan0fcplc08q2qd70p1b43sxxdbxcdj99";
17+ sha256 = "09yirf3w77w6f49q6nxhrjm9c3a4y9s30s1k09chqrw8zdgx8sjc";
1818 };
1919
2020 patches = [
pkgs/development/python-modules/msrest/default.nix+2−2
@@ -18,12 +18,12 @@
1818}:
1919
2020buildPythonPackage rec {
21− version = "0.6.7";
21+ version = "0.6.8";
2222 pname = "msrest";
2323
2424 src = fetchPypi {
2525 inherit pname version;
26− sha256 = "07136g3j7zgcvkxki4v6q1p2dm1nzzc28181s8dwic0y4ml8qlq5";
26+ sha256 = "0yd43fnmfxkvk3idkyn67ziwjgkwkn261kicr3szjibpqjqcpsf9";
2727 };
2828
2929 propagatedBuildInputs = [
pkgs/development/python-modules/pytest-flask/default.nixnew file+31
@@ -0,0 +1,31 @@
1+{ stdenv, buildPythonPackage, fetchPypi, pytest, flask, werkzeug, setuptools_scm }:
2+
3+buildPythonPackage rec {
4+ pname = "pytest-flask";
5+ version = "0.15.0";
6+
7+ src = fetchPypi {
8+ inherit pname version;
9+ sha256 = "0jdzrib94vwfpl8524h34aqzqndh3h4xn706v32xh412c8dphx6q";
10+ };
11+
12+ doCheck = false;
13+
14+ buildInputs = [
15+ pytest
16+ ];
17+
18+ propagatedBuildInputs = [
19+ flask
20+ werkzeug
21+ ];
22+
23+ nativeBuildInputs = [ setuptools_scm ];
24+
25+ meta = with stdenv.lib; {
26+ homepage = "https://github.com/pytest-dev/pytest-flask/";
27+ license = licenses.mit;
28+ description = "A set of py.test fixtures to test Flask applications";
29+ maintainers = with maintainers; [ vanschelven ];
30+ };
31+}
pkgs/development/python-modules/pytest-xprocess/default.nixnew file+32
@@ -0,0 +1,32 @@
1+{ lib, buildPythonPackage, fetchPypi
2+, psutil
3+, pytest
4+}:
5+
6+buildPythonPackage rec {
7+ pname = "pytest-xprocess";
8+ version = "0.12.1";
9+
10+ src = fetchPypi {
11+ inherit pname version;
12+ sha256 = "06w2acg0shy0vxrmnxpqclimhgfjys5ql5kmmzr7r1lai46x1q2h";
13+ };
14+
15+ propagatedBuildInputs = [ psutil pytest ];
16+
17+ # Remove test QoL package from install_requires
18+ postPatch = ''
19+ substituteInPlace setup.py \
20+ --replace "'pytest-cache', " ""
21+ '';
22+
23+ # There's no tests in repo
24+ doCheck = false;
25+
26+ meta = with lib; {
27+ description = "Pytest external process plugin";
28+ homepage = "https://github.com/pytest-dev";
29+ license = licenses.mit;
30+ maintainers = with maintainers; [ jonringer ];
31+ };
32+}
pkgs/development/python-modules/sklearn-deap/default.nix+2−1
@@ -1,4 +1,4 @@
1−{ stdenv, buildPythonPackage, fetchFromGitHub, numpy, scipy, deap, scikitlearn, python }:
1+{ stdenv, buildPythonPackage, fetchFromGitHub, numpy, scipy, deap, scikitlearn, python, isPy3k }:
22
33buildPythonPackage rec {
44 pname = "sklearn-deap";
@@ -23,6 +23,7 @@ buildPythonPackage rec {
2323 homepage = https://github.com/rsteca/sklearn-deap;
2424 license = licenses.lgpl3;
2525 maintainers = with maintainers; [ psyanticy ];
26+ broken = isPy3k; # https://github.com/rsteca/sklearn-deap/issues/65
2627 };
2728}
2829
pkgs/development/python-modules/spacy/default.nix+3−1
@@ -34,7 +34,9 @@ buildPythonPackage rec {
3434
3535 prePatch = ''
3636 substituteInPlace setup.py \
37− --replace "plac<1.0.0,>=0.9.6" "plac>=0.9.6"
37+ --replace "plac<1.0.0,>=0.9.6" "plac>=0.9.6" \
38+ --replace "regex==" "regex>=" \
39+ --replace "wheel>=0.32.0,<0.33.0" "wheel>=0.32.0"
3840 '';
3941
4042 propagatedBuildInputs = [
pkgs/development/python-modules/suds-jurko/default.nix+1−2
@@ -1,7 +1,6 @@
11{ stdenv
22, buildPythonPackage
33, fetchPypi
4−, pytest_3
54, isPyPy
65}:
76
@@ -16,7 +15,7 @@ buildPythonPackage rec {
1615 sha256 = "1s4radwf38kdh3jrn5acbidqlr66sx786fkwi0rgq61hn4n2bdqw";
1716 };
1817
19− checkInputs = [ pytest_3 ];
18+ doCheck = false;
2019
2120 postPatch = ''
2221 # fails
pkgs/development/python-modules/swagger-spec-validator/default.nixnew file+37
@@ -0,0 +1,37 @@
1+{ lib, buildPythonPackage, fetchFromGitHub, pyyaml, jsonschema, six, pytest, mock }:
2+
3+buildPythonPackage rec {
4+ pname = "swagger-spec-validator";
5+ version = "2.4.3";
6+
7+ src = fetchFromGitHub {
8+ owner = "Yelp";
9+ repo = "swagger_spec_validator";
10+ rev = "v" + version;
11+ sha256 = "02f8amc6iq2clxxmrz8hirbb57sizaxijp0higqy16shk63ibalw";
12+ };
13+
14+ checkInputs = [
15+ pytest
16+ mock
17+ ];
18+
19+ checkPhase = ''
20+ pytest tests
21+ '';
22+
23+ propagatedBuildInputs = [
24+ pyyaml
25+ jsonschema
26+ six
27+ ];
28+
29+ meta = with lib; {
30+ homepage = "https://github.com/Yelp/swagger_spec_validator";
31+ license = licenses.asl20;
32+ description = "Validation of Swagger specifications";
33+ maintainers = with maintainers; [ vanschelven ];
34+ };
35+}
36+
37+
pkgs/development/python-modules/thinc/default.nix+3−3
@@ -28,11 +28,11 @@
2828
2929buildPythonPackage rec {
3030 pname = "thinc";
31− version = "7.0.4";
31+ version = "7.0.6";
3232
3333 src = fetchPypi {
3434 inherit pname version;
35− sha256 = "14v8ygjrkj63dwd4pi490ld6i2d8n8wzcf15hnacjjfwij93pa1q";
35+ sha256 = "12d0766z7ksqpqrvldi46mx0z4zsbgncda4fpvxra1d6vbchf8ba";
3636 };
3737
3838 buildInputs = lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [
@@ -81,6 +81,6 @@ buildPythonPackage rec {
8181 description = "Practical Machine Learning for NLP in Python";
8282 homepage = https://github.com/explosion/thinc;
8383 license = licenses.mit;
84− maintainers = with maintainers; [ aborsu sdll ];
84+ maintainers = with maintainers; [ aborsu danieldk sdll ];
8585 };
8686}
pkgs/development/tools/build-managers/mage/default.nix+13−15
@@ -1,32 +1,30 @@
1−{ buildGoPackage, fetchFromGitHub, lib }:
1+{ buildGoModule, fetchFromGitHub, lib }:
22
3−with lib;
4−
5−buildGoPackage rec {
6− name = "mage-${version}";
7− version = "1.7.1";
8−
9− goPackagePath = "github.com/magefile/mage";
10− subPackages = [ "." ];
3+buildGoModule rec {
4+ pname = "mage";
5+ version = "1.8.0";
116
127 src = fetchFromGitHub {
138 owner = "magefile";
14− repo = "mage";
9+ repo = pname;
1510 rev = "v${version}";
16− sha256 = "0n4k5dy338rxwzj654smxzlanmd0zws6mdzv0wc4byqjhr7mqhg2";
11+ sha256 = "0vkzm2k2v3np30kdgz9kpwkhnshbjcn8j1y321djz2h3w23k5h7r";
1712 };
1813
19− buildFlagsArray = [
14+ modSha256 = "0sjjj9z1dhilhpc8pq4154czrb79z9cm044jvn75kxcjv6v5l2m5";
15+
16+ buildFlagsArray = [
2017 "-ldflags="
2118 "-X github.com/magefile/mage/mage.commitHash=v${version}"
2219 "-X github.com/magefile/mage/mage.gitTag=v${version}"
20+ "-X github.com/magefile/mage/mage.timestamp=1970-01-01T00:00:00Z"
2321 ];
2422
25− meta = {
23+ meta = with lib; {
2624 description = "A Make/Rake-like Build Tool Using Go";
25+ homepage = "https://magefile.org/";
2726 license = licenses.asl20;
28− maintainers = [ maintainers.swdunlop ];
29− homepage = https://magefile.org/;
27+ maintainers = with maintainers; [ swdunlop ];
3028 platforms = platforms.all;
3129 };
3230}
pkgs/development/tools/continuous-integration/gitlab-runner/default.nix+4−4
@@ -1,16 +1,16 @@
11{ lib, buildGoPackage, fetchFromGitLab, fetchurl }:
22
33let
4− version = "11.11.2";
4+ version = "12.0.2";
55 # Gitlab runner embeds some docker images these are prebuilt for arm and x86_64
66 docker_x86_64 = fetchurl {
77 url = "https://gitlab-runner-downloads.s3.amazonaws.com/v${version}/helper-images/prebuilt-x86_64.tar.xz";
8− sha256 = "0q5i9517jsz3mw7hglbnjih7q114350dfd9nyzv7xfk56kc0172w";
8+ sha256 = "0b1xkksd4rgqvjahp5bf53sk887z2fxwr7rf8vqs9j9aw54zm5cn";
99 };
1010
1111 docker_arm = fetchurl {
1212 url = "https://gitlab-runner-downloads.s3.amazonaws.com/v${version}/helper-images/prebuilt-arm.tar.xz";
13− sha256 = "0q7g0ggaxg6akda06an867vbdqjrfcxf4c81b1cxfhbk7whxgxhv";
13+ sha256 = "1cjl64g3ymnrs9c3fl28aydfzf18ik4vnjcvijv28c3gm1i6chs0";
1414 };
1515in
1616buildGoPackage rec {
@@ -29,7 +29,7 @@ buildGoPackage rec {
2929 owner = "gitlab-org";
3030 repo = "gitlab-runner";
3131 rev = "v${version}";
32− sha256 = "0bnn89z7p2mrjjlq7i9yfr6ra903vr278qhhy2i126w56dlac6vf";
32+ sha256 = "0cbh11libcyfdgrvnl1aa11x90ac7zgn1d9myc4dwmqzfdm4kdlb";
3333 };
3434
3535 patches = [ ./fix-shell-path.patch ];
pkgs/development/tools/distgen/default.nixnew file+32
@@ -0,0 +1,32 @@
1+{ lib, python3 }:
2+
3+python3.pkgs.buildPythonApplication rec {
4+ pname = "distgen";
5+ version = "1.3";
6+
7+ src = python3.pkgs.fetchPypi {
8+ inherit pname version;
9+ sha256 = "03jwy08wgp1lp6208vks1hv9g1f3aj45cml6k99mm3nw1jfnlbbq";
10+ };
11+
12+ checkInputs = with python3.pkgs; [
13+ pytest
14+ mock
15+ ];
16+
17+ propagatedBuildInputs = with python3.pkgs; [
18+ distro
19+ jinja2
20+ six
21+ pyyaml
22+ ];
23+
24+ checkPhase = "make test-unit PYTHON=${python3.executable}";
25+
26+ meta = with lib; {
27+ description = "Templating system/generator for distributions";
28+ license = licenses.gpl2Plus;
29+ homepage = "https://distgen.readthedocs.io/";
30+ maintainers = with maintainers; [ bachp ];
31+ };
32+}
pkgs/development/tools/rust/cargo-xbuild/default.nix+3−3
@@ -2,13 +2,13 @@
22
33rustPlatform.buildRustPackage rec {
44 pname = "cargo-xbuild";
5− version = "0.5.12";
5+ version = "0.5.14";
66
77 src = fetchFromGitHub {
88 owner = "rust-osdev";
99 repo = pname;
10− rev = "v${version}";
11− sha256 = "1vjsss2zrja4kpr83vw6g0hf9xdx658wjhdiymzndbcf32qrx7x1";
10+ rev = version;
11+ sha256 = "1f87rz17bdpdipc9x2j4gq1zq181gcshhn7vc9pnn6f487hz0bgq";
1212 };
1313
1414 cargoSha256 = "1r9i79lymfwpbcx2lp509v435qpkl9bqly1ya369p41n5yprrcjv";
pkgs/games/minecraft-server/default.nix+24−47
@@ -1,57 +1,34 @@
11{ stdenv, fetchurl, jre }:
2+stdenv.mkDerivation rec {
3+ name = "minecraft-server-${version}";
4+ version = "1.14.3";
25
3−let
4− common = { version, sha256, url }:
5− stdenv.mkDerivation (rec {
6− name = "minecraft-server-${version}";
7− inherit version;
8−
9− src = fetchurl {
10− inherit url sha256;
11− };
12−
13− preferLocalBuild = true;
14−
15− installPhase = ''
16− mkdir -p $out/bin $out/lib/minecraft
17− cp -v $src $out/lib/minecraft/server.jar
18−
19− cat > $out/bin/minecraft-server << EOF
20− #!/bin/sh
21− exec ${jre}/bin/java \$@ -jar $out/lib/minecraft/server.jar nogui
22− EOF
6+ src = fetchurl {
7+ url = "https://launcher.mojang.com/v1/objects/d0d0fe2b1dc6ab4c65554cb734270872b72dadd6/server.jar";
8+ sha256 = "0f0v0kqz2v5758551yji1vj6xf43lvbma30v3crz4h7cpzq5c8ll";
9+ };
2310
24− chmod +x $out/bin/minecraft-server
25− '';
11+ preferLocalBuild = true;
2612
27− phases = "installPhase";
13+ installPhase = ''
14+ mkdir -p $out/bin $out/lib/minecraft
15+ cp -v $src $out/lib/minecraft/server.jar
2816
29− meta = {
30− description = "Minecraft Server";
31− homepage = "https://minecraft.net";
32− license = stdenv.lib.licenses.unfreeRedistributable;
33− platforms = stdenv.lib.platforms.unix;
34− maintainers = with stdenv.lib.maintainers; [ thoughtpolice tomberek costrouc];
35− };
36− });
17+ cat > $out/bin/minecraft-server << EOF
18+ #!/bin/sh
19+ exec ${jre}/bin/java \$@ -jar $out/lib/minecraft/server.jar nogui
20+ EOF
3721
38−in {
39− minecraft-server_1_14 = common {
40− version = "1.14";
41− url = "https://launcher.mojang.com/v1/objects/f1a0073671057f01aa843443fef34330281333ce/server.jar";
42− sha256 = "671e3d334dd601c520bf1aeb96e49038145172bef16bc6c418e969fd8bf8ff6c";
43− };
22+ chmod +x $out/bin/minecraft-server
23+ '';
4424
45− minecraft-server_1_13_2 = common {
46− version = "1.13.2";
47− url = "https://launcher.mojang.com/v1/objects/3737db93722a9e39eeada7c27e7aca28b144ffa7/server.jar";
48− sha256 = "13h8dxrrgqa1g6sd7aaw26779hcsqsyjm7xm0sknifn54lnamlzz";
49− };
25+ phases = "installPhase";
5026
51− minecraft-server_1_12_2 = common {
52− version = "1.12.2";
53− url = "https://s3.amazonaws.com/Minecraft.Download/versions/1.12.2/minecraft_server.1.12.2.jar";
54− sha256 = "0zhnac6yvkdgdaag0gb0fgrkgizbwrpf7s76yqdiknfswrs947zy";
27+ meta = {
28+ description = "Minecraft Server";
29+ homepage = "https://minecraft.net";
30+ license = stdenv.lib.licenses.unfreeRedistributable;
31+ platforms = stdenv.lib.platforms.unix;
32+ maintainers = with stdenv.lib.maintainers; [ thoughtpolice tomberek costrouc];
5533 };
56−
5734}
pkgs/misc/screensavers/betterlockscreen/default.nix+5−5
@@ -1,6 +1,6 @@
11{
22 stdenv, makeWrapper, fetchFromGitHub,
3− imagemagick, i3lock-color, xdpyinfo, xrandr, bc, feh
3+ imagemagick, i3lock-color, xdpyinfo, xrandr, bc, feh, procps, xrdb
44}:
55
66stdenv.mkDerivation rec {
@@ -18,11 +18,11 @@ stdenv.mkDerivation rec {
1818
1919 patches = [ ./replace-i3lock.patch ];
2020
21− installPhase =
22− let
23− PATH =
21+ installPhase =
22+ let
23+ PATH =
2424 stdenv.lib.makeBinPath
25− [imagemagick i3lock-color xdpyinfo xrandr bc feh];
25+ [imagemagick i3lock-color xdpyinfo xrandr bc feh procps xrdb];
2626 in ''
2727 mkdir -p $out/bin
2828 cp betterlockscreen $out/bin/betterlockscreen
pkgs/os-specific/linux/firmware/fwupd/add-option-for-installation-sysconfdir.patch+27−46
@@ -1,36 +1,8 @@
1−From 44887227f7f617cbf84713ec45685cb4999039ff Mon Sep 17 00:00:00 2001
2−From: Jan Tojnar <jtojnar@gmail.com>
3−Date: Tue, 30 Oct 2018 22:26:30 +0100
4−Subject: [PATCH] build: Add option for installation sysconfdir
5−
6−On NixOS, sysconfdir is read-only by default, and packages are not supposed to
7−install files there. Instead, NixOS has a concept of modules that declaratively
8−describe the system configuration.
9−
10−We still want to install the config files and certificates to fwupd prefix,
11−so that the modules can use them as they see fit, but at the same time, we
12−cannot set sysconfdir=${prefix}/etc because the daemon needs to read the
13−configuration from the directory created by the module.
14−
15−With autotools, we could easily solve this by passing a the sysconfdir inside
16−prefix only to `make install`, but Meson does not support anything like that.
17−Until we manage to convince Meson to support install flags, we need to create
18−our own install flag.
19−---
20− data/meson.build | 4 ++--
21− data/pki/meson.build | 8 ++++----
22− data/remotes.d/meson.build | 6 +++---
23− meson.build | 6 ++++++
24− meson_options.txt | 1 +
25− plugins/redfish/meson.build | 2 +-
26− plugins/uefi/meson.build | 2 +-
27− 7 files changed, 18 insertions(+), 11 deletions(-)
28−
291diff --git a/data/meson.build b/data/meson.build
30−index 8dd2ac9a..d4ad1cbc 100644
2+index 61664cd6..f10abbba 100644
313--- a/data/meson.build
324+++ b/data/meson.build
33−@@ -9,7 +9,7 @@ if get_option('tests') and get_option('daemon')
5+@@ -11,7 +11,7 @@ if get_option('daemon')
346 endif
357
368 install_data(['daemon.conf'],
@@ -39,7 +11,7 @@ index 8dd2ac9a..d4ad1cbc 100644
3911 )
4012
4113 install_data(['org.freedesktop.fwupd.metainfo.xml'],
42−@@ -17,7 +17,7 @@ install_data(['org.freedesktop.fwupd.metainfo.xml'],
14+@@ -23,7 +23,7 @@ install_data(['org.freedesktop.fwupd.svg'],
4315 )
4416
4517 install_data(['org.freedesktop.fwupd.conf'],
@@ -47,7 +19,7 @@ index 8dd2ac9a..d4ad1cbc 100644
4719+ install_dir : join_paths(sysconfdir_install, 'dbus-1', 'system.d')
4820 )
4921
50− install_data(['metadata.xml'],
22+ if get_option('daemon')
5123diff --git a/data/pki/meson.build b/data/pki/meson.build
5224index eefcc914..dc801fa1 100644
5325--- a/data/pki/meson.build
@@ -85,7 +57,7 @@ index eefcc914..dc801fa1 100644
8557 endif
8658
8759diff --git a/data/remotes.d/meson.build b/data/remotes.d/meson.build
88−index 824291fc..d0599a00 100644
60+index a27c31ef..374e09b6 100644
8961--- a/data/remotes.d/meson.build
9062+++ b/data/remotes.d/meson.build
9163@@ -3,7 +3,7 @@ if get_option('daemon') and get_option('lvfs')
@@ -98,22 +70,22 @@ index 824291fc..d0599a00 100644
9870 i18n.merge_file(
9971 input: 'lvfs.metainfo.xml',
10072@@ -37,12 +37,12 @@ configure_file(
101− output : 'fwupd.conf',
73+ output : 'vendor.conf',
10274 configuration : con2,
10375 install: true,
10476- install_dir: join_paths(sysconfdir, 'fwupd', 'remotes.d'),
10577+ install_dir: join_paths(sysconfdir_install, 'fwupd', 'remotes.d'),
10678 )
10779 configure_file(
108− input : 'vendor.conf',
109− output : 'vendor.conf',
80+ input : 'vendor-directory.conf',
81+ output : 'vendor-directory.conf',
11082 configuration : con2,
11183 install: true,
11284- install_dir: join_paths(sysconfdir, 'fwupd', 'remotes.d'),
11385+ install_dir: join_paths(sysconfdir_install, 'fwupd', 'remotes.d'),
11486 )
11587diff --git a/meson.build b/meson.build
116−index b6df98b3..d672ee37 100644
88+index a89f9b3f..736896eb 100644
11789--- a/meson.build
11890+++ b/meson.build
11991@@ -145,6 +145,12 @@ localstatedir = join_paths(prefix, get_option('localstatedir'))
@@ -130,22 +102,33 @@ index b6df98b3..d672ee37 100644
130102 if gio.version().version_compare ('>= 2.55.0')
131103 conf.set('HAVE_GIO_2_55_0', '1')
132104diff --git a/meson_options.txt b/meson_options.txt
133−index 23ef8cdb..db8f93b6 100644
105+index 5d4163e8..db81fd1f 100644
134106--- a/meson_options.txt
135107+++ b/meson_options.txt
136−@@ -17,6 +17,7 @@ option('plugin_uefi', type : 'boolean', value : true, description : 'enable UEFI
137− option('plugin_nvme', type : 'boolean', value : true, description : 'enable NVMe support')
108+@@ -21,6 +21,7 @@ option('plugin_modem_manager', type : 'boolean', value : false, description : 'e
138109 option('systemd', type : 'boolean', value : true, description : 'enable systemd support')
139110 option('systemdunitdir', type: 'string', value: '', description: 'Directory for systemd units')
111+ option('elogind', type : 'boolean', value : false, description : 'enable elogind support')
140112+option('sysconfdir_install', type: 'string', value: '', description: 'sysconfdir to use during installation')
141113 option('tests', type : 'boolean', value : true, description : 'enable tests')
142114 option('udevdir', type: 'string', value: '', description: 'Directory for udev rules')
143115 option('efi-cc', type : 'string', value : 'gcc', description : 'the compiler to use for EFI modules')
116+diff --git a/plugins/dell-esrt/meson.build b/plugins/dell-esrt/meson.build
117+index cb9f4555..b972d7fb 100644
118+--- a/plugins/dell-esrt/meson.build
119++++ b/plugins/dell-esrt/meson.build
120+@@ -36,5 +36,5 @@ configure_file(
121+ output : 'dell-esrt.conf',
122+ configuration : con2,
123+ install: true,
124+- install_dir: join_paths(sysconfdir, 'fwupd', 'remotes.d'),
125++ install_dir: join_paths(sysconfdir_install, 'fwupd', 'remotes.d'),
126+ )
144127diff --git a/plugins/redfish/meson.build b/plugins/redfish/meson.build
145−index ef07bd81..d2c7e259 100644
128+index 5c88504e..7706da71 100644
146129--- a/plugins/redfish/meson.build
147130+++ b/plugins/redfish/meson.build
148−@@ -25,7 +25,7 @@ shared_module('fu_plugin_redfish',
131+@@ -26,7 +26,7 @@ shared_module('fu_plugin_redfish',
149132 )
150133
151134 install_data(['redfish.conf'],
@@ -155,10 +138,10 @@ index ef07bd81..d2c7e259 100644
155138
156139 if get_option('tests')
157140diff --git a/plugins/uefi/meson.build b/plugins/uefi/meson.build
158−index 09ebdf82..02fc0661 100644
141+index ac9f5dd8..1ab51b5e 100644
159142--- a/plugins/uefi/meson.build
160143+++ b/plugins/uefi/meson.build
161−@@ -73,7 +73,7 @@ executable(
144+@@ -79,7 +79,7 @@ executable(
162145 )
163146
164147 install_data(['uefi.conf'],
@@ -167,5 +150,3 @@ index 09ebdf82..02fc0661 100644
167150 )
168151
169152 if get_option('tests')
170−--
171−2.19.1
pkgs/os-specific/linux/firmware/fwupd/default.nix+18−9
@@ -1,10 +1,11 @@
11{ stdenv, fetchurl, substituteAll, gtk-doc, pkgconfig, gobject-introspection, intltool
22, libgudev, polkit, libxmlb, gusb, sqlite, libarchive, glib-networking
3−, libsoup, help2man, gpgme, libxslt, elfutils, libsmbios, efivar, glibcLocales
4−, gnu-efi, libyaml, valgrind, meson, libuuid, colord, docbook_xml_dtd_43, docbook_xsl
3+, libsoup, help2man, gpgme, libxslt, elfutils, libsmbios, efivar, gnu-efi
4+, libyaml, valgrind, meson, libuuid, colord, docbook_xml_dtd_43, docbook_xsl
55, ninja, gcab, gnutls, python3, wrapGAppsHook, json-glib, bash-completion
66, shared-mime-info, umockdev, vala, makeFontsConf, freefont_ttf
77, cairo, freetype, fontconfig, pango
8+, bubblewrap, efibootmgr, flashrom, tpm2-tools
89}:
910
1011# Updating? Keep $out/etc synchronized with passthru.filesInstalledToEtc
@@ -18,17 +19,17 @@ let
1819 };
1920in stdenv.mkDerivation rec {
2021 pname = "fwupd";
21− version = "1.2.3";
22+ version = "1.2.8";
2223
2324 src = fetchurl {
2425 url = "https://people.freedesktop.org/~hughsient/releases/fwupd-${version}.tar.xz";
25− sha256 = "11qpgincndahq96rbm2kgcy9kw5n9cmbbilsrqcqcyk7mvv464sl";
26+ sha256 = "0qbvq52c0scn1h99i1rf2la6rrhckin6gb02k7l0v3g07mxs20wc";
2627 };
2728
2829 outputs = [ "out" "lib" "dev" "devdoc" "man" "installedTests" ];
2930
3031 nativeBuildInputs = [
31− meson ninja gtk-doc pkgconfig gobject-introspection intltool glibcLocales shared-mime-info
32+ meson ninja gtk-doc pkgconfig gobject-introspection intltool shared-mime-info
3233 valgrind gcab docbook_xml_dtd_43 docbook_xsl help2man libxslt python wrapGAppsHook vala
3334 ];
3435 buildInputs = [
@@ -37,10 +38,13 @@ in stdenv.mkDerivation rec {
3738 bash-completion cairo freetype fontconfig pango
3839 ];
3940
40− LC_ALL = "en_US.UTF-8"; # For po/make-images
41−
4241 patches = [
43− ./fix-paths.patch
42+ (substituteAll {
43+ src = ./fix-paths.patch;
44+ inherit flashrom efibootmgr bubblewrap;
45+ tpm2_tools = "${tpm2-tools}";
46+ })
47+
4448 ./add-option-for-installation-sysconfdir.patch
4549
4650 # installed tests are installed to different output
@@ -63,6 +67,10 @@ in stdenv.mkDerivation rec {
6367 substituteInPlace meson.build \
6468 --replace "plugin_dir = join_paths(libdir, 'fwupd-plugins-3')" \
6569 "plugin_dir = join_paths('${placeholder "out"}', 'fwupd_plugins-3')"
70+
71+ substituteInPlace data/meson.build --replace \
72+ "install_dir: systemd.get_pkgconfig_variable('systemdshutdowndir')" \
73+ "install_dir: '${placeholder "out"}/lib/systemd/system-shutdown'"
6674 '';
6775
6876 # /etc/os-release not available in sandbox
@@ -114,10 +122,11 @@ in stdenv.mkDerivation rec {
114122 # /etc/fwupd/uefi.conf is created by the services.hardware.fwupd NixOS module
115123 passthru = {
116124 filesInstalledToEtc = [
117− "fwupd/remotes.d/fwupd.conf"
125+ "fwupd/remotes.d/dell-esrt.conf"
118126 "fwupd/remotes.d/lvfs-testing.conf"
119127 "fwupd/remotes.d/lvfs.conf"
120128 "fwupd/remotes.d/vendor.conf"
129+ "fwupd/remotes.d/vendor-directory.conf"
121130 "pki/fwupd/GPG-KEY-Hughski-Limited"
122131 "pki/fwupd/GPG-KEY-Linux-Foundation-Firmware"
123132 "pki/fwupd/GPG-KEY-Linux-Vendor-Firmware-Service"
pkgs/os-specific/linux/firmware/fwupd/fix-paths.patch+57−1
@@ -1,15 +1,71 @@
1+diff --git a/data/builder/meson.build b/data/builder/meson.build
2+index c7a430c0..e69de29b 100644
13--- a/data/builder/meson.build
24+++ b/data/builder/meson.build
35@@ -1,3 +0,0 @@
46-install_data('README.md',
57- install_dir : join_paths(localstatedir, 'lib', 'fwupd', 'builder')
68-)
9+diff --git a/meson_post_install.sh b/meson_post_install.sh
10+index 0cbb6f41..d757a81a 100755
711--- a/meson_post_install.sh
812+++ b/meson_post_install.sh
9−@@ -11,6 +11,4 @@
13+@@ -11,6 +11,4 @@ LOCALSTATEDIR=$2
1014 echo 'Updating systemd deps'
1115 mkdir -p ${DESTDIR}${SYSTEMDUNITDIR}/system-update.target.wants
1216 ln -sf ../fwupd-offline-update.service ${DESTDIR}${SYSTEMDUNITDIR}/system-update.target.wants/fwupd-offline-update.service
1317- echo 'Creating stateful directory'
1418- mkdir -p ${DESTDIR}${LOCALSTATEDIR}/lib/fwupd
1519 #fi
20+diff --git a/plugins/flashrom/fu-plugin-flashrom.c b/plugins/flashrom/fu-plugin-flashrom.c
21+index 598e0c42..a0a2c4a7 100644
22+--- a/plugins/flashrom/fu-plugin-flashrom.c
23++++ b/plugins/flashrom/fu-plugin-flashrom.c
24+@@ -52,7 +52,7 @@ fu_plugin_startup (FuPlugin *plugin, GError **error)
25+ g_autoptr(GError) error_local = NULL;
26+
27+ /* we need flashrom from the host system */
28+- data->flashrom_fn = fu_common_find_program_in_path ("flashrom", &error_local);
29++ data->flashrom_fn = fu_common_find_program_in_path ("@flashrom@/bin/flashrom", &error_local);
30+
31+ /* search for devices */
32+ hwids = fu_plugin_get_hwids (plugin);
33+diff --git a/plugins/uefi/fu-plugin-uefi.c b/plugins/uefi/fu-plugin-uefi.c
34+index 9293715c..e2e77c58 100644
35+--- a/plugins/uefi/fu-plugin-uefi.c
36++++ b/plugins/uefi/fu-plugin-uefi.c
37+@@ -416,7 +416,7 @@ fu_plugin_update (FuPlugin *plugin,
38+ fu_plugin_add_report_metadata (plugin, "MissingCapsuleHeader", str);
39+
40+ /* record boot information to system log for future debugging */
41+- efibootmgr_path = fu_common_find_program_in_path ("efibootmgr", NULL);
42++ efibootmgr_path = fu_common_find_program_in_path ("@efibootmgr@/bin/efibootmgr", NULL);
43+ if (efibootmgr_path != NULL) {
44+ if (!g_spawn_command_line_sync ("efibootmgr -v",
45+ &boot_variables, NULL, NULL, error))
46+diff --git a/plugins/uefi/fu-uefi-pcrs.c b/plugins/uefi/fu-uefi-pcrs.c
47+index 5c7e5239..01acbf7f 100644
48+--- a/plugins/uefi/fu-uefi-pcrs.c
49++++ b/plugins/uefi/fu-uefi-pcrs.c
50+@@ -147,7 +147,7 @@ fu_uefi_pcrs_setup (FuUefiPcrs *self, GError **error)
51+ /* old name, then new name */
52+ argv0 = fu_common_find_program_in_path ("tpm2_listpcrs", NULL);
53+ if (argv0 == NULL)
54+- argv0 = fu_common_find_program_in_path ("tpm2_pcrlist", error);
55++ argv0 = fu_common_find_program_in_path ("@tpm2_tools@/bin/tpm2_pcrlist", error);
56+ if (argv0 == NULL)
57+ return FALSE;
58+ if (!fu_uefi_pcrs_setup_tpm20 (self, argv0, error))
59+diff --git a/src/fu-common.c b/src/fu-common.c
60+index bd6faeef..45ba2a60 100644
61+--- a/src/fu-common.c
62++++ b/src/fu-common.c
63+@@ -436,7 +436,7 @@ fu_common_firmware_builder (GBytes *bytes,
64+ g_return_val_if_fail (error == NULL || *error == NULL, NULL);
65+
66+ /* find bwrap in the path */
67+- bwrap_fn = fu_common_find_program_in_path ("bwrap", error);
68++ bwrap_fn = fu_common_find_program_in_path ("@bubblewrap@/bin/bwrap", error);
69+ if (bwrap_fn == NULL)
70+ return NULL;
71+
pkgs/os-specific/linux/kernel/linux-testing-bcachefs.nix+4−4
@@ -1,13 +1,13 @@
11{ stdenv, buildPackages, fetchgit, fetchpatch, perl, buildLinux, ... } @ args:
22
33buildLinux (args // rec {
4− version = "5.0.2019.05.29";
5− modDirVersion = "5.0.0";
4+ version = "5.1.2019.07.11";
5+ modDirVersion = "5.1.0";
66
77 src = fetchgit {
88 url = "https://evilpiepirate.org/git/bcachefs.git";
9− rev = "7e42539c80470cb655bbc46cd0f144de6c644523";
10− sha256 = "0f7z3awfzdg56rby6z8dh9v9bzyyfn53zgwxmk367mfi0wqk49d2";
9+ rev = "44dc1f269553f33cce43628444970efb85a7e802";
10+ sha256 = "1i32s15r0a844dnp3h9ac37xm9h69g0jn75pqz2gbfrafpk3pac1";
1111 };
1212
1313 extraConfig = "BCACHEFS_FS m";
pkgs/os-specific/linux/nvidia-x11/default.nix+4−4
@@ -22,10 +22,10 @@ rec {
2222 beta = stable;
2323
2424 stable_430 = generic {
25− version = "430.26";
26− sha256_64bit = "1rnfxl4dxa3jjidfdvfjmg1a8nc787ss15cakrp2wwrn8jlr9av6";
27− settingsSha256 = "0rjsj697s9jfls7iz1hs7aqp36ihf3l82yz1x1w9wdvlw94a3nym";
28− persistencedSha256 = "1n554i4g37hs49bb631x692ygfncn7a5hzb6mh9kx7hmv69yzazh";
25+ version = "430.34";
26+ sha256_64bit = "0c3x25gilibbgazvp20d5sfmmgcf0gfqf024nzzqryxg4m05h39b";
27+ settingsSha256 = "1xpf9gbpq5xynxm6f401ab09aa243h1sk2vcxvzjwqgcil36zzad";
28+ persistencedSha256 = "00dd0m87nwqfv9i23bvbqgcz10x9mvfxg9249nvhp4y3ha65rms6";
2929 };
3030
3131 # Last one supporting x86
pkgs/os-specific/linux/nvidia-x11/settings.nix+11
@@ -72,6 +72,17 @@ stdenv.mkDerivation rec {
7272 ${lib.optionalString (!withGtk3) ''
7373 rm -f $out/lib/libnvidia-gtk3.so.*
7474 ''}
75+
76+ # Install the desktop file and icon.
77+ # The template has substitution variables intended to be replaced resulting
78+ # in absolute paths. Because absolute paths break after the desktop file is
79+ # copied by a desktop environment, make Exec and Icon be just a name.
80+ sed -i doc/nvidia-settings.desktop \
81+ -e "s|^Exec=.*$|Exec=nvidia-settings|" \
82+ -e "s|^Icon=.*$|Icon=nvidia-settings|" \
83+ -e "s|__NVIDIA_SETTINGS_DESKTOP_CATEGORIES__|Settings|g"
84+ install doc/nvidia-settings.desktop -D -t $out/share/applications/
85+ install doc/nvidia-settings.png -D -t $out/share/icons/hicolor/128x128/apps/
7586 '';
7687
7788 binaryName = if withGtk3 then ".nvidia-settings-wrapped" else "nvidia-settings";
pkgs/servers/dns/knot-resolver/default.nix+48−46
@@ -1,76 +1,77 @@
1−{ stdenv, fetchurl, fetchpatch, runCommand, pkgconfig, hexdump, which
2−, knot-dns, luajit, libuv, lmdb, gnutls, nettle
3−, cmocka, systemd, dns-root-data, makeWrapper
1+{ stdenv, fetchurl
2+# native deps.
3+, runCommand, pkgconfig, meson, ninja, makeWrapper
4+# build+runtime deps.
5+, knot-dns, luajitPackages, libuv, gnutls, lmdb, systemd, dns-root-data
6+# test-only deps.
7+, cmocka, which, cacert
48, extraFeatures ? false /* catch-all if defaults aren't enough */
5−, luajitPackages
69}:
710let # un-indented, over the whole file
811
912result = if extraFeatures then wrapped-full else unwrapped;
1013
11−inherit (stdenv.lib) optional;
14+inherit (stdenv.lib) optional optionals concatStringsSep;
15+lua = luajitPackages;
16+
17+# FIXME: remove these usages once resolving
18+# https://github.com/NixOS/nixpkgs/pull/63108#issuecomment-508670438
19+exportLuaPathsFor = luaPkgs: ''
20+ export LUA_PATH='${ concatStringsSep ";" (map lua.getLuaPath luaPkgs)}'
21+ export LUA_CPATH='${concatStringsSep ";" (map lua.getLuaCPath luaPkgs)}'
22+'';
1223
1324unwrapped = stdenv.mkDerivation rec {
1425 name = "knot-resolver-${version}";
15− version = "3.2.1";
26+ version = "4.1.0";
1627
1728 src = fetchurl {
1829 url = "https://secure.nic.cz/files/knot-resolver/${name}.tar.xz";
19− sha256 = "d1396888ec3a63f19dccdf2b7dbcb0d16a5d8642766824b47f4c21be90ce362b";
30+ sha256 = "2fe470f9bb1007667cdd448f758087244b7195a0234c2b100a9beeed0a2d3e68";
2031 };
2132
22− patches = [
23− (fetchpatch {
24− name = "support-libzscanner-2.8.diff";
25− url = "https://gitlab.labs.nic.cz/knot/knot-resolver/commit/186f263.diff";
26− sha256 = "19zqigvc7m2a4j6bk9whx7gj0v009568rz5qwk052z7pzfikr8mk";
27− })
28− ];
29−
30− # Short-lived cross fix, as upstream is migrating to meson anyway.
31− postPatch = ''
32− substituteInPlace platform.mk --replace "objdump" "$OBJDUMP"
33− '';
34−
3533 outputs = [ "out" "dev" ];
3634
37− configurePhase = "patchShebangs scripts/";
35+ preConfigure = ''
36+ patchShebangs scripts/
37+ ''
38+ + stdenv.lib.optionalString doInstallCheck (exportLuaPathsFor [ lua.cqueues lua.basexx ]);
3839
39− nativeBuildInputs = [ pkgconfig which hexdump ];
40+ nativeBuildInputs = [ pkgconfig meson ninja ];
4041
4142 # http://knot-resolver.readthedocs.io/en/latest/build.html#requirements
42− buildInputs = [ knot-dns luajit libuv gnutls nettle lmdb ]
43− ++ optional stdenv.isLinux systemd # sd_notify
43+ buildInputs = [ knot-dns lua.lua libuv gnutls lmdb ]
44+ ++ optional stdenv.isLinux systemd # passing sockets, sd_notify
4445 ## optional dependencies; TODO: libedit, dnstap
4546 ;
4647
47− checkInputs = [ cmocka ];
48−
49− makeFlags = [
50− "PREFIX=$(out)"
51− "ROOTHINTS=${dns-root-data}/root.hints"
52− "KEYFILE_DEFAULT=${dns-root-data}/root.ds"
53− ];
54− CFLAGS = [ "-O2" "-DNDEBUG" ];
48+ mesonFlags = [
49+ "-Dkeyfile_default=${dns-root-data}/root.ds"
50+ "-Droot_hints=${dns-root-data}/root.hints"
51+ "-Dinstall_kresd_conf=disabled" # not really useful; examples are inside share/doc/
52+ "--default-library=static" # not used by anyone
53+ ]
54+ ++ optional doInstallCheck "-Dunit_tests=enabled"
55+ ++ optional (doInstallCheck && !stdenv.isDarwin) "-Dconfig_tests=enabled"
56+ #"-Dextra_tests=enabled" # not suitable as in-distro tests; many deps, too.
57+ ;
5558
56− enableParallelBuilding = true;
57−
58− doCheck = true;
59− doInstallCheck = false; # FIXME
60− preInstallCheck = ''
61− patchShebangs tests/config/runtest.sh
59+ postInstall = ''
60+ rm "$out"/lib/libkres.a
6261 '';
6362
64− postInstall = ''
65− rm "$out"/etc/knot-resolver/root.hints # using system-wide instead
63+ # aarch64: see https://github.com/wahern/cqueues/issues/223
64+ doInstallCheck = with stdenv; hostPlatform == buildPlatform && !hostPlatform.isAarch64;
65+ installCheckInputs = [ cmocka which cacert ];
66+ installCheckPhase = ''
67+ meson test --print-errorlogs
6668 '';
6769
6870 meta = with stdenv.lib; {
6971 description = "Caching validating DNS resolver, from .cz domain registry";
7072 homepage = https://knot-resolver.cz;
7173 license = licenses.gpl3Plus;
72− # Platforms using negative pointers for stack won't work ATM due to LuaJIT impl.
73− platforms = filter (p: p != "aarch64-linux") platforms.unix;
74+ platforms = platforms.unix;
7475 maintainers = [ maintainers.vcunat /* upstream developer */ ];
7576 };
7677};
@@ -93,11 +94,12 @@ wrapped-full =
9394 preferLocalBuild = true;
9495 allowSubstitutes = false;
9596 }
96− ''
97+ (exportLuaPathsFor luaPkgs
98+ + ''
9799 mkdir -p "$out"/{bin,share}
98100 makeWrapper '${unwrapped}/bin/kresd' "$out"/bin/kresd \
99− --set LUA_PATH '${concatStringsSep ";" (map getLuaPath luaPkgs)}' \
100− --set LUA_CPATH '${concatStringsSep ";" (map getLuaCPath luaPkgs)}'
101+ --set LUA_PATH "$LUA_PATH" \
102+ --set LUA_CPATH "$LUA_CPATH"
101103
102104 ln -sr '${unwrapped}/share/man' "$out"/share/
103105 ln -sr "$out"/{bin,sbin}
@@ -105,6 +107,6 @@ wrapped-full =
105107 echo "Checking that 'http' module loads, i.e. lua search paths work:"
106108 echo "modules.load('http')" > test-http.lua
107109 echo -e 'quit()' | env -i "$out"/bin/kresd -a 127.0.0.1#53535 -c test-http.lua
108− '';
110+ '');
109111
110112in result
pkgs/servers/foswiki/default.nixdeleted−44
@@ -1,44 +0,0 @@
1−{ stdenv, fetchurl, perlPackages }:
2−
3−perlPackages.buildPerlPackage rec {
4− pname = "foswiki";
5− version = "2.1.0";
6−
7− src = fetchurl {
8− url = "mirror://sourceforge/foswiki/${version}/Foswiki-${version}.tgz";
9− sha256 = "03286pb966h99zgickm2f20rgnqwp9wga5wfkdvirv084kjdh8vp";
10− };
11−
12− outputs = [ "out" ];
13−
14− buildInputs = with perlPackages; [
15− # minimum requirements from INSTALL.html#System_Requirements
16− AlgorithmDiff ArchiveTar AuthenSASL CGI CGISession CryptPasswdMD5
17− EmailMIME Encode Error FileCopyRecursive HTMLParser HTMLTree
18− IOSocketSSL JSON
19− LocaleMaketextLexicon LocaleMsgfmt
20− LWP URI perlPackages.Version
21− /*# optional dependencies
22− libapreq2 DBI DBDmysql DBDPg DBDSQLite FCGI FCGIProcManager
23− CryptSMIME CryptX509 ConvertPEM
24− */
25− ];
26−
27− preConfigure = ''
28− touch Makefile.PL
29− patchShebangs .
30− '';
31− configureScript = "bin/configure";
32−
33− # there's even no makefile
34− doCheck = false;
35− installPhase = ''cp -r . "$out" '';
36−
37− meta = with stdenv.lib; {
38− description = "An open, programmable collaboration platform";
39− homepage = http://foswiki.org;
40− license = licenses.gpl2Plus;
41− platforms = platforms.linux;
42− };
43−}
44−
pkgs/servers/mautrix-whatsapp/default.nix+3−3
@@ -2,15 +2,15 @@
22
33buildGoPackage rec {
44 name = "mautrix-unstable-${version}";
5− version = "2019-02-24";
5+ version = "2019-07-04";
66
77 goPackagePath = "maunium.net/go/mautrix-whatsapp";
88
99 src = fetchFromGitHub {
1010 owner = "tulir";
1111 repo = "mautrix-whatsapp";
12− rev = "485acf6de654b8fb70007876c074fb004eb9717b";
13− sha256 = "1v7h3s8h0aiq6g06h9j1sidw8y5aiw24sgdh9knr1c90pvvc7pmv";
12+ rev = "29f5ae45c4b22f463003b23e355b951831f08b3e";
13+ sha256 = "12209m3x01i7bnnkg57ag1ivsk6n6pqaqfin7y02irgi3i3rm31r";
1414 };
1515
1616 goDeps = ./deps.nix;
pkgs/servers/mautrix-whatsapp/deps.nix+46−36
@@ -1,21 +1,22 @@
1+# NOTE: this file isn't entirely generated, while performing the bump
2+# from 2019-02-24 to 2019-06-01, a lot of stuff broke during `vgo2nix` as the
3+# tool is unable to parse `replace` statements atm.
4+#
5+# The following sources were altered manually:
6+# * github.com/Rhymen/go-whatsapp -> github.com/tulir/go-whatsapp (at 36ed380bdc18)
7+# * github.com/golang/protobuf: v1.2.0 -> v1.3.1
8+# * maunium.net/go/mautrix: v0.1.0-alpha3 -> ca5d9535b6cc
9+# * maunium.net/go/mautrix-appservice: v0.1.0-alpha3 -> 6e6c9bb47548
10+
111# file generated from go.mod using vgo2nix (https://github.com/adisbladis/vgo2nix)
212[
3− {
4− goPackagePath = "github.com/Baozisoftware/qrcode-terminal-go";
5− fetch = {
6− type = "git";
7− url = "https://github.com/Baozisoftware/qrcode-terminal-go";
8− rev = "c0650d8dff0f";
9− sha256 = "166h9zy9y7ygayhybg7d080hpdcf1mvkf3rwnq5lqg8i3cg71s7b";
10− };
11− }
1213 {
1314 goPackagePath = "github.com/Rhymen/go-whatsapp";
1415 fetch = {
1516 type = "git";
16− url = "https://github.com/Rhymen/go-whatsapp";
17− rev = "c1173899de99";
18− sha256 = "1f46zpbfgv3k38lgdrcwqf4cm34dgqxlfs9qzg380in61460lcri";
17+ url = "https://github.com/tulir/go-whatsapp";
18+ rev = "36ed380bdc188e35fe804d6dd4809ee170136670";
19+ sha256 = "1ida4j5hgqc5djwfsaqp8g6iynn150rwj42kqk9q2srwz5075n4p";
1920 };
2021 }
2122 {
@@ -32,8 +33,8 @@
3233 fetch = {
3334 type = "git";
3435 url = "https://github.com/golang/protobuf";
35− rev = "v1.2.0";
36− sha256 = "0kf4b59rcbb1cchfny2dm9jyznp8ri2hsb14n8iak1q8986xa0ab";
36+ rev = "v1.3.1";
37+ sha256 = "15am4s4646qy6iv0g3kkqq52rzykqjhm4bf08dk0fy2r58knpsyl";
3738 };
3839 }
3940 {
@@ -41,8 +42,8 @@
4142 fetch = {
4243 type = "git";
4344 url = "https://github.com/gorilla/mux";
44− rev = "v1.7.0";
45− sha256 = "09cn5v1gxrrrydzyllp1asbhgm5xsawb92as7cg9jqg6iyqajvlc";
45+ rev = "v1.6.2";
46+ sha256 = "0pvzm23hklxysspnz52mih6h1q74vfrdhjfm1l3sa9r8hhqmmld2";
4647 };
4748 }
4849 {
@@ -54,13 +55,22 @@
5455 sha256 = "00i4vb31nsfkzzk7swvx3i75r2d960js3dri1875vypk3v2s0pzk";
5556 };
5657 }
58+ {
59+ goPackagePath = "github.com/lib/pq";
60+ fetch = {
61+ type = "git";
62+ url = "https://github.com/lib/pq";
63+ rev = "v1.1.1";
64+ sha256 = "0g64wlg1l1ybq4x44idksl4pgm055s58jxc6r6x4qhqm5q76h0km";
65+ };
66+ }
5767 {
5868 goPackagePath = "github.com/mattn/go-colorable";
5969 fetch = {
6070 type = "git";
6171 url = "https://github.com/mattn/go-colorable";
62− rev = "v0.1.1";
63− sha256 = "0l640974j804c1yyjfgyxqlsivz0yrzmbql4mhcw2azryigkp08p";
72+ rev = "v0.0.9";
73+ sha256 = "1nwjmsppsjicr7anq8na6md7b1z84l9ppnlr045hhxjvbkqwalvx";
6474 };
6575 }
6676 {
@@ -68,8 +78,8 @@
6878 fetch = {
6979 type = "git";
7080 url = "https://github.com/mattn/go-isatty";
71− rev = "v0.0.5";
72− sha256 = "114d5xm8rfxplzd7nxz97gfngb4bhqy102szl084d1afcxsvm4aa";
81+ rev = "v0.0.4";
82+ sha256 = "0zs92j2cqaw9j8qx1sdxpv3ap0rgbs0vrvi72m40mg8aa36gd39w";
7383 };
7484 }
7585 {
@@ -82,7 +92,16 @@
8292 };
8393 }
8494 {
85− goPackagePath = "github.com/russross/blackfriday";
95+ goPackagePath = "github.com/pkg/errors";
96+ fetch = {
97+ type = "git";
98+ url = "https://github.com/pkg/errors";
99+ rev = "v0.8.1";
100+ sha256 = "0g5qcb4d4fd96midz0zdk8b9kz8xkzwfa8kr1cliqbg8sxsy5vd1";
101+ };
102+ }
103+ {
104+ goPackagePath = "gopkg.in/russross/blackfriday.v2";
86105 fetch = {
87106 type = "git";
88107 url = "https://github.com/russross/blackfriday";
@@ -113,8 +132,8 @@
113132 fetch = {
114133 type = "git";
115134 url = "https://go.googlesource.com/crypto";
116− rev = "ffb98f73852f";
117− sha256 = "0hil543q2zq8wxsz6ljrfnrhhxg5j0mrjfwskf2x6q0ppqizsa4h";
135+ rev = "b8fe1690c613";
136+ sha256 = "1mbfpbrirsz8fsdkibm9l4sccpm774p9201mpmfh4hxshz3girq3";
118137 };
119138 }
120139 {
@@ -135,15 +154,6 @@
135154 sha256 = "1bb0mw6ckb1k7z8v3iil2qlqwfj408fvvp8m1cik2b46p7snyjhm";
136155 };
137156 }
138− {
139− goPackagePath = "golang.org/x/sys";
140− fetch = {
141− type = "git";
142− url = "https://go.googlesource.com/sys";
143− rev = "cd391775e71e";
144− sha256 = "12wk5ylx0jjajipr68yn50wcd0c9shzhq9y4an40ldnv4bsdp2rj";
145− };
146− }
147157 {
148158 goPackagePath = "gopkg.in/check.v1";
149159 fetch = {
@@ -185,8 +195,8 @@
185195 fetch = {
186196 type = "git";
187197 url = "https://github.com/tulir/mautrix-go.git";
188− rev = "v0.1.0-alpha.3";
189− sha256 = "12nlyij57ss2a5d1f1k1vsmjjvxp1fannlrbnp2jsj6rrsq0d2wr";
198+ rev = "ca5d9535b6ccee8fdf473f9cc935932ef3e53ae7";
199+ sha256 = "1qrh77c8vh2k6ffwf0cymjmhcp7d0rdad1ixqx5r1xig27f7v0qg";
190200 };
191201 }
192202 {
@@ -194,8 +204,8 @@
194204 fetch = {
195205 type = "git";
196206 url = "https://github.com/tulir/mautrix-appservice-go.git";
197− rev = "v0.1.0-alpha.3";
198− sha256 = "17y11wgqbrafbq6bnn4rp2lzd50fjz9d6f8j3382jsara7ps95vr";
207+ rev = "6e6c9bb4754849443cb3c64d9510f8d2eb3e668d";
208+ sha256 = "1zwsfvgxs2zbc6yvgnk16w2wkh891kihrzar3qzz9cvsgjznlyvy";
199209 };
200210 }
201211]
pkgs/servers/monitoring/zabbix/2.0.nixdeleted−92
@@ -1,92 +0,0 @@
1−{ stdenv, fetchurl, pkgconfig, postgresql, curl, openssl, zlib
2−, enableJabber ? false, minmay ? null }:
3−
4−assert enableJabber -> minmay != null;
5−
6−let
7−
8− version = "2.0.21";
9− branch = "2.0";
10−
11− src = fetchurl {
12− url = "mirror://sourceforge/zabbix/zabbix-${version}.tar.gz";
13− sha256 = "14g22x2zy5xqnh2xg23xy5gjd49d1i8pks7pkidwdwa9acwgfx71";
14− };
15−
16− preConfigure =
17− ''
18− substituteInPlace ./configure \
19− --replace " -static" "" \
20− ${stdenv.lib.optionalString (stdenv.cc.libc != null) ''
21− --replace /usr/include/iconv.h ${stdenv.lib.getDev stdenv.cc.libc}/include/iconv.h
22− ''}
23− '';
24−
25−in
26−
27−{
28− recurseForDerivations = true;
29−
30− server = stdenv.mkDerivation {
31− name = "zabbix-${version}";
32−
33− inherit src preConfigure;
34−
35− configureFlags = [
36− "--enable-agent"
37− "--enable-server"
38− "--with-postgresql"
39− "--with-libcurl"
40− "--with-gettext"
41− ] ++ stdenv.lib.optional enableJabber "--with-jabber=${minmay}";
42−
43− postPatch = ''
44− sed -i -e 's/iksemel/minmay/g' configure src/libs/zbxmedia/jabber.c
45− sed -i \
46− -e '/^static ikstransport/,/}/d' \
47− -e 's/iks_connect_with\(.*\), &zbx_iks_transport/mmay_connect_via\1/' \
48− -e 's/iks/mmay/g' -e 's/IKS/MMAY/g' src/libs/zbxmedia/jabber.c
49− '';
50−
51− nativeBuildInputs = [ pkgconfig ];
52− buildInputs = [ postgresql curl openssl zlib ];
53−
54− postInstall =
55− ''
56− mkdir -p $out/share/zabbix
57− cp -prvd frontends/php $out/share/zabbix/php
58− mkdir -p $out/share/zabbix/db/data
59− cp -prvd database/postgresql/data.sql $out/share/zabbix/db/data/data.sql
60− cp -prvd database/postgresql/images.sql $out/share/zabbix/db/data/images_pgsql.sql
61− mkdir -p $out/share/zabbix/db/schema
62− cp -prvd database/postgresql/schema.sql $out/share/zabbix/db/schema/postgresql.sql
63− '';
64−
65− meta = {
66− inherit branch;
67− description = "An enterprise-class open source distributed monitoring solution";
68− homepage = https://www.zabbix.com/;
69− license = "GPL";
70− maintainers = [ stdenv.lib.maintainers.eelco ];
71− platforms = stdenv.lib.platforms.linux;
72− };
73− };
74−
75− agent = stdenv.mkDerivation {
76− name = "zabbix-agent-${version}";
77−
78− inherit src preConfigure;
79−
80− configureFlags = [ "--enable-agent" ];
81−
82− meta = with stdenv.lib; {
83− inherit branch;
84− description = "An enterprise-class open source distributed monitoring solution (client-side agent)";
85− homepage = https://www.zabbix.com/;
86− license = licenses.gpl2;
87− maintainers = [ maintainers.eelco ];
88− platforms = platforms.linux;
89− };
90− };
91−
92−}
pkgs/servers/monitoring/zabbix/2.2.nixdeleted−104
@@ -1,104 +0,0 @@
1−{ stdenv, fetchurl, pkgconfig, postgresql, curl, openssl, zlib
2−, net_snmp , libssh2, openldap
3−, enableJabber ? false, minmay ? null
4−, enableSnmp ? false
5−, enableSsh ? false
6−, enableLdap ? false
7−}:
8−
9−assert enableJabber -> minmay != null;
10−
11−let
12−
13− version = "2.2.20";
14− branch = "2.2";
15−
16− src = fetchurl {
17− url = "mirror://sourceforge/zabbix/zabbix-${version}.tar.gz";
18− sha256 = "00pfpyj3vydwx9dn0bklh1p5j0bp2awi4hvv4kgliyav8l0416hk";
19− };
20−
21− preConfigure =
22− ''
23− substituteInPlace ./configure \
24− --replace " -static" "" \
25− ${stdenv.lib.optionalString (stdenv.cc.libc != null) ''
26− --replace /usr/include/iconv.h ${stdenv.lib.getDev stdenv.cc.libc}/include/iconv.h
27− ''}
28− '';
29−
30−in
31−
32−{
33− recurseForDerivations = true;
34−
35− server = stdenv.mkDerivation {
36− name = "zabbix-${version}";
37−
38− inherit src preConfigure;
39−
40− configureFlags = [
41− "--enable-agent"
42− "--enable-server"
43− "--with-postgresql"
44− "--with-libcurl"
45− "--with-gettext"
46− ]
47− ++ stdenv.lib.optional enableJabber "--with-jabber=${minmay}"
48− ++ stdenv.lib.optional enableSnmp "--with-net-snmp"
49− ++ stdenv.lib.optional enableSsh "--with-ssh2=${libssh2.dev}"
50− ++ stdenv.lib.optional enableLdap "--with-ldap=${openldap.dev}";
51−
52− postPatch = ''
53− sed -i -e 's/iksemel/minmay/g' configure src/libs/zbxmedia/jabber.c
54− sed -i \
55− -e '/^static ikstransport/,/}/d' \
56− -e 's/iks_connect_with\(.*\), &zbx_iks_transport/mmay_connect_via\1/' \
57− -e 's/iks/mmay/g' -e 's/IKS/MMAY/g' src/libs/zbxmedia/jabber.c
58− '';
59−
60− nativeBuildInputs = [ pkgconfig ];
61− buildInputs = [ postgresql curl openssl zlib ]
62− ++ stdenv.lib.optional enableSnmp net_snmp
63− ++ stdenv.lib.optional enableSsh libssh2
64− ++ stdenv.lib.optional enableLdap openldap;
65−
66− postInstall =
67− ''
68− mkdir -p $out/share/zabbix
69− cp -prvd frontends/php $out/share/zabbix/php
70− mkdir -p $out/share/zabbix/db/data
71− cp -prvd database/postgresql/data.sql $out/share/zabbix/db/data/data.sql
72− cp -prvd database/postgresql/images.sql $out/share/zabbix/db/data/images_pgsql.sql
73− mkdir -p $out/share/zabbix/db/schema
74− cp -prvd database/postgresql/schema.sql $out/share/zabbix/db/schema/postgresql.sql
75− '';
76−
77− meta = {
78− inherit branch;
79− description = "An enterprise-class open source distributed monitoring solution";
80− homepage = https://www.zabbix.com/;
81− license = "GPL";
82− maintainers = [ stdenv.lib.maintainers.eelco ];
83− platforms = stdenv.lib.platforms.linux;
84− };
85− };
86−
87− agent = stdenv.mkDerivation {
88− name = "zabbix-agent-${version}";
89−
90− inherit src preConfigure;
91−
92− configureFlags = [ "--enable-agent" ];
93−
94− meta = with stdenv.lib; {
95− inherit branch;
96− description = "An enterprise-class open source distributed monitoring solution (client-side agent)";
97− homepage = https://www.zabbix.com/;
98− license = licenses.gpl2;
99− maintainers = [ maintainers.eelco ];
100− platforms = platforms.linux;
101− };
102− };
103−
104−}
pkgs/servers/monitoring/zabbix/3.4.nixdeleted−41
@@ -1,41 +0,0 @@
1−{ stdenv, fetchurl, pcre, libiconv, openssl }:
2−
3−
4−let
5−
6− version = "3.4.8";
7− branch = "3.4";
8−
9− src = fetchurl {
10− url = "https://netix.dl.sourceforge.net/project/zabbix/ZABBIX%20Latest%20Stable/${version}/zabbix-${version}.tar.gz";
11− sha256 = "cec14993d1ec2c9d8c51f6608c9408620f27174db92edc2347bafa7b841ccc07";
12− };
13−
14−in
15−
16−{
17− agent = stdenv.mkDerivation {
18− name = "zabbix-agent-${version}";
19−
20− inherit src;
21−
22− configureFlags = [
23− "--enable-agent"
24− "--with-libpcre=${pcre.dev}"
25− "--with-iconv=${libiconv}"
26− "--with-openssl=${openssl.dev}"
27− ];
28− buildInputs = [ pcre libiconv openssl ];
29−
30− meta = with stdenv.lib; {
31− inherit branch;
32− description = "An enterprise-class open source distributed monitoring solution (client-side agent)";
33− homepage = https://www.zabbix.com/;
34− license = licenses.gpl2;
35− maintainers = [ maintainers.eelco ];
36− platforms = platforms.linux;
37− };
38− };
39−
40−}
41−
pkgs/servers/monitoring/zabbix/agent.nixnew file+38
@@ -0,0 +1,38 @@
1+{ stdenv, fetchurl, pkgconfig, libiconv, openssl, pcre }:
2+
3+import ./versions.nix ({ version, sha256 }:
4+ stdenv.mkDerivation {
5+ pname = "zabbix-agent";
6+ inherit version;
7+
8+ src = fetchurl {
9+ url = "mirror://sourceforge/zabbix/ZABBIX%20Latest%20Stable/${version}/zabbix-${version}.tar.gz";
10+ inherit sha256;
11+ };
12+
13+ nativeBuildInputs = [ pkgconfig ];
14+ buildInputs = [
15+ libiconv
16+ openssl
17+ pcre
18+ ];
19+
20+ configureFlags = [
21+ "--enable-agent"
22+ "--with-iconv"
23+ "--with-libpcre"
24+ "--with-openssl=${openssl.dev}"
25+ ];
26+
27+ postInstall = ''
28+ cp conf/zabbix_agentd/*.conf $out/etc/zabbix_agentd.conf.d/
29+ '';
30+
31+ meta = with stdenv.lib; {
32+ description = "An enterprise-class open source distributed monitoring solution (client-side agent)";
33+ homepage = "https://www.zabbix.com/";
34+ license = licenses.gpl2;
35+ maintainers = with maintainers; [ mmahut psyanticy ];
36+ platforms = platforms.linux;
37+ };
38+ })
pkgs/servers/monitoring/zabbix/default.nixdeleted−75
@@ -1,75 +0,0 @@
1−{ stdenv, fetchurl, pkgconfig, postgresql, curl, openssl, zlib }:
2−
3−let
4−
5− version = "1.8.22";
6−
7− src = fetchurl {
8− url = "mirror://sourceforge/zabbix/zabbix-${version}.tar.gz";
9− sha256 = "0cjj3c4j4b9sl3hgh1fck330z9q0gz2k68g227y0paal6k6f54g7";
10− };
11−
12− preConfigure =
13− ''
14− substituteInPlace ./configure \
15− --replace " -static" "" \
16− ${stdenv.lib.optionalString (stdenv.cc.libc != null) ''
17− --replace /usr/include/iconv.h ${stdenv.lib.getDev stdenv.cc.libc}/include/iconv.h
18− ''}
19− '';
20−
21−in
22−
23−{
24−
25− server = stdenv.mkDerivation {
26− name = "zabbix-${version}";
27−
28− inherit src preConfigure;
29−
30− configureFlags = [
31− "--enable-agent"
32− "--enable-server"
33− "--with-pgsql"
34− "--with-libcurl"
35− ];
36−
37− nativeBuildInputs = [ pkgconfig ];
38− buildInputs = [ postgresql curl openssl zlib ];
39−
40− postInstall =
41− ''
42− mkdir -p $out/share/zabbix
43− cp -prvd frontends/php $out/share/zabbix/php
44− mkdir -p $out/share/zabbix/db/data
45− cp -prvd create/data/*.sql $out/share/zabbix/db/data
46− mkdir -p $out/share/zabbix/db/schema
47− cp -prvd create/schema/*.sql $out/share/zabbix/db/schema
48− '';
49−
50− meta = {
51− description = "An enterprise-class open source distributed monitoring solution";
52− homepage = https://www.zabbix.com/;
53− license = "GPL";
54− maintainers = [ stdenv.lib.maintainers.eelco ];
55− platforms = stdenv.lib.platforms.linux;
56− };
57− };
58−
59− agent = stdenv.mkDerivation {
60− name = "zabbix-agent-${version}";
61−
62− inherit src preConfigure;
63−
64− configureFlags = [ "--enable-agent" ];
65−
66− meta = with stdenv.lib; {
67− description = "An enterprise-class open source distributed monitoring solution (client-side agent)";
68− homepage = https://www.zabbix.com/;
69− license = licenses.gpl2;
70− maintainers = [ maintainers.eelco ];
71− platforms = platforms.linux;
72− };
73− };
74−
75−}
pkgs/servers/monitoring/zabbix/proxy.nixnew file+79
@@ -0,0 +1,79 @@
1+{ stdenv, fetchurl, pkgconfig, libevent, libiconv, openssl, pcre, zlib
2+, odbcSupport ? true, unixODBC
3+, snmpSupport ? true, net_snmp
4+, sshSupport ? true, libssh2
5+, sqliteSupport ? false, sqlite
6+, mysqlSupport ? false, mysql
7+, postgresqlSupport ? false, postgresql
8+}:
9+
10+# ensure exactly one database type is selected
11+assert mysqlSupport -> !postgresqlSupport && !sqliteSupport;
12+assert postgresqlSupport -> !mysqlSupport && !sqliteSupport;
13+assert sqliteSupport -> !mysqlSupport && !postgresqlSupport;
14+
15+let
16+ inherit (stdenv.lib) optional optionalString;
17+in
18+ import ./versions.nix ({ version, sha256 }:
19+ stdenv.mkDerivation {
20+ pname = "zabbix-proxy";
21+ inherit version;
22+
23+ src = fetchurl {
24+ url = "mirror://sourceforge/zabbix/ZABBIX%20Latest%20Stable/${version}/zabbix-${version}.tar.gz";
25+ inherit sha256;
26+ };
27+
28+ nativeBuildInputs = [ pkgconfig ];
29+ buildInputs = [
30+ libevent
31+ libiconv
32+ openssl
33+ pcre
34+ zlib
35+ ]
36+ ++ optional odbcSupport unixODBC
37+ ++ optional snmpSupport net_snmp
38+ ++ optional sqliteSupport sqlite
39+ ++ optional sshSupport libssh2
40+ ++ optional mysqlSupport mysql.connector-c
41+ ++ optional postgresqlSupport postgresql;
42+
43+ configureFlags = [
44+ "--enable-proxy"
45+ "--with-iconv"
46+ "--with-libevent"
47+ "--with-libpcre"
48+ "--with-openssl=${openssl.dev}"
49+ "--with-zlib=${zlib}"
50+ ]
51+ ++ optional odbcSupport "--with-unixodbc"
52+ ++ optional snmpSupport "--with-net-snmp"
53+ ++ optional sqliteSupport "--with-sqlite3=${sqlite.dev}"
54+ ++ optional sshSupport "--with-ssh2=${libssh2.dev}"
55+ ++ optional mysqlSupport "--with-mysql"
56+ ++ optional postgresqlSupport "--with-postgresql";
57+
58+ prePatch = ''
59+ find database -name data.sql -exec sed -i 's|/usr/bin/||g' {} +
60+ '';
61+
62+ postInstall = ''
63+ mkdir -p $out/share/zabbix/database/
64+ '' + optionalString sqliteSupport ''
65+ mkdir -p $out/share/zabbix/database/sqlite3
66+ cp -prvd database/sqlite3/*.sql $out/share/zabbix/database/sqlite3/
67+ '' + optionalString postgresqlSupport ''
68+ mkdir -p $out/share/zabbix/database/postgresql
69+ cp -prvd database/postgresql/schema.sql $out/share/zabbix/database/postgresql/
70+ '';
71+
72+ meta = with stdenv.lib; {
73+ description = "An enterprise-class open source distributed monitoring solution (client-server proxy)";
74+ homepage = "https://www.zabbix.com/";
75+ license = licenses.gpl2;
76+ maintainers = [ maintainers.mmahut ];
77+ platforms = platforms.linux;
78+ };
79+ })
pkgs/servers/monitoring/zabbix/server.nixnew file+86
@@ -0,0 +1,86 @@
1+{ stdenv, fetchurl, pkgconfig, curl, libevent, libiconv, libxml2, openssl, pcre, zlib
2+, jabberSupport ? true, iksemel
3+, ldapSupport ? true, openldap
4+, odbcSupport ? true, unixODBC
5+, snmpSupport ? true, net_snmp
6+, sshSupport ? true, libssh2
7+, mysqlSupport ? false, mysql
8+, postgresqlSupport ? false, postgresql
9+}:
10+
11+# ensure exactly one primary database type is selected
12+assert mysqlSupport -> !postgresqlSupport;
13+assert postgresqlSupport -> !mysqlSupport;
14+
15+let
16+ inherit (stdenv.lib) optional optionalString;
17+in
18+ import ./versions.nix ({ version, sha256 }:
19+ stdenv.mkDerivation {
20+ pname = "zabbix-server";
21+ inherit version;
22+
23+ src = fetchurl {
24+ url = "mirror://sourceforge/zabbix/ZABBIX%20Latest%20Stable/${version}/zabbix-${version}.tar.gz";
25+ inherit sha256;
26+ };
27+
28+ nativeBuildInputs = [ pkgconfig ];
29+ buildInputs = [
30+ curl
31+ libevent
32+ libiconv
33+ libxml2
34+ openssl
35+ pcre
36+ zlib
37+ ]
38+ ++ optional odbcSupport unixODBC
39+ ++ optional jabberSupport iksemel
40+ ++ optional ldapSupport openldap
41+ ++ optional snmpSupport net_snmp
42+ ++ optional sshSupport libssh2
43+ ++ optional mysqlSupport mysql.connector-c
44+ ++ optional postgresqlSupport postgresql;
45+
46+ configureFlags = [
47+ "--enable-server"
48+ "--with-iconv"
49+ "--with-libcurl"
50+ "--with-libevent"
51+ "--with-libpcre"
52+ "--with-libxml2"
53+ "--with-openssl=${openssl.dev}"
54+ "--with-zlib=${zlib}"
55+ ]
56+ ++ optional odbcSupport "--with-unixodbc"
57+ ++ optional jabberSupport "--with-jabber"
58+ ++ optional ldapSupport "--with-ldap=${openldap.dev}"
59+ ++ optional snmpSupport "--with-net-snmp"
60+ ++ optional sshSupport "--with-ssh2=${libssh2.dev}"
61+ ++ optional mysqlSupport "--with-mysql"
62+ ++ optional postgresqlSupport "--with-postgresql";
63+
64+ prePatch = ''
65+ find database -name data.sql -exec sed -i 's|/usr/bin/||g' {} +
66+ '';
67+
68+ postInstall = ''
69+ mkdir -p $out/share/zabbix/database/
70+ cp -r include $out/
71+ '' + optionalString mysqlSupport ''
72+ mkdir -p $out/share/zabbix/database/mysql
73+ cp -prvd database/mysql/*.sql $out/share/zabbix/database/mysql/
74+ '' + optionalString postgresqlSupport ''
75+ mkdir -p $out/share/zabbix/database/postgresql
76+ cp -prvd database/postgresql/*.sql $out/share/zabbix/database/postgresql/
77+ '';
78+
79+ meta = with stdenv.lib; {
80+ description = "An enterprise-class open source distributed monitoring solution";
81+ homepage = "https://www.zabbix.com/";
82+ license = licenses.gpl2;
83+ maintainers = with maintainers; [ mmahut psyanticy ];
84+ platforms = platforms.linux;
85+ };
86+ })
pkgs/servers/monitoring/zabbix/versions.nixnew file+16
@@ -0,0 +1,16 @@
1+generic: {
2+ v42 = generic {
3+ version = "4.2.3";
4+ sha256 = "0865c1a9vcgg4syhp5133rw9v1h65lp0g1y2f758jb9x9ybrr01s";
5+ };
6+
7+ v40 = generic {
8+ version = "4.0.9";
9+ sha256 = "1lc4wx3cing5w2qa18yb6232qd70hrfjq7jmnx4ip3nawnswj2xa";
10+ };
11+
12+ v30 = generic {
13+ version = "3.0.28";
14+ sha256 = "16966danf5ww4lhjg5gx5bnpid8abxh2ymdg6k5mymrman5bcdjj";
15+ };
16+}
pkgs/servers/monitoring/zabbix/web.nixnew file+32
@@ -0,0 +1,32 @@
1+{ stdenv, fetchurl, writeText }:
2+
3+import ./versions.nix ({ version, sha256 }:
4+ stdenv.mkDerivation rec {
5+ pname = "zabbix-web";
6+ inherit version;
7+
8+ src = fetchurl {
9+ url = "mirror://sourceforge/zabbix/ZABBIX%20Latest%20Stable/${version}/zabbix-${version}.tar.gz";
10+ inherit sha256;
11+ };
12+
13+ phpConfig = writeText "zabbix.conf.php" ''
14+ <?php
15+ return require(getenv('ZABBIX_CONFIG'));
16+ ?>
17+ '';
18+
19+ installPhase = ''
20+ mkdir -p $out/share/zabbix/
21+ cp -a frontends/php/. $out/share/zabbix/
22+ cp ${phpConfig} $out/share/zabbix/conf/zabbix.conf.php
23+ '';
24+
25+ meta = with stdenv.lib; {
26+ description = "An enterprise-class open source distributed monitoring solution (web frontend)";
27+ homepage = "https://www.zabbix.com/";
28+ license = licenses.gpl2;
29+ maintainers = [ maintainers.mmahut ];
30+ platforms = platforms.linux;
31+ };
32+ })
pkgs/servers/routinator/default.nixnew file+23
@@ -0,0 +1,23 @@
1+{ stdenv, fetchFromGitHub, rustPlatform }:
2+
3+rustPlatform.buildRustPackage rec {
4+ pname = "routinator";
5+ version = "0.4.0";
6+
7+ src = fetchFromGitHub {
8+ owner = "NLnetLabs";
9+ repo = pname;
10+ rev = "v${version}";
11+ sha256 = "0ldnak1jszfkwya0aci7ns3293y45jp7iirilnqypklsmmm108r4";
12+ };
13+
14+ cargoSha256 = "0yx5sanblalh5q06cn0mrf5bc5518y1awmvyi5yhh55cz6bg6h1m";
15+
16+ meta = with stdenv.lib; {
17+ description = "An RPKI Validator written in Rust";
18+ homepage = "https://github.com/NLnetLabs/routinator";
19+ license = licenses.bsd3;
20+ maintainers = [ maintainers."0x4A6F" ];
21+ platforms = platforms.linux;
22+ };
23+}
pkgs/tools/admin/clair/default.nix+5−5
@@ -2,15 +2,15 @@
22
33buildGoPackage rec {
44 pname = "clair";
5− version = "2.0.7";
5+ version = "2.0.8";
66
77 goPackagePath = "github.com/coreos/clair";
88
99 src = fetchFromGitHub {
1010 owner = "coreos";
11− repo = "clair";
11+ repo = pname;
1212 rev = "v${version}";
13− sha256 = "0n4pxdw71hd1rxzgf422fvycpjkrxxnvcidys0hpjy7gs88zjz5x";
13+ sha256 = "1gwn533fdz8daz1db7w7g7mhls7d5a4vndn47blkpbx2yxdwdh62";
1414 };
1515
1616 nativeBuildInputs = [ makeWrapper ];
@@ -22,8 +22,8 @@ buildGoPackage rec {
2222
2323 meta = with lib; {
2424 description = "Vulnerability Static Analysis for Containers";
25− homepage = https://github.com/coreos/clair;
25+ homepage = "https://github.com/coreos/clair";
2626 license = licenses.asl20;
27− maintainers = [ maintainers.marsam ];
27+ maintainers = with maintainers; [ marsam ];
2828 };
2929}
pkgs/tools/archivers/zpaq/default.nix+8−9
@@ -1,17 +1,16 @@
1−{ stdenv, fetchurl, perl, unzip }:
1+{ stdenv, fetchFromGitHub, perl, unzip }:
2+
23stdenv.mkDerivation rec {
34 name = "zpaq-${version}";
4− version = "715";
5+ version = "7.15";
56
6− src = let
7− mungedVersion = with stdenv.lib; concatStrings (splitString "." version);
8− in fetchurl {
9− sha256 = "066l94yyladlfzri877nh2dhkvspagjn3m5bmv725fmhkr9c4pp8";
10− url = "http://mattmahoney.net/dc/zpaq${mungedVersion}.zip";
7+ src = fetchFromGitHub {
8+ owner = "zpaq";
9+ repo = "zpaq";
10+ rev = version;
11+ sha256 = "0v44rlg9gvwc4ggr2lhcqll8ppal3dk7zsg5bqwcc5lg3ynk2pz4";
1112 };
1213
13− sourceRoot = ".";
14−
1514 nativeBuildInputs = [ perl /* for pod2man */ ];
1615 buildInputs = [ unzip ];
1716
pkgs/tools/filesystems/bcachefs-tools/default.nix+3−3
@@ -3,12 +3,12 @@
33
44stdenv.mkDerivation rec {
55 pname = "bcachefs-tools";
6− version = "2019-05-29";
6+ version = "2019-07-11";
77
88 src = fetchgit {
99 url = "https://evilpiepirate.org/git/bcachefs-tools.git";
10− rev = "34b93747051055c1076add36f4730c7715e27f07";
11− sha256 = "1z6ih0mssa9y9yr3v0dzrflliqz8qfdkjb29p9nqbpg8iqi45fa8";
10+ rev = "33c91e2ff4e228cb618ca22d642a34ec1c2cf0ef";
11+ sha256 = "0glldbnda61xwf7309mk48qmxqnipjmcgsibab77nr6v3bg13ip1";
1212 };
1313
1414 enableParallelBuilding = true;
pkgs/tools/misc/debootstrap/default.nix+8−8
@@ -14,14 +14,14 @@ let binPath = stdenv.lib.makeBinPath [
1414 wget
1515 ];
1616in stdenv.mkDerivation rec {
17− name = "debootstrap-${version}";
18− version = "1.0.114";
17+ pname = "debootstrap";
18+ version = "1.0.115";
1919
2020 src = fetchurl {
2121 # git clone git://git.debian.org/d-i/debootstrap.git
2222 # I'd like to use the source. However it's lacking the lanny script ? (still true?)
23− url = "mirror://debian/pool/main/d/debootstrap/debootstrap_${version}.tar.gz";
24− sha256 = "14lw18bhxap1g15q0rhslacj1bcrl69wrqcx6azmbvd92rl4bqd8";
23+ url = "mirror://debian/pool/main/d/${pname}/${pname}_${version}.tar.gz";
24+ sha256 = "1s6ln7r6y91f0xmzbf9x4yx53hzcpiaa76i9dbmpy0ibw1ji30g4";
2525 };
2626
2727 nativeBuildInputs = [ makeWrapper ];
@@ -57,11 +57,11 @@ in stdenv.mkDerivation rec {
5757 runHook postInstall
5858 '';
5959
60− meta = {
60+ meta = with stdenv.lib; {
6161 description = "Tool to create a Debian system in a chroot";
6262 homepage = https://wiki.debian.org/Debootstrap;
63− license = stdenv.lib.licenses.mit;
64− maintainers = [ stdenv.lib.maintainers.marcweber ];
65− platforms = stdenv.lib.platforms.linux;
63+ license = licenses.mit;
64+ maintainers = with maintainers; [ marcweber ];
65+ platforms = platforms.linux;
6666 };
6767}
pkgs/tools/misc/lesspipe/default.nix+3−3
@@ -1,8 +1,8 @@
11{ stdenv, fetchFromGitHub, substituteAll, perl, file, ncurses }:
22
33stdenv.mkDerivation rec {
4− name = "lesspipe-${version}";
5− version = "1.82";
4+ pname = "lesspipe";
5+ version = "1.83";
66
77 buildInputs = [ perl ];
88 preConfigure = "patchShebangs .";
@@ -11,7 +11,7 @@ stdenv.mkDerivation rec {
1111 owner = "wofr06";
1212 repo = "lesspipe";
1313 rev = version;
14− sha256 = "0vb7bpap8vy003ha10hc7hxl17y47sgdnrjpihgqxkn8k0bfqbbq";
14+ sha256 = "1vqch6k4fz5pyf8szlnqm3qhlvgs9l4njd13yczjh4kpaxpn0rxb";
1515 };
1616
1717 patches = [
pkgs/tools/misc/most/default.nix+15−8
@@ -1,13 +1,20 @@
11{ stdenv, fetchurl, slang, ncurses }:
22
3−stdenv.mkDerivation {
4− name = "most-5.0.0a";
3+stdenv.mkDerivation rec {
4+ pname = "most";
5+ version = "5.1.0";
56
67 src = fetchurl {
7− url = ftp://space.mit.edu/pub/davis/most/most-5.0.0a.tar.bz2;
8− sha256 = "1aas904g8x48vsfh3wcr2k6mjzkm5808lfgl2qqhdfdnf4p5mjwl";
8+ url = "https://www.jedsoft.org/releases/${pname}/${pname}-${version}.tar.gz";
9+ sha256 = "008537ns659pw2aag15imwjrxj73j26aqq90h285is6kz8gmv06v";
910 };
1011
12+ outputs = [ "out" "doc" ];
13+
14+ makeFlags = [
15+ "DOC_DIR=${placeholder ''doc''}/share/doc/most"
16+ ];
17+
1118 preConfigure = ''
1219 sed -i -e "s|-ltermcap|-lncurses|" configure
1320 sed -i autoconf/Makefile.in src/Makefile.in \
@@ -19,15 +26,15 @@ stdenv.mkDerivation {
1926
2027 buildInputs = [ slang ncurses ];
2128
22− meta = {
29+ meta = with stdenv.lib; {
2330 description = "A terminal pager similar to 'more' and 'less'";
2431 longDescription = ''
2532 MOST is a powerful paging program for Unix, VMS, MSDOS, and win32
2633 systems. Unlike other well-known paging programs most supports multiple
2734 windows and can scroll left and right. Why settle for less?
2835 '';
29− homepage = http://www.jedsoft.org/most/index.html;
30− license = stdenv.lib.licenses.gpl2;
31− platforms = stdenv.lib.platforms.unix;
36+ homepage = "https://www.jedsoft.org/most/index.html";
37+ license = licenses.gpl2;
38+ platforms = platforms.unix;
3239 };
3340}
pkgs/tools/misc/oppai-ng/default.nixnew file+34
@@ -0,0 +1,34 @@
1+{ stdenv
2+, fetchFromGitHub
3+}:
4+
5+stdenv.mkDerivation rec {
6+ pname = "oppai-ng";
7+ version = "3.2.3";
8+
9+ src = fetchFromGitHub {
10+ owner = "Francesco149";
11+ repo = pname;
12+ rev = version;
13+ sha256 = "1wrnpnx1yl0pdzmla4knlpcwy7baamy2wpdypnbdqxrn0zkw7kzk";
14+ };
15+
16+ buildPhase = ''
17+ ./build
18+ ./libbuild
19+ '';
20+
21+ installPhase = ''
22+ install -D oppai $out/bin/oppai
23+ install -D oppai.c $out/include/oppai.c
24+ install -D liboppai.so $out/lib/liboppai.so
25+ '';
26+
27+ meta = with stdenv.lib; {
28+ description = "Difficulty and pp calculator for osu!";
29+ homepage = "https://github.com/Francesco149/oppai-ng";
30+ license = licenses.unlicense;
31+ maintainers = with maintainers; [ tadeokondrak ];
32+ platforms = platforms.all;
33+ };
34+}
pkgs/tools/misc/youtube-dl/default.nix+2−2
@@ -18,11 +18,11 @@ buildPythonPackage rec {
1818 # The websites youtube-dl deals with are a very moving target. That means that
1919 # downloads break constantly. Because of that, updates should always be backported
2020 # to the latest stable release.
21− version = "2019.07.02";
21+ version = "2019.07.12";
2222
2323 src = fetchurl {
2424 url = "https://yt-dl.org/downloads/${version}/${pname}-${version}.tar.gz";
25− sha256 = "1ci09m2fg23vk92sk3wkg0b2jkph8d06spyn2s3fgr1rwzwazgir";
25+ sha256 = "1mf8nh972hjpxj01q37jghj32rv21y91fpbwwsqmbmh65dr4k1dn";
2626 };
2727
2828 nativeBuildInputs = [ makeWrapper ];
pkgs/tools/networking/axel/default.nix+10−7
@@ -1,15 +1,18 @@
1−{ stdenv, fetchurl, autoreconfHook, pkgconfig, gettext, libssl }:
1+{ stdenv, fetchFromGitHub, autoreconfHook, autoconf-archive
2+, pkgconfig, gettext, libssl }:
23
34stdenv.mkDerivation rec {
4− name = "axel-${version}";
5− version = "2.17.1";
5+ pname = "axel";
6+ version = "2.17.3";
67
7− src = fetchurl {
8− url = "https://github.com/axel-download-accelerator/axel/releases/download/v${version}/${name}.tar.xz";
9− sha256 = "1mwyps6yvrjxp7mpzc0a2hwr2pw050c63fc9aqjzdzjjw123dfrn";
8+ src = fetchFromGitHub {
9+ owner = "axel-download-accelerator";
10+ repo = pname;
11+ rev = "v${version}";
12+ sha256 = "0kdd2y92plv240ba2j3xrm0f8xygvm1ijghnric4whsnxvmgym7h";
1013 };
1114
12− nativeBuildInputs = [ autoreconfHook pkgconfig ];
15+ nativeBuildInputs = [ autoreconfHook pkgconfig autoconf-archive ];
1316
1417 buildInputs = [ gettext libssl ];
1518
pkgs/tools/networking/grpcui/default.nixnew file+23
@@ -0,0 +1,23 @@
1+{ buildGoModule, fetchFromGitHub, lib }:
2+
3+buildGoModule rec {
4+ pname = "grpcui";
5+ version = "0.2.0";
6+
7+ src = fetchFromGitHub {
8+ owner = "fullstorydev";
9+ repo = pname;
10+ rev = "v${version}";
11+ sha256 = "0h4xpyd6phj3svjzxh6nd98ym81x4a2v6jxcnqj4psjinwd4p3md";
12+ };
13+
14+ modSha256 = "1hsq2gfhscl4wvld346xrp018sb1g3xvga3d8chlbgw93rmhhszb";
15+
16+ meta = with lib; {
17+ description = "An interactive web UI for gRPC, along the lines of postman";
18+ homepage = "https://github.com/fullstorydev/grpcui";
19+ license = licenses.mit;
20+ maintainers = with maintainers; [ pradyuman ];
21+ platforms = platforms.linux ++ platforms.darwin;
22+ };
23+}
pkgs/tools/networking/i2p/default.nix+2−2
@@ -27,10 +27,10 @@ let wrapper = stdenv.mkDerivation rec {
2727in
2828
2929stdenv.mkDerivation rec {
30− name = "i2p-0.9.39";
30+ name = "i2p-0.9.41";
3131 src = fetchurl {
3232 url = "https://github.com/i2p/i2p.i2p/archive/${name}.tar.gz";
33− sha256 = "0d6g0ffv2b0ghjjp3ndal8n9maw5y0n36vqrylhh5zr1hffvxx9i";
33+ sha256 = "0adrj56i3pcc9ainj22akjrrvy73carz5jk29qa1h2b9q03di73b";
3434 };
3535 buildInputs = [ jdk ant gettext which ];
3636 patches = [ ./i2p.patch ];
pkgs/tools/package-management/xbps/default.nix+5−5
@@ -1,19 +1,19 @@
1−{ stdenv, fetchFromGitHub, pkgconfig, which, zlib, openssl, libarchive }:
1+{ stdenv, fetchFromGitHub, pkgconfig, which, zlib, openssl_1_1, libarchive }:
22
33stdenv.mkDerivation rec {
4− name = "xbps-${version}";
5− version = "0.53";
4+ pname = "xbps";
5+ version = "0.56";
66
77 src = fetchFromGitHub {
88 owner = "void-linux";
99 repo = "xbps";
1010 rev = version;
11− sha256 = "1zicin2z5j7vg2ixzpd6nahjhrjwdcavm817wzgs9x013b596paa";
11+ sha256 = "0hqvq6fq62l5sgm4fy3zb0ks889d21mqz4f4my3iifs6c9f50na2";
1212 };
1313
1414 nativeBuildInputs = [ pkgconfig which ];
1515
16− buildInputs = [ zlib openssl libarchive ];
16+ buildInputs = [ zlib openssl_1_1 libarchive ];
1717
1818 patches = [ ./cert-paths.patch ];
1919
pkgs/tools/security/gnupg/22.nix+2−2
@@ -16,11 +16,11 @@ assert guiSupport -> pinentry != null;
1616stdenv.mkDerivation rec {
1717 name = "gnupg-${version}";
1818
19− version = "2.2.16";
19+ version = "2.2.17";
2020
2121 src = fetchurl {
2222 url = "mirror://gnupg/gnupg/${name}.tar.bz2";
23− sha256 = "1jqlzp9b3kpfp1dkjqskm67jjrhvf9nh3lzf45321p7m9d2qvgkc";
23+ sha256 = "056mgy09lvsi03531a437qj58la1j2x1y1scvfi53diris3658mg";
2424 };
2525
2626 depsBuildBuild = [ buildPackages.stdenv.cc ];
pkgs/tools/security/saml2aws/default.nix+3−2
@@ -2,7 +2,8 @@
22
33buildGoPackage rec {
44 name = "saml2aws-${version}";
5− version = "2.10.0";
5+ pname = "saml2aws";
6+ version = "2.15.0";
67
78 goPackagePath = "github.com/versent/saml2aws";
89 goDeps = ./deps.nix;
@@ -15,7 +16,7 @@ buildGoPackage rec {
1516 rev = "v${version}";
1617 owner = "Versent";
1718 repo = "saml2aws";
18− sha256 = "00m8x57fgry601w5f9dxnxdqbbqjiv7c0rsx47iv9qsp0w7l50c5";
19+ sha256 = "0pn4zdzisgan7vvgi7hp8716wsb2x33gq55c7fw1aa2qwy0bq3gp";
1920 };
2021
2122 meta = with stdenv.lib; {
pkgs/tools/security/saml2aws/deps.nix+81
@@ -1,5 +1,14 @@
11# file generated from Gopkg.lock using dep2nix (https://github.com/nixcloud/dep2nix)
22[
3+ {
4+ goPackagePath = "github.com/99designs/keyring";
5+ fetch = {
6+ type = "git";
7+ url = "https://github.com/99designs/keyring";
8+ rev = "82da6802f65f1ac7963cfc3b7c62ae12dab8ee5d";
9+ sha256 = "105ddy9vkjr6cmcm85qnxxlnsmkx2svm6bd80rzr9n6zyc5hhk7b";
10+ };
11+ }
312 {
413 goPackagePath = "github.com/AlecAivazis/survey";
514 fetch = {
@@ -63,6 +72,15 @@
6372 sha256 = "09j8cavbhqqdxjqrkwbc40g8p0i49zf3184rpjm5p2rjbprcghcc";
6473 };
6574 }
75+ {
76+ goPackagePath = "github.com/aulanov/go.dbus";
77+ fetch = {
78+ type = "git";
79+ url = "https://github.com/aulanov/go.dbus";
80+ rev = "25c3068a42a0b50b877953fb249dbcffc6bd1bca";
81+ sha256 = "0jh4jyxqhsl1rkzabhln7chw1jkzhqw2nn0mw79cmn8fyafi0rgn";
82+ };
83+ }
6684 {
6785 goPackagePath = "github.com/aws/aws-sdk-go";
6886 fetch = {
@@ -108,6 +126,15 @@
108126 sha256 = "0d4jfmak5p6lb7n2r6yvf5p1zcw0l8j74kn55ghvr7zr7b7axm6c";
109127 };
110128 }
129+ {
130+ goPackagePath = "github.com/dvsekhvalnov/jose2go";
131+ fetch = {
132+ type = "git";
133+ url = "https://github.com/dvsekhvalnov/jose2go";
134+ rev = "f21a8cedbbae609f623613ec8f81125c243212e6";
135+ sha256 = "1nzwvk6nqi7nm2wq4mr2q6k5p0qzsl0kmwx7kgkqsg1zh53250ld";
136+ };
137+ }
111138 {
112139 goPackagePath = "github.com/fatih/color";
113140 fetch = {
@@ -126,6 +153,33 @@
126153 sha256 = "0fx123601aiqqn0yr9vj6qp1bh8gp240w4qdm76irs73q8dxlk7a";
127154 };
128155 }
156+ {
157+ goPackagePath = "github.com/godbus/dbus";
158+ fetch = {
159+ type = "git";
160+ url = "https://github.com/godbus/dbus";
161+ rev = "2ff6f7ffd60f0f2410b3105864bdd12c7894f844";
162+ sha256 = "1c107893nbdfc297i9y0smljmqs167mw26i24509qd09dmvr998y";
163+ };
164+ }
165+ {
166+ goPackagePath = "github.com/gsterjov/go-libsecret";
167+ fetch = {
168+ type = "git";
169+ url = "https://github.com/gsterjov/go-libsecret";
170+ rev = "a6f4afe4910cad8688db3e0e9b9ac92ad22d54e1";
171+ sha256 = "09zaiadnll83vs22ib89agg7anj0blw5fywvmckxllsgif6ak6v7";
172+ };
173+ }
174+ {
175+ goPackagePath = "github.com/headzoo/surf";
176+ fetch = {
177+ type = "git";
178+ url = "https://github.com/headzoo/surf";
179+ rev = "a4a8c16c01dc47ef3a25326d21745806f3e6797a";
180+ sha256 = "1dzcp0wdh3qmm5s5hixk9vj2s2kcvkpbhjdwz7kh2crvnavdgwh6";
181+ };
182+ }
129183 {
130184 goPackagePath = "github.com/jmespath/go-jmespath";
131185 fetch = {
@@ -135,6 +189,15 @@
135189 sha256 = "1vv6hph8j6xgv7gwl9vvhlsaaqsm22sxxqmgmldi4v11783pc1ld";
136190 };
137191 }
192+ {
193+ goPackagePath = "github.com/keybase/go-keychain";
194+ fetch = {
195+ type = "git";
196+ url = "https://github.com/keybase/go-keychain";
197+ rev = "f1daa725cce4049b1715f1e97d6a51880e401e70";
198+ sha256 = "0wk2zc5f5i5mhdkbyzd60wzc64vybds6kxlmwc41k8mx6d1hxdm6";
199+ };
200+ }
138201 {
139202 goPackagePath = "github.com/mattn/go-colorable";
140203 fetch = {
@@ -189,6 +252,15 @@
189252 sha256 = "0c1cn55m4rypmscgf0rrb88pn58j3ysvc2d0432dp3c6fqg6cnzw";
190253 };
191254 }
255+ {
256+ goPackagePath = "github.com/robertkrimen/otto";
257+ fetch = {
258+ type = "git";
259+ url = "https://github.com/robertkrimen/otto";
260+ rev = "15f95af6e78dcd2030d8195a138bd88d4f403546";
261+ sha256 = "07j7l340lmqwpfscwyb8llk3k37flvs20a4a8vzc85f16xyd9npf";
262+ };
263+ }
192264 {
193265 goPackagePath = "github.com/sirupsen/logrus";
194266 fetch = {
@@ -288,4 +360,13 @@
288360 sha256 = "0fx123601aiqqn0yr9vj6qp1bh8gp240w4qdm76irs73q8dxlk7a";
289361 };
290362 }
363+ {
364+ goPackagePath = "gopkg.in/sourcemap.v1";
365+ fetch = {
366+ type = "git";
367+ url = "https://github.com/go-sourcemap/sourcemap";
368+ rev = "6e83acea0053641eff084973fee085f0c193c61a";
369+ sha256 = "08rf2dl13hbnm3fq2cm0nnsspy9fhf922ln23cz5463cv7h62as4";
370+ };
371+ }
291372]
pkgs/tools/system/acpica-tools/default.nix+3−3
@@ -1,12 +1,12 @@
11{ stdenv, fetchurl, bison, flex }:
22
33stdenv.mkDerivation rec {
4− name = "acpica-tools-${version}";
5− version = "20190509";
4+ pname = "acpica-tools";
5+ version = "20190703";
66
77 src = fetchurl {
88 url = "https://acpica.org/sites/acpica/files/acpica-unix-${version}.tar.gz";
9− sha256 = "06k22kfnjzf3mpvrb7xl2pfnh28q3n8wcgdjchl1j2hik5pan97i";
9+ sha256 = "031m124a109vv6fx667h4ca2iav0xszrlvif9zcfxcaxbjsn6991";
1010 };
1111
1212 NIX_CFLAGS_COMPILE = "-O3";
pkgs/top-level/all-packages.nix+40−14
@@ -1430,6 +1430,8 @@ in
14301430
14311431 dislocker = callPackage ../tools/filesystems/dislocker { };
14321432
1433+ distgen = callPackage ../development/tools/distgen {};
1434+
14331435 distrobuilder = callPackage ../tools/virtualization/distrobuilder { };
14341436
14351437 ditaa = callPackage ../tools/graphics/ditaa { };
@@ -1844,6 +1846,8 @@ in
18441846
18451847 roundcubePlugins = dontRecurseIntoAttrs (callPackage ../servers/roundcube/plugins { });
18461848
1849+ routinator = callPackage ../servers/routinator { };
1850+
18471851 rsbep = callPackage ../tools/backup/rsbep { };
18481852
18491853 rsyslog = callPackage ../tools/system/rsyslog {
@@ -3439,6 +3443,8 @@ in
34393443
34403444 grpcurl = callPackage ../tools/networking/grpcurl { };
34413445
3446+ grpcui = callPackage ../tools/networking/grpcui { };
3447+
34423448 grub = pkgsi686Linux.callPackage ../tools/misc/grub ({
34433449 stdenv = overrideCC stdenv buildPackages.pkgsi686Linux.gcc6;
34443450 } // (config.grub or {}));
@@ -5076,6 +5082,8 @@ in
50765082 stdenv = clangStdenv;
50775083 };
50785084
5085+ oppai-ng = callPackage ../tools/misc/oppai-ng { };
5086+
50795087 update-resolv-conf = callPackage ../tools/networking/openvpn/update-resolv-conf.nix { };
50805088
50815089 opae = callPackage ../development/libraries/opae { };
@@ -10258,6 +10266,10 @@ in
1025810266
1025910267 directfb = callPackage ../development/libraries/directfb { };
1026010268
10269+ discord-rpc = callPackage ../development/libraries/discord-rpc {
10270+ inherit (darwin.apple_sdk.frameworks) AppKit;
10271+ };
10272+
1026110273 dlib = callPackage ../development/libraries/dlib { };
1026210274
1026310275 docopt_cpp = callPackage ../development/libraries/docopt_cpp { };
@@ -12963,6 +12975,8 @@ in
1296312975
1296412976 qtkeychain = callPackage ../development/libraries/qtkeychain { };
1296512977
12978+ qtpbfimageplugin = libsForQt5.callPackage ../development/libraries/qtpbfimageplugin { };
12979+
1296612980 qtscriptgenerator = callPackage ../development/libraries/qtscriptgenerator { };
1296712981
1296812982 quesoglc = callPackage ../development/libraries/quesoglc { };
@@ -13092,6 +13106,8 @@ in
1309213106
1309313107 SDL_gfx = callPackage ../development/libraries/SDL_gfx { };
1309413108
13109+ SDL_gpu = callPackage ../development/libraries/SDL_gpu { };
13110+
1309513111 SDL_image = callPackage ../development/libraries/SDL_image { };
1309613112
1309713113 SDL_mixer = callPackage ../development/libraries/SDL_mixer { };
@@ -14252,8 +14268,6 @@ in
1425214268 firebird = callPackage ../servers/firebird { icu = null; stdenv = gcc5Stdenv; };
1425314269 firebirdSuper = firebird.override { icu = icu58; superServer = true; stdenv = gcc5Stdenv; };
1425414270
14255− foswiki = callPackage ../servers/foswiki { };
14256−
1425714271 frab = callPackage ../servers/web-apps/frab { };
1425814272
1425914273 freepops = callPackage ../servers/mail/freepops { };
@@ -14922,11 +14936,24 @@ in
1492214936
1492314937 youtrack = callPackage ../servers/jetbrains/youtrack.nix { };
1492414938
14925− zabbix = recurseIntoAttrs (callPackages ../servers/monitoring/zabbix {});
14939+ zabbixFor = version: rec {
14940+ agent = (callPackages ../servers/monitoring/zabbix/agent.nix {}).${version};
14941+ proxy-mysql = (callPackages ../servers/monitoring/zabbix/proxy.nix { mysqlSupport = true; }).${version};
14942+ proxy-pgsql = (callPackages ../servers/monitoring/zabbix/proxy.nix { postgresqlSupport = true; }).${version};
14943+ proxy-sqlite = (callPackages ../servers/monitoring/zabbix/proxy.nix { sqliteSupport = true; }).${version};
14944+ server-mysql = (callPackages ../servers/monitoring/zabbix/server.nix { mysqlSupport = true; }).${version};
14945+ server-pgsql = (callPackages ../servers/monitoring/zabbix/server.nix { postgresqlSupport = true; }).${version};
14946+ web = (callPackages ../servers/monitoring/zabbix/web.nix {}).${version};
14947+
14948+ # backwards compatibility
14949+ server = server-pgsql;
14950+ };
14951+
14952+ zabbix42 = zabbixFor "v42";
14953+ zabbix40 = zabbixFor "v40";
14954+ zabbix30 = zabbixFor "v30";
1492614955
14927− zabbix20 = callPackage ../servers/monitoring/zabbix/2.0.nix { };
14928− zabbix22 = callPackage ../servers/monitoring/zabbix/2.2.nix { };
14929− zabbix34 = callPackage ../servers/monitoring/zabbix/3.4.nix { };
14956+ zabbix = zabbix42;
1493014957
1493114958 zipkin = callPackage ../servers/monitoring/zipkin { };
1493214959
@@ -17154,7 +17181,9 @@ in
1715417181 inherit (darwin.apple_sdk.frameworks) Carbon;
1715517182 };
1715617183
17157− cdrtools = callPackage ../applications/misc/cdrtools { };
17184+ cdrtools = callPackage ../applications/misc/cdrtools {
17185+ inherit (darwin.apple_sdk.frameworks) Carbon IOKit;
17186+ };
1715817187
1715917188 centerim = callPackage ../applications/networking/instant-messengers/centerim { };
1716017189
@@ -18469,7 +18498,9 @@ in
1846918498
1847018499 i3lock-pixeled = callPackage ../misc/screensavers/i3lock-pixeled { };
1847118500
18472− betterlockscreen = callPackage ../misc/screensavers/betterlockscreen { };
18501+ betterlockscreen = callPackage ../misc/screensavers/betterlockscreen {
18502+ inherit (xorg) xrdb;
18503+ };
1847318504
1847418505 i3minator = callPackage ../tools/misc/i3minator { };
1847518506
@@ -21679,12 +21710,7 @@ in
2167921710
2168021711 minecraft = callPackage ../games/minecraft { };
2168121712
21682− minecraft-server = minecraft-server_1_14;
21683−
21684− inherit (callPackages ../games/minecraft-server { })
21685− minecraft-server_1_14
21686− minecraft-server_1_13_2
21687− minecraft-server_1_12_2;
21713+ minecraft-server = callPackage ../games/minecraft-server { };
2168821714
2168921715 moon-buggy = callPackage ../games/moon-buggy {};
2169021716
pkgs/top-level/make-tarball.nix+2−15
@@ -6,6 +6,7 @@
66, officialRelease
77, pkgs ? import nixpkgs.outPath {}
88, nix ? pkgs.nix
9+, lib-tests ? import ../../lib/tests/release.nix { inherit pkgs; }
910}:
1011
1112with pkgs;
@@ -18,7 +19,7 @@ releaseTools.sourceTarball rec {
1819 version = pkgs.lib.fileContents ../../.version;
1920 versionSuffix = "pre${toString nixpkgs.revCount}.${nixpkgs.shortRev}";
2021
21− buildInputs = [ nix.out jq ];
22+ buildInputs = [ nix.out jq lib-tests ];
2223
2324 configurePhase = ''
2425 eval "$preConfigure"
@@ -60,20 +61,6 @@ releaseTools.sourceTarball rec {
6061 exit 1
6162 fi
6263
63− # Run the regression tests in `lib'.
64− if
65− # `set -e` doesn't work inside here, so need to && instead :(
66− res="$(nix-instantiate --eval --strict lib/tests/misc.nix --show-trace)" \
67− && [[ "$res" == "[ ]" ]] \
68− && res="$(nix-instantiate --eval --strict lib/tests/systems.nix --show-trace)" \
69− && [[ "$res" == "[ ]" ]]
70− then
71− true
72− else
73− echo "regression tests for lib failed, got: $res"
74− exit 1
75− fi
76−
7764 # Check that all-packages.nix evaluates on a number of platforms without any warnings.
7865 for platform in i686-linux x86_64-linux x86_64-darwin; do
7966 header "checking Nixpkgs on $platform"
pkgs/top-level/php-packages.nix+2−2
@@ -372,12 +372,12 @@ let
372372 };
373373
374374 phpstan = mkDerivation rec {
375− version = "0.11.8";
375+ version = "0.11.12";
376376 pname = "phpstan";
377377
378378 src = pkgs.fetchurl {
379379 url = "https://github.com/phpstan/phpstan/releases/download/${version}/phpstan.phar";
380− sha256 = "0xdf0kq5jpbqs6dwyv2fggd3cxjjq16xk5nxz1hgh5d58x5yh14n";
380+ sha256 = "12k74108f7a3k7ms8n4c625vpxrq75qamw1k1q09ndzmbn3i7c9b";
381381 };
382382
383383 phases = [ "installPhase" ];
pkgs/top-level/python-packages.nix+14−22
@@ -58,23 +58,7 @@ let
5858 # See build-setupcfg/default.nix for documentation.
5959 buildSetupcfg = import ../build-support/build-setupcfg self;
6060
61− fetchPypi = makeOverridable( {format ? "setuptools", ... } @attrs:
62− let
63− fetchWheel = {pname, version, sha256, python ? "py2.py3", abi ? "none", platform ? "any"}:
64− # Fetch a wheel. By default we fetch an universal wheel.
65− # See https://www.python.org/dev/peps/pep-0427/#file-name-convention for details regarding the optional arguments.
66− let
67− url = "https://files.pythonhosted.org/packages/${python}/${builtins.substring 0 1 pname}/${pname}/${pname}-${version}-${python}-${abi}-${platform}.whl";
68− in pkgs.fetchurl {inherit url sha256;};
69− fetchSource = {pname, version, sha256, extension ? "tar.gz"}:
70− # Fetch a source tarball.
71− let
72− url = "mirror://pypi/${builtins.substring 0 1 pname}/${pname}/${pname}-${version}.${extension}";
73− in pkgs.fetchurl {inherit url sha256;};
74− fetcher = (if format == "wheel" then fetchWheel
75− else if format == "setuptools" then fetchSource
76− else throw "Unsupported kind ${kind}");
77− in fetcher (builtins.removeAttrs attrs ["format"]) );
61+ fetchPypi = callPackage ../development/interpreters/python/fetchpypi.nix {};
7862
7963 # Check whether a derivation provides a Python module.
8064 hasPythonModule = drv: drv?pythonModule && drv.pythonModule == python;
@@ -644,8 +628,6 @@ in {
644628
645629 pims = callPackage ../development/python-modules/pims { };
646630
647− plantuml = callPackage ../tools/misc/plantuml { };
648−
649631 poetry = callPackage ../development/python-modules/poetry { };
650632
651633 pplpy = callPackage ../development/python-modules/pplpy { };
@@ -849,6 +831,8 @@ in {
849831
850832 pytest-env = callPackage ../development/python-modules/pytest-env { };
851833
834+ pytest-flask = callPackage ../development/python-modules/pytest-flask { };
835+
852836 pytest-mypy = callPackage ../development/python-modules/pytest-mypy { };
853837
854838 pytest-pylint = callPackage ../development/python-modules/pytest-pylint { };
@@ -857,6 +841,8 @@ in {
857841
858842 pytest-tornado = callPackage ../development/python-modules/pytest-tornado { };
859843
844+ pytest-xprocess = callPackage ../development/python-modules/pytest-xprocess { };
845+
860846 python-binance = callPackage ../development/python-modules/python-binance { };
861847
862848 python-dbusmock = callPackage ../development/python-modules/python-dbusmock { };
@@ -1106,6 +1092,8 @@ in {
11061092
11071093 aniso8601 = callPackage ../development/python-modules/aniso8601 {};
11081094
1095+ anonip = callPackage ../development/python-modules/anonip { };
1096+
11091097 asgiref = callPackage ../development/python-modules/asgiref { };
11101098
11111099 python-editor = callPackage ../development/python-modules/python-editor { };
@@ -4414,11 +4402,11 @@ in {
44144402
44154403 scipy = let
44164404 scipy_ = callPackage ../development/python-modules/scipy { };
4417− scipy_1_2 = scipy_.overridePythonAttrs(oldAttrs: {
4405+ scipy_1_2 = scipy_.overridePythonAttrs(oldAttrs: rec {
44184406 version = "1.2.1";
44194407 src = oldAttrs.src.override {
44204408 inherit version;
4421− sha256 = "e085d1babcb419bbe58e2e805ac61924dac4ca45a07c9fa081144739e500aa3c";
4409+ sha256 = "0g5a03jkjiqlh6h9yz508p5c9ni43735m01fivjvn6dlpjxd31g0";
44224410 };
44234411 });
44244412 in if pythonOlder "3.5" then scipy_1_2 else scipy_;
@@ -4876,7 +4864,9 @@ in {
48764864
48774865 sphinxcontrib_newsfeed = callPackage ../development/python-modules/sphinxcontrib_newsfeed { };
48784866
4879− sphinxcontrib_plantuml = callPackage ../development/python-modules/sphinxcontrib_plantuml { };
4867+ sphinxcontrib_plantuml = callPackage ../development/python-modules/sphinxcontrib_plantuml {
4868+ inherit (pkgs) plantuml;
4869+ };
48804870
48814871 sphinxcontrib-spelling = callPackage ../development/python-modules/sphinxcontrib-spelling { };
48824872
@@ -4900,6 +4890,8 @@ in {
49004890
49014891 svgwrite = callPackage ../development/python-modules/svgwrite { };
49024892
4893+ swagger-spec-validator = callPackage ../development/python-modules/swagger-spec-validator { };
4894+
49034895 freezegun = callPackage ../development/python-modules/freezegun { };
49044896
49054897 taskw = callPackage ../development/python-modules/taskw { };