2022-11-08 12:19:05 +01:00
|
|
|
{ lib
|
|
|
|
, stdenvNoCC
|
|
|
|
, fetchFromGitHub
|
|
|
|
, makeWrapper
|
|
|
|
, babashka
|
|
|
|
, graalvm17-ce
|
|
|
|
}:
|
|
|
|
|
|
|
|
stdenvNoCC.mkDerivation rec {
|
|
|
|
pname = "bbin";
|
2023-01-06 13:14:10 +01:00
|
|
|
version = "0.1.5";
|
2022-11-08 12:19:05 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "babashka";
|
|
|
|
repo = "bbin";
|
|
|
|
rev = "v${version}";
|
2023-01-06 13:14:10 +01:00
|
|
|
sha256 = "sha256-5hohAr6a8C9jPwhQi3E66onSa6+P9plS939fQM/fl9Q=";
|
2022-11-08 12:19:05 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
|
|
|
|
dontConfigure = true;
|
|
|
|
dontBuild = true;
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
runHook preInstall
|
|
|
|
|
|
|
|
install -D bbin $out/bin/bbin
|
|
|
|
mkdir -p $out/share
|
|
|
|
cp -r docs $out/share/docs
|
|
|
|
wrapProgram $out/bin/bbin \
|
2023-02-11 15:03:22 +01:00
|
|
|
--prefix PATH : "${lib.makeBinPath [ babashka babashka.graalvmDrv ]}"
|
2022-11-08 12:19:05 +01:00
|
|
|
|
|
|
|
runHook postInstall
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://github.com/babashka/bbin";
|
|
|
|
description = "Install any Babashka script or project with one command";
|
|
|
|
license = licenses.mit;
|
|
|
|
inherit (babashka.meta) platforms;
|
|
|
|
maintainers = with maintainers; [ sohalt ];
|
|
|
|
};
|
|
|
|
}
|