jojo
April 21, 2020, 9:29am
1
I am unable to install the direvent monitoring daemon – a GNU project that strengthens inotify.
AFAIK direvent seems well packaged though, with its callPackage line in all-packages.nix .
I tried to install it using an up to date nixpkgs local repo
nix-env -iA nixos.direvent -I nixpkgs=/home/<user>/Dev/nixpkgs
without any success. Installing packages, like dejagnu or lattice-diamond (at the same location in nixpkgs), work fine.
What am I missing here ?
EDIT
cd nixpkgs/pkgs/development/tools/misc/direvent
nix-build -E 'with import <nixpkgs> { }; callPackage ./default.nix { }'
works, but I still need the standard way to install direvent for my project.
Mic92
April 21, 2020, 10:11am
2
This package is not available in 19.09. You can upgrade to 20.03 however to install it.
It is also possible import a newer nixpkgs tarball in your project’s shell.nix.
jojo
April 21, 2020, 10:13am
3
Even if I use the nixos-unstable branch of nixpkgs-channels repo ?
Mic92
April 21, 2020, 10:15am
4
It is in my nixos-unstable channel. Is your nixos-unstable channel out-of-date or do you by chance not the channel you think you use?
jojo
April 21, 2020, 10:17am
5
What is really surprising is that direvent is in my local nixpkgs tree. I can see it. My local nixpkgs is a clone of the nixos-unstable branch of the nixpkgs-channels repository.
Can you install direvent ?
Mic92
April 21, 2020, 10:19am
6
Yes, what is the output of nix-shell -p nix-info --run "nix-info -m"
on your machine?
jojo
April 21, 2020, 10:20am
7
- system: `"x86_64-linux"`
- host os: `Linux 5.4.30, NixOS, 19.09.2370.e10c65cdb35 (Loris)`
- multi-user?: `yes`
- sandbox: `yes`
- version: `nix-env (Nix) 2.3.3`
- channels(jlucas): `"home-manager"`
- channels(root): `"nixos-19.09.2370.e10c65cdb35"`
- nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos`
Mic92
April 21, 2020, 10:21am
8
You are not using the unstable channel. You are using nixos-19.09.2370.e10c65cdb35
jojo
April 21, 2020, 10:21am
9
I thought that the option -I nixpkgs=/home/<user>/Dev/nixpkgs
superseded the configured channel.
Mic92
April 21, 2020, 10:23am
10
Yes. If you are using nixos-rebuild or nix-shell. For nix-env
use: nix-env -f /home/<user>/Dev/nixpkgs -iA direvent
jojo
April 21, 2020, 10:28am
11
Ok thanks, that works fine
In nix-env
manual I read
Paths added through -I take precedence over NIX_PATH.
thus I thought that it would precede the configured 19.09 nix-channel.
I need to understand more how channels are linked to NIX_PATH I guess.
Mic92
April 21, 2020, 10:30am
12
I have also not really understand how channels or nix-env works in detail. I have a nixpkgs checkout in my NIX_PATH and use nixos-rebuild/home-manager.
if you pass -I nixpkgs=/home/<user>/Dev/nixpkgs
I think you should run nix-env -iA nixpkgs.direvent
jojo
April 21, 2020, 12:25pm
14
I tried with nixpkgs.direvent
instead of nixos.direvent
. Updating to nixos-20.03
solves my issue anyway – even if I still do not fully understand what was wrong.