summary refs log tree commit diff
path: root/pkgs/build-support/kernel
diff options
context:
space:
mode:
authorrnhmjoj <rnhmjoj@inventati.org>2023-06-24 23:08:28 +0200
committerrnhmjoj <rnhmjoj@inventati.org>2023-06-25 11:08:32 +0200
commit4124eb7bd56f7aefc302032c2696a1acbd8b8344 (patch)
treec956f86a24cb4941c494dc239b23ca3c08996b45 /pkgs/build-support/kernel
parent1c9db9710cb23d60570ad4d7ab829c2d34403de3 (diff)
downloadnixpkgs-4124eb7bd56f7aefc302032c2696a1acbd8b8344.tar
nixpkgs-4124eb7bd56f7aefc302032c2696a1acbd8b8344.tar.gz
nixpkgs-4124eb7bd56f7aefc302032c2696a1acbd8b8344.tar.bz2
nixpkgs-4124eb7bd56f7aefc302032c2696a1acbd8b8344.tar.lz
nixpkgs-4124eb7bd56f7aefc302032c2696a1acbd8b8344.tar.xz
nixpkgs-4124eb7bd56f7aefc302032c2696a1acbd8b8344.tar.zst
nixpkgs-4124eb7bd56f7aefc302032c2696a1acbd8b8344.zip
compressFirmwareXz: preserve meta attributes
Among other things, this preserves the package priority, which is
important when building the `hardware.firmware` environment in NixOS.
Diffstat (limited to 'pkgs/build-support/kernel')
-rw-r--r--pkgs/build-support/kernel/compress-firmware-xz.nix8
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 6a797226aa6..cfb06a5c0f1 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 --)