Hi there,
Here are some notes from my attempt to migrate from flox 0.3.6 to 0.9.0.
After downloading and installing 0.9.0, I tried flox list
:
-
My first error was
expected
to be on the right side of
–`` because I hadflox activate -e flox/default
in my.zshrc
file -
Then I tried
flox help
andflox list
and got the messageCould not parse config: missing field 'search_strategy'
. I fixed this by renaming my~/.config/flox/flox.toml
file. -
I tried again
flox list
and got an error, with a red cross,No environment found in "/Users/etorreborre"
. This is a bit harsh :-). -
Then I wanted to recreate my environments. So I logged in with
flox auth login
. Everything good -
I tried to search for one of my packages with
flox search atuin
. It’s taking forever, so I stopped and had a look at the search options, finally decided to use-v
. That printed"This may take a while the first time you run it"
. I think it would make sense to display the message without the-v
flag at first. -
But then, very cool
flox show atuin
is super fast! Even searching for another package, that was not installed is instantaneous. Yes! -
I tried to install with
flox install atuin -r etorreborre/default
. I was expecting the environment to be created by default remotely but that didn’t work -
So I created a default environment with
flox init
and installedatuin
withflox install atuin
. -
Then I pushed with
flox push
. All good! -
I then created a folder
scala
under/Users/etorreborre/.local/state/flox
to create ascala
environment (is it the right XDG place to do this?) and started recreating my Scala environment. -
I must say that I love the new conceptual model, of a
.flox
directory that you can push and pull! This is a lot better than the environment / project distinction that existed before. -
Then I installed a lot more stuff.
-
Some versions seem to be missing. For example I previously installed
dune-3.12.1
but now I can only search and install3.11.1
-
flox list
could present the data on 2 columns, with the version in the second column (like it was before). Right now it is something like:
atuin: atuin (17.0.1)
bat: bat (0.24.0)
bottom: bottom (0.9.6)
btop: btop (1.2.13)
curl: curl (8.4.0)
direnv: direnv (2.32.3)
....
- I am getting an error for
flox install opam
ERROR: Failed to build package 'opam': error: builder for '/nix/store/31gs99583z3wmbx2y8zm55l2ppx7saah-opam-2.1.5.drv' failed with exit code 2;
last 10 log lines:
> ml2c_property(Virtual_packages*, std::__1::map<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, CUDFProperty*, std::__1::less<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>, std::__1::allocator<std::__1::pair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const, CUDFProperty*>>>*, long) in libmccs_stubs.a(mccs_stubs.o)
> ml2c_package(Virtual_packages*, std::__1::map<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, CUDFProperty*, std::__1::less<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>, std::__1::allocator<std::__1::pair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const, CUDFProperty*>>>*, int&, long) in libmccs_stubs.a(mccs_stubs.o)
> ml2c_propertydef(Virtual_packages*, long) in libmccs_stubs.a(mccs_stubs.o)
> ml2c_propertydeflist(Virtual_packages*, long) in libmccs_stubs.a(mccs_stubs.o)
> ...
> ld: symbol(s) not found for architecture arm64
> clang-16: error: linker command failed with exit code 1 (use -v to see invocation)
> File "caml_startup", line 1:
> Error: Error during linking (exit code 1)
> make: *** [Makefile:135: build-opam] Error 1
For full logs, run 'nix-store -l /nix/store/31gs99583z3wmbx2y8zm55l2ppx7saah-opam-2.1.5.drv'.
But I am left in the dark on what to do. I was able to install it ok with the previous flox version (I retried an install today and it works ok).
-
I was also not able to re-install
nodePackages.pnpm
even though I can see it insearch.nixos.org
ormolu
. It conflicts withghcid
❌ ERROR: 'ghcid' conflicts with 'ormolu'. Both packages provide the file '/lib/links/libgmpxx.4.dylib'
even if I was able to install it previously. I edited the environment to add anormolu.optional = true
entry and got a message telling me that I could set the priority of the preferred package to something < 5. I triedormolu.priority = 3
and that worked. This is a lot of guesswork though.- the exact version of Apache Kafka I’m using
apache-kafka-2.13-3.3.1
. I can’t use another version for … reasons :-). - ‘unfree’ packages. For example
_1password
:ERROR: package '_1password' failed to evaluate: Package ‘1password-cli-2.23.0’
. I tried to doexport NIXPKGS_ALLOW_UNFREE=1
as suggested but that did not help.
-
I have the same issue with the
terraform
package. -
I got an error when listing one of my environments
flox list -d ockam
❌ ERROR: failed to parse contents of locked manifest: invalid type: null, expected a string
-
Unfortunately I’m stuck on the error above. I tried to remove the lock file, and get it to be recreated with
flox list
but I end up with the same error. -
The issue seems to be caused by this package
"influxdb2": {
"attr-path": [
"legacyPackages",
"aarch64-darwin",
"influxdb2"
],
"info": {
"broken": false,
"description": null,
"license": null,
"pname": "influxdb2",
"unfree": false,
"version": null
},
"input": {
"attrs": {
"lastModified": 1708174113,
"narHash": "sha256-L5/HWtl7UIsM4K/UO9CwIKVLXvT+WBU0BY8ElBKP5p8=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "8aa544c473432bff526fdf2995f8efdcc8f5a033",
"type": "github"
},
"fingerprint": "69c92929d8a509bc1903b475004a45e454c254a35c63c066231bf25f2129af02",
"url": "github:NixOS/nixpkgs/8aa544c473432bff526fdf2995f8efdcc8f5a033"
},
"priority": 5
},
I suppose that "version": null
is the unexpected field.
- When I activate an environment I am getting some errors messages
flox activate -r etorreborre/scala ✅ You are now using the environment etorreborre/scala (remote).
To stop using this environment, type 'exit'
❌ ERROR: expected `<cmd>` to be on the right side of `--`
❌ ERROR: expected `<cmd>` to be on the right side of `--`
flox [etorreborre/scala etorreborre/dotfiles etorreborre/default] etorreborre@eric-mbp ~ %
And my custom starship prompt gets broken. I suspect that this is due to my own setup somehow. I was expecting an old command flox activate -e
command to be somewhere but I can’t find anything like this. If you have a hunch, please tell!
-
One question: how can I manage
flox
withflox
itself?flox search flox
returns nothing :-). -
I discovered that FloxHub was accessible at https://hub.flox.dev. It’s gorgeous and I think it deserves a mention in the help because otherwise there’s no way to list all the remote environments I have created.
-
The notion of a catalog is still a bit obscure to me. It is supposed to be
-
There’s a bug in the doc where
@
for a package version ends-up being interpreted as 'email protected` -
I like the emoticons in the various messages
That’s it for today. This is overall very positive and I can’t wait to get the full experience including publishing my own packages (I have one or 2).