[Nix-dev] Java plugin for FF

Bjørn Forsman bjorn.forsman at gmail.com
Sat Oct 12 13:51:08 CEST 2013


On 12 October 2013 07:43, shacka <shacka at gmail.com> wrote:
> Hi,
>
> I finally found a way to get java plugin working. Basically I had firefox
> installed using 'nix-env -i firefox', that didn't work. So I uninstalled the
> package,  added 'firefoxWrapper' to my configuration.nix and ran
> 'nixos-rebuild switch'. This time it worked! Though I wasn't able to achieve
> my initial goal - be able to use browser based VPN (Juniper Networks). But
> I'm guessing it's much harder to fix (if even possible).
>
> Few questions regarding my experience still bothering me:
> * what's the difference between installing package with 'nix-env -i' and
> adding the same package to configuration.nix?

AFAIK, there should be no difference.

> * why I can specify firefoxWrapper in configuration.nix, but can't do
> 'nix-env -i firefoxWrapper'

Nixpkgs packages can be referred to by name or attribute. "nix-env -i
package" installs the package by package name, "nix-env -iA package"
by attribute name.

Take a look here:

$ nix-env -qaP | grep firefox
nixos.pkgs.firefox13Wrapper
        firefox-13.0.1-with-plugins
nixos.pkgs.firefox
        firefox-24.0
nixos.pkgs.firefoxWrapper
        firefox-24.0-with-plugins
nixos.pkgs.firefox36Wrapper

The first column is the attribute name, the second column is the
package name. "nix-env -i firefoxWrapper" doesn't work because there
is no package *name* that matches.

You can install a package with nix-env by attribute name with -A, like this:

$ nix-env -iA nixos.pkgs.firefoxWrapper
installing `firefox-24.0-with-plugins'
building path(s) `/nix/store/n3iss8zccvlnkd3r4z3jd6b8fy0kmpxx-user-environment'
created 862 symlinks in user environment

Notice how it picked the package named "firefox-24.0-with-plugins".

IMHO, we should probably rename either the attribute or the package
name so that they are the same. That way we don't get this confusion.

Best regards,
Bjørn Forsman


More information about the nix-dev mailing list