Questions tagged [nixpkgs]

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

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

60 questions
19
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,027
  • 3
  • 39
  • 74
7
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
  • 28,558
  • 6
  • 66
  • 126
7
votes
1 answer

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
  • 7,405
  • 5
  • 46
  • 72
6
votes
2 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
  • 4,130
  • 3
  • 26
  • 43
5
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,026
  • 2
  • 16
  • 28
5
votes
3 answers

Overriding python with python3 in vim_configurable.customize

I am following this template for configuring my custom vim with Nix. My vim-config/default.nix is as follows: { pkgs }: let my_plugins = import ./plugins.nix { inherit (pkgs) vimUtils fetchFromGitHub; }; in with (pkgs // { python = pkgs.python3;…
Ben
  • 1,498
  • 10
  • 30
4
votes
1 answer

Configure location of ~/.config/nixpkgs/config.nix

Is there some envvar or similar that I can use to configure the location of ~/.config/nixpkgs/config.nix ?
user3416536
  • 1,247
  • 7
  • 11
4
votes
1 answer

node2nix override; wrapProgram: command not found

I'm packaging a node script with an external dependency (GraphicsMagick), and when attempting to override the derivation generated from node2nix I get the error: wrapProgram: command not found The following text goes into detail of what I've tried…
Jay
  • 16,941
  • 11
  • 49
  • 71
4
votes
1 answer

How to get the name from a nixpkgs derivation in a nix expression to be used by nix-shell?

I'm writing a .nix expression to be used primarily by nix-shell. I'm not sure how to do that. Note this is not on NixOS, but I don't think that is very relevant. The particular example I'm looking at is that I want to get this version-dependent name…
bbarker
  • 7,931
  • 5
  • 30
  • 44
4
votes
2 answers

nixOS: how to recover from collision between two instances of same package, same version

Here is my nixos version: $ nixos-version 16.09pre85931.125ffff (Flounder) Here is my shell script: $ cat test.nix { nixpkgs ? import { }, compiler ? "ghc801" }: let inherit (nixpkgs) pkgs; ghc =…
helpwithhaskell
  • 538
  • 4
  • 12
3
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,152
  • 3
  • 26
  • 31
3
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
  • 31
  • 1
3
votes
2 answers

How can I install extension of vscode?

This is a beginner question. So there is a package vscode-with-extensions. The package says: A set of vscode extensions to be installed alongside the editor. Here's a an example: vscode-with-extensions.override { # When the extension is already…
Manuel Schmidt
  • 2,227
  • 1
  • 14
  • 29
3
votes
1 answer

Docker — Cannot connect to the Docker daemon at unix:///var/run/docker.sock

I installed Docker 17.12.0-ce via Nix in Ubuntu (Linux uplink 4.13.0-36-generic #40~16.04.1-Ubuntu SMP Fri Feb 16 23:25:58 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux), but every time I try to execute any Docker command, it keeps telling me: Cannot…
x80486
  • 5,131
  • 4
  • 32
  • 71
3
votes
1 answer

How to properly reference a local, dependent derivation's output directory

I have a derivation (default.nix) defined as: with import {}; let version = "7.5.1"; in stdenv.mkDerivation { name = "gurobi-${version}"; src = fetchurl { url = http://packages.gurobi.com/7.5/gurobi7.5.1_linux64.tar.gz; …
bbarker
  • 7,931
  • 5
  • 30
  • 44
1
2 3 4