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
valgrind: enable darwin build #23393
Conversation
|
||
enableParallelBuilding = true; | ||
|
||
patches = if stdenv.isDarwin |
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.
stdenv.lib.optional
is a bit nicer
@@ -0,0 +1,29 @@ | |||
{ stdenv }: | |||
|
|||
assert stdenv.isDarwin; |
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.
Why assert this, meta.platforms
will disable this for other platforms.
|
||
stdenv.mkDerivation { | ||
name = "dsymutil"; | ||
src = "/usr/bin/dsymutil"; |
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 should be added to __impureHostDeps
.
src = "/usr/bin/dsymutil"; | ||
|
||
unpackPhase = "true"; | ||
dontBuild = true; |
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 prefer phases = [ "installPhase" ];
for things like this, since none of the other phases are needed.
|
5933c50
to
af6699d
Compare
@LnL7 Thx for the useful input, i pushed the recommended changes. Is monitor.nixos.org down? |
buildInputs = [ perl ] ++ stdenv.lib.optional (!stdenv.isDarwin) gdb; | ||
buildInputs = [ perl gdb ] ++ stdenv.lib.optional (stdenv.isDarwin) [ mig dsymutil ]; | ||
|
||
__impureHostDeps = stdenv.lib.optional (stdenv.isDarwin) [ mig dsymutil ]; |
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.
Unless I'm mistaken this should be defined in mig and dsymutil, eg. __impureHostDeps = [ "/usr/bin/dsymutil" ];
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.
Oh i understood it as the list of impure dependencies of the valgrind package.
Did you look into packaging |
af6699d
to
bc5895f
Compare
@LnL7 I moved the __impureHostDeps lists to the right place. What do you mean with "Did you look into packaging dsymutil?". |
I mean if you looked at building it from source. |
No didn't try, since #17753 waits for the merge into llvm. |
I'm running into this when building, not sure what's going wrong https://gist.github.com/LnL7/ff1cd171129f965df382607a0df49c40 |
It seems that |
Wait a minute, i see that we get the xnu stuff: How can we put this to buildInputs? |
We have |
bc5895f
to
b5d74fc
Compare
Thx for the log, i updated the Would you mind to give me the link to hydra, because i can't see an active job for valgrind.x86_64-darwin on hydra.nixos.org? Sorry in advance, if i a miss something. |
Seems like it's looking in a hardcoded place.
I'm just running a hydra instance locally it's not related to the official one from nixos.org |
b5d74fc
to
cf23efa
Compare
Indeed true, it's hardcoded in |
cf23efa
to
aa56a6e
Compare
i pushed a substituteInPlace for the hardcoded stuff. |
@LnL7 Does your hydra instance poll my github pr automatically? |
Hmm... mig seems to be also part of xcode, according to the latest hydra failure. :( |
e9fe6da
to
0c06ae0
Compare
fyi, the mig and dsymutil dependencies are now resolved and point to pure deps in the nix-store |
0c06ae0
to
51e957d
Compare
ff4b951
to
46e807f
Compare
@@ -14,11 +14,13 @@ stdenv.mkDerivation rec { | |||
|
|||
# Perl is needed for `cg_annotate'. | |||
# GDB is needed to provide a sane default for `--db-command'. | |||
buildInputs = [ perl ] ++ stdenv.lib.optional (!stdenv.isDarwin) gdb; | |||
buildInputs = [ perl gdb ] ++ stdenv.lib.optional (stdenv.isDarwin) [ bootstrap_cmds xnu ]; |
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.
Nitpick (also below again): optional
takes a single element, use optionals
instead on lists. Otherwise a nested list is created – that works but it isn't nice.
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.
Thx for the hint, i updated the changeset to be more optionals nice :)
46e807f
to
3a18b95
Compare
Looks like there's still a reference to /usr/bin somewhere. 😞
|
3a18b95
to
7c980f5
Compare
ok i fixed that with a dependency on |
Looks like that was the last piece of the puzzle 🎉. |
Motivation for this change
Things done
(nix.useSandbox on NixOS,
or option
build-use-sandbox
innix.conf
on non-NixOS)
nix-shell -p nox --run "nox-review wip"
./result/bin/
)