Skip to content

Build failure ex_heroicons #38

@borgoat

Description

@borgoat

Hello, I'm struggling to build an app that has ex_heroicons (note this isn't the GitHub dependency on tailwindlabs/heroicons, but rather a Hex package that adds some convenience wrappers around that)1

I reproduced the issue in the example project from this repo2 and I get the following failure trying to build it:

╰─❯ nix build '.#example'
warning: Git tree '/home/borgoat/Workspace/github.com/code-supply/deps_nix' is dirty
error: Cannot build '/nix/store/mk8f9rn2gknjc1g3k9b7z9ifjhy85qw5-ex_heroicons-3.1.0.drv'.
       Reason: builder failed with exit code 1.
       Output paths:
         /nix/store/5mlyj3j2sg61sxbmbav958i9srwmnrkw-ex_heroicons-3.1.0
       Last 25 log lines:
       > Running phase: patchPhase
       > Running phase: updateAutotoolsGnuConfigScriptsPhase
       > Running phase: configurePhase
       > Running phase: buildPhase
       > Compiling 2 files (.ex)
       >
       > == Compilation error in file lib/heroicons.ex ==
       > ** (RuntimeError) Heroicons not found, please add the `heroicons` dependency to your project.
       >
       > Add `heroicons` to the list of dependencies in `mix.exs`:
       >
       >   def deps do
       >     [
       >       ...,
       >       {:heroicons,
       >       github: "tailwindlabs/heroicons",
       >       tag: "v2.1.5",
       >       sparse: "optimized",
       >       app: false,
       >       compile: false,
       >       depth: 1}
       >     ]
       >   end
       >
       >     lib/heroicons.ex:51: (module)
       For full logs, run:
         nix log /nix/store/mk8f9rn2gknjc1g3k9b7z9ifjhy85qw5-ex_heroicons-3.1.0.drv
error: Cannot build '/nix/store/gljwcaprq43vazli6flw5r8vnmhsxdaa-example-0.1.0.drv'.
       Reason: 1 dependency failed.
       Output paths:
         /nix/store/a4rpdhrw5w97fmj7j2gcyi8sfsg9lm83-example-0.1.0

I could track down the failure to this check that ex_heroicons performs at compile time, looking for the actual heroicons repo as a "peer dependency".3

However, in the derivation for ex_heroicons that folder won't be available.
I can't quite figure out a way around it, not sure if I'm doing something wrong, or there's no way this is supported out of the box.

Footnotes

  1. https://hexdocs.pm/ex_heroicons/Heroicons.html

  2. https://github.com/borgoat/deps_nix/tree/ex_heroicons

  3. https://github.com/miguel-s/ex_heroicons/blob/eef79ce7eee702697b4442b6cc548bea994dcfcc/lib/heroicons.ex#L50-L69

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions