Skip to content
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
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 3b3831957fe8
Choose a base ref
...
head repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: e79a142e58cc
Choose a head ref

Commits on Mar 11, 2020

  1. nixos/haproxy: Revive the haproxy user and group

    Running haproxy with "DynamicUser = true" doesn't really work, since
    it prohibits specifying a TLS certificate bundle with limited
    permissions. This revives the haproxy user and group, but makes them
    dynamically allocated by NixOS, rather than statically allocated. It
    also adds options to specify which user and group haproxy runs as.
    
    (cherry picked from commit bb7ad85)
    talyz authored and Mic92 committed Mar 11, 2020
    Copy the full SHA
    8d243e1 View commit details

Commits on Mar 28, 2020

  1. mongodb: 3.4.10 -> 4.0.4

    fix: Adding libtool to allow darwin compiles
    
    Libtool seems to be required for mongodb to compile on darwin.
    
    fix: Marking MongoDB as broken on aarch64
    
    fix: Adding libtools to the pkg imports
    
    Update mongodb to 4.0.4
    
    (cherry picked from commit e9bec1a)
    jarjee authored and Ma27 committed Mar 28, 2020
    Copy the full SHA
    ac23e50 View commit details
  2. mongodb: split packages to expose 3.4, 3.6 and 4.0

    (cherry picked from commit 97c4dff)
    jarjee authored and Ma27 committed Mar 28, 2020
    Copy the full SHA
    54d2944 View commit details
  3. mongodb: 3.4.20 -> 3.4.22, 3.6.12 -> 3.6.13, 4.0.9 -> 4.0.11

    (cherry picked from commit 165d8bd)
    jarjee authored and Ma27 committed Mar 28, 2020
    Copy the full SHA
    83d7124 View commit details
  4. nixos/tests/mongodb: test against mongodb versions 3.4, 3.6, 4.0

    Now has tests for 3.4, 3.6, 4.0. Has some duplication, but it appears to
    work on my machine.
    
    (cherry picked from commit 44641ed)
    jarjee authored and Ma27 committed Mar 28, 2020
    Copy the full SHA
    2cba56e View commit details
  5. mongodb-4_0: 4.0.11 -> 4.0.12

    (cherry picked from commit de69821)
    jarjee authored and Ma27 committed Mar 28, 2020
    Copy the full SHA
    ef9bd8e View commit details
  6. mongodb: 3.4.22 -> 3.4.24 & fix ssl

    Reverts previous ssl fix commit and updates the mongodb version which fixes the ssl compile problem on darwin.
    
    (cherry picked from commit c2eee6e)
    Thibault Gagnaux authored and Ma27 committed Mar 28, 2020
    Copy the full SHA
    00d69b8 View commit details
  7. mongodb: builds on aarch64 as well

    (cherry picked from commit 80e6da7)
    Ma27 committed Mar 28, 2020
    Copy the full SHA
    56bfb0d View commit details
  8. nixos/tests/mongodb: rewrite with python

    perl-based VM tests are deprecated.
    
    (cherry picked from commit 2934f04)
    Ma27 committed Mar 28, 2020
    Copy the full SHA
    07fb019 View commit details
  9. nixos/release-notes: mention mongodb update

    (cherry picked from commit b65ff5d)
    Ma27 committed Mar 28, 2020
    Copy the full SHA
    7cf4906 View commit details
  10. nixos/release-notes: mention that mongodb is unfree now

    (cherry picked from commit 2712152)
    Ma27 committed Mar 28, 2020
    Copy the full SHA
    cd36c1d View commit details

Commits on Mar 29, 2020

  1. nixos/tests/mongodb: also test mongodb-3_4

    (cherry picked from commit 2c133fb)
    Ma27 committed Mar 29, 2020
    Copy the full SHA
    834fb02 View commit details

