Unverified Commit 467ee31e authored by Adam Joseph's avatar Adam Joseph Committed by GitHub
Browse files

Update doc/stdenv/meta.chapter.md

parent 19d48a92
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -182,7 +182,8 @@ meta.hydraPlatforms = [];

### `broken` {#var-meta-broken}

If set to `true`, the package is marked as "broken", meaning that it won’t show up in `nix-env -qa`, and cannot be built or installed unless the environment variable `NIXPKGS_ALLOW_BROKEN` is set. Such unconditionally-broken packages should be removed from Nixpkgs eventually unless they are fixed.
If set to `true`, the package is marked as "broken", meaning that it won’t show up in [search.nixos.org](https://search.nixos.org/packages), and cannot be built or installed unless the environment variable [`NIXPKGS_ALLOW_BROKEN`](#opt-allowBroken) is set.
Such unconditionally-broken packages should be removed from Nixpkgs eventually unless they are fixed.

The value of this attribute can depend on a package's arguments, including `stdenv`.  This means that `broken` can be used to express constraints such as "does not cross compile" (`meta.broken = !(stdenv.buildPlatform.canExecute stdenv.hostPlatform)`) or "broken if all of a certain set of its dependencies are broken".  This makes `broken` strictly more powerful than `meta.badPlatforms`.  However `meta.availableOn` currently examines only `meta.platforms` and `meta.badPlatforms`, so `meta.broken` does not influence the default values for optional dependencies.