While package management is the key purpose of Nix, its derivations can also be used to produce non-package types, such as development environments (aka. “devShell”).
Why opt for Nix when developping a software project instead of language-specific alternatives (such as Stack or GHCup for Haskell)?
- Instantaneous Onboarding: Typical project READMEs detail environment setup instructions that often fail to work uniformly across different developers’ machines, taking hours or even days to configure. Nix offers an instant and reproducible setup, allowing any newcomer to get their development environment ready swiftly with one command.
-
Boosted Productivity: Developers can dedicate more time to writing software, as Nix ensures a fully functional development environment through
nix develop
. - Multi-Platform Support: The same configuration reliably works across macOS, Linux, and WSL.
While macOS doesn’t enjoy first-class support in nixpkgs yet, improvements are underway.