diff options
author | Michele Guerini Rocco <rnhmjoj@users.noreply.github.com> | 2023-06-26 17:25:16 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-26 17:25:16 +0200 |
commit | 9e4e0807d2142d17f463b26a8b796b3fe20a3011 (patch) | |
tree | ed809003380dca521a6e542954541c02c43ac39a /pkgs/build-support | |
parent | 805f0f958d1c049b0e06d728da61f6b19ce596fb (diff) | |
parent | 4124eb7bd56f7aefc302032c2696a1acbd8b8344 (diff) |
Merge pull request #239658 from rnhmjoj/pr-compress-fw
compressFirmwareXz: preserve meta attributes
Diffstat (limited to 'pkgs/build-support')
-rw-r--r-- | pkgs/build-support/kernel/compress-firmware-xz.nix | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/pkgs/build-support/kernel/compress-firmware-xz.nix b/pkgs/build-support/kernel/compress-firmware-xz.nix index 6a797226aa671..cfb06a5c0f159 100644 --- a/pkgs/build-support/kernel/compress-firmware-xz.nix +++ b/pkgs/build-support/kernel/compress-firmware-xz.nix @@ -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 --) |