Skip to content

How to statically compile OpenSSL with naersk (static-musl example)? #356

@hidrol

Description

@hidrol

Hi everyone,

I'm trying to statically compile my Rust project with OpenSSL using naersk and the static-musl example from the repo (https://github.com/nix-community/naersk/blob/master/examples/static-musl/flake.nix).

However, I'm not sure how to add OpenSSL in a way that works with musl and static linking. I tried adding pkgs.openssl but it either fails to link or complains about missing symbols.

Has anyone successfully linked OpenSSL statically in this setup? I'd really appreciate any pointers or a working flake.nix snippet.

Thanks in advance!

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