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: 3a009bd5daf9
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: 85055b3ab7b8
Choose a head ref

Commits on Mar 8, 2020

  1. glibc: provide fallback for kernels with missing prlimit64

    The current version of glibc implements support for kernels down to
    3.2.0 (and we make sure to enable such support with apporopriate
    --enable-kernel setting). The current RHEL6 operating system is based on
    a maintained kernel based on 2.6.32 with lots of backports. We provide
    basic support for this specific kernel by patching glibc to provide an
    exception for this specific version of kernel. This allows for nixpkgs
    software distribution to work on RHEL6 and it does so quite well with
    almost no problems. There are, however, a few syscalls that are missing
    in the 2.6.32 kernel, one of which is prlimit64. This commit provides a
    fallback that uses an older {get,set}rlimit syscalls in cases when
    prlimit64 is not available. This should streamline the experience for
    nixpkgs users wanting to run it on RHEL6, namely, this fixes one of the
    tests in findutils.
    
    See also discussion in guix:
    https://lists.gnu.org/archive/html/guix-devel/2018-03/msg00356.html
    
    (cherry picked from commit 6740593)
    veprbl committed Mar 8, 2020
    Copy the full SHA
    9cc2f18 View commit details

Commits on Mar 14, 2020

  1. Copy the full SHA
    f5c2ed4 View commit details

Commits on Mar 16, 2020

  1. libxml2: add patch for CVE-2019-20388

    (cherry picked from commit 291c735)
    /cc roundup #79725
    mmilata authored and vcunat committed Mar 16, 2020
    Copy the full SHA
    feb386f View commit details

Commits on Mar 17, 2020

  1. Copy the full SHA
    d9bb3a3 View commit details

Commits on Mar 22, 2020

  1. Merge pull request #82065 from veprbl/pr/glibc_prlimit64_20.03

    [20.03] glibc: provide fallback for kernels with missing prlimit64
    veprbl authored Mar 22, 2020
    Copy the full SHA
    1332522 View commit details

Commits on Mar 25, 2020

  1. protonvpn-cli-ng: 2.2.0 -> 2.2.2

    Some changes were made after final review of the package. There was a
    missing runtime dependency that was discovered after merge of the
    backport
    
    (cherry picked from commit 9fe4a63)
    Reason: The dependency can make the package work or not
    JeffLabonte committed Mar 25, 2020
    Copy the full SHA
    b02da56 View commit details

Commits on Mar 26, 2020

  1. Revert "nixos-container: use systemd-run instead of nsenter"

    This reverts commit 7cb100b.
    
    This appears to break at least the `container`-backend of `nixops`: when
    running `switch-to-configuration` within `nixos-container run`, the
    running `systemd`-instance gets reloaded which appears to kill the
    `systemd-run` command and causes `nixos-container run` to hang.
    
    The full issue is reported in the original PR[1].
    
    [1] NixOS/nixpkgs#67332 (comment)
    Ma27 committed Mar 26, 2020
    Copy the full SHA
    7f1ba60 View commit details
  2. Merge pull request #83330 from JeffLabonte/20.03_update_protonvpn_ng_…

    …2.2.0-with_fix
    
    [20.03] protonvpn-cli-ng: 2.2.0 -> 2.2.2
    bhipple authored Mar 26, 2020
    Copy the full SHA
    34e93f4 View commit details
  3. Copy the full SHA
    84f1b23 View commit details
  4. coqPackages.mathcomp_1_10: init at 1.10.0

    (cherry picked from commit 229dc01)
    vbgl committed Mar 26, 2020
    Copy the full SHA
    d947d28 View commit details
  5. signal-desktop: 1.32.1 -> 1.32.2

    (cherry picked from commit 5c47359)
    primeos committed Mar 26, 2020
    Copy the full SHA
    4a82119 View commit details
  6. Copy the full SHA
    b249ffa View commit details
  7. nixos/nextcloud: implement a safe upgrade-path between 19.09 and 20.03

    It's impossible to move two major-versions forward when upgrading
    Nextcloud. This is an issue when comming from 19.09 (using Nextcloud 16)
    and trying to upgrade to 20.03 (using Nextcloud 18 by default).
    
    This patch implements the measurements discussed in #82056 and #82353 to
    improve the update process and to circumvent similar issues in the
    future:
    
    * `pkgs.nextcloud` has been removed in favor of versioned attributes
      (currently `pkgs.nextcloud17` and `pkgs.nextcloud18`). With that
      approach we can safely backport major-releases in the future to
      simplify those upgrade-paths and we can select one of the
      major-releases as default depending on the configuration (helpful to
      decide whether e.g. `pkgs.nextcloud17` or `pkgs.nextcloud18` should be
      used on 20.03 and `master` atm).
    
    * If `system.stateVersion` is older than `20.03`, `nextcloud17` will be
      used (which is one major-release behind v16 from 19.09). When using a
      package older than the latest major-release available (currently v18),
      the evaluation will cause a warning which describes the issue and
      suggests next steps.
    
      To make those package-selections easier, a new option to define the
      package to be used for the service (namely
      `services.nextcloud.package`) was introduced.
    
    * If `pkgs.nextcloud` exists (e.g. due to an overlay which was used to
      provide more recent Nextcloud versions on older NixOS-releases), an
      evaluation error will be thrown by default: this is to make sure that
      `services.nextcloud.package` doesn't use an older version by accident
      after checking the state-version. If `pkgs.nextcloud` is added
      manually, it needs to be declared explicitly in
      `services.nextcloud.package`.
    
    * The `nixos/nextcloud`-documentation contains a
      "Maintainer information"-chapter  which describes how to roll out new
      Nextcloud releases and how to deal with old (and probably unsafe)
      versions.
    
    Closes #82056
    
    (cherry picked from commit 702f645)
    Ma27 committed Mar 26, 2020
    Copy the full SHA
    d148bb0 View commit details
  8. wire-desktop: Fix StartupWMClass

    With quotes it doesn't match the Wire's screen, causing the window to not be grouped under its icon in Gnome.
    
    (cherry picked from commit da587da)
    arianvp authored and worldofpeace committed Mar 26, 2020
    Copy the full SHA
    01c61f3 View commit details
  9. Merge pull request #83392 from Ma27/nixos-container-nsenter-20.03

    Revert "nixos-container: use systemd-run instead of nsenter"
    worldofpeace authored Mar 26, 2020
    Copy the full SHA
    a3a02d6 View commit details
  10. mysql-workbench: format with nixpkgs-fmt

    (cherry picked from commit eacf018)
    jtojnar committed Mar 26, 2020
    Copy the full SHA
    4c12254 View commit details
  11. libmysqlconnectorcpp: 1.1.9 → 8.0.19

    This has been seriously outdated:
    
    * https://dev.mysql.com/doc/relnotes/connector-cpp/en/news-1-1-10.html
    * https://dev.mysql.com/doc/relnotes/connector-cpp/en/news-1-1-11.html
    * https://dev.mysql.com/doc/relnotes/connector-cpp/en/news-1-1-12.html
    * https://dev.mysql.com/doc/relnotes/connector-cpp/en/news-1-1-13.html
    * https://dev.mysql.com/doc/relnotes/connector-cpp/en/news-2-0-1.html
    * https://dev.mysql.com/doc/relnotes/connector-cpp/en/news-2-0-2.html
    * https://dev.mysql.com/doc/relnotes/connector-cpp/en/news-2-0-3.html
    * https://dev.mysql.com/doc/relnotes/connector-cpp/en/news-2-0-4.html
    * https://dev.mysql.com/doc/relnotes/connector-cpp/en/news-8-0-5.html
    * https://dev.mysql.com/doc/relnotes/connector-cpp/en/news-8-0-6.html
    * https://dev.mysql.com/doc/relnotes/connector-cpp/en/news-8-0-7.html
    * https://dev.mysql.com/doc/relnotes/connector-cpp/en/news-8-0-8-through-10.html
    * https://dev.mysql.com/doc/relnotes/connector-cpp/en/news-8-0-11.html
    * https://dev.mysql.com/doc/relnotes/connector-cpp/en/news-8-0-12.html
    * https://dev.mysql.com/doc/relnotes/connector-cpp/en/news-8-0-13.html
    * https://dev.mysql.com/doc/relnotes/connector-cpp/en/news-8-0-14.html
    * https://dev.mysql.com/doc/relnotes/connector-cpp/en/news-8-0-15.html
    * https://dev.mysql.com/doc/relnotes/connector-cpp/en/news-8-0-16.html
    * https://dev.mysql.com/doc/relnotes/connector-cpp/en/news-8-0-17.html
    * https://dev.mysql.com/doc/relnotes/connector-cpp/en/news-8-0-18.html
    * https://dev.mysql.com/doc/relnotes/connector-cpp/en/news-8-0-19.html
    
    Expression changes:
    
    * Format with nixpkgs-fmt.
    * Move cmake to nativeBuildInputs.
    * Use OpenSSL from the system as using the bundled version is now optional.
    * Use MysQL 8.0 since this is supposed to be used with that version.
    * Explicitly enable the now legacy JDBC library used by mysql-workbench.
    * Remove unnecessary MYSQL_LIB_DIR flag. MySQL will be found automatically.
        * We just need the build script know it is not a static library.
    
    (cherry picked from commit 23d6991)
    jtojnar committed Mar 26, 2020
    Copy the full SHA
    f5e8ef6 View commit details
  12. mysql-workbench: 8.0.15 → 8.0.19

    * https://dev.mysql.com/doc/relnotes/workbench/en/news-8-0-16.html
    * https://dev.mysql.com/doc/relnotes/workbench/en/news-8-0-17.html
    * https://dev.mysql.com/doc/relnotes/workbench/en/news-8-0-18.html
    * https://dev.mysql.com/doc/relnotes/workbench/en/news-8-0-19.html
    
    The release notes contain the following:
    
    Important Note: MySQL Workbench 8.0.19 is unable to open a new connection to MySQL Server from the home screen if the server is not started and you cannot start a server by using the Workbench Administration feature. Administrative and SQL editing tasks require an online server for the duration of this issue. Feature tasks that you performed with an offline server in previous releases now return an error message indicating that the server is unreachable.
    
    but it is clearly better than having it broken.
    
    (cherry picked from commit 070b49e)
    jtojnar committed Mar 26, 2020
    Copy the full SHA
    f6ab55b View commit details
  13. ghc: 8.10.0.20200123 -> 8.10.1

    (cherry picked from commit 59c58f3)
    Signed-off-by: Domen Kožar <domen@dev.si>
    domenkozar committed Mar 26, 2020
    Copy the full SHA
    41875cf View commit details
  14. networkmanager: 1.22.8 -> 1.22.10

    (cherry picked from commit 4feb4cf)
    worldofpeace committed Mar 26, 2020
    Copy the full SHA
    8d0010b View commit details
  15. signal-desktop: 1.32.2 -> 1.32.3

    (cherry picked from commit 38aa1ca)
    primeos committed Mar 26, 2020
    Copy the full SHA
    c10c44a View commit details
  16. mautrix-whatsapp: 2020-02-09 -> 2020-03-26

    (cherry picked from commit 5bfc1d5)
    Ma27 committed Mar 26, 2020
    Copy the full SHA
    c2db74f View commit details

