[Nix-dev] how to install nilfs-utils ?

Bjørn Forsman bjorn.forsman at gmail.com
Sat Aug 17 13:25:55 CEST 2013


On 17 August 2013 13:13, Tim Barbour <trb at categorical.net> wrote:
> I am trying to install nilfs-utils.
>
> According to the wiki ( http://nixos.org/wiki/Install/remove_software ), I can
> install a package by 'nix-env -i <package> for one user, or I can install it
> for all users by adding it to environment.systemPackages . The second way does
> not work for me for nilfs-utils. If I put
>
>   environment.systemPackages = with pkgs; [
>      wget httpfs2
>      nilfs-utils
>   ];
>
> in /etc/nixos/configuration.nix, then nix complains:
>
> $ nixos-rebuild build
> building Nix...
> building the system configuration...
> error: undefined variable `nilfs-utils'
>
> but other packages like wget or httpfs2 are fine.
> Also 'nix-env -i nilfs-utils' works fine.
>
> What is wrong with putting nilfs-utils in environment.systemPackages ?
> Does it have something to do with the hyphen in the name, or is nilfs-utils a
> special kind of package ? In the latter case, how can one tell ?
> How can it be installed for all users ?

"nix-env -i" installs by package name (unless you use -A). In
systemPackages you must provide an attribute name, not package name.
The following command shows attribute name followed by package name:

$ nix-env -qaP \* | grep nilfs
nixos.pkgs.nilfs_utils
          nilfs-utils-2.0.19

Basically, you want "nilfs_utils" in systemPackages,

Best regards,
Bjørn Forsman


More information about the nix-dev mailing list