mirror of
https://github.com/ryan4yin/nixos-and-flakes-book.git
synced 2024-11-21 23:53:12 +01:00
fix typo (#129)
This commit is contained in:
parent
d710962095
commit
490be22f0a
@ -252,7 +252,7 @@ So how to use this method in Flakes? The example `flake.nix` is as follows:
|
||||
system = "x86_64-linux";
|
||||
modules = [
|
||||
{
|
||||
nigpkgs.crossSystem = {
|
||||
nixpkgs.crossSystem = {
|
||||
config = "riscv64-unknown-linux-gnu";
|
||||
};
|
||||
|
||||
@ -304,7 +304,7 @@ follows:
|
||||
};
|
||||
modules = [
|
||||
{
|
||||
nigpkgs.crossSystem = {
|
||||
nixpkgs.crossSystem = {
|
||||
config = "riscv64-unknown-linux-gnu";
|
||||
};
|
||||
}
|
||||
|
@ -260,7 +260,7 @@ For example, we can directly install this wrapper through NixOS's
|
||||
`environment.systemPackages`, and then execute it directly:
|
||||
|
||||
```nix
|
||||
{pkgs, lib, ...}{
|
||||
{pkgs, lib, ...}:{
|
||||
|
||||
environment.systemPackages = [
|
||||
# Install the wrapper into the system
|
||||
@ -279,7 +279,7 @@ For example, we can directly install this wrapper through NixOS's
|
||||
mkdir -p $out/bin/
|
||||
ln -s ${pkgs.nushell}/bin/nu $out/bin/dev-shell
|
||||
wrapProgram $out/bin/dev-shell --prefix PATH : ${pkgs.lib.makeBinPath packages}
|
||||
'';)
|
||||
'')
|
||||
];
|
||||
}
|
||||
```
|
||||
|
@ -226,7 +226,7 @@ nix-repl> pkgs.pkgsCross.riscv64.stdenv.cc
|
||||
system = "x86_64-linux";
|
||||
modules = [
|
||||
{
|
||||
nigpkgs.crossSystem = {
|
||||
nixpkgs.crossSystem = {
|
||||
config = "riscv64-unknown-linux-gnu";
|
||||
};
|
||||
|
||||
@ -276,7 +276,7 @@ nix-repl> pkgs.pkgsCross.riscv64.stdenv.cc
|
||||
};
|
||||
modules = [
|
||||
{
|
||||
nigpkgs.crossSystem = {
|
||||
nixpkgs.crossSystem = {
|
||||
config = "riscv64-unknown-linux-gnu";
|
||||
};
|
||||
}
|
||||
|
@ -257,7 +257,7 @@ session,可以在其中正常使用 `node` `pnpm` 命令.
|
||||
过 NixOS 的 `environment.systemPackages` 来安装这个 wrapper,然后直接执行它:
|
||||
|
||||
```nix
|
||||
{pkgs, lib, ...}{
|
||||
{pkgs, lib, ...}:{
|
||||
|
||||
environment.systemPackages = [
|
||||
# 将 dev-shell 安装到系统环境中
|
||||
@ -276,7 +276,7 @@ session,可以在其中正常使用 `node` `pnpm` 命令.
|
||||
mkdir -p $out/bin/
|
||||
ln -s ${pkgs.nushell}/bin/nu $out/bin/dev-shell
|
||||
wrapProgram $out/bin/dev-shell --prefix PATH : ${pkgs.lib.makeBinPath packages}
|
||||
'';)
|
||||
'')
|
||||
];
|
||||
}
|
||||
```
|
||||
|
Loading…
Reference in New Issue
Block a user