Nix
purely functional package manager
build toolの一面もある
Nixを学ぶ
Nix関係の有用そうな設定集
Nixのbuiltin関数
github
Nixのpackagesを探す
https://nixos.wiki/wiki/Cheatsheet
Nix日本語コミュニティ
install ref
uninstall ref
Determinate Nix Installer
commands
nix-channel
❌Nixのchannel
nix-env
nix-shell
nix-build
Nix Store
nix repl
λ nix-collect-garbage
どのpackageからも使われていないpackageを自動で削除
#WIP
nix.dev
https://nix.dev/
MyNixOS
https://mynixos.com/
https://github.com/Effect-TS/io/blob/main/flake.nix
https://zenn.dev/asa1984/articles/nixos-is-the-best
https://blog.ryota-ka.me/posts/2022/10/08/how-we-use-nix-in-herp-inc
herp
この辺眺めると色々なツールが見つかって面白い
Awesome Nix
https://github.com/nix-community/awesome-nix
https://github.com/orgs/nix-community/repositories
Nixでpackageをbuildする
https://zero-to-nix.com/start/nix-build
haskell-nix
Nixの再現性
よくわかってない
ofborg
https://github.com/NixOS/ofborg
fetchFromGitHub
NixのOverlays
numtide/devshell
https://github.com/numtide/devshell
https://numtide.github.io/devshell/
ここでみた
nix-shellとかdirenvみたいなやつ
nix-output-monitor
https://github.com/maralorn/nix-output-monitor
ここでみた
Nixta
https://github.com/stencila/nixta
packager manager
Nixは難しいから、という理由でwrapしてるらしい
複雑さ増さないか?という気もするが、触ったことがないのでなんともわからんmrsekut.icon
statix
Nix向けのlinter
https://github.com/nerdypepper/statix
debugger
https://www.zknotes.com/note/5970
https://github.com/NixOS/nix/pull/5416
この辺の使い分け
https://stackoverflow.com/questions/44088192/when-and-how-should-default-nix-shell-nix-and-release-nix-be-used
default.nix
nix-buildするときに最初に見られる
default importで使用される
shell.nix
nix-shellする際に最初に見られる
nix-shell向けの設定を書く
つまり?
nix tool内で特別な意味を持っている
release.nix
文脈によって、使う人によって意味が異なりそう(しらんけど)
この記事を見た感じでは、nixpkgsのversionの指定などを書いている
nix.shellを書くのが本命だが、その準備として必要な設定としてrelease.nixを書いている感じがする
Nixの内部実装
これを調べる前にそもそもPackage Managerとはなんぞ?というのを見たほうがいい気がしている
https://tech.dely.jp/entry/2018/12/03/110227
https://builtwithnix.org/
https://nixos.org/guides/how-nix-works.html
https://ejpcmac.net/blog/about-using-nix-in-my-development-workflow/
仕組みを紹介する記事ではないがなんか丁寧だったので一応メモ
NixOS#60d866961982700000a1e5ed論文とか
Nixの再現性
nix-diff
https://github.com/Gabriel439/nix-diff
#??
nixに登録されていないライブらいを使う方法
例えば、satysfiはnixにない
npmのと比べて何が異なるのか
依存の指定時にversionの範囲指定がない?
依存の依存の依存の..なども全て並列にstoreに置かれることになる?
循環依存とかは解決できるのか?
package.jsonのように、nix userはhoge: 1.2.0のように指定はしないのか?
利用者はそれで良いけど、packageの開発者はどういう感じで依存packageのversionを指定するのか?
Mac OS XでNixパッケージマネージャを使う - Plan 9とGo言語のブログ
brewとの対応なども書いてあって良い
http://www.nowhere.co.jp/blog/archives/20171019-230037.html