-
-
Notifications
You must be signed in to change notification settings - Fork 13.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bun: add baseline release #313760
base: master
Are you sure you want to change the base?
bun: add baseline release #313760
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice, though tbh i'm not a fan of polluting the packages namespace like this. mind if we make this passthru.baseline
instead?
what do you mean? combine two sources into one file and make some flag to switch between them? sorry, i am pretty new to nix, i don't know all best practices) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no worries at all! these 2 changes and any other changes needed to get it working :)
ideally we select src
before calling buildBun
, and depending on system also add the result of a buildBun <baseline source>
pkgs/development/web/bun/bun.nix
Outdated
, common-updater-scripts | ||
}: | ||
|
||
{ sources, version }: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
{ sources, version }: | |
{ src, version, baseline ? null }: |
pkgs/development/web/bun/bun.nix
Outdated
''; | ||
|
||
passthru = { | ||
inherit sources; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
inherit sources; | |
inherit baseline; |
pkgs/top-level/all-packages.nix
Outdated
inherit | ||
({ | ||
bun = callPackage ../development/web/bun { }; | ||
bunBaseline = callPackage ../development/web/bun/baseline.nix { }; | ||
}) | ||
bun | ||
bunBaseline | ||
; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh and in addition to ^ revert this as well
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for future reference, the diff you wrote here is also equivalent to:
inherit | |
({ | |
bun = callPackage ../development/web/bun { }; | |
bunBaseline = callPackage ../development/web/bun/baseline.nix { }; | |
}) | |
bun | |
bunBaseline | |
; | |
bun = callPackage ../development/web/bun { }; | |
bunBaseline = callPackage ../development/web/bun/baseline.nix { }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah if this change could be applied that'd be great thanks
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah yeah, in that case, you should either:
- move
bun/baseline.nix
toby-name/bu/bunBaseline/package.nix
as suggested by the error message- you can leave
bun/default.nix
where it's at if you'd like
- you can leave
- OR implement the
passthru
option as i suggested above- i'm realizing this would also probably mean setting
bunBaseline = pkgs.bun.passthru.baseline
inaliases.nix
instead of modifyingall-packages.nix
- i'm realizing this would also probably mean setting
@06kellyjac seems to prefer option 1, i personally prefer option 2, i don't think either of us will care which gets implemented so the decision is up to you :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was just about to say to fix this issue do a passthru.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Generally looks good with 1 change.
I probably would lean towards separate attributes in all-pacakges rather than the passthru option as it's more visible in the search.
pkgs/top-level/all-packages.nix
Outdated
inherit | ||
({ | ||
bun = callPackage ../development/web/bun { }; | ||
bunBaseline = callPackage ../development/web/bun/baseline.nix { }; | ||
}) | ||
bun | ||
bunBaseline | ||
; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah if this change could be applied that'd be great thanks
also if you rebase off of master, you'll see the hashes are for 1.1.10 |
so i moved
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks great, thank you!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
reapproving
sorry to bother you, i understand correctly that we are waiting for the second contributor to complete review? |
Before merging though, the two youngest commits should probably be removed. If you rebase this PR, those commits should no longer be necessary. |
Result of 1 package built:
|
hi. regarding this commit - what decision would be more reasonable?
|
I would say first one as support as a pr will most likely be made for this version some time in the future. |
there are 2 problems:
so i can't just create separate baseline package that shares logic with default package due to this limitations correct me if i'm wrong and there is some better way to share logic between two packages |
Ops wrong reference. |
Until this is merged, is there another way to install |
you can override source archive bunBaseline = pkgs.bun.overrideAttrs rec {
passthru.sources."x86_64-linux" = pkgs.fetchurl {
url = "https://github.com/oven-sh/bun/releases/download/bun-v1.1.27/bun-linux-x64-baseline.zip";
hash = "sha256-FwkVP5lb2V9E8YGPkTAqVMsZmaZXMq8x5AR+99cuIX0=";
};
src = passthru.sources."x86_64-linux";
}; |
Description of changes
regular bun release works only on CPUs that support AVX instructions. bun has separate baseline releases that don't require AVX instructions
added
bunBaseline
package which uses baseline release(fixes #298612)Things done
nix.conf
? (See Nix manual)sandbox = relaxed
sandbox = true
nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)Add a 👍 reaction to pull requests you find important.