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

Propagate NIX_BUILD_CORES to nix-shell environments #1313

Merged
merged 1 commit into from Aug 2, 2017

Conversation

neilmayhew
Copy link
Member

This fixes #1025 which has annoyed me for some time.

I've tested it it by using a patch override in ~/.nixpkgs/config.nix and then installing nix with nix-env -i nix. I'm on NixOS 16.09 (16.09.1914.cbf3d03). Here's the override I used:

diff --git a/config.nix b/config.nix
index b7754a4..7cadb3a 100644
--- a/config.nix
+++ b/config.nix
@@ -44,6 +44,9 @@
         buildInputs = [ super.ncurses super.perl ];
         patches = [ ./inetutils.patch ];
     });
+    nix = super.stdenv.lib.overrideDerivation super.nix (oldAttrs : {
+        patches = [ ./Propagate-NIX_BUILD_CORES-to-nix-shell-environments.patch ];
+    });
 
     # Customized packages
     texlive = super.texlive.combine {

I also wrote a fix for the same issue in the C++ implementation on master, but wasn't sure how best to test it. I'll submit a different PR for that.

@neilmayhew
Copy link
Member Author

See #1314 for an equivalent fix for master.

@copumpkin
Copy link
Member

This (and #1314) seems safe and good. @edolstra @domenkozar @shlevy?

@shlevy
Copy link
Member

shlevy commented Apr 14, 2017

👍 from me. Ping me in a few days if there are no objections and I'll merge

@domenkozar domenkozar merged commit 3afb744 into NixOS:1.11-maintenance Aug 2, 2017
@neilmayhew neilmayhew deleted the topic/cores branch August 21, 2017 18:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants