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: b3251e04ee47
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: 55668eb671b9
Choose a head ref
Loading
Showing with 866 additions and 308 deletions.
  1. +6 −0 maintainers/maintainer-list.nix
  2. +1 −0 maintainers/scripts/luarocks-packages.csv
  3. +12 −0 nixos/doc/manual/development/writing-nixos-tests.xml
  4. +23 −0 nixos/lib/test-driver/test-driver.py
  5. +1 −1 nixos/lib/testing-python.nix
  6. +62 −0 nixos/modules/system/boot/loader/grub/grub.nix
  7. +42 −3 nixos/modules/system/boot/loader/grub/install-grub.pl
  8. +1 −0 nixos/tests/all-tests.nix
  9. +60 −0 nixos/tests/grub.nix
  10. +2 −2 pkgs/applications/audio/giada/default.nix
  11. +2 −2 pkgs/applications/editors/tiled/default.nix
  12. +2 −2 pkgs/applications/misc/cherrytree/default.nix
  13. +2 −2 pkgs/applications/misc/gpxsee/default.nix
  14. +57 −0 pkgs/applications/misc/nimmm/default.nix
  15. +2 −2 pkgs/applications/misc/sequeler/default.nix
  16. +2 −2 pkgs/applications/misc/simplenote/default.nix
  17. +3 −3 pkgs/applications/misc/toot/default.nix
  18. +2 −2 pkgs/applications/networking/cluster/qbec/default.nix
  19. +15 −8 pkgs/applications/networking/instant-messengers/pidgin/default.nix
  20. +2 −2 pkgs/applications/office/todoman/default.nix
  21. +1 −1 pkgs/data/misc/dns-root-data/default.nix
  22. +2 −2 pkgs/desktops/gnome-3/core/baobab/default.nix
  23. +2 −2 pkgs/development/compilers/closure/default.nix
  24. +2 −2 pkgs/development/compilers/nim/default.nix
  25. +2 −2 pkgs/development/compilers/souffle/default.nix
  26. +2 −2 pkgs/development/interpreters/rakudo/zef.nix
  27. +2 −2 pkgs/development/libraries/bctoolbox/default.nix
  28. +7 −2 pkgs/development/libraries/onnxruntime/default.nix
  29. +2 −2 pkgs/development/libraries/robin-map/default.nix
  30. +2 −2 pkgs/development/libraries/science/math/suitesparse-graphblas/default.nix
  31. +2 −2 pkgs/development/libraries/simgear/default.nix
  32. +37 −7 pkgs/development/libraries/spdk/default.nix
  33. +2 −2 pkgs/development/libraries/waylandpp/default.nix
  34. +10 −20 pkgs/development/libraries/zlog/default.nix
  35. +17 −0 pkgs/development/lua-modules/generated-packages.nix
  36. +17 −0 pkgs/development/lua-modules/overrides.nix
  37. +2 −2 pkgs/development/ocaml-modules/angstrom/default.nix
  38. +28 −0 pkgs/development/ocaml-modules/bigarray-overlap/default.nix
  39. +12 −6 pkgs/development/ocaml-modules/encore/default.nix
  40. +5 −5 pkgs/development/ocaml-modules/git-http/default.nix
  41. +8 −4 pkgs/development/ocaml-modules/git-unix/default.nix
  42. +17 −10 pkgs/development/ocaml-modules/git/default.nix
  43. +1 −0 pkgs/development/ocaml-modules/janestreet/default.nix
  44. +22 −0 pkgs/development/ocaml-modules/janestreet/email-message-angstrom-0.14.patch
  45. +11 −5 pkgs/development/python-modules/cssselect2/default.nix
  46. +21 −0 pkgs/development/python-modules/html-sanitizer/default.nix
  47. +16 −7 pkgs/development/python-modules/pywebview/default.nix
  48. +1 −0 pkgs/development/python-modules/qasm2image/default.nix
  49. +7 −10 pkgs/development/python-modules/qiskit-aer/default.nix
  50. +14 −6 pkgs/development/python-modules/qiskit-aqua/default.nix
  51. +3 −3 pkgs/development/python-modules/qiskit-ibmq-provider/default.nix
  52. +2 −7 pkgs/development/python-modules/qiskit-ignis/default.nix
  53. +5 −2 pkgs/development/python-modules/qiskit-terra/default.nix
  54. +3 −3 pkgs/development/python-modules/qiskit/default.nix
  55. +13 −10 pkgs/development/python-modules/retworkx/default.nix
  56. +2 −1 pkgs/development/python-modules/selectors2/default.nix
  57. +2 −2 pkgs/development/python-modules/sslyze/default.nix
  58. +21 −3 pkgs/development/python-modules/tinycss2/default.nix
  59. +0 −12 pkgs/development/python-modules/tinycss2/remove-redundant-dependency.patch
  60. +2 −2 pkgs/development/tools/build-managers/sbt/default.nix
  61. +1 −1 pkgs/development/tools/continuous-integration/gitlab-runner/default.nix
  62. +2 −2 pkgs/development/tools/micronaut/default.nix
  63. +3 −3 pkgs/development/tools/misc/terracognita/default.nix
  64. +2 −2 pkgs/development/tools/misc/terraform-ls/default.nix
  65. +3 −3 pkgs/development/tools/misc/tokei/default.nix
  66. +3 −3 pkgs/development/tools/ocaml/camlp5/default.nix
  67. +3 −3 pkgs/development/tools/wrangler/default.nix
  68. +2 −2 pkgs/development/tools/yq-go/default.nix
  69. +1 −1 pkgs/development/web/nodejs/nodejs.nix
  70. +2 −2 pkgs/development/web/nodejs/v12.nix
  71. +2 −2 pkgs/development/web/nodejs/v14.nix
  72. +9 −16 pkgs/games/anki/default.nix
  73. +4 −4 pkgs/games/flightgear/default.nix
  74. +3 −2 pkgs/games/minecraft/default.nix
  75. +1 −0 pkgs/misc/emulators/openmsx/default.nix
  76. +2 −0 pkgs/misc/emulators/resim/default.nix
  77. +2 −2 pkgs/os-specific/linux/bcc/default.nix
  78. +2 −1 pkgs/os-specific/linux/device-tree/raspberrypi.nix
  79. +3 −3 pkgs/os-specific/linux/dpdk/default.nix
  80. +1 −0 pkgs/os-specific/linux/iptstate/default.nix
  81. +3 −2 pkgs/os-specific/linux/kernel/gpio-utils.nix
  82. +1 −3 pkgs/os-specific/linux/klibc/shrunk.nix
  83. +1 −0 pkgs/os-specific/linux/kmod-blacklist-ubuntu/default.nix
  84. +4 −3 pkgs/os-specific/linux/kmod-debian-aliases/default.nix
  85. +5 −4 pkgs/os-specific/linux/libvolume_id/default.nix
  86. +3 −2 pkgs/os-specific/linux/rfkill/udev.nix
  87. +3 −2 pkgs/os-specific/linux/sysklogd/default.nix
  88. +2 −2 pkgs/os-specific/linux/targetcli/default.nix
  89. +4 −3 pkgs/os-specific/linux/xf86-video-nested/default.nix
  90. +1 −0 pkgs/servers/adguardhome/default.nix
  91. +2 −2 pkgs/servers/coturn/default.nix
  92. +2 −2 pkgs/servers/dns/knot-resolver/default.nix
  93. +1 −0 pkgs/servers/fcgiwrap/default.nix
  94. +1 −0 pkgs/servers/hashi-ui/default.nix
  95. +2 −2 pkgs/servers/misc/navidrome/default.nix
  96. +3 −3 pkgs/servers/monitoring/thanos/default.nix
  97. +2 −2 pkgs/servers/sql/cockroachdb/default.nix
  98. +2 −2 pkgs/servers/ttyd/default.nix
  99. +3 −3 pkgs/shells/nushell/default.nix
  100. +2 −2 pkgs/tools/audio/abcm2ps/default.nix
  101. +2 −2 pkgs/tools/graphics/spirv-cross/default.nix
  102. +26 −16 pkgs/tools/misc/mdbtools/default.nix
  103. +2 −2 pkgs/tools/misc/z-lua/default.nix
  104. +13 −5 pkgs/tools/networking/persepolis/default.nix
  105. +42 −0 pkgs/tools/security/kbs2/default.nix
  106. +2 −2 pkgs/tools/system/inxi/default.nix
  107. +2 −2 pkgs/tools/typesetting/asciidoctorj/default.nix
  108. +34 −4 pkgs/tools/virtualization/nixos-container/nixos-container.pl
  109. +9 −1 pkgs/top-level/all-packages.nix
  110. +8 −2 pkgs/top-level/ocaml-packages.nix
  111. +2 −0 pkgs/top-level/python-packages.nix
