diff options
author | John Ericson <John.Ericson@Obsidian.Systems> | 2018-08-27 14:39:58 -0400 |
---|---|---|
committer | John Ericson <John.Ericson@Obsidian.Systems> | 2018-09-05 11:53:51 -0400 |
commit | e51f736076548459f36a1250de4bf6867f880b66 (patch) | |
tree | c2a7424011a0f04baaa2b1d2b1b03b553faa8c57 /pkgs/top-level/stage.nix | |
parent | 51907d257cac16eb7d45a3a35a57bad69bbe8c46 (diff) |
top-level: Deprecate top-level `{build,host,target}Platform`
I don't know when we can/should remove them, but this at least gets
people to stop using them. The preferred alternatives also date back to
17.09 so writing forward-compatable code without extra conditions is
easy.
Beginning with these as they are the least controversial.
Diffstat (limited to 'pkgs/top-level/stage.nix')
-rw-r--r-- | pkgs/top-level/stage.nix | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/pkgs/top-level/stage.nix b/pkgs/top-level/stage.nix index 06978d1067bf..5ca8b72b8b8e 100644 --- a/pkgs/top-level/stage.nix +++ b/pkgs/top-level/stage.nix @@ -79,11 +79,17 @@ let # The old identifiers for cross-compiling. These should eventually be removed, # and the packages that rely on them refactored accordingly. - platformCompat = self: super: let - inherit (super.stdenv) buildPlatform hostPlatform targetPlatform; - in { - inherit buildPlatform hostPlatform targetPlatform; - inherit (buildPlatform) system; + platformCompat = self: super: { + buildPlatform = lib.warn + "top-level `buildPlatform` is deprecated since 18.09. Please use `stdenv.buildPlatform`." + super.stdenv.buildPlatform; + hostPlatform = lib.warn + "top-level `hostPlatform` is deprecated since 18.09. Please use `stdenv.hostPlatform`." + super.stdenv.hostPlatform; + targetPlatform = lib.warn + "top-level `targetPlatform` is deprecated since 18.09. Please use `stdenv.targetPlatform`." + super.stdenv.targetPlatform; + inherit (super.stdenv.buildPlatform) system; }; splice = self: super: import ./splice.nix lib self (buildPackages != null); |