2023-01-08 00:28:19 +00:00
|
|
|
{ lib, stdenv, stdenvNoCC, fetchMavenArtifact, fetchFromGitHub, jre, makeWrapper, symlinkJoin }:
|
2017-06-24 23:14:57 +00:00
|
|
|
|
|
|
|
let
|
2018-11-10 23:47:50 +00:00
|
|
|
version = "1.0.0";
|
2017-06-24 23:14:57 +00:00
|
|
|
nailgun-server = fetchMavenArtifact {
|
2018-11-10 23:47:50 +00:00
|
|
|
groupId = "com.facebook";
|
2017-06-24 23:14:57 +00:00
|
|
|
artifactId = "nailgun-server";
|
|
|
|
inherit version;
|
2018-11-10 23:47:50 +00:00
|
|
|
sha256 = "1mk8pv0g2xg9m0gsb96plbh6mc24xrlyrmnqac5mlbl4637l4q95";
|
2017-06-24 23:14:57 +00:00
|
|
|
};
|
|
|
|
|
2023-01-08 00:28:19 +00:00
|
|
|
commonMeta = {
|
|
|
|
license = lib.licenses.asl20;
|
2023-10-30 20:41:44 +00:00
|
|
|
homepage = "https://www.martiansoftware.com/nailgun/";
|
2023-01-08 00:28:19 +00:00
|
|
|
platforms = lib.platforms.linux;
|
|
|
|
maintainers = with lib.maintainers; [ ];
|
|
|
|
};
|
|
|
|
|
|
|
|
server = stdenvNoCC.mkDerivation {
|
|
|
|
pname = "nailgun-server";
|
|
|
|
inherit version;
|
|
|
|
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
|
|
|
|
dontUnpack = true;
|
|
|
|
installPhase = ''
|
|
|
|
runHook preInstall
|
|
|
|
|
|
|
|
makeWrapper ${jre}/bin/java $out/bin/ng-server \
|
|
|
|
--add-flags '-classpath ${nailgun-server.jar}:$CLASSPATH com.facebook.nailgun.NGServer'
|
|
|
|
|
|
|
|
runHook postInstall
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = commonMeta // {
|
|
|
|
description = "Server for running Java programs from the command line without incurring the JVM startup overhead";
|
|
|
|
sourceProvenance = with lib.sourceTypes; [ binaryBytecode ];
|
|
|
|
};
|
2017-06-24 23:14:57 +00:00
|
|
|
};
|
|
|
|
|
2023-01-08 00:28:19 +00:00
|
|
|
client = stdenv.mkDerivation {
|
|
|
|
pname = "nailgun-client";
|
|
|
|
inherit version;
|
2017-06-24 23:14:57 +00:00
|
|
|
|
2023-01-08 00:28:19 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "facebook";
|
|
|
|
repo = "nailgun";
|
|
|
|
rev = "nailgun-all-v${version}";
|
|
|
|
sha256 = "1syyk4ss5vq1zf0ma00svn56lal53ffpikgqgzngzbwyksnfdlh6";
|
|
|
|
};
|
2017-06-24 23:14:57 +00:00
|
|
|
|
2023-01-08 00:28:19 +00:00
|
|
|
makeFlags = [ "PREFIX=$(out)" ];
|
2017-06-24 23:14:57 +00:00
|
|
|
|
2023-01-08 00:28:19 +00:00
|
|
|
meta = commonMeta // {
|
|
|
|
description = "Client for running Java programs from the command line without incurring the JVM startup overhead";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
in
|
|
|
|
symlinkJoin rec {
|
|
|
|
pname = "nailgun";
|
|
|
|
inherit client server version;
|
|
|
|
|
|
|
|
name = "${pname}-${version}";
|
|
|
|
paths = [ client server ];
|
|
|
|
|
|
|
|
meta = commonMeta // {
|
2017-06-24 23:14:57 +00:00
|
|
|
description = "Client, protocol, and server for running Java programs from the command line without incurring the JVM startup overhead";
|
|
|
|
};
|
|
|
|
}
|