Questions tagged [nixpkgs]

Nixpkgs is the collection of packages available via Nix package manager.

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

84 questions
25
votes
1 answer

Build versus Runtime Dependencies in Nix

I am just starting to get to grips with Nix, so apologies if I missed the answer to my question in the docs. I want to use Nix to setup a secure production machine with the minimal set of libraries and executables. I don't want any compilers or…
Neil Bartlett
  • 23,743
  • 4
  • 44
  • 77
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

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
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
9
votes
3 answers

Where is `callPackage` defined in the Nixpkgs repo (or how to find Nix lambda definitions in general)?

Found a lot of sources describing callPackage and some of its internals, but none that refers to it's location. It's like the best kept secret of Nix, and the manuals even seem to be actively avoiding the topic. I could find it given time, but it's…
toraritte
  • 6,300
  • 3
  • 46
  • 67
8
votes
1 answer

How does Nix's "callPackage" call functions defined without an ellipsis?

To call a Nix function that uses set destructuring, you need to pass it a set with exactly the keys it requires, no more and no less: nix-repl> ({ a }: a) { a = 4; b = 5; } error: anonymous function at (string):1:2 called with unexpected argument…
Chris Martin
  • 30,334
  • 10
  • 78
  • 137
8
votes
2 answers

NixOS install specific NodeJS version

I can see that NixOS has these versions available for install: ... nodejs-0.10-statsd-0.7.2 nodejs-0.10.42 nodejs-4.3.1 nodejs-5.9.0 ... yet systemPackages doesn't like me installing nodejs-5.9.0 as it complains that: error: syntax error,…
Alex
  • 8,093
  • 6
  • 49
  • 79
6
votes
3 answers

How to find the commit a Nix channel points to?

When trying to revive old projects, sometimes I have to fish around for older Nixpkgs commits to get things started. For example, most of my shell.nix files start like this, {pkgs ? import {} }: pkgs.mkShell { # ... } that would import…
toraritte
  • 6,300
  • 3
  • 46
  • 67
6
votes
1 answer

nix-shell: how to load environment variables from env file?

Related to this question: nix-shell: how to specify a custom environment variable? With this derivation: stdenv.mkDerivation rec { FOO = "bar"; } FOO will be available in the nix shell as an environment variable, but is it possible to load…
José Luis
  • 3,713
  • 4
  • 33
  • 37
6
votes
1 answer

Nix: How to override stdenv.cc with overlay globally?

I would like to override stdenv.cc to a specific GCC version (not necessarily in nixpkgs) globally using an overlay (i.e. without changing nixpkgs). Is there a way to do that? An overlay like this causes an infinite recursion (since package gcc49…
afarkas
  • 61
  • 2
6
votes
2 answers

How can I enable Caddy plugins in NixOS?

I've just started playing with NixOS, and have so far managed to edit /etc/nixos/configuration.nix in my NixOS 18.09 VM to have PHP-FPM and the Caddy webserver enabled. { config, pkgs, ... }: { imports = […
David Oliver
  • 2,424
  • 1
  • 24
  • 37
6
votes
1 answer

In NixOS, how can I resolve a collision?

I'm trying to set up a development environment with Python, including the Python libraries Spacy and Pandas. The command I'm trying to run is nix-shell -p 'python36.withPackages(ps: with ps; [ spacy pandas ])' But this is what happens: these…
Jonathan
  • 10,571
  • 13
  • 67
  • 103
6
votes
0 answers

Ubuntu 18 nixpkgs conda - relocation error libc.so.6 symbol _dl_exception_create, version GLIBC_PRIVATE ld-linux-x86-64.so.2 link time reference

the setup: system: "x86_64-linux" host os: Linux 4.15.0-22-generic, Ubuntu, 18.04 LTS (Bionic Beaver) multi-user?: no sandbox: no version: nix-env (Nix) 2.0.2 channels(aeug): "nixpkgs-18.09pre140731.c29d2fde74d" nixpkgs:…
InLaw
  • 2,537
  • 2
  • 21
  • 33
6
votes
2 answers

How to debug nix-build errors for a custom nix file?

I'm trying to use Nix on Ubuntu 16.04. After setup, I try to build the following expression: let pkgs = import {}; stdenv = pkgs.stdenv; in rec { scalaEnv = stdenv.mkDerivation rec { name = "scala-env"; shellHook = '' …
bbarker
  • 11,636
  • 9
  • 38
  • 62
5
votes
1 answer

What is the nix-expression ""?

When querying for hackage packages, the manual suggests using the command: $ nix-env -f "" -qaP -A haskellPackages Thus we define the 'active Nix expression' to be "" when searching for Haskell packages. What does this expression…
mherzl
  • 5,624
  • 6
  • 34
  • 75
1
2 3 4 5 6