From d479b819a1bddfc64a5ff8b040b6864ad536f613 Mon Sep 17 00:00:00 2001 From: Bruno Rodrigues Date: Mon, 27 May 2024 09:26:21 +0200 Subject: [PATCH 01/15] rstudio: 2023.12.1+402 -> 2024.04.1+738 --- pkgs/applications/editors/rstudio/default.nix | 24 +++++++++++++++---- .../editors/rstudio/use-system-node.patch | 15 ------------ 2 files changed, 19 insertions(+), 20 deletions(-) diff --git a/pkgs/applications/editors/rstudio/default.nix b/pkgs/applications/editors/rstudio/default.nix index 72c9ef5a2730..c7f2f45342bf 100644 --- a/pkgs/applications/editors/rstudio/default.nix +++ b/pkgs/applications/editors/rstudio/default.nix @@ -2,6 +2,7 @@ , stdenv , mkDerivation , fetchurl +, fetchpatch , fetchFromGitHub , makeDesktopItem , copyDesktopItems @@ -39,7 +40,7 @@ let pname = "RStudio"; - version = "2023.12.1+402"; + version = "2024.04.1+748"; RSTUDIO_VERSION_MAJOR = lib.versions.major version; RSTUDIO_VERSION_MINOR = lib.versions.minor version; RSTUDIO_VERSION_PATCH = lib.versions.patch version; @@ -50,8 +51,8 @@ let src = fetchFromGitHub { owner = "rstudio"; repo = "rstudio"; - rev = version; - hash = "sha256-ecMzkpHazg8jEBz9wh8hqRX2UdziOC8b6F+3xxdugy0="; + rev = "v" + version; + hash = "sha256-fzxbhN9NdM0E2rxezj2BMEZ8obUbX0Zw8haDNmfAkWs="; }; mathJaxSrc = fetchurl { @@ -62,8 +63,8 @@ let rsconnectSrc = fetchFromGitHub { owner = "rstudio"; repo = "rsconnect"; - rev = "v1.2.0"; - hash = "sha256-ghRz4Frd+I9ShRNNOE/kdk9KjRCj0Z1mPnThueriiUY="; + rev = "v1.2.2"; + hash = "sha256-wvM9Bm7Nb6yU9z0o+uF5lB2kdgjOW5wZSk6y48NPF2U="; }; # Ideally, rev should match the rstudio release name. @@ -118,6 +119,7 @@ in "-DRSTUDIO_USE_SYSTEM_SOCI=ON" "-DRSTUDIO_USE_SYSTEM_BOOST=ON" "-DRSTUDIO_USE_SYSTEM_YAML_CPP=ON" + "-DRSTUDIO_DISABLE_CHECK_FOR_UPDATES=ON" "-DQUARTO_ENABLED=TRUE" "-DPANDOC_VERSION=${pandoc.version}" "-DCMAKE_INSTALL_PREFIX=${placeholder "out"}/lib/rstudio" @@ -134,6 +136,13 @@ in ./pandoc-nix-path.patch ./use-system-quarto.patch ./ignore-etc-os-release.patch + + (fetchpatch { + name = "use-system-yaml-patch"; + url = "https://github.com/rstudio/rstudio/commit/04de8ca8b83dcc7fee9fd65e6ef58c372489d5ef.patch"; + hash = "sha256-FHSSOPsw6AAYBj/fgNT6idyxvRj3SG+fbla0UDjug1Y="; + }) + ]; postPatch = '' @@ -182,6 +191,11 @@ in unzip -q ${mathJaxSrc} -d dependencies/mathjax-27 + # As of Chocolate Cosmos, node 18.19.1 is used for runtime + # 18.18.2 is still used for build + # see https://github.com/rstudio/rstudio/commit/facb5cf1ab38fe77813aaf36590804e4f865d780 + mkdir -p dependencies/common/node/18.19.1 + mkdir -p dependencies/pandoc/${pandoc.version} cp ${pandoc}/bin/pandoc dependencies/pandoc/${pandoc.version}/pandoc diff --git a/pkgs/applications/editors/rstudio/use-system-node.patch b/pkgs/applications/editors/rstudio/use-system-node.patch index 6e0acf46dda0..5e8b2170da10 100644 --- a/pkgs/applications/editors/rstudio/use-system-node.patch +++ b/pkgs/applications/editors/rstudio/use-system-node.patch @@ -11,21 +11,6 @@ index d18362b..98cdd4c 100644 # enable copilot copilot-enabled=1 -diff --git a/src/cpp/server/CMakeLists.txt b/src/cpp/server/CMakeLists.txt -index 30dd638..cb4a645 100644 ---- a/src/cpp/server/CMakeLists.txt -+++ b/src/cpp/server/CMakeLists.txt -@@ -250,10 +250,6 @@ if (UNIX AND NOT APPLE) - DESTINATION ${RSERVER_SYSTEMD_DIR}) - - # install node -- install( -- DIRECTORY "${RSTUDIO_DEPENDENCIES_DIR}/common/node/${RSTUDIO_NODE_VERSION}/" -- DESTINATION "${RSTUDIO_INSTALL_BIN}/node" -- USE_SOURCE_PERMISSIONS) - - elseif(APPLE) - diff --git a/src/gwt/build.xml b/src/gwt/build.xml index 033d605..f1ee63d 100644 --- a/src/gwt/build.xml From 25bb1bd86076de3ca00ee7f719575b4a5ead16b5 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Wed, 5 Jun 2024 09:46:19 +0000 Subject: [PATCH 02/15] gitlab-ci-local: 4.49.0 -> 4.50.1 --- pkgs/by-name/gi/gitlab-ci-local/package.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/by-name/gi/gitlab-ci-local/package.nix b/pkgs/by-name/gi/gitlab-ci-local/package.nix index ae9e10033e92..8752b7cdf2ff 100644 --- a/pkgs/by-name/gi/gitlab-ci-local/package.nix +++ b/pkgs/by-name/gi/gitlab-ci-local/package.nix @@ -6,16 +6,16 @@ buildNpmPackage rec { pname = "gitlab-ci-local"; - version = "4.49.0"; + version = "4.50.1"; src = fetchFromGitHub { owner = "firecow"; repo = "gitlab-ci-local"; rev = version; - hash = "sha256-hhzkC9wnPNwQwky2FegTMRIbcyCMzrZ/hoQlfZwk3sk="; + hash = "sha256-nlxYZY8SntMffmKiDpp/m8GfsB4lp+T8UoUPOLQlcC8="; }; - npmDepsHash = "sha256-mnnP1YvKSm/CgZYQWF8VU+cuQ0SUV5tW1dCRrGRBrmg="; + npmDepsHash = "sha256-uDhot9kGmF717itia6hyx0xZkyMYDpH7BmGl12xSJyI="; postPatch = '' # remove cleanup which runs git commands From da74ad3a905aa45ee6e4f8b4b69b56930195adcb Mon Sep 17 00:00:00 2001 From: Bu Kun <65808665+pokon548@users.noreply.github.com> Date: Sun, 9 Jun 2024 18:31:09 +0800 Subject: [PATCH 03/15] wpsoffice{-cn}: Fix pdf export not working --- pkgs/applications/office/wpsoffice/default.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkgs/applications/office/wpsoffice/default.nix b/pkgs/applications/office/wpsoffice/default.nix index 8f6b0d650b28..a9bb14d1b4e2 100644 --- a/pkgs/applications/office/wpsoffice/default.nix +++ b/pkgs/applications/office/wpsoffice/default.nix @@ -19,6 +19,7 @@ , curl , coreutils , cacert +, libjpeg , useChineseVersion ? false }: let @@ -72,6 +73,7 @@ stdenv.mkDerivation rec { alsa-lib at-spi2-core libtool + libjpeg libxkbcommon nspr mesa @@ -120,6 +122,9 @@ stdenv.mkDerivation rec { preFixup = '' # The following libraries need libtiff.so.5, but nixpkgs provides libtiff.so.6 patchelf --replace-needed libtiff.so.5 libtiff.so $out/opt/kingsoft/wps-office/office6/{libpdfmain.so,libqpdfpaint.so,qt/plugins/imageformats/libqtiff.so,addons/pdfbatchcompression/libpdfbatchcompressionapp.so} + patchelf --add-needed libtiff.so $out/opt/kingsoft/wps-office/office6/libwpsmain.so + # Fix: Wrong JPEG library version: library is 62, caller expects 80 + patchelf --add-needed libjpeg.so $out/opt/kingsoft/wps-office/office6/libwpsmain.so # dlopen dependency patchelf --add-needed libudev.so.1 $out/opt/kingsoft/wps-office/office6/addons/cef/libcef.so ''; From 74ca8895bcd3d1b1bfb570a18da6c30fad8203f7 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Sun, 9 Jun 2024 14:17:27 +0000 Subject: [PATCH 04/15] athens: 0.14.0 -> 0.14.1 --- pkgs/by-name/at/athens/package.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/by-name/at/athens/package.nix b/pkgs/by-name/at/athens/package.nix index 3f9e3755efac..fd4e340b9db8 100644 --- a/pkgs/by-name/at/athens/package.nix +++ b/pkgs/by-name/at/athens/package.nix @@ -6,13 +6,13 @@ }: buildGoModule rec { pname = "athens"; - version = "0.14.0"; + version = "0.14.1"; src = fetchFromGitHub { owner = "gomods"; repo = "athens"; rev = "v${version}"; - hash = "sha256-5E9jBV+m19AUtSTpTlkCx8JUHwlcM2pgSGfo4zPqDNk="; + hash = "sha256-vpg5EcQSxVFjDFKa4oHwF5fNHhLWtj3ZMi2wbMZNn/8="; }; vendorHash = "sha256-LajNPzGbWqW+9aqiquk2LvSUjKwi1gbDY4cKXmn3PWk="; From 626c0fefdd65ce0aa275f934f33f961f40d9e7a8 Mon Sep 17 00:00:00 2001 From: Thomas Gerbet Date: Sun, 9 Jun 2024 23:14:21 +0200 Subject: [PATCH 05/15] vte: 0.76.2 -> 0.76.3 Fixes CVE-2024-37535. Changes: https://gitlab.gnome.org/GNOME/vte/-/compare/0.76.2...0.76.3 --- pkgs/development/libraries/vte/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/vte/default.nix b/pkgs/development/libraries/vte/default.nix index 1d93b6e6adec..83acbe6b2446 100644 --- a/pkgs/development/libraries/vte/default.nix +++ b/pkgs/development/libraries/vte/default.nix @@ -32,14 +32,14 @@ stdenv.mkDerivation (finalAttrs: { pname = "vte"; - version = "0.76.2"; + version = "0.76.3"; outputs = [ "out" "dev" ] ++ lib.optional (gtkVersion != null) "devdoc"; src = fetchurl { url = "mirror://gnome/sources/vte/${lib.versions.majorMinor finalAttrs.version}/vte-${finalAttrs.version}.tar.xz"; - hash = "sha256-49xggtW9cPiq+qrSzfyvflHaa6AKkZsR3axu+gnHKEc="; + hash = "sha256-9njpTAVvN3/QAhIUrf9UUMsXLpoIsWCREYHd/3t9XWA="; }; patches = [ From 12f814a1ee57cbe4e16a4c50da4a33d1c20c5504 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Sun, 9 Jun 2024 22:47:41 +0000 Subject: [PATCH 06/15] wtfis: 0.9.1 -> 0.10.0 --- pkgs/by-name/wt/wtfis/package.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/by-name/wt/wtfis/package.nix b/pkgs/by-name/wt/wtfis/package.nix index 4163a31ac988..ad710bf8f229 100644 --- a/pkgs/by-name/wt/wtfis/package.nix +++ b/pkgs/by-name/wt/wtfis/package.nix @@ -5,12 +5,12 @@ let pname = "wtfis"; - version = "0.9.1"; + version = "0.10.0"; src = fetchFromGitHub { owner = "pirxthepilot"; repo = "wtfis"; rev = "refs/tags/v${version}"; - hash = "sha256-nVcF7mPoWL5PNLh0W4FBPE7WVU72FidHpBZqMNl+Fd4="; + hash = "sha256-5mvbwIKnCk8mbjVJAmUwV1zKzGk8HVVZLiUVQXRvczA="; }; in python3.pkgs.buildPythonApplication { inherit pname version src; From b749b1dc77148a7f3cd5c9a77aa60180dd594073 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Sun, 9 Jun 2024 23:22:29 +0000 Subject: [PATCH 07/15] ast-grep: 0.22.5 -> 0.22.6 --- pkgs/by-name/as/ast-grep/package.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/by-name/as/ast-grep/package.nix b/pkgs/by-name/as/ast-grep/package.nix index 81d2dfa3a17a..0cf9593e23d0 100644 --- a/pkgs/by-name/as/ast-grep/package.nix +++ b/pkgs/by-name/as/ast-grep/package.nix @@ -7,16 +7,16 @@ rustPlatform.buildRustPackage rec { pname = "ast-grep"; - version = "0.22.5"; + version = "0.22.6"; src = fetchFromGitHub { owner = "ast-grep"; repo = "ast-grep"; rev = version; - hash = "sha256-BBF4gnsZmQ36NDX7X/CTGb9+N79S5lLmBaq5keGeNfA="; + hash = "sha256-QE8bTFlKlaxUeYJoaZyiuv/7zk+Pi3s64Er5YNTUh7I="; }; - cargoHash = "sha256-bpwZ1yDeevjMlrLLBPQa9H5NIN99o39kicsOnp+kj9M="; + cargoHash = "sha256-tTEZUGC4RHjnAK+fMNkVqgsngBSdVAtoZ5ij3VbzKb4="; nativeBuildInputs = [ installShellFiles ]; From 0b8b3b1ccf052439628bb26172b640be8e5af363 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Mon, 10 Jun 2024 00:54:00 +0000 Subject: [PATCH 08/15] valeStyles.write-good: 0.4.0 -> 0.4.1 --- pkgs/tools/text/vale/styles.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/text/vale/styles.nix b/pkgs/tools/text/vale/styles.nix index 359a9beaaf86..b26b739e1fed 100644 --- a/pkgs/tools/text/vale/styles.nix +++ b/pkgs/tools/text/vale/styles.nix @@ -128,12 +128,12 @@ in write-good = buildStyle rec { name = "write-good"; - version = "0.4.0"; + version = "0.4.1"; src = fetchFromGitHub { owner = "errata-ai"; repo = "write-good"; rev = "v${version}"; - hash = "sha256-KQzY6MeHV/owPVmUAfzGUO0HmFPkD7wdQqOvBkipwP8="; + hash = "sha256-W/eHlXklAVlAnY8nLPi/SIKsg8UUnH8UkH99BDo5yKk="; }; meta = { description = "Vale-compatible implementation of the write-good linter"; From ead4532ef0849b92688ef22807f878cf0f6f9f8b Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Mon, 10 Jun 2024 00:54:26 +0000 Subject: [PATCH 09/15] valeStyles.alex: 0.2.1 -> 0.2.2 --- pkgs/tools/text/vale/styles.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/text/vale/styles.nix b/pkgs/tools/text/vale/styles.nix index 359a9beaaf86..6d92939502c1 100644 --- a/pkgs/tools/text/vale/styles.nix +++ b/pkgs/tools/text/vale/styles.nix @@ -32,12 +32,12 @@ in { alex = buildStyle rec { name = "alex"; - version = "0.2.1"; + version = "0.2.2"; src = fetchFromGitHub { owner = "errata-ai"; repo = "alex"; rev = "v${version}"; - hash = "sha256-xNF7se2FwKgNe5KYx/zvGWpIwBsBADYGH4JV1lUww+Q="; + hash = "sha256-mfeMa+KlkqwyS+h+oo5p5+P2bsmZ0BOph2nbQiaoNqM="; }; meta = { description = "Vale-compatible implementation of the guidelines enforced by the alex linter"; From 465025e57674363fb9b2699f39bc88a54f0b4da6 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Mon, 10 Jun 2024 00:57:35 +0000 Subject: [PATCH 10/15] valeStyles.proselint: 0.3.3 -> 0.3.4 --- pkgs/tools/text/vale/styles.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/text/vale/styles.nix b/pkgs/tools/text/vale/styles.nix index 359a9beaaf86..4b371972de16 100644 --- a/pkgs/tools/text/vale/styles.nix +++ b/pkgs/tools/text/vale/styles.nix @@ -96,12 +96,12 @@ in proselint = buildStyle rec { name = "proselint"; - version = "0.3.3"; + version = "0.3.4"; src = fetchFromGitHub { owner = "errata-ai"; repo = "proselint"; rev = "v${version}"; - hash = "sha256-faeWr1bRhnKsycJY89WqnRv8qIowUmz3EQvDyjtl63w="; + hash = "sha256-ryKJDX1JrvDWVKLC5qQGctweDf74yuwEXxl/IqumM4s="; }; meta = { description = "Vale-compatible implementation of Python's proselint linter"; From f862ae2e3137702ca3df7c1cea80f28431df492f Mon Sep 17 00:00:00 2001 From: 1sixth <1sixth@shinta.ro> Date: Mon, 10 Jun 2024 01:19:06 +0800 Subject: [PATCH 11/15] nixos/tests/mpv: adapt to the new mpv wrapper --- nixos/tests/mpv.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nixos/tests/mpv.nix b/nixos/tests/mpv.nix index 32a81cbe2495..c2e151c22476 100644 --- a/nixos/tests/mpv.nix +++ b/nixos/tests/mpv.nix @@ -12,7 +12,7 @@ in { environment.systemPackages = [ pkgs.curl - (pkgs.wrapMpv pkgs.mpv-unwrapped { + (pkgs.mpv.override { scripts = [ pkgs.mpvScripts.simple-mpv-webui ]; }) ]; From 54072d588d367675e4261eb2da42923117b54a1d Mon Sep 17 00:00:00 2001 From: 1sixth <1sixth@shinta.ro> Date: Mon, 10 Jun 2024 09:37:33 +0800 Subject: [PATCH 12/15] mpv: allow ofborg to execute the test Co-authored-by: Mario Rodas --- pkgs/applications/video/mpv/default.nix | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/pkgs/applications/video/mpv/default.nix b/pkgs/applications/video/mpv/default.nix index b5672d7afa46..4600cfb48cb6 100644 --- a/pkgs/applications/video/mpv/default.nix +++ b/pkgs/applications/video/mpv/default.nix @@ -50,6 +50,7 @@ meson, mujs, ninja, + nixosTests, nv-codec-headers-11, openalSoft, pipewire, @@ -60,6 +61,7 @@ speex, stdenv, swift, + testers, vapoursynth, vulkan-headers, vulkan-loader, @@ -351,6 +353,18 @@ stdenv'.mkDerivation (finalAttrs: { wrapper = callPackage ./wrapper.nix { }; scripts = callPackage ./scripts { }; + + tests = { + inherit (nixosTests) mpv; + + version = testers.testVersion { + package = finalAttrs.finalPackage; + }; + pkg-config = testers.hasPkgConfigModules { + package = finalAttrs.finalPackage; + moduleNames = [ "mpv" ]; + }; + }; }; meta = { From 45482ed36b02197df3983e0cb23607eb65528dc4 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Sun, 9 Jun 2024 21:33:23 +0000 Subject: [PATCH 13/15] python311Packages.iminuit: 2.25.2 -> 2.26.0 --- pkgs/development/python-modules/iminuit/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/iminuit/default.nix b/pkgs/development/python-modules/iminuit/default.nix index cc999468fdd9..0cd1fdf91d0c 100644 --- a/pkgs/development/python-modules/iminuit/default.nix +++ b/pkgs/development/python-modules/iminuit/default.nix @@ -21,14 +21,14 @@ buildPythonPackage rec { pname = "iminuit"; - version = "2.25.2"; + version = "2.26.0"; format = "pyproject"; disabled = pythonOlder "3.6"; src = fetchPypi { inherit pname version; - hash = "sha256-O/ihuWhlpgzt8pE19P6uCfp8ZiN9KfaN7WTpeoI6mz4="; + hash = "sha256-pRIz+/HC4AiqWE+e6mW2ww7VZiTk3qXU5TNwzNhMm04="; }; nativeBuildInputs = [ From 56dd8118babc9b63a3fb2793492830fb1a83a9bc Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Sun, 9 Jun 2024 04:08:39 +0000 Subject: [PATCH 14/15] python311Packages.python-telegram-bot: 21.2 -> 21.3 --- .../python-modules/python-telegram-bot/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/python-telegram-bot/default.nix b/pkgs/development/python-modules/python-telegram-bot/default.nix index 8cd1dc5ec7ff..26df7c0567d9 100644 --- a/pkgs/development/python-modules/python-telegram-bot/default.nix +++ b/pkgs/development/python-modules/python-telegram-bot/default.nix @@ -21,7 +21,7 @@ buildPythonPackage rec { pname = "python-telegram-bot"; - version = "21.2"; + version = "21.3"; pyproject = true; disabled = pythonOlder "3.8"; @@ -30,7 +30,7 @@ buildPythonPackage rec { owner = "python-telegram-bot"; repo = "python-telegram-bot"; rev = "refs/tags/v${version}"; - hash = "sha256-l5twJbyZh30+pt9DsCpQRuSav8qYNGlIhQW0qY9BmO4="; + hash = "sha256-eyIRZkt1ea2L20ryogKrmSx/+xL2fhNXcf3vUnuS9vo="; }; build-system = [ setuptools ]; From 181e82f4b21eb779cc90fc179b162a3ad0bb2e11 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20K=C3=B6gler?= Date: Sat, 8 Jun 2024 23:41:05 +0200 Subject: [PATCH 15/15] nixos/tests/machinectl: add workaround for nix-build --- nixos/tests/systemd-machinectl.nix | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/nixos/tests/systemd-machinectl.nix b/nixos/tests/systemd-machinectl.nix index 9d761c6d4d8b..555a8bb43b30 100644 --- a/nixos/tests/systemd-machinectl.nix +++ b/nixos/tests/systemd-machinectl.nix @@ -76,10 +76,23 @@ in }; }; + systemd.nspawn.${containerName} = { + filesConfig = { + # workaround to fix kernel namespaces; needed for Nix sandbox + # https://github.com/systemd/systemd/issues/27994#issuecomment-1704005670 + Bind = "/proc:/run/proc"; + }; + }; + systemd.services."systemd-nspawn@${containerName}" = { serviceConfig.Environment = [ # Disable tmpfs for /tmp "SYSTEMD_NSPAWN_TMPFS_TMP=0" + + # force unified cgroup delegation, which would be the default + # if systemd could check the capabilities of the installed systemd. + # see also: https://github.com/NixOS/nixpkgs/pull/198526 + "SYSTEMD_NSPAWN_UNIFIED_HIERARCHY=1" ]; overrideStrategy = "asDropin"; }; @@ -121,6 +134,17 @@ in machine.succeed("machinectl start ${containerName}"); machine.wait_until_succeeds("systemctl -M ${containerName} is-active default.target"); + # Test systemd-nspawn configured unified cgroup delegation + # see also: + # https://github.com/systemd/systemd/blob/main/docs/CGROUP_DELEGATION.md#three-different-tree-setups- + machine.succeed('systemd-run --pty --wait -M ${containerName} /run/current-system/sw/bin/stat --format="%T" --file-system /sys/fs/cgroup > fstype') + machine.succeed('test $(tr -d "\\r" < fstype) = cgroup2fs') + + # Test if systemd-nspawn provides a working environment for nix to build derivations + # https://nixos.org/guides/nix-pills/07-working-derivation + machine.succeed('systemd-run --pty --wait -M ${containerName} /run/current-system/sw/bin/nix-instantiate --expr \'derivation { name = "myname"; builder = "/bin/sh"; args = [ "-c" "echo foo > $out" ]; system = "${pkgs.system}"; }\' --add-root /tmp/drv') + machine.succeed('systemd-run --pty --wait -M ${containerName} /run/current-system/sw/bin/nix-store --option substitute false --realize /tmp/drv') + # Test nss_mymachines without nscd machine.succeed('LD_LIBRARY_PATH="/run/current-system/sw/lib" getent -s hosts:mymachines hosts ${containerName}');