Unverified Commit 161f6dbf authored by Naïm Favier's avatar Naïm Favier Committed by GitHub
Browse files

Merge pull request #204840 from ncfavier/check-meta-deep

parents 91e936ef 4af22aab
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -63,7 +63,7 @@ You should prefer `overrideAttrs` in almost all cases, see its documentation for
:::

::: {.warning}
Do not use this function in Nixpkgs as it evaluates a Derivation before modifying it, which breaks package abstraction and removes error-checking of function arguments. In addition, this evaluation-per-function application incurs a performance penalty, which can become a problem if many overrides are used. It is only intended for ad-hoc customisation, such as in `~/.config/nixpkgs/config.nix`.
Do not use this function in Nixpkgs as it evaluates a derivation before modifying it, which breaks package abstraction. In addition, this evaluation-per-function application incurs a performance penalty, which can become a problem if many overrides are used. It is only intended for ad-hoc customisation, such as in `~/.config/nixpkgs/config.nix`.
:::

The function `overrideDerivation` creates a new derivation based on an existing one by overriding the original's attributes with the attribute set produced by the specified function. This function is available on all derivations defined using the `makeOverridable` function. Most standard derivation-producing functions, such as `stdenv.mkDerivation`, are defined using this function, which means most packages in the nixpkgs expression, `pkgs`, have this function.
+9 −1
Original line number Diff line number Diff line
@@ -27,11 +27,19 @@ rec {
     For another application, see build-support/vm, where this
     function is used to build arbitrary derivations inside a QEMU
     virtual machine.

     Note that in order to preserve evaluation errors, the new derivation's
     outPath depends on the old one's, which means that this function cannot
     be used in circular situations when the old derivation also depends on the
     new one.

     You should in general prefer `drv.overrideAttrs` over this function;
     see the nixpkgs manual for more information on overriding.
  */
  overrideDerivation = drv: f:
    let
      newDrv = derivation (drv.drvAttrs // (f drv));
    in lib.flip (extendDerivation true) newDrv (
    in lib.flip (extendDerivation (builtins.seq drv.drvPath true)) newDrv (
      { meta = drv.meta or {};
        passthru = if drv ? passthru then drv.passthru else {};
      }
+4 −2
Original line number Diff line number Diff line
@@ -289,7 +289,9 @@ rec {
       (This means fn is type Val -> String.) */
    allowPrettyValues ? false,
    /* If this option is true, the output is indented with newlines for attribute sets and lists */
    multiline ? true
    multiline ? true,
    /* Initial indentation level */
    indent ? ""
  }:
    let
    go = indent: v: with builtins;
@@ -348,7 +350,7 @@ rec {
                };") v)
        + outroSpace + "}"
    else abort "generators.toPretty: should never happen (v = ${v})";
  in go "";
  in go indent;

  # PLIST handling
  toPlist = {}: v: let
+1 −1
Original line number Diff line number Diff line
@@ -17,7 +17,7 @@ let
      homepage    = "https://keepass.info/plugins.html#otpkeyprov";
      platforms   = with lib.platforms; linux;
      license     = lib.licenses.gpl2;
      maintainers = [ lib.maintainers.ente ];
      maintainers = [ lib.maintainers.Enteee ];
    };

    pluginFilename = "OtpKeyProv.plgx";
+1 −1
Original line number Diff line number Diff line
@@ -47,7 +47,7 @@ stdenv.mkDerivation rec {
    license = licenses.gpl2;
    platforms = platforms.linux;
    maintainers = with maintainers; [ pmiddend ];
    badPlatforms = [ platforms.aarch64 ];
    badPlatforms = platforms.aarch64;
    # never built on aarch64-linux since first introduction in nixpkgs
    broken = stdenv.isLinux && stdenv.isAarch64;
  };
Loading