Skip to content
This repository was archived by the owner on Apr 12, 2021. It is now read-only.
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs-channels
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: cac363c66181
Choose a base ref
...
head repository: NixOS/nixpkgs-channels
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 8d0010b08bd2
Choose a head ref
Loading
Showing with 2,531 additions and 1,120 deletions.
  1. +1 −1 doc/languages-frameworks/haskell.section.md
  2. +56 −0 nixos/doc/manual/release-notes/rl-2003.xml
  3. +4 −0 nixos/lib/make-options-doc/default.nix
  4. +7 −10 nixos/modules/services/databases/mysql.nix
  5. +36 −8 nixos/modules/services/web-apps/nextcloud.nix
  6. +48 −0 nixos/modules/services/web-apps/nextcloud.xml
  7. +1 −1 nixos/release-small.nix
  8. +27 −0 nixos/tests/mysql.nix
  9. +97 −20 pkgs/applications/misc/mysql-workbench/default.nix
  10. +12 −0 pkgs/applications/misc/mysql-workbench/fix-swig-build.patch
  11. +2 −2 pkgs/applications/networking/instant-messengers/signal-desktop/default.nix
  12. +1 −1 pkgs/applications/networking/instant-messengers/wire-desktop/default.nix
  13. +6 −5 pkgs/applications/networking/protonvpn-cli-ng/default.nix
  14. +33 −11 pkgs/applications/science/logic/alt-ergo/default.nix
  15. +4 −4 pkgs/applications/version-management/gitlab/data.json
  16. +2 −2 pkgs/applications/version-management/gitlab/gitaly/default.nix
  17. +1 −1 pkgs/applications/window-managers/i3/lock-fancy.nix
  18. +39 −1 pkgs/development/compilers/elm/default.nix
  19. +4 −4 pkgs/development/compilers/elm/packages/elm-format.nix
  20. +34 −0 pkgs/development/compilers/elm/packages/elm-instrument.nix
  21. +4 −4 pkgs/development/compilers/elm/packages/elmi-to-json.nix
  22. +1 −1 pkgs/development/compilers/elm/packages/node-composition.nix
  23. +7 −6 pkgs/development/compilers/elm/packages/node-packages.json
  24. +1,207 −626 pkgs/development/compilers/elm/packages/node-packages.nix
  25. +3 −3 pkgs/development/compilers/ghc/8.10.1.nix
  26. +11 −3 pkgs/development/coq-modules/mathcomp/default.nix
  27. +1 −1 pkgs/development/interpreters/racket/default.nix
  28. +12 −0 pkgs/development/libraries/glibc/common.nix
  29. +26 −7 pkgs/development/libraries/libmysqlconnectorcpp/default.nix
  30. +5 −0 pkgs/development/libraries/libxml2/default.nix
  31. +11 −14 pkgs/development/python-modules/flake8-future-import/default.nix
  32. +13 −0 pkgs/development/python-modules/flake8-future-import/skip-test.patch
  33. +9 −7 pkgs/development/python-modules/tensorflow/default.nix
  34. +0 −213 pkgs/development/python-modules/tensorflow/tf-1.15-bazel-1.0.patch
  35. +375 −0 pkgs/development/tools/build-managers/bazel/bazel_0/default.nix
  36. +78 −0 pkgs/development/tools/build-managers/bazel/bazel_0/glibc.patch
  37. +13 −0 pkgs/development/tools/build-managers/bazel/bazel_0/python-stub-path-fix.patch
  38. +211 −116 pkgs/development/tools/wasm-bindgen-cli/0001-Add-cargo.lock.patch
  39. +3 −3 pkgs/development/tools/wasm-bindgen-cli/default.nix
  40. +2 −2 pkgs/os-specific/linux/kernel/linux-4.19.nix
  41. +2 −2 pkgs/os-specific/linux/kernel/linux-5.4.nix
  42. +2 −2 pkgs/os-specific/linux/kernel/linux-5.5.nix
  43. +30 −17 pkgs/servers/nextcloud/default.nix
  44. +5 −6 pkgs/tools/misc/youtube-dl/default.nix
  45. +2 −2 pkgs/tools/networking/network-manager/default.nix
  46. +34 −0 pkgs/tools/networking/openapi-generator-cli/unstable.nix
  47. +4 −4 pkgs/tools/virtualization/nixos-container/nixos-container.pl
  48. +13 −5 pkgs/top-level/all-packages.nix
  49. +6 −1 pkgs/top-level/coq-packages.nix
  50. +13 −4 pkgs/top-level/make-tarball.nix
  51. +13 −0 pkgs/top-level/packages-config.nix
