jbang: init at 0.58.0

This commit is contained in:
John Mercier 2021-01-09 22:45:01 -05:00
parent 2032339e5b
commit 1288812ae0
2 changed files with 42 additions and 0 deletions

View File

@ -0,0 +1,40 @@
{ stdenv, lib, fetchzip, jdk, makeWrapper, coreutils, curl }:
stdenv.mkDerivation rec {
version = "0.58.0";
pname = "jbang";
src = fetchzip {
url = "https://github.com/jbangdev/jbang/releases/download/v${version}/${pname}-${version}.tar";
sha256 = "sha256:08haij8nzzf2759ddzx0i6808g2if0v2fc21mlz00kmggjc03xz3";
};
nativeBuildInputs = [ makeWrapper ];
installPhase = ''
runHook preInstall
rm bin/jbang.{cmd,ps1}
rmdir tmp
cp -r . $out
wrapProgram $out/bin/jbang \
--set JAVA_HOME ${jdk} \
--set PATH ${lib.makeBinPath [ coreutils jdk curl ]}
runHook postInstall
'';
installCheckPhase = ''
$out/bin/jbang --version 2>&1 | grep -q "${version}"
'';
meta = with stdenv.lib; {
description = "Run java as scripts anywhere";
longDescription = ''
jbang uses the java language to build scripts similar to groovy scripts. Dependencies are automatically
downloaded and the java code runs.
'';
homepage = "https://https://www.jbang.dev/";
license = licenses.mit;
platforms = platforms.all;
maintainers = with maintainers; [ moaxcp ];
};
}

View File

@ -11868,6 +11868,8 @@ in
jbake = callPackage ../development/tools/jbake { };
jbang = callPackage ../development/tools/jbang { };
jikespg = callPackage ../development/tools/parsing/jikespg { };
jenkins = callPackage ../development/tools/continuous-integration/jenkins { };