2020-04-24 23:36:52 +00:00
|
|
|
# To use this for hacking of your Yi config file, drop into a shell
|
|
|
|
# with env attribute.
|
2021-01-15 22:18:51 +00:00
|
|
|
{ lib, stdenv, makeWrapper
|
2020-04-24 23:36:52 +00:00
|
|
|
, haskellPackages
|
|
|
|
, extraPackages ? (s: [])
|
|
|
|
}:
|
|
|
|
let
|
|
|
|
yiEnv = haskellPackages.ghcWithPackages
|
|
|
|
(self: [ self.yi ] ++ extraPackages self);
|
|
|
|
in
|
|
|
|
stdenv.mkDerivation {
|
|
|
|
pname = "yi-custom";
|
|
|
|
version = "0.0.0.1";
|
|
|
|
dontUnpack = true;
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
|
|
|
|
buildCommand = ''
|
|
|
|
mkdir -p $out/bin
|
|
|
|
makeWrapper ${haskellPackages.yi}/bin/yi $out/bin/yi \
|
|
|
|
--set NIX_GHC ${yiEnv}/bin/ghc
|
|
|
|
'';
|
|
|
|
|
|
|
|
# For hacking purposes
|
|
|
|
passthru.env = yiEnv;
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Allows Yi to find libraries and the compiler easily";
|
|
|
|
# This wrapper and wrapper only is under PD
|
|
|
|
license = licenses.publicDomain;
|
|
|
|
maintainers = with maintainers; [ ];
|
2022-12-28 21:21:41 +00:00
|
|
|
|
|
|
|
# dependency yi-language no longer builds
|
|
|
|
hydraPlatforms = lib.platforms.none;
|
|
|
|
broken = true;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|