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

traccar: init at 6.5 #354732

Merged
merged 1 commit into from
Dec 5, 2024
Merged

traccar: init at 6.5 #354732

merged 1 commit into from
Dec 5, 2024

Conversation

frederictobiasc
Copy link
Contributor

@frederictobiasc frederictobiasc commented Nov 9, 2024

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • 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/)
  • 24.11 Release Notes (or backporting 23.11 and 24.05 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.

closes #261879


Add a 👍 reaction to pull requests you find important.

@github-actions github-actions bot added 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: documentation This PR adds or changes documentation 8.has: changelog 8.has: module (update) This PR changes an existing module in `nixos/` labels Nov 9, 2024
@KiaraGrouwstra
Copy link
Contributor

Result of nixpkgs-review pr 354732 run on x86_64-linux 1

1 package blacklisted:
  • nixos-install-tools
1 package built:
  • traccar

@nixos-discourse
Copy link

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/prs-already-reviewed/2617/2092

@ofborg ofborg bot added 8.has: package (new) This PR adds a new package 11.by: package-maintainer This PR was created by the maintainer of the package it changes 10.rebuild-darwin: 1-10 10.rebuild-darwin: 1 10.rebuild-linux: 1-10 labels Nov 9, 2024
@h7x4 h7x4 added the 8.has: module (new) This PR adds a module in `nixos/` label Nov 11, 2024
in
{
options.services.traccar = {
enable = lib.mkEnableOption "Whether to enable Traccar, an open source GPS tracking system.";
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
enable = lib.mkEnableOption "Whether to enable Traccar, an open source GPS tracking system.";
enable = lib.mkEnableOption "Traccar, an open source GPS tracking system";

Copy link
Contributor Author

Choose a reason for hiding this comment

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

👍

serviceConfig = {
DynamicUser = true;
EnvironmentFile = cfg.environmentFile;
ExecStart = "${pkgs.openjdk}/bin/java -jar ${pkgs.traccar}/tracker-server.jar ${configFilePath}";
Copy link
Member

Choose a reason for hiding this comment

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

You could have this as a wrapper in the traccar package.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

👍

'';

meta = with lib; {
description = "Traccar, an open source GPS tracking system.";
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
description = "Traccar, an open source GPS tracking system.";
description = "Open source GPS tracking system";

Copy link
Contributor Author

Choose a reason for hiding this comment

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

👍

hash = "sha256-XCG3G24oe/qR6LiMJASb9STOnyTCtw+2HigaPawcQvU=";
};

installPhase = ''
Copy link
Member

Choose a reason for hiding this comment

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

should include preInstall and postInstall

Copy link
Contributor Author

Choose a reason for hiding this comment

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

👍

Copy link
Contributor Author

@frederictobiasc frederictobiasc left a comment

Choose a reason for hiding this comment

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

Thanks for your review!

in
{
options.services.traccar = {
enable = lib.mkEnableOption "Whether to enable Traccar, an open source GPS tracking system.";
Copy link
Contributor Author

Choose a reason for hiding this comment

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

👍

serviceConfig = {
DynamicUser = true;
EnvironmentFile = cfg.environmentFile;
ExecStart = "${pkgs.openjdk}/bin/java -jar ${pkgs.traccar}/tracker-server.jar ${configFilePath}";
Copy link
Contributor Author

Choose a reason for hiding this comment

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

👍

hash = "sha256-XCG3G24oe/qR6LiMJASb9STOnyTCtw+2HigaPawcQvU=";
};

installPhase = ''
Copy link
Contributor Author

Choose a reason for hiding this comment

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

👍

'';

meta = with lib; {
description = "Traccar, an open source GPS tracking system.";
Copy link
Contributor Author

Choose a reason for hiding this comment

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

👍

serviceConfig = {
DynamicUser = true;
EnvironmentFile = cfg.environmentFile;
ExecStart = "${pkgs.traccar}/traccar-wrapped ${configFilePath}";
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
ExecStart = "${pkgs.traccar}/traccar-wrapped ${configFilePath}";
ExecStart = "${lib.getExe pkgs.traccar} ${configFilePath}";

mkdir -p $out/share/traccar
install -Dm644 tracker-server.jar $out

makeWrapper ${pkgs.openjdk}/bin/java $out/traccar-wrapped \
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
makeWrapper ${pkgs.openjdk}/bin/java $out/traccar-wrapped \
makeWrapper ${pkgs.openjdk}/bin/java $out/bin/traccar \

homepage = "https://www.traccar.org/";
sourceProvenance = with sourceTypes; [ binaryBytecode ];
license = licenses.asl20;
maintainers = with maintainers; [ frederictobiasc ];
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
maintainers = with maintainers; [ frederictobiasc ];
maintainers = with maintainers; [ frederictobiasc ];
mainProgram = "traccar";

@frederictobiasc
Copy link
Contributor Author

@FliegendeWurst thanks again for your review! I applied all your suggestions and tested it successfully.

@wegank wegank added the 12.approvals: 1 This PR was reviewed and approved by one reputable person label Nov 29, 2024
@frederictobiasc frederictobiasc force-pushed the init_traccar branch 2 times, most recently from 163d36c to 7cd9260 Compare December 3, 2024 19:05
@wegank wegank removed the 12.approvals: 1 This PR was reviewed and approved by one reputable person label Dec 3, 2024
# Substitute the configFile from Envvars read from EnvironmentFile
old_umask=$(umask)
umask 0177
${pkgs.envsubst}/bin/envsubst \
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
${pkgs.envsubst}/bin/envsubst \
${lib.getExe pkgs.envsubst} \

# Substitute the configFile from Envvars read from EnvironmentFile
old_umask=$(umask)
umask 0177
${lib.getExe pkgs.envsubst}/bin/envsubst \
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
${lib.getExe pkgs.envsubst}/bin/envsubst \
${lib.getExe pkgs.envsubst} \

@FliegendeWurst FliegendeWurst removed the backport release-24.11 Backport PR automatically label Dec 4, 2024
@wegank wegank added the 12.approvals: 1 This PR was reviewed and approved by one reputable person label Dec 4, 2024
@r-vdp r-vdp merged commit f85d756 into NixOS:master Dec 5, 2024
36 of 37 checks passed
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 (new) This PR adds a module in `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 10.rebuild-darwin: 1 10.rebuild-linux: 1-10 11.by: package-maintainer This PR was created by the maintainer of the package it changes 12.approvals: 1 This PR was reviewed and approved by one reputable person
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Package request: traccar-server + traccar-web
7 participants