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
Youtrack package and service #39008
Youtrack package and service #39008
Conversation
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.
I have concerns with adding nonfree NixOS modules (also see #30668 (comment)), that would be mostly resolved if there was a way to hide those from https://nixos.org/nixos/options.html page.
pkgs/servers/jetbrains/youtrack.nix
Outdated
installPhase = '' | ||
jar=$out/share/java/${name}.jar | ||
install -Dm444 $src $jar | ||
makeWrapper ${jre}/bin/java $out/bin/youtrack --add-flags "\$YOUTRACK_JVM_OPTS -jar $jar" |
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.
Could as well be just:
installPhase = ''
makeWrapper ${jre}/bin/java $out/bin/youtrack --add-flags "\$YOUTRACK_JVM_OPTS -jar $src"
'';
src
could be renamed to jar
to make more sense.
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.
And when overwriting an entire phase, please don't forget runHook preInstall
and runHook postInstall
.
pkgs/servers/jetbrains/youtrack.nix
Outdated
makeWrapper ${jre}/bin/java $out/bin/youtrack --add-flags "\$YOUTRACK_JVM_OPTS -jar $jar" | ||
''; | ||
|
||
meta = { |
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.
meta = with stdenv.lib; {
would allow to omit stdenv.lib
inside the attrset.
|
||
users.groups.youtrack = {}; | ||
|
||
services.nginx = mkIf (cfg.virtualHost != null) { |
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.
nginx
doesn't seem to be necessary for YouTrack to run, so this should probably be up to user to set up.
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.
We really need #22067
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.
It is made optional.
Where to keep the youtrack database. | ||
''; | ||
type = types.string; | ||
default = "/var/youtrack"; |
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.
Ok, if this path is also used by upstream. Otherwise /var/lib/youtrack
.
Motivation for this change
Adds a youtrack package and service.
The arguments order is a bit peculiar, that's why I used an env variable.
Things done
build-use-sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)