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
0
votes
1 answer

Different sha256 between nix-hash and nix-prefetch-url

When I want to precompute the sha256 of a downloaded file foo.txt, the output of nix-hash on the manually downloaded file is different from the one that is printed by nix-prefetch-url. How can I compute the same hash with nix-hash?
Markus1189
  • 2,829
  • 1
  • 23
  • 32
0
votes
1 answer

Nix Hydra throws errors on imports with , where symbol is not

There is something that is not completely clear to me on hydra. The following jobset: { nixpkgs ? import { config.allowUnfree = true; config.allowBroken = true; } , my_package ? path/to/package/default.nix…
0
votes
1 answer

What is a reliable way to include libraries for virtualenv python packages in nix?

I'll start by saying virtualenv is basically a requirement here since Nix is not yet being used by the rest of the development team. This excellent guide on Python in Nix doesn't quite drill down to this particular issue. In some cases I can update…
bbarker
  • 11,636
  • 9
  • 38
  • 62
0
votes
1 answer

building custom packages in a user's home directory

I've noticed that any attempt to build custom packages in a user's home directory fails, due to the home directory permissions: drwx------ coupled with the fact that nix-rebuild switch uses the nixbld{n} user. Is there any way of getting around…
category
  • 2,113
  • 2
  • 22
  • 46
0
votes
1 answer

How to make cabal to be found in a straigthforward nix-pill 8.1 imitation?

The cabal isn't found on the following example and the question is, how to correct the example so that cabal is found. This example is very straigthforward modification of the nix pill 8.1. On nix-repl, typing :l and then…
Gspia
  • 809
  • 6
  • 15
0
votes
1 answer

How to refresh a nix derivation (nix pill's 7.5) in nix-repl?

Looking at the example given in the 7th nix pill, typing :b simple builds the derivation for a short c program. In nix-repl simple = derivation { name = "simple"; builder = "${bash}/bin/bash"; args = [ ./simple_builder.sh ]; gcc = gcc; coreutils =…
Gspia
  • 809
  • 6
  • 15
0
votes
1 answer

How to have a derivation not clash with derived environment in Nix?

I get the following collision error when attempting to build an environment that, as far as I can see, shouldn't have a collision (in this case, scala-env depends on ideaLocal, so it shouldn't conflict with…
bbarker
  • 11,636
  • 9
  • 38
  • 62
0
votes
1 answer

Error: One Nix Package Trying to Paste a File into Another Nix Package (self.NixOS) submitted

1 Context I am trying to build nix expressions for two packages: OSVR-Core OSVR-Vive I have successfully written (1); however, I am having a problem with (2). This is partially because in order to build (2), you need (1) as a dependency. But…
George
  • 6,927
  • 4
  • 34
  • 67
0
votes
1 answer

Where should the builder script be located for a stand-alone nix expression?

I have a nix expression file (.nix) and a shell script builder, specified like: stdenv.mkDerivation rec { name = "my-env"; builder = './my-builder.sh'; ... ./my-builder.sh: No such file or directory when I run nix-build ./my-env.nix;…
bbarker
  • 11,636
  • 9
  • 38
  • 62
0
votes
1 answer

SaltStack Caches installing package files and reproduce installation later

When we use a YAML file to install packages like this below nginx: pkg.installed Is there any convenient way to cache the installing binary files used by SaltStack, and reuse them with Saltstack later? With these caches, we can ask SaltStack to…
0
votes
1 answer

Nix: installing ssreflect

I am using Coq (versions 8.5-6), installed w/ Nix. I want to install ssreflect, preferably also w/ Nix. The only information I found about this is here. However, this is not about installing ssreflect, merely trying it out. Nevertheless, I tried to…
jaam
  • 900
  • 4
  • 23
0
votes
1 answer

nix-shell for perlPackages

problem i want to play with a perl package called Mail::SPF and there is a Build.PL issue. now i would like to modify the source before running the buildPhase. for c/c++ based projects this is working well but for perl it fails: nix-shell -I…
qknight
  • 866
  • 10
  • 23
0
votes
4 answers

Where is the Nixos configuration located for the nix image on dockerhub?

According to https://chris-martin.org/2015/installing-nixos there is a /etc/nixos/configuration.nix file present. I'm using the docker container from https://hub.docker.com/r/nixos/nix/ and running find . -name "configuration.nix" within the…
Chris Stryczynski
  • 30,145
  • 48
  • 175
  • 286
0
votes
1 answer

Preventing nix-env -i from installing $out/lib in the user-environment

Is it possible to prevent the contents of lib/ in a derivation from getting installed in the active user-environment? The package in question has an internal lib/ folder which should not be exposed to users, nor clutter the environment. As far as…
0
votes
1 answer

nixos-option for NixOps deployed machine?

There is a command nixos-option which examines given system's option value. Under the hood it does something like: $ nix-instantiate --eval -E ' let nixos = import { }; opt = nixos.config.networking.firewall.allowedTCPPorts; …
danbst
  • 3,363
  • 18
  • 38