From 7b6987ea4e040338c7bb83eb89c0c9a2d176b698 Mon Sep 17 00:00:00 2001 From: Alexander Bantyev Date: Sun, 11 Dec 2022 21:14:01 +0400 Subject: [PATCH 1/9] hugin: use glew-egl to fix startup crash Currently, hugin crashes on startup with an unhelpful ERROR: 21:14:22.923574 (/build/hugin-2021.0.0/src/hugin1/hugin/GLViewer.cpp:133) SetUpContext(): Error initialising GLEW: Unknown error. As outlined in [1], this is caused by glew being compiled without egl support. As such, switching to glew-egl fixes the problem and hugin starts up fine. [1]: https://bbs.archlinux.org/viewtopic.php?id=278127 --- pkgs/applications/graphics/hugin/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/graphics/hugin/default.nix b/pkgs/applications/graphics/hugin/default.nix index 925175e5bf61..389d5d4294b8 100644 --- a/pkgs/applications/graphics/hugin/default.nix +++ b/pkgs/applications/graphics/hugin/default.nix @@ -13,7 +13,7 @@ , fftw , flann , gettext -, glew +, glew-egl , ilmbase , lcms2 , lensfun @@ -56,7 +56,7 @@ stdenv.mkDerivation rec { fftw flann gettext - glew + glew-egl ilmbase lcms2 lensfun From b3f9e49833511db7c6e6e8f91c8b3490c6ffc45b Mon Sep 17 00:00:00 2001 From: figsoda Date: Wed, 14 Dec 2022 18:41:57 -0500 Subject: [PATCH 2/9] cargo-generate: 0.17.3 -> 0.17.4 Diff: https://github.com/cargo-generate/cargo-generate/compare/v0.17.3...v0.17.4 Changelog: https://github.com/cargo-generate/cargo-generate/blob/v0.17.4/CHANGELOG.md --- pkgs/development/tools/rust/cargo-generate/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/development/tools/rust/cargo-generate/default.nix b/pkgs/development/tools/rust/cargo-generate/default.nix index 8690b1b41ef2..04da55126a26 100644 --- a/pkgs/development/tools/rust/cargo-generate/default.nix +++ b/pkgs/development/tools/rust/cargo-generate/default.nix @@ -10,19 +10,19 @@ rustPlatform.buildRustPackage rec { pname = "cargo-generate"; - version = "0.17.3"; + version = "0.17.4"; src = fetchFromGitHub { owner = "cargo-generate"; repo = "cargo-generate"; rev = "v${version}"; - sha256 = "sha256-7F6Pqq/iFmI3JzDKoMmSyVm6BUr+Ev9GPidOofcLNV4="; + sha256 = "sha256-3dJ16G1PCLAV1sxtDt+eru+Chg7SWt+K/crJgXMO++k="; }; # patch Cargo.toml to not vendor libgit2 and openssl cargoPatches = [ ./no-vendor.patch ]; - cargoSha256 = "sha256-kC8BGobS1iMq+vIwE24Lip+HGdVnA/NjHFAb6cqOz44="; + cargoSha256 = "sha256-eLPLBBytzjKfJk0pbPBC0kJrxkelfDrAj5kaM6g9z9w="; nativeBuildInputs = [ pkg-config ]; From f0f06846e95b7bb6f140a4d4eb999967cc08105e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Wed, 14 Dec 2022 16:06:50 -0800 Subject: [PATCH 3/9] python310Packages.pyrdfa3: patch CVE-2022-4396 --- pkgs/development/python-modules/pyrdfa3/default.nix | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/pkgs/development/python-modules/pyrdfa3/default.nix b/pkgs/development/python-modules/pyrdfa3/default.nix index 97768e7fed50..610eaa39bd7e 100644 --- a/pkgs/development/python-modules/pyrdfa3/default.nix +++ b/pkgs/development/python-modules/pyrdfa3/default.nix @@ -1,6 +1,7 @@ { lib , buildPythonPackage , fetchPypi +, fetchpatch , isPy27 , rdflib , html5lib @@ -17,6 +18,14 @@ buildPythonPackage rec { sha256 = "sha256-FXZjqSuH3zRbb2m94jXf9feXiRYI4S/h5PqNrWhxMa4="; }; + patches = [ + (fetchpatch { + name = "CVE-2022-4396.patch"; + url = "https://github.com/RDFLib/pyrdfa3/commit/ffd1d62dd50d5f4190013b39cedcdfbd81f3ce3e.patch"; + hash = "sha256-prRrOwylYcEqKLr/8LIpyJ5Yyt+6+HTUqH5sQXU8tqc="; + }) + ]; + postPatch = '' substituteInPlace setup.py \ --replace "'html = pyRdfa.rdflibparsers:StructuredDataParser'" "'html = pyRdfa.rdflibparsers:StructuredDataParser'," \ From 062b7f42fdbb383f7d228d9b5444a720fba1d3ec Mon Sep 17 00:00:00 2001 From: Weijia Wang <9713184+wegank@users.noreply.github.com> Date: Wed, 14 Dec 2022 20:18:32 +0100 Subject: [PATCH 4/9] ocamlPackages.lustre-v6: 6.103.3 -> 6.107.1 --- .../ocaml-modules/lustre-v6/default.nix | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/pkgs/development/ocaml-modules/lustre-v6/default.nix b/pkgs/development/ocaml-modules/lustre-v6/default.nix index 419ae432ed37..4eb1e55a5a8a 100644 --- a/pkgs/development/ocaml-modules/lustre-v6/default.nix +++ b/pkgs/development/ocaml-modules/lustre-v6/default.nix @@ -1,29 +1,28 @@ -{ lib, buildDunePackage, fetchurl, extlib, lutils, rdbg }: +{ lib, buildDunePackage, fetchurl, extlib, lutils, rdbg, yaml }: buildDunePackage rec { pname = "lustre-v6"; - version = "6.103.3"; + version = "6.107.1"; - useDune2 = true; - - minimalOCamlVersion = "4.05"; + minimalOCamlVersion = "4.12"; src = fetchurl { - url = "http://www-verimag.imag.fr/DIST-TOOLS/SYNCHRONE/pool/lustre-v6.6.103.3.tgz"; - sha512 = "8d452184ee68edda1b5a50717e6a5b13fb21f9204634fc5898280e27a1d79c97a6e7cc04424fc22f34cdd02ed3cc8774dca4f982faf342980b5f9fe0dc1a017d"; + url = "http://www-verimag.imag.fr/DIST-TOOLS/SYNCHRONE/pool/lustre-v6.v${version}.tgz"; + hash = "sha256-+OqDwUIiPrtJy1C3DmDNTrtsT8clKKcNWCev4TEMRBc="; }; propagatedBuildInputs = [ extlib lutils rdbg + yaml ]; meta = with lib; { description = "Lustre V6 compiler"; homepage = "https://www-verimag.imag.fr/lustre-v6.html"; - license = lib.licenses.cecill21; - maintainers = [ lib.maintainers.delta ]; + license = licenses.cecill21; + maintainers = with maintainers; [ delta wegank ]; mainProgram = "lv6"; }; } From b28b8118f2b528f236133ffef79d0ad693f320a2 Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Thu, 8 Dec 2022 07:20:52 +0100 Subject: [PATCH 5/9] =?UTF-8?q?ocamlPackages.sha:=201.15.1=20=E2=86=92=201?= =?UTF-8?q?.15.2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkgs/development/compilers/haxe/default.nix | 4 ++-- .../ocaml-modules/plotkicadsch/default.nix | 1 + pkgs/development/ocaml-modules/sha/default.nix | 15 ++++++--------- 3 files changed, 9 insertions(+), 11 deletions(-) diff --git a/pkgs/development/compilers/haxe/default.nix b/pkgs/development/compilers/haxe/default.nix index 58370c1a15a2..a05c59a6ef87 100644 --- a/pkgs/development/compilers/haxe/default.nix +++ b/pkgs/development/compilers/haxe/default.nix @@ -11,7 +11,7 @@ let ptmap camlp5 sha - dune_2 + dune_3 luv extlib ] else if lib.versionAtLeast version "4.0" @@ -23,7 +23,7 @@ let ptmap camlp5 sha - dune_2 + dune_3 luv extlib-1-7-7 ] else with ocaml-ng.ocamlPackages_4_05; [ diff --git a/pkgs/development/ocaml-modules/plotkicadsch/default.nix b/pkgs/development/ocaml-modules/plotkicadsch/default.nix index e08fcdfeb2f3..27b3a0ac5ee7 100644 --- a/pkgs/development/ocaml-modules/plotkicadsch/default.nix +++ b/pkgs/development/ocaml-modules/plotkicadsch/default.nix @@ -17,6 +17,7 @@ buildDunePackage rec { pname = "plotkicadsch"; + duneVersion = "3"; inherit (kicadsch) src version; diff --git a/pkgs/development/ocaml-modules/sha/default.nix b/pkgs/development/ocaml-modules/sha/default.nix index 4cbb658b6549..4d400d32844a 100644 --- a/pkgs/development/ocaml-modules/sha/default.nix +++ b/pkgs/development/ocaml-modules/sha/default.nix @@ -1,25 +1,22 @@ -{ lib, fetchurl, buildDunePackage, stdlib-shims, dune-configurator, ounit }: +{ lib, fetchurl, buildDunePackage, stdlib-shims, ounit2 }: buildDunePackage rec { pname = "sha"; - version = "1.15.1"; + version = "1.15.2"; + duneVersion = "3"; src = fetchurl { - url = "https://github.com/djs55/ocaml-${pname}/releases/download/v${version}/${pname}-v${version}.tbz"; - sha256 = "sha256-cRtjydvwgXgimi6F3C48j7LrWgfMO6m9UJKjKlxvp0Q="; + url = "https://github.com/djs55/ocaml-${pname}/releases/download/${version}/${pname}-${version}.tbz"; + hash = "sha256-P71Xs5p8QAaOtBrh7MuhQJOL6144BqTLvXlZOyGD/7c="; }; - useDune2 = true; - - buildInputs = [ dune-configurator ]; - propagatedBuildInputs = [ stdlib-shims ]; doCheck = true; checkInputs = [ - ounit + ounit2 ]; meta = with lib; { From 1218bada61121324257503524468e1036e7fc85b Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Tue, 6 Dec 2022 15:33:49 +0000 Subject: [PATCH 6/9] onedrive: 2.4.21 -> 2.4.22 --- pkgs/applications/networking/sync/onedrive/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/networking/sync/onedrive/default.nix b/pkgs/applications/networking/sync/onedrive/default.nix index 0945de2011b0..78d5fa91ff95 100644 --- a/pkgs/applications/networking/sync/onedrive/default.nix +++ b/pkgs/applications/networking/sync/onedrive/default.nix @@ -14,13 +14,13 @@ stdenv.mkDerivation rec { pname = "onedrive"; - version = "2.4.21"; + version = "2.4.22"; src = fetchFromGitHub { owner = "abraunegg"; repo = pname; rev = "v${version}"; - hash = "sha256-KZVRLXXaJYMqHzjxTfQaD0u7n3ACBEk3fLOmqwybNhM="; + hash = "sha256-/NhZHJEu2s+HlEUb1DqRdrpvrIWrDAtle07+oXMJCdI="; }; nativeBuildInputs = [ autoreconfHook ldc installShellFiles pkg-config ]; From 8549e49c1833197f71e62e6d3f51bf72d4338ee2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabi=C3=A1n=20Heredia=20Montiel?= Date: Mon, 12 Dec 2022 11:11:10 -0600 Subject: [PATCH 7/9] python2Packages.scandir: revert removal This reverts commit 7d4a0668d26c39bfcd1b40b21b7d169cedbfe9aa. Closes https://github.com/NixOS/nixpkgs/issues/205742 --- .../scandir/add-aarch64-darwin-dirent.patch | 28 +++++++++++++++++++ .../python2-modules/scandir/default.nix | 24 ++++++++++++++++ pkgs/top-level/python2-packages.nix | 2 ++ 3 files changed, 54 insertions(+) create mode 100644 pkgs/development/python2-modules/scandir/add-aarch64-darwin-dirent.patch create mode 100644 pkgs/development/python2-modules/scandir/default.nix diff --git a/pkgs/development/python2-modules/scandir/add-aarch64-darwin-dirent.patch b/pkgs/development/python2-modules/scandir/add-aarch64-darwin-dirent.patch new file mode 100644 index 000000000000..1b35a0b950ce --- /dev/null +++ b/pkgs/development/python2-modules/scandir/add-aarch64-darwin-dirent.patch @@ -0,0 +1,28 @@ +diff --git a/scandir.py b/scandir.py +index 3f602fb..40af3e5 100644 +--- a/scandir.py ++++ b/scandir.py +@@ -23,6 +23,7 @@ from os import listdir, lstat, stat, strerror + from os.path import join, islink + from stat import S_IFDIR, S_IFLNK, S_IFREG + import collections ++import platform + import sys + + try: +@@ -432,6 +433,15 @@ elif sys.platform.startswith(('linux', 'darwin', 'sunos5')) or 'bsd' in sys.plat + ('__d_padding', ctypes.c_uint8 * 4), + ('d_name', ctypes.c_char * 256), + ) ++ elif 'darwin' in sys.platform and 'arm64' in platform.machine(): ++ _fields_ = ( ++ ('d_ino', ctypes.c_uint64), ++ ('d_off', ctypes.c_uint64), ++ ('d_reclen', ctypes.c_uint16), ++ ('d_namlen', ctypes.c_uint16), ++ ('d_type', ctypes.c_uint8), ++ ('d_name', ctypes.c_char * 1024), ++ ) + else: + _fields_ = ( + ('d_ino', ctypes.c_uint32), # must be uint32, not ulong diff --git a/pkgs/development/python2-modules/scandir/default.nix b/pkgs/development/python2-modules/scandir/default.nix new file mode 100644 index 000000000000..e712cca8348d --- /dev/null +++ b/pkgs/development/python2-modules/scandir/default.nix @@ -0,0 +1,24 @@ +{ lib, python, buildPythonPackage, fetchPypi }: + +buildPythonPackage rec { + pname = "scandir"; + version = "1.10.0"; + + src = fetchPypi { + inherit pname version; + sha256 = "1bkqwmf056pkchf05ywbnf659wqlp6lljcdb0y88wr9f0vv32ijd"; + }; + + patches = [ + ./add-aarch64-darwin-dirent.patch + ]; + + checkPhase = "${python.interpreter} test/run_tests.py"; + + meta = with lib; { + description = "A better directory iterator and faster os.walk()"; + homepage = "https://github.com/benhoyt/scandir"; + license = licenses.gpl3; + maintainers = with maintainers; [ abbradar ]; + }; +} diff --git a/pkgs/top-level/python2-packages.nix b/pkgs/top-level/python2-packages.nix index c5f47d24f7ad..b88fc47d3315 100644 --- a/pkgs/top-level/python2-packages.nix +++ b/pkgs/top-level/python2-packages.nix @@ -67,6 +67,8 @@ with self; with super; { rpm = disabled super.rpm; + scandir = callPackage ../development/python2-modules/scandir { }; + sequoia = disabled super.sequoia; setuptools = callPackage ../development/python2-modules/setuptools { }; From 6ea94a2cf8dd622c980cc2821d05fb20ff6daadf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabi=C3=A1n=20Heredia=20Montiel?= Date: Mon, 12 Dec 2022 11:23:03 -0600 Subject: [PATCH 8/9] treewide: revert removal of references to pythonPackages.scandir This reverts commit df79f4922ff0a6a8ae1b68d1a1b2d038bf44a961 Closes https://github.com/NixOS/nixpkgs/issues/205742 --- pkgs/development/python-modules/fs/default.nix | 2 ++ pkgs/development/python-modules/pathlib2/default.nix | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/pkgs/development/python-modules/fs/default.nix b/pkgs/development/python-modules/fs/default.nix index ca4fb75af304..1d4326f74ee3 100644 --- a/pkgs/development/python-modules/fs/default.nix +++ b/pkgs/development/python-modules/fs/default.nix @@ -5,6 +5,7 @@ , setuptools , six , appdirs +, scandir ? null , backports_os ? null , typing ? null , pytz @@ -35,6 +36,7 @@ buildPythonPackage rec { propagatedBuildInputs = [ six appdirs pytz setuptools ] ++ lib.optionals (!isPy3k) [ backports_os ] ++ lib.optionals (!pythonAtLeast "3.6") [ typing ] + ++ lib.optionals (!pythonAtLeast "3.5") [ scandir ] ++ lib.optionals (!pythonAtLeast "3.5") [ enum34 ]; LC_ALL="en_US.utf-8"; diff --git a/pkgs/development/python-modules/pathlib2/default.nix b/pkgs/development/python-modules/pathlib2/default.nix index c382f74ae22b..f0f0163652ca 100644 --- a/pkgs/development/python-modules/pathlib2/default.nix +++ b/pkgs/development/python-modules/pathlib2/default.nix @@ -3,6 +3,7 @@ , fetchPypi , six , pythonOlder +, scandir ? null , glibcLocales , mock , typing @@ -18,7 +19,7 @@ buildPythonPackage rec { }; propagatedBuildInputs = [ six ] - ++ lib.optionals (pythonOlder "3.5") [ typing ]; + ++ lib.optionals (pythonOlder "3.5") [ scandir typing ]; checkInputs = [ glibcLocales ] ++ lib.optional (pythonOlder "3.3") mock; From 2230108f55c9c810270b473298eec71139d7387e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabi=C3=A1n=20Heredia=20Montiel?= Date: Mon, 12 Dec 2022 19:47:52 -0600 Subject: [PATCH 9/9] python2Packages.typing: revert removal This reverts commit ff692673773f18ca8940486f3a020212df2b7e76. --- .../python2-modules/typing/default.nix | 32 +++++++++++++++++++ pkgs/top-level/python2-packages.nix | 2 ++ 2 files changed, 34 insertions(+) create mode 100644 pkgs/development/python2-modules/typing/default.nix diff --git a/pkgs/development/python2-modules/typing/default.nix b/pkgs/development/python2-modules/typing/default.nix new file mode 100644 index 000000000000..a835be985ff4 --- /dev/null +++ b/pkgs/development/python2-modules/typing/default.nix @@ -0,0 +1,32 @@ +{ lib, buildPythonPackage, fetchPypi, pythonOlder, isPy3k, isPyPy, unittestCheckHook +, pythonAtLeast }: + +let + testDir = if isPy3k then "src" else "python2"; + +in buildPythonPackage rec { + pname = "typing"; + version = "3.10.0.0"; + + src = fetchPypi { + inherit pname version; + sha256 = "13b4ad211f54ddbf93e5901a9967b1e07720c1d1b78d596ac6a439641aa1b130"; + }; + + disabled = pythonAtLeast "3.5"; + + # Error for Python3.6: ImportError: cannot import name 'ann_module' + # See https://github.com/python/typing/pull/280 + # Also, don't bother on PyPy: AssertionError: TypeError not raised + doCheck = pythonOlder "3.6" && !isPyPy; + + checkInputs = [ unittestCheckHook ]; + + unittestFlagsArray = [ "-s" testDir ]; + + meta = with lib; { + description = "Backport of typing module to Python versions older than 3.5"; + homepage = "https://docs.python.org/3/library/typing.html"; + license = licenses.psfl; + }; +} diff --git a/pkgs/top-level/python2-packages.nix b/pkgs/top-level/python2-packages.nix index b88fc47d3315..e3750544d3ed 100644 --- a/pkgs/top-level/python2-packages.nix +++ b/pkgs/top-level/python2-packages.nix @@ -75,6 +75,8 @@ with self; with super; { setuptools-scm = callPackage ../development/python2-modules/setuptools-scm { }; + typing = callPackage ../development/python2-modules/typing { }; + zeek = disabled super.zeek; zipp = callPackage ../development/python2-modules/zipp { };