l4l / yofi

yofi is a minimalistic menu for wayland
https://crates.io/crates/yofi
MIT License
375 stars 21 forks source link

[BUG] Flake nix run fails on NixOS + [Features] add direnv support, update flake #155

Closed RaySlash closed 6 months ago

RaySlash commented 10 months ago

Hi,

I was testing out the app launcher and surfing through the code but found one bug related to flake. Also, I was messing with flake made me update it.

Bug

I found that I was not able to run nix run to get the app launcher working. Also, in my first attempt, I was thrown an error saying

$ notify-send: command not found

I am running NixOS 23.04 and can confirm that this works after adding the libnotify package as a dependency in the flake. I have spun up a fork of this repository and updated the flake for now.

Features

The feature updates include a .envrc file which helps to use direnv after allowing the cloned directory using direnv allow (nix-direnv). Additionally, I updated the cargo lock using cargo update which demanded me to bump up the rust tool-chain version from 1.64 to 1.65. I have these changes currently pushed in my Forked Respository. The purpose of this issue was to confirm if the changes are done valuable to be a PR. Let me know if you would like to see something different. Thanks

l4l commented 10 months ago

Could be so, I don't use flake myself so it might be out of date. But notify-send should not be a problem, its result code is not used anywhere:

https://github.com/l4l/yofi/blob/c0ca3365a702e7a2852a801ca357df5eb87d0cf9/src/main.rs#L274-L282

RaySlash commented 9 months ago

Could be so, I don't use flake myself so it might be out of date.

Oh I see. Ill try to send a PR updating the flake. also, ill add a GitHub workflow to send PRs to update the lock file automatically periodically.

But notify-send should not be a problem, its result code is not used anywhere

Okay. I was being thrown this error when the config can not be loaded and app panicked. Do you plan to remove it completely from the codebase? Thank you.

EDIT: I am also trying to package this application for NixOS. That seems more valuable first step rather than updating flake. Ill work on flake afterwards.

RaySlash commented 6 months ago

@zachcoyle Thank you for fixing the flake. The direnv stuff is really not needed. I got carried away with other stuff. I just made a nixpkgs PR for yofi. You can review if you would like to. I believe that makes it more accessible for users in nix. 😄

https://github.com/NixOS/nixpkgs/pull/308481