Unverified Commit 352d3a3a authored by chayleaf's avatar chayleaf
Browse files

maubot: switch to ensureNewerSourcesForZipFilesHook

parent 00070cf8
Loading
Loading
Loading
Loading
+0 −13
Original line number Diff line number Diff line
diff --git a/maubot/cli/commands/build.py b/maubot/cli/commands/build.py
index ec3ac26..4de85f2 100644
--- a/maubot/cli/commands/build.py
+++ b/maubot/cli/commands/build.py
@@ -84,7 +84,7 @@ def read_output_path(output: str, meta: PluginMeta) -> str | None:
 
 
 def write_plugin(meta: PluginMeta, output: str | IO) -> None:
-    with zipfile.ZipFile(output, "w") as zip:
+    with zipfile.ZipFile(output, "w", strict_timestamps=False) as zip:
         meta_dump = BytesIO()
         yaml.dump(meta.serialize(), meta_dump)
         zip.writestr("maubot.yaml", meta_dump.getvalue())
+0 −2
Original line number Diff line number Diff line
@@ -56,8 +56,6 @@ let
        url = "https://github.com/maubot/maubot/commit/283f0a3ed5dfae13062b6f0fd153fbdc477f4381.patch";
        sha256 = "0yn5357z346qzy5v5g124mgiah1xsi9yyfq42zg028c8paiw8s8x";
      })
      # allow running "mbc build" in a nix derivation
      ./allow-building-plugins-from-nix-store.patch
    ];

    propagatedBuildInputs = with python.pkgs; [
+5 −1
Original line number Diff line number Diff line
@@ -5,6 +5,7 @@
, fetchFromGitea
, stdenvNoCC
, callPackage
, ensureNewerSourcesForZipFilesHook
, maubot
, python3
, poetry
@@ -18,7 +19,10 @@ let
  buildMaubotPlugin = attrs@{ version, pname, base_config ? null, ... }:
    stdenvNoCC.mkDerivation (builtins.removeAttrs attrs [ "base_config" ] // {
      pluginName = "${pname}-v${version}.mbp";
      nativeBuildInputs = (attrs.nativeBuildInputs or [ ]) ++ [ maubot ];
      nativeBuildInputs = (attrs.nativeBuildInputs or [ ]) ++ [
        ensureNewerSourcesForZipFilesHook
        maubot
      ];
      buildPhase = ''
        runHook preBuild