Installing older version of package than available?

Due to how flox packages work, there are 3 stabilities. But what if I want to install really old package that is not in there? Is there an option to subscribe to nixpkgs?

There is a community tool to find which nixpkgs hash has which package version but it’s something I would like to avoid using as it’s not a way I want to work with it :slight_smile:

Yes you should still be able to install older packages using an inline declaration ( we are making progress on allowing this from the CLI in the future though ).

So lets say you used a search tool like the one you linked to find an old release of terraform at 1.0.7.

$ flox edit -e my-env;
# Write your inline package like this.
# Replace that `rev' with whatever you'd like.
{
  inline.packages.terraform = { system, ... }: let
    nixpkgs = builtins.getFlake
                "github:NixOS/nixpkgs/f8f124009497b3f9908f395d2533a990feee1de8";
  in nixpkgs.legacyPackages.${system}.terraform;
}
1 Like

Glad to help, I also realized that this should work as well. Let me know if you have any further questions.

{
  packages."github:NixOS/nixpkgs/<REV>".terraform = {};
}

This does not work, Nix tried to download https://api.github.com/repos/NixOS/nixpkgs/commits/79b3d4bcae8c7007c9fd51c279a8a67acfa73a2a/79b3d4bcae8c7007c9fd51c279a8a67acfa73a2a for some reason

Do you mean that the second option didn’t work? Or did the first fail as well?

the second, the first works

Great thanks for clarifying.