2023-06-27 04:53:11 +02:00
|
|
|
# Packging 101
|
|
|
|
|
2024-03-16 12:29:05 +01:00
|
|
|
WIP work in progress, please refer to the following reference documents to learn Nix
|
|
|
|
packaging.
|
2023-06-27 04:53:11 +02:00
|
|
|
|
2024-03-17 05:17:03 +01:00
|
|
|
## References
|
2023-06-27 04:53:11 +02:00
|
|
|
|
2024-03-16 06:13:01 +01:00
|
|
|
- [NixOS Series 3: Software Packaging 101](https://lantian.pub/en/article/modify-computer/nixos-packaging.lantian/)
|
2023-07-08 11:46:46 +02:00
|
|
|
- [How to Learn Nix, Part 28: The standard environment](https://ianthehenry.com/posts/how-to-learn-nix/the-standard-environment/)
|
2024-03-08 15:08:22 +01:00
|
|
|
- [stdenv - Nixpkgs Manual](https://github.com/NixOS/nixpkgs/tree/nixos-unstable/doc/stdenv)
|
|
|
|
- [languages-frameworks - Nixpkgs Manual](https://github.com/NixOS/nixpkgs/tree/nixos-unstable/doc/languages-frameworks)
|
2024-05-10 03:40:43 +02:00
|
|
|
- [Wrapping packages - NixOS Cookbook](https://wiki.nixos.org/wiki/Nix_Cookbook#Wrapping_packages)
|
2023-07-08 11:46:46 +02:00
|
|
|
- Useful tools:
|
2024-03-16 12:29:05 +01:00
|
|
|
- [nurl](https://github.com/nix-community/nurl): Generate Nix fetcher calls from
|
|
|
|
repository URLs
|
|
|
|
- [nix-init](https://github.com/nix-community/nix-init): Generate Nix packages from URLs
|
|
|
|
with hash prefetching, dependency inference, license detection, and more
|
2023-12-22 05:58:18 +01:00
|
|
|
- Source Code:
|
|
|
|
- [pkgs/build-support/trivial-builders/default.nix - runCommand](https://github.com/NixOS/nixpkgs/blob/nixos-23.11/pkgs/build-support/trivial-builders/default.nix#L21-L49)
|
|
|
|
- [pkgs/build-support/setup-hooks/make-wrapper.sh](https://github.com/NixOS/nixpkgs/blob/nixos-23.11/pkgs/build-support/setup-hooks/make-wrapper.sh)
|
|
|
|
- FHS related
|
2024-03-16 12:29:05 +01:00
|
|
|
- [pkgs/build-support/build-fhsenv-bubblewrap/buildFHSEnv.nix](https://github.com/NixOS/nixpkgs/blob/nixos-23.11/pkgs/build-support/build-fhsenv-bubblewrap/buildFHSEnv.nix):
|
|
|
|
`pkgs.buildFHSEnvBubblewrap`
|
|
|
|
- [pkgs/build-support/build-fhsenv-chroot/default.nix](https://github.com/NixOS/nixpkgs/blob/nixos-23.11/pkgs/build-support/build-fhsenv-bubblewrap/buildFHSEnv.nix):
|
|
|
|
`pkgs.buildFHSEnvChroot`
|