From ad1e2500efd0aa49b0dc7427bf69d4879f3b0ff5 Mon Sep 17 00:00:00 2001 From: Robert Hensing Date: Thu, 7 Apr 2022 11:05:28 +0200 Subject: [PATCH] pkgs: Add _type = "pkgs" --- pkgs/top-level/all-packages.nix | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 0565d2535b88..88caa0a1ddd1 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -11,6 +11,21 @@ res: pkgs: super: with pkgs; { + # A module system style type tag + # + # Allows the nixpkgs fixpoint, usually known as `pkgs` + # to be distinguished nominally. + # + # pkgs._type == "pkgs" + # pkgs.pkgsStatic._type == "pkgs" + # + # Design note: + # While earlier stages of nixpkgs fixpoint construction + # are supertypes of this stage, they're generally not + # usable in places where a `pkgs` is expected. + # (earlier stages being the various `super` variables + # that precede all-packages.nix) + _type = "pkgs"; # A stdenv capable of building 32-bit binaries. On x86_64-linux, # it uses GCC compiled with multilib support; on i686-linux, it's