2021-02-05 17:12:51 +00:00
|
|
|
{ lib, stdenv, fetchzip, makeWrapper, jre }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2020-05-15 21:57:56 +00:00
|
|
|
version = "2.6.5";
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "jbake";
|
|
|
|
|
|
|
|
src = fetchzip {
|
|
|
|
url = "https://dl.bintray.com/jbake/binary/${pname}-${version}-bin.zip";
|
2020-05-15 21:57:56 +00:00
|
|
|
sha256 = "0ripayv1vf4f4ylxr7h9kad2xhy3y98ca8s4p38z7dn8l47zg0qw";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-03-09 03:18:52 +00:00
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
buildInputs = [ jre ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
postPatch = "patchShebangs .";
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out
|
|
|
|
cp -vr * $out
|
|
|
|
wrapProgram $out/bin/jbake --set JAVA_HOME "${jre}"
|
|
|
|
'';
|
|
|
|
|
|
|
|
checkPhase = ''
|
|
|
|
export JAVA_HOME=${jre}
|
|
|
|
bin/jbake | grep -q "${version}" || (echo "jbake did not return correct version"; exit 1)
|
|
|
|
'';
|
|
|
|
doCheck = true;
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
meta = with lib; {
|
2020-11-03 02:18:15 +00:00
|
|
|
description = "Java based, open source, static site/blog generator for developers & designers";
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://jbake.org/";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ moaxcp ];
|
|
|
|
};
|
|
|
|
}
|