# Packages and develop

**URL:** <https://discourse.flox.dev/t/packages-and-develop/453>\
**Category:** Bug Reports\
**Created:** [October 30, 2022, 3:44pm UTC](https://discourse.flox.dev/t/packages-and-develop/453 "2022-10-30T15:44:40Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![etorreborre](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.flox.dev/etorreborre/32/428_2.png) [@etorreborre](https://discourse.flox.dev/u/etorreborre)\
**Post date:** [October 30, 2022, 3:44pm UTC](https://discourse.flox.dev/t/packages-and-develop/453/1 "2022-10-30T15:44:40Z")

</div>

Hi, I don’t understand why, when I type `flox packages --all` I get

```auto
cargo - Downloads your Rust project's dependencies and builds your project
  stable.nixpkgs-flox.cargo@1.53.0
  stable.nixpkgs-flox.cargo@1.57.0
  stable.nixpkgs-flox.cargo@1.60.0
  staging.nixpkgs-flox.cargo@1.60.0
  staging.nixpkgs-flox.cargo@1.61.0
  staging.nixpkgs-flox.cargo@1.62.1
  unstable.nixpkgs-flox.cargo@1.61.0
  unstable.nixpkgs-flox.cargo@1.62.1
  unstable.nixpkgs-flox.cargo@1.64.0

```

as the versions for `cargo`, but when I enter a development shell with `flox develop` I get

```auto
[flox] λ cargo --version
cargo 1.63.0

```

And that version is not even listed in the list above. Where does it come from?

Moreover I seems to have issues with the syntax for command lines options because when I try to filter by subchannel I get no results:

```auto
flox packages [--all | stability[.channel[.package]] ] [--show-libs]
        list all packages or filtered by channel[.subchannel[.package]]

```

for

```auto
flox packages stable.nixpkgs-flox.cargo
flox packages stable.nixpkgs-flox
flox packages stable

```

To give a bit more colour here is what I’m getting when using the stability flag

```auto
± flox --stability unstable develop
[flox] λ cargo --version
cargo 1.63.0
[flox] λ exit
exit

± flox --stability stable develop
[flox] λ cargo --version
cargo 1.63.0
[flox] λ

```

---

<div class="post-metadata">

**Author:** ![limeytexan](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.flox.dev/limeytexan/32/10_2.png) [@limeytexan](https://discourse.flox.dev/u/limeytexan)\
**Post date:** [October 30, 2022, 8:32pm UTC](https://discourse.flox.dev/t/packages-and-develop/453/2 "2022-10-30T20:32:22Z")

</div>

Great question - thanks for asking.

Flox provides multiple ways of consuming nixpkgs, and the most important two are:

1. **catalog**

2. **stabilities**

It’s not a problem for flox environments to include packages built from different versions of nixpkgs, so when you install a package to an environment with `flox install` that is using the **catalog**.

However, when developing software with `flox build` or `flox develop`, it is _essential_ that all of the packages used in that “instantiation” be derived from a single version of nixpkgs, so in this case it is the **stability** that determines which version of nixpkgs is used. The `flox` application provides the `--stability` option for selecting the stability of a given invocation, as in `flox --stability unstable develop`.

Back to your question … you’re getting version 1.63.0 when invoking `flox develop` (with the “stable” stability) because the github:flox/nixpkgs stable branch has that as the current version of rustc/cargo, and you’re wondering _why is the catalog showing the latest “stable” version as 1.60.0_?

In short … that’s a bug with the rendering of the catalog - it should be showing 1.63.0! Thank you for highlighting - I’ll look into that first thing in the morning because that’s definitely not correct.

---

<div class="post-metadata">

**Author:** ![limeytexan](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.flox.dev/limeytexan/32/10_2.png) [@limeytexan](https://discourse.flox.dev/u/limeytexan)\
**Post date:** [October 30, 2022, 8:34pm UTC](https://discourse.flox.dev/t/packages-and-develop/453/3 "2022-10-30T20:34:15Z")

</div>

One further comment regarding the use of `flox --stability` … it’s not working at the moment. We discovered on Friday there had been a regression in the communication of the nixpkgs override throughout the calling stack and it only uses the “stable” branch. We’re working on a fix for that now and I expect to get a patch out for that bug by Tuesday at the latest.

---

<div class="post-metadata">

**Author:** ![limeytexan](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.flox.dev/limeytexan/32/10_2.png) [@limeytexan](https://discourse.flox.dev/u/limeytexan)\
**Post date:** [November 1, 2022, 12:47pm UTC](https://discourse.flox.dev/t/packages-and-develop/453/4 "2022-11-01T12:47:21Z")

</div>

> [@limeytexan](#):
>
> In short … that’s a bug with the rendering of the catalog - it should be showing 1.63.0! Thank you for highlighting - I’ll look into that first thing in the morning because that’s definitely not correct.

Found and fixed the bug (we had restructured the catalog metadata and in the process broken the sorting of builds by revision count), and I’m pleased to report the catalog is now showing the most recent cargo versions:

```auto
$ flox search cargo --refresh | head -10
cargo - Downloads your Rust project's dependencies and builds your project
  stable.nixpkgs-flox.cargo@1.62.0
  stable.nixpkgs-flox.cargo@1.62.1
  stable.nixpkgs-flox.cargo@1.63.0
  staging.nixpkgs-flox.cargo@1.62.1
  staging.nixpkgs-flox.cargo@1.63.0
  staging.nixpkgs-flox.cargo@1.64.0
  unstable.nixpkgs-flox.cargo@1.62.1
  unstable.nixpkgs-flox.cargo@1.63.0
  unstable.nixpkgs-flox.cargo@1.64.0

```

Thanks again for highlighting the bug!

---

<div class="post-metadata">

**Author:** ![etorreborre](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.flox.dev/etorreborre/32/428_2.png) [@etorreborre](https://discourse.flox.dev/u/etorreborre)\
**Post date:** [November 1, 2022, 1:02pm UTC](https://discourse.flox.dev/t/packages-and-develop/453/5 "2022-11-01T13:02:19Z")

</div>

Nice! Is the new version released? (suggestion: having the latest version number in the install docs could be a way to check what’s the most up to date version)

---

<div class="post-metadata">

**Author:** ![robinbrantley](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.flox.dev/robinbrantley/32/39_2.png) [@robinbrantley](https://discourse.flox.dev/u/robinbrantley)\
**Post date:** [November 1, 2022, 4:10pm UTC](https://discourse.flox.dev/t/packages-and-develop/453/6 "2022-11-01T16:10:14Z")

</div>

thanks for the suggestion; we will definitely look into this. In the meantime, we’ll let you know once the update is available for you to test 🙂

---

<div class="post-metadata">

**Author:** ![limeytexan](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.flox.dev/limeytexan/32/10_2.png) [@limeytexan](https://discourse.flox.dev/u/limeytexan)\
**Post date:** [November 1, 2022, 9:09pm UTC](https://discourse.flox.dev/t/packages-and-develop/453/7 "2022-11-01T21:09:13Z")

</div>

Good news, the new version (0.0.6-r49) is out and available for installation using … _flox!!!_

```auto
$ flox search -c flox flox-prerelease
flox.flox-prerelease
  stable.flox.flox-prerelease@0.0.6-r45
  stable.flox.flox-prerelease@0.0.6-r49
  staging.flox.flox-prerelease@0.0.6-r45
  unstable.flox.flox-prerelease@0.0.6-r45

$ flox install flox.flox-prerelease

$ flox activate
Supercharged by flox!

[flox] [~/src/rust-edits]$ flox --version
Version: 0.0.6-r49

```

This version fixes the bug with the `--stability` flag as shown below:

```auto
[flox] [~/src/rust-edits]$ flox develop
Supercharged by flox!
[flox] λ cargo --version
cargo 1.63.0
[flox] λ 
exit

[flox] [~/src/rust-edits]$ flox --stability unstable develop
warning: not writing modified lock file of flake 'git+file:///home/brantley/src/rust-edits':
• Updated input 'floxpkgs/nixpkgs/nixpkgs':
    'github:flox/nixpkgs/d6490a0bd9dfb298fcd8382d3363b86870dc7340' (2022-09-21)
  → 'github:flox/nixpkgs/f994293d1eb8812f032e8919e10a594567cf6ef7' (2022-10-25)
Supercharged by flox!
[flox] λ cargo --version
cargo 1.64.0
[flox] λ 
exit

```

I’ve published this version for `x86_64-linux` and `{aarch64,x86_64}-darwin`, so the above procedure should work on any of those system types.

Can you please give that a try and confirm that it works the same for you? With your confirmation we’ll go ahead and merge it into the main release repository tomorrow, at which point the default installers will be updated to reflect the new version on all distributions/architectures.

Again, many thanks for all of your feedback!

---

<div class="post-metadata">

**Author:** ![etorreborre](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.flox.dev/etorreborre/32/428_2.png) [@etorreborre](https://discourse.flox.dev/u/etorreborre)\
**Post date:** [November 1, 2022, 9:46pm UTC](https://discourse.flox.dev/t/packages-and-develop/453/8 "2022-11-01T21:46:25Z")

</div>

Hi Michael,

I’m afraid that it doesn’t work for me

```auto
~/projects/rust/edits on main
± flox search -c flox flox-prerelease
flox.flox-prerelease
  stable.flox.flox-prerelease@0.0.6-r49

~/projects/rust/edits on main
± flox install flox.flox-prerelease
failed to find a binary download for 'flake:flox#evalCatalog.x86_64-darwin.stable.flox-prerelease'
try building from source by installing as 'flake:flox#evalCatalog.x86_64-darwin.stable.flox-prerelease.fromSource':

	$ flox install flake:flox#evalCatalog.x86_64-darwin.stable.flox-prerelease.fromSource

failed to find a binary download for 'flake:flox#evalCatalog.x86_64-darwin.stable.flox-prerelease'

ERROR: failed to install packages: flake:flox#evalCatalog.x86_64-darwin.stable.flox-prerelease

```

---

<div class="post-metadata">

**Author:** ![etorreborre](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.flox.dev/etorreborre/32/428_2.png) [@etorreborre](https://discourse.flox.dev/u/etorreborre)\
**Post date:** [November 1, 2022, 9:49pm UTC](https://discourse.flox.dev/t/packages-and-develop/453/9 "2022-11-01T21:49:10Z")

</div>

Possible the next thing I tried explains why?

```auto
± flox install flake:flox#evalCatalog.x86_64-darwin.stable.flox-prerelease.fromSource
ERROR: Repository not found.
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
warning: could not read HEAD ref from repo at 'ssh://git@github.com/flox/floxpkgs-internal.git', using 'master'
ERROR: Repository not found.
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
error: program 'git' failed with exit code 128
(use '--show-trace' to show detailed location information)

ERROR: failed to install packages: flake:flox#evalCatalog.x86_64-darwin.stable.flox-prerelease.fromSource

```

Something having to do with access rights on your catalog?

---

<div class="post-metadata">

**Author:** ![limeytexan](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.flox.dev/limeytexan/32/10_2.png) [@limeytexan](https://discourse.flox.dev/u/limeytexan)\
**Post date:** [November 1, 2022, 10:22pm UTC](https://discourse.flox.dev/t/packages-and-develop/453/10 "2022-11-01T22:22:01Z")

</div>

> [@etorreborre](#):
>
> ```auto
> failed to find a binary download for 'flake:flox#evalCatalog.x86_64-darwin.stable.flox-prerelease'
> 
> ```

My apologies - I published the metadata but neglected to copy the closure to [cache.floxdev.com](http://cache.floxdev.com). I’ve done that now, can you please try the installation again? Many thanks!

---

<div class="post-metadata">

**Author:** ![etorreborre](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.flox.dev/etorreborre/32/428_2.png) [@etorreborre](https://discourse.flox.dev/u/etorreborre)\
**Post date:** [November 1, 2022, 10:24pm UTC](https://discourse.flox.dev/t/packages-and-develop/453/11 "2022-11-01T22:24:13Z")

</div>

I’m still getting the same message. Is there anything else I should check?

---

<div class="post-metadata">

**Author:** ![limeytexan](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.flox.dev/limeytexan/32/10_2.png) [@limeytexan](https://discourse.flox.dev/u/limeytexan)\
**Post date:** [November 1, 2022, 10:42pm UTC](https://discourse.flox.dev/t/packages-and-develop/453/12 "2022-11-01T22:42:53Z")

</div>

Thanks for your patience … it appears the package itself is being published with a path beginning with “70hsn04v”, but that is just a package containing 6 symlinks pointing at the package with a path beginning with “vhawj9db”. Furthermore, one of those links (for `manifest.nix`) is clearly wrong.

I’m not sure why the published entry contains the (superfluous?) extra top-level package and we’ll look into the broken link, but as I’ve now copied that extra package into the binary cache the installation should succeed now - can you try the command once more?

Background data for the record:

```auto
MacBook-Air:floxpkgs-internal brantley$ result/bin/flox install flox.flox-prerelease
MacBook-Air:floxpkgs-internal brantley$ result/bin/flox list --out-path | grep flox.flox-prerelease
    2 stable.flox.flox-prerelease	/nix/store/70hsn04v5kfxa0rj3v2qys37d7pyb170-flox-prerelease-0.0.6-r49
MacBook-Air:floxpkgs-internal brantley$ find /nix/store/70hsn04v5kfxa0rj3v2qys37d7pyb170-flox-prerelease-0.0.6-r49 -ls
1542488 0 dr-xr-xr-x 8 root wheel 256 1 Jan 1970 /nix/store/70hsn04v5kfxa0rj3v2qys37d7pyb170-flox-prerelease-0.0.6-r49
1542494 0 lrwxr-xr-x 1 root wheel 69 1 Jan 1970 /nix/store/70hsn04v5kfxa0rj3v2qys37d7pyb170-flox-prerelease-0.0.6-r49/manifest.nix -> /nix/store/vhawj9dbnvlqj5b2dw3masyq603ay7ym-flox-prerelease-0.0.6-r49
1542489 0 lrwxr-xr-x 1 root wheel 73 1 Jan 1970 /nix/store/70hsn04v5kfxa0rj3v2qys37d7pyb170-flox-prerelease-0.0.6-r49/bin -> /nix/store/vhawj9dbnvlqj5b2dw3masyq603ay7ym-flox-prerelease-0.0.6-r49/bin
1542490 0 lrwxr-xr-x 1 root wheel 77 1 Jan 1970 /nix/store/70hsn04v5kfxa0rj3v2qys37d7pyb170-flox-prerelease-0.0.6-r49/libexec -> /nix/store/vhawj9dbnvlqj5b2dw3masyq603ay7ym-flox-prerelease-0.0.6-r49/libexec
1542491 0 lrwxr-xr-x 1 root wheel 73 1 Jan 1970 /nix/store/70hsn04v5kfxa0rj3v2qys37d7pyb170-flox-prerelease-0.0.6-r49/etc -> /nix/store/vhawj9dbnvlqj5b2dw3masyq603ay7ym-flox-prerelease-0.0.6-r49/etc
1542492 0 lrwxr-xr-x 1 root wheel 73 1 Jan 1970 /nix/store/70hsn04v5kfxa0rj3v2qys37d7pyb170-flox-prerelease-0.0.6-r49/lib -> /nix/store/vhawj9dbnvlqj5b2dw3masyq603ay7ym-flox-prerelease-0.0.6-r49/lib
1542493 0 lrwxr-xr-x 1 root wheel 75 1 Jan 1970 /nix/store/70hsn04v5kfxa0rj3v2qys37d7pyb170-flox-prerelease-0.0.6-r49/share -> /nix/store/vhawj9dbnvlqj5b2dw3masyq603ay7ym-flox-prerelease-0.0.6-r49/share

```

---

<div class="post-metadata">

**Author:** ![etorreborre](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.flox.dev/etorreborre/32/428_2.png) [@etorreborre](https://discourse.flox.dev/u/etorreborre)\
**Post date:** [November 1, 2022, 10:53pm UTC](https://discourse.flox.dev/t/packages-and-develop/453/13 "2022-11-01T22:53:56Z")

</div>

We’re making progress, no errors, but…

```auto
± flox install flox.flox-prerelease

~/projects/rust/edits on main
± flox --version
Version: 0.0.6-r45

```

---

<div class="post-metadata">

**Author:** ![etorreborre](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.flox.dev/etorreborre/32/428_2.png) [@etorreborre](https://discourse.flox.dev/u/etorreborre)\
**Post date:** [November 1, 2022, 10:55pm UTC](https://discourse.flox.dev/t/packages-and-develop/453/14 "2022-11-01T22:55:52Z")

</div>

Well, sorry, everything works of course!

```auto
± flox activate
[flox]
~/projects/rust/edits on main
± flox --version
Version: 0.0.6-r49

```

Thanks!

---

<div class="post-metadata">

**Author:** ![robinbrantley](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.flox.dev/robinbrantley/32/39_2.png) [@robinbrantley](https://discourse.flox.dev/u/robinbrantley)\
**Post date:** [November 3, 2022, 11:14am UTC](https://discourse.flox.dev/t/packages-and-develop/453/15 "2022-11-03T11:14:29Z")

</div>

Just wrapping up thread and confirming that flox has been updated and the current version is flox-0.0.6-r49. We plan to announce future releases in flox discourse.

Any issues, just let us know. 🙂
