Skip to content

stdenv setup: Always use both propagated files #31775

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

Merged

Conversation

Ericson2314
Copy link
Member

@Ericson2314 Ericson2314 commented Nov 17, 2017

Motivation for this change

This continues #23374, which always kept around both attributes, by always including both propagated files: propgated-native-build-inputs and propagated-build-inputs. nativePkgs and crossPkgs are still defined as before, however, so this change should only barely observable.

This is an incremental step to fully keeping the dependencies separate in all cases, as is done in #26805 .

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option build-use-sandbox in nix.conf on non-NixOS)
  • 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 nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Fits CONTRIBUTING.md.

Sorry, something went wrong.

@Ericson2314 Ericson2314 force-pushed the stdenv-both-propagated-files branch from 3345513 to f178da7 Compare November 17, 2017 20:39
@Ericson2314 Ericson2314 added 6.topic: cross-compilation Building packages on a different platform than they will be used on 1.severity: mass-darwin-rebuild This PR causes a large number of packages to rebuild on Darwin 1.severity: mass-rebuild This PR causes a large number of packages to rebuild labels Nov 17, 2017
@Ericson2314
Copy link
Member Author

@nixborg build

@Ericson2314 Ericson2314 requested a review from bjornfor November 17, 2017 20:49
@nixborg
Copy link

nixborg commented Nov 17, 2017

Jobset created at https://hydra.mayflower.de/jobset/nixos/pr-31775

@Ericson2314
Copy link
Member Author

The custom Perl failure of Grub on linux is a non-deterministic bug in Perl's build system I've seen before. [I say "custom" because the main Perl job succeeded, and nothing but Grub was impacted by this failure, but I have no idea why Grub is requiring a bespoke Perl derivation.]

That means this PR is correct (as far as we test), and only awaiting review.

Copy link
Member

@globin globin left a comment

Choose a reason for hiding this comment

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

Looks fine except for the review comment

local var="$2"
local propagatedBuildInputsFile="$3"
local pkg="$1"; shift
local var="$1"; shift
Copy link
Member

Choose a reason for hiding this comment

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

Copy-paste error?

Copy link
Contributor

Choose a reason for hiding this comment

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

No, he shifts arguments to use $@ later.

fi
}
envHooks+=(qtEnvHook)
if [ "$crossConfig" ]; then
crossEnvHooks+=(qtCrossEnvHook)
Copy link
Contributor

Choose a reason for hiding this comment

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

qtEnvHook

for p in "${pkgs[@]}"; do
if test -e $p/lib/pkgconfig/$r.pc; then
echo " found requisite $r in $p"
propagatedBuildInputs="$propagatedBuildInputs $p"
Copy link
Contributor

Choose a reason for hiding this comment

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

Take the opportunity to use +=.

Copy link
Member Author

Choose a reason for hiding this comment

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

Heh yeah I did that in cross-elegant originally and just lost it in the backport. Good catch.

crossEnvHooks+=(_grantleeCrossEnvHook)

_grantleeEnvHook() {
if providesGrantleeRuntime "$1"; then
Copy link
Contributor

Choose a reason for hiding this comment

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

Is it valid to use providesQtRuntime instead of providesGrantleeRuntime in the native case?

Copy link
Member Author

Choose a reason for hiding this comment

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

Ooo I bet it should have been grantlee for both all along.

This continues NixOS#23374, which always kept around both attributes, by
always including both propagated files: `propgated-native-build-inputs`
and `propagated-build-inputs`. `nativePkgs` and `crossPkgs` are still
defined as before, however, so this change should only barely
observable.

This is an incremental step to fully keeping the dependencies separate
in all cases.
@Ericson2314 Ericson2314 force-pushed the stdenv-both-propagated-files branch from f178da7 to da19c34 Compare November 21, 2017 15:45
@Ericson2314
Copy link
Member Author

@nixborg build

@nixborg
Copy link

nixborg commented Nov 21, 2017

Jobset created at https://hydra.mayflower.de/jobset/nixos/pr-31775

@dezgeg
Copy link
Contributor

dezgeg commented Nov 21, 2017

Sounds sensible, I think. Would be nice to see a full hydra jobset built just in case some package is doing something weird.

@Ericson2314 Ericson2314 merged commit 405412d into NixOS:staging Nov 22, 2017
@Ericson2314 Ericson2314 deleted the stdenv-both-propagated-files branch November 22, 2017 20:23
@Ericson2314
Copy link
Member Author

Ericson2314 commented Nov 22, 2017

[There was nothing interesting left in the second nixborg eval's queue.]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1.severity: mass-darwin-rebuild This PR causes a large number of packages to rebuild on Darwin 1.severity: mass-rebuild This PR causes a large number of packages to rebuild 6.topic: cross-compilation Building packages on a different platform than they will be used on 10.rebuild-darwin: 501+ 10.rebuild-darwin-stdenv This PR causes stdenv to rebuild 10.rebuild-linux: 501+ 10.rebuild-linux-stdenv This PR causes stdenv to rebuild
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants