-
Notifications
You must be signed in to change notification settings - Fork 70
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow accessing correct
pkgs
during preSignCommands
`preSignCommands` is used in two different contexts, when building derivations that are using the package-set defined in the NixOS config for a machine (defaults to a native aarch64-linux package-set) and when building flash scripts (defaults to a native x86_64-linux package-set). In order to support the use-case of using nix outputs obtained from a package-set within `preSignCommands`, the value set in this option must not carry in any output paths from package-sets defined elsewhere. For example, the following configuration is problematic and will not work when building the flash script, due to `pkgs` having a `hostPlatform` of aarch64-linux, thus `hello` will be an ELF binary targeting aarch64-linux: ```nix { pkgs, ... }: { hardware.nvidia-jetpack.firmware.secureBoot.preSignCommands = '' ${pkgs.hello}/bin/hello ''; } ``` The correct usage would be: ```nix { ... }: { hardware.nvidia-jetpack.firmware.secureBoot.preSignCommands = pkgs: '' ${pkgs.hello}/bin/hello ''; } ```
- Loading branch information
Showing
3 changed files
with
35 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters