`flox install .` builds package but does not include it into environment?

I built an own package based on spotify_player and it builds under flox build successfuly, flox run also works. I tried to run flox install . and it does installation but flox list shows nothing. I tried adding package name to flox install but it does not work.

For now I just linked ./result/bin/spotify_player to ~/.local/bin, but is there option to locally install a flake? I could try doing publish but it seems it’s not polished yet, guessing on other topics.

Hej again!

Please understand that i have to preface this answer with the obligatory disclaimer that flox we are reworking the environment concepts and the answer to this question will change over the coming weeks.

If you already have a flake, i.e. initialized your package with flox, locally you should be able to install packages from that project using

$ flox install git+file://$PWD#spotify_player

assuming you package is defined in ./pkgs/spotify_player.

Mind, that you might be unable to share this environment off of your machine as it will depend on an absolute path. If you have the repository with the package pushed to github you can also build it from there using a flake reference:

$ flox install git+ssh://git@github.com/owner/repo#spotify_player

The “intended” way of installing packages is to first publish them to a catalog, and install them from there. That way flox has a machine independent way of referring to packages and is able to apply some performance optimizations.

However, since we are currently focused on environments themself with building and publishing further down the list, you may have a better experience using flake references for the time being.

nice, yeah this works, quite slowly but works :slight_smile: Exporting environments is on my list to do to share envs between machines. I tried it once but older version of Flox just force-pushed my master branch when I tried to do that :smiley:

Hi @anon59756714 - glad you have a workaround for now.
Please do keep an eye out regarding our release notes for updates as we move forward on these CLI changes so you can test them out when they are ready and give us feedback. :slight_smile:

1 Like