diff options
author | K900 <me@0upti.me> | 2022-08-01 22:56:09 +0300 |
---|---|---|
committer | K900 <me@0upti.me> | 2022-08-02 10:54:55 +0300 |
commit | de93795b4655bb9d7fab75290474f584ce67582d (patch) | |
tree | dd68b56046b43d02dbbe2be5db4a631c504ecad4 /pkgs/build-support/kernel | |
parent | ee38010981583e9555aea6b6f964b4de57eb8b51 (diff) |
make-initrd-ng: clean up a bit
Diffstat (limited to 'pkgs/build-support/kernel')
-rw-r--r-- | pkgs/build-support/kernel/make-initrd-ng.nix | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/pkgs/build-support/kernel/make-initrd-ng.nix b/pkgs/build-support/kernel/make-initrd-ng.nix index 23ed9f3f74e05..e762464fc4893 100644 --- a/pkgs/build-support/kernel/make-initrd-ng.nix +++ b/pkgs/build-support/kernel/make-initrd-ng.nix @@ -8,7 +8,7 @@ let # compression type and filename extension. compressorName = fullCommand: builtins.elemAt (builtins.match "([^ ]*/)?([^ ]+).*" fullCommand) 1; in -{ stdenvNoCC, perl, cpio, ubootTools, lib, pkgsBuildHost, makeInitrdNGTool, patchelf, binutils, runCommand +{ stdenvNoCC, perl, cpio, ubootTools, lib, pkgsBuildHost, makeInitrdNGTool, binutils, runCommand # Name of the derivation (not of the resulting file!) , name ? "initrd" @@ -74,10 +74,9 @@ in passAsFile = ["contents"]; contents = lib.concatMapStringsSep "\n" ({ object, symlink, ... }: "${object}\n${if symlink == null then "" else symlink}") contents + "\n"; - nativeBuildInputs = [makeInitrdNGTool patchelf cpio] ++ lib.optional makeUInitrd ubootTools ++ lib.optional strip binutils; + nativeBuildInputs = [makeInitrdNGTool cpio] ++ lib.optional makeUInitrd ubootTools ++ lib.optional strip binutils; -} // lib.optionalAttrs strip { - STRIP = "${(binutils.nativeDrv or binutils).targetPrefix}strip"; + STRIP = if strip then "${(binutils.nativeDrv or binutils).targetPrefix}strip" else null; }) '' mkdir ./root make-initrd-ng "$contentsPath" ./root |