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…
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…
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…
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…
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…
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,…
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…
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…
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…
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 = […
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…
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 = ''
…
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…