From 8da5a88e075e5148326c03abe76b64c279b41dc2 Mon Sep 17 00:00:00 2001 From: Daniel Barlow Date: Wed, 5 Oct 2022 18:19:09 +0100 Subject: [PATCH] build real lzma --- overlay.nix | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/overlay.nix b/overlay.nix index 65bc581..297a98a 100644 --- a/overlay.nix +++ b/overlay.nix @@ -56,4 +56,21 @@ final: prev: { ''; postFixup = ""; }); + + + # we need to build real lzma instead of using xz, because the lzma + # decoder in u-boot doesn't understand streaming lzma archives + # ("Stream with EOS marker is not supported") and xz can't create + # non-streaming ones. See + # https://sourceforge.net/p/squashfs/mailman/message/26599379/ + + lzma = final.stdenv.mkDerivation { + pname = "lzma"; + version = "4.32.7"; + configureFlags = [ "--enable-static" "--disable-shared"]; + src = final.buildPackages.fetchurl { + url = "https://tukaani.org/lzma/lzma-4.32.7.tar.gz"; + sha256 = "0b03bdvm388kwlcz97aflpr3ir1zpa3m0bq3s6cd3pp5a667lcwz"; + }; + }; }