all repos — flake @ 55f514388b66158b0380ff8185201eefc882c37e

got my cool flake

pkgs/bun.nix (view raw)

 1
 2
 3
 4
 5
 6
 7
 8
 9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
{ stdenv, fetchzip, ... }:

stdenv.mkDerivation rec {
  pname = "bun-baseline";
  version = "1.3.13";

  src = fetchzip {
    url = "https://github.com/oven-sh/bun/releases/download/bun-v${version}/bun-linux-x64-baseline.zip";
    sha256 = "sha256-MVuzDiwKGjJ9mLFH9WqeoK9Hhbh4T47S/zLZ1YivvxY=";
    stripRoot = false;
  };

  installPhase = ''
    mkdir -p $out/bin
    cp bun-linux-x64-baseline/bun $out/bin/bun
    ln -s $out/bin/bun $out/bin/bunx
    chmod +x $out/bin/bun
  '';

  meta = {
    description = "Bun baseline binary for older CPUs";
    homepage = "https://bun.sh";
    platforms = [ "x86_64-linux" ];
  };
}