Skip to content

Commit

Permalink
Merge master into haskell-updates
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] authored Jun 8, 2024
2 parents 3b45526 + b227056 commit 26e3a02
Show file tree
Hide file tree
Showing 257 changed files with 5,155 additions and 2,787 deletions.
32 changes: 28 additions & 4 deletions doc/stdenv/meta.chapter.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,17 +125,41 @@ $ cd path/to/nixpkgs
$ nix-build -A your-package.tests
```

Note that Hydra and [`nixpkgs-review`](https://github.com/Mic92/nixpkgs-review) don't build these derivations by default, and that ([`@ofborg`](https://github.com/NixOS/ofborg)) only builds them when evaluating PRs for that particular package (or when manually instructed).

#### Package tests {#var-meta-tests-packages}

Tests that are part of the source package are often executed in the `installCheckPhase`.
Tests that are part of the source package are often executed in the `installCheckPhase`. This phase is also suitable for performing a `--version` test for packages that support such flag. Here's an example:

```nix
# Say the package is git
stdenv.mkDerivation(finalAttrs: {
pname = "git";
version = "...";
# ...
doInstallCheck = true;
installCheckPhase = ''
runHook preInstallCheck
Prefer `passthru.tests` for tests that are introduced in nixpkgs because:
echo checking if 'git --version' mentions ${finalAttrs.version}
$out/bin/git --version | grep ${finalAttrs.version}
runHook postInstallCheck
'';
# ...
})
```

Most programs distributed by Nixpkgs support such a `--version` flag, and it can help give confidence that the package at least got compiled properly. However, tests that are slightly non trivial will better fit into `passthru.tests`, because:

* `passthru.tests` tests the 'real' package, independently from the environment in which it was built
* we can run `passthru.tests` independently
* We can run and debug a `passthru.tests` independently, after the package was built (useful if it takes a long time).
* `installCheckPhase` adds overhead to each build

For more on how to write and run package tests, see [](#sec-package-tests).
It is also possible to still use `passthru.tests` to test the version, with [testVersion](#tester-testVersion).

For more on how to write and run package tests, see [`pkgs/README.md`](https://github.com/NixOS/nixpkgs/blob/master/pkgs/README.md#package-tests).

#### NixOS tests {#var-meta-tests-nixos}

Expand Down
5 changes: 5 additions & 0 deletions maintainers/maintainer-list.nix
Original file line number Diff line number Diff line change
Expand Up @@ -11576,6 +11576,11 @@
githubId = 4158274;
name = "Michiel Leenaars";
};
legojames = {
github = "jrobinson-uk";
githubId = 4701504;
name = "James Robinson";
};
leifhelm = {
email = "[email protected]";
github = "leifhelm";
Expand Down
2 changes: 2 additions & 0 deletions nixos/doc/manual/release-notes/rl-2411.section.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@
`services.forgejo.secrets` is a small wrapper over systemd's `LoadCredential=`. It has the same structure (sections/keys) as
`services.forgejo.settings` but takes file paths that will be read before service startup instead of some plaintext value.

- `services.ddclient.use` has been deprecated: `ddclient` now supports separate IPv4 and IPv6 configuration. Use `services.ddclient.usev4` and `services.ddclient.usev6` instead.

- The Invoiceplane module now only accepts the structured `settings` option.
`extraConfig` is now removed.

Expand Down
2 changes: 1 addition & 1 deletion nixos/modules/hardware/opengl.nix
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ in

systemd.tmpfiles.settings.opengl = {
"/run/opengl-driver"."L+".argument = toString package;
"/run/opengl-drive-32" =
"/run/opengl-driver-32" =
if pkgs.stdenv.isi686 then
{ "L+".argument = "opengl-driver"; }
else if cfg.driSupport32Bit then
Expand Down
5 changes: 0 additions & 5 deletions nixos/modules/installer/netboot/netboot.nix
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,6 @@ with lib;
# here and it causes a cyclic dependency.
boot.loader.grub.enable = false;

# !!! Hack - attributes expected by other modules.
environment.systemPackages = [ pkgs.grub2_efi ]
++ (lib.optionals (lib.meta.availableOn pkgs.stdenv.hostPlatform pkgs.syslinux)
[pkgs.grub2 pkgs.syslinux]);

fileSystems."/" = mkImageMediaOverride
{ fsType = "tmpfs";
options = [ "mode=0755" ];
Expand Down
5 changes: 5 additions & 0 deletions nixos/modules/services/desktop-managers/lomiri.nix
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ in {
libusermetrics
lomiri
lomiri-download-manager
lomiri-filemanager-app
lomiri-schemas # exposes some required dbus interfaces
lomiri-session # wrappers to properly launch the session
lomiri-sounds
Expand All @@ -36,6 +37,10 @@ in {
suru-icon-theme
# telephony-service # currently broken: https://github.com/NixOS/nixpkgs/pull/314043
]);
variables = {
# To override the keyboard layouts in Lomiri
NIXOS_XKB_LAYOUTS = config.services.xserver.xkb.layout;
};
};

hardware.pulseaudio.enable = lib.mkDefault true;
Expand Down
22 changes: 20 additions & 2 deletions nixos/modules/services/networking/ddclient.nix
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ let
# This file can be used as a template for configFile or is automatically generated by Nix options.
cache=${dataDir}/ddclient.cache
foreground=YES
use=${cfg.use}
${lib.optionalString (cfg.use != "") "use=${cfg.use}"}
${lib.optionalString (cfg.use == "" && cfg.usev4 != "") "usev4=${cfg.usev4}"}
${lib.optionalString (cfg.use == "" && cfg.usev6 != "") "usev6=${cfg.usev6}"}
login=${cfg.username}
password=${if cfg.protocol == "nsupdate" then "/run/${RuntimeDirectory}/ddclient.key" else "@password_placeholder@"}
protocol=${cfg.protocol}
Expand Down Expand Up @@ -163,12 +165,26 @@ with lib;
};

use = mkOption {
default = "web, web=checkip.dyndns.com/, web-skip='Current IP Address: '";
default = "";
type = str;
description = ''
Method to determine the IP address to send to the dynamic DNS provider.
'';
};
usev4 = mkOption {
default = "webv4, webv4=checkip.dyndns.com/, webv4-skip='Current IP Address: '";
type = str;
description = ''
Method to determine the IPv4 address to send to the dynamic DNS provider. Only used if `use` is not set.
'';
};
usev6 = mkOption {
default = "webv6, webv6=checkipv6.dyndns.com/, webv6-skip='Current IP Address: '";
type = str;
description = ''
Method to determine the IPv6 address to send to the dynamic DNS provider. Only used if `use` is not set.
'';
};

verbose = mkOption {
default = false;
Expand Down Expand Up @@ -204,6 +220,8 @@ with lib;
###### implementation

config = mkIf config.services.ddclient.enable {
warnings = lib.optional (cfg.use != "") "Setting `use` is deprecated, ddclient now supports `usev4` and `usev6` for separate IPv4/IPv6 configuration.";

systemd.services.ddclient = {
description = "Dynamic DNS Client";
wantedBy = [ "multi-user.target" ];
Expand Down
2 changes: 1 addition & 1 deletion nixos/modules/services/networking/inadyn.nix
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ in
startAt = cfg.interval;
serviceConfig = {
Type = "oneshot";
ExecStart = ''${lib.getExe pkgs.inadyn} -f ${configFile} --cache-dir ''${CACHE_DIRECTORY}/inadyn -1 --foreground -l ${cfg.logLevel}'';
ExecStart = ''${lib.getExe pkgs.inadyn} -f ${configFile} --cache-dir ''${CACHE_DIRECTORY} -1 --foreground -l ${cfg.logLevel}'';
LoadCredential = "config:${configFile}";
CacheDirectory = "inadyn";

Expand Down
8 changes: 6 additions & 2 deletions nixos/tests/acme.nix
Original file line number Diff line number Diff line change
Expand Up @@ -392,8 +392,6 @@ in {
testScript = { nodes, ... }:
let
caDomain = nodes.acme.test-support.acme.caDomain;
newServerSystem = nodes.webserver.config.system.build.toplevel;
switchToNewServer = "${newServerSystem}/bin/switch-to-configuration test";
in
# Note, wait_for_unit does not work for oneshot services that do not have RemainAfterExit=true,
# this is because a oneshot goes from inactive => activating => inactive, and never
Expand Down Expand Up @@ -545,6 +543,12 @@ in {
check_fullchain(webserver, "http.example.test")
check_issuer(webserver, "http.example.test", "pebble")
# Perform account hash test
with subtest("Assert that account hash didn't unexpected change"):
hash = webserver.succeed("ls /var/lib/acme/.lego/accounts/")
print("Account hash: " + hash)
assert hash.strip() == "d590213ed52603e9128d"
# Perform renewal test
with subtest("Can renew certificates when they expire"):
hash = webserver.succeed("sha256sum /var/lib/acme/http.example.test/cert.pem")
Expand Down
1 change: 1 addition & 0 deletions nixos/tests/all-tests.nix
Original file line number Diff line number Diff line change
Expand Up @@ -516,6 +516,7 @@ in {
lxd-image-server = handleTest ./lxd-image-server.nix {};
#logstash = handleTest ./logstash.nix {};
lomiri = handleTest ./lomiri.nix {};
lomiri-filemanager-app = runTest ./lomiri-filemanager-app.nix;
lomiri-system-settings = handleTest ./lomiri-system-settings.nix {};
lorri = handleTest ./lorri/default.nix {};
maddy = discoverTests (import ./maddy { inherit handleTest; });
Expand Down
48 changes: 48 additions & 0 deletions nixos/tests/lomiri-filemanager-app.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
{ pkgs, lib, ... }:
{
name = "lomiri-filemanager-app-standalone";
meta.maintainers = lib.teams.lomiri.members;

nodes.machine =
{ config, pkgs, ... }:
{
imports = [ ./common/x11.nix ];

services.xserver.enable = true;

environment = {
systemPackages = with pkgs.lomiri; [
suru-icon-theme
lomiri-filemanager-app
];
variables = {
UITK_ICON_THEME = "suru";
};
};

i18n.supportedLocales = [ "all" ];

fonts.packages = with pkgs; [
# Intended font & helps with OCR
ubuntu_font_family
];
};

enableOCR = true;

testScript = ''
machine.wait_for_x()
with subtest("lomiri filemanager launches"):
machine.execute("lomiri-filemanager-app >&2 &")
machine.wait_for_text(r"(filemanager.ubports|alice|items|directories|files|folder)")
machine.screenshot("lomiri-filemanager_open")
machine.succeed("pkill -f lomiri-filemanager-app")
with subtest("lomiri filemanager localisation works"):
machine.execute("env LANG=de_DE.UTF-8 lomiri-filemanager-app >&2 &")
machine.wait_for_text(r"(Elemente|Verzeichnisse|Dateien|Ordner)")
machine.screenshot("lomiri-filemanager_localised")
'';
}
2 changes: 1 addition & 1 deletion nixos/tests/lomiri.nix
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ in {
machine.screenshot("settings_content-hub_peers")
# Select Morph as content source
mouse_click(300, 100)
mouse_click(370, 100)
# Expect Morph to be brought into the foreground, with its Downloads page open
machine.wait_for_text("No downloads")
Expand Down
16 changes: 12 additions & 4 deletions pkgs/applications/audio/goodvibes/default.nix
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
{ lib
, stdenv
, fetchFromGitLab
, fetchpatch
, meson
, ninja
, pkg-config
, glib
, glib-networking
, gtk3
, libsoup
, libsoup_3
, keybinder3
, gst_all_1
, wrapGAppsHook3
Expand All @@ -17,14 +18,21 @@

stdenv.mkDerivation rec {
pname = "goodvibes";
version = "0.7.9";
version = "0.8.0";

src = fetchFromGitLab {
owner = pname;
repo = pname;
rev = "v${version}";
hash = "sha256-yXrCE3nsdZP4JHKVslzQafjZ380zC8sZv5TJf8dJqJw=";
hash = "sha256-KflLEc6BFA3pBY9HukEm5NluGi2igFNP6joOMdmZ0Ds=";
};
patches = [
# Fixes a compilation error
(fetchpatch {
url = "https://gitlab.com/goodvibes/goodvibes/-/commit/e332f831b91ee068a1a58846d7607b30ab010116.patch";
hash = "sha256-PzbTltbD0xWJAytCGg1TAwBLrICP+9QZbCbG1QQ8Qmw=";
})
];

nativeBuildInputs = [
meson
Expand All @@ -40,7 +48,7 @@ stdenv.mkDerivation rec {
# for libsoup TLS support
glib-networking
gtk3
libsoup
libsoup_3
keybinder3
] ++ (with gst_all_1; [
gstreamer
Expand Down
6 changes: 3 additions & 3 deletions pkgs/applications/audio/listenbrainz-mpd/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,17 @@

rustPlatform.buildRustPackage rec {
pname = "listenbrainz-mpd";
version = "2.3.6";
version = "2.3.7";

src = fetchFromGitea {
domain = "codeberg.org";
owner = "elomatreb";
repo = "listenbrainz-mpd";
rev = "v${version}";
hash = "sha256-ZcpxMVUb24Ckb3CunibNYvDRk6MOsutUCUfElbUQ8Ok=";
hash = "sha256-xnVhPiHhI7VqkSBBlrKJBpdS6kd51DMlKWVnJIo/OQQ=";
};

cargoHash = "sha256-uZlzWxdruwPemUnvhjyh9uKRb8vj7462N/2u2bTGQgI=";
cargoHash = "sha256-Reglc7UtsFk+VIwg4Q9TIChVrWweuV6yPWxbtTDH6mU=";

nativeBuildInputs = [ pkg-config installShellFiles asciidoctor ];

Expand Down
4 changes: 2 additions & 2 deletions pkgs/applications/audio/pyradio/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@

python3Packages.buildPythonApplication rec {
pname = "pyradio";
version = "0.9.3.7";
version = "0.9.3.9";

src = fetchFromGitHub {
owner = "coderholic";
repo = "pyradio";
rev = "refs/tags/${version}";
hash = "sha256-NwDVytD6nIM++ixGmLh02FIE+hLKHBwwD3aEAXVZn7I=";
hash = "sha256-EoHCOg4nPkKRSFX/3AUKJaXzS6J1quwtv+mKeKBu5Ns=";
};

nativeBuildInputs = [
Expand Down
6 changes: 4 additions & 2 deletions pkgs/applications/audio/tidal-hifi/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,16 @@
, systemd
, xdg-utils
, xorg
, libGL
}:

stdenv.mkDerivation (finalAttrs: {
pname = "tidal-hifi";
version = "5.13.0";
version = "5.13.1";

src = fetchurl {
url = "https://github.com/Mastermindzh/tidal-hifi/releases/download/${finalAttrs.version}/tidal-hifi_${finalAttrs.version}_amd64.deb";
sha256 = "sha256-d7JAvpZKdhG9BzCdfwyPlmXcqE49heVLskusaB0uOhg=";
sha256 = "sha256-TnvVm0qjm41if90+f9YtO8wR6NYg6oUZbZd0RiUU33M=";
};

nativeBuildInputs = [ autoPatchelfHook dpkg makeWrapper ];
Expand Down Expand Up @@ -84,6 +85,7 @@ stdenv.mkDerivation (finalAttrs: {
xorg.libXScrnSaver
xorg.libxshmfence
xorg.libXtst
libGL
];

runtimeDependencies =
Expand Down
4 changes: 2 additions & 2 deletions pkgs/applications/backup/timeshift/unwrapped.nix
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@

stdenv.mkDerivation rec {
pname = "timeshift";
version = "24.01.1";
version = "24.06.1";

src = fetchFromGitHub {
owner = "linuxmint";
repo = "timeshift";
rev = version;
hash = "sha256-vAKUR0VsOuiQmB+1jPOR0KufzfXaxAsf3EOPzdgFt0A=";
hash = "sha256-H4PCZ1WwNg34WSDXgmH6pUPBglXafLTFfIzvmWiyeCw=";
};

patches = [
Expand Down
Loading

0 comments on commit 26e3a02

Please sign in to comment.