mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-15 10:12:58 +00:00
4a22edafaa
To resolve dependecies in `bb.edn` files, Babashka depends on some Clojure files and Java, see: https://github.com/borkdude/deps.clj/tree/master#deps_clj_tools_dir The wrapper also adds rlwrap, as recommended in the Babashka documentation: https://book.babashka.org/#_repl I'm also formatting the file with nixpkgs-fmt
44 lines
973 B
Nix
44 lines
973 B
Nix
{ lib
|
|
, stdenvNoCC
|
|
, fetchFromGitHub
|
|
, makeWrapper
|
|
, babashka-unwrapped
|
|
}:
|
|
|
|
stdenvNoCC.mkDerivation rec {
|
|
pname = "bbin";
|
|
version = "0.1.5";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "babashka";
|
|
repo = "bbin";
|
|
rev = "v${version}";
|
|
sha256 = "sha256-5hohAr6a8C9jPwhQi3E66onSa6+P9plS939fQM/fl9Q=";
|
|
};
|
|
|
|
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 \
|
|
--prefix PATH : "${lib.makeBinPath [ babashka-unwrapped babashka-unwrapped.graalvmDrv ]}"
|
|
|
|
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-unwrapped.meta) platforms;
|
|
maintainers = with maintainers; [ sohalt ];
|
|
};
|
|
}
|