toipe icon indicating copy to clipboard operation
toipe copied to clipboard

Make toipe installable through various packages managers

Open Samyak2 opened this issue 2 years ago • 14 comments

What and why?

Currently, toipe has to be installed either by downloading the binary directly from the releases or using cargo. It would be nice to have it installable through built-in package managers.

How?

Some package managers that I want to target (having no idea how to do so or how involved these processes are):

  • [x] Nix
  • [ ] AUR
  • [ ] Fedora's core repo (to make it install through dnf)
    • [ ] Maybe OpenSUSE too
  • [ ] Debian
  • [ ] Flatpak (does this make sense for a CLI app?)
  • [ ] Homebrew

Samyak2 avatar Apr 04 '22 10:04 Samyak2

I just opened a PR this morning to add toipe to nixpkgs.

loicreynier avatar Apr 04 '22 10:04 loicreynier

I think you can build for many at once with https://build.opensuse.org/ which is using https://openbuildservice.org/

nnn uses it https://software.opensuse.org//download.html?project=home%3Astig124%3Annn&package=nnn

David-Else avatar Apr 04 '22 15:04 David-Else

I just opened a PR this morning to add toipe to nixpkgs.

@loicreynier thanks a lot! :o

Although, I would be interested in knowing how this would be maintained. What happens when I release a new version of toipe? Do I have to make a new PR update the version number and the hashes? Also, what would be required to enable support for the other platforms (aarch64 and darwin)?

Sorry for asking so many questions :)

Samyak2 avatar Apr 04 '22 17:04 Samyak2

I think you can build for many at once with https://build.opensuse.org/ which is using https://openbuildservice.org/

nnn uses it https://software.opensuse.org//download.html?project=home%3Astig124%3Annn&package=nnn

I have used it before (as a user, not a developer) and I don't like the fact that I have to add a separate repo just for this tool. I personally wouldn't install a typing test app if it requires adding a new repo to my package manager.


I looked at nnn and it appears that they have published direct packages to debian, fedora (and probably others) too - https://packages.debian.org/sid/source/nnn, https://src.fedoraproject.org/rpms/nnn

Samyak2 avatar Apr 04 '22 18:04 Samyak2

The official nnn package is from https://build.opensuse.org/ , you can see from the release notes: https://github.com/jarun/nnn/releases/tag/v4.4

PS: Distro-specific auto-generated packages for this release are available on OBS. For openSUSE, you can get the packages from the official repositories too.

I would also get the Fedora official one if I were you, just for the convenience of not having to add another repo. They will be pretty much identical anyway, and both from trusted secure sources.

David-Else avatar Apr 04 '22 18:04 David-Else

The official nnn package is from https://build.opensuse.org/ , you can see from the release notes: https://github.com/jarun/nnn/releases/tag/v4.4

Ah I see. The ones on debian and fedora are maintained by someone else then?

I would also get the Fedora official one if I were you, just for the convenience of not having to add another repo. They will be pretty much identical anyway, and both from trusted secure sources.

Yeah, I'll try to get an official package for Fedora. Making RPMs can't be that hard :p

Thanks for your suggestions!

Samyak2 avatar Apr 04 '22 18:04 Samyak2

Although, I would be interested in knowing how this would be maintained. What happens when I release a new version of toipe? Do I have to make a new PR update the version number and the hashes? Also, what would be required to enable support for the other platforms (aarch64 and darwin)?

Exactly, when a new version is uploaded, a new PR updating the version number and hashes is required. Thanks to the fetchCrate helper nothing more is required. I will not be surprised if in the future, this process is automated. Since I created the initial PR, I will be the package maintainer but I can add you if you want. In any case, I can keep the package up to date on the Nix side.

loicreynier avatar Apr 04 '22 19:04 loicreynier

Since I created the initial PR, I will be the package maintainer but I can add you if you want.

Yes, I would prefer if you can add me too. Here are my details in maintainers-list.nix format:

    samyak = {
      name = "Samyak Sarnayak";
      email = "[email protected]";
      # Optional
      github = "Samyak2";
      githubId = 34161949;
      keys = [{
        longkeyid = "rsa4096/0x365873F2F0C6153B";
        fingerprint = "155C F413 0129 C058 9A5F  5524 3658 73F2 F0C6 153B";
      }];
    };

In any case, I can keep the package up to date on the Nix side.

That would be great! Thank you :D

Samyak2 avatar Apr 05 '22 05:04 Samyak2

I added you as a maintainer, I will let you know when the PR is accepted. You should receive a notification anyway.

loicreynier avatar Apr 05 '22 07:04 loicreynier

toipe merge request in nixpkgs has just been accepted!

loicreynier avatar Apr 09 '22 14:04 loicreynier

toipe merge request in nixpkgs has just been accepted!

Yay!

I'll open a PR to upgrade it to v0.4.0

Samyak2 avatar Apr 11 '22 10:04 Samyak2

Here it is: https://github.com/NixOS/nixpkgs/pull/168263

Samyak2 avatar Apr 11 '22 11:04 Samyak2