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

nnn: add withIcon/withNerdIcon options #110053

Merged
merged 1 commit into from Jan 20, 2021
Merged

nnn: add withIcon/withNerdIcon options #110053

merged 1 commit into from Jan 20, 2021

Conversation

thiagokokada
Copy link
Contributor

@thiagokokada thiagokokada commented Jan 20, 2021

Motivation for this change

This allows nnn to be build with either Terminal icons (either icons-on-terminal, that does not seem to be package in Nixpkgs yet, or by installing all fonts separately) or Nerd Fonts icons support.

Partially fixes #99822.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • 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 nixpkgs-review --run "nixpkgs-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)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

Comment on lines 30 to 31
] ++ optional withIcons [ "O_ICONS=1" ]
++ optional withNerdIcons [ "O_NERD=1" ];
Copy link
Contributor Author

Choose a reason for hiding this comment

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

nnn seems to have many more compile options: https://github.com/jarun/nnn/blob/master/Makefile#L14-L27. So maybe it would be better to have a extraMakeFlags instead.

I still end with this approach since this allowed me to do some assertions (if O_ICONS and O_NERD is both passed at the same time O_ICONS has preference and there is no warning or anything). And I think those two options is the most used by users (for example, in AUR there are three nnn packages, one for git, other for icons and other for nerd: https://aur.archlinux.org/packages/?O=0&K=nnn).

@thiagokokada
Copy link
Contributor Author

Result of nixpkgs-review pr 110053 run on x86_64-linux 1

This allows nnn to be build with either Terminal icons or Nerd Fonts
icons support.
@SuperSandro2000
Copy link
Member

Do you know why there are no rebuilds?

@thiagokokada
Copy link
Contributor Author

Do you know why there are no rebuilds?

The defaults didn't change.

@SuperSandro2000 SuperSandro2000 merged commit ac27523 into NixOS:master Jan 20, 2021
@thiagokokada thiagokokada deleted the add-icons-to-nnn branch January 20, 2021 14:16
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.

nnn fm plugins and icons feature
2 participants