2015-04-15 21:31:17 +01:00
|
|
|
# To use this for hacking of your Yi config file, drop into a shell
|
|
|
|
# with env attribute.
|
|
|
|
{ stdenv, makeWrapper
|
|
|
|
, haskellPackages
|
|
|
|
, extraPackages ? (s: [])
|
|
|
|
}:
|
|
|
|
let
|
|
|
|
yiEnv = haskellPackages.ghcWithPackages
|
|
|
|
(self: [ self.yi ] ++ extraPackages self);
|
|
|
|
in
|
2018-05-28 13:59:57 +01:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "yi-custom-${version}";
|
2015-04-15 21:31:17 +01:00
|
|
|
version = "0.0.0.1";
|
2019-06-19 16:45:34 +01:00
|
|
|
dontUnpack = true;
|
2015-04-15 21:31:17 +01:00
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
|
|
|
|
buildCommand = ''
|
|
|
|
mkdir -p $out/bin
|
|
|
|
makeWrapper ${haskellPackages.yi}/bin/yi $out/bin/yi \
|
|
|
|
--set NIX_GHC ${yiEnv}/bin/ghc
|
|
|
|
'';
|
|
|
|
|
|
|
|
# For hacking purposes
|
|
|
|
env = yiEnv;
|
|
|
|
|
2015-04-15 21:36:06 +01:00
|
|
|
meta = with stdenv.lib; {
|
2015-04-28 09:54:58 +01:00
|
|
|
description = "Allows Yi to find libraries and the compiler easily";
|
2015-04-15 21:36:06 +01:00
|
|
|
# This wrapper and wrapper only is under PD
|
|
|
|
license = licenses.publicDomain;
|
|
|
|
maintainers = with maintainers; [ fuuzetsu ];
|
|
|
|
};
|
|
|
|
|
2015-04-15 21:31:17 +01:00
|
|
|
}
|