6 changes: 6 additions & 0 deletions maintainers/maintainer-list.nix
Original file line number Diff line number Diff line change
@@ -3722,6 +3722,12 @@
githubId = 41977;
name = "Joachim Fasting";
};
joachimschmidt557 = {
email = "joachim.schmidt557@outlook.com";
github = "joachimschmidt557";
githubId = 28556218;
name = "Joachim Schmidt";
};
joamaki = {
email = "joamaki@gmail.com";
github = "joamaki";
1 change: 1 addition & 0 deletions maintainers/scripts/luarocks-packages.csv
Original file line number Diff line number Diff line change
@@ -74,6 +74,7 @@ moonscript,,,,,arobyn
nvim-client,,,,,
penlight,,,,,
rapidjson,,,,,
readline,,,,,
say,,,,,
std__debug,std._debug,,,,
std_normalize,std.normalize,,,,
12 changes: 12 additions & 0 deletions nixos/doc/manual/development/writing-nixos-tests.xml
Original file line number Diff line number Diff line change
@@ -360,6 +360,18 @@ start_all()
</note>
</listitem>
</varlistentry>
<varlistentry>
<term>
<methodname>wait_for_console_text</methodname>
</term>
<listitem>
<para>
Wait until the supplied regular expressions match a line of the serial
console output. This method is useful when OCR is not possibile or
accurate enough.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<methodname>wait_for_window</methodname>
23 changes: 23 additions & 0 deletions nixos/lib/test-driver/test-driver.py
Original file line number Diff line number Diff line change
@@ -3,6 +3,8 @@
from queue import Queue, Empty
from typing import Tuple, Any, Callable, Dict, Iterator, Optional, List
from xml.sax.saxutils import XMLGenerator
import queue
import io
import _thread
import argparse
import atexit
@@ -672,6 +674,22 @@ def screen_matches(last: bool) -> bool:
with self.nested("waiting for {} to appear on screen".format(regex)):
retry(screen_matches)

def wait_for_console_text(self, regex: str) -> None:
self.log("waiting for {} to appear on console".format(regex))
# Buffer the console output, this is needed
# to match multiline regexes.
console = io.StringIO()
while True:
try:
console.write(self.last_lines.get())
except queue.Empty:
self.sleep(1)
continue
console.seek(0)
matches = re.search(regex, console.read())
if matches is not None:
return

def send_key(self, key: str) -> None:
key = CHAR_TO_KEY.get(key, key)
self.send_monitor_command("sendkey {}".format(key))
@@ -735,11 +753,16 @@ def create_socket(path: str) -> socket.socket:
self.monitor, _ = self.monitor_socket.accept()
self.shell, _ = self.shell_socket.accept()

# Store last serial console lines for use
# of wait_for_console_text
self.last_lines: Queue = Queue()

def process_serial_output() -> None:
assert self.process.stdout is not None
for _line in self.process.stdout:
# Ignore undecodable bytes that may occur in boot menus
line = _line.decode(errors="ignore").replace("\r", "").rstrip()
self.last_lines.put(line)
eprint("{} # {}".format(self.name, line))
self.logger.enqueue({"msg": line, "machine": self.name})

2 changes: 1 addition & 1 deletion nixos/lib/testing-python.nix
Original file line number Diff line number Diff line change
@@ -114,7 +114,7 @@ rec {

imagemagick_tiff = imagemagick_light.override { inherit libtiff; };

# Generate onvenience wrappers for running the test driver
# Generate convenience wrappers for running the test driver
# interactively with the specified network, and for starting the
# VMs from the command line.
driver = let warn = if skipLint then lib.warn "Linting is disabled!" else lib.id; in warn (runCommand testDriverName
62 changes: 62 additions & 0 deletions nixos/modules/system/boot/loader/grub/grub.nix
Original file line number Diff line number Diff line change
@@ -55,6 +55,7 @@ let
storePath = config.boot.loader.grub.storePath;
bootloaderId = if args.efiBootloaderId == null then "NixOS${efiSysMountPoint'}" else args.efiBootloaderId;
timeout = if config.boot.loader.timeout == null then -1 else config.boot.loader.timeout;
users = if cfg.users == {} || cfg.version != 1 then cfg.users else throw "GRUB version 1 does not support user accounts.";
inherit efiSysMountPoint;
inherit (args) devices;
inherit (efi) canTouchEfiVariables;
@@ -137,6 +138,67 @@ in
'';
};

users = mkOption {
default = {};
example = {
root = { hashedPasswordFile = "/path/to/file"; };
};
description = ''
User accounts for GRUB. When specified, the GRUB command line and
all boot options except the default are password-protected.
All passwords and hashes provided will be stored in /boot/grub/grub.cfg,
and will be visible to any local user who can read this file. Additionally,
any passwords and hashes provided directly in a Nix configuration
(as opposed to external files) will be copied into the Nix store, and
will be visible to all local users.
'';
type = with types; attrsOf (submodule {
options = {
hashedPasswordFile = mkOption {
example = "/path/to/file";
default = null;
type = with types; uniq (nullOr str);
description = ''
Specifies the path to a file containing the password hash
for the account, generated with grub-mkpasswd-pbkdf2.
This hash will be stored in /boot/grub/grub.cfg, and will
be visible to any local user who can read this file.
'';
};
hashedPassword = mkOption {
example = "grub.pbkdf2.sha512.10000.674DFFDEF76E13EA...2CC972B102CF4355";
default = null;
type = with types; uniq (nullOr str);
description = ''
Specifies the password hash for the account,
generated with grub-mkpasswd-pbkdf2.
This hash will be copied to the Nix store, and will be visible to all local users.
'';
};
passwordFile = mkOption {
example = "/path/to/file";
default = null;
type = with types; uniq (nullOr str);
description = ''
Specifies the path to a file containing the
clear text password for the account.
This password will be stored in /boot/grub/grub.cfg, and will
be visible to any local user who can read this file.
'';
};
password = mkOption {
example = "Pa$$w0rd!";
default = null;
type = with types; uniq (nullOr str);
description = ''
Specifies the clear text password for the account.
This password will be copied to the Nix store, and will be visible to all local users.
'';
};
};
});
};

mirroredBoots = mkOption {
default = [ ];
example = [
45 changes: 42 additions & 3 deletions nixos/modules/system/boot/loader/grub/install-grub.pl
Original file line number Diff line number Diff line change
@@ -247,6 +247,45 @@ sub GrubFs {
}

else {
my @users = ();
foreach my $user ($dom->findnodes('/expr/attrs/attr[@name = "users"]/attrs/attr')) {
my $name = $user->findvalue('@name') or die;
my $hashedPassword = $user->findvalue('./attrs/attr[@name = "hashedPassword"]/string/@value');
my $hashedPasswordFile = $user->findvalue('./attrs/attr[@name = "hashedPasswordFile"]/string/@value');
my $password = $user->findvalue('./attrs/attr[@name = "password"]/string/@value');
my $passwordFile = $user->findvalue('./attrs/attr[@name = "passwordFile"]/string/@value');

if ($hashedPasswordFile) {
open(my $f, '<', $hashedPasswordFile) or die "Can't read file '$hashedPasswordFile'!";
$hashedPassword = <$f>;
chomp $hashedPassword;
}
if ($passwordFile) {
open(my $f, '<', $passwordFile) or die "Can't read file '$passwordFile'!";
$password = <$f>;
chomp $password;
}

if ($hashedPassword) {
if (index($hashedPassword, "grub.pbkdf2.") == 0) {
$conf .= "\npassword_pbkdf2 $name $hashedPassword";
}
else {
die "Password hash for GRUB user '$name' is not valid!";
}
}
elsif ($password) {
$conf .= "\npassword $name $password";
}
else {
die "GRUB user '$name' has no password!";
}
push(@users, $name);
}
if (@users) {
$conf .= "\nset superusers=\"" . join(' ',@users) . "\"\n";
}

if ($copyKernels == 0) {
$conf .= "
" . $grubStore->search;
@@ -350,7 +389,7 @@ sub copyToKernelsDir {
}

sub addEntry {
my ($name, $path) = @_;
my ($name, $path, $options) = @_;
return unless -e "$path/kernel" && -e "$path/initrd";

my $kernel = copyToKernelsDir(Cwd::abs_path("$path/kernel"));
@@ -396,7 +435,7 @@ sub addEntry {
$conf .= " " . ($xen ? "module" : "kernel") . " $kernel $kernelParams\n";
$conf .= " " . ($xen ? "module" : "initrd") . " $initrd\n\n";
} else {
$conf .= "menuentry \"$name\" {\n";
$conf .= "menuentry \"$name\" " . ($options||"") . " {\n";
$conf .= $grubBoot->search . "\n";
if ($copyKernels == 0) {
$conf .= $grubStore->search . "\n";
@@ -413,7 +452,7 @@ sub addEntry {
# Add default entries.
$conf .= "$extraEntries\n" if $extraEntriesBeforeNixOS;

addEntry("NixOS - Default", $defaultConfig);
addEntry("NixOS - Default", $defaultConfig, "--unrestricted");

$conf .= "$extraEntries\n" unless $extraEntriesBeforeNixOS;

1 change: 1 addition & 0 deletions nixos/tests/all-tests.nix
Original file line number Diff line number Diff line change
@@ -126,6 +126,7 @@ in
grafana = handleTest ./grafana.nix {};
graphite = handleTest ./graphite.nix {};
graylog = handleTest ./graylog.nix {};
grub = handleTest ./grub.nix {};
gvisor = handleTest ./gvisor.nix {};
hadoop.hdfs = handleTestOn [ "x86_64-linux" ] ./hadoop/hdfs.nix {};
hadoop.yarn = handleTestOn [ "x86_64-linux" ] ./hadoop/yarn.nix {};
60 changes: 60 additions & 0 deletions nixos/tests/grub.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
import ./make-test-python.nix ({ lib, ... }: {
name = "grub";

meta = with lib.maintainers; {
maintainers = [ rnhmjoj ];
};

machine = { ... }: {
virtualisation.useBootLoader = true;

boot.loader.timeout = null;
boot.loader.grub = {
enable = true;
users.alice.password = "supersecret";

# OCR is not accurate enough
extraConfig = "serial; terminal_output serial";
};
};

testScript = ''
def grub_login_as(user, password):
"""
Enters user and password to log into GRUB
"""
machine.wait_for_console_text("Enter username:")
machine.send_chars(user + "\n")
machine.wait_for_console_text("Enter password:")
machine.send_chars(password + "\n")
def grub_select_all_configurations():
"""
Selects "All configurations" from the GRUB menu
to trigger a login request.
"""
machine.send_monitor_command("sendkey down")
machine.send_monitor_command("sendkey ret")
machine.start()
# wait for grub screen
machine.wait_for_console_text("GNU GRUB")
grub_select_all_configurations()
with subtest("Invalid credentials are rejected"):
grub_login_as("wronguser", "wrongsecret")
machine.wait_for_console_text("error: access denied.")
grub_select_all_configurations()
with subtest("Valid credentials are accepted"):
grub_login_as("alice", "supersecret")
machine.send_chars("\n") # press enter to boot
machine.wait_for_console_text("Linux version")
with subtest("Machine boots correctly"):
machine.wait_for_unit("multi-user.target")
'';
})
4 changes: 2 additions & 2 deletions pkgs/applications/audio/giada/default.nix
Original file line number Diff line number Diff line change
@@ -18,13 +18,13 @@

stdenv.mkDerivation rec {
pname = "giada";
version = "0.16.2.2";
version = "0.16.3";

src = fetchFromGitHub {
owner = "monocasual";
repo = pname;
rev = "v${version}";
sha256 = "0rpg5qmw3b76xcra869shb8fwk5wfzpzw216n96hxa5s6k69cm0p";
sha256 = "1sysv5d0wq6ib47bqsn3wdzkqzjpzjrgzg15bkllbm67hiz9abhh";
};

configureFlags = [
4 changes: 2 additions & 2 deletions pkgs/applications/editors/tiled/default.nix
Original file line number Diff line number Diff line change
@@ -3,13 +3,13 @@

mkDerivation rec {
pname = "tiled";
version = "1.3.5";
version = "1.4.1";

src = fetchFromGitHub {
owner = "bjorn";
repo = pname;
rev = "v${version}";
sha256 = "0d1bs909vga1k494xnggq1mcjfxjrwa4acc0mj5rv73xqkc9mb2s";
sha256 = "1x8jymmc56di1c1wxalsp6qhcban2hahn70ndd097b8mx52gckjr";
};

nativeBuildInputs = [ pkgconfig qmake ];
4 changes: 2 additions & 2 deletions pkgs/applications/misc/cherrytree/default.nix
Original file line number Diff line number Diff line change
@@ -2,13 +2,13 @@

pythonPackages.buildPythonApplication rec {
pname = "cherrytree";
version = "0.39.3";
version = "0.39.4";

src = fetchFromGitHub {
owner = "giuspen";
repo = "cherrytree";
rev = version;
sha256 = "1k9i7acpphx0if6ij2p9fkmj638ry6hcyr1rdr039a8zi8hq98gz";
sha256 = "1wycgn1f3b858qb6kn2bsaabak8n52qkpd24w54xz6fjizlnw7x0";

};

4 changes: 2 additions & 2 deletions pkgs/applications/misc/gpxsee/default.nix
Original file line number Diff line number Diff line change
@@ -2,13 +2,13 @@

mkDerivation rec {
pname = "gpxsee";
version = "7.30";
version = "7.31";

src = fetchFromGitHub {
owner = "tumic0";
repo = "GPXSee";
rev = version;
sha256 = "09gajwqc30r9a2sn972qdx3gx0gki9n0zafq986hn6zsr3z43mfs";
sha256 = "0y60h66p8ydkinxk9x4sp4cm6gq66nc9jcavy135vmycsiq9gphn";
};

patches = [
Loading