Skip to content

gettext: Don't use envHooks anymore - #33524

Merged
orivej merged 1 commit into
NixOS:stagingfrom
srhb:gettext-addEnvHooks
Jan 7, 2018
Merged

orivej merged 1 commit into
NixOS:stagingfrom
srhb:gettext-addEnvHooks

Conversation

@srhb

@srhb srhb commented Jan 6, 2018 •

Copy link
Copy Markdown
Contributor
Motivation for this change

After conferring with @jtojnar on irc, we believe this was simply missed 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.

@GrahamcOfBorg GrahamcOfBorg added 10.rebuild-darwin-stdenv This PR causes stdenv to rebuild on Darwin and must target a staging branch. 10.rebuild-linux-stdenv This PR causes stdenv to rebuild on Linux and must target a staging branch. 10.rebuild-darwin: 501+ This PR causes many rebuilds on Darwin and should normally target the staging branches. 10.rebuild-linux: 501+ This PR causes many rebuilds on Linux and should normally target the staging branches. labels Jan 6, 2018
@srhb
srhb changed the base branch from master to staging January 6, 2018 14:06
@srhb
srhb changed the base branch from staging to master January 6, 2018 14:07
@srhb
srhb force-pushed the gettext-addEnvHooks branch from 7486fdf to 95ecb1f Compare January 6, 2018 14:11
@srhb
srhb changed the base branch from master to staging January 6, 2018 14:11
@srhb

srhb commented Jan 6, 2018

Copy link
Copy Markdown
Contributor Author

Rebased onto staging.

@orivej

orivej commented Jan 6, 2018

Copy link
Copy Markdown
Contributor

Then other instances of envHooks+= should be replaced as well?

@srhb

srhb commented Jan 6, 2018

Copy link
Copy Markdown
Contributor Author

Probably. There's three left:

data/misc/tzdata/tzdata-setup-hook.sh
applications/misc/gnuradio/default.nix
development/libraries/dleyna-core/setup-hook.sh

This one is the only one holding back the channel though, as far as I can see.

@Ericson2314

Copy link
Copy Markdown
Member

Thanks! Just need to make sure we use the right offset.

@srhb

srhb commented Jan 6, 2018

Copy link
Copy Markdown
Contributor Author

It is a very naïve fix. I don't know if it is the right offset.

@orivej

orivej commented Jan 6, 2018

Copy link
Copy Markdown
Contributor

@Ericson2314 The documentation says that "These 6 bash variables (envBuildBuildHooks etc.) correspond to the 6 sorts of dependencies by platform", but I don't understand what these sorts mean. For example, what is envBuildTargetHooks?

@Ericson2314

Copy link
Copy Markdown
Member

So env<Foo><Bar>Hooks gets applied to pkgs<Foo><Bar> only. On native it doesn't matter, for back compat, but let's not count on that!

addEnvHooks <Foo-offset> adds to each env<Foo>*Hooks, cause normally you don't care about the target platform of the dependency being mapped.

Basically, gettext is always a native build input, so use host offset for other native build inputs, or target offset for build inputs.

@orivej

orivej commented Jan 6, 2018

Copy link
Copy Markdown
Contributor

What is pkgsBuildTarget?

@orivej
orivej merged commit 175d890 into NixOS:staging Jan 7, 2018
@Ericson2314

Copy link
Copy Markdown
Member

That would be things running on the build platform but compiling for the target platform. Imagine you are building a build != host != target (Canadian cross) compiler. You use a build->host compiler to build the compile itself. But you cannot use that to build the new compiler's runtime. You can't use the new compiler either cause you cannot run it. Instead you use a separate build->target compiler instead.

[Ideally we would use the new compiler to build the run time like any other library, on the host platform where thst compiler will actually run, but some compilers insist the runtime be built with the compiler that generates code using it, giving us the need for such a weird dependency.]

srhb added a commit to srhb/nixpkgs that referenced this pull request Jan 7, 2018
This reverts commit d3ad52a.

In order to see if NixOS#33524 is
sufficient
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

10.rebuild-darwin: 501+ This PR causes many rebuilds on Darwin and should normally target the staging branches. 10.rebuild-darwin-stdenv This PR causes stdenv to rebuild on Darwin and must target a staging branch. 10.rebuild-linux: 501+ This PR causes many rebuilds on Linux and should normally target the staging branches. 10.rebuild-linux-stdenv This PR causes stdenv to rebuild on Linux and must target a staging branch.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants