5.9 Language-specific builders: Python, Go, and Rust with Nix
Lesson 38 of 68 · 8:01
Up next in 5s…
About this lesson
Nobody packages a Python, Go, or Rust project with raw mkDerivation. nixpkgs ships around 50 language specific builders for that, and they all follow one pattern. This lesson walks through buildPythonPackage, buildGoModule, and buildRustPackage so that the wall of text in the nixpkgs manual turns into a quick reference you can apply to any tech stack in minutes.
In this video
- Where language support lives in the nixpkgs manual, and how to get productive from a few pages of it
buildPythonPackagewithfetchPypi,pnameandversion, and the one default that is the opposite of plainmkDerivation- The
finalAttrspattern: why these examples avoidrec, and how a package can react to future overrides of itself buildGoModuleand itsvendorHash: what setting it to null means, and the fake hash trick for filling it inbuildRustPackageand the lock file that lets Nix synthesize every dependency download as a fixed output derivation
After this lesson
When someone hands you a project in a language you have never packaged, you know which builder to reach for, how its fetcher and hash fit together, and which manual chapter covers the rest.
Links: