From fb2fe1224a4277374cde01404237acc5fecf895a Mon Sep 17 00:00:00 2001 From: Ryan Yin Date: Sat, 9 Dec 2023 23:18:43 +0800 Subject: [PATCH] fix: broken links --- docs/best-practices/debugging.md | 2 +- docs/development/intro.md | 2 +- docs/nixpkgs/intro.md | 2 +- docs/nixpkgs/multiple-nixpkgs.md | 4 ++-- docs/nixpkgs/overriding.md | 2 +- docs/zh/best-practices/debugging.md | 2 +- docs/zh/development/intro.md | 2 +- docs/zh/nixpkgs/intro.md | 2 +- docs/zh/nixpkgs/multiple-nixpkgs.md | 4 ++-- docs/zh/nixpkgs/overriding.md | 2 +- docs/zh/the-nix-language/index.md | 2 +- 11 files changed, 13 insertions(+), 13 deletions(-) diff --git a/docs/best-practices/debugging.md b/docs/best-practices/debugging.md index f2e36c3..259500b 100644 --- a/docs/best-practices/debugging.md +++ b/docs/best-practices/debugging.md @@ -157,5 +157,5 @@ TODO - [How to make nix build display all commands executed by make?](https://www.reddit.com/r/NixOS/comments/14stdgy/how_to_make_nix_build_display_all_commands/) - use `NIX_DEBUG=7` in derivation -- [Collection of functions useful for debugging broken nix expressions.](https://github.com/NixOS/nixpkgs/blob/f3d9f46/lib/debug.nix) +- [Collection of functions useful for debugging broken nix expressions.](https://github.com/NixOS/nixpkgs/blob/nixos-23.05/lib/debug.nix) diff --git a/docs/development/intro.md b/docs/development/intro.md index b353a15..b7d976f 100644 --- a/docs/development/intro.md +++ b/docs/development/intro.md @@ -12,7 +12,7 @@ In the following sections, we'll introduce how the development environment works We can create a development environment using `pkgs.mkShell { ... }` and open an interactive Bash shell of this development environment using `nix develop`. -To see how `pkgs.mkShell` works, let's take a look at [its source code](https://github.com/NixOS/nixpkgs/blob/f3d9f46/pkgs/build-support/mkshell/default.nix). +To see how `pkgs.mkShell` works, let's take a look at [its source code](https://github.com/NixOS/nixpkgs/blob/nixos-23.05/pkgs/build-support/mkshell/default.nix). ```nix { lib, stdenv, buildEnv }: diff --git a/docs/nixpkgs/intro.md b/docs/nixpkgs/intro.md index 65ab4e9..d80a832 100644 --- a/docs/nixpkgs/intro.md +++ b/docs/nixpkgs/intro.md @@ -5,7 +5,7 @@ We know that many programs have a large number of build parameters that need to be configured, and different users may want to use different build parameters. This is where `Overriding` and `Overlays` come in handy. Let me give you a few examples I have encountered: 1. [`fcitx5-rime.nix`](https://github.com/NixOS/nixpkgs/blob/e4246ae1e7f78b7087dce9c9da10d28d3725025f/pkgs/tools/inputmethods/fcitx5/fcitx5-rime.nix): By default, `fcitx5-rime` use `rime-data` as the value of `rimeDataPkgs`, but this parameter can be customized by `override`. -2. [`vscode/with-extensions.nix`](https://github.com/NixOS/nixpkgs/blob/f3d9f46/pkgs/applications/editors/vscode/with-extensions.nix): This package for VS Code can also be customized by overriding the value of `vscodeExtensions`, thus we can install some custom plugins into VS Code. +2. [`vscode/with-extensions.nix`](https://github.com/NixOS/nixpkgs/blob/nixos-23.05/pkgs/applications/editors/vscode/with-extensions.nix): This package for VS Code can also be customized by overriding the value of `vscodeExtensions`, thus we can install some custom plugins into VS Code. - [`nix-vscode-extensions`](https://github.com/nix-community/nix-vscode-extensions): This is a vscode plugin manager implemented by overriding `vscodeExtensions`. 3. [`firefox/common.nix`](https://github.com/NixOS/nixpkgs/blob/416ffcd08f1f16211130cd9571f74322e98ecef6/pkgs/applications/networking/browsers/firefox/common.nix): Firefox has many customizable parameters too. 4. ... diff --git a/docs/nixpkgs/multiple-nixpkgs.md b/docs/nixpkgs/multiple-nixpkgs.md index a0601ba..51701e5 100644 --- a/docs/nixpkgs/multiple-nixpkgs.md +++ b/docs/nixpkgs/multiple-nixpkgs.md @@ -54,8 +54,8 @@ We have learned in our study of Nix syntax: > The `import` expression takes a path to another Nix file as an argument and returns the execution result of that Nix file. > If the argument to `import` is a folder path, it returns the execution result of the `default.nix` file within that folder. -`nixpkgs` is a flake with a `default.nix` file in its root directory. So, `import nixpkgs` essentially returns the execution result of [nixpkgs/default.nix](https://github.com/NixOS/nixpkgs/blob/f3d9f46/default.nix). -Starting from this file, you can find that the implementation of `import nixpkgs` is in [pkgs/top-level/impure.nix](https://github.com/NixOS/nixpkgs/blob/f3d9f46/pkgs/top-level/impure.nix), as excerpted below: +`nixpkgs` is a flake with a `default.nix` file in its root directory. So, `import nixpkgs` essentially returns the execution result of [nixpkgs/default.nix](https://github.com/NixOS/nixpkgs/blob/nixos-23.05/default.nix). +Starting from this file, you can find that the implementation of `import nixpkgs` is in [pkgs/top-level/impure.nix](https://github.com/NixOS/nixpkgs/blob/nixos-23.05/pkgs/top-level/impure.nix), as excerpted below: ```nix # ... skipping some lines diff --git a/docs/nixpkgs/overriding.md b/docs/nixpkgs/overriding.md index 10e1996..c3fde4d 100644 --- a/docs/nixpkgs/overriding.md +++ b/docs/nixpkgs/overriding.md @@ -15,7 +15,7 @@ To find out which parameters of a specific package can be overridden, there are By using these methods, you can discover the input parameters of a package and determine which ones can be modified using `override`. -For example, let's take a look at the source code of [pkgs.hello](https://github.com/NixOS/nixpkgs/blob/f3d9f46/pkgs/applications/misc/hello/default.nix): +For example, let's take a look at the source code of [pkgs.hello](https://github.com/NixOS/nixpkgs/blob/nixos-23.05/pkgs/applications/misc/hello/default.nix): ```nix { callPackage diff --git a/docs/zh/best-practices/debugging.md b/docs/zh/best-practices/debugging.md index 39e61b7..0ed3bf7 100644 --- a/docs/zh/best-practices/debugging.md +++ b/docs/zh/best-practices/debugging.md @@ -153,6 +153,6 @@ TODO - [How to make nix build display all commands executed by make?](https://www.reddit.com/r/NixOS/comments/14stdgy/how_to_make_nix_build_display_all_commands/) - use `NIX_DEBUG=7` in derivation -- [Collection of functions useful for debugging broken nix expressions.](https://github.com/NixOS/nixpkgs/blob/f3d9f46/lib/debug.nix) +- [Collection of functions useful for debugging broken nix expressions.](https://github.com/NixOS/nixpkgs/blob/nixos-23.05/lib/debug.nix) diff --git a/docs/zh/development/intro.md b/docs/zh/development/intro.md index 5ccc1f5..0211ba6 100644 --- a/docs/zh/development/intro.md +++ b/docs/zh/development/intro.md @@ -16,7 +16,7 @@ 为了更好的使用上述两个功能,我们先来看看它们的原理。 -[`pkgs.mkShell` 的源码](https://github.com/NixOS/nixpkgs/blob/f3d9f46/pkgs/build-support/mkshell/default.nix)如下: +[`pkgs.mkShell` 的源码](https://github.com/NixOS/nixpkgs/blob/nixos-23.05/pkgs/build-support/mkshell/default.nix)如下: ```nix { lib, stdenv, buildEnv }: diff --git a/docs/zh/nixpkgs/intro.md b/docs/zh/nixpkgs/intro.md index d39cca4..8b22c6f 100644 --- a/docs/zh/nixpkgs/intro.md +++ b/docs/zh/nixpkgs/intro.md @@ -5,7 +5,7 @@ callPackage、Overriding 与 Overlays 是在使用 Nix 时偶尔会用到的技 我们知道许多程序都有大量构建参数需要配置,不同的用户会希望使用不同的构建参数,这时候就需要 Overriding 与 Overlays 来实现。我举几个我遇到过的例子: 1. [fcitx5-rime.nix](https://github.com/NixOS/nixpkgs/blob/e4246ae1e7f78b7087dce9c9da10d28d3725025f/pkgs/tools/inputmethods/fcitx5/fcitx5-rime.nix): fcitx5-rime 的 `rimeDataPkgs` 默认使用 `rime-data` 包,但是也可以通过 override 来自定义该参数的值,以加载自定义的 rime 配置(比如加载小鹤音形输入法配置)。 -2. [vscode/with-extensions.nix](https://github.com/NixOS/nixpkgs/blob/f3d9f46/pkgs/applications/editors/vscode/with-extensions.nix): vscode 的这个包也可以通过 override 来自定义 `vscodeExtensions` 参数的值来安装自定义插件。 +2. [vscode/with-extensions.nix](https://github.com/NixOS/nixpkgs/blob/nixos-23.05/pkgs/applications/editors/vscode/with-extensions.nix): vscode 的这个包也可以通过 override 来自定义 `vscodeExtensions` 参数的值来安装自定义插件。 1. [nix-vscode-extensions](https://github.com/nix-community/nix-vscode-extensions): 就是利用该参数实现的 vscode 插件管理 3. [firefox/common.nix](https://github.com/NixOS/nixpkgs/blob/416ffcd08f1f16211130cd9571f74322e98ecef6/pkgs/applications/networking/browsers/firefox/common.nix): firefox 同样有许多可自定义的参数 4. 等等 diff --git a/docs/zh/nixpkgs/multiple-nixpkgs.md b/docs/zh/nixpkgs/multiple-nixpkgs.md index fc67216..19ac192 100644 --- a/docs/zh/nixpkgs/multiple-nixpkgs.md +++ b/docs/zh/nixpkgs/multiple-nixpkgs.md @@ -54,8 +54,8 @@ > `import` 表达式以其他 Nix 文件的路径作为参数,返回该 Nix 文件的执行结果。 > `import` 的参数如果为文件夹路径,那么会返回该文件夹下的 `default.nix` 文件的执行结果。 -`nixpkgs` 是一个 Git 仓库,它的根目录下刚好有一个 `default.nix` 文件,那么答案就呼之欲出了:`import nixpkgs` 就是返回 [nixpkgs/default.nix](https://github.com/NixOS/nixpkgs/blob/f3d9f46/default.nix) 文件的执行结果。 -从这个文件开始探索,就能找到 `import nixpkgs` 的实现代码是 [pkgs/top-level/impure.nix](https://github.com/NixOS/nixpkgs/blob/f3d9f46/pkgs/top-level/impure.nix),这里截取部分内容: +`nixpkgs` 是一个 Git 仓库,它的根目录下刚好有一个 `default.nix` 文件,那么答案就呼之欲出了:`import nixpkgs` 就是返回 [nixpkgs/default.nix](https://github.com/NixOS/nixpkgs/blob/nixos-23.05/default.nix) 文件的执行结果。 +从这个文件开始探索,就能找到 `import nixpkgs` 的实现代码是 [pkgs/top-level/impure.nix](https://github.com/NixOS/nixpkgs/blob/nixos-23.05/pkgs/top-level/impure.nix),这里截取部分内容: ```nix # ... skip some lines diff --git a/docs/zh/nixpkgs/overriding.md b/docs/zh/nixpkgs/overriding.md index 1eca1dd..79a2b3d 100644 --- a/docs/zh/nixpkgs/overriding.md +++ b/docs/zh/nixpkgs/overriding.md @@ -38,7 +38,7 @@ stdenv.mkDerivation rec { ``` 除了覆写参数,还可以通过 `overrideAttrs` 来覆写使用 `stdenv.mkDerivation` 构建的 Derivation 的属性。 -以 [pkgs.hello](https://github.com/NixOS/nixpkgs/blob/f3d9f46/pkgs/applications/misc/hello/default.nix) 为例,首先通过前述方法查看这个包的源码: +以 [pkgs.hello](https://github.com/NixOS/nixpkgs/blob/nixos-23.05/pkgs/applications/misc/hello/default.nix) 为例,首先通过前述方法查看这个包的源码: ```nix { callPackage diff --git a/docs/zh/the-nix-language/index.md b/docs/zh/the-nix-language/index.md index 5ff3329..d7e2ac4 100644 --- a/docs/zh/the-nix-language/index.md +++ b/docs/zh/the-nix-language/index.md @@ -393,7 +393,7 @@ Store Object 的存放路径格式为 `/nix/store/-`,其中 `