Commits on Mar 27, 2020

  1. ell: 0.27 -> 0.30

    (cherry picked from commit 79cc0c7)
    Ma27 committed Mar 27, 2020
    Copy the full SHA
    68c3a4f View commit details
  2. iwd: 1.4 -> 1.6

    (cherry picked from commit 0e69720)
    Ma27 committed Mar 27, 2020
    Copy the full SHA
    ea57fc5 View commit details
  3. Merge pull request #82515 from Xe/fix-b3sum

    tools/security/b3sum: fix cargo hash
    bhipple authored Mar 27, 2020
    Copy the full SHA
    834ad82 View commit details
  4. ocaml: 4.09.0 → 4.09.1

    (cherry picked from commit 4a3edb4)
    vbgl committed Mar 27, 2020
    Copy the full SHA
    fdbefdc View commit details
  5. vk-messenger: 4.5.2 -> 5.0.1

    (cherry picked from commit c694fcf)
    cc #81127
    gnidorah authored and veprbl committed Mar 27, 2020
    Copy the full SHA
    294445a View commit details
  6. perlPackages.CPAN: fix patch download

    Fixes: 153b0db ('perlPackages.CPAN: apply patch to fix changed YAML module default')
    Closes: #81480
    (cherry picked from commit fa73723)
    veprbl committed Mar 27, 2020
    Copy the full SHA
    5ffc821 View commit details
  7. Copy the full SHA
    85055b3 View commit details
