mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-30 10:53:11 +00:00
14fbf575ec
- Generate a link to the initramfs file with an appropriate file extension, guessed based on the compressor by default - Use correct metadata in u-boot images if generated, up to now this was hardcoded to gzip and would silently generate an erroneous image if another compressor was specified - Document all the parameters - Improve cross-building compatibility, by allowing passing either a string as before, or a function taking a package set and returning the path to a compressor in the "compressor" argument of the function. - Support more compression algorithms - Place compressor executable function and arguments in passthru, for reuse when appending initramfses Co-Authored-By: Dominik Xaver Hörl <hoe.dom@gmx.de>
54 lines
1.2 KiB
Nix
54 lines
1.2 KiB
Nix
rec {
|
|
cat = {
|
|
executable = pkgs: "cat";
|
|
ubootName = "none";
|
|
extension = ".cpio";
|
|
};
|
|
gzip = {
|
|
executable = pkgs: "${pkgs.gzip}/bin/gzip";
|
|
defaultArgs = ["-9n"];
|
|
ubootName = "gzip";
|
|
extension = ".gz";
|
|
};
|
|
bzip2 = {
|
|
executable = pkgs: "${pkgs.bzip2}/bin/bzip2";
|
|
ubootName = "bzip2";
|
|
extension = ".bz2";
|
|
};
|
|
xz = {
|
|
executable = pkgs: "${pkgs.xz}/bin/xz";
|
|
defaultArgs = ["--check=crc32" "--lzma2=dict=512KiB"];
|
|
extension = ".xz";
|
|
};
|
|
lzma = {
|
|
executable = pkgs: "${pkgs.xz}/bin/lzma";
|
|
defaultArgs = ["--check=crc32" "--lzma1=dict=512KiB"];
|
|
ubootName = "lzma";
|
|
extension = ".lzma";
|
|
};
|
|
lz4 = {
|
|
executable = pkgs: "${pkgs.lz4}/bin/lz4";
|
|
defaultArgs = ["-l"];
|
|
ubootName = "lz4";
|
|
extension = ".lz4";
|
|
};
|
|
lzop = {
|
|
executable = pkgs: "${pkgs.lzop}/bin/lzop";
|
|
ubootName = "lzo";
|
|
extension = ".lzo";
|
|
};
|
|
zstd = {
|
|
executable = pkgs: "${pkgs.zstd}/bin/zstd";
|
|
defaultArgs = ["-10"];
|
|
ubootName = "zstd";
|
|
extension = ".zst";
|
|
};
|
|
pigz = gzip // {
|
|
executable = pkgs: "${pkgs.pigz}/bin/pigz";
|
|
};
|
|
pixz = xz // {
|
|
executable = pkgs: "${pkgs.pixz}/bin/pixz";
|
|
defaultArgs = [];
|
|
};
|
|
}
|