From b39e491eb521d93ae983bc63b10efad3d147a9cd Mon Sep 17 00:00:00 2001
From: Thomas Tuegel <ttuegel@mailbox.org>
Date: Sat, 25 Feb 2017 18:58:53 -0600
Subject: [PATCH] lib.makeScope: Save package set function

---
 lib/customisation.nix | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/lib/customisation.nix b/lib/customisation.nix
index bedb91af7735..a6c24f083a5b 100644
--- a/lib/customisation.nix
+++ b/lib/customisation.nix
@@ -177,9 +177,10 @@ rec {
     let self = f self // {
           newScope = scope: newScope (self // scope);
           callPackage = self.newScope {};
-          override = g: makeScope newScope (self_:
-            let super = f self_;
-            in super // g super self_);
+          override = g:
+            makeScope newScope
+            (self_: let super = f self_; in super // g super self_);
+          packages = f;
         };
     in self;