Showing with 594 additions and 215 deletions.
  1. +56 −0 nixos/doc/manual/release-notes/rl-2003.xml
  2. +36 −8 nixos/modules/services/web-apps/nextcloud.nix
  3. +48 −0 nixos/modules/services/web-apps/nextcloud.xml
  4. +97 −20 pkgs/applications/misc/mysql-workbench/default.nix
  5. +12 −0 pkgs/applications/misc/mysql-workbench/fix-swig-build.patch
  6. +2 −2 pkgs/applications/networking/instant-messengers/signal-desktop/default.nix
  7. +3 −3 pkgs/applications/networking/instant-messengers/vk-messenger/default.nix
  8. +1 −1 pkgs/applications/networking/instant-messengers/wire-desktop/default.nix
  9. +6 −5 pkgs/applications/networking/protonvpn-cli-ng/default.nix
  10. +3 −3 pkgs/development/compilers/ghc/8.10.1.nix
  11. +5 −2 pkgs/development/compilers/ocaml/4.09.nix
  12. +11 −3 pkgs/development/coq-modules/mathcomp/default.nix
  13. +12 −0 pkgs/development/libraries/glibc/common.nix
  14. +26 −7 pkgs/development/libraries/libmysqlconnectorcpp/default.nix
  15. +5 −0 pkgs/development/libraries/libxml2/default.nix
  16. +1 −3 pkgs/development/python-modules/django-compat/default.nix
  17. +211 −116 pkgs/development/tools/wasm-bindgen-cli/0001-Add-cargo.lock.patch
  18. +3 −3 pkgs/development/tools/wasm-bindgen-cli/default.nix
  19. +2 −2 pkgs/os-specific/linux/ell/default.nix
  20. +2 −2 pkgs/os-specific/linux/iwd/default.nix
  21. +4 −4 pkgs/servers/mautrix-whatsapp/default.nix
  22. +30 −17 pkgs/servers/nextcloud/default.nix
  23. +2 −2 pkgs/tools/networking/network-manager/default.nix
  24. +1 −1 pkgs/tools/security/b3sum/default.nix
  25. +4 −4 pkgs/tools/virtualization/nixos-container/nixos-container.pl
  26. +3 −4 pkgs/top-level/all-packages.nix
  27. +6 −1 pkgs/top-level/coq-packages.nix
  28. +2 −2 pkgs/top-level/perl-packages.nix
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>

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>
117 changes: 97 additions & 20 deletions pkgs/applications/misc/mysql-workbench/default.nix
Original file line number Diff line number Diff line change
@@ -1,27 +1,60 @@
{ stdenv, fetchurl, substituteAll, cmake, ninja, pkgconfig
, glibc, gtk3, gtkmm3, pcre, swig, antlr4_7, sudo
, mysql, libxml2, libmysqlconnectorcpp
, vsqlite, gdal, libiodbc, libpthreadstubs
, libXdmcp, libuuid, libzip, libsecret, libssh
, python2, jre
, boost, libsigcxx, libX11, openssl
, proj, cairo, libxkbcommon, epoxy, wrapGAppsHook
, at-spi2-core, dbus, bash, coreutils
{ stdenv
, fetchurl
, substituteAll
, cmake
, ninja
, pkgconfig
, glibc
, gtk3
, gtkmm3
, pcre
, swig
, antlr4_7
, sudo
, mysql
, libxml2
, libmysqlconnectorcpp
, vsqlite
, gdal
, libiodbc
, libpthreadstubs
, libXdmcp
, libuuid
, libzip
, libsecret
, libssh
, python2
, jre
, boost
, libsigcxx
, libX11
, openssl
, rapidjson
, proj
, cairo
, libxkbcommon
, epoxy
, wrapGAppsHook
, at-spi2-core
, dbus
, bash
, coreutils
}:

let
inherit (python2.pkgs) paramiko pycairo pyodbc;
in stdenv.mkDerivation rec {
pname = "mysql-workbench";
version = "8.0.15";
version = "8.0.19";

src = fetchurl {
url = "http://dev.mysql.com/get/Downloads/MySQLGUITools/mysql-workbench-community-${version}-src.tar.gz";
sha256 = "0ca93azasya5xiw6j2map8drmxf445qqydpvrb512kjfqdiv67x6";
sha256 = "unrszSK+tKcARSHxRSAAos+jDtYxdDcSnFENixaDJsw=";
};

patches = [
./fix-gdal-includes.patch

(substituteAll {
src = ./hardcode-paths.patch;
catchsegv = "${glibc.bin}/bin/catchsegv";
@@ -35,6 +68,13 @@ in stdenv.mkDerivation rec {
rmdir = "${coreutils}/bin/rmdir";
sudo = "${sudo}/bin/sudo";
})

# Fix swig not being able to find headers
# https://github.com/NixOS/nixpkgs/pull/82362#issuecomment-597948461
(substituteAll {
src = ./fix-swig-build.patch;
cairoDev = "${cairo.dev}";
})
];

# have it look for 4.7.2 instead of 4.7.1
@@ -44,31 +84,68 @@ in stdenv.mkDerivation rec {
'';

nativeBuildInputs = [
cmake ninja pkgconfig jre swig wrapGAppsHook
cmake
ninja
pkgconfig
jre
swig
wrapGAppsHook
];

buildInputs = [
gtk3 gtkmm3 libX11 antlr4_7.runtime.cpp python2 mysql libxml2
libmysqlconnectorcpp vsqlite gdal boost libssh openssl
libiodbc pcre cairo libuuid libzip libsecret
libsigcxx proj
gtk3
gtkmm3
libX11
antlr4_7.runtime.cpp
python2
mysql
libxml2
libmysqlconnectorcpp
vsqlite
gdal
boost
libssh
openssl
rapidjson
libiodbc
pcre
cairo
libuuid
libzip
libsecret
libsigcxx
proj

# python dependencies:
paramiko pycairo pyodbc # sqlanydb
paramiko
pycairo
pyodbc
# TODO: package sqlanydb and add it here

# transitive dependencies:
libpthreadstubs libXdmcp libxkbcommon epoxy at-spi2-core dbus
libpthreadstubs
libXdmcp
libxkbcommon
epoxy
at-spi2-core
dbus
];

postPatch = ''
patchShebangs tools/get_wb_version.sh
'';

# error: 'OGRErr OGRSpatialReference::importFromWkt(char**)' is deprecated
# error: 'OGRErr OGRSpatialReference::importFromWkt(char**)' is deprecated
NIX_CFLAGS_COMPILE = "-Wno-error=deprecated-declarations";

cmakeFlags = [
"-DMySQL_CONFIG_PATH=${mysql}/bin/mysql_config"
"-DIODBC_CONFIG_PATH=${libiodbc}/bin/iodbc-config"
"-DWITH_ANTLR_JAR=${antlr4_7.jarLocation}"
# mysql-workbench 8.0.19 depends on libmysqlconnectorcpp 1.1.8.
# Newer versions of connector still provide the legacy library when enabled
# but the headers are in a different location.
"-DMySQLCppConn_INCLUDE_DIR=${libmysqlconnectorcpp}/include/jdbc"
];

# There is already an executable and a wrapper in bindir
@@ -104,7 +181,7 @@ in stdenv.mkDerivation rec {
and execute SQL queries.
'';

homepage = http://wb.mysql.com/;
homepage = "http://wb.mysql.com/";
license = licenses.gpl2;
maintainers = [ maintainers.kkallio ];
platforms = platforms.linux;
12 changes: 12 additions & 0 deletions pkgs/applications/misc/mysql-workbench/fix-swig-build.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
--- a/library/forms/swig/CMakeLists.txt
+++ b/library/forms/swig/CMakeLists.txt
@@ -57,7 +57,7 @@

set(CMAKE_SWIG_FLAGS -w312)
set_source_files_properties(cairo.i PROPERTIES CPLUSPLUS ON)
-set_property(SOURCE cairo.i PROPERTY SWIG_FLAGS -DCAIRO_HAS_PNG_FUNCTIONS=1 -fcompact -DSWIG_PYTHON_LEGACY_BOOL -I/usr/include)
+set_property(SOURCE cairo.i PROPERTY SWIG_FLAGS -DCAIRO_HAS_PNG_FUNCTIONS=1 -fcompact -DSWIG_PYTHON_LEGACY_BOOL -I@cairoDev@/include)
if(CMAKE_VERSION VERSION_LESS 3.8)
swig_add_module(cairo python cairo.i)
else()

Loading