2 changes: 1 addition & 1 deletion doc/languages-frameworks/haskell.section.md
Original file line number Diff line number Diff line change
@@ -369,7 +369,7 @@ automatically select the right version of GHC and other build tools to build,
test and execute apps in an existing project downloaded from somewhere on the
Internet. Pass the `--nix` flag to any `stack` command to do so, e.g.
```shell
git clone --recursive https://github.com/yesodweb/wai
git clone --recurse-submodules https://github.com/yesodweb/wai.git
cd wai
stack --nix build
```
56 changes: 56 additions & 0 deletions nixos/doc/manual/release-notes/rl-2003.xml
Original file line number Diff line number Diff line change
@@ -891,6 +891,62 @@ auth required pam_succeed_if.so uid >= 1000 quiet
The previous behavior can be restored by setting <literal>config.riot-web.conf = { disable_guests = false; piwik = true; }</literal>.
</para>
</listitem>
<listitem>
<para>
Stand-alone usage of <literal>Upower</literal> now requires
<option>services.upower.enable</option> instead of just installing into
<xref linkend="opt-environment.systemPackages"/>.
</para>
</listitem>
<listitem>
<para>
<package>nextcloud</package> has been updated to <literal>v18.0.2</literal>. This means
that users from NixOS 19.09 can't upgrade directly since you can only move one version
forward and 19.09 uses <literal>v16.0.8</literal>.
</para>
<para>
To provide a safe upgrade-path and to circumvent similar issues in the future, the following
measures were taken:
<itemizedlist>
<listitem>
<para>
The <package>pkgs.nextcloud</package>-attribute has been removed and replaced with
versioned attributes (currently <package>pkgs.nextcloud17</package> and
<package>pkgs.nextcloud18</package>). With this change major-releases can be backported
without breaking stuff and to make upgrade-paths easier.
</para>
</listitem>
<listitem>
<para>
Existing setups will be detected using
<link linkend="opt-system.stateVersion">system.stateVersion</link>: by default,
<package>nextcloud17</package> will be used, but will raise a warning which notes
that after that deploy it's recommended to update to the latest stable version
(<package>nextcloud18</package>) by declaring the newly introduced setting
<link linkend="opt-services.nextcloud.package">services.nextcloud.package</link>.
</para>
</listitem>
<listitem>
<para>
Users with an overlay (e.g. to use <package>nextcloud</package> at version
<literal>v18</literal> on <literal>19.09</literal>) will get an evaluation error
by default. This is done to ensure that our
<link linkend="opt-services.nextcloud.package">package</link>-option doesn't select an
older version by accident. It's recommended to use <package>pkgs.nextcloud18</package>
or to set <link linkend="opt-services.nextcloud.package">package</link> to
<package>pkgs.nextcloud</package> explicitly.
</para>
</listitem>
</itemizedlist>
</para>
<warning>
<para>
Please note that if you're comming from <literal>19.03</literal> or older, you have
to manually upgrade to <literal>19.09</literal> first to upgrade your server
to Nextcloud v16.
</para>
</warning>
</listitem>
</itemizedlist>
</section>

