DeterminateSystems / fh

The official CLI for FlakeHub: search for flakes, and add new inputs to your Nix flake.
https://flakehub.com
Apache License 2.0
116 stars 8 forks source link

<autogenerated-issue> fh failed to convert repo #118

Open JeremiahSecrist opened 3 months ago

JeremiahSecrist commented 3 months ago

info

I think the issue lies within using refs/tags being unhandled

command: fh convert

Error

Error: 
   0: flakehub input did not match the expected format of `org/project` or
                      `org/project/version`

code:

inputs = {
    nixpkgs.url = "github:nixos/nixpkgs/nixos-24.05";
    nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable";
    nixos-generators = {
      url = "github:nix-community/nixos-generators";
      inputs.nixpkgs.follows = "nixpkgs";
    };
    disko = {
      url = "github:nix-community/disko/refs/tags/v1.3.0";
      inputs.nixpkgs.follows = "nixpkgs";
    };
    deploy-rs.url = "github:serokell/deploy-rs";
    agenix = {
      url = "github:ryantm/agenix";
      # inputs.nixpkgs.follows = "nixpkgs";
    };
    authentik-nix = {
      url = "github:nix-community/authentik-nix";
      inputs.nixpkgs.follows = "nixpkgs";
    };
    simple-nixos-mailserver = {
      url = "gitlab:simple-nixos-mailserver/nixos-mailserver/nixos-23.11";
    };
    nixos-anywhere = {
      url = "github:nix-community/nixos-anywhere/refs/tags/1.1.1";
    };
  };

Metadata

key value
version 0.1.10
os nixos
arch x86_64
cole-h commented 3 months ago

We could certainly stand to improve our error message there.

One thing I would try is removing the refs/tags/ from the URLs. The github fetcher understands branch names, commit hashes, and tag names in that final segment, so that would at least unblock you for now!

JeremiahSecrist commented 3 months ago

One thing I would try is removing the refs/tags/ from the URLs. The github fetcher understands branch names, commit hashes, and tag names in that final segment, so that would at least unblock you for now!

That is the issue at hand here for sure. I just thought it would be worth posting! I also just wish it would say which inputs failed and convert the rest as per normal.