-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Nix install instructions are outdated/wrong/confusing. #21
Comments
This is not needed by the static configs (which are recommended). They can be placed anywhere you want. I think the overrides wouldn't have to be added if we would specify version bounds in the cabal files of the example-configs (which is probably a good idea anyway). What errors do you get when you don't specify these overrides in your Finally, I have seen somewhere that stack is also capable of using nix, so you should be able to run |
This is true, but it works for both. I wanted to be succinct. That is explained in the
Nix will try to build the package, and ghc will complain that it can't find the dependencies. This is explained in more detail here
This is explicitly what I do not want to do. I don't know what files |
I've changed my own config so that it now build with nix:
This should work without any overrides. |
That works for me, even using |
I think the explicit bounds on the versions of the dependencies helped in this case, so I will also try to fix the example-configs when I have the time. |
I found another terrible problem, yi-dynamic-configuration is version 0.16.0 on nixpkgs, and the rest of the yi related packages are still on 0.14 so that causes major breakage, because yi-dynamic-configuration-0.16.0 requires yi-core-0.16.0 which is not included in the nixpkgs. So every dynamic configuration is broken on nix. |
Using the example configs from yi-editor/yi#1043 should also work now (except for the dynamic configs). |
My first comment was just how to get an example config to build using Nix. Here is how to start hacking on Hacking Yi with NixHere are the steps to set up a build environment using Nix for hacking Yi:
mkdir yi-source
cd yi-source
git clone https://github.com/yi-editor/yi
git clone https://github.com/yi-rope
cd yi
for f in yi-*
do
cd $f
nix-shell -p cabal2nix --command "cabal2nix . > default.nix"
cd ..
done
cd ../yi-rope
nix-shell -p cabal2nix --command "cabal2nix . > default.nix"
Note that I have both let yi-source-root = ~/yi-source/yi;
yi-rope-source = ~/yi-source/yi-rope;
in
{
packageOverrides = pkgs: {
haskellPackages = pkgs.haskellPackages.override {
overrides = self: super: {
yi-core = self.callPackage (yi-source-root + /yi-core/default.nix) {};
yi-frontend-vty = self.callPackage (yi-source-root + /yi-frontend-vty/default.nix) {};
yi-frontend-pango = self.callPackage (yi-source-root + /yi-frontend-pango/default.nix) {};
yi-fuzzy-open = self.callPackage (yi-source-root + /yi-fuzzy-open/default.nix) {};
yi-ireader = self.callPackage (yi-source-root + /yi-ireader/default.nix) {};
yi-keymap-cua = self.callPackage (yi-source-root + /yi-keymap-cua/default.nix) {};
yi-keymap-emacs = self.callPackage (yi-source-root + /yi-keymap-emacs/default.nix) {};
yi-keymap-vim = self.callPackage (yi-source-root + /yi-keymap-vim/default.nix) {};
yi-language = self.callPackage (yi-source-root + /yi-language/default.nix) {};
yi-misc-modes = self.callPackage (yi-source-root + /yi-misc-modes/default.nix) {};
yi-mode-haskell = self.callPackage (yi-source-root + /yi-mode-haskell/default.nix) {};
yi-mode-javascript = self.callPackage (yi-source-root + /yi-mode-javascript/default.nix) {};
yi-snippet = self.callPackage (yi-source-root + /yi-snippet/default.nix) {};
yi-rope = self.callPackage (yi-rope-source + /default.nix) {};
};
};
};
} Now you should be able to build To test this, you can type nix-shell -p yi and Nix will build the default configuration from your newly overridden packages, resulting in a shell with your new You can also build your config just like before, but now Nix will use your overridden packages. |
It should probably also be mentioned that the *.cabal files need to be generated with hpack. Also you could probably override the packages in the .nix file of your own config instead of in the global config.nix file. |
The information here is confusing, convoluted, and doesn't seem to work.
The real way to build
yi
with NixTo build
yi
in Nix, here is what you currently can do:yi
will build at allPut the following in your
~/.config/nixpkgs/config.nix
:If you don't do this, nix will complain that it has missing dependencies.
~/.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
.yi
You need to use nix-shell, so
yi
can rebuild the configuration you made.The text was updated successfully, but these errors were encountered: