nixpkgs/pkgs/development/tools/jbake/default.nix

36 lines
908 B
Nix
Raw Normal View History

{ lib, stdenv, fetchzip, makeWrapper, jre }:
2017-12-27 02:06:19 +01:00
stdenv.mkDerivation rec {
2020-05-05 15:05:32 +02:00
version = "2.6.5";
pname = "jbake";
2017-12-27 02:06:19 +01:00
2017-12-29 03:24:47 +01:00
src = fetchzip {
url = "https://dl.bintray.com/jbake/binary/${pname}-${version}-bin.zip";
2020-05-05 15:05:32 +02:00
sha256 = "0ripayv1vf4f4ylxr7h9kad2xhy3y98ca8s4p38z7dn8l47zg0qw";
2017-12-29 03:24:47 +01:00
};
2017-12-27 02:06:19 +01:00
nativeBuildInputs = [ makeWrapper ];
buildInputs = [ jre ];
2017-12-27 02:06:19 +01:00
postPatch = "patchShebangs .";
2017-12-29 03:24:47 +01:00
installPhase = ''
mkdir -p $out
cp -vr * $out
wrapProgram $out/bin/jbake --set JAVA_HOME "${jre}"
2017-12-29 03:24:47 +01:00
'';
2017-12-27 02:06:19 +01:00
2018-05-16 07:54:45 +02:00
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/";
2017-12-29 03:24:47 +01:00
license = licenses.mit;
maintainers = with maintainers; [ moaxcp ];
};
2017-12-27 02:06:19 +01:00
}