diff options
9 files changed, 125 insertions, 40 deletions
diff --git a/nixos/tests/hibernate.nix b/nixos/tests/hibernate.nix index 8251c6e7ef85..ae506c8542fe 100644 --- a/nixos/tests/hibernate.nix +++ b/nixos/tests/hibernate.nix @@ -1,44 +1,120 @@ # Test whether hibernation from partition works. -import ./make-test-python.nix (pkgs: { - name = "hibernate"; +{ system ? builtins.currentSystem +, config ? {} +, pkgs ? import ../.. { inherit system config; } +}: - nodes = { - machine = { config, lib, pkgs, ... }: with lib; { - virtualisation.emptyDiskImages = [ config.virtualisation.memorySize ]; +with import ../lib/testing-python.nix { inherit system pkgs; }; - systemd.services.backdoor.conflicts = [ "sleep.target" ]; +let + # System configuration of the installed system, which is used for the actual + # hibernate testing. + installedConfig = with pkgs.lib; { + imports = [ + ../modules/testing/test-instrumentation.nix + ../modules/profiles/qemu-guest.nix + ../modules/profiles/minimal.nix + ]; - swapDevices = mkOverride 0 [ { device = "/dev/vdb"; } ]; + hardware.enableAllFirmware = mkForce false; + documentation.nixos.enable = false; + boot.loader.grub.device = "/dev/vda"; - networking.firewall.allowedTCPPorts = [ 4444 ]; + systemd.services.backdoor.conflicts = [ "sleep.target" ]; - systemd.services.listener.serviceConfig.ExecStart = "${pkgs.netcat}/bin/nc -l 4444 -k"; + powerManagement.resumeCommands = "systemctl --no-block restart backdoor.service"; + + fileSystems = { + "/".device = "/dev/vda2"; }; + swapDevices = mkOverride 0 [ { device = "/dev/vda1"; } ]; + }; + installedSystem = (import ../lib/eval-config.nix { + inherit system; + modules = [ installedConfig ]; + }).config.system.build.toplevel; +in makeTest { + name = "hibernate"; + + nodes = { + # System configuration used for installing the installedConfig from above. + machine = { config, lib, pkgs, ... }: with lib; { + imports = [ + ../modules/profiles/installation-device.nix + ../modules/profiles/base.nix + ]; - probe = { pkgs, ...}: { - environment.systemPackages = [ pkgs.netcat ]; + nix.binaryCaches = mkForce [ ]; + nix.extraOptions = '' + hashed-mirrors = + connect-timeout = 1 + ''; + + virtualisation.diskSize = 8 * 1024; + virtualisation.emptyDiskImages = [ + # Small root disk for installer + 512 + ]; + virtualisation.bootDevice = "/dev/vdb"; }; }; # 9P doesn't support reconnection to virtio transport after a hibernation. # Therefore, machine just hangs on any Nix store access. - # To work around it we run a daemon which listens to a TCP connection and - # try to connect to it as a test. + # To avoid this, we install NixOS onto a temporary disk with everything we need + # included into the store. testScript = '' + def create_named_machine(name): + return create_machine( + { + "qemuFlags": "-cpu max ${ + if system == "x86_64-linux" then "-m 1024" + else "-m 768 -enable-kvm -machine virt,gic-version=host"}", + "hdaInterface": "virtio", + "hda": "vm-state-machine/machine.qcow2", + "name": name, + } + ) + + + # Install NixOS machine.start() - machine.wait_for_unit("multi-user.target") - machine.succeed("mkswap /dev/vdb") - machine.succeed("swapon -a") - machine.start_job("listener") - machine.wait_for_open_port(4444) - machine.succeed("systemctl hibernate &") - machine.wait_for_shutdown() - probe.wait_for_unit("multi-user.target") - machine.start() - probe.wait_until_succeeds("echo test | nc machine 4444 -N") + machine.succeed( + # Partition /dev/vda + "flock /dev/vda parted --script /dev/vda -- mklabel msdos" + + " mkpart primary linux-swap 1M 1024M" + + " mkpart primary ext2 1024M -1s", + "udevadm settle", + "mkfs.ext3 -L nixos /dev/vda2", + "mount LABEL=nixos /mnt", + "mkswap /dev/vda1 -L swap", + # Install onto /mnt + "nix-store --load-db < ${pkgs.closureInfo {rootPaths = [installedSystem];}}/registration", + "nixos-install --root /mnt --system ${installedSystem} --no-root-passwd", + ) + machine.shutdown() + + # Start up + hibernate = create_named_machine("hibernate") + + # Drop in file that checks if we un-hibernated properly (and not booted fresh) + hibernate.succeed( + "mkdir /run/test", + "mount -t ramfs -o size=1m ramfs /run/test", + "echo not persisted to disk > /run/test/suspended", + ) + + # Hibernate machine + hibernate.succeed("systemctl hibernate &") + hibernate.wait_for_shutdown() + + # Restore machine from hibernation, validate our ramfs file is there. + resume = create_named_machine("resume") + resume.start() + resume.succeed("grep 'not persisted to disk' /run/test/suspended") ''; -}) +} diff --git a/pkgs/applications/misc/electrum/default.nix b/pkgs/applications/misc/electrum/default.nix index 44f35e503ca0..676efb2aa042 100644 --- a/pkgs/applications/misc/electrum/default.nix +++ b/pkgs/applications/misc/electrum/default.nix @@ -20,7 +20,7 @@ }: let - version = "4.1.1"; + version = "4.1.2"; libsecp256k1_name = if stdenv.isLinux then "libsecp256k1.so.0" @@ -51,7 +51,7 @@ python3.pkgs.buildPythonApplication { src = fetchurl { url = "https://download.electrum.org/${version}/Electrum-${version}.tar.gz"; - sha256 = "0yg6ld92a4xgn7y8i51hmr3kmgmrbrjwniikkmyq9q141h2drb80"; + sha256 = "05m6vbd4sfjk536kwa5wa3kv21jxxqnglx0ddvnmxfhf98371bhk"; }; postUnpack = '' @@ -59,6 +59,11 @@ python3.pkgs.buildPythonApplication { cp -ar ${tests} $sourceRoot/electrum/tests ''; + prePatch = '' + substituteInPlace contrib/requirements/requirements.txt \ + --replace "dnspython>=2.0,<2.1" "dnspython>=2.0" + ''; + nativeBuildInputs = lib.optionals enableQt [ wrapQtAppsHook ]; propagatedBuildInputs = with python3.pkgs; [ diff --git a/pkgs/applications/networking/instant-messengers/element/element-desktop-package.json b/pkgs/applications/networking/instant-messengers/element/element-desktop-package.json index aa240b48e884..e1f070eaa9a7 100644 --- a/pkgs/applications/networking/instant-messengers/element/element-desktop-package.json +++ b/pkgs/applications/networking/instant-messengers/element/element-desktop-package.json @@ -2,7 +2,7 @@ "name": "element-desktop", "productName": "Element", "main": "src/electron-main.js", - "version": "1.7.25", + "version": "1.7.26", "description": "A feature-rich client for Matrix.org", "author": "Element", "repository": { diff --git a/pkgs/applications/networking/instant-messengers/element/element-desktop.nix b/pkgs/applications/networking/instant-messengers/element/element-desktop.nix index 75252bb74b49..2a7e01e5291c 100644 --- a/pkgs/applications/networking/instant-messengers/element/element-desktop.nix +++ b/pkgs/applications/networking/instant-messengers/element/element-desktop.nix @@ -8,12 +8,12 @@ let executableName = "element-desktop"; - version = "1.7.25"; + version = "1.7.26"; src = fetchFromGitHub { owner = "vector-im"; repo = "element-desktop"; rev = "v${version}"; - sha256 = "sha256-q8hVmTLt/GdLc6NSldLggogObQcPFp+lAeS3wmO0qPo="; + sha256 = "1iflsvzn36mywpzags55kjmyq71c3i7f1hgcdcp2ijmnrjk8fy3n"; }; in mkYarnPackage rec { name = "element-desktop-${version}"; @@ -73,6 +73,7 @@ in mkYarnPackage rec { meta = with lib; { description = "A feature-rich client for Matrix.org"; homepage = "https://element.io/"; + changelog = "https://github.com/vector-im/element-desktop/blob/v${version}/CHANGELOG.md"; license = licenses.asl20; maintainers = teams.matrix.members; inherit (electron.meta) platforms; diff --git a/pkgs/applications/networking/instant-messengers/element/element-web.nix b/pkgs/applications/networking/instant-messengers/element/element-web.nix index 624ba46b8e8b..9f077c833772 100644 --- a/pkgs/applications/networking/instant-messengers/element/element-web.nix +++ b/pkgs/applications/networking/instant-messengers/element/element-web.nix @@ -12,11 +12,11 @@ let in stdenv.mkDerivation rec { pname = "element-web"; - version = "1.7.25"; + version = "1.7.26"; src = fetchurl { url = "https://github.com/vector-im/element-web/releases/download/v${version}/element-v${version}.tar.gz"; - sha256 = "sha256-T4lsGVSUHkw4R7tSeTKPifbhwaTf/YF2vVAakFSrt9k="; + sha256 = "17y6wq6w1yk7r1rfply549kpilfraizahf67p00ra7cws66iqkwg"; }; installPhase = '' @@ -32,6 +32,7 @@ in stdenv.mkDerivation rec { meta = { description = "A glossy Matrix collaboration client for the web"; homepage = "https://element.io/"; + changelog = "https://github.com/vector-im/element-web/blob/v${version}/CHANGELOG.md"; maintainers = lib.teams.matrix.members; license = lib.licenses.asl20; platforms = lib.platforms.all; diff --git a/pkgs/development/python-modules/sagemaker/default.nix b/pkgs/development/python-modules/sagemaker/default.nix index d227b7f8c656..c9bad89d93c4 100644 --- a/pkgs/development/python-modules/sagemaker/default.nix +++ b/pkgs/development/python-modules/sagemaker/default.nix @@ -10,16 +10,17 @@ , protobuf3-to-dict , smdebug-rulesconfig , pandas +, pathos , packaging }: buildPythonPackage rec { pname = "sagemaker"; - version = "2.37.0"; + version = "2.38.0"; src = fetchPypi { inherit pname version; - sha256 = "sha256-96RDi32NHfhFvPeVRhG32EDQJTiwOXEwtSmFZGVBVk0="; + sha256 = "sha256-7cIGr49fKI0zQmX4/9v/gW5yB4kfeQJ3H/Vvgl9CKuY="; }; pythonImportsCheck = [ @@ -34,6 +35,7 @@ buildPythonPackage rec { importlib-metadata numpy packaging + pathos protobuf protobuf3-to-dict smdebug-rulesconfig diff --git a/pkgs/development/tools/lazygit/default.nix b/pkgs/development/tools/lazygit/default.nix index cd0fb4a33305..7038b7c1eb03 100644 --- a/pkgs/development/tools/lazygit/default.nix +++ b/pkgs/development/tools/lazygit/default.nix @@ -2,13 +2,13 @@ buildGoModule rec { pname = "lazygit"; - version = "0.27.3"; + version = "0.28.1"; src = fetchFromGitHub { owner = "jesseduffield"; repo = pname; rev = "v${version}"; - sha256 = "sha256-giHAeD7hhda9YV+NQuZ6w0eow79egGhUCIX0dPvhrWk="; + sha256 = "sha256-tan8ksSyMIeDL7oRAWd3Qtz/sKbhAAfY7IknfwjyvgQ="; }; vendorSha256 = null; diff --git a/pkgs/tools/networking/innernet/default.nix b/pkgs/tools/networking/innernet/default.nix index a195841ab575..abc7aca61a32 100644 --- a/pkgs/tools/networking/innernet/default.nix +++ b/pkgs/tools/networking/innernet/default.nix @@ -2,19 +2,19 @@ rustPlatform.buildRustPackage rec { pname = "innernet"; - version = "1.1.0"; + version = "1.2.0"; src = fetchFromGitHub { owner = "tonarino"; repo = pname; rev = "v${version}"; - sha256 = "sha256-OomCSA02ypFVzkYMcmkFREWB6x7oxgpt7x2zRANIDMw="; + sha256 = "sha256-Z4F5RYPVgFiiDBg6lxILjAh/a/rL7IJBqHIJ/tQyLnE="; }; LIBCLANG_PATH = "${llvmPackages.libclang}/lib"; nativeBuildInputs = with llvmPackages; [ llvm clang ]; buildInputs = [ sqlite ] ++ lib.optionals stdenv.isDarwin [ Security ]; - cargoSha256 = "sha256-GYNk3j8fjKSo3Qk6Qy0l6kNINK3FxlSYoEkJSx7kVpk="; + cargoSha256 = "sha256-WSkN5aXMgfqZJAV1b3elF7kwf2f5OpcntKSf8620YcY="; meta = with lib; { description = "A private network system that uses WireGuard under the hood"; diff --git a/pkgs/tools/virtualization/govc/default.nix b/pkgs/tools/virtualization/govc/default.nix index 3727d1ac1da3..00330f7d1a43 100644 --- a/pkgs/tools/virtualization/govc/default.nix +++ b/pkgs/tools/virtualization/govc/default.nix @@ -2,7 +2,7 @@ buildGoPackage rec { pname = "govc"; - version = "0.24.1"; + version = "0.25.0"; goPackagePath = "github.com/vmware/govmomi"; @@ -12,7 +12,7 @@ buildGoPackage rec { rev = "v${version}"; owner = "vmware"; repo = "govmomi"; - sha256 = "sha256-D2UrYdjstOxx9EAdBtAC44khp8hRf6W3+6kzytUVnOo="; + sha256 = "sha256-Ri8snbmgcAZmdumKzBl3P6gf/eZgwdgg7V+ijyeZjks="; }; meta = { |