mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-05 05:13:04 +00:00
33d52b37f3
Now pkgs.yi is the package to use and override
30 lines
660 B
Nix
30 lines
660 B
Nix
# Note: this relies on dyre patched for NIX_GHC which is done in
|
|
# haskell-ng only.
|
|
#
|
|
# 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
|
|
stdenv.mkDerivation {
|
|
name = "yi-custom";
|
|
version = "0.0.0.1";
|
|
unpackPhase = "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
|
|
env = yiEnv;
|
|
|
|
}
|