-
Notifications
You must be signed in to change notification settings - Fork 0
Feature implementation from commits b02f1c6..50fc8d2 #2
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
base: feature-base-2
Are you sure you want to change the base?
Conversation
…com#2467) The string form of GitHub flakeref can only have a rev or a ref, not both. For example: - Good: `github:NixOS/nixpkgs/b321c8e818546d5491ee5611476500557b880856` - Good: `github:NixOS/nixpkgs/nixpkgs-unstable` - Bad: `github:NixOS/nixpkgs/nixpkgs-unstable/b321c8e818546d5491ee5611476500557b880856` If both the Rev and Ref fields are set, use Rev.
…fy-com#2468) ## Summary Adds a `$MYSQL_CONF` env var to the MySQL Plugin to allow a custom `my.cnf` (MySQL config file). MySQL does not provide an environment variable, command line flag, or anything else to change the location (it's always computed as `$MYSQL_HOME/my.cnf`), so we simply create a symlink there pointing to the user's config. ## How was it tested? - Forked devbox, made changes to the mysql plugin, and ensured everything worked in a custom project. --------- Co-authored-by: John Lago <[email protected]>
## Summary Adds a very basic elixir plugin to simplify installation to a simple `devbox add elixir`. Also now properly stores Mix/Hex artifacts in `.devbox/virtenv`. ## How was it tested? - Tested it against the existing elixir example in the repo. Seems to work fine. - Tested on my own projects as well, separately on Mac + Ubuntu.
Make the `stdenv` (and other flakerefs) lockable and updateable. This makes it possible to update the stdenv with a regular `devbox update` and simplifies the logic for how the stdenv commit is chosen: 1. If there's no stdenv flakeref in devbox.lock, resolve github:NixOS/nixpkgs/nixpkgs-unstable to a locked ref and store it in the lockfile. 2. Otherwise, use the ref in the lockfile.
Move `internal/nix.cmd` and friends to the top-level nix package and export it. The constructor function is now a `Nix.Command` method. New commands use `Nix.Logger` for debug logs and include default arguments from `Nix.ExtraArgs`. As a convenience, the package-level `Command` function calls `Default.Command` (which uses the default Nix installation found in $PATH).
This allows to have a consistent output from `devbox run`. Closes jetify-com#1631 and jetify-com#1991. ## Summary ## How was it tested? I tested running multiple times `devbox run` in different project where I use it.
## Summary ## How was it tested?
## Summary This allows to cancel the search request. ## How was it tested? Mostly manual testing
## Summary TSIA ## How was it tested?
## Summary fixes https://github.com/jetify-com/devbox/security/dependabot/197 ## How was it tested?
## Summary This allow to present all new versions available for the pkg installed. It is a lot useful because otherwise you need to check this manually. ## How was it tested? In a different repository, this is the output. <img width="383" alt="Screenshot 2025-01-31 at 17 54 25" src="https://github.com/user-attachments/assets/6041e24a-8c1c-4d74-8213-99738959cc17" /> --------- Co-authored-by: John Lago <[email protected]>
This comment was incorrect. It IsDevboxPackage returns true for runx (which is okay for this function) ## Summary ## How was it tested? Signed-off-by: savil <[email protected]>
As part of the auto-patching for CUDA, devbox searches for the system's libcuda (installed by the driver) and adds it to the Nix store. This fixes a couple of bugs with that search process: - When creating the soname links, the base name of the path to libcuda wasn't being used. This would lead to creating symlinks like "lib/libcuda.so.1", which would fail because a lib subdirectory didn't exist. - Ensure the `src` attribute is set in the patch flake so that devbox knows the path the flake source (which contains the copied libcuda) at build time.
…ify-com#2511) ## Summary Fixes jetify-com#2510 Previously, `devbox ls --outdated` would error on packages that it could not resolve, like `stdenv.cc.cc.lib` or `darwin.apple_sdk.frameworks.IOKit`. This prevented devbox from checking if the rest of the packages were outdated. This PR changes the error to a warning, so the rest of the version checks can proceed ## How was it tested? 1. Create a devbox.json 2. Add standard packages using `devbox add` 3. Add `stdenv.cc.cc.lib` or `darwin.apple_sdk.frameworks.IOKit` to the project 4. Verify that `devbox ls --outdated` shows a warning for the non-versioned packages instead of an error.
## Summary As part of getting devbox working in renovate, we need to run devbox in renovate's base image (added here containerbase/base#3191). The problem is the way nix is installed (already in that image) it cannot actually install anything. This is because it's a quirky variant of a single user install where all the `/nix/*` paths are set to custom values. We can work around this by just having devbox update the lockfile but not actually install anything (which is also a speed win) - but this functionality doesn't seem to available in the devbox cli currently. This is a potential implementation adding what we need for renovate to upgrade devbox projects. Happy for you to do it another way. The approach we've taken seems like it's misusing the `mode` variable a little bit. ## How was it tested? Manually tested only; run locally on a macbook, plus in the container linked above. - add some packages that are older - upgrade them by manually editing devbox.json - run `devbox update --no-install` to update all packages in `devbox.lock` to latest within ranges `devbox.json` - in the container this failed with `cmd.path=/usr/local/bin/nix cmd.stderr="cannot connect to socket at '/tmp/containerbase/cache/nix/state/daemon-socket/socket': No such file or directory"` but with this change it works - run `devbox update nodejs --no-install` also works for a single package - changes to lockfile seem to be the same as `devbox update` without the flag, so behaviour of this flag shouldn't surprise anyone
// PackageIsInsecure is a fun little nix eval that maybe works. | ||
func PackageIsInsecure(path string) bool { | ||
cmd := command("eval", path+".meta.insecure") | ||
cmd := Command("eval", path+".meta.insecure") |
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.
🐛 Correctness Issue
Undefined function reference.
The code was calling a non-existent lowercase 'command' function instead of the properly defined uppercase 'Command' function, which would cause compilation failure.
Current Code (Diff):
- cmd := command("eval", path+".meta.insecure")
+ cmd := Command("eval", path+".meta.insecure")
📝 Committable suggestion
‼️ IMPORTANT
Trust, but verify! 🕵️ Please review this suggestion with the care of a code archaeologist - check that it perfectly replaces the highlighted code, preserves all lines, maintains proper indentation, and won't break anything in production. Your future self will thank you! 🚀
cmd := Command("eval", path+".meta.insecure") | |
cmd := Command("eval", path+".meta.insecure") |
This PR contains changes from a range of commits from the original repository.
Commit Range:
b02f1c6..50fc8d2
Files Changed: 58 (38 programming files)
Programming Ratio: 65.5%
Commits included:
devbox update
(add --no-install flag todevbox update
jetify-com/devbox#2508)search
(fix: pass a ctx to client searchersearch
jetify-com/devbox#2495)... and 5 more commits