From 38ea5245a3172ba8e449c732145dc2fe53b28e02 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Sun, 14 Nov 2021 16:03:19 +0000 Subject: [PATCH 01/34] python38Packages.elementpath: 2.3.2 -> 2.4.0 --- pkgs/development/python-modules/elementpath/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/elementpath/default.nix b/pkgs/development/python-modules/elementpath/default.nix index 810b5dfedd01..49a4a6700b21 100644 --- a/pkgs/development/python-modules/elementpath/default.nix +++ b/pkgs/development/python-modules/elementpath/default.nix @@ -5,7 +5,7 @@ }: buildPythonPackage rec { - version = "2.3.2"; + version = "2.4.0"; pname = "elementpath"; disabled = pythonOlder "3.6"; @@ -14,7 +14,7 @@ buildPythonPackage rec { owner = "sissaschool"; repo = "elementpath"; rev = "v${version}"; - sha256 = "01h68v077xbcnqn9v52i8d6s6i7ds3zycn3ddn11hc074m4gg3af"; + sha256 = "1f3w5zyvrkl4gab81i5z9b41ybs54b37znj5r7hrcf25x8hrqgvv"; }; # avoid circular dependency with xmlschema which directly depends on this From a8f57f2c40bf0f8064b478afa60ac84efb7bff2c Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Thu, 18 Nov 2021 23:54:01 +0100 Subject: [PATCH 02/34] trivy: 0.20.2 -> 0.21.0 --- pkgs/tools/admin/trivy/default.nix | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/pkgs/tools/admin/trivy/default.nix b/pkgs/tools/admin/trivy/default.nix index 60bf80653a4c..4330e11bce61 100644 --- a/pkgs/tools/admin/trivy/default.nix +++ b/pkgs/tools/admin/trivy/default.nix @@ -1,22 +1,27 @@ -{ lib, buildGoModule, fetchFromGitHub }: +{ lib +, buildGoModule +, fetchFromGitHub +}: buildGoModule rec { pname = "trivy"; - version = "0.20.2"; + version = "0.21.0"; src = fetchFromGitHub { owner = "aquasecurity"; repo = pname; rev = "v${version}"; - sha256 = "sha256-ittOVWsM+1IaILCLCJNOeLxRbRHiiMN4qgLTS9gxV0w="; + sha256 = "sha256-weLzW1pyv9q9VKvFxno+f/L29wlpvxlVUZJUwx6Gn2A="; }; - vendorSha256 = "sha256-HrDj09gUJtkZhQ3nYfoj0K8+T62ib0CWAhhcuvg8cyc="; + vendorSha256 = "sha256-1kQ2m8gFBHKznbjNPtYN0BVrRbxyCs2H1f7+XZqgVvc="; excludedPackages = "misc"; ldflags = [ - "-s" "-w" "-X main.version=v${version}" + "-s" + "-w" + "-X main.version=v${version}" ]; doInstallCheck = true; From 23599fea9ae9fc516fbab18a79e8455ec6a9ee16 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Fri, 19 Nov 2021 09:07:54 +0100 Subject: [PATCH 03/34] python3Packages.millheater: 0.8.1 -> 0.9.0 --- pkgs/development/python-modules/millheater/default.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/millheater/default.nix b/pkgs/development/python-modules/millheater/default.nix index 0ff22033f644..3968e8bf8088 100644 --- a/pkgs/development/python-modules/millheater/default.nix +++ b/pkgs/development/python-modules/millheater/default.nix @@ -9,14 +9,16 @@ buildPythonPackage rec { pname = "millheater"; - version = "0.8.1"; + version = "0.9.0"; + format = "setuptools"; + disabled = pythonOlder "3.6"; src = fetchFromGitHub { owner = "Danielhiversen"; repo = "pymill"; rev = version; - sha256 = "0269lhb6y4c13n6krsl2b66ldvzkd26jlax7bbnkvag2iv7g6hzj"; + sha256 = "sha256-ocPp9tRghlOb0vZrpELDkwOq8ue+JBCRf2uB0Q7CPF8="; }; propagatedBuildInputs = [ From 552868e18d832ef9f97d0115bb9501155f08f479 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Fri, 19 Nov 2021 09:19:09 +0100 Subject: [PATCH 04/34] python3Packages.roombapy: 1.6.3 -> 1.6.4 --- .../python-modules/roombapy/default.nix | 26 ++++++++++++++----- 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/pkgs/development/python-modules/roombapy/default.nix b/pkgs/development/python-modules/roombapy/default.nix index 459037d6191e..cc73e58fc7b8 100644 --- a/pkgs/development/python-modules/roombapy/default.nix +++ b/pkgs/development/python-modules/roombapy/default.nix @@ -11,20 +11,25 @@ buildPythonPackage rec { pname = "roombapy"; - version = "1.6.3"; + version = "1.6.4"; format = "pyproject"; + disabled = pythonOlder "3.7"; src = fetchFromGitHub { owner = "pschmitt"; repo = "roombapy"; rev = version; - sha256 = "sha256-GkDfIC2jx4Mpguk/Wu45pZw0czhabJwTz58WYSLCOV8="; + sha256 = "sha256-EN+em+lULAUplXlhcU409ZVPk9BfMmD2oNwO0ETuqoA="; }; - nativeBuildInputs = [ poetry-core ]; + nativeBuildInputs = [ + poetry-core + ]; - propagatedBuildInputs = [ paho-mqtt ]; + propagatedBuildInputs = [ + paho-mqtt + ]; checkInputs = [ amqtt @@ -37,12 +42,19 @@ buildPythonPackage rec { "tests/test_discovery.py" ]; - pythonImportsCheck = [ "roombapy" ]; + disabledTests = [ + # Test want to connect to a local MQTT broker + "test_roomba_connect" + ]; + + pythonImportsCheck = [ + "roombapy" + ]; meta = with lib; { - homepage = "https://github.com/pschmitt/roombapy"; description = "Python program and library to control Wi-Fi enabled iRobot Roombas"; - maintainers = with maintainers; [ justinas ]; + homepage = "https://github.com/pschmitt/roombapy"; license = licenses.mit; + maintainers = with maintainers; [ justinas ]; }; } From 83b3fb146300b5ad1f7492068f342b106f860656 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Fri, 19 Nov 2021 11:42:18 +0100 Subject: [PATCH 05/34] python3Packages.uonet-request-signer-hebe: init at 0.1.1 --- .../uonet-request-signer-hebe/default.nix | 37 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 39 insertions(+) create mode 100644 pkgs/development/python-modules/uonet-request-signer-hebe/default.nix diff --git a/pkgs/development/python-modules/uonet-request-signer-hebe/default.nix b/pkgs/development/python-modules/uonet-request-signer-hebe/default.nix new file mode 100644 index 000000000000..19d4bba0b974 --- /dev/null +++ b/pkgs/development/python-modules/uonet-request-signer-hebe/default.nix @@ -0,0 +1,37 @@ +{ lib +, buildPythonPackage +, fetchPypi +, pythonOlder +, pyopenssl +}: + +buildPythonPackage rec { + pname = "uonet-request-signer-hebe"; + version = "0.1.1"; + format = "setuptools"; + + disabled = pythonOlder "3.6"; + + src = fetchPypi { + inherit pname version; + sha256 = "fidopnpAt5CXPsLbx+V8wrJCQQ/WIO6AqxpsYLDv8qM="; + }; + + propagatedBuildInputs = [ + pyopenssl + ]; + + # Source is not tagged + doCheck = false; + + pythonImportsCheck = [ + "uonet_request_signer_hebe" + ]; + + meta = with lib; { + description = "UONET+ (hebe) request signer for Python"; + homepage = "https://github.com/wulkanowy/uonet-request-signer"; + license = licenses.mit; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 87b06b9eb148..73247191f862 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -9636,6 +9636,8 @@ in { untokenize = callPackage ../development/python-modules/untokenize { }; + uonet-request-signer-hebe = callPackage ../development/python-modules/uonet-request-signer-hebe { }; + upass = callPackage ../development/python-modules/upass { }; upb-lib = callPackage ../development/python-modules/upb-lib { }; From f76bc9cc95479816685bcc87c83c1658b5abe0cd Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Fri, 19 Nov 2021 12:05:42 +0100 Subject: [PATCH 06/34] python3Packages.related: init at 0.7.2 --- .../python-modules/related/default.nix | 60 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 62 insertions(+) create mode 100644 pkgs/development/python-modules/related/default.nix diff --git a/pkgs/development/python-modules/related/default.nix b/pkgs/development/python-modules/related/default.nix new file mode 100644 index 000000000000..ddcedc4eae6d --- /dev/null +++ b/pkgs/development/python-modules/related/default.nix @@ -0,0 +1,60 @@ +{ lib +, attrs +, buildPythonPackage +, fetchPypi +, future +, pytestCheckHook +, python-dateutil +, pythonOlder +, pyyaml +}: + +buildPythonPackage rec { + pname = "related"; + version = "0.7.2"; + format = "setuptools"; + + disabled = pythonOlder "3.7"; + + src = fetchPypi { + inherit pname version; + sha256 = "w0XmNWh1xF08qitH22lQgTRNqO6qyYrYd2dc6x3Fop0="; + }; + + propagatedBuildInputs = [ + attrs + future + python-dateutil + pyyaml + ]; + + checkInputs = [ + pytestCheckHook + ]; + + postPatch = '' + # Remove outdated setup.cfg + rm setup.cfg + substituteInPlace setup.py \ + --replace "'pytest-runner'," "" + ''; + + disabledTests = [ + # Source tarball doesn't contains all needed files + "test_compose_from_yml" + "test_yaml_roundtrip_with_empty_values" + "test_compose_from_yml" + "test_store_data_from_json" + ]; + + pythonImportsCheck = [ + "related" + ]; + + meta = with lib; { + description = "Nested Object Models in Python"; + homepage = "https://github.com/genomoncology/related"; + license = licenses.mit; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 73247191f862..57f31b1de746 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -8090,6 +8090,8 @@ in { reikna = callPackage ../development/python-modules/reikna { }; + related = callPackage ../development/python-modules/related { }; + relatorio = callPackage ../development/python-modules/relatorio { }; remarshal = callPackage ../development/python-modules/remarshal { }; From 476e37de3f54a194f6afce3d2132824f189af8a9 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Fri, 19 Nov 2021 12:13:44 +0100 Subject: [PATCH 07/34] python3Packages.vulcan-api: init at 2.0.3 --- .../python-modules/vulcan-api/default.nix | 57 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 59 insertions(+) create mode 100644 pkgs/development/python-modules/vulcan-api/default.nix diff --git a/pkgs/development/python-modules/vulcan-api/default.nix b/pkgs/development/python-modules/vulcan-api/default.nix new file mode 100644 index 000000000000..6355e37bd64d --- /dev/null +++ b/pkgs/development/python-modules/vulcan-api/default.nix @@ -0,0 +1,57 @@ +{ lib +, aenum +, aiodns +, aiohttp +, buildPythonPackage +, cchardet +, fetchFromGitHub +, pyopenssl +, pythonOlder +, pytz +, related +, requests +, uonet-request-signer-hebe +, yarl +}: + +buildPythonPackage rec { + pname = "vulcan-api"; + version = "2.0.3"; + format = "setuptools"; + + disabled = pythonOlder "3.6"; + + src = fetchFromGitHub { + owner = "kapi2289"; + repo = pname; + rev = "v${version}"; + sha256 = "YLt9yufOBlWRyo+le7HcaFD/s7V5WpvhMUrHJqyC3pY="; + }; + + propagatedBuildInputs = [ + aenum + aiodns + aiohttp + cchardet + pyopenssl + pytz + related + requests + uonet-request-signer-hebe + yarl + ]; + + # Project has no tests + doCheck = false; + + pythonImportsCheck = [ + "vulcan" + ]; + + meta = with lib; { + description = "Python library for UONET+ e-register API"; + homepage = "https://vulcan-api.readthedocs.io/"; + license = licenses.mit; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 57f31b1de746..b3ad511143dc 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -9811,6 +9811,8 @@ in { enablePython = true; }); + vulcan-api = callPackage ../development/python-modules/vulcan-api { }; + vultr = callPackage ../development/python-modules/vultr { }; vulture = callPackage ../development/python-modules/vulture { }; From 7d1a6e100f7359b0fda3c00c1cacd82ee6406e69 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Fri, 19 Nov 2021 12:56:11 +0100 Subject: [PATCH 08/34] python3Packages.pyebus: init at 1.2.4 --- .../python-modules/pyebus/default.nix | 43 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 45 insertions(+) create mode 100644 pkgs/development/python-modules/pyebus/default.nix diff --git a/pkgs/development/python-modules/pyebus/default.nix b/pkgs/development/python-modules/pyebus/default.nix new file mode 100644 index 000000000000..d4c8658673a0 --- /dev/null +++ b/pkgs/development/python-modules/pyebus/default.nix @@ -0,0 +1,43 @@ +{ lib +, anytree +, buildPythonPackage +, fetchPypi +, pytestCheckHook +, poetry-core +, pythonOlder +}: + +buildPythonPackage rec { + pname = "pyebus"; + version = "1.2.4"; + format = "pyproject"; + + disabled = pythonOlder "3.7"; + + src = fetchPypi { + inherit pname version; + sha256 = "i+p40s9SXey1lfXWW+PiXsA1kUF4o6Rk7QLmQ2ljN6g="; + }; + + nativeBuildInputs = [ + poetry-core + ]; + + propagatedBuildInputs = [ + anytree + ]; + + # https://github.com/c0fec0de/pyebus/issues/3 + doCheck = false; + + pythonImportsCheck = [ + "pyebus" + ]; + + meta = with lib; { + description = "Pythonic Interface to EBUS Daemon (ebusd)"; + homepage = "https://github.com/c0fec0de/pyebus"; + license = licenses.mit; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 87b06b9eb148..e7d22d28fcac 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -6370,6 +6370,8 @@ in { pydyf = callPackage ../development/python-modules/pydyf { }; + pyebus = callPackage ../development/python-modules/pyebus { }; + pyechonest = callPackage ../development/python-modules/pyechonest { }; pyeclib = callPackage ../development/python-modules/pyeclib { }; From 12647a0a977d14d131a7d58204a9d2ab3d0ddeac Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Fri, 19 Nov 2021 14:10:35 +0100 Subject: [PATCH 09/34] python3Packages.luxtronik: init at 0.3.9 --- .../python-modules/luxtronik/default.nix | 36 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 ++ 2 files changed, 38 insertions(+) create mode 100644 pkgs/development/python-modules/luxtronik/default.nix diff --git a/pkgs/development/python-modules/luxtronik/default.nix b/pkgs/development/python-modules/luxtronik/default.nix new file mode 100644 index 000000000000..9aab07b01665 --- /dev/null +++ b/pkgs/development/python-modules/luxtronik/default.nix @@ -0,0 +1,36 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, pytestCheckHook +, poetry-core +, pythonOlder +}: + +buildPythonPackage rec { + pname = "luxtronik"; + version = "0.3.9"; + format = "setuptools"; + + disabled = pythonOlder "3.7"; + + src = fetchFromGitHub { + owner = "Bouni"; + repo = "python-luxtronik"; + rev = version; + sha256 = "mScdTQ82tV5fyy1S0YDDOz1UC4VB0OmSXD5gHp53WsE="; + }; + + # Project has no tests + doCheck = false; + + pythonImportsCheck = [ + "luxtronik" + ]; + + meta = with lib; { + description = "Python library to interact with Luxtronik heatpump controllers"; + homepage = "https://github.com/Bouni/python-luxtronik"; + license = licenses.mit; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 87b06b9eb148..da14bf345998 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -4537,6 +4537,8 @@ in { luftdaten = callPackage ../development/python-modules/luftdaten { }; + luxtronik = callPackage ../development/python-modules/luxtronik { }; + lupa = callPackage ../development/python-modules/lupa { }; lupupy = callPackage ../development/python-modules/lupupy { }; From b7dfc54d735e3a13c0c7fe2bb1b686e0c65d389a Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Fri, 19 Nov 2021 14:21:40 +0100 Subject: [PATCH 10/34] python3Packages.aiohwenergy: init at 0.4.0 --- .../python-modules/aiohwenergy/default.nix | 40 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 42 insertions(+) create mode 100644 pkgs/development/python-modules/aiohwenergy/default.nix diff --git a/pkgs/development/python-modules/aiohwenergy/default.nix b/pkgs/development/python-modules/aiohwenergy/default.nix new file mode 100644 index 000000000000..b9b2801f750d --- /dev/null +++ b/pkgs/development/python-modules/aiohwenergy/default.nix @@ -0,0 +1,40 @@ +{ lib +, aiohttp +, buildPythonPackage +, fetchFromGitHub +, pytestCheckHook +, pythonOlder +}: + +buildPythonPackage rec { + pname = "aiohwenergy"; + version = "0.4.0"; + format = "setuptools"; + + disabled = pythonOlder "3.7"; + + src = fetchFromGitHub { + owner = "DCSBL"; + repo = pname; + rev = version; + sha256 = "Rs7kD+jN/z0j4KmkitquB+cm2UcYG87YHczZR0A4axI="; + }; + + propagatedBuildInputs = [ + aiohttp + ]; + + # Project has no tests + doCheck = false; + + pythonImportsCheck = [ + "aiohwenergy" + ]; + + meta = with lib; { + description = "Python library to interact with the HomeWizard Energy devices API"; + homepage = "https://github.com/DCSBL/aiohwenergy"; + license = licenses.asl20; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 87b06b9eb148..15adc03695a7 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -317,6 +317,8 @@ in { aiohue = callPackage ../development/python-modules/aiohue { }; + aiohwenergy = callPackage ../development/python-modules/aiohwenergy { }; + aioimaplib = callPackage ../development/python-modules/aioimaplib { }; aioinflux = callPackage ../development/python-modules/aioinflux { }; From 53fa9753b7d7722e619142c1d3d83109828bae3b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebasti=C3=A1n=20Mancilla?= Date: Fri, 19 Nov 2021 16:57:28 -0300 Subject: [PATCH 11/34] masscan: fix build on darwin --- pkgs/tools/security/masscan/default.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkgs/tools/security/masscan/default.nix b/pkgs/tools/security/masscan/default.nix index 46bae3c20c51..b7924936d6ca 100644 --- a/pkgs/tools/security/masscan/default.nix +++ b/pkgs/tools/security/masscan/default.nix @@ -17,6 +17,11 @@ stdenv.mkDerivation rec { sha256 = "sha256-mnGC/moQANloR5ODwRjzJzBa55OEZ9QU+9WpAHxQE/g="; }; + postPatch = lib.optionalString stdenv.isDarwin '' + # Fix broken install command + substituteInPlace Makefile --replace "-pm755" "-pDm755" + ''; + nativeBuildInputs = [ makeWrapper installShellFiles ]; makeFlags = [ From 6ecb9a352f046013b8d81053678017705a150559 Mon Sep 17 00:00:00 2001 From: Patrick Hilhorst Date: Wed, 19 May 2021 14:22:52 +0200 Subject: [PATCH 12/34] nixos/tests/vscodium-wayland: init --- nixos/tests/common/wayland-cage.nix | 14 ++++++++ nixos/tests/vscodium-wayland.nix | 54 +++++++++++++++++++++++++++++ 2 files changed, 68 insertions(+) create mode 100644 nixos/tests/common/wayland-cage.nix create mode 100644 nixos/tests/vscodium-wayland.nix diff --git a/nixos/tests/common/wayland-cage.nix b/nixos/tests/common/wayland-cage.nix new file mode 100644 index 000000000000..55aeb858d7a4 --- /dev/null +++ b/nixos/tests/common/wayland-cage.nix @@ -0,0 +1,14 @@ +{ ... }: + +{ + imports = [ ./user-account.nix ]; + services.cage = { + enable = true; + user = "alice"; + }; + + virtualisation = { + memorySize = 1024; + qemu.options = [ "-vga virtio" ]; + }; +} diff --git a/nixos/tests/vscodium-wayland.nix b/nixos/tests/vscodium-wayland.nix new file mode 100644 index 000000000000..1321c8b98274 --- /dev/null +++ b/nixos/tests/vscodium-wayland.nix @@ -0,0 +1,54 @@ +import ./make-test-python.nix ({ pkgs, ...} : + +{ + name = "vscodium-wayland"; + meta = with pkgs.lib.maintainers; { + maintainers = [ synthetica ]; + }; + + machine = { ... }: + + { + imports = [ + ./common/wayland-cage.nix + ]; + + services.cage.program = '' + ${pkgs.vscodium}/bin/codium \ + --enable-features=UseOzonePlatform \ + --ozone-platform=wayland + ''; + + fonts.fonts = with pkgs; [ + dejavu_fonts + ]; + }; + + enableOCR = true; + + testScript = { nodes, ... }: '' + start_all() + machine.wait_for_unit('graphical.target') + machine.wait_until_succeeds('pgrep -x codium') + + machine.wait_for_text('VSCodium') + machine.screenshot('start_screen') + + test_string = 'testfile' + + machine.send_key('ctrl-n') + machine.wait_for_text('Untitled') + machine.screenshot('empty_editor') + + machine.send_chars(test_string) + machine.wait_for_text(test_string) + machine.screenshot('editor') + + machine.send_key('ctrl-s') + machine.wait_for_text('Save') + machine.screenshot('save_window') + + machine.send_key('ret') + machine.wait_for_file(f'/home/alice/{test_string}') + ''; +}) From 7ed2f6e55d9b145169b9e2c020daceb15996c3a2 Mon Sep 17 00:00:00 2001 From: Patrick Hilhorst Date: Fri, 19 Nov 2021 21:21:20 +0100 Subject: [PATCH 13/34] nixos/tests/vscodium{,-wayland}: merge tests --- nixos/tests/all-tests.nix | 2 +- nixos/tests/vscodium-wayland.nix | 54 -------------------- nixos/tests/vscodium.nix | 86 +++++++++++++++++++------------- 3 files changed, 51 insertions(+), 91 deletions(-) delete mode 100644 nixos/tests/vscodium-wayland.nix diff --git a/nixos/tests/all-tests.nix b/nixos/tests/all-tests.nix index cd13183ed0a3..b8219416dc42 100644 --- a/nixos/tests/all-tests.nix +++ b/nixos/tests/all-tests.nix @@ -489,7 +489,7 @@ in victoriametrics = handleTest ./victoriametrics.nix {}; vikunja = handleTest ./vikunja.nix {}; virtualbox = handleTestOn ["x86_64-linux"] ./virtualbox.nix {}; - vscodium = handleTest ./vscodium.nix {}; + vscodium = discoverTests (import ./vscodium.nix); wasabibackend = handleTest ./wasabibackend.nix {}; wiki-js = handleTest ./wiki-js.nix {}; wireguard = handleTest ./wireguard {}; diff --git a/nixos/tests/vscodium-wayland.nix b/nixos/tests/vscodium-wayland.nix deleted file mode 100644 index 1321c8b98274..000000000000 --- a/nixos/tests/vscodium-wayland.nix +++ /dev/null @@ -1,54 +0,0 @@ -import ./make-test-python.nix ({ pkgs, ...} : - -{ - name = "vscodium-wayland"; - meta = with pkgs.lib.maintainers; { - maintainers = [ synthetica ]; - }; - - machine = { ... }: - - { - imports = [ - ./common/wayland-cage.nix - ]; - - services.cage.program = '' - ${pkgs.vscodium}/bin/codium \ - --enable-features=UseOzonePlatform \ - --ozone-platform=wayland - ''; - - fonts.fonts = with pkgs; [ - dejavu_fonts - ]; - }; - - enableOCR = true; - - testScript = { nodes, ... }: '' - start_all() - machine.wait_for_unit('graphical.target') - machine.wait_until_succeeds('pgrep -x codium') - - machine.wait_for_text('VSCodium') - machine.screenshot('start_screen') - - test_string = 'testfile' - - machine.send_key('ctrl-n') - machine.wait_for_text('Untitled') - machine.screenshot('empty_editor') - - machine.send_chars(test_string) - machine.wait_for_text(test_string) - machine.screenshot('editor') - - machine.send_key('ctrl-s') - machine.wait_for_text('Save') - machine.screenshot('save_window') - - machine.send_key('ret') - machine.wait_for_file(f'/home/alice/{test_string}') - ''; -}) diff --git a/nixos/tests/vscodium.nix b/nixos/tests/vscodium.nix index 033090aa0e3d..e217c1ec80f9 100644 --- a/nixos/tests/vscodium.nix +++ b/nixos/tests/vscodium.nix @@ -1,47 +1,61 @@ -import ./make-test-python.nix ({ pkgs, ...} : +let + tests = { + vscodium-wayland = { pkgs, ... }: { + imports = [ ./common/wayland-cage.nix ]; -{ - name = "vscodium"; - meta = with pkgs.lib.maintainers; { - maintainers = [ turion ]; + services.cage.program = '' + ${pkgs.vscodium}/bin/codium \ + --enable-features=UseOzonePlatform \ + --ozone-platform=wayland + ''; + + fonts.fonts = with pkgs; [ dejavu_fonts ]; + }; + vscodium-xorg = { pkgs, ... }: { + imports = [ ./common/user-account.nix ./common/x11.nix ]; + + virtualisation.memorySize = 2047; + services.xserver.enable = true; + services.xserver.displayManager.sessionCommands = '' + ${pkgs.vscodium}/bin/codium + ''; + test-support.displayManager.auto.user = "alice"; + }; }; - machine = { ... }: + mkTest = name: machine: + import ./make-test-python.nix ({ pkgs, ... }: { + inherit name machine; + meta = with pkgs.lib.maintainers; { + maintainers = [ synthetica turion ]; + }; + enableOCR = true; + testScript = '' + start_all() - { - imports = [ - ./common/user-account.nix - ./common/x11.nix - ]; + machine.wait_for_unit('graphical.target') + machine.wait_until_succeeds('pgrep -x codium') - virtualisation.memorySize = 2047; - services.xserver.enable = true; - test-support.displayManager.auto.user = "alice"; - environment.systemPackages = with pkgs; [ - vscodium - ]; - }; + machine.wait_for_text('VSCodium') + machine.screenshot('start_screen') - enableOCR = true; + test_string = 'testfile' - testScript = { nodes, ... }: '' - # Start up X - start_all() - machine.wait_for_x() + machine.send_key('ctrl-n') + machine.wait_for_text('Untitled') + machine.screenshot('empty_editor') - # Start VSCodium with a file that doesn't exist yet - machine.fail("ls /home/alice/foo.txt") - machine.succeed("su - alice -c 'codium foo.txt' >&2 &") + machine.send_chars(test_string) + machine.wait_for_text(test_string) + machine.screenshot('editor') - # Wait for the window to appear - machine.wait_for_text("VSCodium") + machine.send_key('ctrl-s') + machine.wait_for_text('Save') + machine.screenshot('save_window') - # Save file - machine.send_key("ctrl-s") + machine.send_key('ret') + machine.wait_for_file(f'/home/alice/{test_string}') + ''; + }); - # Wait until the file has been saved - machine.wait_for_file("/home/alice/foo.txt") - - machine.screenshot("VSCodium") - ''; -}) +in builtins.mapAttrs (k: v: mkTest k v { }) tests From ffbba7b5325ab6b208ae7431b25d4a43f9afb22c Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Fri, 19 Nov 2021 22:02:30 +0100 Subject: [PATCH 14/34] checkov: 2.0.587 -> 2.0.591 --- pkgs/development/tools/analysis/checkov/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/tools/analysis/checkov/default.nix b/pkgs/development/tools/analysis/checkov/default.nix index e4123a8f105e..a2fc83bc2b21 100644 --- a/pkgs/development/tools/analysis/checkov/default.nix +++ b/pkgs/development/tools/analysis/checkov/default.nix @@ -56,13 +56,13 @@ with py.pkgs; buildPythonApplication rec { pname = "checkov"; - version = "2.0.587"; + version = "2.0.591"; src = fetchFromGitHub { owner = "bridgecrewio"; repo = pname; rev = version; - sha256 = "sha256-uLH3g3UeWdIZsMsUwCYpTehgxDKGraPBlENdTz+QYLI="; + sha256 = "sha256-p8pEw3vH3W62MmlZsSqWoUKf7QjEQhlV5bSjYr1Wwm0="; }; nativeBuildInputs = with py.pkgs; [ From 6a71aba55cc40a464f46e7ea4a1191f8fa46c62e Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Fri, 19 Nov 2021 22:05:01 +0100 Subject: [PATCH 15/34] python3Packages.faraday-plugins: 1.5.6 -> 1.5.7 --- pkgs/development/python-modules/faraday-plugins/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/faraday-plugins/default.nix b/pkgs/development/python-modules/faraday-plugins/default.nix index 4701e481b31a..3aae84e2a245 100644 --- a/pkgs/development/python-modules/faraday-plugins/default.nix +++ b/pkgs/development/python-modules/faraday-plugins/default.nix @@ -16,14 +16,14 @@ buildPythonPackage rec { pname = "faraday-plugins"; - version = "1.5.6"; + version = "1.5.7"; format = "setuptools"; src = fetchFromGitHub { owner = "infobyte"; repo = "faraday_plugins"; rev = "v${version}"; - sha256 = "sha256-RTHhCSOqtdPsgZgeziAYm+9NoR72Jfm+42fyyKqjFpA="; + sha256 = "sha256-EW9p5r7RwWohNGwbITtDrEd1FYLtOwWXhVWFgPCG+Po="; }; propagatedBuildInputs = [ From e21280234bac95ddd6412e987133c01cccfb63e9 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Fri, 19 Nov 2021 22:25:01 +0100 Subject: [PATCH 16/34] python3Packages.ukkonen: init at 1.0.1 --- .../python-modules/ukkonen/default.nix | 41 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 43 insertions(+) create mode 100644 pkgs/development/python-modules/ukkonen/default.nix diff --git a/pkgs/development/python-modules/ukkonen/default.nix b/pkgs/development/python-modules/ukkonen/default.nix new file mode 100644 index 000000000000..dfdcf3515220 --- /dev/null +++ b/pkgs/development/python-modules/ukkonen/default.nix @@ -0,0 +1,41 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, cffi +, pytestCheckHook +, pythonOlder +}: + +buildPythonPackage rec { + pname = "ukkonen"; + version = "1.0.1"; + format = "setuptools"; + + disabled = pythonOlder "3.6"; + + src = fetchFromGitHub { + owner = "asottile"; + repo = pname; + rev = "v${version}"; + sha256 = "jG6VP/P5sadrdrmneH36/ExSld9blyMAAG963QS9+p0="; + }; + + nativeBuildInputs = [ + cffi + ]; + + checkInputs = [ + pytestCheckHook + ]; + + pythonImportsCheck = [ + "ukkonen" + ]; + + meta = with lib; { + description = "Python implementation of bounded Levenshtein distance (Ukkonen)"; + homepage = "https://github.com/asottile/ukkonen"; + license = licenses.mit; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 87b06b9eb148..9e95a5b33067 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -9582,6 +9582,8 @@ in { ujson = callPackage ../development/python-modules/ujson { }; + ukkonen = callPackage ../development/python-modules/ukkonen { }; + ukpostcodeparser = callPackage ../development/python-modules/ukpostcodeparser { }; umalqurra = callPackage ../development/python-modules/umalqurra { }; From ef4ab06ba5b0c2faffdd5cde41c15c6eb704b186 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Fri, 19 Nov 2021 22:26:00 +0100 Subject: [PATCH 17/34] python3Packages.identify: 2.3.7 -> 2.4.0 --- pkgs/development/python-modules/identify/default.nix | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/pkgs/development/python-modules/identify/default.nix b/pkgs/development/python-modules/identify/default.nix index 37e5f5bcb8a5..fed8ddd419c0 100644 --- a/pkgs/development/python-modules/identify/default.nix +++ b/pkgs/development/python-modules/identify/default.nix @@ -1,14 +1,15 @@ { lib , buildPythonPackage +, editdistance-s , fetchFromGitHub , pytestCheckHook -, editdistance-s , pythonOlder +, ukkonen }: buildPythonPackage rec { pname = "identify"; - version = "2.3.7"; + version = "2.4.0"; format = "setuptools"; disabled = pythonOlder "3.7"; @@ -17,12 +18,13 @@ buildPythonPackage rec { owner = "pre-commit"; repo = pname; rev = "v${version}"; - sha256 = "sha256-L71Zi0SWFh7K4BRwF57prdrIdxLp8Igs0k/gc6k1+Mo="; + sha256 = "sha256-0J3P3RawafVAfOUhK9qSz5K8y0goMqTjMh5PL60sqME="; }; checkInputs = [ editdistance-s pytestCheckHook + ukkonen ]; pythonImportsCheck = [ From a8f693ed48e64fd5d4b6ae2304962e387227bbd4 Mon Sep 17 00:00:00 2001 From: Patrick Hilhorst Date: Fri, 19 Nov 2021 22:28:32 +0100 Subject: [PATCH 18/34] test-driver.py: fix weird non-pythonism --- nixos/lib/test-driver/test-driver.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/nixos/lib/test-driver/test-driver.py b/nixos/lib/test-driver/test-driver.py index a7c0484060f2..4b9da55cc273 100755 --- a/nixos/lib/test-driver/test-driver.py +++ b/nixos/lib/test-driver/test-driver.py @@ -1183,9 +1183,7 @@ class Driver: serial_stdout_on=self.serial_stdout_on, Machine=Machine, # for typing ) - machine_symbols = { - m.name: self.machines[idx] for idx, m in enumerate(self.machines) - } + machine_symbols = {m.name: m for m in self.machines} vlan_symbols = { f"vlan{v.nr}": self.vlans[idx] for idx, v in enumerate(self.vlans) } From 9e71014edecba9d9c78531ebc2861e28c931ff6f Mon Sep 17 00:00:00 2001 From: Patrick Hilhorst Date: Fri, 19 Nov 2021 23:02:30 +0100 Subject: [PATCH 19/34] test-driver.py: always export single machine as 'machine' --- nixos/lib/test-driver/test-driver.py | 4 ++++ nixos/lib/testing-python.nix | 4 +++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/nixos/lib/test-driver/test-driver.py b/nixos/lib/test-driver/test-driver.py index 4b9da55cc273..e415993174f8 100755 --- a/nixos/lib/test-driver/test-driver.py +++ b/nixos/lib/test-driver/test-driver.py @@ -1184,6 +1184,10 @@ class Driver: Machine=Machine, # for typing ) machine_symbols = {m.name: m for m in self.machines} + # If there's exactly one machine, make it available under the name + # "machine", even if it's not called that. + if len(self.machines) == 1: + (machine_symbols["machine"],) = self.machines vlan_symbols = { f"vlan{v.nr}": self.vlans[idx] for idx, v in enumerate(self.vlans) } diff --git a/nixos/lib/testing-python.nix b/nixos/lib/testing-python.nix index cce017a6441d..4306d102b2d6 100644 --- a/nixos/lib/testing-python.nix +++ b/nixos/lib/testing-python.nix @@ -134,7 +134,9 @@ rec { vlans = map (m: m.config.virtualisation.vlans) (lib.attrValues nodes); vms = map (m: m.config.system.build.vm) (lib.attrValues nodes); - nodeHostNames = map (c: c.config.system.name) (lib.attrValues nodes); + nodeHostNames = let + nodesList = map (c: c.config.system.name) (lib.attrValues nodes); + in nodesList ++ lib.optional (lib.length nodesList == 1) "machine"; # TODO: This is an implementation error and needs fixing # the testing famework cannot legitimately restrict hostnames further From 2a04ae8b125285ed980722614e75e220ee9847c8 Mon Sep 17 00:00:00 2001 From: Patrick Hilhorst Date: Fri, 19 Nov 2021 23:04:26 +0100 Subject: [PATCH 20/34] nixosTests.vscodium: rename machines --- nixos/tests/vscodium.nix | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/nixos/tests/vscodium.nix b/nixos/tests/vscodium.nix index e217c1ec80f9..565296a5a738 100644 --- a/nixos/tests/vscodium.nix +++ b/nixos/tests/vscodium.nix @@ -1,6 +1,6 @@ let tests = { - vscodium-wayland = { pkgs, ... }: { + wayland = { pkgs, ... }: { imports = [ ./common/wayland-cage.nix ]; services.cage.program = '' @@ -11,7 +11,7 @@ let fonts.fonts = with pkgs; [ dejavu_fonts ]; }; - vscodium-xorg = { pkgs, ... }: { + xorg = { pkgs, ... }: { imports = [ ./common/user-account.nix ./common/x11.nix ]; virtualisation.memorySize = 2047; @@ -25,7 +25,10 @@ let mkTest = name: machine: import ./make-test-python.nix ({ pkgs, ... }: { - inherit name machine; + inherit name; + + nodes = { "${name}" = machine; }; + meta = with pkgs.lib.maintainers; { maintainers = [ synthetica turion ]; }; From 7201052de20144b11c4ef1eec7c29cb562257cb3 Mon Sep 17 00:00:00 2001 From: Patrick Hilhorst Date: Fri, 19 Nov 2021 23:04:53 +0100 Subject: [PATCH 21/34] nixosTests.vscodium: wait for different text --- nixos/tests/vscodium.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nixos/tests/vscodium.nix b/nixos/tests/vscodium.nix index 565296a5a738..a572181b88e6 100644 --- a/nixos/tests/vscodium.nix +++ b/nixos/tests/vscodium.nix @@ -39,7 +39,7 @@ let machine.wait_for_unit('graphical.target') machine.wait_until_succeeds('pgrep -x codium') - machine.wait_for_text('VSCodium') + machine.wait_for_text('File') machine.screenshot('start_screen') test_string = 'testfile' From 2cd546626a5b99cdbb1b99bb04dcc7a34e29129f Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Fri, 19 Nov 2021 23:14:29 +0100 Subject: [PATCH 22/34] python3Packages.pyatmo: 6.1.0 -> 6.2.0 --- pkgs/development/python-modules/pyatmo/default.nix | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/pkgs/development/python-modules/pyatmo/default.nix b/pkgs/development/python-modules/pyatmo/default.nix index bff5a9b6d14c..c039ff16b80e 100644 --- a/pkgs/development/python-modules/pyatmo/default.nix +++ b/pkgs/development/python-modules/pyatmo/default.nix @@ -16,7 +16,8 @@ buildPythonPackage rec { pname = "pyatmo"; - version = "6.1.0"; + version = "6.2.0"; + format = "setuptools"; disabled = pythonOlder "3.8"; @@ -24,7 +25,7 @@ buildPythonPackage rec { owner = "jabesq"; repo = "pyatmo"; rev = "v${version}"; - sha256 = "sha256-Iscnv3hfYa8QFiXMUN334Muo0oGqnnK11RPNxQJggG0="; + sha256 = "sha256-VBc2avJiIFQW1LYXQEvIZ/wZKMFJsCF9DDrxwL8dDnk="; }; SETUPTOOLS_SCM_PRETEND_VERSION = version; @@ -54,7 +55,9 @@ buildPythonPackage rec { --replace "requests~=2.24" "requests" ''; - pythonImportsCheck = [ "pyatmo" ]; + pythonImportsCheck = [ + "pyatmo" + ]; meta = with lib; { description = "Simple API to access Netatmo weather station data"; From 637b57eb37944649a7a83742365d675215dfb3d5 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Fri, 19 Nov 2021 23:48:34 +0100 Subject: [PATCH 23/34] python3Packages.pyupgrade: 2.29.0 -> 2.29.1 --- .../python-modules/pyupgrade/default.nix | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/pkgs/development/python-modules/pyupgrade/default.nix b/pkgs/development/python-modules/pyupgrade/default.nix index 8e355699258d..324f0a934a5a 100644 --- a/pkgs/development/python-modules/pyupgrade/default.nix +++ b/pkgs/development/python-modules/pyupgrade/default.nix @@ -8,21 +8,29 @@ buildPythonPackage rec { pname = "pyupgrade"; - version = "2.29.0"; + version = "2.29.1"; + format = "setuptools"; + disabled = pythonOlder "3.6"; src = fetchFromGitHub { owner = "asottile"; repo = pname; rev = "v${version}"; - sha256 = "sha256-Hq58DJe8ZLZSJdhqSxfTaZPnWae2aQFCe7lH+6Y6ABg="; + sha256 = "sha256-fN0+4/EeoMD2c16OgepjDWuUhowMxzM7nB3mkL3iDjc="; }; - checkInputs = [ pytestCheckHook ]; + checkInputs = [ + pytestCheckHook + ]; - propagatedBuildInputs = [ tokenize-rt ]; + propagatedBuildInputs = [ + tokenize-rt + ]; - pythonImportsCheck = [ "pyupgrade" ]; + pythonImportsCheck = [ + "pyupgrade" + ]; meta = with lib; { description = "Tool to automatically upgrade syntax for newer versions of the language"; From 3b6fd94fd636cdb3e26898962593924a10937ab2 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sat, 20 Nov 2021 00:05:40 +0100 Subject: [PATCH 24/34] python3Packages.tweepy: 4.3.0 -> 4.4.0 --- pkgs/development/python-modules/tweepy/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/tweepy/default.nix b/pkgs/development/python-modules/tweepy/default.nix index 7892975a45d9..a98911da58d5 100644 --- a/pkgs/development/python-modules/tweepy/default.nix +++ b/pkgs/development/python-modules/tweepy/default.nix @@ -12,7 +12,7 @@ buildPythonPackage rec { pname = "tweepy"; - version = "4.3.0"; + version = "4.4.0"; format = "setuptools"; disabled = pythonOlder "3.6"; @@ -21,7 +21,7 @@ buildPythonPackage rec { owner = pname; repo = pname; rev = "v${version}"; - sha256 = "sha256-lS/98DRpJH1UGGNzwqVVUJOeul+BX+I3e+ysmC0oL3I="; + sha256 = "sha256-GUo8uvShyIOWWcO5T1JvV7DMC1W70YILx/hvHIGQg0o="; }; propagatedBuildInputs = [ From 4bd364da6e9e0eeb266a3ebca9c520090f52ec29 Mon Sep 17 00:00:00 2001 From: Jonathan Ringer Date: Fri, 19 Nov 2021 15:21:31 -0800 Subject: [PATCH 25/34] python3Packages.xmlschema: 1.8.1 -> 1.8.2 --- pkgs/development/python-modules/xmlschema/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/xmlschema/default.nix b/pkgs/development/python-modules/xmlschema/default.nix index 19667d833faa..3ddcfee9dfb5 100644 --- a/pkgs/development/python-modules/xmlschema/default.nix +++ b/pkgs/development/python-modules/xmlschema/default.nix @@ -8,7 +8,7 @@ }: buildPythonPackage rec { - version = "1.8.1"; + version = "1.8.2"; pname = "xmlschema"; disabled = pythonOlder "3.6"; @@ -17,7 +17,7 @@ buildPythonPackage rec { owner = "sissaschool"; repo = "xmlschema"; rev = "v${version}"; - sha256 = "0vs4d9bnms4krxvplzf2p69g673pdw31z8p5alzj3pqnaw83rg1z"; + sha256 = "sha256-d7f19T17aAwdtNDjCrsXXY39u0aRgQo4vFPnxFNs2PQ="; }; propagatedBuildInputs = [ From ec05219e4092d03f335da1ac5794801d88350eab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebasti=C3=A1n=20Mancilla?= Date: Fri, 19 Nov 2021 21:33:39 -0300 Subject: [PATCH 26/34] apache-airflow: use pytestCheckHook --- .../python-modules/apache-airflow/default.nix | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/pkgs/development/python-modules/apache-airflow/default.nix b/pkgs/development/python-modules/apache-airflow/default.nix index 2ffe0b137528..23fa5b6a860d 100644 --- a/pkgs/development/python-modules/apache-airflow/default.nix +++ b/pkgs/development/python-modules/apache-airflow/default.nix @@ -58,7 +58,7 @@ , termcolor , unicodecsv , werkzeug -, pytest +, pytestCheckHook , freezegun , mkYarnPackage }: @@ -171,7 +171,7 @@ buildPythonPackage rec { checkInputs = [ freezegun - pytest + pytestCheckHook ]; INSTALL_PROVIDERS_FROM_SOURCES = "true"; @@ -204,7 +204,7 @@ buildPythonPackage rec { # allow for gunicorn processes to have access to python packages makeWrapperArgs = [ "--prefix PYTHONPATH : $PYTHONPATH" ]; - checkPhase = '' + preCheck = '' export HOME=$(mktemp -d) export AIRFLOW_HOME=$HOME export AIRFLOW__CORE__UNIT_TEST_MODE=True @@ -214,10 +214,12 @@ buildPythonPackage rec { airflow version airflow db init airflow db reset -y - - pytest tests/core/test_core.py ''; + pytestFlagsArray = [ + "tests/core/test_core.py" + ]; + postInstall = '' cp -rv ${airflow-frontend}/static/dist $out/lib/${python.libPrefix}/site-packages/airflow/www/static ''; From 1334a62539d86d9bcf43c286568c20227615ce90 Mon Sep 17 00:00:00 2001 From: Patrick Hilhorst Date: Sat, 20 Nov 2021 01:37:08 +0100 Subject: [PATCH 27/34] test-driver.py: directly import pathlib.Path --- nixos/lib/test-driver/test-driver.py | 64 ++++++++++++++-------------- 1 file changed, 32 insertions(+), 32 deletions(-) diff --git a/nixos/lib/test-driver/test-driver.py b/nixos/lib/test-driver/test-driver.py index e415993174f8..643446f313e3 100755 --- a/nixos/lib/test-driver/test-driver.py +++ b/nixos/lib/test-driver/test-driver.py @@ -4,6 +4,7 @@ from queue import Queue, Empty from typing import Tuple, Any, Callable, Dict, Iterator, Optional, List, Iterable from xml.sax.saxutils import XMLGenerator from colorama import Style +from pathlib import Path import queue import io import threading @@ -11,7 +12,6 @@ import argparse import base64 import codecs import os -import pathlib import ptpython.repl import pty import re @@ -239,8 +239,8 @@ class StartCommand: def cmd( self, - monitor_socket_path: pathlib.Path, - shell_socket_path: pathlib.Path, + monitor_socket_path: Path, + shell_socket_path: Path, allow_reboot: bool = False, # TODO: unused, legacy? ) -> str: display_opts = "" @@ -272,8 +272,8 @@ class StartCommand: @staticmethod def build_environment( - state_dir: pathlib.Path, - shared_dir: pathlib.Path, + state_dir: Path, + shared_dir: Path, ) -> dict: # We make a copy to not update the current environment env = dict(os.environ) @@ -288,10 +288,10 @@ class StartCommand: def run( self, - state_dir: pathlib.Path, - shared_dir: pathlib.Path, - monitor_socket_path: pathlib.Path, - shell_socket_path: pathlib.Path, + state_dir: Path, + shared_dir: Path, + monitor_socket_path: Path, + shell_socket_path: Path, ) -> subprocess.Popen: return subprocess.Popen( self.cmd(monitor_socket_path, shell_socket_path), @@ -334,7 +334,7 @@ class LegacyStartCommand(StartCommand): self, netBackendArgs: Optional[str] = None, netFrontendArgs: Optional[str] = None, - hda: Optional[Tuple[pathlib.Path, str]] = None, + hda: Optional[Tuple[Path, str]] = None, cdrom: Optional[str] = None, usb: Optional[str] = None, bios: Optional[str] = None, @@ -394,11 +394,11 @@ class Machine: the machine lifecycle with the help of a start script / command.""" name: str - tmp_dir: pathlib.Path - shared_dir: pathlib.Path - state_dir: pathlib.Path - monitor_path: pathlib.Path - shell_path: pathlib.Path + tmp_dir: Path + shared_dir: Path + state_dir: Path + monitor_path: Path + shell_path: Path start_command: StartCommand keep_vm_state: bool @@ -421,7 +421,7 @@ class Machine: def __init__( self, - tmp_dir: pathlib.Path, + tmp_dir: Path, start_command: StartCommand, name: str = "machine", keep_vm_state: bool = False, @@ -463,7 +463,7 @@ class Machine: hda = None if args.get("hda"): hda_arg: str = args.get("hda", "") - hda_arg_path: pathlib.Path = pathlib.Path(hda_arg) + hda_arg_path: Path = Path(hda_arg) hda = (hda_arg_path, args.get("hdaInterface", "")) return LegacyStartCommand( netBackendArgs=args.get("netBackendArgs"), @@ -814,12 +814,12 @@ class Machine: """Copy a file from the host into the guest via the `shared_dir` shared among all the VMs (using a temporary directory). """ - host_src = pathlib.Path(source) - vm_target = pathlib.Path(target) + host_src = Path(source) + vm_target = Path(target) with tempfile.TemporaryDirectory(dir=self.shared_dir) as shared_td: - shared_temp = pathlib.Path(shared_td) + shared_temp = Path(shared_td) host_intermediate = shared_temp / host_src.name - vm_shared_temp = pathlib.Path("/tmp/shared") / shared_temp.name + vm_shared_temp = Path("/tmp/shared") / shared_temp.name vm_intermediate = vm_shared_temp / host_src.name self.succeed(make_command(["mkdir", "-p", vm_shared_temp])) @@ -836,11 +836,11 @@ class Machine: all the VMs (using a temporary directory). """ # Compute the source, target, and intermediate shared file names - out_dir = pathlib.Path(os.environ.get("out", os.getcwd())) - vm_src = pathlib.Path(source) + out_dir = Path(os.environ.get("out", os.getcwd())) + vm_src = Path(source) with tempfile.TemporaryDirectory(dir=self.shared_dir) as shared_td: - shared_temp = pathlib.Path(shared_td) - vm_shared_temp = pathlib.Path("/tmp/shared") / shared_temp.name + shared_temp = Path(shared_td) + vm_shared_temp = Path("/tmp/shared") / shared_temp.name vm_intermediate = vm_shared_temp / vm_src.name intermediate = shared_temp / vm_src.name # Copy the file to the shared directory inside VM @@ -911,12 +911,12 @@ class Machine: self.log("starting vm") - def clear(path: pathlib.Path) -> pathlib.Path: + def clear(path: Path) -> Path: if path.exists(): path.unlink() return path - def create_socket(path: pathlib.Path) -> socket.socket: + def create_socket(path: Path) -> socket.socket: s = socket.socket(family=socket.AF_UNIX, type=socket.SOCK_STREAM) s.bind(str(path)) s.listen(1) @@ -1061,7 +1061,7 @@ class VLan: """ nr: int - socket_dir: pathlib.Path + socket_dir: Path process: subprocess.Popen pid: int @@ -1070,7 +1070,7 @@ class VLan: def __repr__(self) -> str: return f"" - def __init__(self, nr: int, tmp_dir: pathlib.Path): + def __init__(self, nr: int, tmp_dir: Path): self.nr = nr self.socket_dir = tmp_dir / f"vde{self.nr}.ctl" @@ -1123,7 +1123,7 @@ class Driver: ): self.tests = tests - tmp_dir = pathlib.Path(os.environ.get("TMPDIR", tempfile.gettempdir())) + tmp_dir = Path(os.environ.get("TMPDIR", tempfile.gettempdir())) tmp_dir.mkdir(mode=0o700, exist_ok=True) with rootlog.nested("start all VLans"): @@ -1232,7 +1232,7 @@ class Driver: "Using legacy create_machine(), please instantiate the" "Machine class directly, instead" ) - tmp_dir = pathlib.Path(os.environ.get("TMPDIR", tempfile.gettempdir())) + tmp_dir = Path(os.environ.get("TMPDIR", tempfile.gettempdir())) tmp_dir.mkdir(mode=0o700, exist_ok=True) if args.get("startCommand"): @@ -1318,7 +1318,7 @@ if __name__ == "__main__": action=EnvDefault, envvar="testScript", help="the test script to run", - type=pathlib.Path, + type=Path, ) args = arg_parser.parse_args() From 21d4d1bfdae4221013996cf6062ef493e6632e03 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebasti=C3=A1n=20Mancilla?= Date: Fri, 19 Nov 2021 21:35:17 -0300 Subject: [PATCH 28/34] apache-airflow: fix build on darwin - Disable failing test on darwin. - Patch failing test on Hydra (failed to write to /tmp) --- .../development/python-modules/apache-airflow/default.nix | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pkgs/development/python-modules/apache-airflow/default.nix b/pkgs/development/python-modules/apache-airflow/default.nix index 23fa5b6a860d..22a1772bf162 100644 --- a/pkgs/development/python-modules/apache-airflow/default.nix +++ b/pkgs/development/python-modules/apache-airflow/default.nix @@ -199,6 +199,10 @@ buildPythonPackage rec { substituteInPlace tests/core/test_core.py \ --replace "/bin/bash" "${stdenv.shell}" + '' + lib.optionalString stdenv.isDarwin '' + # Fix failing test on Hydra + substituteInPlace airflow/utils/db.py \ + --replace "/tmp/sqlite_default.db" "$TMPDIR/sqlite_default.db" ''; # allow for gunicorn processes to have access to python packages @@ -220,6 +224,10 @@ buildPythonPackage rec { "tests/core/test_core.py" ]; + disabledTests = lib.optionals stdenv.isDarwin [ + "bash_operator_kill" # psutil.AccessDenied + ]; + postInstall = '' cp -rv ${airflow-frontend}/static/dist $out/lib/${python.libPrefix}/site-packages/airflow/www/static ''; From df03e376fb24fc81b01863920803ace0eadc0469 Mon Sep 17 00:00:00 2001 From: Mario Rodas Date: Fri, 19 Nov 2021 20:19:42 -0500 Subject: [PATCH 29/34] grpc: fix build on aarch64 --- pkgs/development/libraries/grpc/default.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkgs/development/libraries/grpc/default.nix b/pkgs/development/libraries/grpc/default.nix index c00e5a4e0d30..ae49974fefe1 100644 --- a/pkgs/development/libraries/grpc/default.nix +++ b/pkgs/development/libraries/grpc/default.nix @@ -81,7 +81,8 @@ stdenv.mkDerivation rec { export LD_LIBRARY_PATH=$(pwd)''${LD_LIBRARY_PATH:+:}$LD_LIBRARY_PATH ''; - NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isClang "-Wno-error=unknown-warning-option"; + NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isClang "-Wno-error=unknown-warning-option" + + lib.optionalString stdenv.isAarch64 "-Wno-error=format-security"; enableParallelBuilds = true; From 72bdd5b7570183cd5768c3fbf1fd22ef4c15e7af Mon Sep 17 00:00:00 2001 From: Alexander Bantyev Date: Sat, 20 Nov 2021 10:25:35 +0300 Subject: [PATCH 30/34] Revert "libfprint-tod: 1.90.7 -> 1.94.1" --- pkgs/development/libraries/libfprint-tod/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/libfprint-tod/default.nix b/pkgs/development/libraries/libfprint-tod/default.nix index a7705792cd8c..8d7df57896d4 100644 --- a/pkgs/development/libraries/libfprint-tod/default.nix +++ b/pkgs/development/libraries/libfprint-tod/default.nix @@ -6,7 +6,7 @@ # for the curious, "tod" means "Touch OEM Drivers" meaning it can load # external .so's. libfprint.overrideAttrs ({ postPatch ? "", mesonFlags ? [], ... }: let - version = "1.94.1+tod1"; + version = "1.90.7+git20210222+tod1"; in { pname = "libfprint-tod"; inherit version; @@ -16,7 +16,7 @@ in { owner = "3v1n0"; repo = "libfprint"; rev = "v${version}"; - sha256 = "sha256-IVeTQlZjea4xgbG/N7OTHAj6RT4WutfvQhV8qFEvkKo="; + sha256 = "0cj7iy5799pchyzqqncpkhibkq012g3bdpn18pfb19nm43svhn4j"; }; mesonFlags = mesonFlags ++ [ From 15111f8a9ad423d300886b537647691c2faa28cd Mon Sep 17 00:00:00 2001 From: Ryan Burns Date: Fri, 19 Nov 2021 23:37:11 -0800 Subject: [PATCH 31/34] ndk-bundle: fix build Since b79483d2b72c8e349a8fa8a6e67e8061d82d6027, the various architectures of the prebuilt libraries cause errors, so we need to tell patchelf to ignore missing deps. --- pkgs/development/mobile/androidenv/ndk-bundle/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/development/mobile/androidenv/ndk-bundle/default.nix b/pkgs/development/mobile/androidenv/ndk-bundle/default.nix index 26d6a847b4d0..a854069e75a5 100644 --- a/pkgs/development/mobile/androidenv/ndk-bundle/default.nix +++ b/pkgs/development/mobile/androidenv/ndk-bundle/default.nix @@ -10,6 +10,7 @@ in deployAndroidPackage { inherit package os; nativeBuildInputs = [ autoPatchelfHook makeWrapper ]; + autoPatchelfIgnoreMissingDeps = true; buildInputs = lib.optional (os == "linux") [ pkgs.glibc pkgs.stdenv.cc.cc pkgs.python2 pkgs.ncurses5 pkgs.zlib pkgs.libcxx.out pkgs.libxml2 ]; patchInstructions = lib.optionalString (os == "linux") ('' patchShebangs . From 747436dee19d6d7dfbb716627fe0a7e7aee4d57a Mon Sep 17 00:00:00 2001 From: "S. Nordin Abouzahra" Date: Sat, 20 Nov 2021 03:02:01 -0500 Subject: [PATCH 32/34] nilfs-utils: explicitly enable libmount Despite what the README says, libmount support is not enabled by default and needs to be enabled explicitly. Without libmount support the GC daemon (nilfs_cleanerd) is not started at mount. --- pkgs/tools/filesystems/nilfs-utils/default.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkgs/tools/filesystems/nilfs-utils/default.nix b/pkgs/tools/filesystems/nilfs-utils/default.nix index ec227c95573f..07c2c5292dcf 100644 --- a/pkgs/tools/filesystems/nilfs-utils/default.nix +++ b/pkgs/tools/filesystems/nilfs-utils/default.nix @@ -15,6 +15,11 @@ stdenv.mkDerivation rec { buildInputs = [ libuuid libselinux ]; + # According to upstream, libmount should be detected automatically but the + # build system fails to do this. This is likely a bug with their build system + # hence it is explicitly enabled here. + configureFlags = [ "--with-libmount" ]; + installFlags = [ "sysconfdir=${placeholder "out"}/etc" "root_sbindir=${placeholder "out"}/sbin" From 32fda5d1664de1ceaacd553e5ec07f808f26e4f0 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sat, 20 Nov 2021 09:55:13 +0100 Subject: [PATCH 33/34] python3Packages.elementpath: update ordering --- pkgs/development/python-modules/elementpath/default.nix | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/elementpath/default.nix b/pkgs/development/python-modules/elementpath/default.nix index 49a4a6700b21..4dc34f92365e 100644 --- a/pkgs/development/python-modules/elementpath/default.nix +++ b/pkgs/development/python-modules/elementpath/default.nix @@ -5,8 +5,9 @@ }: buildPythonPackage rec { - version = "2.4.0"; pname = "elementpath"; + version = "2.4.0"; + format = "setuptools"; disabled = pythonOlder "3.6"; @@ -20,7 +21,9 @@ buildPythonPackage rec { # avoid circular dependency with xmlschema which directly depends on this doCheck = false; - pythonImportsCheck = [ "elementpath" ]; + pythonImportsCheck = [ + "elementpath" + ]; meta = with lib; { description = "XPath 1.0/2.0 parsers and selectors for ElementTree and lxml"; From 6b9977942adb40518d74eead610d5e92b7067863 Mon Sep 17 00:00:00 2001 From: Patrick Hilhorst Date: Sat, 20 Nov 2021 11:26:30 +0100 Subject: [PATCH 34/34] nixosTests.vscodium: add comments --- nixos/tests/vscodium.nix | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/nixos/tests/vscodium.nix b/nixos/tests/vscodium.nix index a572181b88e6..43a0d61c856f 100644 --- a/nixos/tests/vscodium.nix +++ b/nixos/tests/vscodium.nix @@ -39,24 +39,29 @@ let machine.wait_for_unit('graphical.target') machine.wait_until_succeeds('pgrep -x codium') + # Wait until vscodium is visible. "File" is in the menu bar. machine.wait_for_text('File') machine.screenshot('start_screen') test_string = 'testfile' + # Create a new file machine.send_key('ctrl-n') machine.wait_for_text('Untitled') machine.screenshot('empty_editor') + # Type a string machine.send_chars(test_string) machine.wait_for_text(test_string) machine.screenshot('editor') + # Save the file machine.send_key('ctrl-s') machine.wait_for_text('Save') machine.screenshot('save_window') - machine.send_key('ret') + + # (the default filename is the first line of the file) machine.wait_for_file(f'/home/alice/{test_string}') ''; });