Giter Club home page Giter Club logo

Comments (6)

SrEstegosaurio avatar SrEstegosaurio commented on June 2, 2024 1

using: nix-shell -vvv -j 10 --cores 10 -p nix-info --run "nix-info -m" certainly speeds it up, is there a better way to do this?

You can set both the jobs and cores as options to avoid having to input them every single time. Here's the documentation https://nixos.org/manual/nix/stable/command-ref/conf-file.html?highlight=--max-jobs#conf-max-jobs

from nix.

Mastermjr avatar Mastermjr commented on June 2, 2024

well I suppose the process does eventually finish, but this takes a total of 17 minutes to run... I've updated the issue

from nix.

Mastermjr avatar Mastermjr commented on June 2, 2024

using: nix-shell -vvv -j 10 --cores 10 -p nix-info --run "nix-info -m" certainly speeds it up, is there a better way to do this?

from nix.

Mastermjr avatar Mastermjr commented on June 2, 2024

╰─$ time nix-shell -p nix-info --run "nix-info -m" 1 ↵

  • system: "aarch64-darwin"
  • host os: Darwin 23.4.0, macOS 14.4.1
  • multi-user?: yes
  • sandbox: no
  • version: nix-env (Nix) 2.21.1
  • channels(root): "nixpkgs"
  • nixpkgs: /nix/store/qjgi80svyhfcwbnlvzzaqg0nyr7h2w59-source

nix-shell -p nix-info --run "nix-info -m" 3.23s user 1.08s system 10% cpu 39.250 total

╰─$ time nix-shell -j 10 --cores 10 -p nix-info --run "nix-info -m"

  • system: "aarch64-darwin"
  • host os: Darwin 23.4.0, macOS 14.4.1
  • multi-user?: yes
  • sandbox: no
  • version: nix-env (Nix) 2.21.1
  • channels(root): "nixpkgs"
  • nixpkgs: /nix/store/qjgi80svyhfcwbnlvzzaqg0nyr7h2w59-source

nix-shell -j 10 --cores 10 -p nix-info --run "nix-info -m" 3.96s user 1.45s system 10% cpu 53.751 total

this adds no speed up... is there a way I can use a cached version of nixpkgs or a cached version of the shell to speed up run time?

from nix.

Mastermjr avatar Mastermjr commented on June 2, 2024

thanks, I'm not going to close this, as its still an issue I'm having on my corporate mac m1, BUT
I'm working around the issue right now by running a nixos vm with no issues.

I do need to use the shell on the host to setup a python environment for my vim settings, so at some point I'll probably just need to setup nix-darwin so the proxy settings and everything run right.
Is there someway I can cache the nixpkgs import in my shell so I can just use a locally pulled copy of nixpkgs?

{ pkgs ? import <nixpkgs> {} }:
pkgs.mkShell {
  packages = [
    (pkgs.python312.withPackages (python-pkgs: [
      # select Python packages here
      python-pkgs.tasklib
      python-pkgs.six
      python-pkgs.packaging
    ]))
    pkgs.python312Packages.pip
  ];
}

that way i only have to deal with this 17 minute download once. Thanks in advance, and I'll post on here if I can figure it out as well

from nix.

SrEstegosaurio avatar SrEstegosaurio commented on June 2, 2024

You could look into [direnv](https://github.com/direnv/direnvl)and [nix-direnv](https://github.com/nix-community/nix-direnv?tab=readme-ov-file#nix-direnv) that combo would cache your devShell. There's at least a NixOS option for comfortably enabling those tho I don't know about nix-darwin.

from nix.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.