depot/third_party/nixpkgs/pkgs/development/tools/jbake/default.nix
Default email ae91cbe6cc Project import generated by Copybara.
GitOrigin-RevId: 536fe36e23ab0fc8b7f35c24603422eee9fc17a2
2021-02-05 18:12:51 +01:00

34 lines
881 B
Nix

{ lib, stdenv, fetchzip, makeWrapper, jre }:
stdenv.mkDerivation rec {
version = "2.6.5";
pname = "jbake";
src = fetchzip {
url = "https://dl.bintray.com/jbake/binary/${pname}-${version}-bin.zip";
sha256 = "0ripayv1vf4f4ylxr7h9kad2xhy3y98ca8s4p38z7dn8l47zg0qw";
};
buildInputs = [ makeWrapper jre ];
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;
meta = with lib; {
description = "Java based, open source, static site/blog generator for developers & designers";
homepage = "https://jbake.org/";
license = licenses.mit;
maintainers = with maintainers; [ moaxcp ];
};
}