Questions tagged [nixpkgs]

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

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

84 questions
2
votes
2 answers

Overriding nixpkgs with a forked Haskell package

I am trying to override a Haskell package in nixpkgs with my own fork. The code I have seems to work; I can see the new fork building. However, when I open a nix-shell, I don't have the right package version. Here is my shell.nix file. { nixpkgs ?…
Jezen Thomas
  • 13,619
  • 6
  • 53
  • 91
2
votes
3 answers

In Nixpkgs, what makes a python derivation an application rather than a library?

I'm trying to package a python application for Nix, but I'm finding that the majority of the documentation assumes that I want to package a library. In order to do this, I looked at Rednotebook example (not for any particular reason other than I…
Gareth Charnock
  • 1,166
  • 7
  • 17
2
votes
1 answer

Inject runtime dependency into nix package

Adding a runtime dependency to a package through override buildInputs causes the package to rebuild. Is there a simple way to inject runtime dependencies into a package without recompiling? So basically adding package/bin to PATH and package/lib to…
dvc
  • 124
  • 1
  • 9
1
vote
1 answer

How to prevent a Nixpkgs overlay from being applied more than once?

Suppose I have some Nixpkgs overlays composed from other overlays: overlayFoo = self: super: { # ... }; overlayBar = pkgs.lib.fixedPoints.composeExtensions overlayFoo (self: super: { # ... }; overlayBaz = pkgs.lib.fixedPoints.composeExtensions…
Yang Bo
  • 3,586
  • 3
  • 22
  • 35
1
vote
1 answer

How to make NodeJS available on PATH to Vim plugin?

I am trying to use the GitHub Copilot plugin for Neovim which is already available from Nixpkgs as copilot-vim. After installation, running the plugin with :Copilot setup gives me Copilot: 'Node.js not found in PATH'. I thought I could just add…
Vey
  • 435
  • 5
  • 15
1
vote
1 answer

Creating a shell.nix file that uses a local nixpkgs and has some extensive configuration

can someone help me write a shell.nix file for testing my PR https://github.com/NixOS/nixpkgs/pull/194516 The problem is that I can't just install the package as nix-env -f "./my-nixpkgs-repo" -iA nixos.fortuneExtensions.blag-fortune This is…
1
vote
1 answer

How to use a debug build of Qt *and submodules* in a Nix project?

Based on How can I create a development shell for qt 5.5 with debug symbols in the qt libraries, and looking at qtbase.nix, I tried this in default.nix: with import {}; stdenv.mkDerivation { name = "myapp"; buildInputs = [ …
glaebhoerl
  • 7,695
  • 3
  • 30
  • 41
1
vote
1 answer

Libudev as static library?

I’m trying to build a static binary that depends on libudev. Unfortunately nix-env -iA nixpkgs.pkgsStatic.libudev fails with: error: p11-kit cannot be used as a static library. Is there a better way of doing this?
dnalor
  • 11
  • 1
1
vote
1 answer

dotnet restore failed when using nix-build, but works when under nix-shell --pure

I'm trying to use nix for building dotnet (sdk 5) projects. The configuration is something like stdenv.mkDerivation { # builder = "${bash}/bin/bash"; # args = [ ./builder.sh ]; name = "mypackage"; src = ./.; HOME =…
xiang0x48
  • 621
  • 6
  • 20
1
vote
1 answer

How can I fix "[Errno 13] Permission denied: '_cmp.pyi'" in my Python nix flake?

I'm trying to install jupyter-book on NixOS. I have this flake: { description = "Introduction to Computational Literary Analysis, a Textbook"; outputs = { self, nixpkgs }: let system = "x86_64-linux"; pkgs = import nixpkgs { inherit…
Jonathan
  • 10,571
  • 13
  • 67
  • 103
1
vote
2 answers

What does two at (@) signs surrounding a string mean in a shell script?

For example, # Execute the pre-hook. export SHELL=@shell@ param1=@param1@ param2=@param2@ param3=@param3@ param4=@param4@ param5=@param5@ if test -n "@preHook@"; then . @preHook@ fi For context, this is from a shell script in a commit from 2004…
toraritte
  • 6,300
  • 3
  • 46
  • 67
1
vote
1 answer

What is the `patchShebangs` command in Nix build expressions?

Came across the patchShebangs command while looking at packages in the Nixpkgs repo, and saw it used in various phases of the standard environment's generic builder, but not sure what it is for or why it is needed in the first place.
toraritte
  • 6,300
  • 3
  • 46
  • 67
1
vote
0 answers

nixos mkDerivation godot mono version (C# support)

i'm on nixos 20.09 and try to build godot-3.2.3-stable with support for C#. I'm following the instruction on the godot docs, which states that one first has to enable the mono module and then generate the mono-glue. I tried to adapt the default.nix…
leunam
  • 11
  • 1
1
vote
1 answer

Custom Nix derivation for vim plugin fails

EDIT: leaving this as some history for other searching similar problems Some of it is solved, but last questions still unresolved See after the ==== line. I am using home manager and I set it up to provide me with neovim including some plugins.…
Chai
  • 1,796
  • 2
  • 18
  • 31
1
vote
1 answer

Building NixOS AMI image for Amazon from Nix on non-NixOS Linux

I'm trying to use nixos-generators to build an AMI in my Ubuntu machine which has nix package manager installed. I have this configuration: $ cat configuration.nix { pkgs, ... }: { imports = […
Sibi
  • 47,472
  • 16
  • 95
  • 163