WIP: erofs: zstd compression #8
3 changed files with 15 additions and 2 deletions
|
@ -5,6 +5,7 @@
|
|||
(final: prev: {
|
||||
|
||||
composefs = final.callPackage ../../pkgs/composefs.nix { inherit prev; };
|
||||
erofs-utils = final.callPackage ../../pkgs/erofs-utils.nix { inherit prev; };
|
||||
qemu_tiny = final.callPackage ../../pkgs/qemu.nix { inherit prev; };
|
||||
systemdUkify = final.callPackage ../../pkgs/systemd-ukify.nix { inherit prev; };
|
||||
|
||||
|
|
|
@ -46,8 +46,10 @@ let
|
|||
split = true;
|
||||
mkfsOptions = lib.mkIf config.image.compress {
|
||||
erofs = [
|
||||
"-zlz4hc,level=12"
|
||||
"-Efragments,dedupe,ztailpacking"
|
||||
"-zzstd,6" # Zstd compression
|
||||
"-T0" # Fixed timestamp for all files
|
||||
"-C1048576" # 1 MiB cluster size
|
||||
"-Efragments,dedupe,ztailpacking" # Extra features
|
||||
];
|
||||
};
|
||||
partitions = initialPartitions;
|
||||
|
|
10
pkgs/erofs-utils.nix
Normal file
10
pkgs/erofs-utils.nix
Normal file
|
@ -0,0 +1,10 @@
|
|||
{ prev, ... }:
|
||||
|
||||
# Build mkfs.erofs with zstd support
|
||||
prev.erofs-utils.overrideAttrs (final: p: {
|
||||
buildInputs = p.buildInputs ++ [ prev.zstd ];
|
||||
configureFlags = p.configureFlags ++ [
|
||||
"--enable-multithreading"
|
||||
"--enable-zstd"
|
||||
];
|
||||
})
|
Loading…
Reference in a new issue