Skip to content
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

expect: patch configure after the autoreconf phase, not before it #80006

Merged
merged 1 commit into from Feb 16, 2020

Conversation

basvandijk
Copy link
Member

@basvandijk basvandijk commented Feb 13, 2020

Motivation for this change

Fixes #79863

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@basvandijk basvandijk requested a review from Ma27 February 13, 2020 10:40
@basvandijk
Copy link
Member Author

@GrahamcOfBorg build expect

@basvandijk
Copy link
Member Author

@GrahamcOfBorg build expect

@dtzWill
Copy link
Member

dtzWill commented Feb 13, 2020

well the autoreconfHook is certainly at odds with the postPatch:

https://github.com/basvandijk/nixpkgs/blob/51c57c560fcec564136035182e6677ed210a610d/pkgs/tools/misc/expect/default.nix#L17

Can the stty fixup be changed to modify configure.ac or perhaps by setting a variable?

@basvandijk
Copy link
Member Author

@dtzWill you're spot on. The only change needed is to change the postPatch into preConfigure so that configure gets patched after the autoreconf phase. I'll force-push an fix.

@basvandijk
Copy link
Member Author

@GrahamcOfBorg build expect pkgsMusl.libffi

@basvandijk basvandijk changed the title expect: remove autoreconfHook since that causes a wrong path to stty expect: patch configure after the autoreconf phase, not before it Feb 13, 2020
@jonringer
Copy link
Contributor

diff LGTM, but doesn't fix your use case

@jonringer
Copy link
Contributor

x86_64 is still good with these changes:

[97 built, 372 copied (1262.6 MiB), 249.7 MiB DL]
https://github.com/NixOS/nixpkgs/pull/80006
9 package built:
deepin.dde-file-manager deepin.deepin-terminal deepin.startdde dejagnu expect monotone profanity reposurgeon viking

Comment on lines +17 to 18
preConfigure = ''
sed -i "s,/bin/stty,$(type -p stty),g" configure
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doing this still sounds more natural to me:

Suggested change
preConfigure = ''
sed -i "s,/bin/stty,$(type -p stty),g" configure
postPatch = ''
sed -i "s,/bin/stty,$(type -p stty),g" configure.in

Ideally we would fix this upstream by adding --with-stty configure flag or something.

Copy link
Member

@Ma27 Ma27 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch @dtzWill and thanks for taking care of this @basvandijk! :)

@nh2
Copy link
Contributor

nh2 commented Feb 16, 2020

diff LGTM, but doesn't fix your use case

@jonringer What did you refer to here?


This PR fixes the issue for me, see #79863 (comment)

Copy link
Contributor

@nh2 nh2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This fixes static-haskell-nix's CI.

@jonringer
Copy link
Contributor

diff LGTM, but doesn't fix your use case

@jonringer What did you refer to here?

This PR fixes the issue for me, see #79863 (comment)

oh, i saw the pkgsMusl.libffi failure for aarch64, but he was referencing x86_64 musl build

@jonringer jonringer merged commit b30dc0f into NixOS:master Feb 16, 2020
@jonringer
Copy link
Contributor

I'll open @jtojnar's suggestion in a new pr

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

pkgsMusl.libffi fails in test suite
6 participants