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

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

Merged
merged 1 commit into from Apr 22, 2023
Merged

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

merged 1 commit into from Apr 22, 2023

Conversation

ghost
Copy link

@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.
@ghost
Copy link
Author

ghost commented Aug 23, 2022

Ping @vrthra

@ghost
Copy link
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant