1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-25 07:00:43 +00:00
nixpkgs/pkgs/development/tools/jbake/default.nix
2018-05-16 00:54:45 -05:00

33 lines
858 B
Nix

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