I ran nix develop nixpkgs/nixos-22.11#freerdp to get build environment for freerdp package.
I can run build phases manually, for example unpackPhase or cmakeConfigurePhase.
What I want to do, is to run manually all phases which are used to build the original package it the right order. I was expecting to find something like $phases variable listing all phases, but I can’t see anything like that. How can I do it ?
Use ‘grep’ on nixpkgs with ‘genericBuild’ and from builder.sh or setup.sh you see this call lots. In your nix-shell environment type ‘declare | less’ and look at the code.
This is some code from the nix-shell for nix itself:
genericBuild ()
{
export GZIP_NO_TIMESTAMPS=1;
if [ -f "${buildCommandPath:-}" ]; then
source "$buildCommandPath";
return;
fi;
if [ -n "${buildCommand:-}" ]; then
eval "$buildCommand";
return;
fi;
if [ -z "${phases[*]:-}" ]; then
phases="${prePhases[*]:-} unpackPhase patchPhase ${preConfigurePhases[*]:-} configurePhase ${preBuildPhases[*]:-} buildPhase checkPhase ${preInstallPhases[*]:-} installPhase ${preFixupPhases[*]:-} fixupPhase installCheckPhase ${preDistPhases[*]:-} distPhase ${postPhases[*]:-}";
fi;
for curPhase in ${phases[*]};
do
runPhase "$curPhase";
done
}