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

Update nexus #28797

Merged
merged 2 commits into from
Sep 4, 2017
Merged

Update nexus #28797

merged 2 commits into from
Sep 4, 2017

Conversation

ironpinguin
Copy link
Contributor

@ironpinguin ironpinguin commented Aug 31, 2017

Motivation for this change

Update and Fix the existing Nexus Repository Server. Also Add a module for the service

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

@Mic92 Mic92 requested a review from NeQuissimus August 31, 2017 17:16
Copy link
Member

@Ma27 Ma27 left a comment

Choose a reason for hiding this comment

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

I like the changes overall (and I'm glad that you do Nix :P)

+++ nexus 2017-08-31 12:41:01.271475645 +0200
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/nix/store/axldd4qjamb2c1lgi7d6k3s51qyy4610-bash-4.4-p12/bin/sh
Copy link
Member

Choose a reason for hiding this comment

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

please use patchShebangs . during the patch phase

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Was a not need change in the bash script.

I forgot to remove this part of the patch during find out what need to patch. ;-)


meta = with stdenv.lib; {
description = "Repository manager for binary software components";
homepage = http://www.sonatype.org/nexus;
license = licenses.epl10;
platforms = platforms.all;
maintainers = [ maintainers.aespinosa ];
maintainers = [ maintainers.aespinosa maintainers.ironpinguin ];
Copy link
Member

Choose a reason for hiding this comment

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

with maintainers; [ aespinosa ironpinguin ]; makes it easier to read/type when adding further maintainers :)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I change it.

@@ -0,0 +1,32 @@
# verifies:
Copy link
Member

Choose a reason for hiding this comment

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

I know where you copied this from :D

Copy link
Contributor Author

Choose a reason for hiding this comment

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

:-D

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Change it now to more reasonable comments ;-)


src = fetchurl {
url = "https://sonatype-download.global.ssl.fastly.net/nexus/oss/nexus-${version}-bundle.tar.gz";
sha256 = "1k3z7kwcmr1pxaxfnak99fq5s8br9zbqbfpyw1afi86ykkph4g5z";
url = "https://sonatype-download.global.ssl.fastly.net/nexus/3/nexus-${version}-mac.tgz";
Copy link
Member

Choose a reason for hiding this comment

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

The macOS bundle works cross-platform?!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes because there are only two diffrents:

  1. in .install4j folder there comes also a jre.bundle in mac style (if no local jre is installed)
  2. Additional checks for jre in mac style (include fallback to jre.bundle) in startup shell script

And both has no side effects on unix systems (expect the extra 167M for the jre bundle)

I test it on my nixos box.


print $server->execute("sudo -u nexus groups");
$server->mustSucceed("sudo -u nexus groups | grep nexus | grep users");
'';
Copy link
Member

Choose a reason for hiding this comment

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

Could you add a test that actually checks that the Nexus interface is up?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I can do it. First i add it but got some memory error in the test kvm. But can also come from the situation that i run the nixos in a virtualbox :-(


ln -sf ${cfg.home} /run/sonatype-work

chown -R ${cfg.user} ${cfg.home}
Copy link
Member

Choose a reason for hiding this comment

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

Won't make much of a difference but should the chown also take into account the group?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh yes i will do it.

@NeQuissimus
Copy link
Member

Looks pretty good, just a few suggestions here and there

@globin
Copy link
Member

globin commented Sep 1, 2017

Commits should be prefixed with nexus: and the version bump be of the form nexus: a.b.c -> x.y,z.

Please also try to squash the commits into logical entities.

Update Nexus to version 3.5.1-02 and fix startup stript to run in nix
environment.
Add also myself as maintainer
Add simple test of the nexus service
@ironpinguin
Copy link
Contributor Author

@globin now ok?

@globin globin merged commit 4ea1d49 into NixOS:master Sep 4, 2017
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

5 participants