--- /dev/null
+(define-module (infiniteadaptability packages bun)
+ #:use-module (gnu packages)
+ #:use-module (gnu packages base)
+ #:use-module (gnu packages commencement)
+ #:use-module (gnu packages compression)
+ #:use-module (gnu packages gcc)
+ #:use-module (guix build-system copy)
+ #:use-module (guix download)
+ #:use-module (guix gexp)
+ #:use-module (guix git-download)
+ #:use-module (guix licenses)
+ #:use-module (guix packages)
+ #:use-module (nonguix build-system binary))
+
+(define-public bun
+ (package
+ (name "bun")
+ (version "1.2.23")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append
+ "https://github.com/oven-sh/bun/releases/download/bun-v" version
+ "/bun-linux-x64.zip"))
+ (sha256
+ (base32 "03hzzvgk2y4wylk7yh1h4lyg4avkdpkcmq74zmpmg7br42lx03ng"))))
+ (supported-systems '("x86_64-linux"))
+ (build-system binary-build-system)
+ (arguments
+ (list
+ #:validate-runpath? #t
+ #:strip-binaries? #f
+ #:patchelf-plan `'(("bun" ("gcc" "gcc-toolchain" "glibc")))
+ #:install-plan
+ #~'(("bun" "bin/"))))
+ (inputs `((,gcc "lib") ,gcc-toolchain ,glibc))
+ (native-inputs (list unzip))
+ (synopsis
+ "Bun is an all-in-one toolkit for JavaScript and TypeScript apps.")
+ (description
+ "Bun is an all-in-one toolkit for JavaScript and TypeScript apps. It ships as a single executable called bun.
+
+ At its core is the Bun runtime, a fast JavaScript runtime designed as a drop-in replacement for Node.js. It's written in Zig and powered by JavaScriptCore under the hood, dramatically reducing startup times and memory usage.
+
+ The bun command-line tool also implements a test runner, script runner, and Node.js-compatible package manager. Instead of 1,000 node_modules for development, you only need bun. Bun's built-in tools are significantly faster than existing options and usable in existing Node.js projects with little to no changes.")
+ (license expat)
+ (home-page "https://bun.sh")))
+
+(define-public bunx
+ (package
+ (name "bunx")
+ (version "1.2.23")
+ (source
+ (plain-file "bunx" "#!/bin/bash\nbun x \"$@\""))
+ (build-system copy-build-system)
+ (arguments
+ `(#:install-plan '(("bunx" "bin/bunx"))
+ #:phases (modify-phases %standard-phases
+ (add-after 'unpack 'fix-permissions
+ (lambda _
+ (for-each (lambda (file)
+ (chmod file #o555))
+ (find-files "bunx")) #t)))))
+ (home-page "https://bun.sh")
+ (synopsis "bunx")
+ (description "bunx")
+ (license unlicense)))
+
+bun