mirror of
https://github.com/foo-dogsquared/wiki.git
synced 2025-02-25 18:19:04 +00:00
1 line
7.3 KiB
JSON
1 line
7.3 KiB
JSON
![]() |
{"pageProps":{"metadata":{"date":"2021-07-18 21:23:26 +08:00","date_modified":"2021-12-12 23:48:08 +08:00","language":"en","source":""},"title":"Nix packages","hast":{"type":"root","children":[{"type":"element","tagName":"nav","properties":{"className":"toc"},"children":[{"type":"element","tagName":"ol","properties":{"className":"toc-level toc-level-1"},"children":[{"type":"element","tagName":"li","data":{"hookArgs":[{"type":"element","tagName":"h1","properties":{"id":"ecosystems"},"children":[{"type":"text","value":"Ecosystems"}]}]},"properties":{"className":"toc-item toc-item-h1"},"children":[{"type":"element","tagName":"a","properties":{"className":"toc-link toc-link-h1","href":"/packages.nix#ecosystems"},"children":[{"type":"text","value":"Ecosystems"}]}]}]}]},{"type":"element","tagName":"ul","properties":{},"children":[{"type":"element","tagName":"li","properties":{},"children":[{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"the most important component managed with "},{"type":"element","tagName":"a","properties":{"href":"/tools.nix"},"children":[{"type":"text","value":"Nix package manager"}]},{"type":"text","value":" are "},{"type":"element","tagName":"a","properties":{"href":"/tools.nix.derivations"},"children":[{"type":"text","value":"Nix derivations"}]}]}]},{"type":"element","tagName":"li","properties":{},"children":[{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"derivations are basically recipes how the Nix build daemon compiles the package\n"}]}]},{"type":"element","tagName":"li","properties":{},"children":[{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"most derivations are verbose but we can easily create one with nixpkgs\n"}]}]},{"type":"element","tagName":"li","properties":{},"children":[{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"for certain setups such as common conventions for certain programming languages like Rust and Go, nixpkgs has "},{"type":"element","tagName":"a","properties":{"href":"https://nixos.org/manual/nixpkgs/unstable/#chap-language-support"},"children":[{"type":"text","value":"environments created for those"}]},{"type":"text","value":";\n different versions may have changes so be sure to go into the appropriate documentation and create packages for a specific channel;\n this is significantly easier with "},{"type":"element","tagName":"a","properties":{"href":"/tools.nix.flakes"},"children":[{"type":"text","value":"Nix flakes"}]}]}]}]},{"type":"element","tagName":"h1","properties":{"id":"ecosystems"},"children":[{"type":"text","value":"Ecosystems"}]},{"type":"element","tagName":"ul","properties":{},"children":[{"type":"element","tagName":"li","properties":{},"children":[{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"while derivations can be interacted with the builtin function "},{"type":"element","tagName":"code","properties":{"className":["inline-verbatim"]},"children":[{"type":"text","value":"builtins.derivation"}]},{"type":"text","value":", it isn't really recommended since it is very verbose;\n instead, you use "},{"type":"element","tagName":"code","properties":{"className":["inline-verbatim"]},"children":[{"type":"text","value":"stdenv.mkDerivation"}]},{"type":"text","value":" from nixpkgs\n"}]}]},{"type":"element","tagName":"li","properties":{},"children":[{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"nixpkgs is the official repository of NixOS containing the standard library extending the "},{"type":"element","tagName":"a","properties":{"href":"/lang.nix"},"children":[{"type":"text","value":"Nix language"}]},{"type":"text","value":", the largest repository of packages (counting up to 80,000 as of 2021-12-12), and various NixOS modules used to build the system itself\n"}]}]},{"type":"element","tagName":"li","properties":{},"children":[{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"nixpkgs contains "},{"type":"element","t
|