From f9b6ab7e8837d3266e959235f08833fa54377f7b Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Thu, 4 May 2023 22:23:12 +0100 Subject: [PATCH 1/5] python3Packages.django-js-reverse: 2022-09-16 -> 0.10.1-b1 Changing to a different fork, as the original is unmaintained. Changelog: see [1] and [2]. [1]: https://github.com/BITSOLVER/django-js-reverse/releases/tag/0.10.1-b0 [2]: https://github.com/BITSOLVER/django-js-reverse/releases/tag/0.10.1-b1 --- .../django-js-reverse/default.nix | 21 +++++++------------ 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/pkgs/development/python-modules/django-js-reverse/default.nix b/pkgs/development/python-modules/django-js-reverse/default.nix index b06f8c89e358..a6f31a05c8f3 100644 --- a/pkgs/development/python-modules/django-js-reverse/default.nix +++ b/pkgs/development/python-modules/django-js-reverse/default.nix @@ -1,9 +1,11 @@ { lib , buildPythonPackage +, pythonAtLeast , fetchpatch , fetchFromGitHub , python , django +, packaging , nodejs , js2py , six @@ -11,26 +13,19 @@ buildPythonPackage rec { pname = "django-js-reverse"; - # Support for Django 4.0 not yet released - version = "unstable-2022-09-16"; + version = "0.10.1-b1"; src = fetchFromGitHub { - owner = "ierror"; + owner = "BITSOLVER"; repo = "django-js-reverse"; - rev = "7cab78c4531780ab4b32033d5104ccd5be1a246a"; - hash = "sha256-oA4R5MciDMcSsb+GAgWB5jhj+nl7E8t69u0qlx2G93E="; + rev = version; + hash = "sha256-i78UsxVwxyDAc8LrOVEXLG0tdidoQhvUx7GvPDaH0KY="; }; - patches = [ - (fetchpatch { - name = "fix-requires_system_checks-list-or-tuple"; - url = "https://github.com/ierror/django-js-reverse/commit/1477ba44b62c419d12ebec86e56973f1ae56f712.patch"; - hash = "sha256-xUtCziewVhnCOaNWddJBH4/Vvhwjjq/wcQDvh2YzWMQ="; - }) - ]; - propagatedBuildInputs = [ django + ] ++ lib.optionals (pythonAtLeast "3.7") [ + packaging ]; nativeCheckInputs = [ From a2633f9302206a44d8cb1ffd3d4ba52d301c1712 Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Thu, 4 May 2023 22:32:07 +0100 Subject: [PATCH 2/5] python3Packages.recipe-scrapers: 14.32.1 -> 14.36.1 Changelog: see 14.32.1...14.36.1 [1]. [1]: https://github.com/hhursev/recipe-scrapers/compare/14.32.1...14.36.1 --- pkgs/development/python-modules/recipe-scrapers/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/recipe-scrapers/default.nix b/pkgs/development/python-modules/recipe-scrapers/default.nix index c3fd8eb73560..10e5a4ff34e3 100644 --- a/pkgs/development/python-modules/recipe-scrapers/default.nix +++ b/pkgs/development/python-modules/recipe-scrapers/default.nix @@ -13,14 +13,14 @@ buildPythonPackage rec { pname = "recipe-scrapers"; - version = "14.32.1"; + version = "14.36.1"; format = "pyproject"; src = fetchFromGitHub { owner = "hhursev"; repo = "recipe-scrapers"; rev = "refs/tags/${version}"; - hash = "sha256-6iUagD1PTTAraBHOWLjHiLFFsImO30w84p+6IcIv52c="; + hash = "sha256-JadtlJMxRib8FpNC4QGYXfUEJGyB1aniDbsbsBYU3no="; }; nativeBuildInputs = [ From ca57e0223839d21d5fbc1111561e3efe62167756 Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Thu, 4 May 2023 22:57:16 +0100 Subject: [PATCH 3/5] tandoor-recipes: 1.4.4 -> 1.4.9 Changelog: see 1.4.4...1.4.9 [1]. [1]: https://github.com/TandoorRecipes/recipes/compare/1.4.4...1.4.9 --- pkgs/applications/misc/tandoor-recipes/common.nix | 6 +++--- pkgs/applications/misc/tandoor-recipes/default.nix | 11 ++++++++++- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/pkgs/applications/misc/tandoor-recipes/common.nix b/pkgs/applications/misc/tandoor-recipes/common.nix index 49b38bec655a..1a3e4d261144 100644 --- a/pkgs/applications/misc/tandoor-recipes/common.nix +++ b/pkgs/applications/misc/tandoor-recipes/common.nix @@ -1,15 +1,15 @@ { lib, fetchFromGitHub }: rec { - version = "1.4.4"; + version = "1.4.9"; src = fetchFromGitHub { owner = "TandoorRecipes"; repo = "recipes"; rev = version; - sha256 = "sha256-1wqZoOT2Aafbs2P0mL33jw5HkrLIitUcRt6bQQcHx40="; + sha256 = "sha256-h424lUm/wmCHXkMW2XejogvH3wL/+J67cG4m8rIWM1U="; }; - yarnSha256 = "sha256-gH0q3pJ2BC5pAU9KSo3C9DDRUnpypoyLOEqKSrkxYrk="; + yarnSha256 = "sha256-LJ0uL66tcK6zL8Mkd2UB8dHsslMTtf8wQmgbZdvOT6s="; meta = with lib; { homepage = "https://tandoor.dev/"; diff --git a/pkgs/applications/misc/tandoor-recipes/default.nix b/pkgs/applications/misc/tandoor-recipes/default.nix index 89d1740a802c..1f5dee51c599 100644 --- a/pkgs/applications/misc/tandoor-recipes/default.nix +++ b/pkgs/applications/misc/tandoor-recipes/default.nix @@ -2,6 +2,7 @@ , nixosTests , python3 , fetchFromGitHub +, fetchpatch }: let python = python3.override { @@ -41,6 +42,12 @@ python.pkgs.pythonPackages.buildPythonPackage rec { patches = [ # Allow setting MEDIA_ROOT through environment variable ./media-root.patch + # Address CVE-2023-31047 on Django 4.2.1+ + (fetchpatch { + name = "fix-multiple-file-field"; + url = "https://github.com/TandoorRecipes/recipes/pull/2458/commits/6b04c922977317354a367487427b15a8ed619be9.patch"; + hash = "sha256-KmfjJSrB/4tOWtU7zrDJ/AOG4XlmWy/halw8IEEXdZ0="; + }) ]; propagatedBuildInputs = with python.pkgs; [ @@ -101,8 +108,10 @@ python.pkgs.pythonPackages.buildPythonPackage rec { buildPhase = '' runHook preBuild - # Avoid dependency on django debug toolbar + # Disable debug logging export DEBUG=0 + # Avoid dependency on django debug toolbar + export DEBUG_TOOLBAR=0 # See https://github.com/TandoorRecipes/recipes/issues/2043 mkdir cookbook/static/themes/maps/ From 96503103487d34ff5653782d61abe6c9506ebc97 Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Thu, 4 May 2023 23:18:37 +0100 Subject: [PATCH 4/5] nixos/tandoor-recipes: disable debug toolbar --- nixos/modules/services/misc/tandoor-recipes.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/nixos/modules/services/misc/tandoor-recipes.nix b/nixos/modules/services/misc/tandoor-recipes.nix index a349bcac9321..63d3e3d2a857 100644 --- a/nixos/modules/services/misc/tandoor-recipes.nix +++ b/nixos/modules/services/misc/tandoor-recipes.nix @@ -9,6 +9,7 @@ let env = { GUNICORN_CMD_ARGS = "--bind=${cfg.address}:${toString cfg.port}"; DEBUG = "0"; + DEBUG_TOOLBAR = "0"; MEDIA_ROOT = "/var/lib/tandoor-recipes"; } // optionalAttrs (config.time.timeZone != null) { TIMEZONE = config.time.timeZone; From ff573fb2adc8fb9baa67308843c04e2f8f4d0db4 Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Sat, 6 May 2023 17:55:02 +0100 Subject: [PATCH 5/5] tandoor-recipes: frontend: 'nodejs_16' -> 'nodejs' --- pkgs/applications/misc/tandoor-recipes/frontend.nix | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/pkgs/applications/misc/tandoor-recipes/frontend.nix b/pkgs/applications/misc/tandoor-recipes/frontend.nix index 2050d062d6a6..98da59a1d299 100644 --- a/pkgs/applications/misc/tandoor-recipes/frontend.nix +++ b/pkgs/applications/misc/tandoor-recipes/frontend.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchYarnDeps, fixup_yarn_lock, callPackage, nodejs_16 }: +{ stdenv, fetchYarnDeps, fixup_yarn_lock, callPackage, nodejs }: let common = callPackage ./common.nix { }; in @@ -15,9 +15,8 @@ stdenv.mkDerivation { nativeBuildInputs = [ fixup_yarn_lock - # Use Node JS 16 because of @achrinza/node-ipc@9.2.2 - nodejs_16 - nodejs_16.pkgs.yarn + nodejs + nodejs.pkgs.yarn ]; configurePhase = ''