Skip to content

Commit 31c79a6

Browse files
authored
feat: add bun 1.3 support (#473)
2 parents a3a6925 + 92a6f73 commit 31c79a6

File tree

5 files changed

+15
-14
lines changed

5 files changed

+15
-14
lines changed

pkgs/bun/default.nix

Lines changed: 0 additions & 11 deletions
This file was deleted.

pkgs/modules/bun/default.nix

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,14 @@
1+
# NOTE: Unlike Node.js, nixpkgs doesn't provide versioned bun attributes (e.g., bun_1_3).
2+
# This module uses pkgs.bun which tracks the latest version.
3+
#
4+
# When nixpkgs updates bun to a new major.minor version:
5+
# 1. Add the previous version to pkgs/historical-modules/default.nix, pinned to the
6+
# commit before the nixpkgs update
7+
# 2. Update pkgs/upgrade-map/default.nix to chain the old version to the new one
8+
{ bun }:
19
{ pkgs, lib, ... }:
210

311
let
4-
bun = pkgs.callPackage ../../bun { };
512
bun-wrapped = pkgs.lib.mkWrapper-replit_ld_library_path bun;
613

714
extensions = [ ".js" ".jsx" ".cjs" ".mjs" ".ts" ".tsx" ".mts" ];

pkgs/modules/default.nix

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,9 @@ let
9191
nodejs = pkgs.nodejs_24;
9292
})
9393
(import ./bash)
94-
(import ./bun)
94+
(import ./bun {
95+
bun = pkgs.bun;
96+
})
9597
(import ./c)
9698
(import ./cpp)
9799
(import ./dart)

pkgs/modules/nodejs/default.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ let
66

77
short-version = lib.versions.major nodejs.version;
88

9-
bun = pkgs.callPackage ../../bun { };
9+
bun = pkgs.bun;
1010

1111
nodepkgs = pkgs.nodePackages.override {
1212
inherit nodejs;

pkgs/upgrade-map/default.nix

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ let
1010
"bun-0.5" = "bun-0.6";
1111
"bun-0.6" = "bun-0.7";
1212
"bun-0.7" = "bun-1.0";
13+
"bun-1.0" = "bun-1.1";
14+
"bun-1.1" = "bun-1.2";
15+
"bun-1.2" = "bun-1.3";
1316
"dart-3.0" = "dart-3.1";
1417
"dart-3.1" = "dart-3.2";
1518
"dart-3.2" = "dart-3.3";

0 commit comments

Comments
 (0)