Merge release-20.03 into staging-20.03

This commit is contained in:
Frederik Rietdijk
2020-04-03 21:55:55 +02:00
35 changed files with 447 additions and 170 deletions

View File

@@ -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;
}
];

View File

@@ -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";

View File

@@ -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>

View File

@@ -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;

View File

@@ -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" =

View File

@@ -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 = {};
};
};
}

View File

@@ -299,5 +299,5 @@ in
])));
};
meta.maintainers = with lib.maintainers; [ b42 ];
meta.maintainers = with lib.maintainers; [ mmilata ];
}

View File

@@ -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 ];
};
testScript = ''
start_all()
one.wait_for_unit("mongodb.service")
one.succeed(
"mongo -u nixtest -p nixtest nixtest ${testQuery} | grep -q hello"
)
'';
})
nodes = {
node = {...}: {
environment.systemPackages = with pkgs; [
mongodb-3_4
mongodb-3_6
mongodb-4_0
];
};
};
testScript = ''
node.start()
''
+ runMongoDBTest pkgs.mongodb-3_4
+ runMongoDBTest pkgs.mongodb-3_6
+ runMongoDBTest pkgs.mongodb-4_0
+ ''
node.shutdown()
'';
})

View File

@@ -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');

View File

@@ -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 = ''

View File

@@ -13,6 +13,7 @@
, enablePepperFlash ? false
, enableWideVine ? false
, useVaapi ? false # test video on radeon, before enabling this
, useOzone ? false
, cupsSupport ? true
, pulseSupport ? config.pulseaudio or stdenv.isLinux
, commandLineArgs ? ""
@@ -30,7 +31,7 @@ let
upstream-info = (callPackage ./update.nix {}).getChannel channel;
mkChromiumDerivation = callPackage ./common.nix {
inherit gnome gnomeSupport gnomeKeyringSupport proprietaryCodecs cupsSupport pulseSupport useVaapi;
inherit gnome gnomeSupport gnomeKeyringSupport proprietaryCodecs cupsSupport pulseSupport useVaapi useOzone;
};
browser = callPackage ./browser.nix { inherit channel enableWideVine; };

View File

@@ -1,18 +1,18 @@
# This file is autogenerated from update.sh in the same directory.
{
beta = {
sha256 = "177hv5jkgpcbi6khk7j883rf3rzzkjmi8cqqpzckaiw7pcwsvyvd";
sha256bin64 = "0sicz51d2l3gj70mfpyh5idwarjl19pba5lc6ahznxxqsrjfp80r";
version = "81.0.4044.69";
sha256 = "0i0szd749ihb08rxnsmsbxq75b6x952wpk94jwc0ncv6gb83zkx2";
sha256bin64 = "1y70kmfz9nv507b0zdda7zfk2ac9qh9m2gq00aphdmzd0al7skj8";
version = "81.0.4044.92";
};
dev = {
sha256 = "0s0072rmg287iijh6wwm9i5a5fsh96qm6nhd13xwbxrvj6pldb7n";
sha256bin64 = "0l5ljjz0s5x9727syq4gs5xshl9vs8apvw6xw8il0xy5qax32g85";
version = "82.0.4083.0";
sha256 = "1rydvjmv62zj95sf0fgsyipqz2hphbxm60y8q0813wq9ym35d4yy";
sha256bin64 = "1m6740lw7xjjp1lplwp9ii4d3l7dfa9jrv5bysm4ar5pb9kywrai";
version = "83.0.4100.3";
};
stable = {
sha256 = "07icl3hgg1wjkmz88lbpjf6ll4xyi64spki1nmsy6899jgkxvgjh";
sha256bin64 = "0qgp6hv4qj04v6pzfx9ggjvcl1vi6ljjc3cpi4hfr67p4jab40ji";
version = "80.0.3987.149";
sha256 = "0ikk4cgz3jgjhyncsvlqvlc03y7jywjpa6v34fwsjxs88flyzpdn";
sha256bin64 = "1ks0i6vdxbmixnfz2b128yf9hsk5pm9x2j17nm3xg3245k0z22xr";
version = "80.0.3987.163";
};
}

View File

@@ -315,10 +315,10 @@ in package-set { inherit pkgs stdenv callPackage; } self // {
in self.mkDerivation genericBuilderArgs;
envFuncArgs = builtins.removeAttrs args [ "packages" ];
in (combinedPackageFor packages).env.overrideAttrs (old: envFuncArgs // {
nativeBuildInputs = old.nativeBuildInputs ++ envFuncArgs.nativeBuildInputs or [];
buildInputs = old.buildInputs ++ envFuncArgs.buildInputs or [];
mkDerivationArgs = builtins.removeAttrs args [ "packages" "withHoogle" ];
in ((combinedPackageFor packages).envFunc { inherit withHoogle; }).overrideAttrs (old: mkDerivationArgs // {
nativeBuildInputs = old.nativeBuildInputs ++ mkDerivationArgs.nativeBuildInputs or [];
buildInputs = old.buildInputs ++ mkDerivationArgs.buildInputs or [];
});
ghc = ghc // {

View File

@@ -3,7 +3,7 @@
with stdenv.lib;
buildLinux (args // rec {
version = "4.14.174";
version = "4.14.175";
# modDirVersion needs to be x.y.z, will automatically add .0 if needed
modDirVersion = if (modDirVersionArg == null) then concatStringsSep "." (take 3 (splitVersion "${version}.0")) else modDirVersionArg;
@@ -13,6 +13,6 @@ buildLinux (args // rec {
src = fetchurl {
url = "mirror://kernel/linux/kernel/v4.x/linux-${version}.tar.xz";
sha256 = "12ai2lc2ny38s93d0m5ngrv030vwv1h2hhzp0fs6fhjxasikq8jc";
sha256 = "0b12w0d21sk261jr4p1pm32v0r20a5c2j1p5hasdqw80sb2hli6b";
};
} // (args.argsOverride or {}))

View File

@@ -3,7 +3,7 @@
with stdenv.lib;
buildLinux (args // rec {
version = "4.19.113";
version = "4.19.114";
# modDirVersion needs to be x.y.z, will automatically add .0 if needed
modDirVersion = if (modDirVersionArg == null) then concatStringsSep "." (take 3 (splitVersion "${version}.0")) else modDirVersionArg;
@@ -13,6 +13,6 @@ buildLinux (args // rec {
src = fetchurl {
url = "mirror://kernel/linux/kernel/v4.x/linux-${version}.tar.xz";
sha256 = "1rf0jz7r1f4rb4k0g3glssfa1hm2ka6vlbwjlkmsx1bybxnmg85m";
sha256 = "03hz6vg5bg728ilbm4z997pf52cgxzsxb03vz5cs55gwdbfa0h0y";
};
} // (args.argsOverride or {}))

View File

@@ -1,11 +1,11 @@
{ stdenv, buildPackages, fetchurl, perl, buildLinux, ... } @ args:
buildLinux (args // rec {
version = "4.4.217";
version = "4.4.218";
extraMeta.branch = "4.4";
src = fetchurl {
url = "mirror://kernel/linux/kernel/v4.x/linux-${version}.tar.xz";
sha256 = "0vsjchywznmjn01flgvm9vsja5zqni319rfwgy997afcbz0c9spx";
sha256 = "0qzhcy8i111jbpnkpzq7hqf9nkwq4s7smi820hfvnmd2ky7cns7a";
};
} // (args.argsOverride or {}))

View File

@@ -1,11 +1,11 @@
{ stdenv, buildPackages, fetchurl, perl, buildLinux, ... } @ args:
buildLinux (args // rec {
version = "4.9.217";
version = "4.9.218";
extraMeta.branch = "4.9";
src = fetchurl {
url = "mirror://kernel/linux/kernel/v4.x/linux-${version}.tar.xz";
sha256 = "06b8av9f9pk2yp95nzv4322k0d5wsg40sxd9kfim1xzb093abckg";
sha256 = "1ka98c8sbfipzll6ss9fcsn26lh4cy60372yfw27pif4brhnwfnz";
};
} // (args.argsOverride or {}))

View File

@@ -3,7 +3,7 @@
with stdenv.lib;
buildLinux (args // rec {
version = "5.4.29";
version = "5.4.30";
# modDirVersion needs to be x.y.z, will automatically add .0 if needed
modDirVersion = if (modDirVersionArg == null) then concatStringsSep "." (take 3 (splitVersion "${version}.0")) else modDirVersionArg;
@@ -13,6 +13,6 @@ buildLinux (args // rec {
src = fetchurl {
url = "mirror://kernel/linux/kernel/v5.x/linux-${version}.tar.xz";
sha256 = "1jssjnhwjh1my42vskm9h2b7rpc0ncvf2428y2aqm558ihia9ln7";
sha256 = "1vwx6j87pkfyq68chng1hy0c85hpc2byabiv1pcikrmw07vpip8i";
};
} // (args.argsOverride or {}))

View File

@@ -3,7 +3,7 @@
with stdenv.lib;
buildLinux (args // rec {
version = "5.5.14";
version = "5.5.15";
# modDirVersion needs to be x.y.z, will automatically add .0 if needed
modDirVersion = if (modDirVersionArg == null) then concatStringsSep "." (take 3 (splitVersion "${version}.0")) else modDirVersionArg;
@@ -13,6 +13,6 @@ buildLinux (args // rec {
src = fetchurl {
url = "mirror://kernel/linux/kernel/v5.x/linux-${version}.tar.xz";
sha256 = "0spgja8pk8m3fdhhnf50d0z0bzbzdpjd12d7w23iiw8d2179wljc";
sha256 = "0572gkkz3460x0z4494vy3as57ks5gwndmm0y1dxwlry5q2xh7y4";
};
} // (args.argsOverride or {}))

View File

@@ -23,11 +23,11 @@ let
in buildPythonApplication rec {
pname = "matrix-synapse";
version = "1.12.0";
version = "1.12.1";
src = fetchPypi {
inherit pname version;
sha256 = "18wavnb47w4hfh8dc7g77bfhz03zh1xzl58mxlfi0000qsbkz680";
sha256 = "0l3a5dvnahrzwqh8p0cnfr019bxxgd769jk2wprfvfd65h7p0g1r";
};
patches = [

View File

@@ -0,0 +1,20 @@
diff --git a/src/third_party/asio-master/asio/include/asio/detail/config.hpp b/src/third_party/asio-master/asio/include/asio/detail/config.hpp
index 7fe6a95a..ff4cc56b 100644
--- a/src/third_party/asio-master/asio/include/asio/detail/config.hpp
+++ b/src/third_party/asio-master/asio/include/asio/detail/config.hpp
@@ -786,7 +786,6 @@
# if (__cplusplus >= 201402)
# if __has_include(<experimental/string_view>)
# define ASIO_HAS_STD_STRING_VIEW 1
-# define ASIO_HAS_STD_EXPERIMENTAL_STRING_VIEW 1
# endif // __has_include(<experimental/string_view>)
# endif // (__cplusplus >= 201402)
# endif // defined(__clang__)
@@ -794,7 +793,6 @@
# if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 9)) || (__GNUC__ > 4)
# if (__cplusplus >= 201402)
# define ASIO_HAS_STD_STRING_VIEW 1
-# define ASIO_HAS_STD_EXPERIMENTAL_STRING_VIEW 1
# endif // (__cplusplus >= 201402)
# endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 7)) || (__GNUC__ > 4)
# endif // defined(__GNUC__)

View File

@@ -0,0 +1,17 @@
--- a/site_scons/mongo_scons_utils.py
+++ b/site_scons/mongo_scons_utils.py
@@ -84,14 +84,11 @@
def default_buildinfo_environment_data():
return (
('distmod', '$MONGO_DISTMOD', True, True,),
('distarch', '$MONGO_DISTARCH', True, True,),
('cc', '$CC_VERSION', True, False,),
- ('ccflags', '$CCFLAGS', True, False,),
('cxx', '$CXX_VERSION', True, False,),
- ('cxxflags', '$CXXFLAGS', True, False,),
- ('linkflags', '$LINKFLAGS', True, False,),
('target_arch', '$TARGET_ARCH', True, True,),
('target_os', '$TARGET_OS', True, False,),
)
# If you want buildInfo and --version to be relatively empty, set

View File

@@ -1,8 +1,6 @@
--- a/site_scons/mongo_scons_utils.py
+++ b/site_scons/mongo_scons_utils.py
@@ -84,14 +84,11 @@
def default_buildinfo_environment_data():
return (
--- a/site_scons/mongo/generators.py
+++ b/site_scons/mongo/generators.py
@@ -18,10 +18,7 @@ def default_buildinfo_environment_data():
('distmod', '$MONGO_DISTMOD', True, True,),
('distarch', '$MONGO_DISTARCH', True, True,),
('cc', '$CC_VERSION', True, False,),
@@ -13,5 +11,3 @@
('target_arch', '$TARGET_ARCH', True, True,),
('target_os', '$TARGET_OS', True, False,),
)
# If you want buildInfo and --version to be relatively empty, set

View File

@@ -1,58 +1,63 @@
{ stdenv, fetchurl, fetchpatch, scons, boost, gperftools, pcre-cpp, snappy
, zlib, libyamlcpp, sasl, openssl, libpcap, Security
}:
{ stdenv, fetchurl, scons, boost, gperftools, pcre-cpp, snappy, zlib, libyamlcpp
, sasl, openssl, libpcap, python27, curl, Security, CoreFoundation, cctools }:
# Note:
# The command line tools are written in Go as part of a different package (mongodb-tools)
with stdenv.lib;
let version = "3.4.10";
system-libraries = [
"pcre"
#"asio" -- XXX use package?
#"wiredtiger"
"boost"
"snappy"
"zlib"
#"valgrind" -- mongodb only requires valgrind.h, which is vendored in the source.
#"stemmer" -- not nice to package yet (no versioning, no makefile, no shared libs).
"yaml"
] ++ optionals stdenv.isLinux [ "tcmalloc" ];
{ version, sha256, patches ? [] }@args:
in stdenv.mkDerivation {
pname = "mongodb";
let
python = python27.withPackages (ps: with ps; [ pyyaml typing cheetah ]);
system-libraries = [
"boost"
"pcre"
"snappy"
"yaml"
"zlib"
#"asio" -- XXX use package?
#"stemmer" -- not nice to package yet (no versioning, no makefile, no shared libs).
#"valgrind" -- mongodb only requires valgrind.h, which is vendored in the source.
#"wiredtiger"
] ++ optionals stdenv.isLinux [ "tcmalloc" ];
inherit (stdenv.lib) systems subtractLists;
in stdenv.mkDerivation rec {
inherit version;
name = "mongodb-${version}";
src = fetchurl {
url = "https://fastdl.mongodb.org/src/mongodb-src-r${version}.tar.gz";
sha256 = "1wz2mhl9z0b1bdkg6m8v8mvw9k60mdv5ybq554xn3yjj9z500f24";
inherit sha256;
};
nativeBuildInputs = [ scons ];
buildInputs = [
sasl boost gperftools pcre-cpp snappy
zlib libyamlcpp sasl openssl.dev openssl.out libpcap
] ++ stdenv.lib.optionals stdenv.isDarwin [ Security ];
boost
curl
gperftools
libpcap
libyamlcpp
openssl
pcre-cpp
python
sasl
snappy
zlib
] ++ stdenv.lib.optionals stdenv.isDarwin [ Security CoreFoundation cctools ];
patches =
[
# MongoDB keeps track of its build parameters, which tricks nix into
# keeping dependencies to build inputs in the final output.
# We remove the build flags from buildInfo data.
./forget-build-dependencies.patch
(fetchpatch {
url = https://projects.archlinux.org/svntogit/community.git/plain/trunk/boost160.patch?h=packages/mongodb;
name = "boost160.patch";
sha256 = "0bvsf3499zj55pzamwjmsssr6x63w434944w76273fr5rxwzcmh8";
})
];
# MongoDB keeps track of its build parameters, which tricks nix into
# keeping dependencies to build inputs in the final output.
# We remove the build flags from buildInfo data.
inherit patches;
postPatch = ''
# fix environment variable reading
substituteInPlace SConstruct \
--replace "env = Environment(" "env = Environment(ENV = os.environ,"
'' + stdenv.lib.optionalString stdenv.isDarwin ''
substituteInPlace src/third_party/mozjs-45/extract/js/src/jsmath.cpp --replace 'defined(HAVE_SINCOS)' 0
substituteInPlace src/third_party/s2/s1angle.cc --replace drem remainder
substituteInPlace src/third_party/s2/s1interval.cc --replace drem remainder
@@ -66,13 +71,14 @@ in stdenv.mkDerivation {
--replace 'engine("wiredTiger")' 'engine("mmapv1")'
'';
NIX_CFLAGS_COMPILE = stdenv.lib.optionalString stdenv.cc.isClang "-Wno-unused-command-line-argument";
NIX_CFLAGS_COMPILE = stdenv.lib.optionalString stdenv.cc.isClang
"-Wno-unused-command-line-argument";
sconsFlags = [
"--release"
"--ssl"
#"--rocksdb" # Don't have this packaged yet
"--wiredtiger=${if stdenv.is64bit then "on" else "off"}"
"--wiredtiger=on"
"--js-engine=mozjs"
"--use-sasl-client"
"--disable-warnings-as-errors"
@@ -87,8 +93,13 @@ in stdenv.mkDerivation {
'';
preInstall = ''
mkdir -p $out/lib
mkdir -p "$out/lib"
'';
postInstall = ''
rm -f "$out/bin/install_compass" || true
'';
prefixKey = "--prefix=";
enableParallelBuilding = true;
@@ -97,10 +108,10 @@ in stdenv.mkDerivation {
meta = {
description = "A scalable, high-performance, open source NoSQL database";
homepage = http://www.mongodb.org;
license = licenses.agpl3;
homepage = "http://www.mongodb.org";
license = licenses.sspl;
maintainers = with maintainers; [ bluescreen303 offline cstrahan ];
platforms = platforms.unix;
platforms = subtractLists systems.doubles.i686 systems.doubles.unix;
};
}

View File

@@ -0,0 +1,27 @@
# HG changeset patch
# User Dan Gohman <sunfish@mozilla.com>
# Parent d9b405d82cffb07343a5f2fd941e029298c7f6c4
# Bug 1390214 - IonMonkey: Don't test for a 3-byte opcode in a 2-byte opcode predicate.
# https://bug1390214.bmoattachments.org/attachment.cgi?id=8902972
diff --git a/src/third_party/mozjs-45/extract/js/src/jit/x86-shared/Encoding-x86-shared.h b/src/third_party/mozjs-45/extract/js/src/jit/x86-shared/Encoding-x86-shared.h
--- a/src/third_party/mozjs-45/extract/js/src/jit/x86-shared/Encoding-x86-shared.h
+++ b/src/third_party/mozjs-45/extract/js/src/jit/x86-shared/Encoding-x86-shared.h
@@ -310,17 +310,16 @@ enum ThreeByteOpcodeID {
// Test whether the given opcode should be printed with its operands reversed.
inline bool IsXMMReversedOperands(TwoByteOpcodeID opcode)
{
switch (opcode) {
case OP2_MOVSD_WsdVsd: // also OP2_MOVPS_WpsVps
case OP2_MOVAPS_WsdVsd:
case OP2_MOVDQ_WdqVdq:
- case OP3_PEXTRD_EdVdqIb:
return true;
default:
break;
}
return false;
}
enum ThreeByteEscape {

View File

@@ -0,0 +1,15 @@
{ stdenv, callPackage, lib, sasl, boost, Security, CoreFoundation, cctools }:
let
buildMongoDB = callPackage ./mongodb.nix {
inherit sasl;
inherit boost;
inherit Security;
inherit CoreFoundation;
inherit cctools;
};
in buildMongoDB {
version = "3.4.24";
sha256 = "0j6mvgv0jnsnvgkl8505bl88kbxkba66qijlpi1la0dd5pd1imfr";
patches = [ ./forget-build-dependencies-3-4.patch ];
}

View File

@@ -0,0 +1,16 @@
{ stdenv, callPackage, lib, sasl, boost, Security, CoreFoundation, cctools }:
let
buildMongoDB = callPackage ./mongodb.nix {
inherit sasl;
inherit boost;
inherit Security;
inherit CoreFoundation;
inherit cctools;
};
in buildMongoDB {
version = "3.6.13";
sha256 = "1mbvk4bmabrswjdm01jssxcygjpq5799zqyx901nsi12vlcymwg4";
patches = [ ./forget-build-dependencies.patch ]
++ stdenv.lib.optionals stdenv.isDarwin [ ./asio-no-experimental-string-view.patch ];
}

View File

@@ -0,0 +1,17 @@
{ stdenv, callPackage, lib, sasl, boost, Security, CoreFoundation, cctools }:
let
buildMongoDB = callPackage ./mongodb.nix {
inherit sasl;
inherit boost;
inherit Security;
inherit CoreFoundation;
inherit cctools;
};
in buildMongoDB {
version = "4.0.12";
sha256 = "1j8dqa4jr623y87jrdanyib9r7x18srrvdx952q4azcc8zrdwci1";
patches =
[ ./forget-build-dependencies.patch ./mozjs-45_fix-3-byte-opcode.patch ]
++ stdenv.lib.optionals stdenv.isDarwin [ ./asio-no-experimental-string-view.patch ];
}

View File

@@ -1,15 +0,0 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 1ea7c1df..b0face0d 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -176,6 +176,10 @@ ELSE()
SET (SKIP_COMPONENTS "N-O-N-E")
ENDIF()
+IF (WITHOUT_CLIENT)
+ SET (SKIP_COMPONENTS "Client|ClientPlugins|ManPagesClient")
+ENDIF()
+
OPTION(NOT_FOR_DISTRIBUTION "Allow linking with GPLv2-incompatible system libraries. Only set it you never plan to distribute the resulting binaries" OFF)
INCLUDE(check_compiler_flag)

View File

@@ -1,8 +1,12 @@
{ stdenv, fetchurl, fetchFromGitHub, cmake, pkgconfig, makeWrapper, ncurses, zlib, xz, lzo, lz4, bzip2, snappy
{ stdenv, fetchurl, fetchFromGitHub, cmake, pkgconfig, makeWrapper, ncurses
, libiconv, openssl, pcre, boost, judy, bison, libxml2, libkrb5, linux-pam, curl
, libaio, libevent, jemalloc, cracklib, systemd, numactl, perl
, libaio, libevent, jemalloc450, jemalloc, cracklib, systemd, perl
, bzip2, lz4, lzo, snappy, xz, zlib, zstd
, fixDarwinDylibNames, cctools, CoreServices, less
, withoutClient ? false
, numactl # NUMA Support
, withStorageMroonga ? true, kytea, msgpack, zeromq
, withStorageRocks ? true
, withStorageToku ? true
}:
with stdenv.lib;
@@ -33,9 +37,11 @@ common = rec { # attributes common to both builds
nativeBuildInputs = [ cmake pkgconfig ];
buildInputs = [
ncurses openssl zlib pcre jemalloc libiconv curl
ncurses openssl zlib pcre libiconv curl
] ++ optionals stdenv.hostPlatform.isLinux [ libaio systemd libkrb5 ]
++ optionals stdenv.hostPlatform.isDarwin [ perl fixDarwinDylibNames cctools CoreServices ];
++ optionals stdenv.hostPlatform.isDarwin [ perl fixDarwinDylibNames cctools CoreServices ]
++ optional (!stdenv.hostPlatform.isDarwin && withStorageToku) [ jemalloc450 ]
++ optional (!stdenv.hostPlatform.isDarwin && !withStorageToku) [ jemalloc ];
prePatch = ''
sed -i 's,[^"]*/var/log,/var/log,g' storage/mroonga/vendor/groonga/CMakeLists.txt
@@ -79,8 +85,6 @@ common = rec { # attributes common to both builds
# to pass in java explicitly.
"-DCONNECT_WITH_JDBC=OFF"
"-DCURSES_LIBRARY=${ncurses.out}/lib/libncurses.dylib"
] ++ optionals stdenv.hostPlatform.isMusl [
"-DWITHOUT_TOKUDB=1" # mariadb docs say disable this for musl
];
postInstall = ''
@@ -98,6 +102,7 @@ common = rec { # attributes common to both builds
passthru.mysqlVersion = "5.7";
meta = {
description = "An enhanced, drop-in replacement for MySQL";
homepage = https://mariadb.org/;
license = licenses.gpl2;
@@ -137,18 +142,17 @@ server = stdenv.mkDerivation (common // {
outputs = [ "out" "man" ];
nativeBuildInputs = common.nativeBuildInputs ++ [ bison ] ++ optional (!stdenv.hostPlatform.isDarwin) makeWrapper;
nativeBuildInputs = common.nativeBuildInputs ++ [ bison boost.dev ] ++ optional (!stdenv.hostPlatform.isDarwin) makeWrapper;
buildInputs = common.buildInputs ++ [
xz lzo lz4 bzip2 snappy
libxml2 boost judy libevent cracklib
bzip2 lz4 lzo snappy xz zstd
libxml2 judy libevent cracklib
] ++ optional (stdenv.hostPlatform.isLinux && !stdenv.hostPlatform.isAarch32) numactl
++ optionals withStorageMroonga [ kytea msgpack zeromq ]
++ optional stdenv.hostPlatform.isLinux linux-pam
++ optional (!stdenv.hostPlatform.isDarwin) mytopEnv;
patches = common.patches ++ [
./cmake-without-client.patch
] ++ optionals stdenv.hostPlatform.isDarwin [
patches = common.patches ++ optionals stdenv.hostPlatform.isDarwin [
./cmake-without-plugin-auth-pam.patch
];
@@ -163,11 +167,20 @@ server = stdenv.mkDerivation (common // {
"-DWITH_INNODB_DISALLOW_WRITES=ON"
"-DWITHOUT_EXAMPLE=1"
"-DWITHOUT_FEDERATED=1"
] ++ optionals withoutClient [
"-DWITHOUT_CLIENT=ON"
] ++ optionals stdenv.hostPlatform.isDarwin [
"-DWITHOUT_OQGRAPH=1"
] ++ optional (stdenv.hostPlatform.isLinux && !stdenv.hostPlatform.isAarch32) [
"-DWITH_NUMA=ON"
] ++ optional (!withStorageMroonga) [
"-DWITHOUT_MROONGA=1"
] ++ optional (!withStorageRocks) [
"-DWITHOUT_ROCKSDB=1"
] ++ optional (!stdenv.hostPlatform.isDarwin && withStorageRocks) [
"-DWITH_ROCKSDB_JEMALLOC=ON"
] ++ optional (stdenv.hostPlatform.isDarwin || stdenv.hostPlatform.isMusl || !withStorageToku) [
"-DWITHOUT_TOKUDB=1"
] ++ optional (!stdenv.hostPlatform.isDarwin && withStorageToku) [
"-DWITH_JEMALLOC=static"
] ++ optional stdenv.hostPlatform.isDarwin [
"-DWITHOUT_OQGRAPH=1"
];
preConfigure = optionalString (!stdenv.hostPlatform.isDarwin) ''
@@ -178,15 +191,8 @@ server = stdenv.mkDerivation (common // {
chmod +x "$out"/bin/wsrep_sst_common
rm "$out"/bin/{mysql_client_test,mysqltest}
rm -r "$out"/data # Don't need testing data
'' + optionalString withStorageMroonga ''
mv "$out"/share/{groonga,groonga-normalizer-mysql} "$out"/share/doc/mysql
'' + optionalString withoutClient ''
${ # We don't build with GSSAPI on Darwin
optionalString (!stdenv.hostPlatform.isDarwin) ''
rm "$out"/lib/mysql/plugin/auth_gssapi_client.so
''
}
rm "$out"/lib/mysql/plugin/client_ed25519.so
rm "$out"/lib/{libmysqlclient${libExt},libmysqlclient_r${libExt}}
'' + optionalString (!stdenv.hostPlatform.isDarwin) ''
sed -i 's/-mariadb/-mysql/' "$out"/bin/galera_new_cluster
'';

View File

@@ -1,7 +1,6 @@
{ stdenv, fetchFromGitHub, lib
, intltool, glib, pkgconfig, polkit, python3, sqlite
, gobject-introspection, vala, gtk-doc, autoreconfHook, autoconf-archive
# TODO: set enableNixBackend to true, as soon as it builds
, nix, enableNixBackend ? false, boost
, enableCommandNotFound ? false
, enableBashCompletion ? false, bash-completion ? null
@@ -23,7 +22,9 @@ stdenv.mkDerivation rec {
buildInputs = [ glib polkit python3 gobject-introspection ]
++ lib.optional enableSystemd systemd
++ lib.optional enableBashCompletion bash-completion;
propagatedBuildInputs = [ sqlite nix boost ];
propagatedBuildInputs =
[ sqlite boost ]
++ lib.optional enableNixBackend nix;
nativeBuildInputs = [ vala intltool pkgconfig autoreconfHook autoconf-archive gtk-doc ];
preAutoreconf = ''

View File

@@ -1,4 +1,4 @@
{ stdenv, fetchFromGitHub, makeWrapper, mono, openssl, ocl-icd }:
{ stdenv, fetchFromGitHub, makeWrapper, mono, openssl_1_0_2, ocl-icd }:
stdenv.mkDerivation rec {
version = "2.1";
@@ -22,7 +22,7 @@ stdenv.mkDerivation rec {
mkdir -p $out/share
cp scallion/bin/Debug/* $out/share/
makeWrapper ${mono}/bin/mono $out/bin/scallion \
--prefix LD_LIBRARY_PATH : ${stdenv.lib.makeLibraryPath [ openssl ocl-icd ]} \
--prefix LD_LIBRARY_PATH : ${stdenv.lib.makeLibraryPath [ openssl_1_0_2 ocl-icd ]} \
--add-flags $out/share/scallion.exe
'';

View File

@@ -153,7 +153,8 @@ in buildEnv {
rm "$link"
makeWrapper "$target" "$link" \
--prefix PATH : "$out/bin:${perl}/bin" \
--prefix PERL5LIB : "$PERL5LIB"
--prefix PERL5LIB : "$PERL5LIB" \
--set-default TEXMFCNF "$TEXMFCNF"
# avoid using non-nix shebang in $target by calling interpreter
if [[ "$(head -c 2 "$target")" = "#!" ]]; then

View File

@@ -15547,17 +15547,33 @@ in
mariadb = callPackage ../servers/sql/mariadb {
# As per mariadb's cmake, "static jemalloc_pic.a can only be used up to jemalloc 4".
# https://jira.mariadb.org/browse/MDEV-15034
jemalloc = jemalloc450.override ({ disableInitExecTls = true; });
jemalloc450 = jemalloc450.override ({ disableInitExecTls = true; });
inherit (darwin) cctools;
inherit (pkgs.darwin.apple_sdk.frameworks) CoreServices;
};
mysql = mariadb; # TODO: move to aliases.nix
mongodb = callPackage ../servers/nosql/mongodb {
mongodb = hiPrio mongodb-3_4;
mongodb-3_4 = callPackage ../servers/nosql/mongodb/v3_4.nix {
sasl = cyrus_sasl;
boost = boost160;
openssl = openssl_1_0_2;
inherit (darwin.apple_sdk.frameworks) Security;
inherit (darwin) cctools;
inherit (darwin.apple_sdk.frameworks) CoreFoundation Security;
};
mongodb-3_6 = callPackage ../servers/nosql/mongodb/v3_6.nix {
sasl = cyrus_sasl;
boost = boost160;
inherit (darwin) cctools;
inherit (darwin.apple_sdk.frameworks) CoreFoundation Security;
};
mongodb-4_0 = callPackage ../servers/nosql/mongodb/v4_0.nix {
sasl = cyrus_sasl;
boost = boost169;
inherit (darwin) cctools;
inherit (darwin.apple_sdk.frameworks) CoreFoundation Security;
};
nginx-sso = callPackage ../servers/nginx-sso { };

View File

@@ -19,7 +19,7 @@ releaseTools.sourceTarball {
version = pkgs.lib.fileContents ../../.version;
versionSuffix = "pre${
if nixpkgs ? lastModified
then builtins.substring 0 8 nixpkgs.lastModified
then builtins.substring 0 8 (nixpkgs.lastModifiedDate or nixpkgs.lastModified)
else toString nixpkgs.revCount}.${nixpkgs.shortRev or "dirty"}";
buildInputs = [ nix.out jq lib-tests pkgs.brotli ];