diff options
Diffstat (limited to 'nixpkgs/pkgs/applications/editors/yi/wrapper.nix')
-rw-r--r-- | nixpkgs/pkgs/applications/editors/yi/wrapper.nix | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/applications/editors/yi/wrapper.nix b/nixpkgs/pkgs/applications/editors/yi/wrapper.nix new file mode 100644 index 000000000000..a7456590ab81 --- /dev/null +++ b/nixpkgs/pkgs/applications/editors/yi/wrapper.nix @@ -0,0 +1,33 @@ +# To use this for hacking of your Yi config file, drop into a shell +# with env attribute. +{ lib, stdenv, makeWrapper +, 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; + + meta = with 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; [ ]; + }; + +} |