Skip to content

nix-shell inherits single CPU affinity when derivation has import from derivation #3345

@nmattia

Description

@nmattia

As title says. A nix-shell for the following derivation will have its affinity set to a single core:

with import <nixpkgs> {};
stdenv.mkDerivation
  {
    src = lib.cleanSourceWith
      {
        src = ./.;
        filter = _: _: builtins.hasAttr "bar" (builtins.readDir hello);
      };
    name = "foo";
  }
$ nix-shell --run nproc
1

There's probably a restoreAffinity() missing somewhere.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions