From 9b8ba302ff38fe25b4a30c7dcafeb26d0ef37f9d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Na=C3=AFm=20Favier?= Date: Fri, 9 Jun 2023 11:57:20 +0200 Subject: [PATCH] Clean up deprecated lib functions (#4068) `isCoercibleToString` and `defaultPriority` will start raising warnings in 23.05. --- modules/misc/nix.nix | 2 +- modules/misc/nixpkgs.nix | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/modules/misc/nix.nix b/modules/misc/nix.nix index 785a7c044..e98df2e00 100644 --- a/modules/misc/nix.nix +++ b/modules/misc/nix.nix @@ -30,7 +30,7 @@ let toString v else if isString v then v - else if isCoercibleToString v then + else if isConvertibleWithToString v then toString v else abort "The nix conf value: ${toPretty { } v} can not be encoded"; diff --git a/modules/misc/nixpkgs.nix b/modules/misc/nixpkgs.nix index 283fa3489..42f6724cb 100644 --- a/modules/misc/nixpkgs.nix +++ b/modules/misc/nixpkgs.nix @@ -129,7 +129,9 @@ in { config = { _module.args = { - pkgs = mkOverride modules.defaultPriority _pkgs; + # We use a no-op override to make sure that the option can be merged without evaluating + # `_pkgs`, see https://github.com/nix-community/home-manager/pull/993 + pkgs = mkOverride modules.defaultOverridePriority _pkgs; pkgs_i686 = if _pkgs.stdenv.isLinux && _pkgs.stdenv.hostPlatform.isx86 then _pkgs.pkgsi686Linux