Skip to content
This repository was archived by the owner on Feb 25, 2019. It is now read-only.
This repository was archived by the owner on Feb 25, 2019. It is now read-only.

Cargo-specific environment variables are missing #4

@tazjin

Description

@tazjin

Issue description

This issue was discovered in combination with the comrak issues
described in #2.

When building the comrak binary crate, the following line of code is
run (from here):

.about(crate_description!())

The crate_description! macro expands to a call to
env!("CARGO_PKG_DESCRIPTION"), which attempts to read the
CARGO_PKG_DESCRIPTION variable at compile-time.

However, this environment variable is not present in Carnix-builds
which will cause the build to error at that point.

In several of my projects I've applied a workaround for this that
uses overrideAttrs to "fake" the environment variable, as issue #2
meant that I could not figure out how to stop the binary from being
built:

comrak_0_2_9 = { features?(comrak_0_2_9_features {}) }: (comrak_0_2_9_ {
  # bla bla bla #
}).overrideAttrs (oldAttrs: rec { CARGO_PKG_DESCRIPTION = "dummy"; });

There may be other such environment variables that crates attempt to
use, but I haven't looked deeper into that yet.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions