Skip to content

Commit d5c6b20

Browse files
committed
Add warnings for future deprecation of nixos options related to packaging
1 parent a2afd40 commit d5c6b20

File tree

1 file changed

+57
-0
lines changed

1 file changed

+57
-0
lines changed

modules/flash-script.nix

+57
Original file line numberDiff line numberDiff line change
@@ -409,6 +409,63 @@ in
409409
};
410410

411411
config = lib.mkIf cfg.enable {
412+
warnings = lib.optionals options.hardware.nvidia-jetpack.firmware.uefi.edk2NvidiaPatches.isDefined [
413+
''
414+
The option `hardware.nvidia-jetpack.firmware.uefi.edk2NvidiaPatches`
415+
will be deprecated soon. Please migrate to using the `nixpkgs.overlays`
416+
option to define an overlay that modifies the
417+
`pkgs.nvidia-jetpack.edk2NvidiaSrc` derivation. For example, see
418+
<jetpack-nixos/overlay-with-config.nix>.
419+
''
420+
]
421+
++ lib.optionals options.hardware.nvidia-jetpack.firmware.uefi.edk2UefiPatches.isDefined [
422+
''
423+
The option `hardware.nvidia-jetpack.firmware.uefi.edk2UefiPatches` will
424+
be deprecated soon. Please migrate to using the `nixpkgs.overlays`
425+
option to define an overlay that modifies the
426+
`pkgs.nvidia-jetpack.jetsonEdk2Uefi` derivation. For example, see
427+
<jetpack-nixos/overlay-with-config.nix>.
428+
''
429+
]
430+
++ lib.optionals options.hardware.nvidia-jetpack.flashScriptOverrides.patches.isDefined [
431+
''
432+
The option `hardware.nvidia-jetpack.flashScriptOverrides.patches` will
433+
be deprecated soon. Please migrate to using the `nixpkgs.overlays`
434+
option to define an overlay that modifies the
435+
`pkgs.nvidia-jetpack.flash-tools` derivation. For example, see
436+
<jetpack-nixos/overlay-with-config.nix>.
437+
''
438+
]
439+
++ lib.optionals options.hardware.nvidia-jetpack.flashScriptOverrides.postPatch.isDefined [
440+
''
441+
The option `hardware.nvidia-jetpack.flashScriptOverrides.postPatch`
442+
will be deprecated soon. Please migrate to using the `nixpkgs.overlays`
443+
option to define an overlay that modifies the
444+
`pkgs.nvidia-jetpack.flash-tools` derivation. For example, see
445+
<jetpack-nixos/overlay-with-config.nix>.
446+
''
447+
]
448+
++ lib.optionals options.hardware.nvidia-jetpack.firmware.optee.patches.isDefined [
449+
''
450+
The option `hardware.nvidia-jetpack.firmware.optee.patches` will be
451+
deprecated soon. Please migrate to using the `nixpkgs.overlays` option
452+
to define an overlay that modifies the `pkgs.nvidia-jetpack.opteeOS`
453+
and/or `pkgs.nvidia-jetpack.opteeTaDevKit` derivations. For example,
454+
see <jetpack-nixos/overlay-with-config.nix>.
455+
''
456+
]
457+
++ lib.optionals options.hardware.nvidia-jetpack.firmware.optee.extraMakeFlags.isDefined [
458+
''
459+
The option `hardware.nvidia-jetpack.firmware.optee.extraMakeFlags` will
460+
be deprecated soon. Please migrate to using the `nixpkgs.overlays`
461+
option to define an overlay that modifies the
462+
`pkgs.nvidia-jetpack.opteeOS` and/or
463+
`pkgs.nvidia-jetpack.opteeTaDevKit` derivations. For example, see
464+
<jetpack-nixos/overlay-with-config.nix>.
465+
''
466+
]
467+
;
468+
412469
hardware.nvidia-jetpack.flashScript = lib.warn "hardware.nvidia-jetpack.flashScript is deprecated, use config.system.build.flashScript" config.system.build.flashScript;
413470
hardware.nvidia-jetpack.devicePkgs = (lib.mapAttrs (_: lib.warn "hardware.nvidia-jetpack.devicePkgs is deprecated, use pkgs.nvidia-jetpack") pkgs.nvidia-jetpack);
414471

0 commit comments

Comments
 (0)