gitFull: fix cross compilation evaluate and build#432788
gitFull: fix cross compilation evaluate and build#432788doronbehar merged 1 commit intoNixOS:stagingfrom
Conversation
uninsane
left a comment
There was a problem hiding this comment.
doesn't build yet, but failed build is better than failed eval IMO.
$ nix-build -A pkgsCross.aarch64-multiplatform.gitFull
make: Entering directory '/build/git-2.50.1/contrib/credential/libsecret'
/nix/store/gkwbw9nzbkbz298njbn3577zmrnglbbi-bash-5.3p0/bin/bash: line 1: pkg-config: command not found
/nix/store/gkwbw9nzbkbz298njbn3577zmrnglbbi-bash-5.3p0/bin/bash: line 1: pkg-config: command not found
aarch64-unknown-linux-gnu-gcc -g -O2 -o git-credential-libsecret.o -c git-credential-libsecret.c
git-credential-libsecret.c:29:10: fatal error: glib.h: No such file or directory
29 | #include <glib.h>
| ^~~~~~~~
compilation terminated.
make: *** [Makefile:22: git-credential-libsecret.o] Error 1
make: Leaving directory '/build/git-2.50.1/contrib/credential/libsecret'
error: build of '/nix/store/795445jzkw1ilfwhscwvn30klndb39cf-git-aarch64-unknown-linux-gnu-2.50.1.drv' failed with exit code 2;
if i apply this patch on top of your PR, then diff --git pkgs/applications/version-management/git/default.nix pkgs/applications/version-management/git/default.nix
index 93452cac87f2..67e7e9924c10 100644
--- pkgs/applications/version-management/git/default.nix
+++ pkgs/applications/version-management/git/default.nix
@@ -115,6 +115,8 @@ stdenv.mkDerivation (finalAttrs: {
# Fix references to gettext introduced by ./git-sh-i18n.patch
substituteInPlace git-sh-i18n.sh \
--subst-var-by gettext ${gettext}
+ substituteInPlace contrib/credential/libsecret/Makefile \
+ --replace-fail 'pkg-config' "$PKG_CONFIG"
''
+ lib.optionalString doInstallCheck ''
# ensure we are using the correct shell when executing the test scripts |
a121cf6 to
72221a9
Compare
Co-Authored-By: Colin <[email protected]>
72221a9 to
8d8d255
Compare
|
Thanks a lot @uninsane! Your patch was applied. Will merge when CI is green. |
|
Has to target staging now |
|
@doronbehar 5000+ rebuild count -- you'll want to either retarget to staging, or make the new |
|
Right - it changes both |
philiptaron
left a comment
There was a problem hiding this comment.
Couple questions about the original change.
| # The full-featured Git. | ||
| gitFull = git.override { | ||
| svnSupport = true; | ||
| svnSupport = stdenv.buildPlatform == stdenv.hostPlatform; |
There was a problem hiding this comment.
Because otherwise:
$ nix build -Lf. pkgsCross.aarch64-multiplatform.gitFull
error:
… while calling a functor (an attribute set with a '__functor' attribute)
at /home/doron/repos/nixpkgs/pkgs/top-level/all-packages.nix:1204:13:
1203| # The full-featured Git.
1204| gitFull = git.override {
| ^
1205| svnSupport = true;
… while calling a functor (an attribute set with a '__functor' attribute)
at /home/doron/repos/nixpkgs/lib/customisation.nix:169:45:
168| # Re-call the function but with different arguments
169| overrideArgs = mirrorArgs (newArgs: makeOverridable f (overrideWith newArgs));
| ^
170| # Change the result of the function call by applying g to it
(stack trace truncated; use '--show-trace' to show the full, detailed trace)
error: assertion '(sendEmailSupport -> perlSupport)' failed
at /home/doron/repos/nixpkgs/pkgs/applications/version-management/git/default.nix:59:1:
58| assert osxkeychainSupport -> stdenv.hostPlatform.isDarwin;
59| assert sendEmailSupport -> perlSupport;
| ^
60| assert svnSupport -> perlSupport;
And:
But gitFull from some reason enabled that unconditionally.
There was a problem hiding this comment.
I'm sort of shocked at that default for Perl support. I've added it to the notebook for "why is this the case".
There was a problem hiding this comment.
According to Google git add -i and git add -p are an example for pretty basic commands that require Perl. For those on a diet we have gitMinimal.
There was a problem hiding this comment.
The thing is, we can absolutely make a working Perl with cross-compilation… I think‽ It's likely just an insufficiently substituted set of paths, I would think.
There was a problem hiding this comment.
I tend to agree, but that can be done in a separate PR. Even if I had the motivation to do it, I would have committed exactly the same commit as committed now, before fixing the cross compilation with Perl support.
There was a problem hiding this comment.
Yeah, makes sense. Not blocking. Just a bit shocking to me.
|
Bisect says there is a tiny eval regression around |
Description of changes
Things done
nix.conf? (See Nix manual)nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/)Add a 👍 reaction to pull requests you find important.