From 9eaee3fd54aadd602389e0aa8373ab146b49bdca Mon Sep 17 00:00:00 2001
From: Mateusz Kowalczyk <fuuzetsu@fuuzetsu.co.uk>
Date: Fri, 24 Oct 2014 14:36:08 +0100
Subject: [PATCH] haskell-yi-custom: use NIX_* vars for nicer wrap

According to @bennofs , this should now work regardless of what kind of
mess the user is in.
---
 pkgs/applications/editors/yi/yi-custom.nix | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/pkgs/applications/editors/yi/yi-custom.nix b/pkgs/applications/editors/yi/yi-custom.nix
index 894080eb901..3dbd4611998 100644
--- a/pkgs/applications/editors/yi/yi-custom.nix
+++ b/pkgs/applications/editors/yi/yi-custom.nix
@@ -26,8 +26,8 @@ cabal.mkDerivation (self: rec {
 
   postInstall = ''
     makeWrapper ${yi}/bin/yi $out/bin/yi \
-      --prefix PATH : ${wrappedGhc}/bin \
-      --suffix GHC_PACKAGE_PATH : $(find ${wrappedGhc} -name '*installedconf' | tr \\n :)
+      --set NIX_GHC ${wrappedGhc}/bin/ghc \
+      --set NIX_GHC_LIBDIR ${wrappedGhc}/lib/ghc-${self.ghc.version}
   '';
   meta = {
     homepage = "http://haskell.org/haskellwiki/Yi";