Conversation
| let | ||
| version = "0.0.52"; | ||
| checksum = "88k0RW6/X/CudqExRwnbfzpKcxHJ3BvtvX2dIudqU+A="; | ||
| bun_install = "/home/<whatever>/.bun"; # Set this to where you want bun's cache |
There was a problem hiding this comment.
Would it be possible to fill this in with the current user's home directory instead of manually editing?
There was a problem hiding this comment.
It could be $HOME/.bun, I just forget if that will evaluate to the root's home directory or the user's (since the package might be built with superuser permissions). I'm pretty sure it's the user's though
There was a problem hiding this comment.
getEnv can be used for this, I believe:
| bun_install = "/home/<whatever>/.bun"; # Set this to where you want bun's cache | |
| bun_install = "{builtins.getEnv "HOME"}/.bun"; |
https://nixos.org/manual/nix/stable/expressions/builtins.html#builtins-getEnv
There was a problem hiding this comment.
Just wrap with escaped $ so it evaluates when ran rather than in the build
|
|
||
| ### Nix | ||
|
|
||
| There is a `default.nix` file bundled with Bun's source. This could eventually be brought to Nixpkgs, but for now, you can run and install it like any other nix package. |
There was a problem hiding this comment.
Would it be possible to pass a url to nix? If so, I could get the default.nix package up on bun.sh
There was a problem hiding this comment.
You can build a remote expressions to an extent yeah
https://nixos.org/manual/nix/stable/command-ref/nix-build.html
With nix 3.0 & flakes you can easily do something like
nix build github:Jarred-Summer/bun
There's probably a way to set up a domain name but not played with it
Suya1671
left a comment
There was a problem hiding this comment.
Maybe add a flake.nix for flake users?
|
Related: NixOS/nixpkgs#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 😄 |
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 |
|
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 |
We 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 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 |
As discussed in the discord, this PR adds experimental Nix support via a
default.nixfile and a small note in the README. While this is great and all, it still leaves many unanswered questions:Should use/update check-sums?As mentioned in the discord by @Jarred-Sumner
default.zigfile upon each new release with theMakefile?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.