* Packages in Nix are defined as functions (so called derivations)
* Package dependencies are function parameters
* You can override dependencies by simply passing different arguments
* Nix derivations are fully overridable:
* you override the source - tell Nix to get the source from a local directory, ssh+git repo, hosted VCS like GitHub/GitLab/..., package registry like NPM, Cargo, etc.
* You can apply patches on top of the source
* You override compiler flags, build system options, or the entire build recipe
* Force enable/disable the tests of all or a specific package in your dependency graph (so called closure in Nix)
* Nix will automatically figure out if it needs to build the package from source or download a binary artifact. This is the so called substitution or binary cache - you can disable a particular cache or add additional ones. Sort of like pulling different layers of a docker image from different docker registries. The difference being that Docker only keeps the image in the registry, while Nix always has the build recipe and you can reproduce it at will.
You have basically described Nix :)
* Packages in Nix are defined as functions (so called derivations)
* Package dependencies are function parameters
* You can override dependencies by simply passing different arguments
* Nix derivations are fully overridable:
* you override the source - tell Nix to get the source from a local directory, ssh+git repo, hosted VCS like GitHub/GitLab/..., package registry like NPM, Cargo, etc.
* You can apply patches on top of the source
* You override compiler flags, build system options, or the entire build recipe
* Force enable/disable the tests of all or a specific package in your dependency graph (so called closure in Nix)
* Nix will automatically figure out if it needs to build the package from source or download a binary artifact. This is the so called substitution or binary cache - you can disable a particular cache or add additional ones. Sort of like pulling different layers of a docker image from different docker registries. The difference being that Docker only keeps the image in the registry, while Nix always has the build recipe and you can reproduce it at will.
* Since Nix knows your complete dependency graph, you can bundle your app (or entire OS) in a variety of formats, including Docker: https://github.com/nix-community/nixos-generators#supported-formats
* Nix is a killer tool for building polyglot apps - e.g. combining (building and linking in Wasm modules) Rust, C++ and Nim code