mooz / percol

adds flavor of interactive filtering to the traditional pipe concept of UNIX shell
3.3k stars 145 forks source link

Percol marked as broken in Nix #110

Open LoganBarnett opened 4 years ago

LoganBarnett commented 4 years ago

I've been getting an environment stood up using nixpkgs. To my delight I found that I can install packages that normally are part of a language runtime (such as percol). percol even has a Nix package! However it is marked as broken as of writing. This typically stops a nix install of this package or any of its dependents.

The nix file mentions "missing cmigemo package which is missing libmigemo.so" as the direct reason for being marked as broken. I am unfamiliar with the Python ecosystem as well as Nix so I can't really speak to any of that. I'm mostly sharing awareness here and possibly hoping that maybe the information is dated :)

It also mentions that percol doesn't support Python 3. It's not clear if that's a requirement to no longer be marked as broken. I see there's some tickets in the issue tracker about that. I would think with Nix this would be fine conceptually, but I don't see anything in the package that jumps out as demanding Python 2.x (again, I'm unfamiliar with both ecosystems here).

For what it's worth, there is an allowBroken = true value that Nix consumers can set in their configuration to allow the installation to go forward. My limited reading on the topic suggests that the flag is kind of the equivalent of saying the tests don't pass for the package in question.

Thanks for maintaining a very helpful program!

clach04 commented 2 months ago

Cross link https://github.com/mooz/percol/issues/107

Reading code, the migemo dependency in the code is optional, but the setup.py declarrs it mandatory. However, even with the python migemo dependency satisfied, there may not be a shared library (probably why it looks like the code is optional).

Recommend making optional in the setup.py.

clach04 commented 2 months ago

@LoganBarnett I posted PR https://github.com/mooz/percol/pull/115 to make the dependency optional at (pip / setup.py) install time - this is one possible solution. My initial thoughts are you have two options:

  1. Update the nix package to pull down the C library for Japanese regex support - out of scope for this project as that falls under the nix project.
  2. Update the Python package to remove the Japanese regex support from the install install - I think this is reasonable as the support is already optional at run time it just wasn't at install time (and installation does not mean you actually have full support). This could break support for Japanese regex users until they update their dependency to specify they want Japanese support.

Being selfish, this is how I intend to deploy for my use cases. I do not need regex support for Japanese :smile_cat:

LoganBarnett commented 2 months ago

Thanks! I'll give that a shot. I'm not really in a position to represent regular expressions in Japanese, let alone for using it in percol, so that makes sense to me :)