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

Youtrack package and service #39008

Merged
merged 2 commits into from Apr 27, 2018
Merged

Youtrack package and service #39008

merged 2 commits into from Apr 27, 2018

Conversation

yorickvP
Copy link
Contributor

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
  • 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.

Copy link
Member

@lukateras lukateras left a 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.

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"
Copy link
Member

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.

Copy link
Member

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.

makeWrapper ${jre}/bin/java $out/bin/youtrack --add-flags "\$YOUTRACK_JVM_OPTS -jar $jar"
'';

meta = {
Copy link
Member

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) {
Copy link
Member

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.

Copy link
Contributor

Choose a reason for hiding this comment

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

We really need #22067

Copy link
Contributor Author

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";
Copy link
Member

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.

@lukateras lukateras merged commit 6e33df0 into NixOS:master Apr 27, 2018
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

6 participants