oxalica / nocargo

[alpha] Build Rust crates with Nix Build System.
MIT License
138 stars 9 forks source link

fix cargo pkg version parsing #18

Open therishidesai opened 9 months ago

therishidesai commented 9 months ago

The setCargoCommonBuildEnv function in builder-common.sh doesn't properly use BASH_REMATCH to parse the version number. The 0 index of BASH_REMATCH is the whole string so the CARGO_PKG_VERSION_MAJOR was failing with an InvalidDigit Error. I noticed this when trying to package the ffmpeg-sys-next crate using nocargo.