2015-04-15 20:31:17 +00:00
|
|
|
# To use this for hacking of your Yi config file, drop into a shell
|
|
|
|
# with env attribute.
|
2021-01-11 07:54:33 +00:00
|
|
|
{ lib, stdenv, makeWrapper
|
2015-04-15 20:31:17 +00:00
|
|
|
, haskellPackages
|
|
|
|
, extraPackages ? (s: [])
|
|
|
|
}:
|
|
|
|
let
|
|
|
|
yiEnv = haskellPackages.ghcWithPackages
|
|
|
|
(self: [ self.yi ] ++ extraPackages self);
|
|
|
|
in
|
2019-08-13 21:52:01 +00:00
|
|
|
stdenv.mkDerivation {
|
2019-08-15 12:41:18 +00:00
|
|
|
pname = "yi-custom";
|
2015-04-15 20:31:17 +00:00
|
|
|
version = "0.0.0.1";
|
2019-06-19 15:45:34 +00:00
|
|
|
dontUnpack = true;
|
2015-04-15 20:31:17 +00: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
|
2019-11-09 23:52:53 +00:00
|
|
|
passthru.env = yiEnv;
|
2015-04-15 20:31:17 +00:00
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2015-04-28 08:54:58 +00:00
|
|
|
description = "Allows Yi to find libraries and the compiler easily";
|
2015-04-15 20:36:06 +00:00
|
|
|
# This wrapper and wrapper only is under PD
|
|
|
|
license = licenses.publicDomain;
|
2019-12-05 07:29:48 +00:00
|
|
|
maintainers = with maintainers; [ ];
|
2015-04-15 20:36:06 +00:00
|
|
|
};
|
|
|
|
|
2015-04-15 20:31:17 +00:00
|
|
|
}
|