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

(nixos/calibre-server): Add new http & auth options #216497

Merged
merged 1 commit into from
Jun 28, 2023

Conversation

gaelreyrol
Copy link
Contributor

@gaelreyrol gaelreyrol commented Feb 15, 2023

Description of changes

It is my first contribution to the nixpkgs repository and I hope my changes are not that bad!

This PR adds 4 new options to the calibre-server service. It will allow to configure host interface & port and auth configuration.

I also add a test for a simple custom case.

Things done
  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
  • 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/)
  • 23.05 Release Notes (or backporting 22.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.

@github-actions github-actions 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/` labels Feb 15, 2023
@gaelreyrol gaelreyrol force-pushed the calibre-server-options branch from eead884 to c335a74 Compare February 15, 2023 16:37
@ofborg ofborg bot added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 1-10 labels Feb 15, 2023
@gaelreyrol gaelreyrol force-pushed the calibre-server-options branch from c335a74 to a303d60 Compare February 15, 2023 18:45
@github-actions github-actions bot added 8.has: changelog 8.has: documentation This PR adds or changes documentation labels Feb 15, 2023
@gaelreyrol gaelreyrol force-pushed the calibre-server-options branch from e9abdd4 to 83ad549 Compare February 15, 2023 18:57
@gaelreyrol gaelreyrol force-pushed the calibre-server-options branch from 83ad549 to 740a975 Compare April 23, 2023 12:13
@Janik-Haag Janik-Haag added the 12. first-time contribution This PR is the author's first one; please be gentle! label Jun 13, 2023
@gaelreyrol gaelreyrol force-pushed the calibre-server-options branch from 740a975 to 1056196 Compare June 26, 2023 17:53
@gaelreyrol gaelreyrol self-assigned this Jun 26, 2023
@gaelreyrol gaelreyrol removed the 12. first-time contribution This PR is the author's first one; please be gentle! label Jun 27, 2023
@gaelreyrol gaelreyrol force-pushed the calibre-server-options branch 2 times, most recently from 0dffbc1 to 899ac1a Compare June 27, 2023 22:26
@gaelreyrol
Copy link
Contributor Author

@GrahamcOfBorg test calibre-server

@gaelreyrol gaelreyrol marked this pull request as ready for review June 28, 2023 07:29
@gaelreyrol gaelreyrol force-pushed the calibre-server-options branch from 899ac1a to 9dd2f60 Compare June 28, 2023 07:41
@gaelreyrol gaelreyrol force-pushed the calibre-server-options branch from 9dd2f60 to 5cc6fea Compare June 28, 2023 07:53
@gaelreyrol gaelreyrol requested a review from WilliButz as a code owner June 28, 2023 07:53
@gaelreyrol gaelreyrol force-pushed the calibre-server-options branch from 5cc6fea to 37def1a Compare June 28, 2023 07:54
@gaelreyrol gaelreyrol force-pushed the calibre-server-options branch 2 times, most recently from 22a753b to f129289 Compare June 28, 2023 10:22
@gaelreyrol
Copy link
Contributor Author

@GrahamcOfBorg test calibre-server

nixos/doc: add calibre-server new options
@gaelreyrol gaelreyrol force-pushed the calibre-server-options branch from f129289 to caa3c0f Compare June 28, 2023 10:48
serviceConfig = {
User = cfg.user;
Restart = "always";
ExecStart = "${cfg.package}/bin/calibre-server ${lib.concatStringsSep " " cfg.libraries} ${execFlags}";
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't know if the /bin/calibre-server is required

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The package calibre contains multiple executables and calibre-server is not the default one.

Copy link
Contributor

Choose a reason for hiding this comment

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

Fair enough. If needed, the meta attribute mainProgram can be set in the derivation so it's not needed here.

@gaelreyrol
Copy link
Contributor Author

@GrahamcOfBorg test calibre-server

@drupol drupol merged commit 3a4e234 into NixOS:master Jun 28, 2023
@gaelreyrol gaelreyrol deleted the calibre-server-options branch June 28, 2023 12:24
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: changelog 8.has: documentation This PR adds or changes documentation 8.has: module (update) This PR changes an existing module in `nixos/` 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 1-10
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants