Skip to content

Instantly share code, notes, and snippets.

@FelipeCortez
Created November 28, 2020 12:17
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save FelipeCortez/f9f6f3b553d53801a61c02c048b8cc4c to your computer and use it in GitHub Desktop.
{ stdenv, unzip, pkgs, autoPatchelfHook, zlib}:
pkgs.stdenv.mkDerivation {
name = "babashkabin";
src = pkgs.fetchurl {
url = "https://github.com/borkdude/babashka/releases/download/v0.2.4/babashka-0.2.4-linux-amd64.zip";
sha256 = "d56ff45b80226685bf2f804718780a82d30cffa4bda701a28cb170de176bc1fa";
};
nativeBuildInputs = [ unzip autoPatchelfHook ];
buildInputs = [ stdenv.cc.cc zlib ];
unpackCmd = ''
mkdir out
unzip $curSrc -d out
'';
installPhase = ''
mkdir -p $out/bin
cp bb $out/bin/bb
chmod +x $out/bin/bb
'';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment