mirror of
https://github.com/ryan4yin/nixos-and-flakes-book.git
synced 2024-11-25 09:33:10 +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";
|
system = "x86_64-linux";
|
||||||
modules = [
|
modules = [
|
||||||
{
|
{
|
||||||
nigpkgs.crossSystem = {
|
nixpkgs.crossSystem = {
|
||||||
config = "riscv64-unknown-linux-gnu";
|
config = "riscv64-unknown-linux-gnu";
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -304,7 +304,7 @@ follows:
|
|||||||
};
|
};
|
||||||
modules = [
|
modules = [
|
||||||
{
|
{
|
||||||
nigpkgs.crossSystem = {
|
nixpkgs.crossSystem = {
|
||||||
config = "riscv64-unknown-linux-gnu";
|
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:
|
`environment.systemPackages`, and then execute it directly:
|
||||||
|
|
||||||
```nix
|
```nix
|
||||||
{pkgs, lib, ...}{
|
{pkgs, lib, ...}:{
|
||||||
|
|
||||||
environment.systemPackages = [
|
environment.systemPackages = [
|
||||||
# Install the wrapper into the system
|
# 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/
|
mkdir -p $out/bin/
|
||||||
ln -s ${pkgs.nushell}/bin/nu $out/bin/dev-shell
|
ln -s ${pkgs.nushell}/bin/nu $out/bin/dev-shell
|
||||||
wrapProgram $out/bin/dev-shell --prefix PATH : ${pkgs.lib.makeBinPath packages}
|
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";
|
system = "x86_64-linux";
|
||||||
modules = [
|
modules = [
|
||||||
{
|
{
|
||||||
nigpkgs.crossSystem = {
|
nixpkgs.crossSystem = {
|
||||||
config = "riscv64-unknown-linux-gnu";
|
config = "riscv64-unknown-linux-gnu";
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -276,7 +276,7 @@ nix-repl> pkgs.pkgsCross.riscv64.stdenv.cc
|
|||||||
};
|
};
|
||||||
modules = [
|
modules = [
|
||||||
{
|
{
|
||||||
nigpkgs.crossSystem = {
|
nixpkgs.crossSystem = {
|
||||||
config = "riscv64-unknown-linux-gnu";
|
config = "riscv64-unknown-linux-gnu";
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -257,7 +257,7 @@ session,可以在其中正常使用 `node` `pnpm` 命令.
|
|||||||
过 NixOS 的 `environment.systemPackages` 来安装这个 wrapper,然后直接执行它:
|
过 NixOS 的 `environment.systemPackages` 来安装这个 wrapper,然后直接执行它:
|
||||||
|
|
||||||
```nix
|
```nix
|
||||||
{pkgs, lib, ...}{
|
{pkgs, lib, ...}:{
|
||||||
|
|
||||||
environment.systemPackages = [
|
environment.systemPackages = [
|
||||||
# 将 dev-shell 安装到系统环境中
|
# 将 dev-shell 安装到系统环境中
|
||||||
@ -276,7 +276,7 @@ session,可以在其中正常使用 `node` `pnpm` 命令.
|
|||||||
mkdir -p $out/bin/
|
mkdir -p $out/bin/
|
||||||
ln -s ${pkgs.nushell}/bin/nu $out/bin/dev-shell
|
ln -s ${pkgs.nushell}/bin/nu $out/bin/dev-shell
|
||||||
wrapProgram $out/bin/dev-shell --prefix PATH : ${pkgs.lib.makeBinPath packages}
|
wrapProgram $out/bin/dev-shell --prefix PATH : ${pkgs.lib.makeBinPath packages}
|
||||||
'';)
|
'')
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
Loading…
Reference in New Issue
Block a user