mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-05 13:23:17 +00:00
46420bbaa3
treewide replacement of stdenv.mkDerivation rec { name = "*-${version}"; version = "*"; to pname
34 lines
818 B
Nix
34 lines
818 B
Nix
# 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 rec {
|
|
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
|
|
env = yiEnv;
|
|
|
|
meta = with stdenv.lib; {
|
|
description = "Allows Yi to find libraries and the compiler easily";
|
|
# This wrapper and wrapper only is under PD
|
|
license = licenses.publicDomain;
|
|
maintainers = with maintainers; [ fuuzetsu ];
|
|
};
|
|
|
|
}
|