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