2018-04-20 05:15:40 +03:00
|
|
|
{ stdenv, fetchzip, makeWrapper, jre }:
|
2017-12-27 04:06:19 +03:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2018-04-20 14:16:30 +03:00
|
|
|
version = "2.6.1";
|
2017-12-29 05:24:47 +03:00
|
|
|
name = "jbake-${version}";
|
2017-12-27 04:06:19 +03:00
|
|
|
|
2017-12-29 05:24:47 +03:00
|
|
|
src = fetchzip {
|
2018-03-25 08:04:25 +03:00
|
|
|
url = "https://dl.bintray.com/jbake/binary/${name}-bin.zip";
|
2018-04-20 14:16:30 +03:00
|
|
|
sha256 = "0zlh2azmv8gj3c4d4ndivar31wd42nmvhxq6xhn09cib9kffxbc7";
|
2017-12-29 05:24:47 +03:00
|
|
|
};
|
2017-12-27 04:06:19 +03:00
|
|
|
|
2018-04-20 05:15:40 +03:00
|
|
|
buildInputs = [ makeWrapper jre ];
|
2017-12-27 04:06:19 +03:00
|
|
|
|
2018-09-08 16:20:39 +03:00
|
|
|
postPatch = "patchShebangs .";
|
|
|
|
|
2017-12-29 05:24:47 +03:00
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out
|
|
|
|
cp -vr * $out
|
2018-04-20 05:15:40 +03:00
|
|
|
wrapProgram $out/bin/jbake --set JAVA_HOME "${jre}"
|
2017-12-29 05:24:47 +03:00
|
|
|
'';
|
2017-12-27 04:06:19 +03:00
|
|
|
|
2018-05-16 08:54:45 +03:00
|
|
|
checkPhase = ''
|
|
|
|
export JAVA_HOME=${jre}
|
|
|
|
bin/jbake | grep -q "${version}" || (echo "jbake did not return correct version"; exit 1)
|
|
|
|
'';
|
|
|
|
doCheck = true;
|
|
|
|
|
2017-12-29 05:24:47 +03:00
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "JBake is a Java based, open source, static site/blog generator for developers & designers";
|
2018-03-25 08:04:25 +03:00
|
|
|
homepage = "https://jbake.org/";
|
2017-12-29 05:24:47 +03:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ moaxcp ];
|
|
|
|
};
|
2017-12-27 04:06:19 +03:00
|
|
|
}
|