nixpkgs/pkgs/development/tools/nailgun/default.nix

40 lines
1.1 KiB
Nix
Raw Normal View History

{ stdenv, fetchMavenArtifact, fetchFromGitHub, jre, makeWrapper }:
2017-06-25 00:14:57 +01:00
let
version = "1.0.0";
2017-06-25 00:14:57 +01:00
nailgun-server = fetchMavenArtifact {
groupId = "com.facebook";
2017-06-25 00:14:57 +01:00
artifactId = "nailgun-server";
inherit version;
sha256 = "1mk8pv0g2xg9m0gsb96plbh6mc24xrlyrmnqac5mlbl4637l4q95";
2017-06-25 00:14:57 +01:00
};
in
2019-08-13 22:52:01 +01:00
stdenv.mkDerivation {
2019-08-13 22:52:01 +01:00
pname = "nailgun";
inherit version;
2017-06-25 00:14:57 +01:00
src = fetchFromGitHub {
owner = "facebook";
2017-06-25 00:14:57 +01:00
repo = "nailgun";
rev = "nailgun-all-v${version}";
sha256 = "1syyk4ss5vq1zf0ma00svn56lal53ffpikgqgzngzbwyksnfdlh6";
2017-06-25 00:14:57 +01:00
};
makeFlags = [ "PREFIX=$(out)" ];
2017-06-25 00:14:57 +01:00
nativeBuildInputs = [ makeWrapper ];
2017-06-25 00:14:57 +01:00
postInstall = ''
2017-06-25 07:46:51 +01:00
makeWrapper ${jre}/bin/java $out/bin/ng-server \
--add-flags '-classpath ${nailgun-server.jar}:$CLASSPATH com.facebook.nailgun.NGServer'
2017-06-25 00:14:57 +01:00
'';
meta = with stdenv.lib; {
description = "Client, protocol, and server for running Java programs from the command line without incurring the JVM startup overhead";
homepage = http://www.martiansoftware.com/nailgun/;
license = licenses.asl20;
2017-06-25 00:14:57 +01:00
platforms = platforms.linux;
maintainers = with maintainers; [ volth ];
2017-06-25 00:14:57 +01:00
};
}