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

oh-my-fish: init at 6 #42458

Closed
wants to merge 1 commit into from
Closed

Conversation

KiaraGrouwstra
Copy link
Contributor

@KiaraGrouwstra KiaraGrouwstra commented Jun 23, 2018

Motivation for this change

more packages!

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Fits CONTRIBUTING.md.

This is my first package, and I looked at oh-my-zsh for inspiration.

However, I'm not quite content at similarly handling the ~/.config dotfiles the way I did now.
I'd appreciate pointers on a more idiomatic approach there.

Right now, I'm not sure when longDescription prints, because for me it didn't on install.

I'm unhappy about the fish line as well, as it looks like it should be run afterwards as well, though I'd prefer to minimize manual involvement...

@infinisil
Copy link
Member

What your current derivation does is just copy the oh-my-fish source into the output, which doesn't work very well if anybody wants to actually use it.

Reading the oh-my-fish Readme I see there's an install script in bin/install which has an offline mode. I think wrapping this script with the --offline flag and the env vars for it to work would be best fit for nixpkgs, or maybe just set the env var to point to the package source, so non-offline mode still works. This wrapped install script should then be named something like oh-my-fish-install and put into $out/bin so that it is available on installation of the package. All the files oh-my-fish needs should also be in $out for it to find.

And some pointers on the current code: Use fetchFromGitHub, pathsToLink doesn't do anything in derivations, don't assign phases directly, the long description isn't a place to put installation instructions but rather thought for a description of the package.

@KiaraGrouwstra
Copy link
Contributor Author

@infinisil: Thank you for your feedback!
I've adjusted it to use fetchFromGitHub and ditch pathsToLink / phases.

The OMF install script copies / backs up some dotfiles, which (in my limited experience) seemed problematic given install phase $HOME pointed to /homeless_shelter.
Any ideas on that?

@KiaraGrouwstra KiaraGrouwstra changed the title oh-my-fish: init at 2018-06-23 oh-my-fish: init at 6 Jun 24, 2018
@infinisil
Copy link
Member

I mean to put it into $out/bin for the runtime, so that the install script can be run by the user who needs to install it. I see you put the install instructions into longDescription, but do these really set up everything you need? https://github.com/oh-my-fish/oh-my-fish/blob/master/bin/install seems to do a lot not mentioned in your instructions. So imo it would be best to package that install script properly to handle that. (I won't comment on the code for now, which would need some adjustments as well).

Copy link
Member

@ryantm ryantm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please answer Infinisil's questions

@KiaraGrouwstra
Copy link
Contributor Author

Thanks @ryantm, looks like I missed this somehow.

put it into $out/bin for the runtime, so that the install script can be run by the user who needs to install it.

This sounds like a reasonable improvement over my progress.
The original installation procedure though was a one-liner.
Now I wonder, if that isn't automated yet, could it still add much value over the original?

@mmahut
Copy link
Member

mmahut commented May 20, 2019

@tycho01 any update on this?

@KiaraGrouwstra
Copy link
Contributor Author

@mmahut sorry I haven't tried much anymore. feel free to pick it up if you'd like.

@mmahut
Copy link
Member

mmahut commented May 20, 2019

@mmahut sorry I haven't tried much anymore. feel free to pick it up if you'd like.

@tycho01 Thank you, but I'm not interested, just cleaning up the pull request a bit. Do you mind closing this one if you do not place to continue? Thank you.

@ryantm ryantm closed this May 20, 2019
@KiaraGrouwstra
Copy link
Contributor Author

fair enough.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants