diff --git a/nixos/modules/services/home-automation/zigbee2mqtt.nix b/nixos/modules/services/home-automation/zigbee2mqtt.nix index a653e49a09f6..570ce41aa6d4 100644 --- a/nixos/modules/services/home-automation/zigbee2mqtt.nix +++ b/nixos/modules/services/home-automation/zigbee2mqtt.nix @@ -71,6 +71,7 @@ in after = [ "network.target" ]; environment.ZIGBEE2MQTT_DATA = cfg.dataDir; serviceConfig = { + Type = "notify"; ExecStart = "${cfg.package}/bin/zigbee2mqtt"; User = "zigbee2mqtt"; Group = "zigbee2mqtt"; diff --git a/nixos/tests/all-tests.nix b/nixos/tests/all-tests.nix index f52e37d782bd..c943179051cc 100644 --- a/nixos/tests/all-tests.nix +++ b/nixos/tests/all-tests.nix @@ -627,6 +627,7 @@ in { ntfy-sh = handleTest ./ntfy-sh.nix {}; ntfy-sh-migration = handleTest ./ntfy-sh-migration.nix {}; ntpd-rs = handleTest ./ntpd-rs.nix {}; + nvmetcfg = handleTest ./nvmetcfg.nix {}; nzbget = handleTest ./nzbget.nix {}; nzbhydra2 = handleTest ./nzbhydra2.nix {}; oh-my-zsh = handleTest ./oh-my-zsh.nix {}; diff --git a/nixos/tests/nvmetcfg.nix b/nixos/tests/nvmetcfg.nix new file mode 100644 index 000000000000..a4c459a343cf --- /dev/null +++ b/nixos/tests/nvmetcfg.nix @@ -0,0 +1,43 @@ +import ./make-test-python.nix ({ lib, ... }: { + name = "nvmetcfg"; + + meta = { + maintainers = with lib.maintainers; [ nickcao ]; + }; + + nodes = { + server = { pkgs, ... }: { + boot.kernelModules = [ "nvmet" ]; + environment.systemPackages = [ pkgs.nvmetcfg ]; + networking.firewall.allowedTCPPorts = [ 4420 ]; + virtualisation.emptyDiskImages = [ 512 ]; + }; + client = { pkgs, ... }: { + boot.kernelModules = [ "nvme-fabrics" ]; + environment.systemPackages = [ pkgs.nvme-cli ]; + }; + }; + + testScript = let subsystem = "nqn.2014-08.org.nixos:server"; in '' + import json + + with subtest("Create subsystem and namespace"): + server.succeed("nvmet subsystem add ${subsystem}") + server.succeed("nvmet namespace add ${subsystem} 1 /dev/vdb") + + with subtest("Bind subsystem to port"): + server.wait_for_unit("network-online.target") + server.succeed("nvmet port add 1 tcp 0.0.0.0:4420") + server.succeed("nvmet port add-subsystem 1 ${subsystem}") + + with subtest("Discover and connect to available subsystems"): + client.wait_for_unit("network-online.target") + assert "subnqn: ${subsystem}" in client.succeed("nvme discover --transport=tcp --traddr=server --trsvcid=4420") + client.succeed("nvme connect-all --transport=tcp --traddr=server --trsvcid=4420") + + with subtest("Write to the connected subsystem"): + devices = json.loads(client.succeed("lsblk --nvme --paths --json"))["blockdevices"] + assert len(devices) == 1 + client.succeed(f"dd if=/dev/zero of={devices[0]['name']} bs=1M count=64") + ''; +}) diff --git a/nixos/tests/zigbee2mqtt.nix b/nixos/tests/zigbee2mqtt.nix index 1a40d175df83..9d6d03a4b9bb 100644 --- a/nixos/tests/zigbee2mqtt.nix +++ b/nixos/tests/zigbee2mqtt.nix @@ -3,6 +3,15 @@ import ./make-test-python.nix ({ pkgs, lib, ... }: name = "zigbee2mqtt"; nodes.machine = { pkgs, ... }: { + systemd.services.dummy-serial = { + wantedBy = [ + "multi-user.target" + ]; + serviceConfig = { + ExecStart = "${pkgs.socat}/bin/socat pty,link=/dev/ttyACM0,mode=666 pty,link=/dev/ttyACM1"; + }; + }; + services.zigbee2mqtt = { enable = true; }; @@ -11,10 +20,10 @@ import ./make-test-python.nix ({ pkgs, lib, ... }: }; testScript = '' - machine.wait_for_unit("zigbee2mqtt.service") + machine.wait_for_unit("multi-user.target") machine.wait_until_fails("systemctl status zigbee2mqtt.service") machine.succeed( - "journalctl -eu zigbee2mqtt | grep \"Error: Error while opening serialport 'Error: Error: No such file or directory, cannot open /dev/ttyACM0'\"" + "journalctl -eu zigbee2mqtt | grep 'Failed to connect to the adapter'" ) machine.log(machine.succeed("systemd-analyze security zigbee2mqtt.service")) diff --git a/pkgs/applications/virtualization/docker-slim/default.nix b/pkgs/applications/virtualization/docker-slim/default.nix index 54527f339f50..03a76e4f0096 100644 --- a/pkgs/applications/virtualization/docker-slim/default.nix +++ b/pkgs/applications/virtualization/docker-slim/default.nix @@ -2,13 +2,13 @@ buildGoModule rec { pname = "docker-slim"; - version = "1.40.10"; + version = "1.40.11"; src = fetchFromGitHub { owner = "slimtoolkit"; repo = "slim"; rev = version; - hash = "sha256-NpQyIOR8FkOgPHi3UwBAEpouJF/eaSAWD2zQ5dj+gAg="; + hash = "sha256-X+1euWp4W53axbiBpL82bUPfod/JNhGVGWgOqKyhz6A="; }; vendorHash = null; diff --git a/pkgs/by-name/nv/nvmetcfg/package.nix b/pkgs/by-name/nv/nvmetcfg/package.nix index 9345d126c9c2..5edd436ba621 100644 --- a/pkgs/by-name/nv/nvmetcfg/package.nix +++ b/pkgs/by-name/nv/nvmetcfg/package.nix @@ -1,6 +1,7 @@ { lib , rustPlatform , fetchFromGitHub +, nixosTests }: rustPlatform.buildRustPackage rec { @@ -16,6 +17,10 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-yZ4UAx95f/cjeObBtzpiYtwDjgOgkKnD64yGe6ouVGw="; + passthru.tests = { + inherit (nixosTests) nvmetcfg; + }; + meta = with lib; { description = "NVMe-oF Target Configuration Utility for Linux"; homepage = "https://github.com/vifino/nvmetcfg"; diff --git a/pkgs/desktops/budgie/budgie-desktop/default.nix b/pkgs/desktops/budgie/budgie-desktop/default.nix index 585625226d86..7dc23cf10f50 100644 --- a/pkgs/desktops/budgie/budgie-desktop/default.nix +++ b/pkgs/desktops/budgie/budgie-desktop/default.nix @@ -37,14 +37,14 @@ stdenv.mkDerivation (finalAttrs: { pname = "budgie-desktop"; - version = "10.9"; + version = "10.9.1"; src = fetchFromGitHub { owner = "BuddiesOfBudgie"; repo = "budgie-desktop"; rev = "v${finalAttrs.version}"; fetchSubmodules = true; - hash = "sha256-yyuLBzTDEQH7rBOWTYBvS+3x2mlbF34f7U7oOUO8BeA="; + hash = "sha256-H+J/zFUjiXbr5ynDkkjrRsEbyO4LPOhqe8DdG60ikRw="; }; patches = [ diff --git a/pkgs/development/cuda-modules/generic-builders/multiplex.nix b/pkgs/development/cuda-modules/generic-builders/multiplex.nix index abe8ad242a3a..f2a9c6840ecd 100644 --- a/pkgs/development/cuda-modules/generic-builders/multiplex.nix +++ b/pkgs/development/cuda-modules/generic-builders/multiplex.nix @@ -83,13 +83,13 @@ let # perSystemReleases :: List Package allReleases = lib.pipe releaseSets [ - (builtins.attrValues) + (lib.attrValues) (lists.flatten) - (builtins.groupBy (p: lib.versions.majorMinor p.version)) - (builtins.mapAttrs (_: builtins.sort preferable)) - (builtins.mapAttrs (_: lib.take 1)) - (builtins.attrValues) - (builtins.concatMap lib.trivial.id) + (lib.groupBy (p: lib.versions.majorMinor p.version)) + (lib.mapAttrs (_: builtins.sort preferable)) + (lib.mapAttrs (_: lib.take 1)) + (lib.attrValues) + (lib.concatMap lib.trivial.id) ]; newest = builtins.head (builtins.sort preferable allReleases); diff --git a/pkgs/development/python-modules/comm/default.nix b/pkgs/development/python-modules/comm/default.nix index e03eae5ffdbb..3c2fa837a8cd 100644 --- a/pkgs/development/python-modules/comm/default.nix +++ b/pkgs/development/python-modules/comm/default.nix @@ -8,7 +8,7 @@ let pname = "comm"; - version = "0.2.0"; + version = "0.2.1"; in buildPythonPackage { inherit pname version; @@ -18,7 +18,7 @@ buildPythonPackage { owner = "ipython"; repo = "comm"; rev = "refs/tags/v${version}"; - hash = "sha256-bErZNTm0spO0A/Lc8kq5u7sB0FMXm/WMWtFbCNGJVXE="; + hash = "sha256-iyO3q9E2lYU1rMYTnsa+ZJYh+Hq72LEvE9ynebFIBUk="; }; nativeBuildInputs = [ diff --git a/pkgs/development/python-modules/ipykernel/default.nix b/pkgs/development/python-modules/ipykernel/default.nix index d96ab023c87f..317f8a7fc2eb 100644 --- a/pkgs/development/python-modules/ipykernel/default.nix +++ b/pkgs/development/python-modules/ipykernel/default.nix @@ -22,14 +22,14 @@ buildPythonPackage rec { pname = "ipykernel"; - version = "6.28.0"; + version = "6.29.0"; pyproject = true; disabled = pythonOlder "3.8"; src = fetchPypi { inherit pname version; - hash = "sha256-acEUA9Jt5p3wIiWRb5FrN+pLmvQX2gqMgn+EMo2I5fM="; + hash = "sha256-td0wE8q3szDfcSiRyWzRq4aMJ6cVnmBvdiAV6b+M6z8="; }; # debugpy is optional, see https://github.com/ipython/ipykernel/pull/767 diff --git a/pkgs/development/python-modules/ipython-sql/default.nix b/pkgs/development/python-modules/ipython-sql/default.nix index 0aa7fa388c4f..a87c359c967a 100644 --- a/pkgs/development/python-modules/ipython-sql/default.nix +++ b/pkgs/development/python-modules/ipython-sql/default.nix @@ -1,32 +1,29 @@ { lib , buildPythonPackage -, fetchFromGitHub +, fetchPypi , pythonOlder +, setuptools , ipython , ipython-genutils -, pandas , prettytable -, pytest , sqlalchemy , sqlparse }: buildPythonPackage rec { pname = "ipython-sql"; - version = "0.4.0"; - format = "setuptools"; + version = "0.5.0"; + pyproject = true; disabled = pythonOlder "3.7"; - src = fetchFromGitHub { - owner = "catherinedevlin"; - repo = "ipython-sql"; - rev = "117764caf099d80100ed4b09fc004b55eed6f121"; - hash = "sha256-ScQihsvRSnC7VIgy8Tzi1z4x6KIZo0SAeLPvHAVdrfA="; + src = fetchPypi { + inherit pname version; + hash = "sha256-PbPOf5qV369Dh2+oCxa9u5oE3guhIELKsT6fWW/P/b4="; }; - postPatch = '' - substituteInPlace setup.py --replace 'prettytable<1' prettytable - ''; + nativeBuildInputs = [ + setuptools + ]; propagatedBuildInputs = [ ipython @@ -36,17 +33,8 @@ buildPythonPackage rec { sqlparse ]; - nativeCheckInputs = [ ipython pandas pytest ]; - - checkPhase = '' - runHook preCheck - - # running with ipython is required because the tests use objects available - # only inside of ipython, for example the global `get_ipython()` function - ipython -c 'import pytest; pytest.main()' - - runHook postCheck - ''; + # pypi tarball has no tests + doCheck = false; pythonImportsCheck = [ "sql" ]; diff --git a/pkgs/development/python-modules/jupyter-lsp/default.nix b/pkgs/development/python-modules/jupyter-lsp/default.nix index 1cc43ebc6001..51161435e917 100644 --- a/pkgs/development/python-modules/jupyter-lsp/default.nix +++ b/pkgs/development/python-modules/jupyter-lsp/default.nix @@ -7,12 +7,12 @@ buildPythonPackage rec { pname = "jupyter-lsp"; - version = "2.2.1"; + version = "2.2.2"; pyproject = true; src = fetchPypi { inherit pname version; - hash = "sha256-sX+rbXD+g8iJawz/WSN2QAOCR8GWBWtDaEoJArap4Ps="; + hash = "sha256-JW0kYgVCrku6BKUPwfb/4ggJOgfY5pf+oKjRuMobfls="; }; nativeBuildInputs = [ diff --git a/pkgs/development/python-modules/jupyter-server/default.nix b/pkgs/development/python-modules/jupyter-server/default.nix index 240d2064168c..505297a7939c 100644 --- a/pkgs/development/python-modules/jupyter-server/default.nix +++ b/pkgs/development/python-modules/jupyter-server/default.nix @@ -34,14 +34,14 @@ buildPythonPackage rec { pname = "jupyter-server"; - version = "2.12.4"; + version = "2.12.5"; pyproject = true; disabled = pythonOlder "3.8"; src = fetchPypi { pname = "jupyter_server"; inherit version; - hash = "sha256-QfSh5rkSzCSnxsaUhRs309hBKxgPQ9cjFf5CLLK4XMI="; + hash = "sha256-DttibJS6oigJvhMj+XcM8cAKlSsXCXWS5A0D5qOVFok="; }; nativeBuildInputs = [ diff --git a/pkgs/development/python-modules/nbconvert/default.nix b/pkgs/development/python-modules/nbconvert/default.nix index 1242d018adad..f816abc1d740 100644 --- a/pkgs/development/python-modules/nbconvert/default.nix +++ b/pkgs/development/python-modules/nbconvert/default.nix @@ -32,14 +32,14 @@ let }; in buildPythonPackage rec { pname = "nbconvert"; - version = "7.14.1"; + version = "7.14.2"; pyproject = true; disabled = pythonOlder "3.8"; src = fetchPypi { inherit pname version; - hash = "sha256-IMuhDgRI3Hazvr/hrfkjZj47mDONr3e5e0JRHvWohhg="; + hash = "sha256-p/iAj9TggkMWc6xThAAhjdRe/QdvvrB8xuWqWjpOlJ4="; }; # Add $out/share/jupyter to the list of paths that are used to search for diff --git a/pkgs/development/python-modules/notebook/default.nix b/pkgs/development/python-modules/notebook/default.nix index e26ec900682a..10b02d1bb620 100644 --- a/pkgs/development/python-modules/notebook/default.nix +++ b/pkgs/development/python-modules/notebook/default.nix @@ -16,14 +16,14 @@ buildPythonPackage rec { pname = "notebook"; - version = "7.0.6"; + version = "7.0.7"; disabled = pythonOlder "3.8"; format = "pyproject"; src = fetchPypi { inherit pname version; - hash = "sha256-7GETsGUpAZ9/KHgZrwbJeiuvepWsIaj24yGSiY6fmlg="; + hash = "sha256-O8/wDBezrBQu9fQ21QY32TaydM+gtB9qwBdTY96bTgk="; }; postPatch = '' diff --git a/pkgs/development/tools/database/atlas/default.nix b/pkgs/development/tools/database/atlas/default.nix index 4832a1d28008..7d275071ee4a 100644 --- a/pkgs/development/tools/database/atlas/default.nix +++ b/pkgs/development/tools/database/atlas/default.nix @@ -2,13 +2,13 @@ buildGoModule rec { pname = "atlas"; - version = "0.18.0"; + version = "0.19.0"; src = fetchFromGitHub { owner = "ariga"; repo = "atlas"; rev = "v${version}"; - hash = "sha256-xbQ5ZhyCQY/IosBPMD8MKQ1KnIymPD8IhUKaIdXHAok="; + hash = "sha256-aTmEQFE+W8qRn7NlMYNr1yXYHLfmvg9Wrd8fzEeaYAo="; }; modRoot = "cmd/atlas"; diff --git a/pkgs/development/tools/language-servers/nixd/default.nix b/pkgs/development/tools/language-servers/nixd/default.nix index d5afaae1d81e..601a568554be 100644 --- a/pkgs/development/tools/language-servers/nixd/default.nix +++ b/pkgs/development/tools/language-servers/nixd/default.nix @@ -5,6 +5,7 @@ , bison , boost182 , flex +, fmt , gtest , libbacktrace , lit @@ -18,13 +19,13 @@ stdenv.mkDerivation rec { pname = "nixd"; - version = "1.2.2"; + version = "1.2.3"; src = fetchFromGitHub { owner = "nix-community"; repo = "nixd"; rev = version; - hash = "sha256-W44orkPZQ9gDUTogb8YVIaw4WHzUA+ExOXhTnZlJ6yY="; + hash = "sha256-i/z5VnsWPWloQfdk48i+a4XaGnTMPJ6QougChkT9IWw="; }; mesonBuildType = "release"; @@ -45,6 +46,7 @@ stdenv.mkDerivation rec { buildInputs = [ libbacktrace nix + fmt gtest boost182 llvmPackages.llvm diff --git a/pkgs/development/tools/packet-sd/default.nix b/pkgs/development/tools/packet-sd/default.nix index 5f61b584489c..a1418df2cc3a 100644 --- a/pkgs/development/tools/packet-sd/default.nix +++ b/pkgs/development/tools/packet-sd/default.nix @@ -1,4 +1,9 @@ -{ buildGoModule, fetchFromGitHub, lib }: +{ buildGoModule +, fetchFromGitHub +, fetchpatch2 +, lib +}: + buildGoModule rec { pname = "prometheus-packet-sd"; version = "0.0.3"; @@ -7,9 +12,23 @@ buildGoModule rec { owner = "packethost"; repo = "prometheus-packet-sd"; rev = "v${version}"; - sha256 = "sha256-2k8AsmyhQNNZCzpVt6JdgvI8IFb5pRi4ic6Yn2NqHMM="; + hash = "sha256-2k8AsmyhQNNZCzpVt6JdgvI8IFb5pRi4ic6Yn2NqHMM="; }; + patches = [ + (fetchpatch2 { + # fix racy permissions on outfile + # https://github.com/packethost/prometheus-packet-sd/issues/15 + url = "https://github.com/packethost/prometheus-packet-sd/commit/bf0ed3a1da4d0f797bd29e4a1857ac65a1d04750.patch"; + hash = "sha256-ZLV9lyqZxpIQ1Cmzy/nY/85b4QWF5Ou0XcdrZXxck2E="; + }) + (fetchpatch2 { + # restrict outfile to not be world/group writable + url = "https://github.com/packethost/prometheus-packet-sd/commit/a0afc2a4c3f49dc234d0d2c4901df25b4110b3ec.patch"; + hash = "sha256-M5133+r77z21/Ulnbz+9sGbbuY5UpU1+22iY464UVAU="; + }) + ]; + vendorHash = null; subPackages = [ "." ]; diff --git a/pkgs/servers/home-automation/evcc/default.nix b/pkgs/servers/home-automation/evcc/default.nix index 7909bbf9b68e..943286fa7a79 100644 --- a/pkgs/servers/home-automation/evcc/default.nix +++ b/pkgs/servers/home-automation/evcc/default.nix @@ -16,20 +16,20 @@ buildGoModule rec { pname = "evcc"; - version = "0.123.9"; + version = "0.124.0"; src = fetchFromGitHub { owner = "evcc-io"; repo = "evcc"; rev = version; - hash = "sha256-BiJo0XsEdggmAfIzl717yDarDhD6IadP9an1Xv9N3ww="; + hash = "sha256-x6BsW4INahGFbFNprE1mZjlW/EoEMZgDIJACd9F+g6A="; }; - vendorHash = "sha256-1A87F6S4E87Uv05Ya4mA2B1QhJ1GEUtGx98/29m0LHI="; + vendorHash = "sha256-/TlbjyKGpVqkQAStx8QaAxpWsVYs0yxBMantqelYkhw="; npmDeps = fetchNpmDeps { inherit src; - hash = "sha256-a3AyqQ8GYP3g9KGbjtLHjHBrJGHg2sNjAQlMUa26pOY="; + hash = "sha256-Tl08gscv8WaMG4XfIVUWqj76xICWwUTBDK0VSs2kwMk="; }; nativeBuildInputs = [ diff --git a/pkgs/servers/zigbee2mqtt/default.nix b/pkgs/servers/zigbee2mqtt/default.nix index 43ef277ffba3..725b8a34ed9d 100644 --- a/pkgs/servers/zigbee2mqtt/default.nix +++ b/pkgs/servers/zigbee2mqtt/default.nix @@ -2,25 +2,30 @@ , buildNpmPackage , fetchFromGitHub , nodejs_18 +, systemdMinimal , nixosTests , nix-update-script }: buildNpmPackage rec { pname = "zigbee2mqtt"; - version = "1.35.1"; + version = "1.35.2"; src = fetchFromGitHub { owner = "Koenkk"; repo = "zigbee2mqtt"; rev = version; - hash = "sha256-ZOIV7PLBnPbisIStC+MNMZgf+Hw/+n4lONpgomRkZEE="; + hash = "sha256-AesGq2pWb8e2CJxTmP7RmtNYoAsXLAWp65eUjfjBK/A="; }; - npmDepsHash = "sha256-2WSuc9bmt5kK477c3AMOLFguvXZ2Nl+Qb67j5k7eL3o="; + npmDepsHash = "sha256-9mNUOidUmwOA+bFC8+pCerZ7JEYfQhYUM8D/WBW8IaE="; nodejs = nodejs_18; + buildInputs = [ + systemdMinimal + ]; + passthru.tests.zigbee2mqtt = nixosTests.zigbee2mqtt; passthru.updateScript = nix-update-script { }; diff --git a/pkgs/tools/system/fakechroot/default.nix b/pkgs/tools/system/fakechroot/default.nix index fd8fa04d21d2..2357d87cc153 100644 --- a/pkgs/tools/system/fakechroot/default.nix +++ b/pkgs/tools/system/fakechroot/default.nix @@ -39,6 +39,11 @@ stdenv.mkDerivation rec { url = "https://github.com/dex4er/fakechroot/commit/e7c1f3a446e594a4d0cce5f5d499c9439ce1d5c5.patch"; sha256 = "sha256-eX6kB4U1ZlXoRtkSVEIBTRjO/cTS/7z5a9S366DiRMg="; }) + # pass __readlinkat_chk buffer length + (fetchpatch { + url = "https://github.com/dex4er/fakechroot/pull/115/commits/15479d9436b534cee0115064bd8deb8d4ece9b8c.patch"; + hash = "sha256-wMIZ3hW5XkRXQYBMADlN6kxhDSiEr84PGWBW+f4b4Ko="; + }) ]; nativeBuildInputs = [ autoreconfHook ]; diff --git a/pkgs/tools/text/vale/default.nix b/pkgs/tools/text/vale/default.nix index 8cac719fc8a7..9ea35d355c72 100644 --- a/pkgs/tools/text/vale/default.nix +++ b/pkgs/tools/text/vale/default.nix @@ -2,7 +2,7 @@ buildGoModule rec { pname = "vale"; - version = "3.0.6"; + version = "3.0.7"; subPackages = [ "cmd/vale" ]; outputs = [ "out" "data" ]; @@ -11,10 +11,10 @@ buildGoModule rec { owner = "errata-ai"; repo = "vale"; rev = "v${version}"; - hash = "sha256-hCGJI2copXuyrxq4X1akR2Vz3DYS87dv3RZdw3gopNM="; + hash = "sha256-wCCW5yJPbXkwkkDywtIBR7gaJG0nLEHIC4xb1LbPa3w="; }; - vendorHash = "sha256-dkX/aQKuYNRynHuoj9m/6DI/mCEdp9XcKDt4TLx1rDU="; + vendorHash = "sha256-uEuzAMsQHTAbKeAPIWu2yoCLhBrQNEYxdmjfzLLWONQ="; postInstall = '' mkdir -p $data/share/vale