Fix deprecation warning: 'system' renamed to 'stdenv.hostPlatform.system' #61

Closed
opened 2026-03-29 13:52:31 +02:00 by kfickel · 0 comments
Owner

Problem

During home-manager evaluation, the following warning appears:

evaluation warning: 'system' has been renamed to/replaced by 'stdenv.hostPlatform.system'

Cause

In flake.nix, the home manager module uses the deprecated pkgs.system attribute:

package = lib.mkOption {
  type = lib.types.package;
  default = self.packages.${pkgs.system}.streamd;
  defaultText = lib.literalExpression "inputs.streamd.packages.\${pkgs.system}.streamd";
  description = "The package to use for the streamd binary.";
};

Solution

Replace pkgs.system with pkgs.stdenv.hostPlatform.system:

package = lib.mkOption {
  type = lib.types.package;
  default = self.packages.${pkgs.stdenv.hostPlatform.system}.streamd;
  defaultText = lib.literalExpression "inputs.streamd.packages.\${pkgs.stdenv.hostPlatform.system}.streamd";
  description = "The package to use for the streamd binary.";
};
## Problem During home-manager evaluation, the following warning appears: ``` evaluation warning: 'system' has been renamed to/replaced by 'stdenv.hostPlatform.system' ``` ## Cause In `flake.nix`, the home manager module uses the deprecated `pkgs.system` attribute: ```nix package = lib.mkOption { type = lib.types.package; default = self.packages.${pkgs.system}.streamd; defaultText = lib.literalExpression "inputs.streamd.packages.\${pkgs.system}.streamd"; description = "The package to use for the streamd binary."; }; ``` ## Solution Replace `pkgs.system` with `pkgs.stdenv.hostPlatform.system`: ```nix package = lib.mkOption { type = lib.types.package; default = self.packages.${pkgs.stdenv.hostPlatform.system}.streamd; defaultText = lib.literalExpression "inputs.streamd.packages.\${pkgs.stdenv.hostPlatform.system}.streamd"; description = "The package to use for the streamd binary."; }; ```
Sign in to join this conversation.
No labels
planned
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference: kfickel/streamd#61
No description provided.