Skip to content

Commit

Permalink
Merge pull request NixOS#239658 from rnhmjoj/pr-compress-fw
Browse files Browse the repository at this point in the history
compressFirmwareXz: preserve meta attributes
  • Loading branch information
rnhmjoj authored Jun 26, 2023
2 parents 805f0f9 + 4124eb7 commit 9e4e080
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions pkgs/build-support/kernel/compress-firmware-xz.nix
Original file line number Diff line number Diff line change
@@ -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 --)
Expand Down

0 comments on commit 9e4e080

Please sign in to comment.