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

navidrome: init at 0.23.1 #88928

Merged
merged 2 commits into from Jun 20, 2020
Merged

navidrome: init at 0.23.1 #88928

merged 2 commits into from Jun 20, 2020

Conversation

aciceri
Copy link
Member

@aciceri aciceri commented May 26, 2020

Motivation for this change

Because it's a nice application

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.

This is my first pull request, hope that I've done everything correctly. Tell me if there are problems.

@aciceri aciceri changed the title navidrome: init at 0.20.0 Closes nixpkgs/nixpkgs#88903 May 26, 2020
@aciceri aciceri changed the title Closes nixpkgs/nixpkgs#88903 navidrome: init at 0.20.0 May 26, 2020
@aciceri
Copy link
Member Author

aciceri commented May 26, 2020

This should close #88903 and navidrome/navidrome#209

@aciceri aciceri closed this May 26, 2020
@aciceri aciceri reopened this May 26, 2020
pkgs/servers/misc/navidrome/default.nix Outdated Show resolved Hide resolved
pkgs/servers/misc/navidrome/default.nix Outdated Show resolved Hide resolved
pkgs/servers/misc/navidrome/default.nix Show resolved Hide resolved
pkgs/servers/misc/navidrome/default.nix Show resolved Hide resolved
pkgs/servers/misc/navidrome/default.nix Outdated Show resolved Hide resolved
maintainers/maintainer-list.nix Outdated Show resolved Hide resolved
Copy link
Member Author

@aciceri aciceri left a comment

Choose a reason for hiding this comment

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

Thank you for your changes, I understood all of them.
However I can't "approve" them in github, even if I created the pull request, I'm not experencied with these things.
Have I to manually add them to my fork (creating a commit and then clicking on "resolve conservation" on your messages) or the changes will be automatically merged when the PR will be approved?

Moreover, a new version of navidrome is out, I also have to update the link and the hash.

@prusnak
Copy link
Member

prusnak commented May 31, 2020

However I can't "approve" them in github

You can apply the changes manually in your fork.

@aciceri
Copy link
Member Author

aciceri commented May 31, 2020

You can apply the changes manually in your fork.

I pushed the commit with the new version and your suggested changes to my fork but at the beginning of this page, in the tab "commits" I can see only the initial commit.
Sorry for the stupid questions but this is my fist time doing these things, and thank you for reviewing this PR.

Edit: problem solved, I was pushing to the master branch of my fork, insted of the navidrome branch.

@aciceri aciceri changed the title navidrome: init at 0.20.0 navidrome: init at 0.21.0 May 31, 2020
@aciceri aciceri changed the title navidrome: init at 0.21.0 navidrome: init at 0.22.0 Jun 8, 2020
pkgs/servers/misc/navidrome/default.nix Outdated Show resolved Hide resolved
pkgs/servers/misc/navidrome/default.nix Outdated Show resolved Hide resolved
@aciceri
Copy link
Member Author

aciceri commented Jun 17, 2020

This has not been fixed

@prusnak I updated to 0.23.0 but I can't understand the last two changes you suggested four days ago, aren't they already resolved?
I mean this and this.

@prusnak
Copy link
Member

prusnak commented Jun 17, 2020

aren't they already resolved?

No they are not. See https://github.com/NixOS/nixpkgs/pull/88928/files

@aciceri
Copy link
Member Author

aciceri commented Jun 17, 2020

No they are not. See https://github.com/NixOS/nixpkgs/pull/88928/files

@prusnak Now I marked as resolved all the changes in thae page you link. However I'm not sure to understand what you mean.
You can see here that the description, homepage, license and platforms fields are correct (as your suggested changes of 4 days ago).

@prusnak
Copy link
Member

prusnak commented Jun 17, 2020

fields are correct

No, they are not.

From your file:

license = stdenv.lib.licenses.gpl3;
platforms = platforms.x86_64;

My suggestions (you marked as resolved but you did not apply them):

license = licenses.gpl3;
platforms = [ "x86_64-linux" ];

@aciceri
Copy link
Member Author

aciceri commented Jun 17, 2020

@prusnak Ahhh, I feel so stupid, forgive me, this is my first pull request on Github and I don't know all of these mechanisms. Thank you for the patience.

image

I thought that the green text meant it was fine

Now can my request be merged?

@aciceri aciceri changed the title navidrome: init at 0.22.0 navidrome: init at 0.23.0 Jun 17, 2020
@rnhmjoj
Copy link
Contributor

rnhmjoj commented Jun 20, 2020

@acieri Oops, in the first point I wrote rebase but I meant reset, sorry. Try this:

  • git rebase -i HEAD~6 (this time for real), a text editor will open
  • at the top of the file, delete the lines of the other 4 commits, save and exit.
  • git push --force origin

@deluan Hi, I don't think it will work just like that: npm will probably try to access the internet and Nix forbids that (it would not be reproducible). If I'm right a solution would be to add node_modules to the release tarball. This is what gitea does, which was in a similar situation.

@deluan
Copy link

deluan commented Jun 20, 2020

@rnhmjoj Releasing the node_modules used to build Navidrome's UI would be straightforward, but I don't see the advantage of downloading a huge tarball (445M uncompressed) to build a JS bundle of only 6.5M (uncompressed). Why not just download the JS bundle instead? What is the advantage of building this bundle during install time

Adding to that, building the GoLang server would also require downloading all libraries (go modules) used by the project from the Internet. I fail to see how this is different from what npm does...

Sorry if these may sound naive and even dumb questions, as this is my first contact with NixOS, and I don't know anything about its philosophy and how things work around here :)

And this is probably not the best place to discuss these things... :P

@rnhmjoj
Copy link
Contributor

rnhmjoj commented Jun 20, 2020

Why not just download the JS bundle instead?

Sure, that would also work and save bandwidth too. If you can, this looks like a better idea.

I fail to see how this is different from what npm does...

The only difference is that there is infrastructure in Nixpkgs that can handle this automatically: basically Nix gathers all the go modules required, computes a single hash and store them in a content-addressed location that can be passed to the package builder.

There is something similar for node also: it's more involved and produces tons of generated Nix expressions, so it's not great but works. I wouldn't known how to mix the two in a single build system, though.

Sorry if these may sound naive and even dumb questions

No, don't worry. It's nice of you to stop by and helping. Thank you.

@aciceri
Copy link
Member Author

aciceri commented Jun 20, 2020

@rnhmjoj ok, I've made a terrible mess but now the git tree should be clean.

Anyway I've added the ffmpeg dependency as done in the youtube-dl derivation, it's the first package using ffmpeg that came to my mind.

However I remember that wen I tried to write the derivation using buildGoModule (or buildGoPackage?) I had the problem that npm needed the network connectivity, as you are saying.

i think that now the PR should be ready to be merged.

Copy link
Contributor

@rnhmjoj rnhmjoj left a comment

Choose a reason for hiding this comment

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

The history looks good now, thanks.
The wrapping is not quiet right, though: makeWrapperArgs is an argument specific of python builder so it's actualy doing nothing in this case. You have to call wrapProgram manually, see for example this package.
Tip: to check if the program is wrapped open it with a text editor (like vi result/bin/something). If it's a shell script it's wrapped, otherwise it's not.

@aciceri aciceri closed this Jun 20, 2020
@aciceri
Copy link
Member Author

aciceri commented Jun 20, 2020

I accidentally closed the PR when I deleted all the commits in my fork, now I reopened it.
I did as you told me and I divided the procedure into different phases, and checked that the output file is a shell script.

@rnhmjoj rnhmjoj merged commit bc5843f into NixOS:master Jun 20, 2020
@rnhmjoj
Copy link
Contributor

rnhmjoj commented Jun 20, 2020

Thank you!

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

5 participants