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: 71a7e221d8f0
Choose a base ref
...
head repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: cbdcc20e7778
Choose a head ref
Loading
Showing with 747 additions and 557 deletions.
  1. +1 −1 lib/systems/doubles.nix
  2. +35 −26 lib/systems/parse.nix
  3. +2 −2 lib/{tests.nix → tests/misc.nix}
  4. +25 −33 lib/tests/release.nix
  5. +7 −7 lib/tests/systems.nix
  6. +23 −0 nixos/modules/config/users-groups.nix
  7. +13 −13 nixos/modules/services/networking/wireguard.nix
  8. +0 −1 nixos/modules/services/web-servers/varnish/default.nix
  9. +1 −0 nixos/modules/services/x11/desktop-managers/gnome3.nix
  10. +2 −5 pkgs/applications/editors/atom/default.nix
  11. +2 −2 pkgs/applications/misc/monero/default.nix
  12. +4 −4 pkgs/applications/networking/dropbox/default.nix
  13. +237 −237 pkgs/applications/networking/mailreaders/thunderbird-bin/sources.nix
  14. +2 −2 pkgs/applications/networking/mailreaders/thunderbird/default.nix
  15. +3 −2 pkgs/applications/networking/p2p/gnunet/default.nix
  16. +1 −0 pkgs/applications/networking/remote/rdesktop/default.nix
  17. +2 −2 pkgs/applications/networking/syncthing/default.nix
  18. +7 −1 pkgs/applications/version-management/nbstripout/default.nix
  19. +7 −13 pkgs/applications/virtualization/docker/proxy.nix
  20. +2 −2 pkgs/data/fonts/fontconfig-penultimate/default.nix
  21. +3 −4 pkgs/desktops/gnome-3/3.22/core/vino/default.nix
  22. +3 −0 pkgs/development/compilers/gcc/4.5/default.nix
  23. +3 −4 pkgs/development/compilers/gcc/4.8/default.nix
  24. +3 −5 pkgs/development/compilers/gcc/4.9/default.nix
  25. +3 −5 pkgs/development/compilers/gcc/5/default.nix
  26. +3 −5 pkgs/development/compilers/gcc/6/default.nix
  27. +3 −4 pkgs/development/compilers/gcc/snapshot/default.nix
  28. +7 −3 pkgs/development/libraries/gmp/6.x.nix
  29. +10 −2 pkgs/development/libraries/ncurses/default.nix
  30. +6 −0 pkgs/development/libraries/opencv/3.x.nix
  31. +5 −0 pkgs/development/libraries/opencv/default.nix
  32. +3 −1 pkgs/development/libraries/rdkafka/default.nix
  33. +13 −6 pkgs/development/libraries/v8/default.nix
  34. +64 −0 pkgs/development/libraries/v8/no-xcode.patch
  35. +3 −1 pkgs/development/python-modules/cram/default.nix
  36. +2 −2 pkgs/development/tools/ammonite/default.nix
  37. +3 −2 pkgs/development/tools/misc/binutils/default.nix
  38. +7 −8 pkgs/development/tools/misc/editorconfig-core-c/default.nix
  39. +6 −0 pkgs/development/tools/rtags/default.nix
  40. +3 −0 pkgs/development/tools/simavr/default.nix
  41. +19 −5 pkgs/os-specific/darwin/binutils/default.nix
  42. +42 −28 pkgs/os-specific/darwin/cctools/port.nix
  43. +6 −2 pkgs/os-specific/linux/kernel/common-config.nix
  44. +5 −5 pkgs/os-specific/linux/kernel/linux-testing.nix
  45. +2 −2 pkgs/os-specific/linux/wireguard/default.nix
  46. +8 −4 pkgs/servers/varnish/default.nix
  47. +3 −3 pkgs/shells/oh-my-zsh/default.nix
  48. +6 −6 pkgs/stdenv/linux/make-bootstrap-tools-cross.nix
  49. +7 −2 pkgs/tools/misc/mc/default.nix
  50. +4 −4 pkgs/tools/text/icdiff/default.nix
  51. +3 −3 pkgs/tools/text/ripgrep/default.nix
  52. +5 −1 pkgs/tools/text/sift/default.nix
  53. +3 −0 pkgs/tools/typesetting/sile/default.nix
  54. +30 −26 pkgs/top-level/all-packages.nix
  55. +9 −2 pkgs/top-level/make-tarball.nix
  56. +5 −6 pkgs/top-level/perl-packages.nix
  57. +0 −2 pkgs/top-level/python-packages.nix
  58. +55 −45 pkgs/top-level/release-cross.nix
  59. +3 −3 pkgs/top-level/release.nix
  60. +3 −3 pkgs/top-level/rust-packages.nix
