nix
Original:🇺🇸 English
Translated
Nix commands and package management guide. Use when: - Running nix build, nix run - Adding custom packages - Using nurl for hash acquisition
7installs
Sourcei9wa4/dotfiles
Added on
NPX Install
npx skill4agent add i9wa4/dotfiles nixTags
Translated version includes tags in frontmatterSKILL.md Content
View Translation Comparison →Nix Skill
1. nix build
-
YOU MUST: Always useoption with
--no-linknix buildshnix build .#rumdl --no-link -
IMPORTANT: Without, a
--no-linksymlink is created./result
2. nix run
-
IMPORTANT: Packages registered in packages can be run with
nix runshnix run .#pike -- scan -d ./terraform
3. Adding Custom Packages
- YOU MUST: See CONTRIBUTING.md section 1.4.2 for adding new custom packages
- IMPORTANT: Hash acquisition flow
- Get using nurl:
hashnurl https://github.com/<owner>/<repo> <tag> - Get /
vendorHashvia build error (cargoHashline)got:
- Get
- IMPORTANT: Add if tests fail
doCheck = false;
4. nurl
-
IMPORTANT: nurl generates Nix fetcher calls from repository URLssh
nurl https://github.com/rvben/rumdl v0.0.206 -
IMPORTANT: Output can be used directly in fetchFromGitHubnix
fetchFromGitHub { owner = "rvben"; repo = "rumdl"; rev = "v0.0.206"; hash = "sha256-XXX..."; } -
IMPORTANT: For cargoHash/vendorHash, use build error method (nurl does not support these)