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

hunspellDicts.ro-ro: init at 3.3.10 #313374

Merged
merged 2 commits into from
Jun 6, 2024
Merged

Conversation

Andy3153
Copy link
Member

@Andy3153 Andy3153 commented May 21, 2024

Description of changes

Looking at other dictionary packages in the file I modified and at the PKGBUILD of the Arch Linux version of basically the same package (just to see where to get the dictionary from), I created a package that ships a Romanian dictionary for Hunspell.

Closes #315849

Things done

  • Built on platform(s)
    (not really required, no compilation going on, just downloading a zip file containing no binaries off the internet)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 24.05 Release Notes (or backporting 23.05 and 23.11 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

Add a 👍 reaction to pull requests you find important.

@NixOSInfra NixOSInfra added the 12. first-time contribution This PR is the author's first one; please be gentle! label May 21, 2024
@ofborg ofborg bot added 8.has: package (new) This PR adds a new package 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 1-10 labels May 21, 2024
@Aleksanaa Aleksanaa changed the title add Romanian dictionary for hunspell hunspellDicts.ro-ro: init at 3.3.10 May 21, 2024
Copy link
Member

@Aleksanaa Aleksanaa left a comment

Choose a reason for hiding this comment

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

@Aleksanaa
Copy link
Member

I've updated the title, and you can update commit message yourself.

@Andy3153
Copy link
Member Author

I've updated the title, and you can update commit message yourself.

Currently trying to do that with no success, I was trying to follow this to no avail.

Any advice?

@Aleksanaa
Copy link
Member

See https://docs.github.com/en/pull-requests/committing-changes-to-your-project/creating-and-editing-commits/changing-a-commit-message

Also if you are using lazygit: press "r" on your commit and edit it right away.

@Andy3153
Copy link
Member Author

Done. So I was just not brave enough to use any sort of --force flag on git push.

Also, when will this be in nixpkgs-unstable? Meaning, when can I stop using my nixpkgs fork for this package?

@Andy3153
Copy link
Member Author

@Aleksanaa can this be merged now?

unzip $src ${dictFileName}.aff ${dictFileName}.dic ${readmeFile} -d ${dictFileName}
'';

meta = with lib; {
Copy link
Contributor

Choose a reason for hiding this comment

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

Remove with lib it's antipattern. #208242
You also use with lib.licenses below so it make it even more redundant.

Copy link
Member Author

Choose a reason for hiding this comment

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

Sorry. I was unsure of the code principles, I just followed a couple of other dictionaries I saw in that file. I'll make my code work without it if is needed.

Copy link
Member Author

Choose a reason for hiding this comment

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

Done: 64fc53a

description = "Hunspell dictionary for ${shortDescription} from rospell";
homepage = "https://sourceforge.net/projects/rospell/";
license = with lib.licenses; [ gpl2 lgpl21 mpl11 ];
#maintainers = with maintainers; [ Andy3153 ];
Copy link
Contributor

Choose a reason for hiding this comment

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

You could also remove this line if you don't plan to add yourself as maintainer.

Copy link
Member Author

Choose a reason for hiding this comment

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

I added that at first but then commented it out because I was unsure whether maintainers means package maintainers (me in this case) or maintainer of the program (where my package downloads from). If it means the first one, I'll uncomment that line.

Copy link
Contributor

@heisfer heisfer May 30, 2024

Choose a reason for hiding this comment

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

First one. You need to add yourself to maintainers list if you already haven't in order to add yourself as package maintainer. I recommend creating separate PR for this

Copy link
Member Author

@Andy3153 Andy3153 May 30, 2024

Choose a reason for hiding this comment

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

Done: b6c993a and #315849

@github-actions github-actions bot added the 8.has: maintainer-list (update) This PR changes `maintainers/maintainer-list.nix` label May 30, 2024
@kirillrdy
Copy link
Member

@Andy3153 greetings,

can you change commit order?

maintainers: add Andy3153 needs to happen before you use that attribute

@ofborg ofborg bot added the 11.by: package-maintainer This PR was created by the maintainer of the package it changes label May 30, 2024
@Andy3153
Copy link
Member Author

@kirillrdy Greetings, should be in the correct order now

@kirillrdy
Copy link
Member

@Andy3153 sorry it may seem annoying at first, but nixpkgs is trying to maintain atomic commits, this is very useful for automatic git bisects.

because of this first commit violates CI meta check https://github.com/NixOS/nixpkgs/blob/master/pkgs/README.md#meta-attributes . meta.maintainers must be set

so i would ask you to squash 1st and 3rd commits, then adding yourself to maintainers list needs to happen first. as for lib removal than can be separate commit or it can be squashed with init commit

appreciate your cooperation

@kirillrdy kirillrdy mentioned this pull request May 30, 2024
13 tasks
@Andy3153
Copy link
Member Author

@kirillrdy Here you go. Squashed init, maintainer and removal of with lib into one and put adding maintainer first

Copy link
Contributor

@eclairevoyant eclairevoyant left a comment

Choose a reason for hiding this comment

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

Thanks for the contribution; couple points of feedback:

meta = {
description = "Hunspell dictionary for ${shortDescription} from rospell";
homepage = "https://sourceforge.net/projects/rospell/";
license = with lib.licenses; [ gpl2 lgpl21 mpl11 ];
Copy link
Contributor

Choose a reason for hiding this comment

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

gpl2 identifier is deprecated, should be gpl2Only or gpl2Plus in accordance with upstream

Copy link
Contributor

Choose a reason for hiding this comment

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

just noticed, same for lgpl21


src = fetchurl {
url = "https://downloads.sourceforge.net/rospell/${fileName}";
sha256 = "7f128d64ea06c9e6711c30b118c0afeefb014d8f33c92daccdf455aba2d04519";
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
sha256 = "7f128d64ea06c9e6711c30b118c0afeefb014d8f33c92daccdf455aba2d04519";
hash = "sha256-fxKNZOoGyeZxHDCxGMCv7vsBTY8zyS2szfRVq6LQRRk=";

SRI hash is preferred

Copy link
Member Author

Choose a reason for hiding this comment

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

I'm a little busy but I'll solve these two complaints soon

Copy link
Member Author

Choose a reason for hiding this comment

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

Currently having trouble with the SRI hash. How do I generate one more exactly? Just replacing the hash in there with what I get from sha256sum does not work.

Copy link
Contributor

@eclairevoyant eclairevoyant Jun 5, 2024

Choose a reason for hiding this comment

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

Set it to empty string, rebuild, get the hash from that error. Never use sha256sum here.

Copy link
Member Author

Choose a reason for hiding this comment

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

Done. Anything else needed? Or any squashes? I got the commit history a bit long

@wegank wegank added 12.approvals: 1 This PR was reviewed and approved by one reputable person and removed 12.approvals: 1 This PR was reviewed and approved by one reputable person labels May 31, 2024
@ofborg ofborg bot added 2.status: merge conflict This PR has merge conflicts with the target branch and removed 2.status: merge conflict This PR has merge conflicts with the target branch labels Jun 5, 2024
@heisfer
Copy link
Contributor

heisfer commented Jun 5, 2024

Rebase (squash) those following commits into one commit:

  • hunspellDicts.ro-ro: init at 3.3.10 (pick)
  • hunspellDicts.ro-ro: fixed license (squash)
  • hunspellDicts.ro-ro: using the hash attribute (squash)
  • hunspellDicts.ro-ro: fixed SRI hash (squash)
    Nixpkgs uses atomic commits for ease of troubleshooting and using old packages.

And for merge conflict, don't merge master to branch, use rebase instead. (copied from another PR):

git checkout master
git reset --hard
git pull
git checkout hunspell-ro_RO
git rebase master
fix the conflict(s)
git push --force-with-lease

Andy3153 added 2 commits June 6, 2024 02:02
add a Romanian dictionary for Hunspell from rospell on Sourceforge
@Andy3153
Copy link
Member Author

Andy3153 commented Jun 5, 2024

@heisfer I think I've done everything right, should be done

@heisfer
Copy link
Contributor

heisfer commented Jun 5, 2024

Seems okay (on the surface)

Copy link
Member

@kirillrdy kirillrdy left a comment

Choose a reason for hiding this comment

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

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

5 packages built:
  • hunspellDicts.ro-ro (hunspellDicts.ro_RO)
  • rstudio
  • rstudio-server
  • rstudioServerWrapper
  • rstudioWrapper

@kirillrdy
Copy link
Member

Thank you !

@kirillrdy kirillrdy merged commit 4761491 into NixOS:master Jun 6, 2024
25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
8.has: maintainer-list (update) This PR changes `maintainers/maintainer-list.nix` 8.has: package (new) This PR adds a new package 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 1-10 11.by: package-maintainer This PR was created by the maintainer of the package it changes 12. first-time contribution This PR is the author's first one; please be gentle!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants