New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
par: fix static build #107961
par: fix static build #107961
Conversation
0d585e2
to
5d7c54d
Compare
pkgs/tools/text/par/default.nix
Outdated
buildPhase = '' | ||
make -f protoMakefile \ | ||
CC="${stdenv.cc.targetPrefix}cc -c" \ | ||
LINK1=${stdenv.cc.targetPrefix}cc | ||
''; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did not saw this earlier, but should it not be feasible to just use makeFlags
here?
makeFlags = [
"-f" "protoMakefile"
"CC=${stdenv.cc.targetPrefix}cc -c"
"LINK1=${stdenv.cc.targetPrefix}cc"
];
This would be a bit nicer since it is available in nix-shell
i.e. eval make $makeFlags
and it make things like enableParallelBuilding
work.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does not work for me due space inside of CC. -c gets interpreted as make(1) flag.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But can work with makeFlagsArray. Do you like this approach (just pushed) better?
This change causes rebuild of both glibc and musl dynamic variants, but no cascade rebuilds.
pkgs/tools/text/par/default.nix
Outdated
buildPhase = ''make -f protoMakefile''; | ||
makefile = "protoMakefile"; | ||
preBuild = '' | ||
makeFlagsArray=( CC="${stdenv.cc.targetPrefix}cc -c" \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This allows to still add stuff to makeFlagsArray in an override:
makeFlagsArray=( CC="${stdenv.cc.targetPrefix}cc -c" \ | |
makeFlagsArray+=( CC="${stdenv.cc.targetPrefix}cc -c" \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, force-pushed.
@GrahamcOfBorg build par |
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
./result/bin/
)nix path-info -S
before and after)