From 8457e1eeefe9ccab04c1a8f09efd361003aa2d56 Mon Sep 17 00:00:00 2001 From: pinage404 Date: Sun, 3 Sep 2023 14:39:13 +0200 Subject: [PATCH 1/9] docs: fix typo --- docs/app/docs/configuration.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/app/docs/configuration.md b/docs/app/docs/configuration.md index 8a8cdf9048c..6fe8468a001 100644 --- a/docs/app/docs/configuration.md +++ b/docs/app/docs/configuration.md @@ -85,7 +85,7 @@ Currently, you can only set values using string literals, `$PWD`, and `$PATH`. A ### Shell -The Shell object defines init hooks and scripts that can be run with your shell. Right now two fields are supported: *init_hooks*, which run a set of commands every time you start a devbox shell, and *scripts*, which are commands that can be run using `devbox run` +The Shell object defines init hooks and scripts that can be run with your shell. Right now two fields are supported: *init_hook*, which run a set of commands every time you start a devbox shell, and *scripts*, which are commands that can be run using `devbox run` #### Init Hook From 9115e2348cd40259bef0445d759bbf1dfae8efe9 Mon Sep 17 00:00:00 2001 From: pinage404 Date: Sun, 3 Sep 2023 14:40:06 +0200 Subject: [PATCH 2/9] docs: prefer code than emphasis --- docs/app/docs/configuration.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/app/docs/configuration.md b/docs/app/docs/configuration.md index 6fe8468a001..536e072d5b8 100644 --- a/docs/app/docs/configuration.md +++ b/docs/app/docs/configuration.md @@ -85,7 +85,7 @@ Currently, you can only set values using string literals, `$PWD`, and `$PATH`. A ### Shell -The Shell object defines init hooks and scripts that can be run with your shell. Right now two fields are supported: *init_hook*, which run a set of commands every time you start a devbox shell, and *scripts*, which are commands that can be run using `devbox run` +The Shell object defines init hooks and scripts that can be run with your shell. Right now two fields are supported: `init_hook`, which run a set of commands every time you start a devbox shell, and `scripts`, which are commands that can be run using `devbox run` #### Init Hook From 850d77196ce5604e0e21ca3f93a0acbeac6d3f76 Mon Sep 17 00:00:00 2001 From: pinage404 Date: Sun, 3 Sep 2023 14:44:51 +0200 Subject: [PATCH 3/9] docs: it says that we install Python but the command is for RipGrep --- docs/app/docs/quickstart.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/app/docs/quickstart.mdx b/docs/app/docs/quickstart.mdx index a205629c519..67e5b31f7e2 100644 --- a/docs/app/docs/quickstart.mdx +++ b/docs/app/docs/quickstart.mdx @@ -45,7 +45,7 @@ We'll create a new development environment with the packages we need. These pack 3. Search for packages to add to your Devbox project with `devbox search`. For example, to search for Python packages, you can run the `devbox search python3` -4. You can add a package to your project by running `devbox add `. For example, running the following will install the latest available version of Python in your project: +4. You can add a package to your project by running `devbox add `. For example, running the following will install the latest available version of RipGrep in your project: ```bash devbox add ripgrep From 6bc0f3c2f2a8213b4062563e7647bcb666369db6 Mon Sep 17 00:00:00 2001 From: pinage404 Date: Sun, 3 Sep 2023 14:57:24 +0200 Subject: [PATCH 4/9] docs: the example was not valid Copy examples from the repo https://github.com/jetpack-io/devbox/blob/066944e75daee77dc79c130753378c72bdd4afde/examples/development/rust/rust-stable-hello-world/devbox.json#L1C1-L23C2 --- docs/app/docs/configuration.md | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/docs/app/docs/configuration.md b/docs/app/docs/configuration.md index 536e072d5b8..b0168415bb1 100644 --- a/docs/app/docs/configuration.md +++ b/docs/app/docs/configuration.md @@ -176,23 +176,24 @@ An example of a devbox configuration for a Rust project called `hello_world` mig ```json { "packages": [ - "rustc", - "cargo", - "libiconv" + "rustup@latest", + "libiconv@latest" ], "env": { - "RUST_BACKTRACE": "1" + "PROJECT_DIR": "$PWD" }, "shell": { "init_hook": [ - "source conf/set-environment.sh", + ". conf/set-env.sh", "rustup default stable", "cargo fetch" ], "scripts": { - "test": "cargo test -- --show-output", - "start" : "cargo run", - "build-docs": "cargo doc" + "build-docs": "cargo doc", + "start": "cargo run", + "run_test": [ + "cargo test -- --show-output" + ] } } } From 828dacbbeee1681d9374b1a9bc3ce6f7fc1fd51f Mon Sep 17 00:00:00 2001 From: pinage404 Date: Sun, 3 Sep 2023 14:59:52 +0200 Subject: [PATCH 5/9] docs: the example was syntaxically invalid --- docs/app/docs/guides/pinning_packages.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/app/docs/guides/pinning_packages.md b/docs/app/docs/guides/pinning_packages.md index fd9af9e6366..1c2f80c0543 100644 --- a/docs/app/docs/guides/pinning_packages.md +++ b/docs/app/docs/guides/pinning_packages.md @@ -64,10 +64,10 @@ Whenever you run `devbox update`, packages with the latest tag will be updated t If you want to use a specific Nixpkg revision for a package, you can use a `github:nixos/nixpkgs/#` Flake reference. The example below shows how to install the `hello` package from a specific Nixpkg commit: ```json -} - "packages" : [ -"github:nixos/nixpkgs/5233fd2ba76a3accb5aaa999c00509a11fd0793c#hello" - ] +{ + "packages" : [ + "github:nixos/nixpkgs/5233fd2ba76a3accb5aaa999c00509a11fd0793c#hello" + ] } ``` Using multiple nixpkg commits may install duplicate packages and cause Nix Store bloat, so use this option sparingly. From 614491d080681bb1ea07b9ec0b0b9a162ec3e8e2 Mon Sep 17 00:00:00 2001 From: pinage404 Date: Sun, 3 Sep 2023 15:02:20 +0200 Subject: [PATCH 6/9] docs: it says that we search Python but the example was for NodeJS --- docs/app/docs/guides/pinning_packages.md | 30 ++++++++++++------------ 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/docs/app/docs/guides/pinning_packages.md b/docs/app/docs/guides/pinning_packages.md index 1c2f80c0543..8a5b6a7fa2a 100644 --- a/docs/app/docs/guides/pinning_packages.md +++ b/docs/app/docs/guides/pinning_packages.md @@ -17,21 +17,21 @@ Because the repository changes frequently, and new releases of Nixpkgs infrequen You can look up the available versions of a package by running `devbox search `. For example, to see the available versions of `python`, you can run `devbox search python`: ```bash -$ devbox search nodejs - -Found 168+ results for "nodejs": - -* nodejs (19.8.1, 19.7.0, 19.5.0, 19.2.0, 18.16.0, 18.15.0, 18.14.2, 18.13.0, 18.12.1, 18.10.0, -18.8.0, 18.4.0, 18.0.0, 17.9.0, 17.5.0, 17.3.0, 17.0.1, 16.19.1, 16.19.0, 16.18.1, 16.17.1, 16.17.0, -16.15.0, 16.14.0, 16.13.1, 16.13.0, 16.8.0, 16.4.0, 16.0.0, 15.14.0, 15.10.0, 15.5.0, 15.0.1, -14.18.1, 14.18.0, 14.17.5, 14.17.1, 14.16.1, 14.16.0, 14.15.3, 14.15.0, 14.9.0, 14.4.0, 13.14.0, -12.22.12, 12.22.10, 12.22.8, 12.22.7, 12.22.5, 12.22.1, 12.21.0, 12.20.0, 12.19.0, 12.18.3, -12.18.1, 10.24.1, 10.24.0, 10.23.0, 10.22.0, 10.21.0) -* nodejs_16 (16.20.0) -* nodejs_18 (18.16.0) -* nodejs_19 (19.9.0) -* nodejs_20 (20.0.0) -... +$ devbox search python +Found 50+ results for "python": + +* python (3.12.0b4, 3.12.0b3, 3.12.0b2, 3.12.0b1, 3.12.0a7, 3.12.0a6, 3.12.0a5, 3.12.0a3, 3.11.4, 3.11.3) +* python-qt (3.3.0, 3.2) +* python-full (3.11.4, 3.11.3, 3.11.2, 3.11.1, 3.10.12, 3.10.11, 3.10.10, 3.10.9, 3.10.8, 3.10.7) +* python2nix (20140927) +* pythonSexy (0.1.9) +* pythonIRClib (0.4.8) +* pythonmagick (0.9.16, 0.7) +* python-minimal (3.10.12, 3.10.11, 3.10.10, 3.10.9, 3.10.8, 3.10.7, 3.10.6, 3.10.5, 3.10.4, 3.9.13) +* python-launcher (1.0.0) +* mate.python-caja (1.26.0, 1.24.0, 1.22.1, 1.22.0, 1.20.2, 1.20.1) + +Warning: Showing top 10 results and truncated versions. Use --show-all to show all. ``` ### Adding a Specific Version to Devbox From 39c640eae754905efef09a342361a0c55be459a0 Mon Sep 17 00:00:00 2001 From: John Lago <750845+Lagoja@users.noreply.github.com> Date: Thu, 7 Sep 2023 10:27:27 -0700 Subject: [PATCH 7/9] Use Nodejs in the Example Signed-off-by: John Lago <750845+Lagoja@users.noreply.github.com> --- docs/app/docs/guides/pinning_packages.md | 27 +++++++++--------------- 1 file changed, 10 insertions(+), 17 deletions(-) diff --git a/docs/app/docs/guides/pinning_packages.md b/docs/app/docs/guides/pinning_packages.md index 8a5b6a7fa2a..0458e8079ad 100644 --- a/docs/app/docs/guides/pinning_packages.md +++ b/docs/app/docs/guides/pinning_packages.md @@ -14,37 +14,30 @@ Because the repository changes frequently, and new releases of Nixpkgs infrequen ### Searching for Available Packages -You can look up the available versions of a package by running `devbox search `. For example, to see the available versions of `python`, you can run `devbox search python`: +You can look up the available versions of a package by running `devbox search `. For example, to see the available versions of `nodejs`, you can run `devbox search nodejs`: ```bash -$ devbox search python -Found 50+ results for "python": - -* python (3.12.0b4, 3.12.0b3, 3.12.0b2, 3.12.0b1, 3.12.0a7, 3.12.0a6, 3.12.0a5, 3.12.0a3, 3.11.4, 3.11.3) -* python-qt (3.3.0, 3.2) -* python-full (3.11.4, 3.11.3, 3.11.2, 3.11.1, 3.10.12, 3.10.11, 3.10.10, 3.10.9, 3.10.8, 3.10.7) -* python2nix (20140927) -* pythonSexy (0.1.9) -* pythonIRClib (0.4.8) -* pythonmagick (0.9.16, 0.7) -* python-minimal (3.10.12, 3.10.11, 3.10.10, 3.10.9, 3.10.8, 3.10.7, 3.10.6, 3.10.5, 3.10.4, 3.9.13) -* python-launcher (1.0.0) -* mate.python-caja (1.26.0, 1.24.0, 1.22.1, 1.22.0, 1.20.2, 1.20.1) +$ devbox search nodejs + +Found 2+ results for "nodejs": + +* nodejs (20.5.1, 20.5.0, 20.4.0, 20.3.1, 20.3.0, 20.2.0, 20.1.0, 20.0.0, 19.9.0, 19.8.1) +* nodejs-slim (20.5.1, 20.5.0, 20.4.0, 20.3.1, 20.3.0, 20.2.0, 20.1.0, 20.0.0, 19.9.0, 19.8.1) Warning: Showing top 10 results and truncated versions. Use --show-all to show all. ``` ### Adding a Specific Version to Devbox -To add a specific version of a package with `@`. For example, to pin the `python` package to version `3.11.1`, you can run `devbox add python@3.11.1` or add `python@3.11.1` to the packages list in your `devbox.json`: +To add a specific version of a package with `@`. For example, to pin the `nodejs` package to version `19.9.0`, you can run `devbox add nodejs@19.9.0` or add `nodejs@19.9.0` to the packages list in your `devbox.json`: ```json "packages": [ - "python@3.11.1" + "nodejs@19.9.0" ] ``` -For packages that use semver, you can pin a range of versions for your project. For example, if you pin `python@3`, it will install the latest minor and patch version of `python >=3.0.0`. You can update to the newest package version that matches your criteria by running `devbox update`. +For packages that use semver, you can pin a range of versions for your project. For example, if you pin `nodejs@19`, it will install the latest minor and patch version of `nodejs >=19.0.0`. You can update to the newest package version that matches your criteria by running `devbox update`. When you run a command that installs your packages (like `devbox shell` or `devbox install`), Devbox will generate a `devbox.lock` file that contains the exact version and commit hash for your packages. You should check this file into source control to ensure that other developers will get the same environment. From 04e26a34c5d6f7abbdc3b20fab697d1dd3b6b9a3 Mon Sep 17 00:00:00 2001 From: John Lago <750845+Lagoja@users.noreply.github.com> Date: Thu, 7 Sep 2023 11:15:14 -0700 Subject: [PATCH 8/9] Update pinning_packages.md Signed-off-by: John Lago <750845+Lagoja@users.noreply.github.com> --- docs/app/docs/guides/pinning_packages.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/app/docs/guides/pinning_packages.md b/docs/app/docs/guides/pinning_packages.md index 0458e8079ad..4d6dbf79ced 100644 --- a/docs/app/docs/guides/pinning_packages.md +++ b/docs/app/docs/guides/pinning_packages.md @@ -29,15 +29,15 @@ Warning: Showing top 10 results and truncated versions. Use --show-all to show a ### Adding a Specific Version to Devbox -To add a specific version of a package with `@`. For example, to pin the `nodejs` package to version `19.9.0`, you can run `devbox add nodejs@19.9.0` or add `nodejs@19.9.0` to the packages list in your `devbox.json`: +To add a specific version of a package with `@`. For example, to pin the `nodejs` package to version `20.1.0`, you can run `devbox add nodejs@19.9.0` or add `nodejs@19.9.0` to the packages list in your `devbox.json`: ```json "packages": [ - "nodejs@19.9.0" + "nodejs@20.1.0" ] ``` -For packages that use semver, you can pin a range of versions for your project. For example, if you pin `nodejs@19`, it will install the latest minor and patch version of `nodejs >=19.0.0`. You can update to the newest package version that matches your criteria by running `devbox update`. +For packages that use semver, you can pin a range of versions for your project. For example, if you pin `nodejs@20`, it will install the latest minor and patch version of `nodejs >=20.0.0`. You can update to the newest package version that matches your criteria by running `devbox update`. When you run a command that installs your packages (like `devbox shell` or `devbox install`), Devbox will generate a `devbox.lock` file that contains the exact version and commit hash for your packages. You should check this file into source control to ensure that other developers will get the same environment. From bbdf64ef98480de9ee3035cf48a9a491fc185e3d Mon Sep 17 00:00:00 2001 From: John Lago <750845+Lagoja@users.noreply.github.com> Date: Thu, 7 Sep 2023 11:15:45 -0700 Subject: [PATCH 9/9] Update pinning_packages.md Signed-off-by: John Lago <750845+Lagoja@users.noreply.github.com> --- docs/app/docs/guides/pinning_packages.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/app/docs/guides/pinning_packages.md b/docs/app/docs/guides/pinning_packages.md index 4d6dbf79ced..b11819c0512 100644 --- a/docs/app/docs/guides/pinning_packages.md +++ b/docs/app/docs/guides/pinning_packages.md @@ -29,7 +29,7 @@ Warning: Showing top 10 results and truncated versions. Use --show-all to show a ### Adding a Specific Version to Devbox -To add a specific version of a package with `@`. For example, to pin the `nodejs` package to version `20.1.0`, you can run `devbox add nodejs@19.9.0` or add `nodejs@19.9.0` to the packages list in your `devbox.json`: +To add a specific version of a package with `@`. For example, to pin the `nodejs` package to version `20.1.0`, you can run `devbox add nodejs@20.1.0` or add `nodejs@20.1.0` to the packages list in your `devbox.json`: ```json "packages": [