Merge pull request #239955 from NixOS/backport-239658-to-release-23.05

[Backport release-23.05] compressFirmwareXz: preserve meta attributes
This commit is contained in:
Weijia Wang
2023-07-04 16:32:10 +03:00
committed by GitHub

View File

@@ -1,8 +1,12 @@
{ runCommand }:
{ runCommand, lib }:
firmware:
runCommand "${firmware.name}-xz" {} ''
let
args = lib.optionalAttrs (firmware ? meta) { inherit (firmware) meta; };
in
runCommand "${firmware.name}-xz" args ''
mkdir -p $out/lib
(cd ${firmware} && find lib/firmware -type d -print0) |
(cd $out && xargs -0 mkdir -v --)