Skip to content

units: fix build with enableCurrenciesUpdater=false; pythonPackages=null;#182172

Merged
Artturin merged 1 commit intomasterfrom
unknown repository
Apr 22, 2023
Merged

units: fix build with enableCurrenciesUpdater=false; pythonPackages=null;#182172
Artturin merged 1 commit intomasterfrom
unknown repository

Conversation

@ghost
Copy link
Copy Markdown

@ghost ghost commented Jul 20, 2022

Description of changes

Units allows to build it without a python dependency by setting { enableCurrenciesUpdater=false; pythonPackages=null; }. Unfortunately this feature is currently broken due to two problems:

  1. The pythonEnv string is part of the builder environment, so it is not evaluated lazily. This means that pythonPackages==null will always cause eval to fail.

  2. pythonEnv is used unconditionally in an antiquotation in the prePatch phase; if it is null this will fail.

Let's fix these so we can build a pythonless "units" package.

This is helpful when cross-compiling, because right now a lot of python packages (especially python-cryptography) fail to cross-compile.

Things done
  • Built on platform(s)
    • x86_64-linux
    • mips64el-linux, cross from x86_64-linux
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • Fits CONTRIBUTING.md.

…ull;

Units allows to build it without a python dependency by setting {
enableCurrenciesUpdater=false; pythonPackages=null; }.  Unfortunately
this feature is currently broken due to two problems:

1. The `pythonEnv` string is part of the builder environment, so it is
   not evaluated lazily.  This means that `pythonPackages==null` will
   always cause eval to fail.

2. `pythonEnv` is used unconditionally in an antiquotation in the
   `prePatch` phase; if it is null this will fail.

Let's fix these so we can build a pythonless "units" package.

This is helpful when cross-compiling, because right now a lot of
python packages (especially python-cryptography) fail to
cross-compile.
@ofborg ofborg bot requested a review from vrthra July 20, 2022 05:38
@ofborg ofborg bot added 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-darwin: 1 This PR causes 1 package to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. labels Jul 20, 2022
@ghost
Copy link
Copy Markdown
Author

ghost commented Aug 23, 2022

Ping @vrthra

@ghost
Copy link
Copy Markdown
Author

ghost commented Jan 18, 2023

Ping

@Artturin Artturin merged commit 0010465 into NixOS:master Apr 22, 2023
@ghost ghost deleted the pr/units/pythonless branch April 24, 2023 00:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-darwin: 1 This PR causes 1 package to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant