From 53b5a47c12e45bcc55a1115429e231e8c325fd1e Mon Sep 17 00:00:00 2001 From: Valentin Gagarin Date: Mon, 5 Dec 2022 16:24:52 +0100 Subject: [PATCH 01/22] document Import From Derivation (IFD) policy --- doc/contributing/coding-conventions.chapter.md | 15 +++++++++++++++ doc/languages-frameworks/javascript.section.md | 2 +- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/doc/contributing/coding-conventions.chapter.md b/doc/contributing/coding-conventions.chapter.md index d6f6cfe2358d..134c0ca93cae 100644 --- a/doc/contributing/coding-conventions.chapter.md +++ b/doc/contributing/coding-conventions.chapter.md @@ -670,3 +670,18 @@ stdenv.mkDerivation { ... } ``` + +### Import From Derivation {#ssec-import-from-derivation} + +Import From Derivation (IFD) is disallowed in Nixpkgs for performance reasons: +[Hydra] evaluates the entire package set, and sequential builds during evalation would increase evaluation times to become impractical. + +[Hydra]: https://github.com/NixOS/hydra + +Import From Derivation can be worked around in some cases by committing generated intermediate files to version control and reading those instead. + + + +See also [NixOS Wiki: Import From Derivation]. + +[NixOS Wiki: Import From Derivation]: https://nixos.wiki/wiki/Import_From_Derivation diff --git a/doc/languages-frameworks/javascript.section.md b/doc/languages-frameworks/javascript.section.md index 5a17c124a8e1..cea0ede2d5be 100644 --- a/doc/languages-frameworks/javascript.section.md +++ b/doc/languages-frameworks/javascript.section.md @@ -332,7 +332,7 @@ mkYarnPackage rec { ## Outside of nixpkgs {#javascript-outside-nixpkgs} -There are some other options available that can't be used inside nixpkgs. Those other options are written in Nix. Importing them in nixpkgs will require moving the source code into nixpkgs. Using [Import From Derivation](https://nixos.wiki/wiki/Import_From_Derivation) is not allowed in Hydra at present. If you are packaging something outside nixpkgs, those can be considered +There are some other options available that can't be used inside nixpkgs. Those other options are written in Nix. Importing them in nixpkgs will require moving the source code into nixpkgs. Using [Import From Derivation](#ssec-import-from-derivation) is not allowed in Hydra at present. If you are packaging something outside nixpkgs, those can be considered ### npmlock2nix {#javascript-npmlock2nix} From db1a83aaa4e5cfdf054146a48304bcfc0ec48ce3 Mon Sep 17 00:00:00 2001 From: Valentin Gagarin Date: Mon, 5 Dec 2022 16:26:52 +0100 Subject: [PATCH 02/22] docs: fixup wording and formatting on JavaScript --- doc/contributing/coding-conventions.chapter.md | 4 ++-- doc/languages-frameworks/javascript.section.md | 11 +++++++---- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/doc/contributing/coding-conventions.chapter.md b/doc/contributing/coding-conventions.chapter.md index 134c0ca93cae..a8cea4493cc2 100644 --- a/doc/contributing/coding-conventions.chapter.md +++ b/doc/contributing/coding-conventions.chapter.md @@ -487,12 +487,12 @@ Preferred source hash type is sha256. There are several ways to get it. - `lib.fakeHash` - `lib.fakeSha256` - `lib.fakeSha512` - + in the package expression, attempt build and extract correct hash from error messages. ::: {.warning} You must use one of these four fake hashes and not some arbitrarily-chosen hash. - + See [](#sec-source-hashes-security). ::: diff --git a/doc/languages-frameworks/javascript.section.md b/doc/languages-frameworks/javascript.section.md index cea0ede2d5be..e4e6643dd66a 100644 --- a/doc/languages-frameworks/javascript.section.md +++ b/doc/languages-frameworks/javascript.section.md @@ -330,13 +330,16 @@ mkYarnPackage rec { - The `echo 9` steps comes from this answer: - Exporting the headers in `npm_config_nodedir` comes from this issue: -## Outside of nixpkgs {#javascript-outside-nixpkgs} +## Outside Nixpkgs {#javascript-outside-nixpkgs} -There are some other options available that can't be used inside nixpkgs. Those other options are written in Nix. Importing them in nixpkgs will require moving the source code into nixpkgs. Using [Import From Derivation](#ssec-import-from-derivation) is not allowed in Hydra at present. If you are packaging something outside nixpkgs, those can be considered +There are some other tools available, which are written in the Nix language. +These that can't be used inside Nixpkgs because they require [Import From Derivation](#ssec-import-from-derivation), which is not allowed in Nixpkgs. + +If you are packaging something outside Nixpkgs, consider the following: ### npmlock2nix {#javascript-npmlock2nix} -[npmlock2nix](https://github.com/nix-community/npmlock2nix) aims at building node_modules without code generation. It hasn't reached v1 yet, the API might be subject to change. +[npmlock2nix](https://github.com/nix-community/npmlock2nix) aims at building `node_modules` without code generation. It hasn't reached v1 yet, the API might be subject to change. #### Pitfalls {#javascript-npmlock2nix-pitfalls} @@ -344,7 +347,7 @@ There are some [problems with npm v7](https://github.com/tweag/npmlock2nix/issue ### nix-npm-buildpackage {#javascript-nix-npm-buildpackage} -[nix-npm-buildpackage](https://github.com/serokell/nix-npm-buildpackage) aims at building node_modules without code generation. It hasn't reached v1 yet, the API might change. It supports both package-lock.json and yarn.lock. +[nix-npm-buildpackage](https://github.com/serokell/nix-npm-buildpackage) aims at building `node_modules` without code generation. It hasn't reached v1 yet, the API might change. It supports both `package-lock.json` and yarn.lock. #### Pitfalls {#javascript-nix-npm-buildpackage-pitfalls} From 756c839aa0cc4efcabc2862ebc5234f1c2c53f1b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-Fran=C3=A7ois=20Roche?= Date: Fri, 9 Dec 2022 13:22:05 +0100 Subject: [PATCH 03/22] github-runner: fix path to `ldd` and `ldconfig` Use `glibc.bin` to run `ldd` and `ldconfig` --- .../tools/continuous-integration/github-runner/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/tools/continuous-integration/github-runner/default.nix b/pkgs/development/tools/continuous-integration/github-runner/default.nix index 9947f12e523e..8c129d5ff18a 100644 --- a/pkgs/development/tools/continuous-integration/github-runner/default.nix +++ b/pkgs/development/tools/continuous-integration/github-runner/default.nix @@ -263,8 +263,8 @@ stdenv.mkDerivation rec { '' + lib.optionalString stdenv.isLinux '' # Make binary paths absolute substituteInPlace $out/lib/config.sh \ - --replace 'ldd' '${glibc}/bin/ldd' \ - --replace '/sbin/ldconfig' '${glibc}/bin/ldconfig' + --replace 'ldd' '${glibc.bin}/bin/ldd' \ + --replace '/sbin/ldconfig' '${glibc.bin}/bin/ldconfig' '' + '' # Remove uneeded copy for run-helper template substituteInPlace $out/lib/run.sh --replace 'cp -f "$DIR"/run-helper.sh.template "$DIR"/run-helper.sh' ' ' From 9ec5e7b3027b8a36e4cbe5bf1d6860af039fc925 Mon Sep 17 00:00:00 2001 From: figsoda Date: Fri, 9 Dec 2022 18:19:58 -0500 Subject: [PATCH 04/22] ruff: 0.0.171 -> 0.0.172 Diff: https://github.com/charliermarsh/ruff/compare/v0.0.171...v0.0.172 Changelog: https://github.com/charliermarsh/ruff/releases/tag/v0.0.172 --- pkgs/development/tools/ruff/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/development/tools/ruff/default.nix b/pkgs/development/tools/ruff/default.nix index 6fb47035f0a8..2b17a823ba56 100644 --- a/pkgs/development/tools/ruff/default.nix +++ b/pkgs/development/tools/ruff/default.nix @@ -8,16 +8,16 @@ rustPlatform.buildRustPackage rec { pname = "ruff"; - version = "0.0.171"; + version = "0.0.172"; src = fetchFromGitHub { owner = "charliermarsh"; repo = pname; rev = "v${version}"; - sha256 = "sha256-2aqpQo7U17wqQ/YUMreOOKkcVWiKHAdFAUL/6HP6zN8="; + sha256 = "sha256-lDJJatz3vgalsPBMhmpjJ5f7n8szHH0VowsxFjWUm3s="; }; - cargoSha256 = "sha256-N/WoPc2BxujqE/OSp9RWS7dBHGKxIixtBqwDwR3p6TM="; + cargoSha256 = "sha256-9hoDJEKmGXNjtIzU9iZSqpTrwWiIeiwgR0y5wSuYkQE="; buildInputs = lib.optionals stdenv.isDarwin [ CoreServices From 8e36c2d5b624e803fdaae370e562fbd291c7f611 Mon Sep 17 00:00:00 2001 From: figsoda Date: Fri, 9 Dec 2022 19:53:36 -0500 Subject: [PATCH 05/22] piping-server-rust: 0.14.1 -> 0.15.0 Diff: https://github.com/nwtgck/piping-server-rust/compare/v0.14.1...v0.15.0 Changelog: https://github.com/nwtgck/piping-server-rust/blob/v0.15.0/CHANGELOG.md --- pkgs/servers/piping-server-rust/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/servers/piping-server-rust/default.nix b/pkgs/servers/piping-server-rust/default.nix index dda0a6d1d229..ff9c8ad710c3 100644 --- a/pkgs/servers/piping-server-rust/default.nix +++ b/pkgs/servers/piping-server-rust/default.nix @@ -2,16 +2,16 @@ rustPlatform.buildRustPackage rec { pname = "piping-server-rust"; - version = "0.14.1"; + version = "0.15.0"; src = fetchFromGitHub { owner = "nwtgck"; repo = pname; rev = "v${version}"; - sha256 = "sha256-QgOrKAPLphvIMqcOrbYuo4ra65IV8dK5+6tyh+YyyP4="; + sha256 = "sha256-s7tfGt1P/GmvjkIcy8DEwz+ObPxoMsIL7meAc5vMkKo="; }; - cargoSha256 = "sha256-Nd+Frhospp6ERYFuxzEzKbkLAFqTv7Lp7MWwv09S+KA="; + cargoSha256 = "sha256-gqKEFqf49sKZy+L0X4MxUfx2+iYoNIU415xHqOy8MZA="; buildInputs = lib.optionals stdenv.isDarwin [ CoreServices Security ]; From 468a8f97d6fe57bd4ef9c073f1653b24ab3ec79b Mon Sep 17 00:00:00 2001 From: figsoda Date: Fri, 9 Dec 2022 23:31:39 -0500 Subject: [PATCH 06/22] ruff: 0.0.172 -> 0.0.173 Diff: https://github.com/charliermarsh/ruff/compare/v0.0.172...v0.0.173 Changelog: https://github.com/charliermarsh/ruff/releases/tag/v0.0.173 --- pkgs/development/tools/ruff/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/development/tools/ruff/default.nix b/pkgs/development/tools/ruff/default.nix index 2b17a823ba56..bbfd83f96a0e 100644 --- a/pkgs/development/tools/ruff/default.nix +++ b/pkgs/development/tools/ruff/default.nix @@ -8,16 +8,16 @@ rustPlatform.buildRustPackage rec { pname = "ruff"; - version = "0.0.172"; + version = "0.0.173"; src = fetchFromGitHub { owner = "charliermarsh"; repo = pname; rev = "v${version}"; - sha256 = "sha256-lDJJatz3vgalsPBMhmpjJ5f7n8szHH0VowsxFjWUm3s="; + sha256 = "sha256-Z2BcLgqtIWYFq2go0a35WmQXvnWMrj+7OxHmmb2dgxk="; }; - cargoSha256 = "sha256-9hoDJEKmGXNjtIzU9iZSqpTrwWiIeiwgR0y5wSuYkQE="; + cargoSha256 = "sha256-uhMTikyfbMMAf122Nc5NFbOqsICc6nK7s1n1+97mzxQ="; buildInputs = lib.optionals stdenv.isDarwin [ CoreServices From d9f9ead58a390545e9b508cbfb71e56cd5824199 Mon Sep 17 00:00:00 2001 From: Valentin Gagarin Date: Sat, 10 Dec 2022 11:46:53 +0100 Subject: [PATCH 07/22] Update doc/contributing/coding-conventions.chapter.md Co-authored-by: Mostly Void --- doc/contributing/coding-conventions.chapter.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/contributing/coding-conventions.chapter.md b/doc/contributing/coding-conventions.chapter.md index a8cea4493cc2..275a3c7af5d2 100644 --- a/doc/contributing/coding-conventions.chapter.md +++ b/doc/contributing/coding-conventions.chapter.md @@ -674,7 +674,7 @@ stdenv.mkDerivation { ### Import From Derivation {#ssec-import-from-derivation} Import From Derivation (IFD) is disallowed in Nixpkgs for performance reasons: -[Hydra] evaluates the entire package set, and sequential builds during evalation would increase evaluation times to become impractical. +[Hydra] evaluates the entire package set, and sequential builds during evaluation would increase evaluation times to become impractical. [Hydra]: https://github.com/NixOS/hydra From ada93a66647b3363adae69f022c3af37faee5655 Mon Sep 17 00:00:00 2001 From: Bobby Rong Date: Sat, 10 Dec 2022 19:48:13 +0800 Subject: [PATCH 08/22] pantheon.elementary-videos: 2.8.4 -> 2.9.0 --- pkgs/desktops/pantheon/apps/elementary-videos/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/desktops/pantheon/apps/elementary-videos/default.nix b/pkgs/desktops/pantheon/apps/elementary-videos/default.nix index 9059338da479..b656e36c05ca 100644 --- a/pkgs/desktops/pantheon/apps/elementary-videos/default.nix +++ b/pkgs/desktops/pantheon/apps/elementary-videos/default.nix @@ -19,13 +19,13 @@ stdenv.mkDerivation rec { pname = "elementary-videos"; - version = "2.8.4"; + version = "2.9.0"; src = fetchFromGitHub { owner = "elementary"; repo = "videos"; rev = version; - sha256 = "sha256-IUIY/WgGPVRYk9O+ZocopoBF7TlLnTtScNwO6gDCALw="; + sha256 = "sha256-QQcuhYe3/ZMqQEFJS72+vr1AzJC9Y7mr5Fa5yFsNYIc="; }; nativeBuildInputs = [ From 445119adbc6ac0d102b717b85e3de3453468f444 Mon Sep 17 00:00:00 2001 From: Bobby Rong Date: Sat, 10 Dec 2022 19:51:48 +0800 Subject: [PATCH 09/22] pantheon.elementary-capnet-assist: 2.4.2 -> 2.4.3 --- .../services/elementary-capnet-assist/default.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkgs/desktops/pantheon/services/elementary-capnet-assist/default.nix b/pkgs/desktops/pantheon/services/elementary-capnet-assist/default.nix index 734538259130..b72353a39562 100644 --- a/pkgs/desktops/pantheon/services/elementary-capnet-assist/default.nix +++ b/pkgs/desktops/pantheon/services/elementary-capnet-assist/default.nix @@ -13,19 +13,19 @@ , libgee , libhandy , gcr -, webkitgtk +, webkitgtk_4_1 , wrapGAppsHook }: stdenv.mkDerivation rec { pname = "elementary-capnet-assist"; - version = "2.4.2"; + version = "2.4.3"; src = fetchFromGitHub { owner = "elementary"; repo = "capnet-assist"; rev = version; - sha256 = "sha256-aA71kxu4/dwODZt+DSp3vvely3P0dL23Ykqhd84hrZw="; + sha256 = "sha256-06DWkLkVpdSYnKOR8zqA0tvWXYrglBM9R/XEIfIkwQU="; }; nativeBuildInputs = [ @@ -44,7 +44,7 @@ stdenv.mkDerivation rec { gtk3 libgee libhandy - webkitgtk + webkitgtk_4_1 ]; postPatch = '' From 80909c90916fa2468da7a5edeaeecd010bb2b196 Mon Sep 17 00:00:00 2001 From: Bobby Rong Date: Sat, 10 Dec 2022 19:59:15 +0800 Subject: [PATCH 10/22] pantheon.elementary-code: Backport upstream fix for DnD --- .../desktops/pantheon/apps/elementary-code/default.nix | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/pkgs/desktops/pantheon/apps/elementary-code/default.nix b/pkgs/desktops/pantheon/apps/elementary-code/default.nix index 25acfc28062b..8f04aaab278f 100644 --- a/pkgs/desktops/pantheon/apps/elementary-code/default.nix +++ b/pkgs/desktops/pantheon/apps/elementary-code/default.nix @@ -1,6 +1,7 @@ { lib , stdenv , fetchFromGitHub +, fetchpatch , nix-update-script , appstream , desktop-file-utils @@ -36,6 +37,15 @@ stdenv.mkDerivation rec { sha256 = "sha256-QhJNRhYgGbPMd7B1X3kG+pnC/lGUoF7gc7O1PdG49LI="; }; + patches = [ + # Fix drag and drop of accented text and between tabs + # https://github.com/elementary/code/pull/1194 + (fetchpatch { + url = "https://github.com/elementary/code/commit/1ed7b590768ea9cb5b4658e27d9dc7ac224442ae.patch"; + sha256 = "sha256-VrYcEbkzQKi5gFB/Vw/0NITZvSXKXfuEv2R3m0VALVM="; + }) + ]; + nativeBuildInputs = [ appstream desktop-file-utils From 62e863e98c8f5c22c0dd4ee3845613a858262b4c Mon Sep 17 00:00:00 2001 From: h7x4 Date: Sat, 10 Dec 2022 13:02:40 +0100 Subject: [PATCH 11/22] lib.strings: fix negative number handling for `toInt` and `toIntBase10` The previous version would be unstable due to an input validation regex not expecting a '-' in front of the number. --- lib/strings.nix | 13 +++++++------ lib/tests/misc.nix | 4 ++++ 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/lib/strings.nix b/lib/strings.nix index b5f5a4d9060b..a5c3965f8f1a 100644 --- a/lib/strings.nix +++ b/lib/strings.nix @@ -807,9 +807,9 @@ rec { */ toInt = str: let - # RegEx: Match any leading whitespace, then any digits, and finally match any trailing - # whitespace. - strippedInput = match "[[:space:]]*([[:digit:]]+)[[:space:]]*" str; + # RegEx: Match any leading whitespace, possibly a '-', one or more digits, + # and finally match any trailing whitespace. + strippedInput = match "[[:space:]]*(-?[[:digit:]]+)[[:space:]]*" str; # RegEx: Match a leading '0' then one or more digits. isLeadingZero = match "0[[:digit:]]+" (head strippedInput) == []; @@ -858,9 +858,10 @@ rec { */ toIntBase10 = str: let - # RegEx: Match any leading whitespace, then match any zero padding, capture any remaining - # digits after that, and finally match any trailing whitespace. - strippedInput = match "[[:space:]]*0*([[:digit:]]+)[[:space:]]*" str; + # RegEx: Match any leading whitespace, then match any zero padding, + # capture possibly a '-' followed by one or more digits, + # and finally match any trailing whitespace. + strippedInput = match "[[:space:]]*0*(-?[[:digit:]]+)[[:space:]]*" str; # RegEx: Match at least one '0'. isZero = match "0+" (head strippedInput) == []; diff --git a/lib/tests/misc.nix b/lib/tests/misc.nix index 31c938a8ffda..8295f7bfdf9c 100644 --- a/lib/tests/misc.nix +++ b/lib/tests/misc.nix @@ -339,6 +339,8 @@ runTests { (0 == toInt " 0") (0 == toInt "0 ") (0 == toInt " 0 ") + (-1 == toInt "-1") + (-1 == toInt " -1 ") ]; testToIntFails = testAllTrue [ @@ -383,6 +385,8 @@ runTests { (0 == toIntBase10 " 000000") (0 == toIntBase10 "000000 ") (0 == toIntBase10 " 000000 ") + (-1 == toIntBase10 "-1") + (-1 == toIntBase10 " -1 ") ]; testToIntBase10Fails = testAllTrue [ From fda65523fbb8dd7ef4a2eba4d39f88ce19245713 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Sun, 11 Dec 2022 01:23:22 +0100 Subject: [PATCH 12/22] nixos/evcc: Fix unit environment In some recent version evcc started requiring `getent` in the PATH, or else it would fail to start. It also now requires an sqlite database, which it tries to create a directory for at `$HOME/.evcc`, so we now need to provide a StateDirectory. --- nixos/modules/services/home-automation/evcc.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/nixos/modules/services/home-automation/evcc.nix b/nixos/modules/services/home-automation/evcc.nix index c12ba9d0c1e2..efa2cf244313 100644 --- a/nixos/modules/services/home-automation/evcc.nix +++ b/nixos/modules/services/home-automation/evcc.nix @@ -48,7 +48,10 @@ in wantedBy = [ "multi-user.target" ]; - + environment.HOME = "/var/lib/evcc"; + path = with pkgs; [ + glibc # requires getent + ]; serviceConfig = { ExecStart = "${package}/bin/evcc --config ${configFile} ${escapeShellArgs cfg.extraArgs}"; CapabilityBoundingSet = [ "" ]; @@ -77,6 +80,7 @@ in ProtectKernelModules = true; ProtectKernelTunables = true; ProtectProc = "invisible"; + StateDirectory = "evcc"; SystemCallArchitectures = "native"; SystemCallFilter = [ "@system-service" From 76e962151ae9dc0660f343afae782a8b6df3b102 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Sun, 11 Dec 2022 01:23:48 +0100 Subject: [PATCH 13/22] nixos/tests/evcc: Fail when the unit produces fatal log messages --- nixos/tests/evcc.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/nixos/tests/evcc.nix b/nixos/tests/evcc.nix index 0fc261142f78..c223977a9d82 100644 --- a/nixos/tests/evcc.nix +++ b/nixos/tests/evcc.nix @@ -87,6 +87,7 @@ import ./make-test-python.nix ({ pkgs, lib, ...} : with subtest("Check journal for errors"): _, output = machine.execute("journalctl -o cat -u evcc.service") + assert "FATAL" not in output assert "ERROR" not in output with subtest("Check systemd hardening"): From df429dc6476721559cd5d66c0a27789a4042611d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Fri, 9 Dec 2022 22:48:32 -0800 Subject: [PATCH 14/22] python310Packages.notify-py: 0.3.3 -> 0.3.38 https://github.com/ms7m/notify-py/releases/tag/v0.3.38 --- .../python-modules/notify-py/default.nix | 25 ++++++-- .../notify-py/linux-paths.patch | 64 +++++-------------- 2 files changed, 37 insertions(+), 52 deletions(-) diff --git a/pkgs/development/python-modules/notify-py/default.nix b/pkgs/development/python-modules/notify-py/default.nix index 6ff41eeb36a3..9184199c0acb 100644 --- a/pkgs/development/python-modules/notify-py/default.nix +++ b/pkgs/development/python-modules/notify-py/default.nix @@ -1,12 +1,14 @@ { lib , stdenv , buildPythonPackage -, isPy3k +, pythonOlder , fetchFromGitHub , substituteAll , alsa-utils , libnotify , which +, poetry-core +, pythonRelaxDepsHook , jeepney , loguru , pytest @@ -16,15 +18,17 @@ buildPythonPackage rec { pname = "notify-py"; - version = "0.3.3"; + version = "0.3.38"; - disabled = !isPy3k; + disabled = pythonOlder "3.6"; + + format = "pyproject"; src = fetchFromGitHub { owner = "ms7m"; repo = pname; rev = "v${version}"; - sha256 = "1n35adwsyhz304n4ifnsz6qzkymwhyqc8sg8d76qv5psv2xsnzlf"; + hash = "sha256-wlA7a10f4PYP3dYYwZqMULQ5FMCXpOUOTxXzEEVZCsI="; }; patches = lib.optionals stdenv.isLinux [ @@ -42,6 +46,15 @@ buildPythonPackage rec { }) ]; + nativeBuildInputs = [ + poetry-core + pythonRelaxDepsHook + ]; + + pythonRelaxDeps = [ + "loguru" + ]; + propagatedBuildInputs = [ loguru ] ++ lib.optionals stdenv.isLinux [ @@ -67,6 +80,10 @@ buildPythonPackage rec { pytest ''; + # GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name + # org.freedesktop.Notifications was not provided by any .service files + doCheck = false; + pythonImportsCheck = [ "notifypy" ]; meta = with lib; { diff --git a/pkgs/development/python-modules/notify-py/linux-paths.patch b/pkgs/development/python-modules/notify-py/linux-paths.patch index f043ec14a467..19965f33996f 100644 --- a/pkgs/development/python-modules/notify-py/linux-paths.patch +++ b/pkgs/development/python-modules/notify-py/linux-paths.patch @@ -1,54 +1,22 @@ diff --git a/notifypy/os_notifiers/linux.py b/notifypy/os_notifiers/linux.py -index ee89216..5201574 100644 +index 5882481..e26eaaf 100644 --- a/notifypy/os_notifiers/linux.py +++ b/notifypy/os_notifiers/linux.py -@@ -53,30 +53,12 @@ class LinuxNotifierLibNotify(BaseNotifier): - @staticmethod - def _find_installed_aplay(): - """Function to find the path for notify-send""" -- try: -- run_which_for_aplay = subprocess.check_output(["which", "aplay"]) -- return run_which_for_aplay.decode("utf-8") -- except subprocess.CalledProcessError: -- logger.exception("Unable to find aplay.") -- return False -- except Exception: -- logger.exception("Unhandled exception for finding aplay.") -- return False -+ return "@aplay@" +@@ -10,7 +10,7 @@ try: + from jeepney.io.blocking import open_dbus_connection + from shutil import which - @staticmethod - def _find_installed_notify_send(): - """Function to find the path for notify-send""" -- try: -- run_which_for_notify_send = subprocess.check_output( -- ["which", "notify-send"] -- ) -- return run_which_for_notify_send.decode("utf-8") -- except subprocess.CalledProcessError: -- logger.exception("Unable to find notify-send.") -- return False -- except Exception: -- logger.exception("Unhandled exception for finding notify-send.") -- return False -+ return "@notifysend@" +- NOTIFY = which('notify-send') # alternatively: from ctypes.util import find_library ++ NOTIFY = '@notifysend@' # alternatively: from ctypes.util import find_library - def send_notification( - self, -@@ -159,15 +141,7 @@ class LinuxNotifier(BaseNotifier): - @staticmethod - def _find_installed_aplay(): - """Function to find the path for notify-send""" -- try: -- run_which_for_aplay = subprocess.check_output(["which", "aplay"]) -- return run_which_for_aplay.decode("utf-8") -- except subprocess.CalledProcessError: -- logger.exception("Unable to find aplay.") -- return False -- except Exception: -- logger.exception("Unhandled exception for finding aplay.") -- return False -+ return "@aplay@" + if NOTIFY: + logger.info("libnotify found, using it for notifications") +@@ -22,7 +22,7 @@ try: + else: + raise ImportError - def send_notification( - self, +- APLAY = which('aplay') ++ APLAY = '@aplay@' + + if APLAY == None: + logger.debug("aplay binary not installed.. audio will not work!") From 280f04daaffc1ae40d8e50570ee55c151614fa23 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Sat, 10 Dec 2022 15:01:03 -0800 Subject: [PATCH 15/22] python310Packages.toggl-cli: relax notify-py version constraint --- pkgs/development/python-modules/toggl-cli/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/python-modules/toggl-cli/default.nix b/pkgs/development/python-modules/toggl-cli/default.nix index af6132cd2771..e8b97e3f10a6 100644 --- a/pkgs/development/python-modules/toggl-cli/default.nix +++ b/pkgs/development/python-modules/toggl-cli/default.nix @@ -57,7 +57,7 @@ buildPythonPackage rec { postPatch = '' substituteInPlace requirements.txt \ - --replace "notify-py==0.3.1" "notify-py>=0.3.1" \ + --replace "notify-py==0.3.3" "notify-py>=0.3.3" \ --replace "click==8.0.3" "click>=8.0.3" \ --replace "pbr==5.8.0" "pbr>=5.8.0" \ --replace "inquirer==2.9.1" "inquirer>=2.9.1" From 70ebc593614cc7a49cee8f67462a82b0df8a1921 Mon Sep 17 00:00:00 2001 From: Astro Date: Sun, 11 Dec 2022 01:51:45 +0100 Subject: [PATCH 16/22] wander: 0.8.0 -> 0.8.2 --- pkgs/tools/admin/wander/default.nix | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/pkgs/tools/admin/wander/default.nix b/pkgs/tools/admin/wander/default.nix index 5eda08a6b1c8..63335c385f9b 100644 --- a/pkgs/tools/admin/wander/default.nix +++ b/pkgs/tools/admin/wander/default.nix @@ -2,24 +2,17 @@ buildGoModule rec { pname = "wander"; - version = "0.8.0"; + version = "0.8.2"; src = fetchFromGitHub { owner = "robinovitch61"; repo = pname; rev = "v${version}"; - sha256 = "sha256-G/TrfnmEyomdUCN5nUS9v5iqeUzgZzMLUZnfroQLZuk="; + sha256 = "sha256-BcjK1GNj6URk6PmZIqG/t6vvy5ZXo3Z6wDqY1kbLSfw="; }; vendorSha256 = "sha256-iTaZ5/0UrLJ3JE3FwQpvjKKrhqklG4n1WFTJhWfj/rI="; - patches = [ - (fetchpatch { - url = "https://github.com/robinovitch61/wander/commit/b3d3249541de005404a41c17a15218a4f73f68e5.patch"; - sha256 = "sha256-z8bdSFcAqnwEu0gupxW/L1o/asyxbvTYIdtLZNmQpz8="; - }) - ]; - ldflags = [ "-X github.com/robinovitch61/wander/cmd.Version=v${version}" ]; nativeBuildInputs = [ installShellFiles ]; From c135439ed4f4a5053931096bec6c896c607f54dc Mon Sep 17 00:00:00 2001 From: figsoda Date: Sat, 10 Dec 2022 19:53:41 -0500 Subject: [PATCH 17/22] cargo-nextest: 0.9.45 -> 0.9.46 Diff: https://github.com/nextest-rs/nextest/compare/cargo-nextest-0.9.45...cargo-nextest-0.9.46 Changelog: https://nexte.st/CHANGELOG.html --- pkgs/development/tools/rust/cargo-nextest/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/development/tools/rust/cargo-nextest/default.nix b/pkgs/development/tools/rust/cargo-nextest/default.nix index c6b1abdaa5af..1c341ce5bafe 100644 --- a/pkgs/development/tools/rust/cargo-nextest/default.nix +++ b/pkgs/development/tools/rust/cargo-nextest/default.nix @@ -2,16 +2,16 @@ rustPlatform.buildRustPackage rec { pname = "cargo-nextest"; - version = "0.9.45"; + version = "0.9.46"; src = fetchFromGitHub { owner = "nextest-rs"; repo = "nextest"; rev = "cargo-nextest-${version}"; - sha256 = "sha256-Sb5xJCxUz60TfDMqv7Q7hTRVXvligpWkTG4FRAO/H3c="; + sha256 = "sha256-EBuluD++LdkVnE8WiLPKpSiz7Zlz+R9el+0orwOO0Xw="; }; - cargoSha256 = "sha256-LzhrPQXr+CfzNoMWrPekDvtoPn0iqLhBV+3NO5AV0Po="; + cargoSha256 = "sha256-gZaM4lLgiWt9RXYaOdD4EnYj2xgSqgT9g+H/sLifAFI="; buildInputs = lib.optionals stdenv.isDarwin [ Security ]; From 02f60f038a8c89cb90d7b133c628b148b86cc8c1 Mon Sep 17 00:00:00 2001 From: figsoda Date: Sat, 10 Dec 2022 19:03:33 -0500 Subject: [PATCH 18/22] rust-script: 0.21.0 -> 0.22.0 Diff: https://github.com/fornwall/rust-script/compare/v0.21.0...0.22.0 --- pkgs/development/tools/rust/rust-script/default.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkgs/development/tools/rust/rust-script/default.nix b/pkgs/development/tools/rust/rust-script/default.nix index a1edc1356799..c5f1aee1ce1b 100644 --- a/pkgs/development/tools/rust/rust-script/default.nix +++ b/pkgs/development/tools/rust/rust-script/default.nix @@ -2,16 +2,16 @@ rustPlatform.buildRustPackage rec { pname = "rust-script"; - version = "0.21.0"; + version = "0.22.0"; src = fetchFromGitHub { owner = "fornwall"; repo = pname; - rev = "v${version}"; - sha256 = "sha256-5T5DivfT7/MkBJo5YgLAVnfct84nBhw/OXWQ/4TMm2A="; + rev = version; + sha256 = "sha256-R9L53ThJKf68M4idNiWfO6fUDJNqiyrzCmdbEvo8OMM="; }; - cargoSha256 = "sha256-mDH3R9gn64DXVoe3Vkl2Kwhr7OTOUWKBLW5Y+Uo4aXM="; + cargoSha256 = "sha256-hi0jtI6KtvBjyhhOEEE1x2l7DSIAC4tkRIF9SLFwFQI="; # tests require network access doCheck = false; From 8fd00153ffb8d853e500bfb11135622668fe6928 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Sun, 11 Dec 2022 02:24:26 +0000 Subject: [PATCH 19/22] redpanda: 22.3.1 -> 22.3.5 --- pkgs/servers/redpanda/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/servers/redpanda/default.nix b/pkgs/servers/redpanda/default.nix index 2c14a080f9b1..84b63d5984e3 100644 --- a/pkgs/servers/redpanda/default.nix +++ b/pkgs/servers/redpanda/default.nix @@ -1,13 +1,13 @@ { lib, stdenv, fetchzip }: let - version = "22.3.1"; + version = "22.3.5"; platform = if stdenv.isLinux then "linux" else "darwin"; arch = if stdenv.isAarch64 then "arm" else "amd"; sha256s = { darwin.amd = "sha256-AXk3aP1SGiHTfHTCBRTagX0DAVmdcVVIkxWaTnZxB8g="; darwin.arm = "sha256-pvOVvNc8lZ2d2fVZVYWvumVWYpnLORNY/3o1t4BN2N4="; - linux.amd = "sha256-liUFM9f7OQocb5j/qvZNVWiJGIf651ULMlRmX67qyoQ="; + linux.amd = "sha256-wsUuSCstYucjMpFsqssPGEhm3zCrAdE9Mldtkypbthg="; linux.arm = "sha256-WHjYAbytiu747jFqN0KZ/CkIwAVI7fb32ywtRiQOBm8="; }; in stdenv.mkDerivation rec { From f30e1cd088548dbbd67ed0c9b0f5e79bb475f558 Mon Sep 17 00:00:00 2001 From: "R. RyanTM" Date: Sat, 10 Dec 2022 19:50:22 -0800 Subject: [PATCH 20/22] httplib: 0.11.1 -> 0.11.3 Co-authored-by: Fabian Affolter --- pkgs/development/libraries/httplib/default.nix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/httplib/default.nix b/pkgs/development/libraries/httplib/default.nix index 19618613ee17..9df296c4a57c 100644 --- a/pkgs/development/libraries/httplib/default.nix +++ b/pkgs/development/libraries/httplib/default.nix @@ -5,13 +5,13 @@ stdenvNoCC.mkDerivation rec { pname = "httplib"; - version = "0.11.1"; + version = "0.11.3"; src = fetchFromGitHub { owner = "yhirose"; repo = "cpp-httplib"; rev = "v${version}"; - sha256 = "sha256-rsElqtoRz/sOXpAsfSJbMlwIKdaGJkSZfKHzB/wMhY8="; + hash = "sha256-gly0AQ2DCZJQCAPQL5Xsc/kTvFK2twIDbHwbjvrW+P4="; }; # Header-only library. @@ -25,6 +25,7 @@ stdenvNoCC.mkDerivation rec { meta = with lib; { description = "A C++ header-only HTTP/HTTPS server and client library"; homepage = "https://github.com/yhirose/cpp-httplib"; + changelog = "https://github.com/yhirose/cpp-httplib/releases/tag/v${version}"; maintainers = with maintainers; [ aidalgol ]; license = licenses.mit; }; From dc29c443277c6ccd86c912980bfbaba0c29a4af5 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sun, 11 Dec 2022 03:10:49 +0000 Subject: [PATCH 21/22] =?UTF-8?q?terraform-providers.bitbucket:=202.23.0?= =?UTF-8?q?=20=E2=86=92=202.24.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../networking/cluster/terraform-providers/providers.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/applications/networking/cluster/terraform-providers/providers.json b/pkgs/applications/networking/cluster/terraform-providers/providers.json index fca7beb8c009..28fee5b61a43 100644 --- a/pkgs/applications/networking/cluster/terraform-providers/providers.json +++ b/pkgs/applications/networking/cluster/terraform-providers/providers.json @@ -167,13 +167,13 @@ "vendorHash": null }, "bitbucket": { - "hash": "sha256-tT5JSiUPeezQFn4tnKrsUxfm/llaBk8R2eOGqGIbEH4=", + "hash": "sha256-NPcAYceokJHqfQU/cx9S2c8riFbU2tTTJEuHXPPP+eE=", "homepage": "https://registry.terraform.io/providers/DrFaust92/bitbucket", "owner": "DrFaust92", "repo": "terraform-provider-bitbucket", - "rev": "v2.23.0", + "rev": "v2.24.0", "spdx": "MPL-2.0", - "vendorHash": "sha256-CFRZSdQnbhV7n10r2R1+cGxn7nKD+GvXWf85rYFRPVI=" + "vendorHash": "sha256-Db8mo4XOjWi3n8Ni94f4/urWkU3/WfEVQsmXEGFmpQI=" }, "brightbox": { "hash": "sha256-F/AQq45ADM0+PbFpMPtpMvbYw8F41GDBzk7LoY/L/Qg=", From 5705a4ab95bc0d92193aab383cfb439945adadfe Mon Sep 17 00:00:00 2001 From: figsoda Date: Sat, 10 Dec 2022 23:05:25 -0500 Subject: [PATCH 22/22] cargo-nextest: 0.9.46 -> 0.9.47 Diff: https://github.com/nextest-rs/nextest/compare/cargo-nextest-0.9.46...cargo-nextest-0.9.47 Changelog: https://nexte.st/CHANGELOG.html --- pkgs/development/tools/rust/cargo-nextest/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/development/tools/rust/cargo-nextest/default.nix b/pkgs/development/tools/rust/cargo-nextest/default.nix index 1c341ce5bafe..13bfdccac61f 100644 --- a/pkgs/development/tools/rust/cargo-nextest/default.nix +++ b/pkgs/development/tools/rust/cargo-nextest/default.nix @@ -2,16 +2,16 @@ rustPlatform.buildRustPackage rec { pname = "cargo-nextest"; - version = "0.9.46"; + version = "0.9.47"; src = fetchFromGitHub { owner = "nextest-rs"; repo = "nextest"; rev = "cargo-nextest-${version}"; - sha256 = "sha256-EBuluD++LdkVnE8WiLPKpSiz7Zlz+R9el+0orwOO0Xw="; + sha256 = "sha256-G7Y2x9aRcQB28uR2TlyG8JW9kYSD9iMPASd0VFXOxcE="; }; - cargoSha256 = "sha256-gZaM4lLgiWt9RXYaOdD4EnYj2xgSqgT9g+H/sLifAFI="; + cargoSha256 = "sha256-7fesLvkHPpPS4xKn3r6hLjQzP0udm92BsVPhdckTk7c="; buildInputs = lib.optionals stdenv.isDarwin [ Security ];