Questions tagged [nix]

Nix is a purely functional package manager.

Nix is a purely functional package manager. This means that it treats packages like values in purely functional programming languages such as Haskell — they are built by functions that don’t have side-effects, and they never change after they have been built.

Home page: http://nixos.org/nix

770 questions
13
votes
3 answers

error: file 'nixpkgs' was not found in the Nix search path (add it using $NIX_PATH or -I)

I've used sh <(curl -L https://nixos.org/nix/install) --daemon to install Nix. After installation completed run nix-shell -p nix-info --run "nix-info -m" to verify the installation. It returns the following error Output warning: Nix search path…
Anto
  • 153
  • 1
  • 7
13
votes
1 answer

nixos installation issue,'command not found: nix'

I deleted /nix and started a fresh install of nix, however after installing nix install nix (MACBook Pro M1 arm64 BigSur) with sh <(curl -L https://nixos.org/nix/install) I run $ nix but I get the output zsh: command not found: nix , same for…
Neo
  • 717
  • 2
  • 11
  • 26
13
votes
5 answers

How to install NPM end-user packages on NixOS?

Is there a way to install NPM command line tools on NixOS? [root@ip-xxx-xxx-0-27:~/teros/ntrs-cli]# sudo npm i -g typescript npm WARN checkPermissions Missing write access to…
Alexander Mills
  • 90,741
  • 139
  • 482
  • 817
13
votes
1 answer

macOS Package Managers: Using Nix alongside Homebrew?

I was wondering if there would be any issues with installing Nix and Homebrew on the same system? I know Homebrew tends to install things all over different directories, but from what I have read, Nix is very clean. If I understand this correctly,…
kokko1G
  • 153
  • 1
  • 8
13
votes
1 answer

How buildEnv builtin function works?

How buildEnv works? Why its builtin? How can I use it? What does manifest argument? Where is the documentation about buildEnv?
srghma
  • 4,770
  • 2
  • 38
  • 54
13
votes
1 answer

How to use Nix to setup a development environment?

Let's say I need PostgreSQL 9.6.3 and Ruby 2.3.1 and various other tools. I can't find a tutorial that explains what I need to do. From the Nix manual, I seem to need to write a Nix expression to install the needed dependencies, but I can't make the…
François Beausoleil
  • 16,265
  • 11
  • 67
  • 90
13
votes
3 answers

Get Spacemacs/Emacs GUI version to recognize nix-shell environment

I do my development in a Nix shell (create a default.nix file in my project root and then run nix-shell . to give me a shell with access to the project dependencies). Spacemacs is my main editor, but when I try to run the GUI version via emacs & I…
josiah
  • 1,314
  • 1
  • 13
  • 33
12
votes
2 answers

How to use nix-shell properly and avoid "dumping very large path"?

Based on my readings (notably the wiki and this blog post), I have come up with the following default.nix that I load with nix-shell: with import {}; let emacs = emacsWithPackages (p : [ p.tuareg ]); in stdenv.mkDerivation rec { …
Zimm i48
  • 2,901
  • 17
  • 26
12
votes
1 answer

An Overview of Nix/OS Architecture?

While the Nix/OS wiki and manuals provide a lot of excellent information, I am still having trouble getting an architectural overview. Apologies for the quantity and naivity of the questions; feel free to answer a subset: 1. What constitutes a Nix…
Ixxie
  • 1,393
  • 1
  • 9
  • 17
11
votes
0 answers

Better reproductibility of rPackages (pin version of packages) in nix in comparison to guix

I'm actually evaluate different solution to enhance/explore reproductibility in my R/Python scientific workflow : data with reproductible analysis (plot, analysis) and paper. There is, as you know, two big linux flavours offer some solutions : Nix…
reyman64
  • 523
  • 4
  • 34
  • 73
11
votes
1 answer

How to find a derivation path in the store, starting from the compiled package path?

I'm using Nix 2.2.1, in particular this NixOS Docker image. I install Vim like this: # nix-env --install --file '' vim The store path of the Vim executable is # readlink -f $(which…
danidiaz
  • 26,936
  • 4
  • 45
  • 95
11
votes
3 answers

nix-env and nix-build not found after installation (debian buster)

after the installation following the instructions with curl https://nixos.org/nix/install | sh and logout/login, nix-env and nix-build are not found. I had the problem with debian stretch and now with buster. What am I doing wrong?
user855443
  • 2,596
  • 3
  • 25
  • 37
11
votes
1 answer

How can I make macOS frameworks available to clang in a Nix environment?

I'm on macOS 10.13.5, learning to program Rust, and I use Nix to control my development environment. Some actions, such as including the jsonwebtoken library or installing the cargo-watch module, cause a build that requires a macOS framework that…
Savanni D'Gerinel
  • 2,379
  • 17
  • 27
11
votes
2 answers

Loading dependencies from nixpkgs-unstable with nix-shell

I am on NixOS 16.09 and I want to use packages which are currently only in nixpkgs-unstable / nixos-unstable. Using nix-channel --add, I was able to add nixpkgs-unstable to my (user) channels and use it to install the latest version of some packages…
Zimm i48
  • 2,901
  • 17
  • 26
11
votes
5 answers

Can nix be installed in a different location other than /nix?

After some time, I am starting to run out of disk space in my development machine (only 128GB). For this reason, I have decided to move local cache stores (.npm, .m2, .ivy2, etc.) to an external drive. I switched recently to Nix for Haskell…
jarandaf
  • 4,297
  • 6
  • 38
  • 67
1
2
3
51 52