-
-
Notifications
You must be signed in to change notification settings - Fork 14.8k
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
traccar: init at 6.5 #354732
Conversation
Result of 1 package blacklisted:
1 package built:
|
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 |
in | ||
{ | ||
options.services.traccar = { | ||
enable = lib.mkEnableOption "Whether to enable Traccar, an open source GPS tracking system."; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
enable = lib.mkEnableOption "Whether to enable Traccar, an open source GPS tracking system."; | |
enable = lib.mkEnableOption "Traccar, an open source GPS tracking system"; |
There was a problem hiding this comment.
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}"; |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
pkgs/by-name/tr/traccar/package.nix
Outdated
''; | ||
|
||
meta = with lib; { | ||
description = "Traccar, an open source GPS tracking system."; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
description = "Traccar, an open source GPS tracking system."; | |
description = "Open source GPS tracking system"; |
There was a problem hiding this comment.
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 = '' |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
There was a problem hiding this 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."; |
There was a problem hiding this comment.
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}"; |
There was a problem hiding this comment.
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 = '' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
pkgs/by-name/tr/traccar/package.nix
Outdated
''; | ||
|
||
meta = with lib; { | ||
description = "Traccar, an open source GPS tracking system."; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
39a0a12
to
ead0be2
Compare
serviceConfig = { | ||
DynamicUser = true; | ||
EnvironmentFile = cfg.environmentFile; | ||
ExecStart = "${pkgs.traccar}/traccar-wrapped ${configFilePath}"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ExecStart = "${pkgs.traccar}/traccar-wrapped ${configFilePath}"; | |
ExecStart = "${lib.getExe pkgs.traccar} ${configFilePath}"; |
pkgs/by-name/tr/traccar/package.nix
Outdated
mkdir -p $out/share/traccar | ||
install -Dm644 tracker-server.jar $out | ||
|
||
makeWrapper ${pkgs.openjdk}/bin/java $out/traccar-wrapped \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 ]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maintainers = with maintainers; [ frederictobiasc ]; | |
maintainers = with maintainers; [ frederictobiasc ]; | |
mainProgram = "traccar"; |
ead0be2
to
06e9f34
Compare
@FliegendeWurst thanks again for your review! I applied all your suggestions and tested it successfully. |
163d36c
to
7cd9260
Compare
# Substitute the configFile from Envvars read from EnvironmentFile | ||
old_umask=$(umask) | ||
umask 0177 | ||
${pkgs.envsubst}/bin/envsubst \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
${pkgs.envsubst}/bin/envsubst \ | |
${lib.getExe pkgs.envsubst} \ |
7cd9260
to
450370a
Compare
# Substitute the configFile from Envvars read from EnvironmentFile | ||
old_umask=$(umask) | ||
umask 0177 | ||
${lib.getExe pkgs.envsubst}/bin/envsubst \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
${lib.getExe pkgs.envsubst}/bin/envsubst \ | |
${lib.getExe pkgs.envsubst} \ |
450370a
to
9293bc7
Compare
Things done
nix.conf
? (See Nix manual)sandbox = relaxed
sandbox = true
nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)closes #261879
Add a 👍 reaction to pull requests you find important.