Skip to content

Add spotifyd package and service - #65092

Merged
flokli merged 3 commits into
NixOS:masterfrom
anderslundstedt:master
Jul 23, 2019
Merged

flokli merged 3 commits into
NixOS:masterfrom
anderslundstedt:master

Conversation

@anderslundstedt

@anderslundstedt anderslundstedt commented Jul 19, 2019 •

Copy link
Copy Markdown
Contributor
Motivation for this change

Spotifyd is a nice spotify connect server. This adds a spotifyd package and a spotifyd service.

I took over the abandoned #55923, addressing the comments to the best of my ability. I am not very experienced with adding packages or services to NixOS, so likely there are still things to address.

Additional comments

Here are the differences between this pull request and #55923:

  • In the package:

    • Version bumped to 0.2.11, which also eliminates the need for the noavxcrypto.patch patch.

    • platforms.unix instead of platforms.all.

  • In the service module:

    • As suggested by a comment, removed the dataDir option. As far as I can see, this option does indeed seem unnecessary.

    • As suggested by a comment, use command line option --cache_path /var/lib/spotifyd instead of setting Environment = "HOME=/var/lib/spotifyd".

    • Added spotifyd user belonging to the audio group. (Did not work for me without this.)

Unresolved #55923 comments not addressed by the above changes:

  • Using lib.generators.toINI to generate the config line from the config service option. I did not feel I had the competence to make such a change (and it is not clear to me why such a change would be preferable).

  • Dropping the --no-daemon from the service start. I tried this which resulted in the service crashing.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • 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 nix-review --run "nix-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.

@anderslundstedt anderslundstedt mentioned this pull request Jul 19, 2019
5 of 10 tasks
@ofborg ofborg Bot added 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: module (update) This PR changes an existing module in `nixos/` 8.has: package (new) This PR adds a new package 11.by: package-maintainer This PR was created by a maintainer of all the package it changes. 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. labels Jul 19, 2019

@aanderse aanderse left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I've included some suggestions I hope will be helpful. Please let me know if you have any questions.

Comment thread maintainers/maintainer-list.nix Resolved
@aanderse

Copy link
Copy Markdown
Member

@anderslundstedt LGTM 👍 Please squash all but the first commit into one and then from my perspective we're good to merge. Thanks!

@anderslundstedt

Copy link
Copy Markdown
Contributor Author

Great! Thanks everyone for the swift review. Should we not let the package and the module be introduced by separate commits? I kept it like that for now, but let me know if I should squash them together.

@aanderse aanderse left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

👍 LGTM

@flokli
flokli merged commit 101a4be into NixOS:master Jul 23, 2019
@flokli

flokli commented Jul 23, 2019

Copy link
Copy Markdown
Member

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: module (update) This PR changes an existing module in `nixos/` 8.has: package (new) This PR adds a new package 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 11.by: package-maintainer This PR was created by a maintainer of all the package it changes.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants