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

nix installation error; GLIBC_2.33 not found

trying to install nix (on a clean fedora 35 server), getting this error! Error message: /nix/store/sbbifs2ykc05inws26203h0xwcadnf0l-glibc-2.32-46/lib/libc.so.6: version `GLIBC_2.33' not found (required by /usr/local/lib/libsodium.so.23) my version…
rob
  • 51
  • 5
5
votes
0 answers

How to install golang package with custom tags in nix-shell?

I want to use go-migrate in my development environment, so I fill my shell.nix with { pkgs ? import {} }: pkgs.mkShell { buildInputs = [ pkgs.go-migrate ]; } But it will install go-migrate without any database drivers, so I can't…
sivakov512
  • 415
  • 5
  • 14
5
votes
1 answer

Run MacOS sed on Linux 64 using nix-shell or nix shell

Answering sed questions on SO I often come across the problem of "works on linux but not MacOS" is it possible to load a version of sed that runs on MacOS into a nix shell? Currently using flakes I can obtain the latest gnused using: nix shell…
potong
  • 55,640
  • 6
  • 51
  • 83
5
votes
0 answers

How can I copy a Haskell project managed with stack to another device for development?

I would like to move Haskell projects between my work computer and my laptop on a USB stick. I'm using the stack build system. My laptop is very often away from the Internet, sometimes when I initially insert the USB, so if I just copy the project,…
Ari Fordsham
  • 2,437
  • 7
  • 28
5
votes
2 answers

How can I override a package source in Nix?

So I want to replace pkgs.picom in my home-manager config with a newer fork. How can I do that? I have a feeling it's something like: let newPicom = pkgs.picom.override.src.url = "https://github.com/ibhagwan/picom"; in services.picom.package =…
Jonathan
  • 10,571
  • 13
  • 67
  • 103
5
votes
1 answer

Tried to delete a package from /nix/store now system has errors, how to fix?

error: opening file '/nix/store/4h464mkqfipf04jgz4jp3bx56sdn6av0-python3.7-somepackage-1.0.0.drv': No such file or directory I manually deleted some files in attempt to remove the package. However nix-shell no longer works and gives me the above…
Brian Yeh
  • 3,119
  • 3
  • 26
  • 40
5
votes
1 answer

How can I disable testing for a Haskell package in Nix?

I'm trying to get a development environment going for Haskell, using Nix. I have a default.nix that just refers to my .cabal file for the list of packages. But one package I want to use, numhask-space, won't build, because the tests are failing. So…
Jonathan
  • 10,571
  • 13
  • 67
  • 103
5
votes
0 answers

How is the libs path "/run/opengl-driver" injected into Nix binaries like compton

First I am not really comfortable with ELF and all this library linking process. But after having played a bit with Nix/NixOS, there is something I still don't really understand with the way graphic drivers are linked into binaries. One of the…
Loric
  • 1,678
  • 8
  • 28
  • 48
5
votes
1 answer

Fontconfig errors when launching emacs intalled with nix

I am using Ubuntu 19.10. I have nix version 2.3.1. I installed emacs 26.3 using: nix-env -iA nixpkgs.emacs When I launch emacs I get these error messages: (process:9100): Gtk-WARNING **: 09:41:39.668: Locale not supported by C library. Using the…
5
votes
1 answer

How can I add a python package to a shell.nix, if it's not in nixpkgs?

I have a shell.nix that I use for Python development that looks like this: with import {}; (( python37.withPackages (ps: with ps; [ matplotlib spacy pandas spacy_models.en_core_web_lg plotly ])).override({ignoreCollisions=true;…
Jonathan
  • 10,571
  • 13
  • 67
  • 103
5
votes
2 answers

What is a Nix expression in regard to Nix package management?

Even after reading the Nix manuals it is still confusing what Nix expressions really are. Sometimes they are referred to as derivations, but store derivations also mean something else.
toraritte
  • 6,300
  • 3
  • 46
  • 67
5
votes
2 answers

How to disable unpack phase to prevent error "do not know how to unpack source archive"?

with derivation let pkgs = import {}; in with pkgs; stdenv.mkDerivation { name = "asdfasdf"; version = "0.1"; src = /home/srghma/opt/foxitsoftware/foxitreader/FoxitReader; # this is executeable file dontUnpack = true; # not…
srghma
  • 4,770
  • 2
  • 38
  • 54
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
5
votes
2 answers

How do I override a Haskell package in nixpkgs via Nix?

Essentially I'm using this: default.nix { nixpkgs ? import {}, compiler ? "ghc864" }: nixpkgs.pkgs.haskell.packages.${compiler}.callPackage ./gitchapter.nix { } gitchapter.nix { mkDerivation, base, directory, extra, filepath, foldl,…
Chris Stryczynski
  • 30,145
  • 48
  • 175
  • 286
5
votes
1 answer

selecting a list of files as build input

I would like to restrict the number of files to include in my build src to a select few. Directly passing the list of files to src or srcs isn't allowed as an archive or a directory is expected. I couldn't find a function to do this and…
Bruno Bieth
  • 2,317
  • 20
  • 31