2 ms·
many recipes still basically wrap a shell script Not defending Nix here, but using shell script as part of the build doesn't make Nix itself imperative/impure.
by microtonal 4y ago
many recipes still basically wrap a shell script
Not defending Nix here, but using shell script as part of the build doesn't make Nix itself imperative/impure. As long as the evaluation of the Nix expression itself is pure [1], the build inputs are fully specified, and the build is performed in a sandbox, the shell script (and things like configure/cmake/make/ninja) should always be run in the same manner and result in the same output (modulo things like embedded time stamps in files).
[1] This hasn't traditionally been true, since you could e.g. read files or use environment variables from Nix, but this is something flakes address.