Commits on Apr 2, 2020

  1. postgresql-wal-receiver: fix test for Pg12 (#80268)

    Fixes #80060
    
    (cherry picked from commit 56c4800)
    danbst committed Apr 2, 2020
    Copy the full SHA
    1bdc619 View commit details
  2. Merge pull request #82350 from Mic92/haproxy

    [backport-20.03] nixos/haproxy: Revive the haproxy user and group
    Mic92 authored Apr 2, 2020
    Copy the full SHA
    e3cf1bd View commit details
  3. chromium: fix webrtc interaction with pulseaudio

    The webrtc code suffered from a race condition when used
    with Pulseaudio. This lead to audio input breaking every
    couple of minutes during a webrtc session.
    
    (cherry picked from commit 81b18c3)
    peti authored and primeos committed Apr 2, 2020
    Copy the full SHA
    5c8fdaa View commit details
  4. chromium: I accidentally added the webrtc patch into the wrong section

    (cherry picked from commit b3c2908)
    peti authored and primeos committed Apr 2, 2020
    Copy the full SHA
    e7c0dc6 View commit details
  5. chromium: Add option to enable ozone (for Wayland)

    (cherry picked from commit b3e1a1b)
    artemist authored and primeos committed Apr 2, 2020
    Copy the full SHA
    b36c9fa View commit details
  6. Copy the full SHA
    bb34ef3 View commit details
  7. chromiumDev: Remove a patch that is already applied

    This fixes the patch phase.
    I missed this problem in #83956.
    
    (cherry picked from commit 36c7123)
    primeos committed Apr 2, 2020
    Copy the full SHA
    6997501 View commit details
  8. Copy the full SHA
    fea9f4e View commit details
  9. linux: 5.4.29 -> 5.4.30

    NeQuissimus committed Apr 2, 2020
    Copy the full SHA
    d4cd5a8 View commit details
  10. linux: 5.5.14 -> 5.5.15

    NeQuissimus committed Apr 2, 2020
    Copy the full SHA
    c9f15e2 View commit details
  11. nixos/moinmoin: fix maintainer reference

    (cherry picked from commit f35d658)
    mmilata committed Apr 2, 2020
    Copy the full SHA
    866017f View commit details
  12. Merge pull request #84114 from mmilata/moinmoin-b42-20.03

    nixos/moinmoin: fix maintainer reference
    infinisil authored Apr 2, 2020
    Copy the full SHA
    e071ed1 View commit details
  13. texlive.combine: set TEXMFCNF in binary wrapper

    This helps kpathsea to find texmf.cnf in some cases. For example,
    dvipng was trying to look for it in
    /nix/store/<hash>-texlive-dvipng.bin-2019/ instead of
    /nix/store/<hash>-texlive-combined-full-2019/.
    
    (cherry picked from commit 91c9f2a)
    cc #83816
    veprbl committed Apr 2, 2020
    Copy the full SHA
    c8d2553 View commit details
  14. scallion: use openssl 1.0

    it does not work with openssl 1.1 (upstream issue lachesis/scallion#113)
    
    (cherry picked from commit 8195e7e)
    volth authored and Mic92 committed Apr 2, 2020
    Copy the full SHA
    c8baff2 View commit details
  15. Copy the full SHA
    1c38dc5 View commit details
  16. Copy the full SHA
    306226b View commit details
  17. Copy the full SHA
    8bbceb7 View commit details
  18. Copy the full SHA
    50bfd35 View commit details
  19. packagekit: Don't depend on nix unless enableNixBackend = true

    (cherry picked from commit 9737f24)
    edolstra committed Apr 2, 2020
    Copy the full SHA
    5bf91db View commit details

Commits on Apr 3, 2020

  1. chromium: 80.0.3987.162 -> 80.0.3987.163

    https://chromereleases.googleblog.com/2020/04/stable-channel-update-for-desktop.html
    
    Note: This update contains only two fixes [0]. The fix that reverts a
    feature which caused a crash spike on 80.0.3987.162 [1] seems important
    for us (though the commit doesn't provide any data on the crash spike).
    
    [0]: https://chromium.googlesource.com/chromium/src/+log/80.0.3987.162..80.0.3987.163?pretty=fuller
    [1]: https://chromium.googlesource.com/chromium/src/+/fc11c43603c05a9ef77430a6b4081a01969d2bf4
    
    (cherry picked from commit cbd13f3)
    Backport of #84174.
    primeos committed Apr 3, 2020
    Copy the full SHA
    2e31905 View commit details
  2. haskell shellFor: Fix hoogle

    (cherry picked from commit 1c07ee7)
    Ericson2314 authored and schmittlauch committed Apr 3, 2020
    Copy the full SHA
    c565d7c View commit details
  3. nix-daemon.nix: Add option nix.registry

    This allows you to specify the system-wide flake registry. One use is
    to pin 'nixpkgs' to the Nixpkgs version used to build the system:
    
      nix.registry.nixpkgs.flake = nixpkgs;
    
    where 'nixpkgs' is a flake input. This ensures that commands like
    
      $ nix run nixpkgs#hello
    
    pull in a minimum of additional store paths.
    
    You can also use this to redirect flakes, e.g.
    
      nix.registry.nixpkgs.to = {
        type = "github";
        owner = "my-org";
        repo = "my-nixpkgs";
      };
    
    (cherry picked from commit 74e7ef3)
    edolstra committed Apr 3, 2020
    Copy the full SHA
    cf0855c View commit details
  4. Merge pull request #84181 from schmittlauch/fixHoogleStable

    [backport] haskell shellFor: Fix hoogle
    cdepillabout authored Apr 3, 2020
    Copy the full SHA
    c778e13 View commit details
  5. Don't pin 'nixpkgs' in the system registry by default

    Nixpkgs takes up a lot of disk space so we shouldn't do this by
    default.
    
    (cherry picked from commit 469f14e)
    edolstra committed Apr 3, 2020
    Copy the full SHA
    b255cd7 View commit details
  6. mariadb: build server with NUMA

    (cherry picked from commit c6d159d)
    Izorkin authored and flokli committed Apr 3, 2020
    Copy the full SHA
    988bb1f View commit details
  7. mariadb: add needed packages

    (cherry picked from commit 982a23d)
    Izorkin authored and flokli committed Apr 3, 2020
    Copy the full SHA
    95c2e02 View commit details
  8. mariadb: remove withoutClient

    When used as a global override, it breaks most of the options in the
    mysql module, such as ensureDatabases, ensureUsers, initialDatabases,
    initialScript.
    
    We could use `.client` there, but if the reasoning behind this was
    closure size reduction, we now end up with the same (or a bigger)
    runtime closure and more complexity.
    
    Apart from the options exposed by the mysql module, the client is also
    likely to be required for local backups or DBA tasks anyways.
    
    Instead of dealing with all the increased complexity of this for no
    arguable benefit, let's just remove the `withoutClient` argument.
    Storage space on mysql servers shouldn't be that much of an issue.
    
    Closes #82428.
    
    (cherry picked from commit 4b8d66a)
    flokli committed Apr 3, 2020
    Copy the full SHA
    a9d0d05 View commit details
  9. mariadb: add option to build server without tokudb storage

    (cherry picked from commit 0296e67)
    Izorkin authored and flokli committed Apr 3, 2020
    Copy the full SHA
    a05099d View commit details
  10. mariadb: add option to build server without rocksdb storage

    (cherry picked from commit eafdfc8)
    Izorkin authored and flokli committed Apr 3, 2020
    Copy the full SHA
    bf94267 View commit details
  11. mariadb: add zstd compression

    (cherry picked from commit 2435743)
    Izorkin authored and flokli committed Apr 3, 2020
    Copy the full SHA
    6254058 View commit details
  12. mariadb: fix deps build

    (cherry picked from commit 5abc729)
    Izorkin authored and flokli committed Apr 3, 2020
    Copy the full SHA
    c0c04ea View commit details
  13. Merge pull request #84164 from Izorkin/mariadb-tokudb-20.03

    [20.03] mariadb: backport updates
    flokli authored Apr 3, 2020
    Copy the full SHA
    e89b106 View commit details
  14. Merge pull request #83628 from Ma27/mongodb-20.03

    [20.03] mongodb: update
    Ma27 authored Apr 3, 2020
    Copy the full SHA
    0abd4fd View commit details
  15. Copy the full SHA
    e79a142 View commit details
Showing with 449 additions and 172 deletions.
  1. +1 −1 flake.nix
  2. +7 −0 lib/licenses.nix
  3. +20 −0 nixos/doc/manual/release-notes/rl-2003.xml
  4. +2 −2 nixos/modules/misc/ids.nix
  5. +58 −0 nixos/modules/services/misc/nix-daemon.nix
  6. +25 −1 nixos/modules/services/networking/haproxy.nix
  7. +1 −1 nixos/modules/services/web-apps/moinmoin.nix
  8. +47 −37 nixos/tests/mongodb.nix
  9. +16 −3 nixos/tests/postgresql-wal-receiver.nix
  10. +17 −1 pkgs/applications/networking/browsers/chromium/common.nix
  11. +2 −1 pkgs/applications/networking/browsers/chromium/default.nix
  12. +9 −9 pkgs/applications/networking/browsers/chromium/upstream-info.nix
  13. +4 −4 pkgs/development/haskell-modules/make-package-set.nix
  14. +2 −2 pkgs/os-specific/linux/kernel/linux-4.14.nix
  15. +2 −2 pkgs/os-specific/linux/kernel/linux-4.19.nix
  16. +2 −2 pkgs/os-specific/linux/kernel/linux-4.4.nix
  17. +2 −2 pkgs/os-specific/linux/kernel/linux-4.9.nix
  18. +2 −2 pkgs/os-specific/linux/kernel/linux-5.4.nix
  19. +2 −2 pkgs/os-specific/linux/kernel/linux-5.5.nix
  20. +2 −2 pkgs/servers/matrix-synapse/default.nix
  21. +20 −0 pkgs/servers/nosql/mongodb/asio-no-experimental-string-view.patch
  22. +17 −0 pkgs/servers/nosql/mongodb/forget-build-dependencies-3-4.patch
  23. +3 −7 pkgs/servers/nosql/mongodb/forget-build-dependencies.patch
  24. +52 −41 pkgs/servers/nosql/mongodb/{default.nix → mongodb.nix}
  25. +27 −0 pkgs/servers/nosql/mongodb/mozjs-45_fix-3-byte-opcode.patch
  26. +15 −0 pkgs/servers/nosql/mongodb/v3_4.nix
  27. +16 −0 pkgs/servers/nosql/mongodb/v3_6.nix
  28. +17 −0 pkgs/servers/nosql/mongodb/v4_0.nix
  29. +0 −15 pkgs/servers/sql/mariadb/cmake-without-client.patch
  30. +31 −25 pkgs/servers/sql/mariadb/default.nix
  31. +3 −2 pkgs/tools/package-management/packagekit/default.nix
  32. +2 −2 pkgs/tools/security/scallion/default.nix
  33. +2 −1 pkgs/tools/typesetting/tex/texlive/combine.nix
  34. +20 −4 pkgs/top-level/all-packages.nix
  35. +1 −1 pkgs/top-level/make-tarball.nix
2 changes: 1 addition & 1 deletion flake.nix
Original file line number Diff line number Diff line change
@@ -25,7 +25,7 @@
import ./nixos/lib/eval-config.nix (args // {
modules = modules ++
[ { system.nixos.versionSuffix =
".${lib.substring 0 8 self.lastModified}.${self.shortRev or "dirty"}";
".${lib.substring 0 8 (self.lastModifiedDate or self.lastModified)}.${self.shortRev or "dirty"}";
system.nixos.revision = lib.mkIf (self ? rev) self.rev;
}
];
7 changes: 7 additions & 0 deletions lib/licenses.nix
Original file line number Diff line number Diff line change
@@ -649,6 +649,13 @@ lib.mapAttrs (n: v: v // { shortName = n; }) {
url = http://metadata.ftp-master.debian.org/changelogs/main/d/debianutils/debianutils_4.8.1_copyright;
};

sspl = {
shortName = "SSPL";
fullName = "Server Side Public License";
url = https://www.mongodb.com/licensing/server-side-public-license;
free = false;
};

tcltk = spdx {
spdxId = "TCL";
fullName = "TCL/TK License";
20 changes: 20 additions & 0 deletions nixos/doc/manual/release-notes/rl-2003.xml
Original file line number Diff line number Diff line change
@@ -1007,6 +1007,12 @@ auth required pam_succeed_if.so uid >= 1000 quiet
</warning>
</para>
</listitem>
<listitem>
<para>
The TokuDB storage engine will be disabled in <package>mariadb</package> 10.5. It is recommended to switch
to RocksDB. See also <link xlink:href="https://mariadb.com/kb/en/tokudb/">TokuDB</link>.
</para>
</listitem>
</itemizedlist>
</section>

@@ -1135,6 +1141,20 @@ auth required pam_succeed_if.so uid >= 1000 quiet
not <command>systemd-networkd</command>.
</para>
</listitem>
<listitem>
<para>
<package>mongodb</package> has been updated to version <literal>3.4.24</literal>.
<warning>
<para>
Please note that <package>mongodb</package> has been relicensed under their own
<link xlink:href="https://www.mongodb.com/licensing/server-side-public-license/faq"><literal>
sspl</literal></link>-license. Since it's not entirely free and not OSI-approved,
it's listed as non-free. This means that Hydra doesn't provide prebuilt
<package>mongodb</package>-packages and needs to be built locally.
</para>
</warning>
</para>
</listitem>
</itemizedlist>
</section>
</section>
4 changes: 2 additions & 2 deletions nixos/modules/misc/ids.nix
Original file line number Diff line number Diff line change
@@ -133,7 +133,7 @@ in
tcpcryptd = 93; # tcpcryptd uses a hard-coded uid. We patch it in Nixpkgs to match this choice.
firebird = 95;
#keys = 96; # unused
#haproxy = 97; # DynamicUser as of 2019-11-08
#haproxy = 97; # dynamically allocated as of 2020-03-11
mongodb = 98;
openldap = 99;
#users = 100; # unused
@@ -448,7 +448,7 @@ in
#tcpcryptd = 93; # unused
firebird = 95;
keys = 96;
#haproxy = 97; # DynamicUser as of 2019-11-08
#haproxy = 97; # dynamically allocated as of 2020-03-11
#mongodb = 98; # unused
openldap = 99;
munin = 102;
58 changes: 58 additions & 0 deletions nixos/modules/services/misc/nix-daemon.nix
Original file line number Diff line number Diff line change
@@ -376,6 +376,59 @@ in
If enabled (the default), checks that Nix can parse the generated nix.conf.
'';
};

registry = mkOption {
type = types.attrsOf (types.submodule (
let
inputAttrs = types.attrsOf (types.oneOf [types.str types.int types.bool types.package]);
in
{ config, name, ... }:
{ options = {
from = mkOption {
type = inputAttrs;
example = { type = "indirect"; id = "nixpkgs"; };
description = "The flake reference to be rewritten.";
};
to = mkOption {
type = inputAttrs;
example = { type = "github"; owner = "my-org"; repo = "my-nixpkgs"; };
description = "The flake reference to which <option>from></option> is to be rewritten.";
};
flake = mkOption {
type = types.unspecified;
default = null;
example = literalExample "nixpkgs";
description = ''
The flake input to which <option>from></option> is to be rewritten.
'';
};
exact = mkOption {
type = types.bool;
default = true;
description = ''
Whether the <option>from</option> reference needs to match exactly. If set,
a <option>from</option> reference like <literal>nixpkgs</literal> does not
match with a reference like <literal>nixpkgs/nixos-20.03</literal>.
'';
};
};
config = {
from = mkDefault { type = "indirect"; id = name; };
to = mkIf (config.flake != null)
({ type = "path";
path = config.flake.outPath;
} // lib.filterAttrs
(n: v: n == "lastModified" || n == "rev" || n == "revCount" || n == "narHash")
config.flake);
};
}
));
default = {};
description = ''
A system-wide flake registry.
'';
};

};

};
@@ -390,6 +443,11 @@ in

environment.etc."nix/nix.conf".source = nixConf;

environment.etc."nix/registry.json".text = builtins.toJSON {
version = 2;
flakes = mapAttrsToList (n: v: { inherit (v) from to exact; }) cfg.registry;
};

# List of machines for distributed Nix builds in the format
# expected by build-remote.pl.
environment.etc."nix/machines" =
26 changes: 25 additions & 1 deletion nixos/modules/services/networking/haproxy.nix
Original file line number Diff line number Diff line change
@@ -26,6 +26,18 @@ with lib;
'';
};

user = mkOption {
type = types.str;
default = "haproxy";
description = "User account under which haproxy runs.";
};

group = mkOption {
type = types.str;
default = "haproxy";
description = "Group account under which haproxy runs.";
};

config = mkOption {
type = types.nullOr types.lines;
default = null;
@@ -49,7 +61,8 @@ with lib;
after = [ "network.target" ];
wantedBy = [ "multi-user.target" ];
serviceConfig = {
DynamicUser = true;
User = cfg.user;
Group = cfg.group;
Type = "notify";
# when running the config test, don't be quiet so we can see what goes wrong
ExecStartPre = "${pkgs.haproxy}/sbin/haproxy -c -f ${haproxyCfg}";
@@ -60,5 +73,16 @@ with lib;
AmbientCapabilities = "CAP_NET_BIND_SERVICE";
};
};

users.users = optionalAttrs (cfg.user == "haproxy") {
haproxy = {
group = cfg.group;
isSystemUser = true;
};
};

users.groups = optionalAttrs (cfg.group == "haproxy") {
haproxy = {};
};
};
}
2 changes: 1 addition & 1 deletion nixos/modules/services/web-apps/moinmoin.nix
Original file line number Diff line number Diff line change
@@ -299,5 +299,5 @@ in
])));
};

meta.maintainers = with lib.maintainers; [ b42 ];
meta.maintainers = with lib.maintainers; [ mmilata ];
}
84 changes: 47 additions & 37 deletions nixos/tests/mongodb.nix
Original file line number Diff line number Diff line change
@@ -1,42 +1,52 @@
# This test start mongodb, runs a query using mongo shell

import ./make-test-python.nix ({ pkgs, ...} : let
testQuery = pkgs.writeScript "nixtest.js" ''
db.greetings.insert({ "greeting": "hello" });
print(db.greetings.findOne().greeting);
'';
in {
name = "mongodb";
meta = with pkgs.stdenv.lib.maintainers; {
maintainers = [ bluescreen303 offline cstrahan rvl phile314 ];
};
import ./make-test-python.nix ({ pkgs, ... }:
let
testQuery = pkgs.writeScript "nixtest.js" ''
db.greetings.insert({ "greeting": "hello" });
print(db.greetings.findOne().greeting);
'';

nodes = {
one =
{ ... }:
{
services = {
mongodb.enable = true;
mongodb.enableAuth = true;
mongodb.initialRootPassword = "root";
mongodb.initialScript = pkgs.writeText "mongodb_initial.js" ''
db = db.getSiblingDB("nixtest");
db.createUser({user:"nixtest",pwd:"nixtest",roles:[{role:"readWrite",db:"nixtest"}]});
'';
mongodb.extraConfig = ''
# Allow starting engine with only a small virtual disk
storage.journal.enabled: false
storage.mmapv1.smallFiles: true
'';
};
};
runMongoDBTest = pkg: ''
node.execute("(rm -rf data || true) && mkdir data")
node.execute(
"${pkg}/bin/mongod --fork --logpath logs --dbpath data"
)
node.wait_for_open_port(27017)
assert "hello" in node.succeed(
"mongo ${testQuery}"
)
node.execute(
"${pkg}/bin/mongod --shutdown --dbpath data"
)
node.wait_for_closed_port(27017)
'';

in {
name = "mongodb";
meta = with pkgs.stdenv.lib.maintainers; {
maintainers = [ bluescreen303 offline cstrahan rvl phile314 ];
};

nodes = {
node = {...}: {
environment.systemPackages = with pkgs; [
mongodb-3_4
mongodb-3_6
mongodb-4_0
];
};
};

testScript = ''
start_all()
one.wait_for_unit("mongodb.service")
one.succeed(
"mongo -u nixtest -p nixtest nixtest ${testQuery} | grep -q hello"
)
'';
})
testScript = ''
node.start()
''
+ runMongoDBTest pkgs.mongodb-3_4
+ runMongoDBTest pkgs.mongodb-3_6
+ runMongoDBTest pkgs.mongodb-4_0
+ ''
node.shutdown()
'';
})
19 changes: 16 additions & 3 deletions nixos/tests/postgresql-wal-receiver.nix
Original file line number Diff line number Diff line change
@@ -6,17 +6,24 @@ with import ../lib/testing.nix { inherit system pkgs; };
with pkgs.lib;

let
makePostgresqlWalReceiverTest = subTestName: postgresqlPackage: let

postgresqlDataDir = "/var/db/postgresql/test";
replicationUser = "wal_receiver_user";
replicationSlot = "wal_receiver_slot";
replicationConn = "postgresql://${replicationUser}@localhost";
baseBackupDir = "/tmp/pg_basebackup";
walBackupDir = "/tmp/pg_wal";
recoveryConf = pkgs.writeText "recovery.conf" ''
atLeast12 = versionAtLeast postgresqlPackage.version "12.0";
restoreCommand = ''
restore_command = 'cp ${walBackupDir}/%f %p'
'';

makePostgresqlWalReceiverTest = subTestName: postgresqlPackage: makeTest {
recoveryFile = if atLeast12
then pkgs.writeTextDir "recovery.signal" ""
else pkgs.writeTextDir "recovery.conf" "${restoreCommand}";

in makeTest {
name = "postgresql-wal-receiver-${subTestName}";
meta.maintainers = with maintainers; [ pacien ];

@@ -29,6 +36,9 @@ let
wal_level = archive # alias for replica on pg >= 9.6
max_wal_senders = 10
max_replication_slots = 10
'' + optionalString atLeast12 ''
${restoreCommand}
recovery_end_command = 'touch recovery.done'
'';
authentication = ''
host replication ${replicationUser} all trust
@@ -45,6 +55,9 @@ let
slot = replicationSlot;
directory = walBackupDir;
};
# This is only to speedup test, it isn't time racing. Service is set to autorestart always,
# default 60sec is fine for real system, but is too much for a test
systemd.services.postgresql-wal-receiver-main.serviceConfig.RestartSec = mkForce 5;
};

testScript = ''
@@ -70,7 +83,7 @@ let
# prepare WAL and recovery
$machine->succeed('chmod a+rX -R ${walBackupDir}');
$machine->execute('for part in ${walBackupDir}/*.partial; do mv $part ''${part%%.*}; done'); # make use of partial segments too
$machine->succeed('cp ${recoveryConf} ${postgresqlDataDir}/recovery.conf && chmod 666 ${postgresqlDataDir}/recovery.conf');
$machine->succeed('cp ${recoveryFile}/* ${postgresqlDataDir}/ && chmod 666 ${postgresqlDataDir}/recovery*');
# replay WAL
$machine->systemctl('start postgresql');
18 changes: 17 additions & 1 deletion pkgs/applications/networking/browsers/chromium/common.nix
Original file line number Diff line number Diff line change
@@ -21,9 +21,11 @@
# optional dependencies
, libgcrypt ? null # gnomeSupport || cupsSupport
, libva ? null # useVaapi
, libdrm ? null, wayland ? null, mesa_drivers ? null, libxkbcommon ? null # useOzone

# package customization
, useVaapi ? false
, useOzone ? false
, gnomeSupport ? false, gnome ? null
, gnomeKeyringSupport ? false, libgnome-keyring3 ? null
, proprietaryCodecs ? true
@@ -129,7 +131,8 @@ let
++ optionals gnomeSupport [ gnome.GConf libgcrypt ]
++ optionals cupsSupport [ libgcrypt cups ]
++ optional useVaapi libva
++ optional pulseSupport libpulseaudio;
++ optional pulseSupport libpulseaudio
++ optionals useOzone [ libdrm wayland mesa_drivers libxkbcommon ];

patches = [
./patches/nix_plugin_paths_68.patch
@@ -146,6 +149,9 @@ let
#
# ++ optionals (channel == "dev") [ ( githubPatch "<patch>" "0000000000000000000000000000000000000000000000000000000000000000" ) ]
# ++ optional (versionRange "68" "72") ( githubPatch "<patch>" "0000000000000000000000000000000000000000000000000000000000000000" )
] ++ optionals (versionRange "80" "82.0.4076.0") [
# fix race condition in the interaction with pulseaudio
(githubPatch "704dc99bd05a94eb61202e6127df94ddfd571e85" "0nzwzfwliwl0959j35l0gn94sbsnkghs3dh1b9ka278gi7q4648z")
] ++ optionals (useVaapi) [
# source: https://aur.archlinux.org/cgit/aur.git/tree/vaapi-fix.patch?h=chromium-vaapi
./patches/vaapi-fix.patch
@@ -259,6 +265,16 @@ let
} // optionalAttrs pulseSupport {
use_pulseaudio = true;
link_pulseaudio = true;
} // optionalAttrs useOzone {
use_ozone = true;
ozone_platform_gbm = false;
use_xkbcommon = true;
use_glib = true;
use_gtk = true;
use_system_libwayland = true;
use_system_minigbm = true;
use_system_libdrm = true;
system_wayland_scanner_path = "${wayland}/bin/wayland-scanner";
} // (extraAttrs.gnFlags or {}));

configurePhase = ''
Loading