4 changes: 4 additions & 0 deletions nixos/lib/make-options-doc/default.nix
Original file line number Diff line number Diff line change
@@ -133,6 +133,7 @@ in {

optionsJSON = pkgs.runCommand "options.json"
{ meta.description = "List of NixOS options in JSON format";
buildInputs = [ pkgs.brotli ];
}
''
# Export list of options in different format.
@@ -141,8 +142,11 @@ in {
cp ${builtins.toFile "options.json" (builtins.unsafeDiscardStringContext (builtins.toJSON optionsNix))} $dst/options.json
brotli -9 < $dst/options.json > $dst/options.json.br
mkdir -p $out/nix-support
echo "file json $dst/options.json" >> $out/nix-support/hydra-build-products
echo "file json-br $dst/options.json.br" >> $out/nix-support/hydra-build-products
''; # */

optionsDocBook = pkgs.runCommand "options-docbook.xml" {} ''
17 changes: 7 additions & 10 deletions nixos/modules/services/databases/mysql.nix
Original file line number Diff line number Diff line change
@@ -10,16 +10,8 @@ let

isMariaDB = lib.getName mysql == lib.getName pkgs.mariadb;

isMysqlAtLeast57 =
(lib.getName mysql == lib.getName pkgs.mysql57)
&& (builtins.compareVersions mysql.version "5.7" >= 0);

mysqldOptions =
"--user=${cfg.user} --datadir=${cfg.dataDir} --basedir=${mysql}";
# For MySQL 5.7+, --insecure creates the root user without password
# (earlier versions and MariaDB do this by default).
installOptions =
"${mysqldOptions} ${lib.optionalString isMysqlAtLeast57 "--insecure"}";

in

@@ -307,9 +299,14 @@ in
pkgs.nettools
];

preStart = ''
preStart = if isMariaDB then ''
if ! test -e ${cfg.dataDir}/mysql; then
${mysql}/bin/mysql_install_db --defaults-file=/etc/my.cnf ${mysqldOptions}
touch /tmp/mysql_init
fi
'' else ''
if ! test -e ${cfg.dataDir}/mysql; then
${mysql}/bin/mysql_install_db --defaults-file=/etc/my.cnf ${installOptions}
${mysql}/bin/mysqld --defaults-file=/etc/my.cnf ${mysqldOptions} --initialize-insecure
touch /tmp/mysql_init
fi
'';
44 changes: 36 additions & 8 deletions nixos/modules/services/web-apps/nextcloud.nix
Original file line number Diff line number Diff line change
@@ -30,7 +30,7 @@ let

occ = pkgs.writeScriptBin "nextcloud-occ" ''
#! ${pkgs.stdenv.shell}
cd ${pkgs.nextcloud}
cd ${cfg.package}
sudo=exec
if [[ "$USER" != nextcloud ]]; then
sudo='exec /run/wrappers/bin/sudo -u nextcloud --preserve-env=NEXTCLOUD_CONFIG_DIR'
@@ -42,6 +42,8 @@ let
occ $*
'';

inherit (config.system) stateVersion;

in {
options.services.nextcloud = {
enable = mkEnableOption "nextcloud";
@@ -64,6 +66,11 @@ in {
default = false;
description = "Use https for generated links.";
};
package = mkOption {
type = types.package;
description = "Which package to use for the Nextcloud instance.";
relatedPackages = [ "nextcloud17" "nextcloud18" ];
};

maxUploadSize = mkOption {
default = "512M";
@@ -309,10 +316,31 @@ in {
}
];

warnings = optional (cfg.poolConfig != null) ''
Using config.services.nextcloud.poolConfig is deprecated and will become unsupported in a future release.
Please migrate your configuration to config.services.nextcloud.poolSettings.
'';
warnings = []
++ (optional (cfg.poolConfig != null) ''
Using config.services.nextcloud.poolConfig is deprecated and will become unsupported in a future release.
Please migrate your configuration to config.services.nextcloud.poolSettings.
'')
++ (optional (versionOlder cfg.package.version "18") ''
You're currently deploying an older version of Nextcloud. This may be needed
since Nextcloud doesn't allow major version upgrades across multiple versions (i.e. an
upgrade from 16 is possible to 17, but not to 18).
Please deploy this to your server and wait until the migration is finished. After
that you can deploy to the latest Nextcloud version available.
'');

services.nextcloud.package = with pkgs;
mkDefault (
if pkgs ? nextcloud
then throw ''
The `pkgs.nextcloud`-attribute has been removed. If it's supposed to be the default
nextcloud defined in an overlay, please set `services.nextcloud.package` to
`pkgs.nextcloud`.
''
else if versionOlder stateVersion "20.03" then nextcloud17
else nextcloud18
);
}

{ systemd.timers.nextcloud-cron = {
@@ -407,7 +435,7 @@ in {
path = [ occ ];
script = ''
chmod og+x ${cfg.home}
ln -sf ${pkgs.nextcloud}/apps ${cfg.home}/
ln -sf ${cfg.package}/apps ${cfg.home}/
mkdir -p ${cfg.home}/config ${cfg.home}/data ${cfg.home}/store-apps
ln -sf ${overrideConfig} ${cfg.home}/config/override.config.php
@@ -429,7 +457,7 @@ in {
environment.NEXTCLOUD_CONFIG_DIR = "${cfg.home}/config";
serviceConfig.Type = "oneshot";
serviceConfig.User = "nextcloud";
serviceConfig.ExecStart = "${phpPackage}/bin/php -f ${pkgs.nextcloud}/cron.php";
serviceConfig.ExecStart = "${phpPackage}/bin/php -f ${cfg.package}/cron.php";
};
nextcloud-update-plugins = mkIf cfg.autoUpdateApps.enable {
serviceConfig.Type = "oneshot";
@@ -471,7 +499,7 @@ in {
enable = true;
virtualHosts = {
${cfg.hostName} = {
root = pkgs.nextcloud;
root = cfg.package;
locations = {
"= /robots.txt" = {
priority = 100;
48 changes: 48 additions & 0 deletions nixos/modules/services/web-apps/nextcloud.xml
Original file line number Diff line number Diff line change
@@ -113,5 +113,53 @@
maintenance:install</literal>! This command tries to install the application
and can cause unwanted side-effects!</para>
</warning>

<para>
Nextcloud doesn't allow to move more than one major-version forward. If you're e.g. on
<literal>v16</literal>, you cannot upgrade to <literal>v18</literal>, you need to upgrade to
<literal>v17</literal> first. This is ensured automatically as long as the
<link linkend="opt-system.stateVersion">stateVersion</link> is declared properly. In that case
the oldest version available (one major behind the one from the previous NixOS
release) will be selected by default and the module will generate a warning that reminds
the user to upgrade to latest Nextcloud <emphasis>after</emphasis> that deploy.
</para>
</section>

<section xml:id="module-services-nextcloud-maintainer-info">
<title>Maintainer information</title>

<para>
As stated in the previous paragraph, we must provide a clean upgrade-path for Nextcloud
since it cannot move more than one major version forward on a single upgrade. This chapter
adds some notes how Nextcloud updates should be rolled out in the future.
</para>

<para>
While minor and patch-level updates are no problem and can be done directly in the
package-expression (and should be backported to supported stable branches after that),
major-releases should be added in a new attribute (e.g. Nextcloud <literal>v19.0.0</literal>
should be available in <literal>nixpkgs</literal> as <literal>pkgs.nextcloud19</literal>).
To provide simple upgrade paths it's generally useful to backport those as well to stable
branches. As long as the package-default isn't altered, this won't break existing setups.
After that, the versioning-warning in the <literal>nextcloud</literal>-module should be
updated to make sure that the
<link linkend="opt-services.nextcloud.package">package</link>-option selects the latest version
on fresh setups.
</para>

<para>
If major-releases will be abandoned by upstream, we should check first if those are needed
in NixOS for a safe upgrade-path before removing those. In that case we shold keep those
packages, but mark them as insecure in an expression like this (in
<literal>&lt;nixpkgs/pkgs/servers/nextcloud/default.nix&gt;</literal>):
<programlisting>/* ... */
{
nextcloud17 = generic {
version = "17.0.x";
sha256 = "0000000000000000000000000000000000000000000000000000";
insecure = true;
};
}</programlisting>
</para>
</section>
</chapter>
2 changes: 1 addition & 1 deletion nixos/release-small.nix
Original file line number Diff line number Diff line change
@@ -28,7 +28,7 @@ let
in rec {

nixos = {
inherit (nixos') channel manual iso_minimal dummy;
inherit (nixos') channel manual options iso_minimal dummy;
tests = {
inherit (nixos'.tests)
containers-imperative
27 changes: 27 additions & 0 deletions nixos/tests/mysql.nix
Original file line number Diff line number Diff line change
@@ -22,6 +22,27 @@ import ./make-test-python.nix ({ pkgs, ...} : {
services.mysql.package = pkgs.mysql57;
};

mysql80 =
{ pkgs, ... }:

{
# prevent oom:
# Kernel panic - not syncing: Out of memory: compulsory panic_on_oom is enabled
virtualisation.memorySize = 1024;

services.mysql.enable = true;
services.mysql.initialDatabases = [
{ name = "testdb"; schema = ./testdb.sql; }
{ name = "empty_testdb"; }
];
# note that using pkgs.writeText here is generally not a good idea,
# as it will store the password in world-readable /nix/store ;)
services.mysql.initialScript = pkgs.writeText "mysql-init.sql" ''
CREATE USER 'passworduser'@'localhost' IDENTIFIED BY 'password123';
'';
services.mysql.package = pkgs.mysql80;
};

mariadb =
{ pkgs, ... }:

@@ -61,6 +82,12 @@ import ./make-test-python.nix ({ pkgs, ...} : {
# ';' acts as no-op, just check whether login succeeds with the user created from the initialScript
mysql.succeed("echo ';' | mysql -u passworduser --password=password123")
mysql80.wait_for_unit("mysql")
mysql80.succeed("echo 'use empty_testdb;' | mysql -u root")
mysql80.succeed("echo 'use testdb; select * from tests;' | mysql -u root -N | grep 4")
# ';' acts as no-op, just check whether login succeeds with the user created from the initialScript
mysql80.succeed("echo ';' | mysql -u passworduser --password=password123")
mariadb.wait_for_unit("mysql")
mariadb.succeed(
"echo 'use testdb; create table tests (test_id INT, PRIMARY KEY (test_id));' | sudo -u testuser mysql -u testuser"
Loading