2021-02-05 17:12:51 +00:00
|
|
|
{ lib, stdenv, fetchzip, makeWrapper, jre }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2022-06-26 10:26:21 +00:00
|
|
|
version = "2.6.7";
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "jbake";
|
|
|
|
|
|
|
|
src = fetchzip {
|
2022-06-26 10:26:21 +00:00
|
|
|
url = "https://github.com/jbake-org/jbake/releases/download/v${version}/jbake-${version}-bin.zip";
|
|
|
|
sha256 = "sha256-kikGnFsParq8g0dzzYtMr2vIJD2ie8PeF6TG2G5K7KE=";
|
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 ];
|
|
|
|
};
|
|
|
|
}
|