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

plexpy: init at 1.4.25 #30847

Merged
merged 2 commits into from Oct 30, 2017
Merged

plexpy: init at 1.4.25 #30847

merged 2 commits into from Oct 30, 2017

Conversation

csingley
Copy link
Contributor

Motivation for this change

PlexPy is a monitoring daemon for Plex Media Server, which is already in nixpkgs. It's popular with Plex users because it adds significant functionality. It's pretty good code and it's actively maintained.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option build-use-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 nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Fits CONTRIBUTING.md.

@adisbladis
Copy link
Member

Same here as in #30850, lots of commits that do not belong and also needs squashing.

};
};

networking.firewall = mkIf cfg.openFirewall {
Copy link
Member

Choose a reason for hiding this comment

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

Services should generally not modify firewall rules.

Group = cfg.group;
PermissionsStartOnly = "true";
GuessMainPID = "false";
ExecStart = "${cfg.package}/bin/plexpy --datadir ${cfg.dataDir} --config ${cfg.configFile} --port ${toString cfg.port} --pidfile ${cfg.dataDir}/plexpy.pid --daemon --nolaunch";
Copy link
Member

Choose a reason for hiding this comment

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

Should probably not run as a daemon. It looks to me like plexpy supports running in the foreground.
Change this and set Type = "simple";.

sha256 = "0a4ynrfamlwkgqil4n61v47p21czxpjdzg0mias4kdjam2nnwnjx";
};

phases = "unpackPhase installPhase fixupPhase";
Copy link
Member

Choose a reason for hiding this comment

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

Don't set phases. Instead, if you do not need a certain phase, you could write buildPhase = ":";.


# Remove superfluous Python checks from main script;
# prepend shebang
echo "#!${python}/bin/python" > $out/PlexPy.py
Copy link
Member

Choose a reason for hiding this comment

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

${python.interpreter} instead of ${python}/bin/python}

@csingley
Copy link
Contributor Author

Thanks for your feedback. I've incorporated the suggested changes; it builds fine as you'd expect.

description = "TCP port where PlexPy listens.";
};

openFirewall = mkOption {
Copy link
Member

Choose a reason for hiding this comment

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

This is not used anywhere anymore.

@FRidh
Copy link
Member

FRidh commented Oct 29, 2017

Can you squash commits into two separate commits: one for the package and one for the service.

@csingley
Copy link
Contributor Author

All right sir, try this. Apologies for non-existent VCS skills.

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