bun
bun copied to clipboard
Add experimental nix support
As discussed in the discord, this PR adds experimental Nix support via a default.nix file and a small note in the README. While this is great and all, it still leaves many unanswered questions:
- Should we be building from source instead? (Currently unfeasible for multiple reasons, but good long term)
- How should we handle updating versions?
- Should we just use the latest version at all times?
- ~~Should use/update check-sums?~~
As mentioned in the discord by @Jarred-Sumner
There have been a couple cases where I had to re-upload the version after some build issue so it might make sense to forgo the checksum for now
- Should we dynamically update the
default.zigfile upon each new release with theMakefile?
- Should we provide more detailed instructions on how to install with Nix?
- When is the right time to submit to nixpkgs?
- How should we handle configuring Bun's cache directory?
and the list goes on.
There are definitely a few things that should be fixed here, this is a decent starting point to build upon.
Related: https://github.com/NixOS/nixpkgs/pull/180299
I think the main benefit of nix in this repo would be pulling in any missing dependencies in a nix dev shell
--
If we also want a package, copying the PR would be good. A source build is an option for the future.
As a note nixpkgs could never fetch nix files from this repo to add the package (that would be IFD (Import From Derivation))
For a reference of another project that offers a package/overlay neovim has some nix stuff in the contrib folder
I have created a flake for getting the Bun binary here: bun-flake. Feel free to steal it :smile:
I have created a flake for getting the Bun binary here: bun-flake. Feel free to steal it smile
Ty, just stole your code and added a bump script in our overlay
Every day at 6am it will verify automagically for new versions and bump
https://github.com/nixosbrasil/nixpkgs-brasil/tree/master/pacotes/utilitarios/bun
Hey! Just wanting to bump this and to see if there's been any headway in being able to openly support nix builds using flakes? I would attempt it myself, but I'm not experienced enough with nixos as yet
I can see that the package is available on search.nixos.org. But only from version 0.6.2 and not as a flake
Hey! Just wanting to bump this and to see if there's been any headway in being able to openly support nix builds using flakes? I would attempt it myself, but I'm not experienced enough with nixos as yet
I can see that the package is available on search.nixos.org. But only from version
0.6.2and not as a flake
We have bun packaged in binary form in our community overlay
It's updated every night
https://github.com/nixosbrasil/nixpkgs-brasil
Hey! Just wanting to bump this and to see if there's been any headway in being able to openly support nix builds using flakes? I would attempt it myself, but I'm not experienced enough with nixos as yet
I can see that the package is available on search.nixos.org. But only from version
0.6.2and not as a flakeWe have bun packaged in binary form in our community overlay
It's updated every night
https://github.com/nixosbrasil/nixpkgs-brasil
I was kind of confused about the whole discussion as it's not a release that stems from the oven-sh organisation. So I wasn't sure if that was an official package. On top of that, I'm very new to nix and so I was trying to figure out how to install the latest version of it.
I forgot to document on here, but I was able to install the latest version of bun using unstable-nix.pkg and not just nixpkg.
An example of my configuration.nix in case anyone else is still getting their bearings