0

I know that a nix package from repository can be installed via:

 nix-env -i package-name

After that command executable file is on the path and it everything fine.

On project page I spot that a nix package could be build from source:

 nix-build -A package-name

Building completes successfully and path to executable is printed on console, but current nix environment doesn't see the new program. Sure I can modify PATH manually, but I would like to use nix-build option or addition nix-env run and don't bother with modifying configuration files manually.

1 Answers1

0

In addition to the comment of Vladimir you can do:

nix-env -i -f default.nix

to install the single package defined in default.nix as explained here and if you actually define in default.nix a set of packages then it would be like:

nix-env -i -A package-name -f default.nix

Note that if you are using flake you can use

nix profile install .#package-name
Glorfindel
  • 805
  • 2
  • 10
  • 19
tobiasBora
  • 3,376
  • 2
  • 23
  • 34