mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-27 09:23:01 +00:00
maubot: switch to ensureNewerSourcesForZipFilesHook
This commit is contained in:
parent
00070cf866
commit
352d3a3ad9
@ -1,13 +0,0 @@
|
||||
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())
|
@ -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,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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user