Open
Description
The information here is confusing, convoluted, and doesn't seem to work.
The real way to build yi
with Nix
To build yi
in Nix, here is what you currently can do:
- Set up package overrides in Nix, so
yi
will build at all
Put the following in your~/.config/nixpkgs/config.nix
:
{
packageOverrides = pkgs: {
haskellPackages = pkgs.haskellPackages.override {
overrides = self: super: {
yi-core = super.yi-core_0_16_0;
yi-frontend-vty = super.yi-frontend-vty_0_16_0;
yi-fuzzy-open = super.yi-fuzzy-open_0_16_0;
yi-ireader = super.yi-ireader_0_16_0;
yi-keymap-cua = super.yi-keymap-cua_0_16_0;
yi-keymap-emacs = super.yi-keymap-emacs_0_16_0;
yi-keymap-vim = super.yi-keymap-vim_0_16_0;
yi-language = super.yi-language_0_16_0;
yi-misc-modes = super.yi-misc-modes_0_16_0;
yi-mode-haskell = super.yi-mode-haskell_0_16_0;
yi-mode-javascript = super.yi-mode-javascript_0_16_0;
yi-snippet = super.yi-snippet_0_16_0;
yi-rope = super.yi-rope_0_10;
};
};
};
}
If you don't do this, nix will complain that it has missing dependencies.
- Copy an example config to the right place
$ cp yi-editor/yi/example-configs/yi-config-that-you-want/* ~/.config/yi/
- Go to
~/.config/yi/
, and buildyi
.
You can leave out the-I nixpkgs=https://github.com/NixOS/nixpkgs/archive/master.tar.gz
if you are already using themaster
channel. This will not work on another channel likeNixOS-17.09
.
$ cd ~/.config/yi/
$ nix-shell -p cabal2nix -I nixpkgs=https://github.com/NixOS/nixpkgs/archive/master.tar.gz
[nix-shell]$ cabal2nix . > default.nix
[nix-shell]$ cabal2nix --shell . > shell.nix
[nix-shell]$ exit
$ nix-build shell.nix -I nixpkgs=https://github.com/NixOS/nixpkgs/archive/master.tar.gz
- Run
yi
You need to use nix-shell, soyi
can rebuild the configuration you made.
$ nix-shell -I nixpkgs=https://github.com/NixOS/nixpkgs/archive/master.tar.gz
[nix-shell]$ ./result/bin/yi
Metadata
Metadata
Assignees
Labels
No labels