From 133be5465d6c4d00ea15587ecb42cd485a95fd30 Mon Sep 17 00:00:00 2001 From: chn Date: Fri, 8 Aug 2025 11:13:45 +0800 Subject: [PATCH] --- main.typ | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/main.typ b/main.typ index df5821d..a1bb697 100644 --- a/main.typ +++ b/main.typ @@ -150,7 +150,7 @@ Nix 的优势:将 *编译/配置过程* 抽象成 *可复现、可版本管理 - 使用可读写的 store 目录。编译机上建立相同的目录,编译好再上传。 - 不能设置 `real` 参数指向 `/nix/store`,否则会破坏编译机的 Nix 数据库。 -``` +```sh # this will break the build machine's nix database sudo nix build --store 'local?store=/data/gpfs01/jykang/.nix/store&real=/nix/store' .#jykang # this is safe @@ -183,9 +183,10 @@ sudo nix build --store 'local?store=/data/gpfs01/jykang/.nix/store&state=/data/g === 一个例子(曾经的 NVIDIA HPC SDK 打包) -``` +```nix let - builder = buildFHSEnv { targetPkgs = _: []; extraBwrapArgs = [ "--bind" "$out" "$out" ]; }; + builder = buildFHSEnv + { extraBwrapArgs = [ "--bind" "$out" "$out" ]; }; buildScript = writeShellScript "build.sh" ''xxxxx''; in stdenvNoCC.mkDerivation {