Suppose the following line in your flake.nix
:
foo = pkgs.stdenv.mkDerivation {
name = "foo";
buildPhase = ''
#some shell script
'';
installPhase = ''
#some shell script
'';
};
Is it possible to specify a shell (ideally defined with mkShell
, or passed in as a path) to use for the buildPhase
, installPhase
, etc, instead of plain old bash
?
I tried reproducing the shell environment specified elsewhere in each of the text blocks, and it feels un-Nix-y
Not semantically the same, but you can run scripts written in other languages in your derivation. For example: