Skip to content

Crates with build.rs reading env CARGO_PKG_README broken #440

@p1k0chu

Description

@p1k0chu

Description

crate2nix breaks crates that have build.rs that reads env variable CARGO_PKG_README
specifically this crate doesn't build with crate2nix, but builds normally

Steps to Reproduce

  1. create empty project and add rusqlite_migration as dependency
  2. crate2nix generate
  3. nix-build -f Cargo.nix rootCrate.build fails

Expected Behavior

I expected the build to succeed, as the crate builds without issues with regular cargo build.

Actual Behavior

in rusqlite_migration's build.rs, CARGO_PKG_README is an empty string, so it fails because that file doesn't exist

Environment

  • crate2nix version: 0.15.0
  • Nix version: 2.31.3
  • OS: 6.18.13 x86_64 GNU/Linux, NixOS

Reproducible Test Case

#441

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions