Skip to content

Having trouble using cached protoc binary with nix-shell #326

Description

@martyall

I'm trying to compile a scala project that generates code via sbt-protoc but I am getting the following error message:

...
[error] 	at java.base/java.lang.Thread.run(Thread.java:829)
[error] (protos / Compile / protocGenerate) error occurred while compiling protobuf files: Cannot run program "/home/martyall/.cache/protocbridge/v1/protoc-linux-x86_64-3.19.3": error=2, No such file or directory
[error] Total time: 2 s, completed Jan 24, 2023, 2:44:16 AM

My thought is that because I am using nix flakes, nix has no clue where $HOME/.cache is located. What is the advised workaround for this problem?

My flake file looks like:

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions