1 Commits

Author SHA1 Message Date
phundrak 18417731d6 fix(bun): fix bun and bun-dependent packages on old CPUs 2026-07-09 15:49:48 +02:00
3 changed files with 16 additions and 9 deletions
+4 -5
View File
@@ -14,10 +14,9 @@
version ? "1.3.13",
}: let
# When updating `version`, compute the new hash with:
# nix store prefetch-file "https://github.com/oven-sh/bun/releases/download/bun-v${version}/bun-linux-x64-baseline.zip"
hash = {
"1.3.13" = "sha256-nYokKSpwaAkCBdqsCloiP19pc29Sh+N7+I07QDHtx1A=";
};
# nix store prefetch-file \
# "https://github.com/oven-sh/bun/releases/download/bun-v${version}/bun-linux-x64-baseline.zip"
hash = "sha256-nYokKSpwaAkCBdqsCloiP19pc29Sh+N7+I07QDHtx1A=";
in
stdenvNoCC.mkDerivation {
pname = "bun-baseline";
@@ -25,7 +24,7 @@ in
src = fetchurl {
url = "https://github.com/oven-sh/bun/releases/download/bun-v${version}/bun-linux-x64-baseline.zip";
hash = hash.${version};
inherit hash;
};
nativeBuildInputs =
+12 -3
View File
@@ -13,16 +13,25 @@ with lib; let
# Intel Core i5 2640M.
needsBaselineBun =
pkgs.stdenv.hostPlatform.isx86_64 && !pkgs.stdenv.hostPlatform.avx2Support;
bunBaseline = pkgs.callPackage ../../../../packages/bun-baseline.nix {};
defaultPackageCli =
if needsBaselineBun
then pkgs.opencode.override {bun = bunBaseline;}
then
pkgs.opencode.override {
bun = pkgs.callPackage ../../../../packages/bun-baseline.nix {
version = pkgs.bun.version;
};
}
else pkgs.opencode;
defaultPackageDesktop =
if needsBaselineBun
then pkgs.opencode-desktop.override {bun = bunBaseline;}
then
pkgs.opencode-desktop.override {
bun = pkgs.callPackage ../../../../packages/bun-baseline.nix {
version = pkgs.bun.version;
};
}
else pkgs.opencode-desktop;
corsList = domains: lists.remove "" (lists.forEach (strings.splitString "," domains) trim);
-1
View File
@@ -106,7 +106,6 @@
);
};
};
media.mopidy.enable = false;
};
manual = {