Skip to content
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

Package 'yi' is broken #28248

Closed
chris-martin opened this issue Aug 14, 2017 · 13 comments
Closed

Package 'yi' is broken #28248

chris-martin opened this issue Aug 14, 2017 · 13 comments
Labels
0.kind: regression Something that worked before working no longer 6.topic: haskell

Comments

@chris-martin
Copy link
Contributor

nix-env -i yi

Unstable:

configuring
configureFlags: --verbose --prefix=/nix/store/552v9wmqci5dkk9vmljl8xp7vc8c01iq-yi-0.14.1 --libdir=$prefix/lib/$compiler --libsubdir=$pkgid --docdir=/nix/store/7i4fjxrj22gpcmpjdvx0p10nl1shv7jv-yi-0.14.1-doc/share/doc --with-gcc=gcc --package-db=/tmp/nix-build-yi-0.14.1.drv-0/package.conf.d --ghc-option=-optl=-Wl,-rpath=/nix/store/552v9wmqci5dkk9vmljl8xp7vc8c01iq-yi-0.14.1/lib/ghc-8.0.2/yi-0.14.1 --ghc-option=-j1 --disable-split-objs --disable-library-profiling --disable-profiling --enable-shared --disable-coverage --enable-library-vanilla --enable-executable-dynamic --enable-tests --ghc-option=-split-sections -fpango -fvty
Configuring yi-0.14.1...
Setup: Encountered missing dependencies:
yi-core >=0.14.1,
yi-misc-modes >=0.14.1,
yi-mode-haskell >=0.14.1,
yi-mode-javascript >=0.14.1
builder for ‘/nix/store/xv0g9bwnpkkj061nz651pbzh38w2pc0k-yi-0.14.1.drv’ failed with exit code 1
cannot build derivation ‘/nix/store/2spv7379wvxgf5mgm8aphp97kjx2rkb9-yi-custom.drv’: 1 dependencies couldn't be built
error: build of ‘/nix/store/2spv7379wvxgf5mgm8aphp97kjx2rkb9-yi-custom.drv’ failed

17.03:

configuring
configureFlags: --verbose --prefix=/nix/store/d642y8j935rlkpa5zb2786y49bhbfrdm-yi-0.14.0 --libdir=$prefix/lib/$compiler --libsubdir=$pkgid --with-gcc=gcc --package-db=/tmp/nix-build-yi-0.14.0.drv-0/package.conf.d --ghc-option=-optl=-Wl,-rpath=/nix/store/d642y8j935rlkpa5zb2786y49bhbfrdm-yi-0.14.0/lib/ghc-8.0.2/yi-0.14.0 --ghc-option=-j1 --disable-split-objs --disable-library-profiling --disable-profiling --enable-shared --disable-coverage --enable-library-vanilla --enable-executable-dynamic --enable-tests --ghc-option=-split-sections -fpango -fvty
Configuring yi-0.14.0...
Setup: Encountered missing dependencies:
yi-core >=0.14.0,
yi-misc-modes >=0.14.0,
yi-mode-haskell >=0.14.0,
yi-mode-javascript >=0.14.0
builder for ‘/nix/store/1d4akgb89m1jrmcs1dkmjbzl5j7cghqg-yi-0.14.0.drv’ failed with exit code 1
cannot build derivation ‘/nix/store/bj1whah4sg57gzynaviy4adikwfki66g-yi-custom.drv’: 1 dependencies couldn't be built
error: build of ‘/nix/store/bj1whah4sg57gzynaviy4adikwfki66g-yi-custom.drv’ failed
@chris-martin
Copy link
Contributor Author

I'm told this can be fixed with a handful of Haskell package overrides. https://twitter.com/taktoa1/status/896915704804290560

@taktoa
Copy link
Member

taktoa commented Aug 14, 2017

For posterity:

yi-core            = super.yi-core_0_14_0;
yi-frontend-vty    = super.yi-frontend-vty_0_14_0;
yi-fuzzy-open      = super.yi-fuzzy-open_0_14_0;
yi-ireader         = super.yi-ireader_0_14_0;
yi-keymap-cua      = super.yi-keymap-cua_0_14_0;
yi-keymap-emacs    = super.yi-keymap-emacs_0_14_0;
yi-keymap-vim      = super.yi-keymap-vim_0_14_0;
yi-language        = super.yi-language_0_14_0;
yi-misc-modes      = super.yi-misc-modes_0_14_0;
yi-mode-haskell    = super.yi-mode-haskell_0_14_0;
yi-mode-javascript = super.yi-mode-javascript_0_14_0;
yi-snippet         = super.yi-snippet_0_14_0;

@copumpkin copumpkin added 0.kind: regression Something that worked before working no longer 6.topic: haskell labels Aug 14, 2017
@thomastjeffery
Copy link

Is this because Nix derivations ignore that versions are a thing that exists?

How do you go about using these "overrides"?

@taktoa
Copy link
Member

taktoa commented Sep 26, 2017

@thomastjeffery

haskellPackages.override {
  overrides = self: super: {
    yi-core            = super.yi-core_0_14_0;
    yi-frontend-vty    = super.yi-frontend-vty_0_14_0;
    yi-fuzzy-open      = super.yi-fuzzy-open_0_14_0;
    yi-ireader         = super.yi-ireader_0_14_0;
    yi-keymap-cua      = super.yi-keymap-cua_0_14_0;
    yi-keymap-emacs    = super.yi-keymap-emacs_0_14_0;
    yi-keymap-vim      = super.yi-keymap-vim_0_14_0;
    yi-language        = super.yi-language_0_14_0;
    yi-misc-modes      = super.yi-misc-modes_0_14_0;
    yi-mode-haskell    = super.yi-mode-haskell_0_14_0;
    yi-mode-javascript = super.yi-mode-javascript_0_14_0;
    yi-snippet         = super.yi-snippet_0_14_0;
  };
}

@thomastjeffery
Copy link

Where does this magical code go?

@taktoa
Copy link
Member

taktoa commented Sep 26, 2017

It can go in various places, but the easiest is to add this to ~/.config/nixpkgs/config.nix:

{
  packageOverrides = pkgs: {
    haskellPackages = pkgs.haskellPackages.override {
      overrides = self: super: {
        yi-core            = super.yi-core_0_14_0;
        yi-frontend-vty    = super.yi-frontend-vty_0_14_0;
        yi-fuzzy-open      = super.yi-fuzzy-open_0_14_0;
        yi-ireader         = super.yi-ireader_0_14_0;
        yi-keymap-cua      = super.yi-keymap-cua_0_14_0;
        yi-keymap-emacs    = super.yi-keymap-emacs_0_14_0;
        yi-keymap-vim      = super.yi-keymap-vim_0_14_0;
        yi-language        = super.yi-language_0_14_0;
        yi-misc-modes      = super.yi-misc-modes_0_14_0;
        yi-mode-haskell    = super.yi-mode-haskell_0_14_0;
        yi-mode-javascript = super.yi-mode-javascript_0_14_0;
        yi-snippet         = super.yi-snippet_0_14_0;
      };
    };
  };
}

@thomastjeffery
Copy link

OK, that mostly worked, except now I have the missing dependency:

yi-rope >=0.7.0.0 && <0.9

A quick search of the huge generated hackage-packages.nix shows that yi-rope is version 0.9, and yi-rope_0_10 is 0.10.

Is there a way I can get <0.9?

@taktoa
Copy link
Member

taktoa commented Sep 26, 2017

Which package has that missing dependency? Also, for future questions like this, I recommend asking on #nixos on FreeNode.

@thomastjeffery
Copy link

Thanks for the help!

I probably should have mentioned, I'm using NixOS 17.09.

The package dependent on yi-rope is yi-core-0.15.0.

Specifically, version 0.15.0 is incompatible with yi-rope >=0.9.

I tried again using the master channel instead of 17.09, and had the overrides point to package_16_0, and added the override yi-rope-0_10.

my ~/.config/nixpkgs/config.nix now looks like:

{
  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;
      };
    };
  };
}

I'll let you know if this build works.

I still think it's ridiculous that we even have version numbers in package names in the first place. It's a messy and confusing workaround.

@thomastjeffery
Copy link

That seems to have worked!

@noughtmare
Copy link

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.

See yi-editor/yi-editor.github.com#21 (comment)

@matthewbauer
Copy link
Member

/cc @chris-martin
I think this has been fixed in latest unstable

@chris-martin
Copy link
Contributor Author

Confirmed, working in unstable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0.kind: regression Something that worked before working no longer 6.topic: haskell
Projects
None yet
Development

No branches or pull requests

6 participants