feat: nix shell

This commit is contained in:
Ryan Yin 2023-12-13 11:49:21 +08:00
parent 8598bb3361
commit d0ce0ffafd
2 changed files with 2 additions and 2 deletions

View File

@ -232,7 +232,7 @@ Example:
} }
``` ```
Then execute `nix run .#dev`, you will enter a nushell session, where you can use the `node` `pnpm` command normally, and the node version is 20. Then execute `nix run .#dev` or `nix shell .#dev --command 'dev-shell'`, you will enter a nushell session, where you can use the `node` `pnpm` command normally, and the node version is 20.
The wrapper generated in this way is an executable file, which does not actually depend on the `nix run` or `nix shell` command. The wrapper generated in this way is an executable file, which does not actually depend on the `nix run` or `nix shell` command.

View File

@ -234,7 +234,7 @@ stdenv.mkDerivation ({
} }
``` ```
然后执行 `nix run .#dev`,就能进入一个 nushell session可以在其中正常使用 `node` `pnpm` 命令. 然后执行 `nix run .#dev` 或者 `nix shell .#dev --command 'dev-shell'`,就能进入一个 nushell session可以在其中正常使用 `node` `pnpm` 命令.
这种方式生成的 wrapper 是一个可执行文件,它实际不依赖 `nix run` 命令,比如说我们可以直接通过 NixOS 的 `environment.systemPackages` 来安装这个 wrapper然后直接执行它 这种方式生成的 wrapper 是一个可执行文件,它实际不依赖 `nix run` 命令,比如说我们可以直接通过 NixOS 的 `environment.systemPackages` 来安装这个 wrapper然后直接执行它