From ce1d740fa6621818b9d9660aeef443b0758ae486 Mon Sep 17 00:00:00 2001
From: Orivej Desh <orivej@gmx.fr>
Date: Wed, 24 Jan 2018 23:06:12 +0000
Subject: [PATCH] addPassthru: fix argument order

addPassthru became unused in #33057, but its signature was changed at the same
time.  This commit restores the original signature and updates the warning and
the changelog.
---
 lib/customisation.nix                      | 5 +++--
 nixos/doc/manual/release-notes/rl-1803.xml | 2 +-
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/lib/customisation.nix b/lib/customisation.nix
index fb78335ea1c2..3988f4e9b690 100644
--- a/lib/customisation.nix
+++ b/lib/customisation.nix
@@ -157,8 +157,9 @@ rec {
 
   /* Add attributes to each output of a derivation without changing
      the derivation itself. */
-  addPassthru = lib.warn "`addPassthru` is deprecated, replace with `extendDerivation true`"
-                         (extendDerivation true);
+  addPassthru =
+    lib.warn "`addPassthru drv passthru` is deprecated, replace with `extendDerivation true passthru drv`"
+      (drv: passthru: extendDerivation true passthru drv);
 
   /* Strip a derivation of all non-essential attributes, returning
      only those needed by hydra-eval-jobs. Also strictly evaluate the
diff --git a/nixos/doc/manual/release-notes/rl-1803.xml b/nixos/doc/manual/release-notes/rl-1803.xml
index 1a146473e23c..beda33f601b3 100644
--- a/nixos/doc/manual/release-notes/rl-1803.xml
+++ b/nixos/doc/manual/release-notes/rl-1803.xml
@@ -133,7 +133,7 @@ following incompatible changes:</para>
   </listitem>
   <listitem>
     <para>
-      <literal>lib.addPassthru</literal> is removed.  Use <literal>lib.extendDerivation true</literal> instead.  <emphasis role="strong">TODO: actually remove it before branching 18.03 off.</emphasis>
+      <literal>lib.addPassthru drv passthru</literal> is removed.  Use <literal>lib.extendDerivation true passthru drv</literal> instead.  <emphasis role="strong">TODO: actually remove it before branching 18.03 off.</emphasis>
     </para>
   </listitem>
   <listitem>