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

gonic: init at 0.11.0 #96569

Merged
merged 1 commit into from Aug 29, 2020
Merged

gonic: init at 0.11.0 #96569

merged 1 commit into from Aug 29, 2020

Conversation

Profpatsch
Copy link
Member

@Profpatsch Profpatsch commented Aug 28, 2020

Gonic is an implementation of the subsonic server and protocol.

Motivation for this change
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.

pkgs/servers/gonic/default.nix Outdated Show resolved Hide resolved
pkgs/servers/gonic/default.nix Outdated Show resolved Hide resolved
'';

passthru.updateScript = writers.writeDash "update-gonic" ''
${vgo2nix}/bin/vgo2nix \
Copy link
Contributor

Choose a reason for hiding this comment

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

Ideally, updateScript should also find the latest version and update the hash in the source file.

genericUpdater might help #85304 (comment)

Copy link
Member Author

Choose a reason for hiding this comment

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

Is this documented somewhere? I can’t find anything. It’s only used in a few places.

Copy link
Contributor

@jtojnar jtojnar Aug 29, 2020

Choose a reason for hiding this comment

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

Not yet, outside of the comment I linked.

You would use something like:

  passthru.updateScript = writers.writeDash "update-gonic" ''
    ${pkgs.genericUpdater {
      inherit pname version;
      versionLister = "${pkgs.common-updater-scripts}/bin/list-git-tags ${lib.escapeShellArg sr.meta.homepage}";
    }}
    ${vgo2nix}/bin/vgo2nix …
  '';

But that would not be enough if the rev needs to be updated too.

Copy link
Member Author

Choose a reason for hiding this comment

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

Cool, once it’s documented I will take a look.

meta = {
homepage = "https://github.com/sentriz/gonic";
description = "Music streaming server / subsonic server API implementation";
license = lib.licenses.gpl3;
Copy link
Contributor

Choose a reason for hiding this comment

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

gpl3 is unclear, use gpl3Plus or gpl3Only. See https://discourse.nixos.org/t/lib-licenses-gpl3-co-are-now-deprecated/8206 for more details.

Copy link
Member Author

Choose a reason for hiding this comment

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

Hm, why is this not an automatic lint in the meta checker?

Copy link
Contributor

Choose a reason for hiding this comment

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

IIRC it would break evaluation of PRs if we enforced it in meta checker.

let
# update these, then run `updateScript` to update dependencies
version = "0.11.0";
rev = "056fb54a703ef5b5194ce112cbbdd8fb53dbb1ea";
Copy link
Contributor

Choose a reason for hiding this comment

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

Why not use "v${version}"?

Copy link
Member Author

Choose a reason for hiding this comment

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

Tags are unstable.

Copy link
Contributor

@jtojnar jtojnar Aug 29, 2020

Choose a reason for hiding this comment

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

Could you add a comment mentioning it then? Though it would be nicer to convince upstream to treat tags as immutable once created.

Copy link
Member Author

Choose a reason for hiding this comment

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

Huh, the version tag is right above it. It’s a problem with git(hub), not with upstream.

Gonic is an implementation of the subsonic server and protocol.
@Profpatsch
Copy link
Member Author

@GrahamcOfBorg build gonic

@Profpatsch
Copy link
Member Author

Merging, looks like the darwin builders are down. It should work just as well on darwin in principle.

@Profpatsch Profpatsch merged commit cc8c10d into NixOS:master Aug 29, 2020

in
buildGoPackage {
pname = "gonic-${version}";
Copy link
Contributor

Choose a reason for hiding this comment

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

$ nix-instantiate --eval --strict -A gonic.name
"gonic-0.11.0-0.11.0"

@urandom2 urandom2 mentioned this pull request Nov 8, 2022
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

3 participants