Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib
2, stdenvNoCC
3, fetchFromGitHub
4, makeWrapper
5, babashka
6, graalvm17-ce
7}:
8
9stdenvNoCC.mkDerivation rec {
10 pname = "bbin";
11 version = "0.1.5";
12
13 src = fetchFromGitHub {
14 owner = "babashka";
15 repo = "bbin";
16 rev = "v${version}";
17 sha256 = "sha256-5hohAr6a8C9jPwhQi3E66onSa6+P9plS939fQM/fl9Q=";
18 };
19
20 nativeBuildInputs = [ makeWrapper ];
21
22 dontConfigure = true;
23 dontBuild = true;
24
25 installPhase = ''
26 runHook preInstall
27
28 install -D bbin $out/bin/bbin
29 mkdir -p $out/share
30 cp -r docs $out/share/docs
31 wrapProgram $out/bin/bbin \
32 --prefix PATH : "${lib.makeBinPath [ babashka babashka.graalvmDrv ]}"
33
34 runHook postInstall
35 '';
36
37 meta = with lib; {
38 homepage = "https://github.com/babashka/bbin";
39 description = "Install any Babashka script or project with one command";
40 license = licenses.mit;
41 inherit (babashka.meta) platforms;
42 maintainers = with maintainers; [ sohalt ];
43 };
44}