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

darwin.stdenv: use minimal python to bootstrap clang #21078

Closed
wants to merge 1 commit into from

Conversation

LnL7
Copy link
Member

@LnL7 LnL7 commented Dec 11, 2016

Motivation for this change

By using a minimal version of python in the stdenv we can remove a bunch of dependencies like db, readline and sqlite.

I'm testing a branch WIP with #21078, #21099 and #21101.

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
    • Linux
  • 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.

+bootstrap-python-2.7.12.drv
+bzip2-1.0.6.0.1.drv
-bzip2-1.0.6.0.1.drv
-clang-5.3.patch
+cmake-3.6.2.drv
-cmake-3.6.2.drv
-curl-7.51.0.drv
-curl-7.51.0.tar.bz2.drv
-db-5.3.28.drv
-db-5.3.28.tar.gz.drv
-e0ec3471cb09.drv
-gdbm-1.12.drv
-gdbm-1.12.drv
-gdbm-1.12.tar.gz.drv
-hook.drv
+libarchive-3.2.2.drv
-libarchive-3.2.2.drv
-libssh2-1.7.0.drv
-libssh2-1.7.0.tar.gz.drv
-libxml2-2.9.4.drv
-link-against-ncurses.patch
+lzo-2.09.drv
-lzo-2.09.drv
-no-arch_only-6.3.patch
-openssl-1.0.2j.drv
-openssl-1.0.2j.drv
-openssl-1.0.2j.tar.gz.drv
+pkg-config-0.29.drv
-pkg-config-0.29.drv
-properly-detect-curses.patch
-python-2.7-distutils-C++.patch
-python-2.7.12.drv
-python-2.7.12.drv
-readline-6.3.tar.gz.drv
-readline-6.3p08.drv
-readline-6.3p08.drv
-readline63-001.drv
-readline63-002.drv
-readline63-003.drv
-readline63-004.drv
-readline63-005.drv
-readline63-006.drv
-readline63-007.drv
-readline63-008.drv
-setup-hook.sh
-sqlite-3.15.0.drv
-sqlite-autoconf-3150000.tar.gz.drv
-use-etc-ssl-certs.patch

@LnL7 LnL7 added 1.severity: mass-darwin-rebuild 6.topic: darwin Running or building packages on Darwin labels Dec 11, 2016
@mention-bot
Copy link

@LnL7, thanks for your PR! By analyzing the history of the files in this pull request, we identified @FRidh, @Ralith and @copumpkin to be potential reviewers.

@FRidh
Copy link
Member

FRidh commented Dec 11, 2016

Why do we want this? Are those dependencies a problem? Is it for the closure size? While it is possible with this change to reduce the closure size, it will typically require more building.

Earlier we got rid of the 'small' Python with the modules because it was causing a lot of confusion. It will need to be clear then that this derivation should typically not be used or we end up with the previous scenario.

Is it necessary to copy the 2.7 expression? I suppose passing null a bunch of times would be sufficient.

@LnL7
Copy link
Member Author

LnL7 commented Dec 11, 2016

The main reason why I would like this is to reduce the set of packages that only cause rebuilds on darwin.

@LnL7 LnL7 changed the title darwin.stdenv: use minial python to bootstrap clang darwin.stdenv: use minimal python to bootstrap clang Dec 11, 2016
@matthewbauer
Copy link
Member

Can we name it "pythonMinimal" instead of "pythonBoot"? "pythonMinimal" seems more descriptive.

@LnL7
Copy link
Member Author

LnL7 commented Dec 12, 2016

It's not really just a minimal python, things might not work if you do more then run a python script that uses the standard library. Might be better not to expose it in all-packages.nix

I'm working on some other changes that, together with this, will get rid of curl and openssl.

llvmPackages = callPackage ../development/compilers/llvm/3.7 {
cmake = cmakeBoot;
libxml2 = libxml2Boot;
python2 = python27Boot;
Copy link
Member

Choose a reason for hiding this comment

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

maybe use this only on Darwin

Copy link
Member Author

Choose a reason for hiding this comment

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

Is there a reason not to do this on linux? It's only used when building llvmPackages_*

Copy link
Member

Choose a reason for hiding this comment

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

Since I highly doubt anyone will have a system which didn't need already Python somewhere else.

Copy link
Member Author

Choose a reason for hiding this comment

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

Right, makes sense in that case.

@LnL7
Copy link
Member Author

LnL7 commented Dec 16, 2016

The cmake changes look pretty good, that will make this a bit simpler.

@LnL7
Copy link
Member Author

LnL7 commented Jan 2, 2017

Closing in favor of #21596

@LnL7 LnL7 closed this Jan 2, 2017
@LnL7 LnL7 deleted the darwin-stdenv-python branch January 2, 2017 21:42
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.

None yet

4 participants