Comments (6)
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.
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.
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.
╰─$ 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.
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.
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)
- C API: Mark as stable
- Nix >=2.19.0 has a regression on fetchGit submodules recursive clone
- Rename `SearchPath` HOT 4
- Implement `setStackSize` on Windows HOT 1
- Use portable C++ Pseudorandom number generator HOT 7
- Abstract over `getrusage` HOT 1
- Implement `updateWindowSize` on windows HOT 1
- Implement process spawning on Windows HOT 3
- Implement `PathLocks` on windows HOT 1
- Run unit tests in Wine in CI HOT 3
- Error installing nix in MacOS chip M1 after accidentally installed the linux version HOT 1
- Rename `PosixSourceAccessor` to `NativeSourceAccessor` HOT 2
- Enable the local store on Windows
- First CTRL-C as graceful stop
- C API: Use opaque structs instead of void
- Test "fix exportReferencesGraph when given store subpath"
- trace: warning while doing nix-env -u HOT 3
- Test environment report
- How to use setupHook/shellHook in the new cli (nix shell) HOT 2
- Under release notes, add more info on which releases are stable and unstable.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nix.