From b28ae18dd01e1284b8485811dea603bd39781441 Mon Sep 17 00:00:00 2001 From: Rebecca Kelly Date: Fri, 15 Dec 2023 21:09:22 -0500 Subject: [PATCH] sigal: 2.3 -> 2.4 This fixes the broken build on nixpkgs 23.11/unstable, and we can drop the permissions patch because it's included upstream. --- .../misc/sigal/copytree-permissions.patch | 16 ---------------- pkgs/applications/misc/sigal/default.nix | 12 ++++++------ 2 files changed, 6 insertions(+), 22 deletions(-) delete mode 100644 pkgs/applications/misc/sigal/copytree-permissions.patch diff --git a/pkgs/applications/misc/sigal/copytree-permissions.patch b/pkgs/applications/misc/sigal/copytree-permissions.patch deleted file mode 100644 index 352e1f0d2dcc..000000000000 --- a/pkgs/applications/misc/sigal/copytree-permissions.patch +++ /dev/null @@ -1,16 +0,0 @@ -diff -Nurp sigal-2.3.orig/sigal/writer.py sigal-2.3/sigal/writer.py ---- sigal-2.3.orig/sigal/writer.py 2022-08-08 19:43:10.934707194 +0200 -+++ sigal-2.3/sigal/writer.py 2022-08-08 19:44:57.542382532 +0200 -@@ -103,7 +103,11 @@ class AbstractWriter: - os.path.join(THEMES_PATH, 'default', 'static'), - os.path.join(self.theme, 'static'), - ): -- shutil.copytree(static_path, self.theme_path, dirs_exist_ok=True) -+ # https://stackoverflow.com/a/17022146/4935114 -+ orig_copystat = shutil.copystat -+ shutil.copystat = lambda x, y: x -+ shutil.copytree(static_path, self.theme_path, dirs_exist_ok=True, copy_function=shutil.copy) -+ shutil.copystat = orig_copystat - - if self.settings["user_css"]: - if not os.path.exists(self.settings["user_css"]): diff --git a/pkgs/applications/misc/sigal/default.nix b/pkgs/applications/misc/sigal/default.nix index 7a3988a4cda3..145c34b7f8c0 100644 --- a/pkgs/applications/misc/sigal/default.nix +++ b/pkgs/applications/misc/sigal/default.nix @@ -7,15 +7,17 @@ python3.pkgs.buildPythonApplication rec { pname = "sigal"; - version = "2.3"; - format = "setuptools"; + version = "2.4"; + pyproject = true; src = fetchPypi { inherit version pname; - hash = "sha256-4Zsb/OBtU/jV0gThEYe8bcrb+6hW+hnzQS19q1H409Q="; + hash = "sha256-pDTaqtqfuk7tACkyaKClTJotuVcTKli5yx1wbEM93TM="; }; - patches = [ ./copytree-permissions.patch ]; + nativeBuildInputs = with python3.pkgs; [ + setuptools-scm + ]; propagatedBuildInputs = with python3.pkgs; [ # install_requires @@ -31,8 +33,6 @@ python3.pkgs.buildPythonApplication rec { feedgenerator zopfli cryptography - - setuptools # needs pkg_resources ]; nativeCheckInputs = [