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

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

36 lines
933 B
Nix
Raw Normal View History

{ lib, stdenv, fetchzip, makeWrapper, jre }:
2017-12-27 01:06:19 +00:00
stdenv.mkDerivation rec {
2022-06-19 12:22:14 +00:00
version = "2.6.7";
pname = "jbake";
2017-12-27 01:06:19 +00:00
2017-12-29 02:24:47 +00:00
src = fetchzip {
2022-06-19 12:22:14 +00:00
url = "https://github.com/jbake-org/jbake/releases/download/v${version}/jbake-${version}-bin.zip";
sha256 = "sha256-kikGnFsParq8g0dzzYtMr2vIJD2ie8PeF6TG2G5K7KE=";
2017-12-29 02:24:47 +00:00
};
2017-12-27 01:06:19 +00:00
nativeBuildInputs = [ makeWrapper ];
buildInputs = [ jre ];
2017-12-27 01:06:19 +00:00
postPatch = "patchShebangs .";
2017-12-29 02:24:47 +00:00
installPhase = ''
mkdir -p $out
cp -vr * $out
wrapProgram $out/bin/jbake --set JAVA_HOME "${jre}"
2017-12-29 02:24:47 +00:00
'';
2017-12-27 01:06:19 +00:00
2018-05-16 05:54:45 +00: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 02:24:47 +00:00
license = licenses.mit;
maintainers = with maintainers; [ moaxcp ];
};
2017-12-27 01:06:19 +00:00
}