2 changes: 1 addition & 1 deletion lib/systems/doubles.nix
Original file line number Diff line number Diff line change
@@ -30,7 +30,7 @@ in rec {
mips = filterDoubles (matchAttrs { cpu = { family = "mips"; }; });
x86_64 = filterDoubles parse.isx86_64;

cygwin = filterDoubles (matchAttrs { kernel = parse.kernels.cygwin; });
cygwin = filterDoubles parse.isCygwin;
darwin = filterDoubles parse.isDarwin;
freebsd = filterDoubles (matchAttrs { kernel = parse.kernels.freebsd; });
gnu = filterDoubles (matchAttrs { kernel = parse.kernels.linux; abi = parse.abis.gnu; }); # Should be better
61 changes: 35 additions & 26 deletions lib/systems/parse.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Define the list of system with their properties. Only systems tested for
# Nixpkgs are listed below
# Define the list of system with their properties.
#
# See https://clang.llvm.org/docs/CrossCompilation.html and
# http://llvm.org/docs/doxygen/html/Triple_8cpp_source.html especially
# Triple::normalize. Parsing should essentially act as a more conservative
# version of that last function.

with import ../lists.nix;
with import ../types.nix;
@@ -9,7 +13,7 @@ let
lib = import ../default.nix;
setTypesAssert = type: pred:
mapAttrs (name: value:
#assert pred value;
assert pred value;
setType type ({ inherit name; } // value));
setTypes = type: setTypesAssert type (_: true);

@@ -23,7 +27,6 @@ rec {
littleEndian = {};
};


isCpuType = isType "cpu-type";
cpuTypes = with significantBytes; setTypesAssert "cpu-type"
(x: elem x.bits [8 16 32 64 128]
@@ -47,6 +50,7 @@ rec {
vendors = setTypes "vendor" {
apple = {};
pc = {};

unknown = {};
};

@@ -56,41 +60,45 @@ rec {
elf = {};
macho = {};
pe = {};

unknown = {};
};

isKernelFamily = isType "kernel-family";
kernelFamilies = setTypes "kernel-family" {
bsd = {};
unix = {};
windows-nt = {};
dos = {};
};

isKernel = x: isType "kernel" x;
kernels = with execFormats; with kernelFamilies; setTypesAssert "kernel"
(x: isExecFormat x.execFormat && all isKernelFamily (attrValues x.families))
{
cygwin = { execFormat = pe; families = { inherit /*unix*/ windows-nt; }; };
darwin = { execFormat = macho; families = { inherit unix; }; };
freebsd = { execFormat = elf; families = { inherit unix bsd; }; };
linux = { execFormat = elf; families = { inherit unix; }; };
netbsd = { execFormat = elf; families = { inherit unix bsd; }; };
none = { execFormat = unknown; families = { inherit unix; }; };
openbsd = { execFormat = elf; families = { inherit unix bsd; }; };
solaris = { execFormat = elf; families = { inherit unix; }; };
win32 = { execFormat = pe; families = { inherit dos; }; };
windows = { execFormat = pe; families = { }; };
} // { # aliases
# TODO(@Ericson2314): Handle these Darwin version suffixes more generally.
darwin10 = kernels.darwin;
darwin14 = kernels.darwin;
win32 = kernels.windows;
};


isAbi = isType "abi";
abis = setTypes "abi" {
cygnus = {};
gnu = {};
msvc = {};
eabi = {};
androideabi = {};
gnueabi = {};
gnueabihf = {};

unknown = {};
};

@@ -109,19 +117,25 @@ rec {
isDarwin = matchAttrs { kernel = kernels.darwin; };
isLinux = matchAttrs { kernel = kernels.linux; };
isUnix = matchAttrs { kernel = { families = { inherit (kernelFamilies) unix; }; }; };
isWindows = s: matchAttrs { kernel = { families = { inherit (kernelFamilies) windows-nt; }; }; } s
|| matchAttrs { kernel = { families = { inherit (kernelFamilies) dos; }; }; } s;
isWindows = matchAttrs { kernel = kernels.windows; };
isCygwin = matchAttrs { kernel = kernels.windows; abi = abis.cygnus; };
isMinGW = matchAttrs { kernel = kernels.windows; abi = abis.gnu; };


mkSkeletonFromList = l: {
"2" = { cpu = elemAt l 0; kernel = elemAt l 1; };
"4" = { cpu = elemAt l 0; vendor = elemAt l 1; kernel = elemAt l 2; abi = elemAt l 3; };
"2" = # We only do 2-part hacks for things Nix already supports
if elemAt l 1 == "cygwin"
then { cpu = elemAt l 0; kernel = "windows"; abi = "cygnus"; }
else { cpu = elemAt l 0; kernel = elemAt l 1; };
"3" = # Awkwards hacks, beware!
if elemAt l 1 == "apple"
then { cpu = elemAt l 0; vendor = "apple"; kernel = elemAt l 2; }
else if (elemAt l 1 == "linux") || (elemAt l 2 == "gnu")
then { cpu = elemAt l 0; kernel = elemAt l 1; abi = elemAt l 2; }
else if (elemAt l 2 == "mingw32") # autotools breaks on -gnu for window
then { cpu = elemAt l 0; vendor = elemAt l 1; kernel = "windows"; abi = "gnu"; }
else throw "Target specification with 3 components is ambiguous";
"4" = { cpu = elemAt l 0; vendor = elemAt l 1; kernel = elemAt l 2; abi = elemAt l 3; };
}.${toString (length l)}
or (throw "system string has invalid number of hyphen-separated components");

@@ -134,18 +148,10 @@ rec {
, # Also inferred below
abi ? assert false; null
} @ args: let
getCpu = name:
attrByPath [name] (throw "Unknown CPU type: ${name}")
cpuTypes;
getVendor = name:
attrByPath [name] (throw "Unknown vendor: ${name}")
vendors;
getKernel = name:
attrByPath [name] (throw "Unknown kernel: ${name}")
kernels;
getAbi = name:
attrByPath [name] (throw "Unknown ABI: ${name}")
abis;
getCpu = name: cpuTypes.${name} or (throw "Unknown CPU type: ${name}");
getVendor = name: vendors.${name} or (throw "Unknown vendor: ${name}");
getKernel = name: kernels.${name} or (throw "Unknown kernel: ${name}");
getAbi = name: abis.${name} or (throw "Unknown ABI: ${name}");

system = rec {
cpu = getCpu args.cpu;
@@ -166,7 +172,10 @@ rec {

mkSystemFromString = s: mkSystemFromSkeleton (mkSkeletonFromList (lib.splitString "-" s));

doubleFromSystem = { cpu, vendor, kernel, abi, ... }: "${cpu.name}-${kernel.name}";
doubleFromSystem = { cpu, vendor, kernel, abi, ... }:
if vendor == kernels.windows && abi == abis.cygnus
then "${cpu.name}-cygwin"
else "${cpu.name}-${kernel.name}";

tripleFromSystem = { cpu, vendor, kernel, abi, ... } @ sys: assert isSystem sys; let
optAbi = lib.optionalString (abi != abis.unknown) "-${abi.name}";
4 changes: 2 additions & 2 deletions lib/tests.nix → lib/tests/misc.nix
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# to run these tests:
# nix-instantiate --eval --strict nixpkgs/lib/tests.nix
# nix-instantiate --eval --strict nixpkgs/lib/tests/misc.nix
# if the resulting list is empty, all tests passed
let inherit (builtins) add; in
with import ./default.nix;
with import ../default.nix;

runTests {

58 changes: 25 additions & 33 deletions lib/tests/release.nix
Original file line number Diff line number Diff line change
@@ -1,40 +1,32 @@
{ nixpkgs ? { outPath = (import ../.).cleanSource ../..; revCount = 1234; shortRev = "abcdef"; }
, # The platforms for which we build Nixpkgs.
supportedSystems ? [ builtins.currentSystem ]
, # Strip most of attributes when evaluating to spare memory usage
scrubJobs ? true
}:
{ pkgs ? import ((import ../../lib).cleanSource ../..) {} }:

with import ../../pkgs/top-level/release-lib.nix { inherit supportedSystems scrubJobs; };
with lib;
pkgs.stdenv.mkDerivation {
name = "nixpkgs-lib-tests";
buildInputs = [ pkgs.nix ];
NIX_PATH="nixpkgs=${pkgs.path}";

{
systems = import ./systems.nix { inherit lib assertTrue; };
buildCommand = ''
datadir="${pkgs.nix}/share"
export TEST_ROOT=$(pwd)/test-tmp
export NIX_BUILD_HOOK=
export NIX_CONF_DIR=$TEST_ROOT/etc
export NIX_DB_DIR=$TEST_ROOT/db
export NIX_LOCALSTATE_DIR=$TEST_ROOT/var
export NIX_LOG_DIR=$TEST_ROOT/var/log/nix
export NIX_MANIFESTS_DIR=$TEST_ROOT/var/nix/manifests
export NIX_STATE_DIR=$TEST_ROOT/var/nix
export NIX_STORE_DIR=$TEST_ROOT/store
export PAGER=cat
cacheDir=$TEST_ROOT/binary-cache
nix-store --init
moduleSystem = pkgs.stdenv.mkDerivation {
name = "nixpkgs-lib-tests";
buildInputs = [ pkgs.nix ];
NIX_PATH="nixpkgs=${nixpkgs}";
cd ${pkgs.path}/lib/tests
./modules.sh
buildCommand = ''
datadir="${pkgs.nix}/share"
export TEST_ROOT=$(pwd)/test-tmp
export NIX_BUILD_HOOK=
export NIX_CONF_DIR=$TEST_ROOT/etc
export NIX_DB_DIR=$TEST_ROOT/db
export NIX_LOCALSTATE_DIR=$TEST_ROOT/var
export NIX_LOG_DIR=$TEST_ROOT/var/log/nix
export NIX_MANIFESTS_DIR=$TEST_ROOT/var/nix/manifests
export NIX_STATE_DIR=$TEST_ROOT/var/nix
export NIX_STORE_DIR=$TEST_ROOT/store
export PAGER=cat
cacheDir=$TEST_ROOT/binary-cache
nix-store --init
[[ "$(nix-instantiate --eval --strict misc.nix)" == "[ ]" ]]
cd ${nixpkgs}/lib/tests
./modules.sh
[[ "$(nix-instantiate --eval --strict systems.nix)" == "[ ]" ]]
touch $out
'';
};
touch $out
'';
}
14 changes: 7 additions & 7 deletions lib/tests/systems.nix
Original file line number Diff line number Diff line change
@@ -5,13 +5,13 @@
# calculating the lists anyway?". The answer is one can mindlessly update these
# tests as new platforms become supported, and then just give the diff a quick
# sanity check before committing :).
{ lib, assertTrue }:

with lib.systems.doubles;

let mseteq = x: y: lib.sort lib.lessThan x == lib.sort lib.lessThan y; in

{
let
lib = import ../default.nix;
mseteq = x: y: {
expr = lib.sort lib.lessThan x;
expected = lib.sort lib.lessThan y;
};
in with lib.systems.doubles; lib.runTests {
all = assertTrue (mseteq all (linux ++ darwin ++ cygwin ++ freebsd ++ openbsd ++ netbsd ++ illumos));

arm = assertTrue (mseteq arm [ "armv5tel-linux" "armv6l-linux" "armv7l-linux" ]);
23 changes: 23 additions & 0 deletions nixos/modules/config/users-groups.nix
Original file line number Diff line number Diff line change
@@ -244,6 +244,17 @@ let
'';
};

packages = mkOption {
type = types.listOf types.package;
default = [];
example = literalExample "[ pkgs.firefox pkgs.thunderbird ]";
description = ''
The set of packages that should be made availabe to the user.
This is in contrast to <option>environment.systemPackages</option>,
which adds packages to all users.
'';
};

};

config = mkMerge
@@ -568,5 +579,17 @@ in {
imports =
[ (mkAliasOptionModule [ "users" "extraUsers" ] [ "users" "users" ])
(mkAliasOptionModule [ "users" "extraGroups" ] [ "users" "groups" ])
{
environment = {
etc = mapAttrs' (name: { packages, ... }: {
name = "per-user-pkgs/${name}";
value.source = pkgs.symlinkJoin {
name = "per-user-pkgs.${name}";
paths = packages;
};
}) (filterAttrs (_: { packages, ... }: packages != []) cfg.users);
profiles = ["/etc/per-user-pkgs/$LOGNAME"];
};
}
];
}
26 changes: 13 additions & 13 deletions nixos/modules/services/networking/wireguard.nix
Original file line number Diff line number Diff line change
@@ -27,18 +27,6 @@ let
description = "Base64 private key generated by wg genkey.";
};

presharedKey = mkOption {
default = null;
example = "rVXs/Ni9tu3oDBLS4hOyAUAa1qTWVA3loR8eL20os3I=";
type = with types; nullOr str;
description = ''
base64 preshared key generated by wg genpsk. Optional,
and may be omitted. This option adds an additional layer of
symmetric-key cryptography to be mixed into the already existing
public-key cryptography, for post-quantum resistance.
'';
};

listenPort = mkOption {
default = null;
type = with types; nullOr int;
@@ -98,6 +86,18 @@ let
description = "The base64 public key the peer.";
};

presharedKey = mkOption {
default = null;
example = "rVXs/Ni9tu3oDBLS4hOyAUAa1qTWVA3loR8eL20os3I=";
type = with types; nullOr str;
description = ''
base64 preshared key generated by wg genpsk. Optional,
and may be omitted. This option adds an additional layer of
symmetric-key cryptography to be mixed into the already existing
public-key cryptography, for post-quantum resistance.
'';
};

allowedIPs = mkOption {
example = [ "10.192.122.3/32" "10.192.124.1/24" ];
type = with types; listOf str;
@@ -137,12 +137,12 @@ let
generateConf = name: values: pkgs.writeText "wireguard-${name}.conf" ''
[Interface]
PrivateKey = ${values.privateKey}
${optionalString (values.presharedKey != null) "PresharedKey = ${values.presharedKey}"}
${optionalString (values.listenPort != null) "ListenPort = ${toString values.listenPort}"}
${concatStringsSep "\n\n" (map (peer: ''
[Peer]
PublicKey = ${peer.publicKey}
${optionalString (peer.presharedKey != null) "PresharedKey = ${peer.presharedKey}"}
${optionalString (peer.allowedIPs != []) "AllowedIPs = ${concatStringsSep ", " peer.allowedIPs}"}
${optionalString (peer.endpoint != null) "Endpoint = ${peer.endpoint}"}
${optionalString (peer.persistentKeepalive != null) "PersistentKeepalive = ${toString peer.persistentKeepalive}"}
1 change: 0 additions & 1 deletion nixos/modules/services/web-servers/varnish/default.nix
Original file line number Diff line number Diff line change
@@ -49,7 +49,6 @@ with lib;
postStop = ''
rm -rf ${cfg.stateDir}
'';
path = [ pkgs.gcc ];
serviceConfig.ExecStart = "${pkgs.varnish}/sbin/varnishd -a ${cfg.http_address} -f ${pkgs.writeText "default.vcl" cfg.config} -n ${cfg.stateDir} -u varnish";
serviceConfig.Type = "forking";
};
1 change: 1 addition & 0 deletions nixos/modules/services/x11/desktop-managers/gnome3.nix
Original file line number Diff line number Diff line change
@@ -124,6 +124,7 @@ in {
hardware.bluetooth.enable = mkDefault true;
services.xserver.libinput.enable = mkDefault true; # for controlling touchpad settings via gnome control center
services.udev.packages = [ pkgs.gnome3.gnome_settings_daemon ];
systemd.packages = [ pkgs.gnome3.vino ];

# If gnome3 is installed, build vim for gtk3 too.
nixpkgs.config.vim.gui = "gtk3";
7 changes: 2 additions & 5 deletions pkgs/applications/editors/atom/default.nix
Original file line number Diff line number Diff line change
@@ -2,11 +2,11 @@

stdenv.mkDerivation rec {
name = "atom-${version}";
version = "1.16.0";
version = "1.17.0";

src = fetchurl {
url = "https://github.com/atom/atom/releases/download/v${version}/atom-amd64.deb";
sha256 = "10qzhfz34i7x7z5fv5a73a6aiwxvanyn0v825a6yz9qfc2mg4shd";
sha256 = "10m1sww8zkhnhs3frlnd6g3b6f4fimgp0512wcszgqhvlhjbf9ln";
name = "${name}.deb";
};

@@ -32,9 +32,6 @@ stdenv.mkDerivation rec {
--set-rpath "${atomEnv.libPath}" \
$out/share/atom/resources/app/apm/bin/node
patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
$out/share/atom/resources/app.asar.unpacked/node_modules/symbols-view/vendor/ctags-linux
find $out/share/atom -name "*.node" -exec patchelf --set-rpath "${atomEnv.libPath}:$out/share/atom" {} \;
'';

Loading