2014-12-02 11:08:37 +00:00
|
|
|
{ stdenv, lib, makeWrapper, fetchgit, curl, jdk, maven, nodejs, mesos }:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "chronos";
|
2014-12-02 11:08:37 +00:00
|
|
|
version = "286b2ccb8e4695f8e413406ceca85b60d3a87e22";
|
|
|
|
|
|
|
|
src = fetchgit {
|
|
|
|
url = "https://github.com/airbnb/chronos";
|
|
|
|
rev = version;
|
2016-06-02 12:26:44 +01:00
|
|
|
sha256 = "0hrln3ad2g2cq2xqmy5mq32cdxxb9vb6v6jp6kcq03f8km6v3g9c";
|
2014-12-02 11:08:37 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [ makeWrapper curl jdk maven nodejs mesos ];
|
|
|
|
|
|
|
|
mavenRepo = import ./chronos-deps.nix { inherit stdenv curl; };
|
|
|
|
|
|
|
|
buildPhase = ''
|
|
|
|
ln -s $mavenRepo .m2
|
|
|
|
mvn package -Dmaven.repo.local=$(pwd)/.m2
|
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/{bin,libexec/chronos}
|
2019-08-15 13:41:18 +01:00
|
|
|
cp target/chronos*.jar $out/libexec/chronos/${pname}-${version}.jar
|
2014-12-02 11:08:37 +00:00
|
|
|
|
|
|
|
makeWrapper ${jdk.jre}/bin/java $out/bin/chronos \
|
2019-08-15 13:41:18 +01:00
|
|
|
--add-flags "-Xmx384m -Xms384m -cp $out/libexec/chronos/${pname}-${version}.jar com.airbnb.scheduler.Main" \
|
2014-12-02 11:08:37 +00:00
|
|
|
--prefix "MESOS_NATIVE_LIBRARY" : "$MESOS_NATIVE_LIBRARY"
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "http://airbnb.github.io/chronos";
|
2014-12-02 11:08:37 +00:00
|
|
|
license = licenses.asl20;
|
|
|
|
description = "Fault tolerant job scheduler for Mesos which handles dependencies and ISO8601 based schedules";
|
|
|
|
maintainers = with maintainers; [ offline ];
|
2015-11-17 20:29:29 +00:00
|
|
|
platforms = platforms.unix;
|
2020-04-18 21:51:19 +01:00
|
|
|
broken = true; # doesn't build https://hydra.nixos.org/build/25768319
|
2014-12-02 11:08:37 +00:00
|
|
|
};
|
|
|
|
}
|